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.17;
/**
* @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() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner(){
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) onlyOwner public {
}
}
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public constant returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public constant returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @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) {
}
}
/**
* @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) public returns (bool){
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) public constant returns (uint256 balance) {
}
}
/**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amout of tokens to be transfered
*/
function transferFrom(address _from, address _to, uint256 _value) public 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) 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 specifing the amount of tokens still avaible for the spender.
*/
function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
}
}
/**
* @title Mintable token
* @dev Simple ERC20 Token example, with mintable token creation
* @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120
* Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol
*/
contract MintableToken is StandardToken, Ownable {
event Mint(address indexed to, uint256 amount);
event MintFinished();
bool public mintingFinished = false;
modifier canMint() {
}
/**
* @dev Function to mint tokens
* @param _to The address that will recieve the minted tokens.
* @param _amount The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/
function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
}
/**
* @dev Function to stop minting new tokens.
* @return True if the operation was successful.
*/
function finishMinting() onlyOwner public returns (bool) {
}
}
contract MITx_Token is MintableToken {
string public name = "Morpheus Infrastructure Token";
string public symbol = "MITx";
uint256 public decimals = 18;
bool public tradingStarted = false;
/**
* @dev modifier that throws if trading has not started yet
*/
modifier hasStartedTrading() {
}
/**
* @dev Allows the owner to enable the trading. This can not be undone
*/
function startTrading() public onlyOwner {
}
/**
* @dev Allows anyone to transfer the MiT tokens once trading has started
* @param _to the recipient address of the tokens.
* @param _value number of tokens to be transfered.
*/
function transfer(address _to, uint _value) hasStartedTrading public returns (bool) {
}
/**
* @dev Allows anyone to transfer the MiT tokens once trading has started
* @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 uint the amout of tokens to be transfered
*/
function transferFrom(address _from, address _to, uint _value) hasStartedTrading public returns (bool) {
}
function emergencyERC20Drain( ERC20 oddToken, uint amount ) public {
}
}
contract MITx_TokenSale is Ownable {
using SafeMath for uint256;
// The token being sold
MITx_Token public token;
uint256 public decimals;
uint256 public oneCoin;
// start and end block where investments are allowed (both inclusive)
uint256 public startTimestamp;
uint256 public endTimestamp;
// timestamps for tiers
uint256 public tier1Timestamp;
uint256 public tier2Timestamp;
uint256 public tier3Timestamp;
// address where funds are collected
address public multiSig;
function setWallet(address _newWallet) public onlyOwner {
}
// These will be set by setTier()
uint256 public rate; // how many token units a buyer gets per wei
uint256 public minContribution = 0.0001 ether; // minimum contributio to participate in tokensale
uint256 public maxContribution = 200000 ether; // default limit to tokens that the users can buy
// ***************************
// amount of raised money in wei
uint256 public weiRaised;
// amount of raised tokens
uint256 public tokenRaised;
// maximum amount of tokens being created
uint256 public maxTokens;
// maximum amount of tokens for sale
uint256 public tokensForSale;
// number of participants in presale
uint256 public numberOfPurchasers = 0;
// for whitelist
address public cs;
// switch on/off the authorisation , default: true
bool public freeForAll = true;
mapping (address => bool) public authorised; // just to annoy the heck out of americans
event TokenPurchase(address indexed beneficiary, uint256 value, uint256 amount);
event SaleClosed();
function MITx_TokenSale() public {
}
/**
* @dev Calculates the amount of bonus coins the buyer gets
*/
function setTier() internal {
}
// @return true if crowdsale event has ended
function hasEnded() public constant returns (bool) {
}
/**
* @dev throws if person sending is not contract owner or cs role
*/
modifier onlyCSorOwner() {
}
modifier onlyCS() {
}
/**
* @dev throws if person sending is not authorised or sends nothing
*/
modifier onlyAuthorised() {
require(<FILL_ME>)
require (now >= startTimestamp);
require (!(hasEnded()));
require (multiSig != 0x0);
require(tokensForSale > tokenRaised); // check we are not over the number of tokensForSale
_;
}
/**
* @dev authorise an account to participate
*/
function authoriseAccount(address whom) onlyCSorOwner public {
}
/**
* @dev authorise a lot of accounts in one go
*/
function authoriseManyAccounts(address[] many) onlyCSorOwner public {
}
/**
* @dev ban an account from participation (default)
*/
function blockAccount(address whom) onlyCSorOwner public {
}
/**
* @dev set a new CS representative
*/
function setCS(address newCS) onlyOwner public {
}
/**
* @dev set a freeForAll to true ( in case you leave to anybody to send ethers)
*/
function switchONfreeForAll() onlyCSorOwner public {
}
/**
* @dev set a freeForAll to false ( in case you need to authorise the acconts)
*/
function switchOFFfreeForAll() onlyCSorOwner public {
}
function placeTokens(address beneficiary, uint256 _tokens) onlyCS public {
}
// low level token purchase function
function buyTokens(address beneficiary, uint256 amount) onlyAuthorised internal {
}
// transfer ownership of the token to the owner of the presale contract
function finishSale() public onlyOwner {
}
// fallback function can be used to buy tokens
function () public payable {
}
function emergencyERC20Drain( ERC20 oddToken, uint amount ) public {
}
}
| authorised[msg.sender]||freeForAll | 43,038 | authorised[msg.sender]||freeForAll |
null | pragma solidity ^0.4.17;
/**
* @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() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner(){
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) onlyOwner public {
}
}
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public constant returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public constant returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @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) {
}
}
/**
* @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) public returns (bool){
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) public constant returns (uint256 balance) {
}
}
/**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amout of tokens to be transfered
*/
function transferFrom(address _from, address _to, uint256 _value) public 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) 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 specifing the amount of tokens still avaible for the spender.
*/
function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
}
}
/**
* @title Mintable token
* @dev Simple ERC20 Token example, with mintable token creation
* @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120
* Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol
*/
contract MintableToken is StandardToken, Ownable {
event Mint(address indexed to, uint256 amount);
event MintFinished();
bool public mintingFinished = false;
modifier canMint() {
}
/**
* @dev Function to mint tokens
* @param _to The address that will recieve the minted tokens.
* @param _amount The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/
function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
}
/**
* @dev Function to stop minting new tokens.
* @return True if the operation was successful.
*/
function finishMinting() onlyOwner public returns (bool) {
}
}
contract MITx_Token is MintableToken {
string public name = "Morpheus Infrastructure Token";
string public symbol = "MITx";
uint256 public decimals = 18;
bool public tradingStarted = false;
/**
* @dev modifier that throws if trading has not started yet
*/
modifier hasStartedTrading() {
}
/**
* @dev Allows the owner to enable the trading. This can not be undone
*/
function startTrading() public onlyOwner {
}
/**
* @dev Allows anyone to transfer the MiT tokens once trading has started
* @param _to the recipient address of the tokens.
* @param _value number of tokens to be transfered.
*/
function transfer(address _to, uint _value) hasStartedTrading public returns (bool) {
}
/**
* @dev Allows anyone to transfer the MiT tokens once trading has started
* @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 uint the amout of tokens to be transfered
*/
function transferFrom(address _from, address _to, uint _value) hasStartedTrading public returns (bool) {
}
function emergencyERC20Drain( ERC20 oddToken, uint amount ) public {
}
}
contract MITx_TokenSale is Ownable {
using SafeMath for uint256;
// The token being sold
MITx_Token public token;
uint256 public decimals;
uint256 public oneCoin;
// start and end block where investments are allowed (both inclusive)
uint256 public startTimestamp;
uint256 public endTimestamp;
// timestamps for tiers
uint256 public tier1Timestamp;
uint256 public tier2Timestamp;
uint256 public tier3Timestamp;
// address where funds are collected
address public multiSig;
function setWallet(address _newWallet) public onlyOwner {
}
// These will be set by setTier()
uint256 public rate; // how many token units a buyer gets per wei
uint256 public minContribution = 0.0001 ether; // minimum contributio to participate in tokensale
uint256 public maxContribution = 200000 ether; // default limit to tokens that the users can buy
// ***************************
// amount of raised money in wei
uint256 public weiRaised;
// amount of raised tokens
uint256 public tokenRaised;
// maximum amount of tokens being created
uint256 public maxTokens;
// maximum amount of tokens for sale
uint256 public tokensForSale;
// number of participants in presale
uint256 public numberOfPurchasers = 0;
// for whitelist
address public cs;
// switch on/off the authorisation , default: true
bool public freeForAll = true;
mapping (address => bool) public authorised; // just to annoy the heck out of americans
event TokenPurchase(address indexed beneficiary, uint256 value, uint256 amount);
event SaleClosed();
function MITx_TokenSale() public {
}
/**
* @dev Calculates the amount of bonus coins the buyer gets
*/
function setTier() internal {
}
// @return true if crowdsale event has ended
function hasEnded() public constant returns (bool) {
}
/**
* @dev throws if person sending is not contract owner or cs role
*/
modifier onlyCSorOwner() {
}
modifier onlyCS() {
}
/**
* @dev throws if person sending is not authorised or sends nothing
*/
modifier onlyAuthorised() {
require (authorised[msg.sender] || freeForAll);
require (now >= startTimestamp);
require(<FILL_ME>)
require (multiSig != 0x0);
require(tokensForSale > tokenRaised); // check we are not over the number of tokensForSale
_;
}
/**
* @dev authorise an account to participate
*/
function authoriseAccount(address whom) onlyCSorOwner public {
}
/**
* @dev authorise a lot of accounts in one go
*/
function authoriseManyAccounts(address[] many) onlyCSorOwner public {
}
/**
* @dev ban an account from participation (default)
*/
function blockAccount(address whom) onlyCSorOwner public {
}
/**
* @dev set a new CS representative
*/
function setCS(address newCS) onlyOwner public {
}
/**
* @dev set a freeForAll to true ( in case you leave to anybody to send ethers)
*/
function switchONfreeForAll() onlyCSorOwner public {
}
/**
* @dev set a freeForAll to false ( in case you need to authorise the acconts)
*/
function switchOFFfreeForAll() onlyCSorOwner public {
}
function placeTokens(address beneficiary, uint256 _tokens) onlyCS public {
}
// low level token purchase function
function buyTokens(address beneficiary, uint256 amount) onlyAuthorised internal {
}
// transfer ownership of the token to the owner of the presale contract
function finishSale() public onlyOwner {
}
// fallback function can be used to buy tokens
function () public payable {
}
function emergencyERC20Drain( ERC20 oddToken, uint amount ) public {
}
}
| !(hasEnded()) | 43,038 | !(hasEnded()) |
null | pragma solidity ^0.4.17;
/**
* @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() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner(){
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) onlyOwner public {
}
}
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public constant returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public constant returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @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) {
}
}
/**
* @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) public returns (bool){
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) public constant returns (uint256 balance) {
}
}
/**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amout of tokens to be transfered
*/
function transferFrom(address _from, address _to, uint256 _value) public 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) 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 specifing the amount of tokens still avaible for the spender.
*/
function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
}
}
/**
* @title Mintable token
* @dev Simple ERC20 Token example, with mintable token creation
* @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120
* Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol
*/
contract MintableToken is StandardToken, Ownable {
event Mint(address indexed to, uint256 amount);
event MintFinished();
bool public mintingFinished = false;
modifier canMint() {
}
/**
* @dev Function to mint tokens
* @param _to The address that will recieve the minted tokens.
* @param _amount The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/
function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
}
/**
* @dev Function to stop minting new tokens.
* @return True if the operation was successful.
*/
function finishMinting() onlyOwner public returns (bool) {
}
}
contract MITx_Token is MintableToken {
string public name = "Morpheus Infrastructure Token";
string public symbol = "MITx";
uint256 public decimals = 18;
bool public tradingStarted = false;
/**
* @dev modifier that throws if trading has not started yet
*/
modifier hasStartedTrading() {
}
/**
* @dev Allows the owner to enable the trading. This can not be undone
*/
function startTrading() public onlyOwner {
}
/**
* @dev Allows anyone to transfer the MiT tokens once trading has started
* @param _to the recipient address of the tokens.
* @param _value number of tokens to be transfered.
*/
function transfer(address _to, uint _value) hasStartedTrading public returns (bool) {
}
/**
* @dev Allows anyone to transfer the MiT tokens once trading has started
* @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 uint the amout of tokens to be transfered
*/
function transferFrom(address _from, address _to, uint _value) hasStartedTrading public returns (bool) {
}
function emergencyERC20Drain( ERC20 oddToken, uint amount ) public {
}
}
contract MITx_TokenSale is Ownable {
using SafeMath for uint256;
// The token being sold
MITx_Token public token;
uint256 public decimals;
uint256 public oneCoin;
// start and end block where investments are allowed (both inclusive)
uint256 public startTimestamp;
uint256 public endTimestamp;
// timestamps for tiers
uint256 public tier1Timestamp;
uint256 public tier2Timestamp;
uint256 public tier3Timestamp;
// address where funds are collected
address public multiSig;
function setWallet(address _newWallet) public onlyOwner {
}
// These will be set by setTier()
uint256 public rate; // how many token units a buyer gets per wei
uint256 public minContribution = 0.0001 ether; // minimum contributio to participate in tokensale
uint256 public maxContribution = 200000 ether; // default limit to tokens that the users can buy
// ***************************
// amount of raised money in wei
uint256 public weiRaised;
// amount of raised tokens
uint256 public tokenRaised;
// maximum amount of tokens being created
uint256 public maxTokens;
// maximum amount of tokens for sale
uint256 public tokensForSale;
// number of participants in presale
uint256 public numberOfPurchasers = 0;
// for whitelist
address public cs;
// switch on/off the authorisation , default: true
bool public freeForAll = true;
mapping (address => bool) public authorised; // just to annoy the heck out of americans
event TokenPurchase(address indexed beneficiary, uint256 value, uint256 amount);
event SaleClosed();
function MITx_TokenSale() public {
}
/**
* @dev Calculates the amount of bonus coins the buyer gets
*/
function setTier() internal {
}
// @return true if crowdsale event has ended
function hasEnded() public constant returns (bool) {
}
/**
* @dev throws if person sending is not contract owner or cs role
*/
modifier onlyCSorOwner() {
}
modifier onlyCS() {
}
/**
* @dev throws if person sending is not authorised or sends nothing
*/
modifier onlyAuthorised() {
}
/**
* @dev authorise an account to participate
*/
function authoriseAccount(address whom) onlyCSorOwner public {
}
/**
* @dev authorise a lot of accounts in one go
*/
function authoriseManyAccounts(address[] many) onlyCSorOwner public {
}
/**
* @dev ban an account from participation (default)
*/
function blockAccount(address whom) onlyCSorOwner public {
}
/**
* @dev set a new CS representative
*/
function setCS(address newCS) onlyOwner public {
}
/**
* @dev set a freeForAll to true ( in case you leave to anybody to send ethers)
*/
function switchONfreeForAll() onlyCSorOwner public {
}
/**
* @dev set a freeForAll to false ( in case you need to authorise the acconts)
*/
function switchOFFfreeForAll() onlyCSorOwner public {
}
function placeTokens(address beneficiary, uint256 _tokens) onlyCS public {
//check minimum and maximum amount
require(_tokens != 0);
require(<FILL_ME>)
require(tokenRaised <= maxTokens);
require(now <= endTimestamp);
uint256 amount = 0;
if (token.balanceOf(beneficiary) == 0) {
numberOfPurchasers++;
}
tokenRaised = tokenRaised.add(_tokens); // so we can go slightly over
token.mint(beneficiary, _tokens);
TokenPurchase(beneficiary, amount, _tokens);
}
// low level token purchase function
function buyTokens(address beneficiary, uint256 amount) onlyAuthorised internal {
}
// transfer ownership of the token to the owner of the presale contract
function finishSale() public onlyOwner {
}
// fallback function can be used to buy tokens
function () public payable {
}
function emergencyERC20Drain( ERC20 oddToken, uint amount ) public {
}
}
| !hasEnded() | 43,038 | !hasEnded() |
"QUANTITY NOT AVAILABLE" | pragma solidity ^0.8.7;
contract CryptoWarUkraineNFT is ERC721A, Ownable {
bool public allowMint;
uint256 public assetPrice;
uint256 public totalAssets;
string public baseURI;
event Minted(address _to, uint256 _quantity);
event PaymentReleased(address _to, uint256 _amount);
event PaymentReceived(address _from, uint256 _amount);
constructor(
string memory _name,
string memory _symbol,
bool _allowMint,
uint256 _assetPrice,
uint256 _totalAssets,
string memory _metaURI
) ERC721A(_name, _symbol) {
}
receive() external payable {
}
function setAllowMint(bool _allow) public onlyOwner {
}
function setAssetPrice(uint256 _value) public onlyOwner {
}
function setTotalAssets(uint256 _amount) public onlyOwner {
}
function mint(address _to, uint256 _quantity) public onlyOwner {
require(<FILL_ME>)
super._safeMint(_to, _quantity);
emit Minted(_to, _quantity);
}
function mintP(uint256 _quantity) public payable {
}
function mintP(address _to, uint256 _quantity) public payable {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function contractURI() public view returns (string memory) {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function withdraw(uint256 _amount, address payable _to) public onlyOwner {
}
function getContractBalance() public view onlyOwner returns (uint256) {
}
function totalAvailable() public view returns (uint256) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A) returns (bool) {
}
}
| (totalAvailable()-_quantity)>=0,"QUANTITY NOT AVAILABLE" | 43,134 | (totalAvailable()-_quantity)>=0 |
"sold out" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "./ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract BCPIE is ERC721A, Ownable {
uint256 public mintPrice = 0.04 ether;
uint256 public maxSupply = 2222;
uint256 public maxPerTxn;
string internal baseUri;
string public tokenUriExt = ".json";
bool public mintLive;
address payable public charityWallet;
modifier mintIsLive() {
}
constructor(
uint256 _maxSupply,
uint256 _maxPerTxn,
string memory initBaseURI
) ERC721A ("Bored Cutie Pie Club", "BCPIE", _maxSupply, _maxPerTxn) {
}
//Internal
function _baseURI() internal view override returns (string memory) {
}
//Owner Functions
function setMaxSupply(uint256 maxSupply_) external onlyOwner {
}
function setPriceInWei(uint256 price_) external onlyOwner {
}
function setBaseUri(string calldata newBaseUri_) external onlyOwner
{
}
function setTokenUriExt(string calldata newTokenUriExt_) external onlyOwner
{
}
function setCharityWallet(address charityWallet_) external onlyOwner {
}
function toggleMintLive() external onlyOwner {
}
function setMaxPerTxn(uint256 maxPerTxn_) external onlyOwner {
}
function withdraw() external onlyOwner {
}
//Minting Function
function mint(uint256 quantity_) external payable {
require(mintLive, "minting not live");
require(tx.origin == msg.sender, "contracts not allowed");
require(msg.value == getPrice(quantity_), "wrong value");
require(<FILL_ME>)
require(totalSupply() + quantity_ <= maxSupply, "exceeds max supply");
require(quantity_ <= maxPerTxn, "exceeds max per txn");
_safeMint(msg.sender, quantity_);
}
function airdrop(address _to, uint256 quantity_) external onlyOwner {
}
//Public Functions
function numberMinted(address owner) public view returns (uint256) {
}
function multiTransferFrom(address from_, address to_, uint256[] calldata tokenIds_) public {
}
function multiSafeTransferFrom(address from_, address to_, uint256[] calldata tokenIds_, bytes calldata data_)
public {
}
function getPrice(uint256 quantity_) public view returns (uint256) {
}
function tokenURI(uint256 tokenId_) public view override returns (string memory)
{
}
}
| totalSupply()<maxSupply,"sold out" | 43,170 | totalSupply()<maxSupply |
"exceeds max supply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "./ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract BCPIE is ERC721A, Ownable {
uint256 public mintPrice = 0.04 ether;
uint256 public maxSupply = 2222;
uint256 public maxPerTxn;
string internal baseUri;
string public tokenUriExt = ".json";
bool public mintLive;
address payable public charityWallet;
modifier mintIsLive() {
}
constructor(
uint256 _maxSupply,
uint256 _maxPerTxn,
string memory initBaseURI
) ERC721A ("Bored Cutie Pie Club", "BCPIE", _maxSupply, _maxPerTxn) {
}
//Internal
function _baseURI() internal view override returns (string memory) {
}
//Owner Functions
function setMaxSupply(uint256 maxSupply_) external onlyOwner {
}
function setPriceInWei(uint256 price_) external onlyOwner {
}
function setBaseUri(string calldata newBaseUri_) external onlyOwner
{
}
function setTokenUriExt(string calldata newTokenUriExt_) external onlyOwner
{
}
function setCharityWallet(address charityWallet_) external onlyOwner {
}
function toggleMintLive() external onlyOwner {
}
function setMaxPerTxn(uint256 maxPerTxn_) external onlyOwner {
}
function withdraw() external onlyOwner {
}
//Minting Function
function mint(uint256 quantity_) external payable {
require(mintLive, "minting not live");
require(tx.origin == msg.sender, "contracts not allowed");
require(msg.value == getPrice(quantity_), "wrong value");
require(totalSupply() < maxSupply, "sold out");
require(<FILL_ME>)
require(quantity_ <= maxPerTxn, "exceeds max per txn");
_safeMint(msg.sender, quantity_);
}
function airdrop(address _to, uint256 quantity_) external onlyOwner {
}
//Public Functions
function numberMinted(address owner) public view returns (uint256) {
}
function multiTransferFrom(address from_, address to_, uint256[] calldata tokenIds_) public {
}
function multiSafeTransferFrom(address from_, address to_, uint256[] calldata tokenIds_, bytes calldata data_)
public {
}
function getPrice(uint256 quantity_) public view returns (uint256) {
}
function tokenURI(uint256 tokenId_) public view override returns (string memory)
{
}
}
| totalSupply()+quantity_<=maxSupply,"exceeds max supply" | 43,170 | totalSupply()+quantity_<=maxSupply |
null | contract SaleBase is Pausable, Contactable {
using SafeMath for uint;
// The token being sold
PlayHallToken public token;
// start and end timestamps where purchases are allowed (both inclusive)
uint public startTime;
uint public endTime;
// address where funds are collected
address public wallet;
// the contract, which determine how many token units a buyer gets per wei
IPricingStrategy public pricingStrategy;
// amount of raised money in wei
uint public weiRaised;
// amount of tokens that was sold on the crowdsale
uint public tokensSold;
// maximum amount of wei in total, that can be bought
uint public weiMaximumGoal;
// if weiMinimumGoal will not be reached till endTime, buyers will be able to refund ETH
uint public weiMinimumGoal;
// minimum amount of wel, that can be contributed
uint public weiMinimumAmount;
// How many distinct addresses have bought
uint public buyerCount;
// how much wei we have returned back to the contract after a failed crowdfund
uint public loadedRefund;
// how much wei we have given back to buyers
uint public weiRefunded;
// how much ETH each address has bought to this crowdsale
mapping (address => uint) public boughtAmountOf;
// whether a buyer already bought some tokens
mapping (address => bool) public isBuyer;
// whether a buyer bought tokens through other currencies
mapping (address => bool) public isExternalBuyer;
address public admin;
/**
* event for token purchase logging
* @param purchaser who paid for the tokens
* @param beneficiary who got the tokens
* @param value weis paid for purchase
* @param tokenAmount amount of tokens purchased
*/
event TokenPurchase(
address indexed purchaser,
address indexed beneficiary,
uint value,
uint tokenAmount
);
// a refund was processed for an buyer
event Refund(address buyer, uint weiAmount);
event RefundLoaded(uint amount);
function SaleBase(
uint _startTime,
uint _endTime,
IPricingStrategy _pricingStrategy,
PlayHallToken _token,
address _wallet,
uint _weiMaximumGoal,
uint _weiMinimumGoal,
uint _weiMinimumAmount,
address _admin
) public
{
require(_startTime >= now);
require(_endTime >= _startTime);
require(<FILL_ME>)
require(address(_token) != 0x0);
require(_wallet != 0x0);
require(_weiMaximumGoal > 0);
require(_admin != 0x0);
startTime = _startTime;
endTime = _endTime;
pricingStrategy = _pricingStrategy;
token = _token;
wallet = _wallet;
weiMaximumGoal = _weiMaximumGoal;
weiMinimumGoal = _weiMinimumGoal;
weiMinimumAmount = _weiMinimumAmount;
admin = _admin;
}
modifier onlyOwnerOrAdmin() {
}
// fallback function can be used to buy tokens
function () external payable {
}
// low level token purchase function
function buyTokens(address beneficiary) public whenNotPaused payable returns (bool) {
}
function mintTokenToBuyer(address beneficiary, uint tokenAmount, uint weiAmount) internal {
}
// return true if the transaction can buy tokens
function validPurchase(uint weiAmount) internal constant returns (bool) {
}
// return true if crowdsale event has ended
function hasEnded() public constant returns (bool) {
}
// get the amount of unsold tokens allocated to this contract;
function getWeiLeft() external constant returns (uint) {
}
// return true if the crowdsale has raised enough money to be a successful.
function isMinimumGoalReached() public constant returns (bool) {
}
// allows to update tokens rate for owner
function setPricingStrategy(IPricingStrategy _pricingStrategy) external onlyOwner returns (bool) {
}
/**
* Allow load refunds back on the contract for the refunding.
*
* The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..
*/
function loadRefund() external payable {
}
/**
* Buyers can claim refund.
*
* Note that any refunds from proxy buyers should be handled separately,
* and not through this contract.
*/
function refund() external {
}
function registerPayment(address beneficiary, uint tokenAmount, uint weiAmount) public onlyOwnerOrAdmin {
}
function registerPayments(address[] beneficiaries, uint[] tokenAmounts, uint[] weiAmounts) external onlyOwnerOrAdmin {
}
function setAdmin(address adminAddress) external onlyOwner {
}
}
| _pricingStrategy.isPricingStrategy() | 43,301 | _pricingStrategy.isPricingStrategy() |
null | contract SaleBase is Pausable, Contactable {
using SafeMath for uint;
// The token being sold
PlayHallToken public token;
// start and end timestamps where purchases are allowed (both inclusive)
uint public startTime;
uint public endTime;
// address where funds are collected
address public wallet;
// the contract, which determine how many token units a buyer gets per wei
IPricingStrategy public pricingStrategy;
// amount of raised money in wei
uint public weiRaised;
// amount of tokens that was sold on the crowdsale
uint public tokensSold;
// maximum amount of wei in total, that can be bought
uint public weiMaximumGoal;
// if weiMinimumGoal will not be reached till endTime, buyers will be able to refund ETH
uint public weiMinimumGoal;
// minimum amount of wel, that can be contributed
uint public weiMinimumAmount;
// How many distinct addresses have bought
uint public buyerCount;
// how much wei we have returned back to the contract after a failed crowdfund
uint public loadedRefund;
// how much wei we have given back to buyers
uint public weiRefunded;
// how much ETH each address has bought to this crowdsale
mapping (address => uint) public boughtAmountOf;
// whether a buyer already bought some tokens
mapping (address => bool) public isBuyer;
// whether a buyer bought tokens through other currencies
mapping (address => bool) public isExternalBuyer;
address public admin;
/**
* event for token purchase logging
* @param purchaser who paid for the tokens
* @param beneficiary who got the tokens
* @param value weis paid for purchase
* @param tokenAmount amount of tokens purchased
*/
event TokenPurchase(
address indexed purchaser,
address indexed beneficiary,
uint value,
uint tokenAmount
);
// a refund was processed for an buyer
event Refund(address buyer, uint weiAmount);
event RefundLoaded(uint amount);
function SaleBase(
uint _startTime,
uint _endTime,
IPricingStrategy _pricingStrategy,
PlayHallToken _token,
address _wallet,
uint _weiMaximumGoal,
uint _weiMinimumGoal,
uint _weiMinimumAmount,
address _admin
) public
{
require(_startTime >= now);
require(_endTime >= _startTime);
require(_pricingStrategy.isPricingStrategy());
require(<FILL_ME>)
require(_wallet != 0x0);
require(_weiMaximumGoal > 0);
require(_admin != 0x0);
startTime = _startTime;
endTime = _endTime;
pricingStrategy = _pricingStrategy;
token = _token;
wallet = _wallet;
weiMaximumGoal = _weiMaximumGoal;
weiMinimumGoal = _weiMinimumGoal;
weiMinimumAmount = _weiMinimumAmount;
admin = _admin;
}
modifier onlyOwnerOrAdmin() {
}
// fallback function can be used to buy tokens
function () external payable {
}
// low level token purchase function
function buyTokens(address beneficiary) public whenNotPaused payable returns (bool) {
}
function mintTokenToBuyer(address beneficiary, uint tokenAmount, uint weiAmount) internal {
}
// return true if the transaction can buy tokens
function validPurchase(uint weiAmount) internal constant returns (bool) {
}
// return true if crowdsale event has ended
function hasEnded() public constant returns (bool) {
}
// get the amount of unsold tokens allocated to this contract;
function getWeiLeft() external constant returns (uint) {
}
// return true if the crowdsale has raised enough money to be a successful.
function isMinimumGoalReached() public constant returns (bool) {
}
// allows to update tokens rate for owner
function setPricingStrategy(IPricingStrategy _pricingStrategy) external onlyOwner returns (bool) {
}
/**
* Allow load refunds back on the contract for the refunding.
*
* The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..
*/
function loadRefund() external payable {
}
/**
* Buyers can claim refund.
*
* Note that any refunds from proxy buyers should be handled separately,
* and not through this contract.
*/
function refund() external {
}
function registerPayment(address beneficiary, uint tokenAmount, uint weiAmount) public onlyOwnerOrAdmin {
}
function registerPayments(address[] beneficiaries, uint[] tokenAmounts, uint[] weiAmounts) external onlyOwnerOrAdmin {
}
function setAdmin(address adminAddress) external onlyOwner {
}
}
| address(_token)!=0x0 | 43,301 | address(_token)!=0x0 |
null | contract SaleBase is Pausable, Contactable {
using SafeMath for uint;
// The token being sold
PlayHallToken public token;
// start and end timestamps where purchases are allowed (both inclusive)
uint public startTime;
uint public endTime;
// address where funds are collected
address public wallet;
// the contract, which determine how many token units a buyer gets per wei
IPricingStrategy public pricingStrategy;
// amount of raised money in wei
uint public weiRaised;
// amount of tokens that was sold on the crowdsale
uint public tokensSold;
// maximum amount of wei in total, that can be bought
uint public weiMaximumGoal;
// if weiMinimumGoal will not be reached till endTime, buyers will be able to refund ETH
uint public weiMinimumGoal;
// minimum amount of wel, that can be contributed
uint public weiMinimumAmount;
// How many distinct addresses have bought
uint public buyerCount;
// how much wei we have returned back to the contract after a failed crowdfund
uint public loadedRefund;
// how much wei we have given back to buyers
uint public weiRefunded;
// how much ETH each address has bought to this crowdsale
mapping (address => uint) public boughtAmountOf;
// whether a buyer already bought some tokens
mapping (address => bool) public isBuyer;
// whether a buyer bought tokens through other currencies
mapping (address => bool) public isExternalBuyer;
address public admin;
/**
* event for token purchase logging
* @param purchaser who paid for the tokens
* @param beneficiary who got the tokens
* @param value weis paid for purchase
* @param tokenAmount amount of tokens purchased
*/
event TokenPurchase(
address indexed purchaser,
address indexed beneficiary,
uint value,
uint tokenAmount
);
// a refund was processed for an buyer
event Refund(address buyer, uint weiAmount);
event RefundLoaded(uint amount);
function SaleBase(
uint _startTime,
uint _endTime,
IPricingStrategy _pricingStrategy,
PlayHallToken _token,
address _wallet,
uint _weiMaximumGoal,
uint _weiMinimumGoal,
uint _weiMinimumAmount,
address _admin
) public
{
}
modifier onlyOwnerOrAdmin() {
}
// fallback function can be used to buy tokens
function () external payable {
}
// low level token purchase function
function buyTokens(address beneficiary) public whenNotPaused payable returns (bool) {
uint weiAmount = msg.value;
require(beneficiary != 0x0);
require(weiAmount >= weiMinimumAmount);
require(<FILL_ME>)
// calculate token amount to be created
uint tokenAmount = pricingStrategy.calculateTokenAmount(weiAmount, weiRaised);
mintTokenToBuyer(beneficiary, tokenAmount, weiAmount);
wallet.transfer(msg.value);
return true;
}
function mintTokenToBuyer(address beneficiary, uint tokenAmount, uint weiAmount) internal {
}
// return true if the transaction can buy tokens
function validPurchase(uint weiAmount) internal constant returns (bool) {
}
// return true if crowdsale event has ended
function hasEnded() public constant returns (bool) {
}
// get the amount of unsold tokens allocated to this contract;
function getWeiLeft() external constant returns (uint) {
}
// return true if the crowdsale has raised enough money to be a successful.
function isMinimumGoalReached() public constant returns (bool) {
}
// allows to update tokens rate for owner
function setPricingStrategy(IPricingStrategy _pricingStrategy) external onlyOwner returns (bool) {
}
/**
* Allow load refunds back on the contract for the refunding.
*
* The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..
*/
function loadRefund() external payable {
}
/**
* Buyers can claim refund.
*
* Note that any refunds from proxy buyers should be handled separately,
* and not through this contract.
*/
function refund() external {
}
function registerPayment(address beneficiary, uint tokenAmount, uint weiAmount) public onlyOwnerOrAdmin {
}
function registerPayments(address[] beneficiaries, uint[] tokenAmounts, uint[] weiAmounts) external onlyOwnerOrAdmin {
}
function setAdmin(address adminAddress) external onlyOwner {
}
}
| validPurchase(msg.value) | 43,301 | validPurchase(msg.value) |
null | contract SaleBase is Pausable, Contactable {
using SafeMath for uint;
// The token being sold
PlayHallToken public token;
// start and end timestamps where purchases are allowed (both inclusive)
uint public startTime;
uint public endTime;
// address where funds are collected
address public wallet;
// the contract, which determine how many token units a buyer gets per wei
IPricingStrategy public pricingStrategy;
// amount of raised money in wei
uint public weiRaised;
// amount of tokens that was sold on the crowdsale
uint public tokensSold;
// maximum amount of wei in total, that can be bought
uint public weiMaximumGoal;
// if weiMinimumGoal will not be reached till endTime, buyers will be able to refund ETH
uint public weiMinimumGoal;
// minimum amount of wel, that can be contributed
uint public weiMinimumAmount;
// How many distinct addresses have bought
uint public buyerCount;
// how much wei we have returned back to the contract after a failed crowdfund
uint public loadedRefund;
// how much wei we have given back to buyers
uint public weiRefunded;
// how much ETH each address has bought to this crowdsale
mapping (address => uint) public boughtAmountOf;
// whether a buyer already bought some tokens
mapping (address => bool) public isBuyer;
// whether a buyer bought tokens through other currencies
mapping (address => bool) public isExternalBuyer;
address public admin;
/**
* event for token purchase logging
* @param purchaser who paid for the tokens
* @param beneficiary who got the tokens
* @param value weis paid for purchase
* @param tokenAmount amount of tokens purchased
*/
event TokenPurchase(
address indexed purchaser,
address indexed beneficiary,
uint value,
uint tokenAmount
);
// a refund was processed for an buyer
event Refund(address buyer, uint weiAmount);
event RefundLoaded(uint amount);
function SaleBase(
uint _startTime,
uint _endTime,
IPricingStrategy _pricingStrategy,
PlayHallToken _token,
address _wallet,
uint _weiMaximumGoal,
uint _weiMinimumGoal,
uint _weiMinimumAmount,
address _admin
) public
{
}
modifier onlyOwnerOrAdmin() {
}
// fallback function can be used to buy tokens
function () external payable {
}
// low level token purchase function
function buyTokens(address beneficiary) public whenNotPaused payable returns (bool) {
}
function mintTokenToBuyer(address beneficiary, uint tokenAmount, uint weiAmount) internal {
}
// return true if the transaction can buy tokens
function validPurchase(uint weiAmount) internal constant returns (bool) {
}
// return true if crowdsale event has ended
function hasEnded() public constant returns (bool) {
}
// get the amount of unsold tokens allocated to this contract;
function getWeiLeft() external constant returns (uint) {
}
// return true if the crowdsale has raised enough money to be a successful.
function isMinimumGoalReached() public constant returns (bool) {
}
// allows to update tokens rate for owner
function setPricingStrategy(IPricingStrategy _pricingStrategy) external onlyOwner returns (bool) {
}
/**
* Allow load refunds back on the contract for the refunding.
*
* The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..
*/
function loadRefund() external payable {
require(msg.sender == wallet);
require(msg.value > 0);
require(<FILL_ME>)
loadedRefund = loadedRefund.add(msg.value);
RefundLoaded(msg.value);
}
/**
* Buyers can claim refund.
*
* Note that any refunds from proxy buyers should be handled separately,
* and not through this contract.
*/
function refund() external {
}
function registerPayment(address beneficiary, uint tokenAmount, uint weiAmount) public onlyOwnerOrAdmin {
}
function registerPayments(address[] beneficiaries, uint[] tokenAmounts, uint[] weiAmounts) external onlyOwnerOrAdmin {
}
function setAdmin(address adminAddress) external onlyOwner {
}
}
| !isMinimumGoalReached() | 43,301 | !isMinimumGoalReached() |
null | contract SaleBase is Pausable, Contactable {
using SafeMath for uint;
// The token being sold
PlayHallToken public token;
// start and end timestamps where purchases are allowed (both inclusive)
uint public startTime;
uint public endTime;
// address where funds are collected
address public wallet;
// the contract, which determine how many token units a buyer gets per wei
IPricingStrategy public pricingStrategy;
// amount of raised money in wei
uint public weiRaised;
// amount of tokens that was sold on the crowdsale
uint public tokensSold;
// maximum amount of wei in total, that can be bought
uint public weiMaximumGoal;
// if weiMinimumGoal will not be reached till endTime, buyers will be able to refund ETH
uint public weiMinimumGoal;
// minimum amount of wel, that can be contributed
uint public weiMinimumAmount;
// How many distinct addresses have bought
uint public buyerCount;
// how much wei we have returned back to the contract after a failed crowdfund
uint public loadedRefund;
// how much wei we have given back to buyers
uint public weiRefunded;
// how much ETH each address has bought to this crowdsale
mapping (address => uint) public boughtAmountOf;
// whether a buyer already bought some tokens
mapping (address => bool) public isBuyer;
// whether a buyer bought tokens through other currencies
mapping (address => bool) public isExternalBuyer;
address public admin;
/**
* event for token purchase logging
* @param purchaser who paid for the tokens
* @param beneficiary who got the tokens
* @param value weis paid for purchase
* @param tokenAmount amount of tokens purchased
*/
event TokenPurchase(
address indexed purchaser,
address indexed beneficiary,
uint value,
uint tokenAmount
);
// a refund was processed for an buyer
event Refund(address buyer, uint weiAmount);
event RefundLoaded(uint amount);
function SaleBase(
uint _startTime,
uint _endTime,
IPricingStrategy _pricingStrategy,
PlayHallToken _token,
address _wallet,
uint _weiMaximumGoal,
uint _weiMinimumGoal,
uint _weiMinimumAmount,
address _admin
) public
{
}
modifier onlyOwnerOrAdmin() {
}
// fallback function can be used to buy tokens
function () external payable {
}
// low level token purchase function
function buyTokens(address beneficiary) public whenNotPaused payable returns (bool) {
}
function mintTokenToBuyer(address beneficiary, uint tokenAmount, uint weiAmount) internal {
}
// return true if the transaction can buy tokens
function validPurchase(uint weiAmount) internal constant returns (bool) {
}
// return true if crowdsale event has ended
function hasEnded() public constant returns (bool) {
}
// get the amount of unsold tokens allocated to this contract;
function getWeiLeft() external constant returns (uint) {
}
// return true if the crowdsale has raised enough money to be a successful.
function isMinimumGoalReached() public constant returns (bool) {
}
// allows to update tokens rate for owner
function setPricingStrategy(IPricingStrategy _pricingStrategy) external onlyOwner returns (bool) {
}
/**
* Allow load refunds back on the contract for the refunding.
*
* The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..
*/
function loadRefund() external payable {
}
/**
* Buyers can claim refund.
*
* Note that any refunds from proxy buyers should be handled separately,
* and not through this contract.
*/
function refund() external {
require(<FILL_ME>)
require(!isExternalBuyer[msg.sender]);
uint weiValue = boughtAmountOf[msg.sender];
require(weiValue > 0);
boughtAmountOf[msg.sender] = 0;
weiRefunded = weiRefunded.add(weiValue);
msg.sender.transfer(weiValue);
Refund(msg.sender, weiValue);
}
function registerPayment(address beneficiary, uint tokenAmount, uint weiAmount) public onlyOwnerOrAdmin {
}
function registerPayments(address[] beneficiaries, uint[] tokenAmounts, uint[] weiAmounts) external onlyOwnerOrAdmin {
}
function setAdmin(address adminAddress) external onlyOwner {
}
}
| !isMinimumGoalReached()&&loadedRefund>0 | 43,301 | !isMinimumGoalReached()&&loadedRefund>0 |
null | contract SaleBase is Pausable, Contactable {
using SafeMath for uint;
// The token being sold
PlayHallToken public token;
// start and end timestamps where purchases are allowed (both inclusive)
uint public startTime;
uint public endTime;
// address where funds are collected
address public wallet;
// the contract, which determine how many token units a buyer gets per wei
IPricingStrategy public pricingStrategy;
// amount of raised money in wei
uint public weiRaised;
// amount of tokens that was sold on the crowdsale
uint public tokensSold;
// maximum amount of wei in total, that can be bought
uint public weiMaximumGoal;
// if weiMinimumGoal will not be reached till endTime, buyers will be able to refund ETH
uint public weiMinimumGoal;
// minimum amount of wel, that can be contributed
uint public weiMinimumAmount;
// How many distinct addresses have bought
uint public buyerCount;
// how much wei we have returned back to the contract after a failed crowdfund
uint public loadedRefund;
// how much wei we have given back to buyers
uint public weiRefunded;
// how much ETH each address has bought to this crowdsale
mapping (address => uint) public boughtAmountOf;
// whether a buyer already bought some tokens
mapping (address => bool) public isBuyer;
// whether a buyer bought tokens through other currencies
mapping (address => bool) public isExternalBuyer;
address public admin;
/**
* event for token purchase logging
* @param purchaser who paid for the tokens
* @param beneficiary who got the tokens
* @param value weis paid for purchase
* @param tokenAmount amount of tokens purchased
*/
event TokenPurchase(
address indexed purchaser,
address indexed beneficiary,
uint value,
uint tokenAmount
);
// a refund was processed for an buyer
event Refund(address buyer, uint weiAmount);
event RefundLoaded(uint amount);
function SaleBase(
uint _startTime,
uint _endTime,
IPricingStrategy _pricingStrategy,
PlayHallToken _token,
address _wallet,
uint _weiMaximumGoal,
uint _weiMinimumGoal,
uint _weiMinimumAmount,
address _admin
) public
{
}
modifier onlyOwnerOrAdmin() {
}
// fallback function can be used to buy tokens
function () external payable {
}
// low level token purchase function
function buyTokens(address beneficiary) public whenNotPaused payable returns (bool) {
}
function mintTokenToBuyer(address beneficiary, uint tokenAmount, uint weiAmount) internal {
}
// return true if the transaction can buy tokens
function validPurchase(uint weiAmount) internal constant returns (bool) {
}
// return true if crowdsale event has ended
function hasEnded() public constant returns (bool) {
}
// get the amount of unsold tokens allocated to this contract;
function getWeiLeft() external constant returns (uint) {
}
// return true if the crowdsale has raised enough money to be a successful.
function isMinimumGoalReached() public constant returns (bool) {
}
// allows to update tokens rate for owner
function setPricingStrategy(IPricingStrategy _pricingStrategy) external onlyOwner returns (bool) {
}
/**
* Allow load refunds back on the contract for the refunding.
*
* The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..
*/
function loadRefund() external payable {
}
/**
* Buyers can claim refund.
*
* Note that any refunds from proxy buyers should be handled separately,
* and not through this contract.
*/
function refund() external {
require(!isMinimumGoalReached() && loadedRefund > 0);
require(<FILL_ME>)
uint weiValue = boughtAmountOf[msg.sender];
require(weiValue > 0);
boughtAmountOf[msg.sender] = 0;
weiRefunded = weiRefunded.add(weiValue);
msg.sender.transfer(weiValue);
Refund(msg.sender, weiValue);
}
function registerPayment(address beneficiary, uint tokenAmount, uint weiAmount) public onlyOwnerOrAdmin {
}
function registerPayments(address[] beneficiaries, uint[] tokenAmounts, uint[] weiAmounts) external onlyOwnerOrAdmin {
}
function setAdmin(address adminAddress) external onlyOwner {
}
}
| !isExternalBuyer[msg.sender] | 43,301 | !isExternalBuyer[msg.sender] |
null | contract SaleBase is Pausable, Contactable {
using SafeMath for uint;
// The token being sold
PlayHallToken public token;
// start and end timestamps where purchases are allowed (both inclusive)
uint public startTime;
uint public endTime;
// address where funds are collected
address public wallet;
// the contract, which determine how many token units a buyer gets per wei
IPricingStrategy public pricingStrategy;
// amount of raised money in wei
uint public weiRaised;
// amount of tokens that was sold on the crowdsale
uint public tokensSold;
// maximum amount of wei in total, that can be bought
uint public weiMaximumGoal;
// if weiMinimumGoal will not be reached till endTime, buyers will be able to refund ETH
uint public weiMinimumGoal;
// minimum amount of wel, that can be contributed
uint public weiMinimumAmount;
// How many distinct addresses have bought
uint public buyerCount;
// how much wei we have returned back to the contract after a failed crowdfund
uint public loadedRefund;
// how much wei we have given back to buyers
uint public weiRefunded;
// how much ETH each address has bought to this crowdsale
mapping (address => uint) public boughtAmountOf;
// whether a buyer already bought some tokens
mapping (address => bool) public isBuyer;
// whether a buyer bought tokens through other currencies
mapping (address => bool) public isExternalBuyer;
address public admin;
/**
* event for token purchase logging
* @param purchaser who paid for the tokens
* @param beneficiary who got the tokens
* @param value weis paid for purchase
* @param tokenAmount amount of tokens purchased
*/
event TokenPurchase(
address indexed purchaser,
address indexed beneficiary,
uint value,
uint tokenAmount
);
// a refund was processed for an buyer
event Refund(address buyer, uint weiAmount);
event RefundLoaded(uint amount);
function SaleBase(
uint _startTime,
uint _endTime,
IPricingStrategy _pricingStrategy,
PlayHallToken _token,
address _wallet,
uint _weiMaximumGoal,
uint _weiMinimumGoal,
uint _weiMinimumAmount,
address _admin
) public
{
}
modifier onlyOwnerOrAdmin() {
}
// fallback function can be used to buy tokens
function () external payable {
}
// low level token purchase function
function buyTokens(address beneficiary) public whenNotPaused payable returns (bool) {
}
function mintTokenToBuyer(address beneficiary, uint tokenAmount, uint weiAmount) internal {
}
// return true if the transaction can buy tokens
function validPurchase(uint weiAmount) internal constant returns (bool) {
}
// return true if crowdsale event has ended
function hasEnded() public constant returns (bool) {
}
// get the amount of unsold tokens allocated to this contract;
function getWeiLeft() external constant returns (uint) {
}
// return true if the crowdsale has raised enough money to be a successful.
function isMinimumGoalReached() public constant returns (bool) {
}
// allows to update tokens rate for owner
function setPricingStrategy(IPricingStrategy _pricingStrategy) external onlyOwner returns (bool) {
}
/**
* Allow load refunds back on the contract for the refunding.
*
* The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..
*/
function loadRefund() external payable {
}
/**
* Buyers can claim refund.
*
* Note that any refunds from proxy buyers should be handled separately,
* and not through this contract.
*/
function refund() external {
}
function registerPayment(address beneficiary, uint tokenAmount, uint weiAmount) public onlyOwnerOrAdmin {
require(<FILL_ME>)
isExternalBuyer[beneficiary] = true;
mintTokenToBuyer(beneficiary, tokenAmount, weiAmount);
}
function registerPayments(address[] beneficiaries, uint[] tokenAmounts, uint[] weiAmounts) external onlyOwnerOrAdmin {
}
function setAdmin(address adminAddress) external onlyOwner {
}
}
| validPurchase(weiAmount) | 43,301 | validPurchase(weiAmount) |
'All tokens have been minted' | /**
*
*
βββββββββββββββββ ββββββ βββ βββ
βββββββββββββββββββββββββββββ ββββ
ββββββββ βββ ββββββββ βββββββ
ββββββββ βββ ββββββββ βββββ
ββββββββ βββ βββ βββ βββ
ββββββββ βββ βββ βββ βββ
βββββββ βββββββ βββ ββββββββββββββββββ βββββββββββ ββββββ
ββββββββββββββββββββ ββββββββββββββββββββββββββββββ ββββββ
βββββββββββ ββββββ ββ βββββββββ ββββββββββββββ βββ ββββββ
βββββββ βββ βββββββββββββββββββ ββββββββββββββ βββ ββββββ
βββ ββββββββββββββββββββββββββββββ ββββββ βββββββββββββββββ
βββ βββββββ ββββββββ βββββββββββ ββββββ βββββββ ββββββββ
Non generative hand drawn PFPs, were holders are invited to reflect and mirror the energy they get from the character.
All of this characters will be present in Cariberse 1/1 artworks as they become avatars to navigate our Caribbean Metaverse.
*
*/
pragma solidity ^0.8.7;
contract PowerfulMamacita is ERC721Enumerable, Ownable {
using Strings for uint256;
uint256 private constant TOKEN_MAX = 111; // @dev 111 powerfulmamacitas
bool public isActive = false;
string public proof;
string private _contractURI = '';
string private _tokenBaseURI = '';
string private _tokenRevealedBaseURI = '';
string private _dataExtension = '';
//EVENTS
event contractURIUpdated(address indexed _account);
constructor(string memory name, string memory symbol) ERC721(name, symbol) {}
/**
*
* @dev mint tokens with the owner
* @param init // the init batch
* @param qty // qty for the batch
**/
function mintTokens(uint256 init, uint256 qty) external onlyOwner {
require(isActive, 'Contract is not active');
require(<FILL_ME>)
require(init >= totalSupply() + 1, 'Must start from the last mint batch');
uint256 i = init;
do{
_safeMint(msg.sender, i);
unchecked { ++i; }
}while(i <= qty);
}
function setIsActive(bool _isActive) external onlyOwner {
}
function setDataExtension (string calldata dataExtension) external onlyOwner {
}
function setProof(string calldata proofString) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function setContractURI(string calldata URI) external onlyOwner {
}
function setBaseURI(string calldata URI) external onlyOwner {
}
function setRevealedBaseURI(string calldata revealedBaseURI) external onlyOwner {
}
function contractURI() public view returns (string memory) {
}
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) {
}
}
| totalSupply()<TOKEN_MAX,'All tokens have been minted' | 43,341 | totalSupply()<TOKEN_MAX |
"This leaf does not belong to the sender" | /***
By accepting the limited-edition Pepsi Mic Drop content ("Content") in the form of this non-fungible token ("NFT"), recipient acknowledges and agrees to the following terms and conditions (these "Terms"):
The Content is the property of or licensed to PepsiCo, Inc. ("Owner") and all right, title, and interest (including all copyright, trademark, name, likeness, art, design, drawings and/or other intellectual property) included in and/or associated with the Content are owned by Owner or its licensors. Receipt of the Content or this NFT does not give or grant recipient any right, license, or ownership in or to the Content other than the rights expressly set forth herein. Owner reserves all rights (including with respect to the copyright, trademark, name, likeness, art, design, drawings and/or other intellectual property) in and to the Content not expressly granted to recipient herein. Expressly conditioned on recipient's compliance with its obligations hereunder, recipient of this NFT is granted a limited, revocable, non-exclusive, non-transferable, non-sublicensable license to access, use, view, copy and display the Content and this NFT solely (i) for the duration of such recipient's ownership of this NFT, (ii) for recipient's own personal, non-commercial use and (iii) as part of a marketplace that permits the display, purchase and sale of NFTs, provided the marketplace has mechanisms in place to verify the owners' rights to display and sell such NFTs.
Recipient also may not nor permit any third party to, do or attempt any of the following without Owner's express prior written consent in each case:
* Display, copy or otherwise use this NFT or the Content, except for the limited use granted hereunder, if any, without Owner's prior express written approval for such use;
* Modify, edit, alter, manipulate, reproduce, commercialize, distribute or reuse the Content, in whole or in part, in any way, including without limitation, art, design, drawings and/or other intellectual property;
* Create, display, advertise, market, promote, display, distribute, reproduce, or sell any derivative works from the Content and/or any merchandise of any kind that includes, contains, uses, incorporates, or consists of the Content;
* Use, distribute, display, publicly perform or otherwise reproduce the Content, in whole or in part, to advertise, market, promote, reproduce, offer, sell, and/or distribute for commercial gain (including, without limitation, giving away in the hopes of eventual commercial gain) any product or service in any manner or media, whether for your own commercial benefit or that of any third party or otherwise;
* Use the Content in connection with any content, images, videos, or other forms of media that (i) depict hatred, intolerance, violence, cruelty, or anything else that could reasonably be found to constitute hate speech or be considered abusive, defamatory, ethnically or racially offensive, harassing, harmful, obscene, offensive, sexually explicit, threatening, or vulgar; (ii) contain any other material, products, or services that violate or encourage conduct that would violate any criminal or other applicable laws; (iii) violate or infringe on any third-party rights and/or (iv) makes any statement that is expressly or implicitly disparaging or otherwise harmful to Owner, any of Owner's subsidiaries or affiliates and/or any of Owner and/or its subsidiaries' or affiliates' products and/or services;
* Use the Content in any way that is expressly or implicitly disparaging or otherwise harmful to Owner, any of Owner's subsidiaries or affiliates and/or any of Owner and/or its subsidiaries' or affiliates' products and/or services;
* Use the Content in movies, videos, or any other forms of media, except to the limited extent that such use is solely for recipient's own personal, non-commercial purposes;
* Apply for, register, or otherwise use or attempt to use the Content, any other Owner intellectual property or intellectual property associated with Owner, its subsidiaries or affiliates and/or their respective products or services, in whole or in part, as a trademark, service mark, or any confusingly similar mark, anywhere in the world or attempt to copyright or otherwise acquire additional intellectual property rights in or to the Content; and/or
* Make any additional representations or warranties relating to the Content.
Recipient represents and warrants that it will comply with all laws, regulations, rules and guidelines in connection with its performance, display, distribution, marketing, sale and other use of the Content, including the laws of the United States relating to money laundering, the financing of terrorism, and economic sanctions (such as those administered by the Office of Foreign Assets Control).
Recipient understands and agrees that Owner is not liable for any inability of recipient to access the Content or this NFT for any reason, including as a result of any downtime, failure, obsolescence, removal, termination, or other disruption relating to the servers upon which the Content is stored, the blockchain on which the Content or this NFT is registered, any electronic wallet, or any other NFT application, market, or platform. If recipient sells or otherwise transfers this NFT, recipient agrees that it will not have any claims against Owner for any breach of these Terms by a purchaser. If recipient purchased this NFT, recipient hereby agrees to hold Owner and the seller of this NFT harmless from and against any and all violations or breaches of these Terms.
The limited license included in these Terms to use, view, copy or display the Content only continues so long as recipient continues to own the NFT, and shall be part of all subsequent sales of NFT in perpetuity, regardless of ownership of the corresponding blockchain. Recipient's rights in and to the NFT and Content immediately cease upon transfer of the NFT or termination of these Terms pursuant hereto.
Recipient further understands and agrees that any commercial exploitation of the Content or this NFT could subject recipient to claims of copyright infringement. If recipient violates these Terms, or otherwise uses the Content or this NFT, in a manner that infringes or otherwise violates Owner's rights or breaches any provision set forth hereunder, recipient agrees that Owner may take any action necessary to stop such infringement or other violation, at recipient's sole cost and expense, and/or immediately terminate these Terms. Upon any such termination, recipient will have no further rights to use the Content and all uses of the Content by recipient must immediately and permanently cease. All provisions set forth herein that by their express terms and/or nature would be expected to survive termination will so survive and will remain in full force and effect. Owner's termination of these Terms will be without prejudice to any other rights and remedies that it may have herein and at law and in equity. If recipient incurs liability due to infringement or other violation of Owner's rights, such liability survives expiration of this license.
THE LICENSE GRANTED IN THESE TERMS IS PROVIDED "AS IS." RECIPIENT ASSUMES THE ENTIRE RISK OF THEIR USE OF THE CONTENT AND THIS NFT. NO WARRANTIES ARE GIVEN, WHETHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING, WITHOUT LIMITATION, IMPLIED WARRANTIES OF FITNESS FOR PARTICULAR PURPOSE, MERCHANTABILITY, NON-INFRINGEMENT OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. IN NO EVENT WILL OWNER BE LIABLE FOR ANY SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR FOR ANY LIABILITY IN TORT, NEGLIGENCE, OR ANY OTHER LIABILITY INCURRED BY OR UNDER OR IN CONNECTION WITH THESE TERMS, THE CONTENT OR THIS NFT.
OWNER DOES NOT OWN OR CONTROL ANY OF THE SOFTWARE PROTOCOLS, SERVICES, EXCHANGES OR APPLICATIONS THAT MAY BE USED IN CONNECTION WITH THIS NFT, INCLUDING THE CRYPTOCURRENCY WALLET OR ANY NFT MARKETPLACE OR TRADING PLATFORM. ACCORDINGLY, OWNER DISCLAIMS ALL LIABILITY RELATING TO SUCH PROTOCOLS, SERVICES, EXCHANGES OR APPLICATIONS AND ANY PRICE FLUCTUATIONS IN NFT VALUATION, AND MAKES NO GUARANTEES REGARDING THE SECURITY, FUNCTIONALITY OR AVAILABILITY OF SUCH PROTOCOLS, SERVICES, EXCHANGES OR APPLICATIONS.
TO THE FULLEST EXTENT PERMITTED BY LAW, IN NO EVENT WILL OWNER BE LIABLE TO RECIPIENT OR ANY THIRD PARTY FOR ANY LOST PROFIT OR ANY INDIRECT, CONSEQUENTIAL, EXEMPLARY, INCIDENTAL, SPECIAL OR PUNITIVE DAMAGES ARISING FROM THESE TERMS, THE CONTENT, THIS NFT, WHETHER CAUSED BY TORT (INCLUDING NEGLIGENCE), BREACH OF CONTRACT, OR OTHERWISE, EVEN IF FORESEEABLE AND EVEN IF OWNER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
NOTWITHSTANDING ANYTHING TO THE CONTRARY CONTAINED HEREIN, IN NO EVENT SHALL THE MAXIMUM AGGREGATE LIABILITY OF OWNER ARISING OUT OF OR IN ANY WAY RELATED TO THESE TERMS, OR THE ACCESS TO OR USE OF THE CONTENT OR THIS NFT EXCEED $100.
These Terms will be governed by and construed in accordance with the laws of the State of New York applicable to contracts made and wholly performed therein, without regard to principles of conflicts of law. Any dispute arising out of and/or relating to these Terms will be subject to the exclusive jurisdiction and venue of the federal and state courts located in New York County, New York, and the parties each hereby irrevocably consents to personal jurisdiction in such courts. If a party breaches any provision of these Terms, the remedies available to the other party will include without limitation payment by the breaching party of all costs and expenses (including reasonable attorneys' fees) incurred by said other party, on trial and appeal, to enforce these Terms. These Terms contain the full understanding and agreement of the parties with respect to the subject matter hereof, and may not be modified except in a writing signed by the parties, or their respective approved agents. A party's delay or failure to exercise all or part of any right under these Terms will not constitute a waiver of that right or of any other right. No waiver of these Terms will be valid except in a writing signed by the parties, or their respective approved agents. If any provision of these Terms is deemed invalid that provision will be struck and the remaining provisions of these Terms will remain in full force and effect. These Terms are binding upon and will inure to the benefit and detriment, as applicable, of the parties and their respective licensees and assigns.
***/
/***
__ __ _______ _____ _ _ _ _
\ \ / / |__ __| | __ \(_) (_) | | |
\ \ /\ / /_ _ _ _| | ___ ___ | | | |_ __ _ _| |_ __ _| |
\ \/ \/ / _` | | | | |/ _ \ / _ \| | | | |/ _` | | __/ _` | |
\ /\ / (_| | |_| | | (_) | (_) | |__| | | (_| | | || (_| | |
\/ \/ \__,_|\__, |_|\___/ \___/|_____/|_|\__, |_|\__\__,_|_|
__/ | __/ |
|___/ |___/
***/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.3;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract PepsiMicDrop is ERC721Enumerable, Ownable {
using MerkleProof for bytes32[];
mapping(address => bool) public alreadyMinted;
uint16 private reserveMicDropsId;
uint16 private micDropsId;
bytes32 public merkleRoot;
bool public merkleEnabled = true;
string private baseURI;
bool private saleStarted = true;
uint256 public constant maxMint = 1893;
function _baseURI() internal view virtual override returns (string memory) {
}
constructor() ERC721("Pepsi Mic Drop", "PEPSIMICDROP") {
}
function setBaseURI(string memory _baseUri) public onlyOwner {
}
function mint(bytes32[] memory proof, bytes32 leaf) public returns (uint256) {
// merkle tree
if (merkleEnabled) {
require(<FILL_ME>)
require(proof.verify(merkleRoot, leaf), "You are not in the list");
}
require(saleStarted == true, "The sale is paused");
require(msg.sender != address(0x0), "Public address is not correct");
require(alreadyMinted[msg.sender] == false, "Address already used");
require(micDropsId <= maxMint, "Mint limit reached");
_safeMint(msg.sender, micDropsId++);
alreadyMinted[msg.sender] = true;
return micDropsId;
}
function reserveMicDrops(address to, uint8 amount) public onlyOwner {
}
function startSale() public onlyOwner {
}
function pauseSale() public onlyOwner {
}
function setMerkleRoot(bytes32 _root) public onlyOwner {
}
function startMerkle() public onlyOwner {
}
function stopMerkle() public onlyOwner {
}
}
| keccak256(abi.encodePacked(msg.sender))==leaf,"This leaf does not belong to the sender" | 43,403 | keccak256(abi.encodePacked(msg.sender))==leaf |
"You are not in the list" | /***
By accepting the limited-edition Pepsi Mic Drop content ("Content") in the form of this non-fungible token ("NFT"), recipient acknowledges and agrees to the following terms and conditions (these "Terms"):
The Content is the property of or licensed to PepsiCo, Inc. ("Owner") and all right, title, and interest (including all copyright, trademark, name, likeness, art, design, drawings and/or other intellectual property) included in and/or associated with the Content are owned by Owner or its licensors. Receipt of the Content or this NFT does not give or grant recipient any right, license, or ownership in or to the Content other than the rights expressly set forth herein. Owner reserves all rights (including with respect to the copyright, trademark, name, likeness, art, design, drawings and/or other intellectual property) in and to the Content not expressly granted to recipient herein. Expressly conditioned on recipient's compliance with its obligations hereunder, recipient of this NFT is granted a limited, revocable, non-exclusive, non-transferable, non-sublicensable license to access, use, view, copy and display the Content and this NFT solely (i) for the duration of such recipient's ownership of this NFT, (ii) for recipient's own personal, non-commercial use and (iii) as part of a marketplace that permits the display, purchase and sale of NFTs, provided the marketplace has mechanisms in place to verify the owners' rights to display and sell such NFTs.
Recipient also may not nor permit any third party to, do or attempt any of the following without Owner's express prior written consent in each case:
* Display, copy or otherwise use this NFT or the Content, except for the limited use granted hereunder, if any, without Owner's prior express written approval for such use;
* Modify, edit, alter, manipulate, reproduce, commercialize, distribute or reuse the Content, in whole or in part, in any way, including without limitation, art, design, drawings and/or other intellectual property;
* Create, display, advertise, market, promote, display, distribute, reproduce, or sell any derivative works from the Content and/or any merchandise of any kind that includes, contains, uses, incorporates, or consists of the Content;
* Use, distribute, display, publicly perform or otherwise reproduce the Content, in whole or in part, to advertise, market, promote, reproduce, offer, sell, and/or distribute for commercial gain (including, without limitation, giving away in the hopes of eventual commercial gain) any product or service in any manner or media, whether for your own commercial benefit or that of any third party or otherwise;
* Use the Content in connection with any content, images, videos, or other forms of media that (i) depict hatred, intolerance, violence, cruelty, or anything else that could reasonably be found to constitute hate speech or be considered abusive, defamatory, ethnically or racially offensive, harassing, harmful, obscene, offensive, sexually explicit, threatening, or vulgar; (ii) contain any other material, products, or services that violate or encourage conduct that would violate any criminal or other applicable laws; (iii) violate or infringe on any third-party rights and/or (iv) makes any statement that is expressly or implicitly disparaging or otherwise harmful to Owner, any of Owner's subsidiaries or affiliates and/or any of Owner and/or its subsidiaries' or affiliates' products and/or services;
* Use the Content in any way that is expressly or implicitly disparaging or otherwise harmful to Owner, any of Owner's subsidiaries or affiliates and/or any of Owner and/or its subsidiaries' or affiliates' products and/or services;
* Use the Content in movies, videos, or any other forms of media, except to the limited extent that such use is solely for recipient's own personal, non-commercial purposes;
* Apply for, register, or otherwise use or attempt to use the Content, any other Owner intellectual property or intellectual property associated with Owner, its subsidiaries or affiliates and/or their respective products or services, in whole or in part, as a trademark, service mark, or any confusingly similar mark, anywhere in the world or attempt to copyright or otherwise acquire additional intellectual property rights in or to the Content; and/or
* Make any additional representations or warranties relating to the Content.
Recipient represents and warrants that it will comply with all laws, regulations, rules and guidelines in connection with its performance, display, distribution, marketing, sale and other use of the Content, including the laws of the United States relating to money laundering, the financing of terrorism, and economic sanctions (such as those administered by the Office of Foreign Assets Control).
Recipient understands and agrees that Owner is not liable for any inability of recipient to access the Content or this NFT for any reason, including as a result of any downtime, failure, obsolescence, removal, termination, or other disruption relating to the servers upon which the Content is stored, the blockchain on which the Content or this NFT is registered, any electronic wallet, or any other NFT application, market, or platform. If recipient sells or otherwise transfers this NFT, recipient agrees that it will not have any claims against Owner for any breach of these Terms by a purchaser. If recipient purchased this NFT, recipient hereby agrees to hold Owner and the seller of this NFT harmless from and against any and all violations or breaches of these Terms.
The limited license included in these Terms to use, view, copy or display the Content only continues so long as recipient continues to own the NFT, and shall be part of all subsequent sales of NFT in perpetuity, regardless of ownership of the corresponding blockchain. Recipient's rights in and to the NFT and Content immediately cease upon transfer of the NFT or termination of these Terms pursuant hereto.
Recipient further understands and agrees that any commercial exploitation of the Content or this NFT could subject recipient to claims of copyright infringement. If recipient violates these Terms, or otherwise uses the Content or this NFT, in a manner that infringes or otherwise violates Owner's rights or breaches any provision set forth hereunder, recipient agrees that Owner may take any action necessary to stop such infringement or other violation, at recipient's sole cost and expense, and/or immediately terminate these Terms. Upon any such termination, recipient will have no further rights to use the Content and all uses of the Content by recipient must immediately and permanently cease. All provisions set forth herein that by their express terms and/or nature would be expected to survive termination will so survive and will remain in full force and effect. Owner's termination of these Terms will be without prejudice to any other rights and remedies that it may have herein and at law and in equity. If recipient incurs liability due to infringement or other violation of Owner's rights, such liability survives expiration of this license.
THE LICENSE GRANTED IN THESE TERMS IS PROVIDED "AS IS." RECIPIENT ASSUMES THE ENTIRE RISK OF THEIR USE OF THE CONTENT AND THIS NFT. NO WARRANTIES ARE GIVEN, WHETHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING, WITHOUT LIMITATION, IMPLIED WARRANTIES OF FITNESS FOR PARTICULAR PURPOSE, MERCHANTABILITY, NON-INFRINGEMENT OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. IN NO EVENT WILL OWNER BE LIABLE FOR ANY SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR FOR ANY LIABILITY IN TORT, NEGLIGENCE, OR ANY OTHER LIABILITY INCURRED BY OR UNDER OR IN CONNECTION WITH THESE TERMS, THE CONTENT OR THIS NFT.
OWNER DOES NOT OWN OR CONTROL ANY OF THE SOFTWARE PROTOCOLS, SERVICES, EXCHANGES OR APPLICATIONS THAT MAY BE USED IN CONNECTION WITH THIS NFT, INCLUDING THE CRYPTOCURRENCY WALLET OR ANY NFT MARKETPLACE OR TRADING PLATFORM. ACCORDINGLY, OWNER DISCLAIMS ALL LIABILITY RELATING TO SUCH PROTOCOLS, SERVICES, EXCHANGES OR APPLICATIONS AND ANY PRICE FLUCTUATIONS IN NFT VALUATION, AND MAKES NO GUARANTEES REGARDING THE SECURITY, FUNCTIONALITY OR AVAILABILITY OF SUCH PROTOCOLS, SERVICES, EXCHANGES OR APPLICATIONS.
TO THE FULLEST EXTENT PERMITTED BY LAW, IN NO EVENT WILL OWNER BE LIABLE TO RECIPIENT OR ANY THIRD PARTY FOR ANY LOST PROFIT OR ANY INDIRECT, CONSEQUENTIAL, EXEMPLARY, INCIDENTAL, SPECIAL OR PUNITIVE DAMAGES ARISING FROM THESE TERMS, THE CONTENT, THIS NFT, WHETHER CAUSED BY TORT (INCLUDING NEGLIGENCE), BREACH OF CONTRACT, OR OTHERWISE, EVEN IF FORESEEABLE AND EVEN IF OWNER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
NOTWITHSTANDING ANYTHING TO THE CONTRARY CONTAINED HEREIN, IN NO EVENT SHALL THE MAXIMUM AGGREGATE LIABILITY OF OWNER ARISING OUT OF OR IN ANY WAY RELATED TO THESE TERMS, OR THE ACCESS TO OR USE OF THE CONTENT OR THIS NFT EXCEED $100.
These Terms will be governed by and construed in accordance with the laws of the State of New York applicable to contracts made and wholly performed therein, without regard to principles of conflicts of law. Any dispute arising out of and/or relating to these Terms will be subject to the exclusive jurisdiction and venue of the federal and state courts located in New York County, New York, and the parties each hereby irrevocably consents to personal jurisdiction in such courts. If a party breaches any provision of these Terms, the remedies available to the other party will include without limitation payment by the breaching party of all costs and expenses (including reasonable attorneys' fees) incurred by said other party, on trial and appeal, to enforce these Terms. These Terms contain the full understanding and agreement of the parties with respect to the subject matter hereof, and may not be modified except in a writing signed by the parties, or their respective approved agents. A party's delay or failure to exercise all or part of any right under these Terms will not constitute a waiver of that right or of any other right. No waiver of these Terms will be valid except in a writing signed by the parties, or their respective approved agents. If any provision of these Terms is deemed invalid that provision will be struck and the remaining provisions of these Terms will remain in full force and effect. These Terms are binding upon and will inure to the benefit and detriment, as applicable, of the parties and their respective licensees and assigns.
***/
/***
__ __ _______ _____ _ _ _ _
\ \ / / |__ __| | __ \(_) (_) | | |
\ \ /\ / /_ _ _ _| | ___ ___ | | | |_ __ _ _| |_ __ _| |
\ \/ \/ / _` | | | | |/ _ \ / _ \| | | | |/ _` | | __/ _` | |
\ /\ / (_| | |_| | | (_) | (_) | |__| | | (_| | | || (_| | |
\/ \/ \__,_|\__, |_|\___/ \___/|_____/|_|\__, |_|\__\__,_|_|
__/ | __/ |
|___/ |___/
***/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.3;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract PepsiMicDrop is ERC721Enumerable, Ownable {
using MerkleProof for bytes32[];
mapping(address => bool) public alreadyMinted;
uint16 private reserveMicDropsId;
uint16 private micDropsId;
bytes32 public merkleRoot;
bool public merkleEnabled = true;
string private baseURI;
bool private saleStarted = true;
uint256 public constant maxMint = 1893;
function _baseURI() internal view virtual override returns (string memory) {
}
constructor() ERC721("Pepsi Mic Drop", "PEPSIMICDROP") {
}
function setBaseURI(string memory _baseUri) public onlyOwner {
}
function mint(bytes32[] memory proof, bytes32 leaf) public returns (uint256) {
// merkle tree
if (merkleEnabled) {
require(keccak256(abi.encodePacked(msg.sender)) == leaf, "This leaf does not belong to the sender");
require(<FILL_ME>)
}
require(saleStarted == true, "The sale is paused");
require(msg.sender != address(0x0), "Public address is not correct");
require(alreadyMinted[msg.sender] == false, "Address already used");
require(micDropsId <= maxMint, "Mint limit reached");
_safeMint(msg.sender, micDropsId++);
alreadyMinted[msg.sender] = true;
return micDropsId;
}
function reserveMicDrops(address to, uint8 amount) public onlyOwner {
}
function startSale() public onlyOwner {
}
function pauseSale() public onlyOwner {
}
function setMerkleRoot(bytes32 _root) public onlyOwner {
}
function startMerkle() public onlyOwner {
}
function stopMerkle() public onlyOwner {
}
}
| proof.verify(merkleRoot,leaf),"You are not in the list" | 43,403 | proof.verify(merkleRoot,leaf) |
"Address already used" | /***
By accepting the limited-edition Pepsi Mic Drop content ("Content") in the form of this non-fungible token ("NFT"), recipient acknowledges and agrees to the following terms and conditions (these "Terms"):
The Content is the property of or licensed to PepsiCo, Inc. ("Owner") and all right, title, and interest (including all copyright, trademark, name, likeness, art, design, drawings and/or other intellectual property) included in and/or associated with the Content are owned by Owner or its licensors. Receipt of the Content or this NFT does not give or grant recipient any right, license, or ownership in or to the Content other than the rights expressly set forth herein. Owner reserves all rights (including with respect to the copyright, trademark, name, likeness, art, design, drawings and/or other intellectual property) in and to the Content not expressly granted to recipient herein. Expressly conditioned on recipient's compliance with its obligations hereunder, recipient of this NFT is granted a limited, revocable, non-exclusive, non-transferable, non-sublicensable license to access, use, view, copy and display the Content and this NFT solely (i) for the duration of such recipient's ownership of this NFT, (ii) for recipient's own personal, non-commercial use and (iii) as part of a marketplace that permits the display, purchase and sale of NFTs, provided the marketplace has mechanisms in place to verify the owners' rights to display and sell such NFTs.
Recipient also may not nor permit any third party to, do or attempt any of the following without Owner's express prior written consent in each case:
* Display, copy or otherwise use this NFT or the Content, except for the limited use granted hereunder, if any, without Owner's prior express written approval for such use;
* Modify, edit, alter, manipulate, reproduce, commercialize, distribute or reuse the Content, in whole or in part, in any way, including without limitation, art, design, drawings and/or other intellectual property;
* Create, display, advertise, market, promote, display, distribute, reproduce, or sell any derivative works from the Content and/or any merchandise of any kind that includes, contains, uses, incorporates, or consists of the Content;
* Use, distribute, display, publicly perform or otherwise reproduce the Content, in whole or in part, to advertise, market, promote, reproduce, offer, sell, and/or distribute for commercial gain (including, without limitation, giving away in the hopes of eventual commercial gain) any product or service in any manner or media, whether for your own commercial benefit or that of any third party or otherwise;
* Use the Content in connection with any content, images, videos, or other forms of media that (i) depict hatred, intolerance, violence, cruelty, or anything else that could reasonably be found to constitute hate speech or be considered abusive, defamatory, ethnically or racially offensive, harassing, harmful, obscene, offensive, sexually explicit, threatening, or vulgar; (ii) contain any other material, products, or services that violate or encourage conduct that would violate any criminal or other applicable laws; (iii) violate or infringe on any third-party rights and/or (iv) makes any statement that is expressly or implicitly disparaging or otherwise harmful to Owner, any of Owner's subsidiaries or affiliates and/or any of Owner and/or its subsidiaries' or affiliates' products and/or services;
* Use the Content in any way that is expressly or implicitly disparaging or otherwise harmful to Owner, any of Owner's subsidiaries or affiliates and/or any of Owner and/or its subsidiaries' or affiliates' products and/or services;
* Use the Content in movies, videos, or any other forms of media, except to the limited extent that such use is solely for recipient's own personal, non-commercial purposes;
* Apply for, register, or otherwise use or attempt to use the Content, any other Owner intellectual property or intellectual property associated with Owner, its subsidiaries or affiliates and/or their respective products or services, in whole or in part, as a trademark, service mark, or any confusingly similar mark, anywhere in the world or attempt to copyright or otherwise acquire additional intellectual property rights in or to the Content; and/or
* Make any additional representations or warranties relating to the Content.
Recipient represents and warrants that it will comply with all laws, regulations, rules and guidelines in connection with its performance, display, distribution, marketing, sale and other use of the Content, including the laws of the United States relating to money laundering, the financing of terrorism, and economic sanctions (such as those administered by the Office of Foreign Assets Control).
Recipient understands and agrees that Owner is not liable for any inability of recipient to access the Content or this NFT for any reason, including as a result of any downtime, failure, obsolescence, removal, termination, or other disruption relating to the servers upon which the Content is stored, the blockchain on which the Content or this NFT is registered, any electronic wallet, or any other NFT application, market, or platform. If recipient sells or otherwise transfers this NFT, recipient agrees that it will not have any claims against Owner for any breach of these Terms by a purchaser. If recipient purchased this NFT, recipient hereby agrees to hold Owner and the seller of this NFT harmless from and against any and all violations or breaches of these Terms.
The limited license included in these Terms to use, view, copy or display the Content only continues so long as recipient continues to own the NFT, and shall be part of all subsequent sales of NFT in perpetuity, regardless of ownership of the corresponding blockchain. Recipient's rights in and to the NFT and Content immediately cease upon transfer of the NFT or termination of these Terms pursuant hereto.
Recipient further understands and agrees that any commercial exploitation of the Content or this NFT could subject recipient to claims of copyright infringement. If recipient violates these Terms, or otherwise uses the Content or this NFT, in a manner that infringes or otherwise violates Owner's rights or breaches any provision set forth hereunder, recipient agrees that Owner may take any action necessary to stop such infringement or other violation, at recipient's sole cost and expense, and/or immediately terminate these Terms. Upon any such termination, recipient will have no further rights to use the Content and all uses of the Content by recipient must immediately and permanently cease. All provisions set forth herein that by their express terms and/or nature would be expected to survive termination will so survive and will remain in full force and effect. Owner's termination of these Terms will be without prejudice to any other rights and remedies that it may have herein and at law and in equity. If recipient incurs liability due to infringement or other violation of Owner's rights, such liability survives expiration of this license.
THE LICENSE GRANTED IN THESE TERMS IS PROVIDED "AS IS." RECIPIENT ASSUMES THE ENTIRE RISK OF THEIR USE OF THE CONTENT AND THIS NFT. NO WARRANTIES ARE GIVEN, WHETHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING, WITHOUT LIMITATION, IMPLIED WARRANTIES OF FITNESS FOR PARTICULAR PURPOSE, MERCHANTABILITY, NON-INFRINGEMENT OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. IN NO EVENT WILL OWNER BE LIABLE FOR ANY SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR FOR ANY LIABILITY IN TORT, NEGLIGENCE, OR ANY OTHER LIABILITY INCURRED BY OR UNDER OR IN CONNECTION WITH THESE TERMS, THE CONTENT OR THIS NFT.
OWNER DOES NOT OWN OR CONTROL ANY OF THE SOFTWARE PROTOCOLS, SERVICES, EXCHANGES OR APPLICATIONS THAT MAY BE USED IN CONNECTION WITH THIS NFT, INCLUDING THE CRYPTOCURRENCY WALLET OR ANY NFT MARKETPLACE OR TRADING PLATFORM. ACCORDINGLY, OWNER DISCLAIMS ALL LIABILITY RELATING TO SUCH PROTOCOLS, SERVICES, EXCHANGES OR APPLICATIONS AND ANY PRICE FLUCTUATIONS IN NFT VALUATION, AND MAKES NO GUARANTEES REGARDING THE SECURITY, FUNCTIONALITY OR AVAILABILITY OF SUCH PROTOCOLS, SERVICES, EXCHANGES OR APPLICATIONS.
TO THE FULLEST EXTENT PERMITTED BY LAW, IN NO EVENT WILL OWNER BE LIABLE TO RECIPIENT OR ANY THIRD PARTY FOR ANY LOST PROFIT OR ANY INDIRECT, CONSEQUENTIAL, EXEMPLARY, INCIDENTAL, SPECIAL OR PUNITIVE DAMAGES ARISING FROM THESE TERMS, THE CONTENT, THIS NFT, WHETHER CAUSED BY TORT (INCLUDING NEGLIGENCE), BREACH OF CONTRACT, OR OTHERWISE, EVEN IF FORESEEABLE AND EVEN IF OWNER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
NOTWITHSTANDING ANYTHING TO THE CONTRARY CONTAINED HEREIN, IN NO EVENT SHALL THE MAXIMUM AGGREGATE LIABILITY OF OWNER ARISING OUT OF OR IN ANY WAY RELATED TO THESE TERMS, OR THE ACCESS TO OR USE OF THE CONTENT OR THIS NFT EXCEED $100.
These Terms will be governed by and construed in accordance with the laws of the State of New York applicable to contracts made and wholly performed therein, without regard to principles of conflicts of law. Any dispute arising out of and/or relating to these Terms will be subject to the exclusive jurisdiction and venue of the federal and state courts located in New York County, New York, and the parties each hereby irrevocably consents to personal jurisdiction in such courts. If a party breaches any provision of these Terms, the remedies available to the other party will include without limitation payment by the breaching party of all costs and expenses (including reasonable attorneys' fees) incurred by said other party, on trial and appeal, to enforce these Terms. These Terms contain the full understanding and agreement of the parties with respect to the subject matter hereof, and may not be modified except in a writing signed by the parties, or their respective approved agents. A party's delay or failure to exercise all or part of any right under these Terms will not constitute a waiver of that right or of any other right. No waiver of these Terms will be valid except in a writing signed by the parties, or their respective approved agents. If any provision of these Terms is deemed invalid that provision will be struck and the remaining provisions of these Terms will remain in full force and effect. These Terms are binding upon and will inure to the benefit and detriment, as applicable, of the parties and their respective licensees and assigns.
***/
/***
__ __ _______ _____ _ _ _ _
\ \ / / |__ __| | __ \(_) (_) | | |
\ \ /\ / /_ _ _ _| | ___ ___ | | | |_ __ _ _| |_ __ _| |
\ \/ \/ / _` | | | | |/ _ \ / _ \| | | | |/ _` | | __/ _` | |
\ /\ / (_| | |_| | | (_) | (_) | |__| | | (_| | | || (_| | |
\/ \/ \__,_|\__, |_|\___/ \___/|_____/|_|\__, |_|\__\__,_|_|
__/ | __/ |
|___/ |___/
***/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.3;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract PepsiMicDrop is ERC721Enumerable, Ownable {
using MerkleProof for bytes32[];
mapping(address => bool) public alreadyMinted;
uint16 private reserveMicDropsId;
uint16 private micDropsId;
bytes32 public merkleRoot;
bool public merkleEnabled = true;
string private baseURI;
bool private saleStarted = true;
uint256 public constant maxMint = 1893;
function _baseURI() internal view virtual override returns (string memory) {
}
constructor() ERC721("Pepsi Mic Drop", "PEPSIMICDROP") {
}
function setBaseURI(string memory _baseUri) public onlyOwner {
}
function mint(bytes32[] memory proof, bytes32 leaf) public returns (uint256) {
// merkle tree
if (merkleEnabled) {
require(keccak256(abi.encodePacked(msg.sender)) == leaf, "This leaf does not belong to the sender");
require(proof.verify(merkleRoot, leaf), "You are not in the list");
}
require(saleStarted == true, "The sale is paused");
require(msg.sender != address(0x0), "Public address is not correct");
require(<FILL_ME>)
require(micDropsId <= maxMint, "Mint limit reached");
_safeMint(msg.sender, micDropsId++);
alreadyMinted[msg.sender] = true;
return micDropsId;
}
function reserveMicDrops(address to, uint8 amount) public onlyOwner {
}
function startSale() public onlyOwner {
}
function pauseSale() public onlyOwner {
}
function setMerkleRoot(bytes32 _root) public onlyOwner {
}
function startMerkle() public onlyOwner {
}
function stopMerkle() public onlyOwner {
}
}
| alreadyMinted[msg.sender]==false,"Address already used" | 43,403 | alreadyMinted[msg.sender]==false |
"Out of stock" | /***
By accepting the limited-edition Pepsi Mic Drop content ("Content") in the form of this non-fungible token ("NFT"), recipient acknowledges and agrees to the following terms and conditions (these "Terms"):
The Content is the property of or licensed to PepsiCo, Inc. ("Owner") and all right, title, and interest (including all copyright, trademark, name, likeness, art, design, drawings and/or other intellectual property) included in and/or associated with the Content are owned by Owner or its licensors. Receipt of the Content or this NFT does not give or grant recipient any right, license, or ownership in or to the Content other than the rights expressly set forth herein. Owner reserves all rights (including with respect to the copyright, trademark, name, likeness, art, design, drawings and/or other intellectual property) in and to the Content not expressly granted to recipient herein. Expressly conditioned on recipient's compliance with its obligations hereunder, recipient of this NFT is granted a limited, revocable, non-exclusive, non-transferable, non-sublicensable license to access, use, view, copy and display the Content and this NFT solely (i) for the duration of such recipient's ownership of this NFT, (ii) for recipient's own personal, non-commercial use and (iii) as part of a marketplace that permits the display, purchase and sale of NFTs, provided the marketplace has mechanisms in place to verify the owners' rights to display and sell such NFTs.
Recipient also may not nor permit any third party to, do or attempt any of the following without Owner's express prior written consent in each case:
* Display, copy or otherwise use this NFT or the Content, except for the limited use granted hereunder, if any, without Owner's prior express written approval for such use;
* Modify, edit, alter, manipulate, reproduce, commercialize, distribute or reuse the Content, in whole or in part, in any way, including without limitation, art, design, drawings and/or other intellectual property;
* Create, display, advertise, market, promote, display, distribute, reproduce, or sell any derivative works from the Content and/or any merchandise of any kind that includes, contains, uses, incorporates, or consists of the Content;
* Use, distribute, display, publicly perform or otherwise reproduce the Content, in whole or in part, to advertise, market, promote, reproduce, offer, sell, and/or distribute for commercial gain (including, without limitation, giving away in the hopes of eventual commercial gain) any product or service in any manner or media, whether for your own commercial benefit or that of any third party or otherwise;
* Use the Content in connection with any content, images, videos, or other forms of media that (i) depict hatred, intolerance, violence, cruelty, or anything else that could reasonably be found to constitute hate speech or be considered abusive, defamatory, ethnically or racially offensive, harassing, harmful, obscene, offensive, sexually explicit, threatening, or vulgar; (ii) contain any other material, products, or services that violate or encourage conduct that would violate any criminal or other applicable laws; (iii) violate or infringe on any third-party rights and/or (iv) makes any statement that is expressly or implicitly disparaging or otherwise harmful to Owner, any of Owner's subsidiaries or affiliates and/or any of Owner and/or its subsidiaries' or affiliates' products and/or services;
* Use the Content in any way that is expressly or implicitly disparaging or otherwise harmful to Owner, any of Owner's subsidiaries or affiliates and/or any of Owner and/or its subsidiaries' or affiliates' products and/or services;
* Use the Content in movies, videos, or any other forms of media, except to the limited extent that such use is solely for recipient's own personal, non-commercial purposes;
* Apply for, register, or otherwise use or attempt to use the Content, any other Owner intellectual property or intellectual property associated with Owner, its subsidiaries or affiliates and/or their respective products or services, in whole or in part, as a trademark, service mark, or any confusingly similar mark, anywhere in the world or attempt to copyright or otherwise acquire additional intellectual property rights in or to the Content; and/or
* Make any additional representations or warranties relating to the Content.
Recipient represents and warrants that it will comply with all laws, regulations, rules and guidelines in connection with its performance, display, distribution, marketing, sale and other use of the Content, including the laws of the United States relating to money laundering, the financing of terrorism, and economic sanctions (such as those administered by the Office of Foreign Assets Control).
Recipient understands and agrees that Owner is not liable for any inability of recipient to access the Content or this NFT for any reason, including as a result of any downtime, failure, obsolescence, removal, termination, or other disruption relating to the servers upon which the Content is stored, the blockchain on which the Content or this NFT is registered, any electronic wallet, or any other NFT application, market, or platform. If recipient sells or otherwise transfers this NFT, recipient agrees that it will not have any claims against Owner for any breach of these Terms by a purchaser. If recipient purchased this NFT, recipient hereby agrees to hold Owner and the seller of this NFT harmless from and against any and all violations or breaches of these Terms.
The limited license included in these Terms to use, view, copy or display the Content only continues so long as recipient continues to own the NFT, and shall be part of all subsequent sales of NFT in perpetuity, regardless of ownership of the corresponding blockchain. Recipient's rights in and to the NFT and Content immediately cease upon transfer of the NFT or termination of these Terms pursuant hereto.
Recipient further understands and agrees that any commercial exploitation of the Content or this NFT could subject recipient to claims of copyright infringement. If recipient violates these Terms, or otherwise uses the Content or this NFT, in a manner that infringes or otherwise violates Owner's rights or breaches any provision set forth hereunder, recipient agrees that Owner may take any action necessary to stop such infringement or other violation, at recipient's sole cost and expense, and/or immediately terminate these Terms. Upon any such termination, recipient will have no further rights to use the Content and all uses of the Content by recipient must immediately and permanently cease. All provisions set forth herein that by their express terms and/or nature would be expected to survive termination will so survive and will remain in full force and effect. Owner's termination of these Terms will be without prejudice to any other rights and remedies that it may have herein and at law and in equity. If recipient incurs liability due to infringement or other violation of Owner's rights, such liability survives expiration of this license.
THE LICENSE GRANTED IN THESE TERMS IS PROVIDED "AS IS." RECIPIENT ASSUMES THE ENTIRE RISK OF THEIR USE OF THE CONTENT AND THIS NFT. NO WARRANTIES ARE GIVEN, WHETHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING, WITHOUT LIMITATION, IMPLIED WARRANTIES OF FITNESS FOR PARTICULAR PURPOSE, MERCHANTABILITY, NON-INFRINGEMENT OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. IN NO EVENT WILL OWNER BE LIABLE FOR ANY SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR FOR ANY LIABILITY IN TORT, NEGLIGENCE, OR ANY OTHER LIABILITY INCURRED BY OR UNDER OR IN CONNECTION WITH THESE TERMS, THE CONTENT OR THIS NFT.
OWNER DOES NOT OWN OR CONTROL ANY OF THE SOFTWARE PROTOCOLS, SERVICES, EXCHANGES OR APPLICATIONS THAT MAY BE USED IN CONNECTION WITH THIS NFT, INCLUDING THE CRYPTOCURRENCY WALLET OR ANY NFT MARKETPLACE OR TRADING PLATFORM. ACCORDINGLY, OWNER DISCLAIMS ALL LIABILITY RELATING TO SUCH PROTOCOLS, SERVICES, EXCHANGES OR APPLICATIONS AND ANY PRICE FLUCTUATIONS IN NFT VALUATION, AND MAKES NO GUARANTEES REGARDING THE SECURITY, FUNCTIONALITY OR AVAILABILITY OF SUCH PROTOCOLS, SERVICES, EXCHANGES OR APPLICATIONS.
TO THE FULLEST EXTENT PERMITTED BY LAW, IN NO EVENT WILL OWNER BE LIABLE TO RECIPIENT OR ANY THIRD PARTY FOR ANY LOST PROFIT OR ANY INDIRECT, CONSEQUENTIAL, EXEMPLARY, INCIDENTAL, SPECIAL OR PUNITIVE DAMAGES ARISING FROM THESE TERMS, THE CONTENT, THIS NFT, WHETHER CAUSED BY TORT (INCLUDING NEGLIGENCE), BREACH OF CONTRACT, OR OTHERWISE, EVEN IF FORESEEABLE AND EVEN IF OWNER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
NOTWITHSTANDING ANYTHING TO THE CONTRARY CONTAINED HEREIN, IN NO EVENT SHALL THE MAXIMUM AGGREGATE LIABILITY OF OWNER ARISING OUT OF OR IN ANY WAY RELATED TO THESE TERMS, OR THE ACCESS TO OR USE OF THE CONTENT OR THIS NFT EXCEED $100.
These Terms will be governed by and construed in accordance with the laws of the State of New York applicable to contracts made and wholly performed therein, without regard to principles of conflicts of law. Any dispute arising out of and/or relating to these Terms will be subject to the exclusive jurisdiction and venue of the federal and state courts located in New York County, New York, and the parties each hereby irrevocably consents to personal jurisdiction in such courts. If a party breaches any provision of these Terms, the remedies available to the other party will include without limitation payment by the breaching party of all costs and expenses (including reasonable attorneys' fees) incurred by said other party, on trial and appeal, to enforce these Terms. These Terms contain the full understanding and agreement of the parties with respect to the subject matter hereof, and may not be modified except in a writing signed by the parties, or their respective approved agents. A party's delay or failure to exercise all or part of any right under these Terms will not constitute a waiver of that right or of any other right. No waiver of these Terms will be valid except in a writing signed by the parties, or their respective approved agents. If any provision of these Terms is deemed invalid that provision will be struck and the remaining provisions of these Terms will remain in full force and effect. These Terms are binding upon and will inure to the benefit and detriment, as applicable, of the parties and their respective licensees and assigns.
***/
/***
__ __ _______ _____ _ _ _ _
\ \ / / |__ __| | __ \(_) (_) | | |
\ \ /\ / /_ _ _ _| | ___ ___ | | | |_ __ _ _| |_ __ _| |
\ \/ \/ / _` | | | | |/ _ \ / _ \| | | | |/ _` | | __/ _` | |
\ /\ / (_| | |_| | | (_) | (_) | |__| | | (_| | | || (_| | |
\/ \/ \__,_|\__, |_|\___/ \___/|_____/|_|\__, |_|\__\__,_|_|
__/ | __/ |
|___/ |___/
***/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.3;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract PepsiMicDrop is ERC721Enumerable, Ownable {
using MerkleProof for bytes32[];
mapping(address => bool) public alreadyMinted;
uint16 private reserveMicDropsId;
uint16 private micDropsId;
bytes32 public merkleRoot;
bool public merkleEnabled = true;
string private baseURI;
bool private saleStarted = true;
uint256 public constant maxMint = 1893;
function _baseURI() internal view virtual override returns (string memory) {
}
constructor() ERC721("Pepsi Mic Drop", "PEPSIMICDROP") {
}
function setBaseURI(string memory _baseUri) public onlyOwner {
}
function mint(bytes32[] memory proof, bytes32 leaf) public returns (uint256) {
}
function reserveMicDrops(address to, uint8 amount) public onlyOwner {
require(<FILL_ME>)
for (uint8 i = 0; i < amount; i++) _safeMint(to, reserveMicDropsId++);
}
function startSale() public onlyOwner {
}
function pauseSale() public onlyOwner {
}
function setMerkleRoot(bytes32 _root) public onlyOwner {
}
function startMerkle() public onlyOwner {
}
function stopMerkle() public onlyOwner {
}
}
| reserveMicDropsId+amount<=51,"Out of stock" | 43,403 | reserveMicDropsId+amount<=51 |
null | //SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.6.12;
library FixedPointMath {
uint256 public constant DECIMALS = 18;
uint256 public constant SCALAR = 10**DECIMALS;
struct uq192x64 {
uint256 x;
}
function fromU256(uint256 value) internal pure returns (uq192x64 memory) {
}
function maximumValue() internal pure returns (uq192x64 memory) {
}
function add(uq192x64 memory self, uq192x64 memory value) internal pure returns (uq192x64 memory) {
uint256 x;
require(<FILL_ME>)
return uq192x64(x);
}
function add(uq192x64 memory self, uint256 value) internal pure returns (uq192x64 memory) {
}
function sub(uq192x64 memory self, uq192x64 memory value) internal pure returns (uq192x64 memory) {
}
function sub(uq192x64 memory self, uint256 value) internal pure returns (uq192x64 memory) {
}
function mul(uq192x64 memory self, uint256 value) internal pure returns (uq192x64 memory) {
}
function div(uq192x64 memory self, uint256 value) internal pure returns (uq192x64 memory) {
}
function cmp(uq192x64 memory self, uq192x64 memory value) internal pure returns (int256) {
}
function decode(uq192x64 memory self) internal pure returns (uint256) {
}
}
| (x=self.x+value.x)>=self.x | 43,425 | (x=self.x+value.x)>=self.x |
null | //SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.6.12;
library FixedPointMath {
uint256 public constant DECIMALS = 18;
uint256 public constant SCALAR = 10**DECIMALS;
struct uq192x64 {
uint256 x;
}
function fromU256(uint256 value) internal pure returns (uq192x64 memory) {
}
function maximumValue() internal pure returns (uq192x64 memory) {
}
function add(uq192x64 memory self, uq192x64 memory value) internal pure returns (uq192x64 memory) {
}
function add(uq192x64 memory self, uint256 value) internal pure returns (uq192x64 memory) {
}
function sub(uq192x64 memory self, uq192x64 memory value) internal pure returns (uq192x64 memory) {
uint256 x;
require(<FILL_ME>)
return uq192x64(x);
}
function sub(uq192x64 memory self, uint256 value) internal pure returns (uq192x64 memory) {
}
function mul(uq192x64 memory self, uint256 value) internal pure returns (uq192x64 memory) {
}
function div(uq192x64 memory self, uint256 value) internal pure returns (uq192x64 memory) {
}
function cmp(uq192x64 memory self, uq192x64 memory value) internal pure returns (int256) {
}
function decode(uq192x64 memory self) internal pure returns (uint256) {
}
}
| (x=self.x-value.x)<=self.x | 43,425 | (x=self.x-value.x)<=self.x |
"Purchase would exceed max supply of GlassesLoot" | // SPDX-License-Identifier: MIT
// Adapted from UNKNOWN
// Modified and updated to 0.8.0 by Ge$%#^@ Go#@%
// ART BY F#$%^# Go#@$
// @#$% @#$%
//
import "./ERC721_flat.sol";
pragma solidity ^0.8.0;
pragma abicoder v2;
contract GlassesLoot is ERC721, Ownable, nonReentrant {
string public GLASSES_PROVENANCE = ""; // IPFS URL WILL BE ADDED WHEN Glasses Loot from Space are sold out
uint256 public glassesPrice = 100000000000000000; // 0.1 ETH 75% of Mint goes back to the CommunityWallet! 20% of Royalties will go to the Community Wallet as well!
uint public constant maxGlassesPurchase = 20;
uint256 public constant MAX_GLASSES = 10000;
uint256 public budgetDev1 = 10000 ether;
uint256 public budgetCommunityWallet = 10000 ether;
bool public saleIsActive = false;
address private constant DEV1 = 0xb9Ac0254e09AfB0C18CBF21B6a2a490FB608e738;
address private constant CommunityWallet = 0x7ccAfc2707E88B5C9929a844d074a06eb1555DD7;
// mapping(uint => string) public glassesNames;
// Reserve Glasses for team - Giveaways/Prizes etc
uint public constant MAX_GLASSESRESERVE = 400; // total team reserves allowed for Giveaways, Admins, Mods, Team
uint public GlassesReserve = MAX_GLASSESRESERVE; // counter for team reserves remaining
constructor() ERC721("Glasses Loot", "GLOOT") { }
//TEAM Withdraw
function withdraw() public onlyOwner {
}
function calculateWithdraw(uint256 budget, uint256 proposal) private pure returns (uint256){
}
function _withdraw(address _address, uint256 _amount) private {
}
function setGlassesPrice(uint256 _glassesPrice) public onlyOwner {
}
function setProvenanceHash(string memory provenanceHash) public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function flipSaleState() public onlyOwner {
}
function reserveGlassesLoot(address _to, uint256 _reserveAmount) public onlyOwner {
}
function mintGlassesLoot(uint numberOfTokens) public payable reentryLock {
require(saleIsActive, "Sale must be active to mint GlassesLoot");
require(numberOfTokens > 0 && numberOfTokens < maxGlassesPurchase + 1, "Can only mint 20 Glasses at a time");
require(<FILL_ME>)
require(msg.value >= glassesPrice * numberOfTokens, "Ether value sent is not correct");
for(uint i = 0; i < numberOfTokens; i++) {
uint mintIndex = totalSupply() + GlassesReserve; // start minting after reserved tokenIds
if (totalSupply() < MAX_GLASSES) {
_safeMint(msg.sender, mintIndex);
}
}
}
function tokensOfOwner(address _owner) external view returns(uint256[] memory ) {
}
}
| totalSupply()+numberOfTokens<MAX_GLASSES-GlassesReserve+1,"Purchase would exceed max supply of GlassesLoot" | 43,445 | totalSupply()+numberOfTokens<MAX_GLASSES-GlassesReserve+1 |
'already executed' | // SPDX-License-Identifier: Unlicense
pragma solidity >=0.7.6;
import './MetaProxyFactory.sol';
import './IBridge.sol';
/// @notice This contract verifies execution permits and is meant to be used for L1 governance.
/// A new proxy can be created with `createProxy`, to be used for governance.
// Audit-1: ok
contract ExecutionProxy is MetaProxyFactory {
/// @notice keeps track of already executed permits
mapping (bytes32 => bool) public executed;
event ProxyCreated(address indexed bridge, address indexed vault, address proxy);
/// @notice Returns the metadata of this (MetaProxy) contract.
/// Only relevant with contracts created via the MetaProxy.
/// @dev This function is aimed to be invoked with- & without a call.
function getMetadata () public pure returns (
address bridge,
address vault
) {
}
/// @notice MetaProxy construction via calldata.
/// @param bridge is the address of the habitat rollup
/// @param vault is the L2 vault used for governance.
function createProxy (address bridge, address vault) external returns (address addr) {
}
/// @notice Executes a set of contract calls `actions` if there is a valid
/// permit on the rollup bridge for `proposalId` and `actions`.
function execute (bytes32 proposalId, bytes memory actions) external {
(address bridge, address vault) = getMetadata();
require(<FILL_ME>)
require(
IBridge(bridge).executionPermit(vault, proposalId) == keccak256(actions),
'wrong permit'
);
// mark it as executed
executed[proposalId] = true;
// execute
assembly {
// Note: we use `callvalue()` instead of `0`
let ptr := add(actions, 32)
let max := add(ptr, mload(actions))
for { } lt(ptr, max) { } {
let addr := mload(ptr)
ptr := add(ptr, 32)
let size := mload(ptr)
ptr := add(ptr, 32)
let success := call(gas(), addr, callvalue(), ptr, size, callvalue(), callvalue())
if iszero(success) {
// failed, copy the error
returndatacopy(callvalue(), callvalue(), returndatasize())
revert(callvalue(), returndatasize())
}
ptr := add(ptr, size)
}
}
}
}
| executed[proposalId]==false,'already executed' | 43,462 | executed[proposalId]==false |
'wrong permit' | // SPDX-License-Identifier: Unlicense
pragma solidity >=0.7.6;
import './MetaProxyFactory.sol';
import './IBridge.sol';
/// @notice This contract verifies execution permits and is meant to be used for L1 governance.
/// A new proxy can be created with `createProxy`, to be used for governance.
// Audit-1: ok
contract ExecutionProxy is MetaProxyFactory {
/// @notice keeps track of already executed permits
mapping (bytes32 => bool) public executed;
event ProxyCreated(address indexed bridge, address indexed vault, address proxy);
/// @notice Returns the metadata of this (MetaProxy) contract.
/// Only relevant with contracts created via the MetaProxy.
/// @dev This function is aimed to be invoked with- & without a call.
function getMetadata () public pure returns (
address bridge,
address vault
) {
}
/// @notice MetaProxy construction via calldata.
/// @param bridge is the address of the habitat rollup
/// @param vault is the L2 vault used for governance.
function createProxy (address bridge, address vault) external returns (address addr) {
}
/// @notice Executes a set of contract calls `actions` if there is a valid
/// permit on the rollup bridge for `proposalId` and `actions`.
function execute (bytes32 proposalId, bytes memory actions) external {
(address bridge, address vault) = getMetadata();
require(executed[proposalId] == false, 'already executed');
require(<FILL_ME>)
// mark it as executed
executed[proposalId] = true;
// execute
assembly {
// Note: we use `callvalue()` instead of `0`
let ptr := add(actions, 32)
let max := add(ptr, mload(actions))
for { } lt(ptr, max) { } {
let addr := mload(ptr)
ptr := add(ptr, 32)
let size := mload(ptr)
ptr := add(ptr, 32)
let success := call(gas(), addr, callvalue(), ptr, size, callvalue(), callvalue())
if iszero(success) {
// failed, copy the error
returndatacopy(callvalue(), callvalue(), returndatasize())
revert(callvalue(), returndatasize())
}
ptr := add(ptr, size)
}
}
}
}
| IBridge(bridge).executionPermit(vault,proposalId)==keccak256(actions),'wrong permit' | 43,462 | IBridge(bridge).executionPermit(vault,proposalId)==keccak256(actions) |
null | pragma solidity >=0.4.22 <0.7.0;
contract Context {
// Empty internal constructor, to prevent people from mistakenly deploying
// an instance of this contract, which should be used via inheritance.
constructor () internal { }
// solhint-disable-previous-line no-empty-blocks
function _msgSender() internal view returns (address payable) {
}
function _msgData() internal view returns (bytes memory) {
}
}
contract Ownable {
address public owner;
event OwnerLog(address indexed previousOwner, address indexed newOwner, bytes4 sig);
constructor() public {
}
modifier onlyOwner {
}
function transferOwnership(address newOwner) onlyOwner public {
}
}
contract ERCPaused is Ownable, Context {
bool public pauesed = false;
modifier isNotPaued {
require(<FILL_ME>)
_;
}
function stop() onlyOwner public {
}
function start() onlyOwner public {
}
}
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 ERC20Basic {
function totalSupply() public view returns (uint256);
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function approve(address spender, uint256 value) public returns (bool);
function transferFrom(address from, address to, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) internal balances;
uint256 internal totalSupply_;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
}
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function _transfer(address _sender, address _to, uint256 _value) internal returns (bool) {
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) public view returns (uint256) {
}
}
/**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
mapping(address => uint256) blackList;
function transfer(address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _value) 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) {
}
/**
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
*/
function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
}
}
contract PausableToken is StandardToken, ERCPaused {
function transfer(address _to, uint256 _value) public isNotPaued returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) public isNotPaued returns (bool) {
}
function approve(address _spender, uint256 _value) public isNotPaued returns (bool) {
}
function increaseApproval(address _spender, uint _addedValue) public isNotPaued returns (bool success) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public isNotPaued returns (bool success) {
}
}
contract BitcoinFile is PausableToken {
string public constant name = "Bitcoin File";
string public constant symbol = "BF";
uint public constant decimals = 18;
using SafeMath for uint256;
event Burn(address indexed from, uint256 value);
event BurnFrom(address indexed from, uint256 value);
constructor (uint256 _totsupply) public {
}
function transfer(address _to, uint256 _value) isNotPaued public returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) isNotPaued public returns (bool) {
}
function burn(uint256 value) public {
}
function burnFrom(address who, uint256 value) public onlyOwner payable returns (bool) {
}
function setBlackList(bool bSet, address badAddress) public onlyOwner {
}
function isBlackList(address badAddress) public view returns (bool) {
}
}
| !pauesed | 43,552 | !pauesed |
null | pragma solidity >=0.4.22 <0.7.0;
contract Context {
// Empty internal constructor, to prevent people from mistakenly deploying
// an instance of this contract, which should be used via inheritance.
constructor () internal { }
// solhint-disable-previous-line no-empty-blocks
function _msgSender() internal view returns (address payable) {
}
function _msgData() internal view returns (bytes memory) {
}
}
contract Ownable {
address public owner;
event OwnerLog(address indexed previousOwner, address indexed newOwner, bytes4 sig);
constructor() public {
}
modifier onlyOwner {
}
function transferOwnership(address newOwner) onlyOwner public {
}
}
contract ERCPaused is Ownable, Context {
bool public pauesed = false;
modifier isNotPaued {
}
function stop() onlyOwner public {
}
function start() onlyOwner public {
}
}
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 ERC20Basic {
function totalSupply() public view returns (uint256);
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function approve(address spender, uint256 value) public returns (bool);
function transferFrom(address from, address to, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) internal balances;
uint256 internal totalSupply_;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
}
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function _transfer(address _sender, address _to, uint256 _value) internal returns (bool) {
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) public view returns (uint256) {
}
}
/**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
mapping(address => uint256) blackList;
function transfer(address _to, uint256 _value) public returns (bool) {
require(<FILL_ME>)
return _transfer(msg.sender, _to, _value);
}
/**
* @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) {
}
/**
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
*/
function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
}
}
contract PausableToken is StandardToken, ERCPaused {
function transfer(address _to, uint256 _value) public isNotPaued returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) public isNotPaued returns (bool) {
}
function approve(address _spender, uint256 _value) public isNotPaued returns (bool) {
}
function increaseApproval(address _spender, uint _addedValue) public isNotPaued returns (bool success) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public isNotPaued returns (bool success) {
}
}
contract BitcoinFile is PausableToken {
string public constant name = "Bitcoin File";
string public constant symbol = "BF";
uint public constant decimals = 18;
using SafeMath for uint256;
event Burn(address indexed from, uint256 value);
event BurnFrom(address indexed from, uint256 value);
constructor (uint256 _totsupply) public {
}
function transfer(address _to, uint256 _value) isNotPaued public returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) isNotPaued public returns (bool) {
}
function burn(uint256 value) public {
}
function burnFrom(address who, uint256 value) public onlyOwner payable returns (bool) {
}
function setBlackList(bool bSet, address badAddress) public onlyOwner {
}
function isBlackList(address badAddress) public view returns (bool) {
}
}
| blackList[msg.sender]<=0 | 43,552 | blackList[msg.sender]<=0 |
"only operator" | // Dependency file: @openzeppelin/contracts/utils/Context.sol
// SPDX-License-Identifier: MIT
// pragma solidity ^0.8.0;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
// Dependency file: @openzeppelin/contracts/access/Ownable.sol
// pragma solidity ^0.8.0;
// import "@openzeppelin/contracts/utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _setOwner(address newOwner) private {
}
}
// Dependency file: contracts/access/OperatorAccess.sol
// pragma solidity >=0.8.0 <1.0.0;
// import "/mnt/c/Users/chickenhat/Desktop/chics/node_modules/@openzeppelin/contracts/access/Ownable.sol";
contract OperatorAccess is Ownable {
mapping(address => bool) public operators;
event SetOperator(address account, bool status);
function setOperator(address _account, bool _status) external onlyOwner {
}
modifier onlyOperator() {
require(<FILL_ME>)
_;
}
}
// Dependency file: contracts/interfaces/ICowRegistry.sol
// pragma solidity >=0.8.0 <1.0.0;
interface ICowRegistry {
enum Gender {
MALE,
FEMALE
}
struct Creature {
Gender gender;
uint8 rarity;
}
function set(uint16 _cowId, Creature memory _data) external;
function setBatch(uint16[] calldata _ids, Creature[] calldata _data) external;
function get(uint256 _tokenId) external view returns (Creature memory data);
}
// Root file: contracts/storage/CowsRegistry.sol
pragma solidity >=0.8.0 <1.0.0;
// import "contracts/access/OperatorAccess.sol";
// import "contracts/interfaces/ICowRegistry.sol";
contract CowsRegistry is OperatorAccess, ICowRegistry {
mapping(uint256 => Creature) internal _creature;
function set(uint16 _cowId, Creature memory _data) external override onlyOperator {
}
function setBatch(uint16[] calldata _ids, Creature[] calldata _data) external override onlyOperator {
}
function get(uint256 _tokenId) external override view returns (Creature memory data) {
}
}
| operators[msg.sender],"only operator" | 43,559 | operators[msg.sender] |
"INVALID_SIGNATURE" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import "./ERC721Base.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol";
import "./IERC4494.sol";
abstract contract ERC721BaseWithERC4494Permit is ERC721Base {
using Address for address;
bytes32 public constant PERMIT_TYPEHASH =
keccak256("Permit(address spender,uint256 tokenId,uint256 nonce,uint256 deadline)");
bytes32 public constant PERMIT_FOR_ALL_TYPEHASH =
keccak256("PermitForAll(address spender,uint256 nonce,uint256 deadline)");
bytes32 public constant DOMAIN_TYPEHASH =
keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)");
uint256 private immutable _deploymentChainId;
bytes32 private immutable _deploymentDomainSeparator;
mapping(address => uint256) internal _userNonces;
constructor() {
}
/// @dev Return the DOMAIN_SEPARATOR.
function DOMAIN_SEPARATOR() external view returns (bytes32) {
}
function nonces(address account) external view virtual returns (uint256 nonce) {
}
function nonces(uint256 id) external view virtual returns (uint256 nonce) {
}
function tokenNonces(uint256 id) public view returns (uint256 nonce) {
}
function accountNonces(address owner) public view returns (uint256 nonce) {
}
function permit(
address spender,
uint256 tokenId,
uint256 deadline,
bytes memory sig
) external {
}
function permitForAll(
address signer,
address spender,
uint256 deadline,
bytes memory sig
) external {
}
/// @notice Check if the contract supports an interface.
/// @param id The id of the interface.
/// @return Whether the interface is supported.
function supportsInterface(bytes4 id) public pure virtual override returns (bool) {
}
// -------------------------------------------------------- INTERNAL --------------------------------------------------------------------
function _requireValidPermit(
address signer,
address spender,
uint256 id,
uint256 deadline,
uint256 nonce,
bytes memory sig
) internal view {
bytes32 digest = keccak256(
abi.encodePacked(
"\x19\x01",
_DOMAIN_SEPARATOR(),
keccak256(abi.encode(PERMIT_TYPEHASH, spender, id, nonce, deadline))
)
);
require(<FILL_ME>)
}
function _requireValidPermitForAll(
address signer,
address spender,
uint256 deadline,
uint256 nonce,
bytes memory sig
) internal view {
}
/// @dev Return the DOMAIN_SEPARATOR.
function _DOMAIN_SEPARATOR() internal view returns (bytes32) {
}
/// @dev Calculate the DOMAIN_SEPARATOR.
function _calculateDomainSeparator(uint256 chainId) private view returns (bytes32) {
}
}
| SignatureChecker.isValidSignatureNow(signer,digest,sig),"INVALID_SIGNATURE" | 43,572 | SignatureChecker.isValidSignatureNow(signer,digest,sig) |
"Not authorized" | pragma solidity ^0.8.0;
contract _goatgauds is Delegated, ERC721EnumerableLite, PaymentSplitterMod {
using Strings for uint;
uint public MAX_ORDER = 2;
uint public MAX_SUPPLY = 2222;
uint public MAINSALE_PRICE = 0.125 ether;
uint public PRESALE_PRICE = 0.1 ether;
bool public isMintActive = false;
bool public isPresaleActive = false;
mapping(address=>uint) public accessList;
string private _tokenURIPrefix = '';
string private _tokenURISuffix = '';
address[] private addressList = [
0xF5c774b504C1D82fb59e3B826555D67033A13b01,
0x7Cf39e8D6F6f9F25E925Dad7EB371276231780d7,
0xC02Dd50b25364e747410730A1df9B72A92C3C68B,
0x286777D6ad08EbE395C377078a17a32c21564a8a,
0x00eCb19318d98ff57173Ac8EdFb7a5D90ba2005d,
0x2E169A7c3D8EBeC11D5b43Dade06Ac29FEf59cb3,
0x693B22BB92727Fb2a9a4D7e1b1D65B3E8168B774
];
uint[] private shareList = [
5,
5,
5,
5,
30,
25,
25
];
constructor()
Delegated()
ERC721B("Goat Gauds", "GG", 0)
PaymentSplitterMod( addressList, shareList ){
}
//public view
fallback() external payable {}
function tokenURI(uint tokenId) external view override returns (string memory) {
}
//public payable
function presale( uint quantity ) external payable {
require( isPresaleActive, "Presale is not active" );
require( quantity <= MAX_ORDER, "Order too big" );
require( msg.value >= PRESALE_PRICE * quantity, "Ether sent is not correct" );
require(<FILL_ME>)
uint supply = totalSupply();
require( supply + quantity <= MAX_SUPPLY, "Mint/order exceeds supply" );
accessList[msg.sender] -= quantity;
for(uint i; i < quantity; ++i){
_mint( msg.sender, supply++ );
}
}
function mint( uint quantity ) external payable {
}
//delegated payable
function burnFrom( address owner, uint[] calldata tokenIds ) external payable onlyDelegates{
}
function mintTo(uint[] calldata quantity, address[] calldata recipient) external payable onlyDelegates{
}
//delegated nonpayable
function resurrect( uint[] calldata tokenIds, address[] calldata recipients ) external onlyDelegates{
}
function setAccessList(address[] calldata accounts, uint[] calldata quantities) external onlyDelegates{
}
function setActive(bool isPresaleActive_, bool isMintActive_) external onlyDelegates{
}
function setBaseURI(string calldata newPrefix, string calldata newSuffix) external onlyDelegates{
}
function setMax(uint maxOrder, uint maxSupply) external onlyDelegates{
}
function setPrice(uint presalePrice, uint mainsalePrice ) external onlyDelegates{
}
//owner
function addPayee(address account, uint256 shares_) external onlyOwner {
}
function setPayee( uint index, address account, uint newShares ) external onlyOwner {
}
//internal
function _burn(uint tokenId) internal override {
}
function _mint(address to, uint tokenId) internal override {
}
}
| accessList[msg.sender]>0,"Not authorized" | 43,619 | accessList[msg.sender]>0 |
"Mint/order exceeds supply" | pragma solidity ^0.8.0;
contract _goatgauds is Delegated, ERC721EnumerableLite, PaymentSplitterMod {
using Strings for uint;
uint public MAX_ORDER = 2;
uint public MAX_SUPPLY = 2222;
uint public MAINSALE_PRICE = 0.125 ether;
uint public PRESALE_PRICE = 0.1 ether;
bool public isMintActive = false;
bool public isPresaleActive = false;
mapping(address=>uint) public accessList;
string private _tokenURIPrefix = '';
string private _tokenURISuffix = '';
address[] private addressList = [
0xF5c774b504C1D82fb59e3B826555D67033A13b01,
0x7Cf39e8D6F6f9F25E925Dad7EB371276231780d7,
0xC02Dd50b25364e747410730A1df9B72A92C3C68B,
0x286777D6ad08EbE395C377078a17a32c21564a8a,
0x00eCb19318d98ff57173Ac8EdFb7a5D90ba2005d,
0x2E169A7c3D8EBeC11D5b43Dade06Ac29FEf59cb3,
0x693B22BB92727Fb2a9a4D7e1b1D65B3E8168B774
];
uint[] private shareList = [
5,
5,
5,
5,
30,
25,
25
];
constructor()
Delegated()
ERC721B("Goat Gauds", "GG", 0)
PaymentSplitterMod( addressList, shareList ){
}
//public view
fallback() external payable {}
function tokenURI(uint tokenId) external view override returns (string memory) {
}
//public payable
function presale( uint quantity ) external payable {
require( isPresaleActive, "Presale is not active" );
require( quantity <= MAX_ORDER, "Order too big" );
require( msg.value >= PRESALE_PRICE * quantity, "Ether sent is not correct" );
require( accessList[msg.sender] > 0, "Not authorized" );
uint supply = totalSupply();
require(<FILL_ME>)
accessList[msg.sender] -= quantity;
for(uint i; i < quantity; ++i){
_mint( msg.sender, supply++ );
}
}
function mint( uint quantity ) external payable {
}
//delegated payable
function burnFrom( address owner, uint[] calldata tokenIds ) external payable onlyDelegates{
}
function mintTo(uint[] calldata quantity, address[] calldata recipient) external payable onlyDelegates{
}
//delegated nonpayable
function resurrect( uint[] calldata tokenIds, address[] calldata recipients ) external onlyDelegates{
}
function setAccessList(address[] calldata accounts, uint[] calldata quantities) external onlyDelegates{
}
function setActive(bool isPresaleActive_, bool isMintActive_) external onlyDelegates{
}
function setBaseURI(string calldata newPrefix, string calldata newSuffix) external onlyDelegates{
}
function setMax(uint maxOrder, uint maxSupply) external onlyDelegates{
}
function setPrice(uint presalePrice, uint mainsalePrice ) external onlyDelegates{
}
//owner
function addPayee(address account, uint256 shares_) external onlyOwner {
}
function setPayee( uint index, address account, uint newShares ) external onlyOwner {
}
//internal
function _burn(uint tokenId) internal override {
}
function _mint(address to, uint tokenId) internal override {
}
}
| supply+quantity<=MAX_SUPPLY,"Mint/order exceeds supply" | 43,619 | supply+quantity<=MAX_SUPPLY |
"Burn for nonexistent token" | pragma solidity ^0.8.0;
contract _goatgauds is Delegated, ERC721EnumerableLite, PaymentSplitterMod {
using Strings for uint;
uint public MAX_ORDER = 2;
uint public MAX_SUPPLY = 2222;
uint public MAINSALE_PRICE = 0.125 ether;
uint public PRESALE_PRICE = 0.1 ether;
bool public isMintActive = false;
bool public isPresaleActive = false;
mapping(address=>uint) public accessList;
string private _tokenURIPrefix = '';
string private _tokenURISuffix = '';
address[] private addressList = [
0xF5c774b504C1D82fb59e3B826555D67033A13b01,
0x7Cf39e8D6F6f9F25E925Dad7EB371276231780d7,
0xC02Dd50b25364e747410730A1df9B72A92C3C68B,
0x286777D6ad08EbE395C377078a17a32c21564a8a,
0x00eCb19318d98ff57173Ac8EdFb7a5D90ba2005d,
0x2E169A7c3D8EBeC11D5b43Dade06Ac29FEf59cb3,
0x693B22BB92727Fb2a9a4D7e1b1D65B3E8168B774
];
uint[] private shareList = [
5,
5,
5,
5,
30,
25,
25
];
constructor()
Delegated()
ERC721B("Goat Gauds", "GG", 0)
PaymentSplitterMod( addressList, shareList ){
}
//public view
fallback() external payable {}
function tokenURI(uint tokenId) external view override returns (string memory) {
}
//public payable
function presale( uint quantity ) external payable {
}
function mint( uint quantity ) external payable {
}
//delegated payable
function burnFrom( address owner, uint[] calldata tokenIds ) external payable onlyDelegates{
for(uint i; i < tokenIds.length; ++i ){
require(<FILL_ME>)
require( _owners[ tokenIds[i] ] == owner, "Owner mismatch" );
_burn( tokenIds[i] );
}
}
function mintTo(uint[] calldata quantity, address[] calldata recipient) external payable onlyDelegates{
}
//delegated nonpayable
function resurrect( uint[] calldata tokenIds, address[] calldata recipients ) external onlyDelegates{
}
function setAccessList(address[] calldata accounts, uint[] calldata quantities) external onlyDelegates{
}
function setActive(bool isPresaleActive_, bool isMintActive_) external onlyDelegates{
}
function setBaseURI(string calldata newPrefix, string calldata newSuffix) external onlyDelegates{
}
function setMax(uint maxOrder, uint maxSupply) external onlyDelegates{
}
function setPrice(uint presalePrice, uint mainsalePrice ) external onlyDelegates{
}
//owner
function addPayee(address account, uint256 shares_) external onlyOwner {
}
function setPayee( uint index, address account, uint newShares ) external onlyOwner {
}
//internal
function _burn(uint tokenId) internal override {
}
function _mint(address to, uint tokenId) internal override {
}
}
| _exists(tokenIds[i]),"Burn for nonexistent token" | 43,619 | _exists(tokenIds[i]) |
"Owner mismatch" | pragma solidity ^0.8.0;
contract _goatgauds is Delegated, ERC721EnumerableLite, PaymentSplitterMod {
using Strings for uint;
uint public MAX_ORDER = 2;
uint public MAX_SUPPLY = 2222;
uint public MAINSALE_PRICE = 0.125 ether;
uint public PRESALE_PRICE = 0.1 ether;
bool public isMintActive = false;
bool public isPresaleActive = false;
mapping(address=>uint) public accessList;
string private _tokenURIPrefix = '';
string private _tokenURISuffix = '';
address[] private addressList = [
0xF5c774b504C1D82fb59e3B826555D67033A13b01,
0x7Cf39e8D6F6f9F25E925Dad7EB371276231780d7,
0xC02Dd50b25364e747410730A1df9B72A92C3C68B,
0x286777D6ad08EbE395C377078a17a32c21564a8a,
0x00eCb19318d98ff57173Ac8EdFb7a5D90ba2005d,
0x2E169A7c3D8EBeC11D5b43Dade06Ac29FEf59cb3,
0x693B22BB92727Fb2a9a4D7e1b1D65B3E8168B774
];
uint[] private shareList = [
5,
5,
5,
5,
30,
25,
25
];
constructor()
Delegated()
ERC721B("Goat Gauds", "GG", 0)
PaymentSplitterMod( addressList, shareList ){
}
//public view
fallback() external payable {}
function tokenURI(uint tokenId) external view override returns (string memory) {
}
//public payable
function presale( uint quantity ) external payable {
}
function mint( uint quantity ) external payable {
}
//delegated payable
function burnFrom( address owner, uint[] calldata tokenIds ) external payable onlyDelegates{
for(uint i; i < tokenIds.length; ++i ){
require( _exists( tokenIds[i] ), "Burn for nonexistent token" );
require(<FILL_ME>)
_burn( tokenIds[i] );
}
}
function mintTo(uint[] calldata quantity, address[] calldata recipient) external payable onlyDelegates{
}
//delegated nonpayable
function resurrect( uint[] calldata tokenIds, address[] calldata recipients ) external onlyDelegates{
}
function setAccessList(address[] calldata accounts, uint[] calldata quantities) external onlyDelegates{
}
function setActive(bool isPresaleActive_, bool isMintActive_) external onlyDelegates{
}
function setBaseURI(string calldata newPrefix, string calldata newSuffix) external onlyDelegates{
}
function setMax(uint maxOrder, uint maxSupply) external onlyDelegates{
}
function setPrice(uint presalePrice, uint mainsalePrice ) external onlyDelegates{
}
//owner
function addPayee(address account, uint256 shares_) external onlyOwner {
}
function setPayee( uint index, address account, uint newShares ) external onlyOwner {
}
//internal
function _burn(uint tokenId) internal override {
}
function _mint(address to, uint tokenId) internal override {
}
}
| _owners[tokenIds[i]]==owner,"Owner mismatch" | 43,619 | _owners[tokenIds[i]]==owner |
"Mint/order exceeds supply" | pragma solidity ^0.8.0;
contract _goatgauds is Delegated, ERC721EnumerableLite, PaymentSplitterMod {
using Strings for uint;
uint public MAX_ORDER = 2;
uint public MAX_SUPPLY = 2222;
uint public MAINSALE_PRICE = 0.125 ether;
uint public PRESALE_PRICE = 0.1 ether;
bool public isMintActive = false;
bool public isPresaleActive = false;
mapping(address=>uint) public accessList;
string private _tokenURIPrefix = '';
string private _tokenURISuffix = '';
address[] private addressList = [
0xF5c774b504C1D82fb59e3B826555D67033A13b01,
0x7Cf39e8D6F6f9F25E925Dad7EB371276231780d7,
0xC02Dd50b25364e747410730A1df9B72A92C3C68B,
0x286777D6ad08EbE395C377078a17a32c21564a8a,
0x00eCb19318d98ff57173Ac8EdFb7a5D90ba2005d,
0x2E169A7c3D8EBeC11D5b43Dade06Ac29FEf59cb3,
0x693B22BB92727Fb2a9a4D7e1b1D65B3E8168B774
];
uint[] private shareList = [
5,
5,
5,
5,
30,
25,
25
];
constructor()
Delegated()
ERC721B("Goat Gauds", "GG", 0)
PaymentSplitterMod( addressList, shareList ){
}
//public view
fallback() external payable {}
function tokenURI(uint tokenId) external view override returns (string memory) {
}
//public payable
function presale( uint quantity ) external payable {
}
function mint( uint quantity ) external payable {
}
//delegated payable
function burnFrom( address owner, uint[] calldata tokenIds ) external payable onlyDelegates{
}
function mintTo(uint[] calldata quantity, address[] calldata recipient) external payable onlyDelegates{
require(quantity.length == recipient.length, "Must provide equal quantities and recipients" );
uint totalQuantity;
uint supply = totalSupply();
for(uint i; i < quantity.length; ++i){
totalQuantity += quantity[i];
}
require(<FILL_ME>)
for(uint i; i < recipient.length; ++i){
for(uint j; j < quantity[i]; ++j){
_mint( recipient[i], supply++ );
}
}
}
//delegated nonpayable
function resurrect( uint[] calldata tokenIds, address[] calldata recipients ) external onlyDelegates{
}
function setAccessList(address[] calldata accounts, uint[] calldata quantities) external onlyDelegates{
}
function setActive(bool isPresaleActive_, bool isMintActive_) external onlyDelegates{
}
function setBaseURI(string calldata newPrefix, string calldata newSuffix) external onlyDelegates{
}
function setMax(uint maxOrder, uint maxSupply) external onlyDelegates{
}
function setPrice(uint presalePrice, uint mainsalePrice ) external onlyDelegates{
}
//owner
function addPayee(address account, uint256 shares_) external onlyOwner {
}
function setPayee( uint index, address account, uint newShares ) external onlyOwner {
}
//internal
function _burn(uint tokenId) internal override {
}
function _mint(address to, uint tokenId) internal override {
}
}
| supply+totalQuantity<=MAX_SUPPLY,"Mint/order exceeds supply" | 43,619 | supply+totalQuantity<=MAX_SUPPLY |
"Already minted" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./ERC721Tradable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./utils/IERC20.sol";
contract UniqGenerator is ERC721Tradable{
// ----- VARIABLES ----- //
uint256 internal _verificationPrice;
address internal _tokenForPaying;
string public METADATA_PROVENANCE_HASH;
uint256 public immutable ROYALTY_FEE;
string internal _token_uri;
mapping(bytes32 => bool) internal _isItemMinted;
mapping(uint256 => bytes32) internal _hashOf;
mapping(bytes32 => address) internal _verificationRequester;
uint256 internal _tokenNumber;
address internal _claimingAddress;
// ----- MODIFIERS ----- //
modifier notZeroAddress(address a) {
}
constructor(
address _proxyRegistryAddress,
string memory _name,
string memory _symbol,
uint256 _verfifyPrice,
address _tokenERC20,
string memory _ttokenUri
)
notZeroAddress(_proxyRegistryAddress)
ERC721Tradable(_name, _symbol, _proxyRegistryAddress)
{
}
function getMessageHash(address _requester, bytes32 _itemHash)
public
pure
returns (bytes32)
{
}
function burn(uint256 _tokenId) external {
}
function getEthSignedMessageHash(bytes32 _messageHash)
internal
pure
returns (bytes32)
{
}
function verifySignature(
address _requester,
bytes32 _itemHash,
bytes memory _signature
) internal view returns (bool) {
}
function recoverSigner(
bytes32 _ethSignedMessageHash,
bytes memory _signature
) internal pure returns (address) {
}
function isMintedForHash(bytes32 _itemHash) external view returns (bool) {
}
function hashOf(uint256 _id) external view returns (bytes32) {
}
function royaltyInfo(uint256)
external
view
returns (address receiver, uint256 amount)
{
}
function tokensOfOwner(address _owner)
external
view
returns (uint256[] memory)
{
}
function verificationRequester(bytes32 _itemHash)
external
view
returns (address)
{
}
function getClaimerAddress() external view returns (address) {
}
function getVerificationPrice() external view returns (uint256) {
}
function baseTokenURI() override public view returns (string memory) {
}
function contractURI() public pure returns (string memory) {
}
// ----- PUBLIC METHODS ----- //
function payForVerification(bytes32 _itemHash) external {
require(<FILL_ME>)
require(
_verificationRequester[_itemHash] == address(0),
"Verification already requested"
);
require(
IERC20(_tokenForPaying).transferFrom(
msg.sender,
address(this),
_verificationPrice
)
);
_verificationRequester[_itemHash] = msg.sender;
}
function mintVerified(bytes32 _itemHash, bytes memory _signature) external {
}
// ----- OWNERS METHODS ----- //
function setProvenanceHash(string memory _hash) external onlyOwner {
}
function editTokenUri(string memory _ttokenUri) external onlyOwner{
}
function setTokenAddress(address _newAddress) external onlyOwner {
}
function editVireficationPrice(uint256 _newPrice) external onlyOwner {
}
function editClaimingAdress(address _newAddress) external onlyOwner {
}
function recoverERC20(address token) external onlyOwner {
}
function receivedRoyalties(
address,
address _buyer,
uint256 _tokenId,
address _tokenPaid,
uint256 _amount
) external {
}
event ReceivedRoyalties(
address indexed _royaltyRecipient,
address indexed _buyer,
uint256 indexed _tokenId,
address _tokenPaid,
uint256 _amount
);
}
interface Ierc20 {
function transfer(address, uint256) external;
}
| !_isItemMinted[_itemHash],"Already minted" | 43,643 | !_isItemMinted[_itemHash] |
"Verification already requested" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./ERC721Tradable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./utils/IERC20.sol";
contract UniqGenerator is ERC721Tradable{
// ----- VARIABLES ----- //
uint256 internal _verificationPrice;
address internal _tokenForPaying;
string public METADATA_PROVENANCE_HASH;
uint256 public immutable ROYALTY_FEE;
string internal _token_uri;
mapping(bytes32 => bool) internal _isItemMinted;
mapping(uint256 => bytes32) internal _hashOf;
mapping(bytes32 => address) internal _verificationRequester;
uint256 internal _tokenNumber;
address internal _claimingAddress;
// ----- MODIFIERS ----- //
modifier notZeroAddress(address a) {
}
constructor(
address _proxyRegistryAddress,
string memory _name,
string memory _symbol,
uint256 _verfifyPrice,
address _tokenERC20,
string memory _ttokenUri
)
notZeroAddress(_proxyRegistryAddress)
ERC721Tradable(_name, _symbol, _proxyRegistryAddress)
{
}
function getMessageHash(address _requester, bytes32 _itemHash)
public
pure
returns (bytes32)
{
}
function burn(uint256 _tokenId) external {
}
function getEthSignedMessageHash(bytes32 _messageHash)
internal
pure
returns (bytes32)
{
}
function verifySignature(
address _requester,
bytes32 _itemHash,
bytes memory _signature
) internal view returns (bool) {
}
function recoverSigner(
bytes32 _ethSignedMessageHash,
bytes memory _signature
) internal pure returns (address) {
}
function isMintedForHash(bytes32 _itemHash) external view returns (bool) {
}
function hashOf(uint256 _id) external view returns (bytes32) {
}
function royaltyInfo(uint256)
external
view
returns (address receiver, uint256 amount)
{
}
function tokensOfOwner(address _owner)
external
view
returns (uint256[] memory)
{
}
function verificationRequester(bytes32 _itemHash)
external
view
returns (address)
{
}
function getClaimerAddress() external view returns (address) {
}
function getVerificationPrice() external view returns (uint256) {
}
function baseTokenURI() override public view returns (string memory) {
}
function contractURI() public pure returns (string memory) {
}
// ----- PUBLIC METHODS ----- //
function payForVerification(bytes32 _itemHash) external {
require(!_isItemMinted[_itemHash], "Already minted");
require(<FILL_ME>)
require(
IERC20(_tokenForPaying).transferFrom(
msg.sender,
address(this),
_verificationPrice
)
);
_verificationRequester[_itemHash] = msg.sender;
}
function mintVerified(bytes32 _itemHash, bytes memory _signature) external {
}
// ----- OWNERS METHODS ----- //
function setProvenanceHash(string memory _hash) external onlyOwner {
}
function editTokenUri(string memory _ttokenUri) external onlyOwner{
}
function setTokenAddress(address _newAddress) external onlyOwner {
}
function editVireficationPrice(uint256 _newPrice) external onlyOwner {
}
function editClaimingAdress(address _newAddress) external onlyOwner {
}
function recoverERC20(address token) external onlyOwner {
}
function receivedRoyalties(
address,
address _buyer,
uint256 _tokenId,
address _tokenPaid,
uint256 _amount
) external {
}
event ReceivedRoyalties(
address indexed _royaltyRecipient,
address indexed _buyer,
uint256 indexed _tokenId,
address _tokenPaid,
uint256 _amount
);
}
interface Ierc20 {
function transfer(address, uint256) external;
}
| _verificationRequester[_itemHash]==address(0),"Verification already requested" | 43,643 | _verificationRequester[_itemHash]==address(0) |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./ERC721Tradable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./utils/IERC20.sol";
contract UniqGenerator is ERC721Tradable{
// ----- VARIABLES ----- //
uint256 internal _verificationPrice;
address internal _tokenForPaying;
string public METADATA_PROVENANCE_HASH;
uint256 public immutable ROYALTY_FEE;
string internal _token_uri;
mapping(bytes32 => bool) internal _isItemMinted;
mapping(uint256 => bytes32) internal _hashOf;
mapping(bytes32 => address) internal _verificationRequester;
uint256 internal _tokenNumber;
address internal _claimingAddress;
// ----- MODIFIERS ----- //
modifier notZeroAddress(address a) {
}
constructor(
address _proxyRegistryAddress,
string memory _name,
string memory _symbol,
uint256 _verfifyPrice,
address _tokenERC20,
string memory _ttokenUri
)
notZeroAddress(_proxyRegistryAddress)
ERC721Tradable(_name, _symbol, _proxyRegistryAddress)
{
}
function getMessageHash(address _requester, bytes32 _itemHash)
public
pure
returns (bytes32)
{
}
function burn(uint256 _tokenId) external {
}
function getEthSignedMessageHash(bytes32 _messageHash)
internal
pure
returns (bytes32)
{
}
function verifySignature(
address _requester,
bytes32 _itemHash,
bytes memory _signature
) internal view returns (bool) {
}
function recoverSigner(
bytes32 _ethSignedMessageHash,
bytes memory _signature
) internal pure returns (address) {
}
function isMintedForHash(bytes32 _itemHash) external view returns (bool) {
}
function hashOf(uint256 _id) external view returns (bytes32) {
}
function royaltyInfo(uint256)
external
view
returns (address receiver, uint256 amount)
{
}
function tokensOfOwner(address _owner)
external
view
returns (uint256[] memory)
{
}
function verificationRequester(bytes32 _itemHash)
external
view
returns (address)
{
}
function getClaimerAddress() external view returns (address) {
}
function getVerificationPrice() external view returns (uint256) {
}
function baseTokenURI() override public view returns (string memory) {
}
function contractURI() public pure returns (string memory) {
}
// ----- PUBLIC METHODS ----- //
function payForVerification(bytes32 _itemHash) external {
require(!_isItemMinted[_itemHash], "Already minted");
require(
_verificationRequester[_itemHash] == address(0),
"Verification already requested"
);
require(<FILL_ME>)
_verificationRequester[_itemHash] = msg.sender;
}
function mintVerified(bytes32 _itemHash, bytes memory _signature) external {
}
// ----- OWNERS METHODS ----- //
function setProvenanceHash(string memory _hash) external onlyOwner {
}
function editTokenUri(string memory _ttokenUri) external onlyOwner{
}
function setTokenAddress(address _newAddress) external onlyOwner {
}
function editVireficationPrice(uint256 _newPrice) external onlyOwner {
}
function editClaimingAdress(address _newAddress) external onlyOwner {
}
function recoverERC20(address token) external onlyOwner {
}
function receivedRoyalties(
address,
address _buyer,
uint256 _tokenId,
address _tokenPaid,
uint256 _amount
) external {
}
event ReceivedRoyalties(
address indexed _royaltyRecipient,
address indexed _buyer,
uint256 indexed _tokenId,
address _tokenPaid,
uint256 _amount
);
}
interface Ierc20 {
function transfer(address, uint256) external;
}
| IERC20(_tokenForPaying).transferFrom(msg.sender,address(this),_verificationPrice) | 43,643 | IERC20(_tokenForPaying).transferFrom(msg.sender,address(this),_verificationPrice) |
"Verification Requester mismatch" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./ERC721Tradable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./utils/IERC20.sol";
contract UniqGenerator is ERC721Tradable{
// ----- VARIABLES ----- //
uint256 internal _verificationPrice;
address internal _tokenForPaying;
string public METADATA_PROVENANCE_HASH;
uint256 public immutable ROYALTY_FEE;
string internal _token_uri;
mapping(bytes32 => bool) internal _isItemMinted;
mapping(uint256 => bytes32) internal _hashOf;
mapping(bytes32 => address) internal _verificationRequester;
uint256 internal _tokenNumber;
address internal _claimingAddress;
// ----- MODIFIERS ----- //
modifier notZeroAddress(address a) {
}
constructor(
address _proxyRegistryAddress,
string memory _name,
string memory _symbol,
uint256 _verfifyPrice,
address _tokenERC20,
string memory _ttokenUri
)
notZeroAddress(_proxyRegistryAddress)
ERC721Tradable(_name, _symbol, _proxyRegistryAddress)
{
}
function getMessageHash(address _requester, bytes32 _itemHash)
public
pure
returns (bytes32)
{
}
function burn(uint256 _tokenId) external {
}
function getEthSignedMessageHash(bytes32 _messageHash)
internal
pure
returns (bytes32)
{
}
function verifySignature(
address _requester,
bytes32 _itemHash,
bytes memory _signature
) internal view returns (bool) {
}
function recoverSigner(
bytes32 _ethSignedMessageHash,
bytes memory _signature
) internal pure returns (address) {
}
function isMintedForHash(bytes32 _itemHash) external view returns (bool) {
}
function hashOf(uint256 _id) external view returns (bytes32) {
}
function royaltyInfo(uint256)
external
view
returns (address receiver, uint256 amount)
{
}
function tokensOfOwner(address _owner)
external
view
returns (uint256[] memory)
{
}
function verificationRequester(bytes32 _itemHash)
external
view
returns (address)
{
}
function getClaimerAddress() external view returns (address) {
}
function getVerificationPrice() external view returns (uint256) {
}
function baseTokenURI() override public view returns (string memory) {
}
function contractURI() public pure returns (string memory) {
}
// ----- PUBLIC METHODS ----- //
function payForVerification(bytes32 _itemHash) external {
}
function mintVerified(bytes32 _itemHash, bytes memory _signature) external {
require(<FILL_ME>)
require(!_isItemMinted[_itemHash], "Already minted");
require(
verifySignature(msg.sender, _itemHash, _signature),
"Signature mismatch"
);
_isItemMinted[_itemHash] = true;
_safeMint(msg.sender, _tokenNumber);
_hashOf[_tokenNumber] = _itemHash;
_tokenNumber++;
}
// ----- OWNERS METHODS ----- //
function setProvenanceHash(string memory _hash) external onlyOwner {
}
function editTokenUri(string memory _ttokenUri) external onlyOwner{
}
function setTokenAddress(address _newAddress) external onlyOwner {
}
function editVireficationPrice(uint256 _newPrice) external onlyOwner {
}
function editClaimingAdress(address _newAddress) external onlyOwner {
}
function recoverERC20(address token) external onlyOwner {
}
function receivedRoyalties(
address,
address _buyer,
uint256 _tokenId,
address _tokenPaid,
uint256 _amount
) external {
}
event ReceivedRoyalties(
address indexed _royaltyRecipient,
address indexed _buyer,
uint256 indexed _tokenId,
address _tokenPaid,
uint256 _amount
);
}
interface Ierc20 {
function transfer(address, uint256) external;
}
| _verificationRequester[_itemHash]==msg.sender,"Verification Requester mismatch" | 43,643 | _verificationRequester[_itemHash]==msg.sender |
"Signature mismatch" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./ERC721Tradable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./utils/IERC20.sol";
contract UniqGenerator is ERC721Tradable{
// ----- VARIABLES ----- //
uint256 internal _verificationPrice;
address internal _tokenForPaying;
string public METADATA_PROVENANCE_HASH;
uint256 public immutable ROYALTY_FEE;
string internal _token_uri;
mapping(bytes32 => bool) internal _isItemMinted;
mapping(uint256 => bytes32) internal _hashOf;
mapping(bytes32 => address) internal _verificationRequester;
uint256 internal _tokenNumber;
address internal _claimingAddress;
// ----- MODIFIERS ----- //
modifier notZeroAddress(address a) {
}
constructor(
address _proxyRegistryAddress,
string memory _name,
string memory _symbol,
uint256 _verfifyPrice,
address _tokenERC20,
string memory _ttokenUri
)
notZeroAddress(_proxyRegistryAddress)
ERC721Tradable(_name, _symbol, _proxyRegistryAddress)
{
}
function getMessageHash(address _requester, bytes32 _itemHash)
public
pure
returns (bytes32)
{
}
function burn(uint256 _tokenId) external {
}
function getEthSignedMessageHash(bytes32 _messageHash)
internal
pure
returns (bytes32)
{
}
function verifySignature(
address _requester,
bytes32 _itemHash,
bytes memory _signature
) internal view returns (bool) {
}
function recoverSigner(
bytes32 _ethSignedMessageHash,
bytes memory _signature
) internal pure returns (address) {
}
function isMintedForHash(bytes32 _itemHash) external view returns (bool) {
}
function hashOf(uint256 _id) external view returns (bytes32) {
}
function royaltyInfo(uint256)
external
view
returns (address receiver, uint256 amount)
{
}
function tokensOfOwner(address _owner)
external
view
returns (uint256[] memory)
{
}
function verificationRequester(bytes32 _itemHash)
external
view
returns (address)
{
}
function getClaimerAddress() external view returns (address) {
}
function getVerificationPrice() external view returns (uint256) {
}
function baseTokenURI() override public view returns (string memory) {
}
function contractURI() public pure returns (string memory) {
}
// ----- PUBLIC METHODS ----- //
function payForVerification(bytes32 _itemHash) external {
}
function mintVerified(bytes32 _itemHash, bytes memory _signature) external {
require(
_verificationRequester[_itemHash] == msg.sender,
"Verification Requester mismatch"
);
require(!_isItemMinted[_itemHash], "Already minted");
require(<FILL_ME>)
_isItemMinted[_itemHash] = true;
_safeMint(msg.sender, _tokenNumber);
_hashOf[_tokenNumber] = _itemHash;
_tokenNumber++;
}
// ----- OWNERS METHODS ----- //
function setProvenanceHash(string memory _hash) external onlyOwner {
}
function editTokenUri(string memory _ttokenUri) external onlyOwner{
}
function setTokenAddress(address _newAddress) external onlyOwner {
}
function editVireficationPrice(uint256 _newPrice) external onlyOwner {
}
function editClaimingAdress(address _newAddress) external onlyOwner {
}
function recoverERC20(address token) external onlyOwner {
}
function receivedRoyalties(
address,
address _buyer,
uint256 _tokenId,
address _tokenPaid,
uint256 _amount
) external {
}
event ReceivedRoyalties(
address indexed _royaltyRecipient,
address indexed _buyer,
uint256 indexed _tokenId,
address _tokenPaid,
uint256 _amount
);
}
interface Ierc20 {
function transfer(address, uint256) external;
}
| verifySignature(msg.sender,_itemHash,_signature),"Signature mismatch" | 43,643 | verifySignature(msg.sender,_itemHash,_signature) |
"Proposal not finished" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.1;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
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 Genesis_Voting is Ownable {
struct proposal {
uint256 votes_for;
uint256 votes_against;
uint256 opens;
uint256 expires;
bool valid_vote;
}
mapping(address => mapping(uint16 => bool)) public user_votes;
mapping(uint16 => proposal) public proposals;
address public token_address;
uint16 public total_proposals;
constructor(address _token_address) {
}
event Proposal_Created(uint16 indexed proposal_id, string url, uint256 opens, uint256 expires);
event Token_Address_Changed(address token_address);
event Vote_Cast(uint16 indexed proposal_id, address indexed user, uint256 user_balance);
function create_proposal(string calldata url, uint256 opens, uint256 expires) public onlyOwner {
}
function get_proposal_result(uint16 proposal_id) public view returns (bool) {
require(<FILL_ME>)
require(proposals[proposal_id].valid_vote, "Insufficient participation");
return proposals[proposal_id].votes_for > proposals[proposal_id].votes_against;
}
function vote(uint16 proposal_id, bool vote_choice) public {
}
function update_token_address(address _token_address) onlyOwner public {
}
}
/**
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMWEMMMMMMMMMMMMMMMMMMMMMMMMMM...............MMMMMMMMMMMMM
MMMMMMLOVEMMMMMMMMMMMMMMMMMMMMMM...............MMMMMMMMMMMMM
MMMMMMMMMMHIXELMMMMMMMMMMMM....................MMMMMNNMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMM....................MMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMM88=........................+MMMMMMMMMM
MMMMMMMMMMMMMMMMM....................MMMMM...MMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMM....................MMMMM...MMMMMMMMMMMMMMM
MMMMMMMMMMMM.........................MM+..MMM....+MMMMMMMMMM
MMMMMMMMMNMM...................... ..MM?..MMM.. .+MMMMMMMMMM
MMMMNDDMM+........................+MM........MM..+MMMMMMMMMM
MMMMZ.............................+MM....................MMM
MMMMZ.............................+MM....................MMM
MMMMZ.............................+MM....................DDD
MMMMZ.............................+MM..ZMMMMMMMMMMMMMMMMMMMM
MMMMZ.............................+MM..ZMMMMMMMMMMMMMMMMMMMM
MM..............................MMZ....ZMMMMMMMMMMMMMMMMMMMM
MM............................MM.......ZMMMMMMMMMMMMMMMMMMMM
MM............................MM.......ZMMMMMMMMMMMMMMMMMMMM
MM......................ZMMMMM.......MMMMMMMMMMMMMMMMMMMMMMM
MM............... ......ZMMMMM.... ..MMMMMMMMMMMMMMMMMMMMMMM
MM...............MMMMM88~.........+MM..ZMMMMMMMMMMMMMMMMMMMM
MM.......$DDDDDDD.......$DDDDD..DDNMM..ZMMMMMMMMMMMMMMMMMMMM
MM.......$DDDDDDD.......$DDDDD..DDNMM..ZMMMMMMMMMMMMMMMMMMMM
MM.......ZMMMMMMM.......ZMMMMM..MMMMM..ZMMMMMMMMMMMMMMMMMMMM
MMMMMMMMM+.......MMMMM88NMMMMM..MMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMM+.......MMMMM88NMMMMM..MMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM*/
| proposals[proposal_id].expires<block.timestamp,"Proposal not finished" | 43,964 | proposals[proposal_id].expires<block.timestamp |
"Insufficient participation" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.1;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
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 Genesis_Voting is Ownable {
struct proposal {
uint256 votes_for;
uint256 votes_against;
uint256 opens;
uint256 expires;
bool valid_vote;
}
mapping(address => mapping(uint16 => bool)) public user_votes;
mapping(uint16 => proposal) public proposals;
address public token_address;
uint16 public total_proposals;
constructor(address _token_address) {
}
event Proposal_Created(uint16 indexed proposal_id, string url, uint256 opens, uint256 expires);
event Token_Address_Changed(address token_address);
event Vote_Cast(uint16 indexed proposal_id, address indexed user, uint256 user_balance);
function create_proposal(string calldata url, uint256 opens, uint256 expires) public onlyOwner {
}
function get_proposal_result(uint16 proposal_id) public view returns (bool) {
require(proposals[proposal_id].expires < block.timestamp, "Proposal not finished");
require(<FILL_ME>)
return proposals[proposal_id].votes_for > proposals[proposal_id].votes_against;
}
function vote(uint16 proposal_id, bool vote_choice) public {
}
function update_token_address(address _token_address) onlyOwner public {
}
}
/**
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMWEMMMMMMMMMMMMMMMMMMMMMMMMMM...............MMMMMMMMMMMMM
MMMMMMLOVEMMMMMMMMMMMMMMMMMMMMMM...............MMMMMMMMMMMMM
MMMMMMMMMMHIXELMMMMMMMMMMMM....................MMMMMNNMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMM....................MMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMM88=........................+MMMMMMMMMM
MMMMMMMMMMMMMMMMM....................MMMMM...MMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMM....................MMMMM...MMMMMMMMMMMMMMM
MMMMMMMMMMMM.........................MM+..MMM....+MMMMMMMMMM
MMMMMMMMMNMM...................... ..MM?..MMM.. .+MMMMMMMMMM
MMMMNDDMM+........................+MM........MM..+MMMMMMMMMM
MMMMZ.............................+MM....................MMM
MMMMZ.............................+MM....................MMM
MMMMZ.............................+MM....................DDD
MMMMZ.............................+MM..ZMMMMMMMMMMMMMMMMMMMM
MMMMZ.............................+MM..ZMMMMMMMMMMMMMMMMMMMM
MM..............................MMZ....ZMMMMMMMMMMMMMMMMMMMM
MM............................MM.......ZMMMMMMMMMMMMMMMMMMMM
MM............................MM.......ZMMMMMMMMMMMMMMMMMMMM
MM......................ZMMMMM.......MMMMMMMMMMMMMMMMMMMMMMM
MM............... ......ZMMMMM.... ..MMMMMMMMMMMMMMMMMMMMMMM
MM...............MMMMM88~.........+MM..ZMMMMMMMMMMMMMMMMMMMM
MM.......$DDDDDDD.......$DDDDD..DDNMM..ZMMMMMMMMMMMMMMMMMMMM
MM.......$DDDDDDD.......$DDDDD..DDNMM..ZMMMMMMMMMMMMMMMMMMMM
MM.......ZMMMMMMM.......ZMMMMM..MMMMM..ZMMMMMMMMMMMMMMMMMMMM
MMMMMMMMM+.......MMMMM88NMMMMM..MMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMM+.......MMMMM88NMMMMM..MMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM*/
| proposals[proposal_id].valid_vote,"Insufficient participation" | 43,964 | proposals[proposal_id].valid_vote |
"Proposal not started" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.1;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
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 Genesis_Voting is Ownable {
struct proposal {
uint256 votes_for;
uint256 votes_against;
uint256 opens;
uint256 expires;
bool valid_vote;
}
mapping(address => mapping(uint16 => bool)) public user_votes;
mapping(uint16 => proposal) public proposals;
address public token_address;
uint16 public total_proposals;
constructor(address _token_address) {
}
event Proposal_Created(uint16 indexed proposal_id, string url, uint256 opens, uint256 expires);
event Token_Address_Changed(address token_address);
event Vote_Cast(uint16 indexed proposal_id, address indexed user, uint256 user_balance);
function create_proposal(string calldata url, uint256 opens, uint256 expires) public onlyOwner {
}
function get_proposal_result(uint16 proposal_id) public view returns (bool) {
}
function vote(uint16 proposal_id, bool vote_choice) public {
uint256 user_balance = IERC20(token_address).balanceOf(msg.sender);
require(user_balance > 0, "User has no tokens");
require(<FILL_ME>)
require(proposals[proposal_id].expires > block.timestamp, "Proposal invalid or expired");
require(!user_votes[msg.sender][proposal_id], "User has already voted");
if(!proposals[proposal_id].valid_vote && proposals[proposal_id].votes_for + proposals[proposal_id].votes_against > 0){
// someone else already voted
proposals[proposal_id].valid_vote = true;
}
if(vote_choice) {
proposals[proposal_id].votes_for += user_balance;
} else {
proposals[proposal_id].votes_against += user_balance;
}
user_votes[msg.sender][proposal_id] = true;
emit Vote_Cast(proposal_id, msg.sender, user_balance);
}
function update_token_address(address _token_address) onlyOwner public {
}
}
/**
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMWEMMMMMMMMMMMMMMMMMMMMMMMMMM...............MMMMMMMMMMMMM
MMMMMMLOVEMMMMMMMMMMMMMMMMMMMMMM...............MMMMMMMMMMMMM
MMMMMMMMMMHIXELMMMMMMMMMMMM....................MMMMMNNMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMM....................MMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMM88=........................+MMMMMMMMMM
MMMMMMMMMMMMMMMMM....................MMMMM...MMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMM....................MMMMM...MMMMMMMMMMMMMMM
MMMMMMMMMMMM.........................MM+..MMM....+MMMMMMMMMM
MMMMMMMMMNMM...................... ..MM?..MMM.. .+MMMMMMMMMM
MMMMNDDMM+........................+MM........MM..+MMMMMMMMMM
MMMMZ.............................+MM....................MMM
MMMMZ.............................+MM....................MMM
MMMMZ.............................+MM....................DDD
MMMMZ.............................+MM..ZMMMMMMMMMMMMMMMMMMMM
MMMMZ.............................+MM..ZMMMMMMMMMMMMMMMMMMMM
MM..............................MMZ....ZMMMMMMMMMMMMMMMMMMMM
MM............................MM.......ZMMMMMMMMMMMMMMMMMMMM
MM............................MM.......ZMMMMMMMMMMMMMMMMMMMM
MM......................ZMMMMM.......MMMMMMMMMMMMMMMMMMMMMMM
MM............... ......ZMMMMM.... ..MMMMMMMMMMMMMMMMMMMMMMM
MM...............MMMMM88~.........+MM..ZMMMMMMMMMMMMMMMMMMMM
MM.......$DDDDDDD.......$DDDDD..DDNMM..ZMMMMMMMMMMMMMMMMMMMM
MM.......$DDDDDDD.......$DDDDD..DDNMM..ZMMMMMMMMMMMMMMMMMMMM
MM.......ZMMMMMMM.......ZMMMMM..MMMMM..ZMMMMMMMMMMMMMMMMMMMM
MMMMMMMMM+.......MMMMM88NMMMMM..MMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMM+.......MMMMM88NMMMMM..MMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM*/
| proposals[proposal_id].opens<block.timestamp,"Proposal not started" | 43,964 | proposals[proposal_id].opens<block.timestamp |
"Proposal invalid or expired" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.1;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
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 Genesis_Voting is Ownable {
struct proposal {
uint256 votes_for;
uint256 votes_against;
uint256 opens;
uint256 expires;
bool valid_vote;
}
mapping(address => mapping(uint16 => bool)) public user_votes;
mapping(uint16 => proposal) public proposals;
address public token_address;
uint16 public total_proposals;
constructor(address _token_address) {
}
event Proposal_Created(uint16 indexed proposal_id, string url, uint256 opens, uint256 expires);
event Token_Address_Changed(address token_address);
event Vote_Cast(uint16 indexed proposal_id, address indexed user, uint256 user_balance);
function create_proposal(string calldata url, uint256 opens, uint256 expires) public onlyOwner {
}
function get_proposal_result(uint16 proposal_id) public view returns (bool) {
}
function vote(uint16 proposal_id, bool vote_choice) public {
uint256 user_balance = IERC20(token_address).balanceOf(msg.sender);
require(user_balance > 0, "User has no tokens");
require(proposals[proposal_id].opens < block.timestamp, "Proposal not started");
require(<FILL_ME>)
require(!user_votes[msg.sender][proposal_id], "User has already voted");
if(!proposals[proposal_id].valid_vote && proposals[proposal_id].votes_for + proposals[proposal_id].votes_against > 0){
// someone else already voted
proposals[proposal_id].valid_vote = true;
}
if(vote_choice) {
proposals[proposal_id].votes_for += user_balance;
} else {
proposals[proposal_id].votes_against += user_balance;
}
user_votes[msg.sender][proposal_id] = true;
emit Vote_Cast(proposal_id, msg.sender, user_balance);
}
function update_token_address(address _token_address) onlyOwner public {
}
}
/**
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMWEMMMMMMMMMMMMMMMMMMMMMMMMMM...............MMMMMMMMMMMMM
MMMMMMLOVEMMMMMMMMMMMMMMMMMMMMMM...............MMMMMMMMMMMMM
MMMMMMMMMMHIXELMMMMMMMMMMMM....................MMMMMNNMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMM....................MMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMM88=........................+MMMMMMMMMM
MMMMMMMMMMMMMMMMM....................MMMMM...MMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMM....................MMMMM...MMMMMMMMMMMMMMM
MMMMMMMMMMMM.........................MM+..MMM....+MMMMMMMMMM
MMMMMMMMMNMM...................... ..MM?..MMM.. .+MMMMMMMMMM
MMMMNDDMM+........................+MM........MM..+MMMMMMMMMM
MMMMZ.............................+MM....................MMM
MMMMZ.............................+MM....................MMM
MMMMZ.............................+MM....................DDD
MMMMZ.............................+MM..ZMMMMMMMMMMMMMMMMMMMM
MMMMZ.............................+MM..ZMMMMMMMMMMMMMMMMMMMM
MM..............................MMZ....ZMMMMMMMMMMMMMMMMMMMM
MM............................MM.......ZMMMMMMMMMMMMMMMMMMMM
MM............................MM.......ZMMMMMMMMMMMMMMMMMMMM
MM......................ZMMMMM.......MMMMMMMMMMMMMMMMMMMMMMM
MM............... ......ZMMMMM.... ..MMMMMMMMMMMMMMMMMMMMMMM
MM...............MMMMM88~.........+MM..ZMMMMMMMMMMMMMMMMMMMM
MM.......$DDDDDDD.......$DDDDD..DDNMM..ZMMMMMMMMMMMMMMMMMMMM
MM.......$DDDDDDD.......$DDDDD..DDNMM..ZMMMMMMMMMMMMMMMMMMMM
MM.......ZMMMMMMM.......ZMMMMM..MMMMM..ZMMMMMMMMMMMMMMMMMMMM
MMMMMMMMM+.......MMMMM88NMMMMM..MMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMM+.......MMMMM88NMMMMM..MMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM*/
| proposals[proposal_id].expires>block.timestamp,"Proposal invalid or expired" | 43,964 | proposals[proposal_id].expires>block.timestamp |
"User has already voted" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.1;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
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 Genesis_Voting is Ownable {
struct proposal {
uint256 votes_for;
uint256 votes_against;
uint256 opens;
uint256 expires;
bool valid_vote;
}
mapping(address => mapping(uint16 => bool)) public user_votes;
mapping(uint16 => proposal) public proposals;
address public token_address;
uint16 public total_proposals;
constructor(address _token_address) {
}
event Proposal_Created(uint16 indexed proposal_id, string url, uint256 opens, uint256 expires);
event Token_Address_Changed(address token_address);
event Vote_Cast(uint16 indexed proposal_id, address indexed user, uint256 user_balance);
function create_proposal(string calldata url, uint256 opens, uint256 expires) public onlyOwner {
}
function get_proposal_result(uint16 proposal_id) public view returns (bool) {
}
function vote(uint16 proposal_id, bool vote_choice) public {
uint256 user_balance = IERC20(token_address).balanceOf(msg.sender);
require(user_balance > 0, "User has no tokens");
require(proposals[proposal_id].opens < block.timestamp, "Proposal not started");
require(proposals[proposal_id].expires > block.timestamp, "Proposal invalid or expired");
require(<FILL_ME>)
if(!proposals[proposal_id].valid_vote && proposals[proposal_id].votes_for + proposals[proposal_id].votes_against > 0){
// someone else already voted
proposals[proposal_id].valid_vote = true;
}
if(vote_choice) {
proposals[proposal_id].votes_for += user_balance;
} else {
proposals[proposal_id].votes_against += user_balance;
}
user_votes[msg.sender][proposal_id] = true;
emit Vote_Cast(proposal_id, msg.sender, user_balance);
}
function update_token_address(address _token_address) onlyOwner public {
}
}
/**
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMWEMMMMMMMMMMMMMMMMMMMMMMMMMM...............MMMMMMMMMMMMM
MMMMMMLOVEMMMMMMMMMMMMMMMMMMMMMM...............MMMMMMMMMMMMM
MMMMMMMMMMHIXELMMMMMMMMMMMM....................MMMMMNNMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMM....................MMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMM88=........................+MMMMMMMMMM
MMMMMMMMMMMMMMMMM....................MMMMM...MMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMM....................MMMMM...MMMMMMMMMMMMMMM
MMMMMMMMMMMM.........................MM+..MMM....+MMMMMMMMMM
MMMMMMMMMNMM...................... ..MM?..MMM.. .+MMMMMMMMMM
MMMMNDDMM+........................+MM........MM..+MMMMMMMMMM
MMMMZ.............................+MM....................MMM
MMMMZ.............................+MM....................MMM
MMMMZ.............................+MM....................DDD
MMMMZ.............................+MM..ZMMMMMMMMMMMMMMMMMMMM
MMMMZ.............................+MM..ZMMMMMMMMMMMMMMMMMMMM
MM..............................MMZ....ZMMMMMMMMMMMMMMMMMMMM
MM............................MM.......ZMMMMMMMMMMMMMMMMMMMM
MM............................MM.......ZMMMMMMMMMMMMMMMMMMMM
MM......................ZMMMMM.......MMMMMMMMMMMMMMMMMMMMMMM
MM............... ......ZMMMMM.... ..MMMMMMMMMMMMMMMMMMMMMMM
MM...............MMMMM88~.........+MM..ZMMMMMMMMMMMMMMMMMMMM
MM.......$DDDDDDD.......$DDDDD..DDNMM..ZMMMMMMMMMMMMMMMMMMMM
MM.......$DDDDDDD.......$DDDDD..DDNMM..ZMMMMMMMMMMMMMMMMMMMM
MM.......ZMMMMMMM.......ZMMMMM..MMMMM..ZMMMMMMMMMMMMMMMMMMMM
MMMMMMMMM+.......MMMMM88NMMMMM..MMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMM+.......MMMMM88NMMMMM..MMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM*/
| !user_votes[msg.sender][proposal_id],"User has already voted" | 43,964 | !user_votes[msg.sender][proposal_id] |
null | pragma solidity ^0.4.19;
contract ERC721 {
function approve(address to, uint256 tokenId) public;
function balanceOf(address owner) public view returns (uint256 balance);
function implementsERC721() public pure returns (bool);
function ownerOf(uint256 tokenId) public view returns (address addr);
function takeOwnership(uint256 tokenId) public;
function totalSupply() public view returns (uint256 total);
function transferFrom(address from, address to, uint256 tokenId) public;
function transfer(address to, uint256 tokenId) public;
event Transfer(address indexed from, address indexed to, uint256 tokenId);
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
function name() external view returns (string name);
function symbol() external view returns (string symbol);
function tokenURI(uint256 _tokenId) external view returns (string uri);
}
contract ExoplanetToken is ERC721 {
using SafeMath for uint256;
event Birth(uint256 indexed tokenId, string name, uint32 numOfTokensBonusOnPurchase, address owner);
event TokenSold(uint256 tokenId, uint256 oldPriceInEther, uint256 newPriceInEther, address prevOwner, address winner, string name);
event Transfer(address from, address to, uint256 tokenId);
event ContractUpgrade(address newContract);
string private constant CONTRACT_NAME = "ExoPlanets";
string private constant CONTRACT_SYMBOL = "XPL";
string public constant BASE_URL = "https://exoplanets.io/metadata/planet_";
uint32 private constant NUM_EXOPLANETS_LIMIT = 10000;
uint256 private constant STEP_1 = 5.0 ether;
uint256 private constant STEP_2 = 10.0 ether;
uint256 private constant STEP_3 = 26.0 ether;
uint256 private constant STEP_4 = 36.0 ether;
uint256 private constant STEP_5 = 47.0 ether;
uint256 private constant STEP_6 = 59.0 ether;
uint256 private constant STEP_7 = 67.85 ether;
uint256 private constant STEP_8 = 76.67 ether;
mapping (uint256 => address) public currentOwner;
mapping (address => uint256) private numOwnedTokens;
mapping (uint256 => address) public approvedToTransfer;
mapping (uint256 => uint256) private currentPrice;
address public ceoAddress;
address public cooAddress;
bool public inPresaleMode = true;
bool public paused = false;
bool public allowMigrate = true;
address public newContractAddress;
bool public _allowBuyDirect = false;
struct ExoplanetRec {
uint8 lifeRate;
bool canBePurchased;
uint32 priceInExoTokens;
uint32 numOfTokensBonusOnPurchase;
string name;
string nickname;
string cryptoMatch;
string techBonus1;
string techBonus2;
string techBonus3;
string scientificData;
}
ExoplanetRec[] private exoplanets;
address public marketplaceAddress;
modifier onlyCEO() {
}
modifier migrateAllowed() {
}
modifier whenNotPaused() {
}
modifier whenPaused() {
}
function turnMigrateOff() public onlyCEO() {
}
function pause() public onlyCEO() whenNotPaused() {
}
function unpause() public onlyCEO() whenPaused() {
}
modifier allowBuyDirect() {
}
function setBuyDirectMode(bool newMode, address newMarketplace) public onlyCEO {
}
function setPurchaseableMode(uint256 tokenId, bool _canBePurchased, uint256 _newPrice) public afterPresaleMode() {
require(<FILL_ME>)
exoplanets[tokenId].canBePurchased = _canBePurchased;
setPriceInEth(tokenId, _newPrice);
}
function getPurchaseableMode(uint256 tokenId) public view returns (bool) {
}
function setNewAddress(address _v2Address) public onlyCEO() whenPaused() {
}
modifier onlyCOO() {
}
modifier presaleModeActive() {
}
modifier afterPresaleMode() {
}
modifier onlyCLevel() {
}
function setCEO(address newCEO) public onlyCEO {
}
function setCOO(address newCOO) public onlyCEO {
}
function setPresaleMode(bool newMode) public onlyCEO {
}
/*** CONSTRUCTOR ***/
function ExoplanetToken() public {
}
function approve(address to, uint256 tokenId) public {
}
function balanceOf(address owner) public view returns (uint256 balance) {
}
function bytes32ToString(bytes32 x) private pure returns (string) {
}
function migrateSinglePlanet(
uint256 origTokenId, string name, uint256 priceInEther, uint32 priceInExoTokens,
string cryptoMatch, uint32 numOfTokensBonusOnPurchase,
uint8 lifeRate, string scientificData, address owner) public onlyCLevel migrateAllowed {
}
function _migrateExoplanet(
uint256 origTokenId, string name, uint256 priceInEther, uint32 priceInExoTokens,
string cryptoMatch, uint32 numOfTokensBonusOnPurchase, uint8 lifeRate,
string scientificData, address owner) private {
}
function createContractExoplanet(
string name, uint256 priceInEther, uint32 priceInExoTokens,
string cryptoMatch, uint32 numOfTokensBonusOnPurchase,
uint8 lifeRate, string scientificData) public onlyCLevel returns (uint256) {
}
function _createExoplanet(
string name, address owner, uint256 priceInEther, uint32 priceInExoTokens,
string cryptoMatch, uint32 numOfTokensBonusOnPurchase, uint8 lifeRate,
string scientificData) private returns (uint256) {
}
function unownedPlanet(uint256 tokenId) private view returns (bool) {
}
function getPlanetName(uint256 tokenId) public view returns (string) {
}
function getNickname(uint256 tokenId) public view returns (string) {
}
function getPriceInExoTokens(uint256 tokenId) public view returns (uint32) {
}
function getLifeRate(uint256 tokenId) public view returns (uint8) {
}
function getNumOfTokensBonusOnPurchase(uint256 tokenId) public view returns (uint32) {
}
function getCryptoMatch(uint256 tokenId) public view returns (string) {
}
function getTechBonus1(uint256 tokenId) public view returns (string) {
}
function getTechBonus2(uint256 tokenId) public view returns (string) {
}
function getTechBonus3(uint256 tokenId) public view returns (string) {
}
function getScientificData(uint256 tokenId) public view returns (string) {
}
function setTechBonus1(uint256 tokenId, string newVal) public {
}
function setTechBonus2(uint256 tokenId, string newVal) public {
}
function setTechBonus3(uint256 tokenId, string newVal) public {
}
function setPriceInEth(uint256 tokenId, uint256 newPrice) public afterPresaleMode() {
}
function setUnownedPriceInEth(uint256 tokenId, uint256 newPrice) public onlyCLevel {
}
function setUnownedPurchaseableMode(uint256 tokenId, bool _canBePurchased) public onlyCLevel {
}
function setPriceInExoTokens(uint256 tokenId, uint32 newPrice) public afterPresaleMode() {
}
function setUnownedPriceInExoTokens(uint256 tokenId, uint32 newPrice) public onlyCLevel {
}
function setScientificData(uint256 tokenId, string newData) public onlyCLevel {
}
function setUnownedName(uint256 tokenId, string newData) public onlyCLevel {
}
function setUnownedNickname(uint256 tokenId, string newData) public onlyCLevel {
}
function setCryptoMatchValue(uint256 tokenId, string newData) public onlyCLevel {
}
function setUnownedNumOfExoTokensBonus(uint256 tokenId, uint32 newData) public onlyCLevel {
}
function setUnownedLifeRate(uint256 tokenId, uint8 newData) public onlyCLevel {
}
function getExoplanet(uint256 tokenId) public view returns (
uint8 lifeRate,
bool canBePurchased,
uint32 priceInExoTokens,
uint32 numOfTokensBonusOnPurchase,
string name,
string nickname,
string cryptoMatch,
string scientificData,
uint256 sellingPriceInEther,
address owner) {
}
function implementsERC721() public pure returns (bool) {
}
function ownerOf(uint256 tokenId) public view returns (address owner) {
}
function transferUnownedPlanet(address newOwner, uint256 tokenId) public onlyCLevel {
}
function purchase(uint256 tokenId) public payable whenNotPaused() presaleModeActive() {
}
function buyDirectInMarketplace(uint256 tokenId) public payable
whenNotPaused() afterPresaleMode() allowBuyDirect() {
}
function priceOf(uint256 tokenId) public view returns (uint256) {
}
function takeOwnership(uint256 tokenId) public whenNotPaused() {
}
function tokensOfOwner(address owner) public view returns(uint256[] ownerTokens) {
}
function name() external view returns (string name) {
}
function symbol() external view returns (string symbol) {
}
function tokenURI(uint256 _tokenId) external view returns (string uri) {
}
function totalSupply() public view returns (uint256 total) {
}
function transfer(address to, uint256 tokenId) public whenNotPaused() {
}
function transferFrom(address from, address to, uint256 tokenId) public whenNotPaused() {
}
function addressNotNull(address addr) private pure returns (bool) {
}
function approved(address to, uint256 tokenId) private view returns (bool) {
}
function owns(address claimant, uint256 tokenId) private view returns (bool) {
}
function payout() public onlyCLevel {
}
function payoutPartial(uint256 amount) public onlyCLevel {
}
function _transfer(address from, address to, uint256 tokenId) private {
}
function appendNumToString(string baseUrl, uint256 tokenId) private pure returns (string) {
}
function numToString(uint256 tokenId) private pure returns (string str) {
}
function uintToBytes32(uint v) private pure returns (bytes32 ret) {
}
}
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) {
}
}
| owns(msg.sender,tokenId) | 44,073 | owns(msg.sender,tokenId) |
null | pragma solidity ^0.4.19;
contract ERC721 {
function approve(address to, uint256 tokenId) public;
function balanceOf(address owner) public view returns (uint256 balance);
function implementsERC721() public pure returns (bool);
function ownerOf(uint256 tokenId) public view returns (address addr);
function takeOwnership(uint256 tokenId) public;
function totalSupply() public view returns (uint256 total);
function transferFrom(address from, address to, uint256 tokenId) public;
function transfer(address to, uint256 tokenId) public;
event Transfer(address indexed from, address indexed to, uint256 tokenId);
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
function name() external view returns (string name);
function symbol() external view returns (string symbol);
function tokenURI(uint256 _tokenId) external view returns (string uri);
}
contract ExoplanetToken is ERC721 {
using SafeMath for uint256;
event Birth(uint256 indexed tokenId, string name, uint32 numOfTokensBonusOnPurchase, address owner);
event TokenSold(uint256 tokenId, uint256 oldPriceInEther, uint256 newPriceInEther, address prevOwner, address winner, string name);
event Transfer(address from, address to, uint256 tokenId);
event ContractUpgrade(address newContract);
string private constant CONTRACT_NAME = "ExoPlanets";
string private constant CONTRACT_SYMBOL = "XPL";
string public constant BASE_URL = "https://exoplanets.io/metadata/planet_";
uint32 private constant NUM_EXOPLANETS_LIMIT = 10000;
uint256 private constant STEP_1 = 5.0 ether;
uint256 private constant STEP_2 = 10.0 ether;
uint256 private constant STEP_3 = 26.0 ether;
uint256 private constant STEP_4 = 36.0 ether;
uint256 private constant STEP_5 = 47.0 ether;
uint256 private constant STEP_6 = 59.0 ether;
uint256 private constant STEP_7 = 67.85 ether;
uint256 private constant STEP_8 = 76.67 ether;
mapping (uint256 => address) public currentOwner;
mapping (address => uint256) private numOwnedTokens;
mapping (uint256 => address) public approvedToTransfer;
mapping (uint256 => uint256) private currentPrice;
address public ceoAddress;
address public cooAddress;
bool public inPresaleMode = true;
bool public paused = false;
bool public allowMigrate = true;
address public newContractAddress;
bool public _allowBuyDirect = false;
struct ExoplanetRec {
uint8 lifeRate;
bool canBePurchased;
uint32 priceInExoTokens;
uint32 numOfTokensBonusOnPurchase;
string name;
string nickname;
string cryptoMatch;
string techBonus1;
string techBonus2;
string techBonus3;
string scientificData;
}
ExoplanetRec[] private exoplanets;
address public marketplaceAddress;
modifier onlyCEO() {
}
modifier migrateAllowed() {
}
modifier whenNotPaused() {
}
modifier whenPaused() {
}
function turnMigrateOff() public onlyCEO() {
}
function pause() public onlyCEO() whenNotPaused() {
}
function unpause() public onlyCEO() whenPaused() {
}
modifier allowBuyDirect() {
}
function setBuyDirectMode(bool newMode, address newMarketplace) public onlyCEO {
}
function setPurchaseableMode(uint256 tokenId, bool _canBePurchased, uint256 _newPrice) public afterPresaleMode() {
}
function getPurchaseableMode(uint256 tokenId) public view returns (bool) {
}
function setNewAddress(address _v2Address) public onlyCEO() whenPaused() {
}
modifier onlyCOO() {
}
modifier presaleModeActive() {
}
modifier afterPresaleMode() {
require(<FILL_ME>)
_;
}
modifier onlyCLevel() {
}
function setCEO(address newCEO) public onlyCEO {
}
function setCOO(address newCOO) public onlyCEO {
}
function setPresaleMode(bool newMode) public onlyCEO {
}
/*** CONSTRUCTOR ***/
function ExoplanetToken() public {
}
function approve(address to, uint256 tokenId) public {
}
function balanceOf(address owner) public view returns (uint256 balance) {
}
function bytes32ToString(bytes32 x) private pure returns (string) {
}
function migrateSinglePlanet(
uint256 origTokenId, string name, uint256 priceInEther, uint32 priceInExoTokens,
string cryptoMatch, uint32 numOfTokensBonusOnPurchase,
uint8 lifeRate, string scientificData, address owner) public onlyCLevel migrateAllowed {
}
function _migrateExoplanet(
uint256 origTokenId, string name, uint256 priceInEther, uint32 priceInExoTokens,
string cryptoMatch, uint32 numOfTokensBonusOnPurchase, uint8 lifeRate,
string scientificData, address owner) private {
}
function createContractExoplanet(
string name, uint256 priceInEther, uint32 priceInExoTokens,
string cryptoMatch, uint32 numOfTokensBonusOnPurchase,
uint8 lifeRate, string scientificData) public onlyCLevel returns (uint256) {
}
function _createExoplanet(
string name, address owner, uint256 priceInEther, uint32 priceInExoTokens,
string cryptoMatch, uint32 numOfTokensBonusOnPurchase, uint8 lifeRate,
string scientificData) private returns (uint256) {
}
function unownedPlanet(uint256 tokenId) private view returns (bool) {
}
function getPlanetName(uint256 tokenId) public view returns (string) {
}
function getNickname(uint256 tokenId) public view returns (string) {
}
function getPriceInExoTokens(uint256 tokenId) public view returns (uint32) {
}
function getLifeRate(uint256 tokenId) public view returns (uint8) {
}
function getNumOfTokensBonusOnPurchase(uint256 tokenId) public view returns (uint32) {
}
function getCryptoMatch(uint256 tokenId) public view returns (string) {
}
function getTechBonus1(uint256 tokenId) public view returns (string) {
}
function getTechBonus2(uint256 tokenId) public view returns (string) {
}
function getTechBonus3(uint256 tokenId) public view returns (string) {
}
function getScientificData(uint256 tokenId) public view returns (string) {
}
function setTechBonus1(uint256 tokenId, string newVal) public {
}
function setTechBonus2(uint256 tokenId, string newVal) public {
}
function setTechBonus3(uint256 tokenId, string newVal) public {
}
function setPriceInEth(uint256 tokenId, uint256 newPrice) public afterPresaleMode() {
}
function setUnownedPriceInEth(uint256 tokenId, uint256 newPrice) public onlyCLevel {
}
function setUnownedPurchaseableMode(uint256 tokenId, bool _canBePurchased) public onlyCLevel {
}
function setPriceInExoTokens(uint256 tokenId, uint32 newPrice) public afterPresaleMode() {
}
function setUnownedPriceInExoTokens(uint256 tokenId, uint32 newPrice) public onlyCLevel {
}
function setScientificData(uint256 tokenId, string newData) public onlyCLevel {
}
function setUnownedName(uint256 tokenId, string newData) public onlyCLevel {
}
function setUnownedNickname(uint256 tokenId, string newData) public onlyCLevel {
}
function setCryptoMatchValue(uint256 tokenId, string newData) public onlyCLevel {
}
function setUnownedNumOfExoTokensBonus(uint256 tokenId, uint32 newData) public onlyCLevel {
}
function setUnownedLifeRate(uint256 tokenId, uint8 newData) public onlyCLevel {
}
function getExoplanet(uint256 tokenId) public view returns (
uint8 lifeRate,
bool canBePurchased,
uint32 priceInExoTokens,
uint32 numOfTokensBonusOnPurchase,
string name,
string nickname,
string cryptoMatch,
string scientificData,
uint256 sellingPriceInEther,
address owner) {
}
function implementsERC721() public pure returns (bool) {
}
function ownerOf(uint256 tokenId) public view returns (address owner) {
}
function transferUnownedPlanet(address newOwner, uint256 tokenId) public onlyCLevel {
}
function purchase(uint256 tokenId) public payable whenNotPaused() presaleModeActive() {
}
function buyDirectInMarketplace(uint256 tokenId) public payable
whenNotPaused() afterPresaleMode() allowBuyDirect() {
}
function priceOf(uint256 tokenId) public view returns (uint256) {
}
function takeOwnership(uint256 tokenId) public whenNotPaused() {
}
function tokensOfOwner(address owner) public view returns(uint256[] ownerTokens) {
}
function name() external view returns (string name) {
}
function symbol() external view returns (string symbol) {
}
function tokenURI(uint256 _tokenId) external view returns (string uri) {
}
function totalSupply() public view returns (uint256 total) {
}
function transfer(address to, uint256 tokenId) public whenNotPaused() {
}
function transferFrom(address from, address to, uint256 tokenId) public whenNotPaused() {
}
function addressNotNull(address addr) private pure returns (bool) {
}
function approved(address to, uint256 tokenId) private view returns (bool) {
}
function owns(address claimant, uint256 tokenId) private view returns (bool) {
}
function payout() public onlyCLevel {
}
function payoutPartial(uint256 amount) public onlyCLevel {
}
function _transfer(address from, address to, uint256 tokenId) private {
}
function appendNumToString(string baseUrl, uint256 tokenId) private pure returns (string) {
}
function numToString(uint256 tokenId) private pure returns (string str) {
}
function uintToBytes32(uint v) private pure returns (bytes32 ret) {
}
}
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) {
}
}
| !inPresaleMode | 44,073 | !inPresaleMode |
null | pragma solidity ^0.4.19;
contract ERC721 {
function approve(address to, uint256 tokenId) public;
function balanceOf(address owner) public view returns (uint256 balance);
function implementsERC721() public pure returns (bool);
function ownerOf(uint256 tokenId) public view returns (address addr);
function takeOwnership(uint256 tokenId) public;
function totalSupply() public view returns (uint256 total);
function transferFrom(address from, address to, uint256 tokenId) public;
function transfer(address to, uint256 tokenId) public;
event Transfer(address indexed from, address indexed to, uint256 tokenId);
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
function name() external view returns (string name);
function symbol() external view returns (string symbol);
function tokenURI(uint256 _tokenId) external view returns (string uri);
}
contract ExoplanetToken is ERC721 {
using SafeMath for uint256;
event Birth(uint256 indexed tokenId, string name, uint32 numOfTokensBonusOnPurchase, address owner);
event TokenSold(uint256 tokenId, uint256 oldPriceInEther, uint256 newPriceInEther, address prevOwner, address winner, string name);
event Transfer(address from, address to, uint256 tokenId);
event ContractUpgrade(address newContract);
string private constant CONTRACT_NAME = "ExoPlanets";
string private constant CONTRACT_SYMBOL = "XPL";
string public constant BASE_URL = "https://exoplanets.io/metadata/planet_";
uint32 private constant NUM_EXOPLANETS_LIMIT = 10000;
uint256 private constant STEP_1 = 5.0 ether;
uint256 private constant STEP_2 = 10.0 ether;
uint256 private constant STEP_3 = 26.0 ether;
uint256 private constant STEP_4 = 36.0 ether;
uint256 private constant STEP_5 = 47.0 ether;
uint256 private constant STEP_6 = 59.0 ether;
uint256 private constant STEP_7 = 67.85 ether;
uint256 private constant STEP_8 = 76.67 ether;
mapping (uint256 => address) public currentOwner;
mapping (address => uint256) private numOwnedTokens;
mapping (uint256 => address) public approvedToTransfer;
mapping (uint256 => uint256) private currentPrice;
address public ceoAddress;
address public cooAddress;
bool public inPresaleMode = true;
bool public paused = false;
bool public allowMigrate = true;
address public newContractAddress;
bool public _allowBuyDirect = false;
struct ExoplanetRec {
uint8 lifeRate;
bool canBePurchased;
uint32 priceInExoTokens;
uint32 numOfTokensBonusOnPurchase;
string name;
string nickname;
string cryptoMatch;
string techBonus1;
string techBonus2;
string techBonus3;
string scientificData;
}
ExoplanetRec[] private exoplanets;
address public marketplaceAddress;
modifier onlyCEO() {
}
modifier migrateAllowed() {
}
modifier whenNotPaused() {
}
modifier whenPaused() {
}
function turnMigrateOff() public onlyCEO() {
}
function pause() public onlyCEO() whenNotPaused() {
}
function unpause() public onlyCEO() whenPaused() {
}
modifier allowBuyDirect() {
}
function setBuyDirectMode(bool newMode, address newMarketplace) public onlyCEO {
}
function setPurchaseableMode(uint256 tokenId, bool _canBePurchased, uint256 _newPrice) public afterPresaleMode() {
}
function getPurchaseableMode(uint256 tokenId) public view returns (bool) {
}
function setNewAddress(address _v2Address) public onlyCEO() whenPaused() {
}
modifier onlyCOO() {
}
modifier presaleModeActive() {
}
modifier afterPresaleMode() {
}
modifier onlyCLevel() {
}
function setCEO(address newCEO) public onlyCEO {
}
function setCOO(address newCOO) public onlyCEO {
}
function setPresaleMode(bool newMode) public onlyCEO {
}
/*** CONSTRUCTOR ***/
function ExoplanetToken() public {
}
function approve(address to, uint256 tokenId) public {
}
function balanceOf(address owner) public view returns (uint256 balance) {
}
function bytes32ToString(bytes32 x) private pure returns (string) {
}
function migrateSinglePlanet(
uint256 origTokenId, string name, uint256 priceInEther, uint32 priceInExoTokens,
string cryptoMatch, uint32 numOfTokensBonusOnPurchase,
uint8 lifeRate, string scientificData, address owner) public onlyCLevel migrateAllowed {
}
function _migrateExoplanet(
uint256 origTokenId, string name, uint256 priceInEther, uint32 priceInExoTokens,
string cryptoMatch, uint32 numOfTokensBonusOnPurchase, uint8 lifeRate,
string scientificData, address owner) private {
require(<FILL_ME>)
require(origTokenId == uint256(uint32(origTokenId)));
ExoplanetRec memory _exoplanet = ExoplanetRec({
name: name,
nickname: "",
priceInExoTokens: priceInExoTokens,
cryptoMatch: cryptoMatch,
numOfTokensBonusOnPurchase: numOfTokensBonusOnPurchase,
lifeRate: lifeRate,
techBonus1: "",
techBonus2: "",
techBonus3: "",
scientificData: scientificData,
canBePurchased: false
});
uint256 tokenId = exoplanets.push(_exoplanet) - 1;
currentPrice[tokenId] = priceInEther;
numOwnedTokens[owner]++;
exoplanets[tokenId].canBePurchased = false;
currentOwner[tokenId] = owner;
}
function createContractExoplanet(
string name, uint256 priceInEther, uint32 priceInExoTokens,
string cryptoMatch, uint32 numOfTokensBonusOnPurchase,
uint8 lifeRate, string scientificData) public onlyCLevel returns (uint256) {
}
function _createExoplanet(
string name, address owner, uint256 priceInEther, uint32 priceInExoTokens,
string cryptoMatch, uint32 numOfTokensBonusOnPurchase, uint8 lifeRate,
string scientificData) private returns (uint256) {
}
function unownedPlanet(uint256 tokenId) private view returns (bool) {
}
function getPlanetName(uint256 tokenId) public view returns (string) {
}
function getNickname(uint256 tokenId) public view returns (string) {
}
function getPriceInExoTokens(uint256 tokenId) public view returns (uint32) {
}
function getLifeRate(uint256 tokenId) public view returns (uint8) {
}
function getNumOfTokensBonusOnPurchase(uint256 tokenId) public view returns (uint32) {
}
function getCryptoMatch(uint256 tokenId) public view returns (string) {
}
function getTechBonus1(uint256 tokenId) public view returns (string) {
}
function getTechBonus2(uint256 tokenId) public view returns (string) {
}
function getTechBonus3(uint256 tokenId) public view returns (string) {
}
function getScientificData(uint256 tokenId) public view returns (string) {
}
function setTechBonus1(uint256 tokenId, string newVal) public {
}
function setTechBonus2(uint256 tokenId, string newVal) public {
}
function setTechBonus3(uint256 tokenId, string newVal) public {
}
function setPriceInEth(uint256 tokenId, uint256 newPrice) public afterPresaleMode() {
}
function setUnownedPriceInEth(uint256 tokenId, uint256 newPrice) public onlyCLevel {
}
function setUnownedPurchaseableMode(uint256 tokenId, bool _canBePurchased) public onlyCLevel {
}
function setPriceInExoTokens(uint256 tokenId, uint32 newPrice) public afterPresaleMode() {
}
function setUnownedPriceInExoTokens(uint256 tokenId, uint32 newPrice) public onlyCLevel {
}
function setScientificData(uint256 tokenId, string newData) public onlyCLevel {
}
function setUnownedName(uint256 tokenId, string newData) public onlyCLevel {
}
function setUnownedNickname(uint256 tokenId, string newData) public onlyCLevel {
}
function setCryptoMatchValue(uint256 tokenId, string newData) public onlyCLevel {
}
function setUnownedNumOfExoTokensBonus(uint256 tokenId, uint32 newData) public onlyCLevel {
}
function setUnownedLifeRate(uint256 tokenId, uint8 newData) public onlyCLevel {
}
function getExoplanet(uint256 tokenId) public view returns (
uint8 lifeRate,
bool canBePurchased,
uint32 priceInExoTokens,
uint32 numOfTokensBonusOnPurchase,
string name,
string nickname,
string cryptoMatch,
string scientificData,
uint256 sellingPriceInEther,
address owner) {
}
function implementsERC721() public pure returns (bool) {
}
function ownerOf(uint256 tokenId) public view returns (address owner) {
}
function transferUnownedPlanet(address newOwner, uint256 tokenId) public onlyCLevel {
}
function purchase(uint256 tokenId) public payable whenNotPaused() presaleModeActive() {
}
function buyDirectInMarketplace(uint256 tokenId) public payable
whenNotPaused() afterPresaleMode() allowBuyDirect() {
}
function priceOf(uint256 tokenId) public view returns (uint256) {
}
function takeOwnership(uint256 tokenId) public whenNotPaused() {
}
function tokensOfOwner(address owner) public view returns(uint256[] ownerTokens) {
}
function name() external view returns (string name) {
}
function symbol() external view returns (string symbol) {
}
function tokenURI(uint256 _tokenId) external view returns (string uri) {
}
function totalSupply() public view returns (uint256 total) {
}
function transfer(address to, uint256 tokenId) public whenNotPaused() {
}
function transferFrom(address from, address to, uint256 tokenId) public whenNotPaused() {
}
function addressNotNull(address addr) private pure returns (bool) {
}
function approved(address to, uint256 tokenId) private view returns (bool) {
}
function owns(address claimant, uint256 tokenId) private view returns (bool) {
}
function payout() public onlyCLevel {
}
function payoutPartial(uint256 amount) public onlyCLevel {
}
function _transfer(address from, address to, uint256 tokenId) private {
}
function appendNumToString(string baseUrl, uint256 tokenId) private pure returns (string) {
}
function numToString(uint256 tokenId) private pure returns (string str) {
}
function uintToBytes32(uint v) private pure returns (bytes32 ret) {
}
}
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) {
}
}
| totalSupply()<NUM_EXOPLANETS_LIMIT | 44,073 | totalSupply()<NUM_EXOPLANETS_LIMIT |
null | pragma solidity ^0.4.19;
contract ERC721 {
function approve(address to, uint256 tokenId) public;
function balanceOf(address owner) public view returns (uint256 balance);
function implementsERC721() public pure returns (bool);
function ownerOf(uint256 tokenId) public view returns (address addr);
function takeOwnership(uint256 tokenId) public;
function totalSupply() public view returns (uint256 total);
function transferFrom(address from, address to, uint256 tokenId) public;
function transfer(address to, uint256 tokenId) public;
event Transfer(address indexed from, address indexed to, uint256 tokenId);
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
function name() external view returns (string name);
function symbol() external view returns (string symbol);
function tokenURI(uint256 _tokenId) external view returns (string uri);
}
contract ExoplanetToken is ERC721 {
using SafeMath for uint256;
event Birth(uint256 indexed tokenId, string name, uint32 numOfTokensBonusOnPurchase, address owner);
event TokenSold(uint256 tokenId, uint256 oldPriceInEther, uint256 newPriceInEther, address prevOwner, address winner, string name);
event Transfer(address from, address to, uint256 tokenId);
event ContractUpgrade(address newContract);
string private constant CONTRACT_NAME = "ExoPlanets";
string private constant CONTRACT_SYMBOL = "XPL";
string public constant BASE_URL = "https://exoplanets.io/metadata/planet_";
uint32 private constant NUM_EXOPLANETS_LIMIT = 10000;
uint256 private constant STEP_1 = 5.0 ether;
uint256 private constant STEP_2 = 10.0 ether;
uint256 private constant STEP_3 = 26.0 ether;
uint256 private constant STEP_4 = 36.0 ether;
uint256 private constant STEP_5 = 47.0 ether;
uint256 private constant STEP_6 = 59.0 ether;
uint256 private constant STEP_7 = 67.85 ether;
uint256 private constant STEP_8 = 76.67 ether;
mapping (uint256 => address) public currentOwner;
mapping (address => uint256) private numOwnedTokens;
mapping (uint256 => address) public approvedToTransfer;
mapping (uint256 => uint256) private currentPrice;
address public ceoAddress;
address public cooAddress;
bool public inPresaleMode = true;
bool public paused = false;
bool public allowMigrate = true;
address public newContractAddress;
bool public _allowBuyDirect = false;
struct ExoplanetRec {
uint8 lifeRate;
bool canBePurchased;
uint32 priceInExoTokens;
uint32 numOfTokensBonusOnPurchase;
string name;
string nickname;
string cryptoMatch;
string techBonus1;
string techBonus2;
string techBonus3;
string scientificData;
}
ExoplanetRec[] private exoplanets;
address public marketplaceAddress;
modifier onlyCEO() {
}
modifier migrateAllowed() {
}
modifier whenNotPaused() {
}
modifier whenPaused() {
}
function turnMigrateOff() public onlyCEO() {
}
function pause() public onlyCEO() whenNotPaused() {
}
function unpause() public onlyCEO() whenPaused() {
}
modifier allowBuyDirect() {
}
function setBuyDirectMode(bool newMode, address newMarketplace) public onlyCEO {
}
function setPurchaseableMode(uint256 tokenId, bool _canBePurchased, uint256 _newPrice) public afterPresaleMode() {
}
function getPurchaseableMode(uint256 tokenId) public view returns (bool) {
}
function setNewAddress(address _v2Address) public onlyCEO() whenPaused() {
}
modifier onlyCOO() {
}
modifier presaleModeActive() {
}
modifier afterPresaleMode() {
}
modifier onlyCLevel() {
}
function setCEO(address newCEO) public onlyCEO {
}
function setCOO(address newCOO) public onlyCEO {
}
function setPresaleMode(bool newMode) public onlyCEO {
}
/*** CONSTRUCTOR ***/
function ExoplanetToken() public {
}
function approve(address to, uint256 tokenId) public {
}
function balanceOf(address owner) public view returns (uint256 balance) {
}
function bytes32ToString(bytes32 x) private pure returns (string) {
}
function migrateSinglePlanet(
uint256 origTokenId, string name, uint256 priceInEther, uint32 priceInExoTokens,
string cryptoMatch, uint32 numOfTokensBonusOnPurchase,
uint8 lifeRate, string scientificData, address owner) public onlyCLevel migrateAllowed {
}
function _migrateExoplanet(
uint256 origTokenId, string name, uint256 priceInEther, uint32 priceInExoTokens,
string cryptoMatch, uint32 numOfTokensBonusOnPurchase, uint8 lifeRate,
string scientificData, address owner) private {
}
function createContractExoplanet(
string name, uint256 priceInEther, uint32 priceInExoTokens,
string cryptoMatch, uint32 numOfTokensBonusOnPurchase,
uint8 lifeRate, string scientificData) public onlyCLevel returns (uint256) {
}
function _createExoplanet(
string name, address owner, uint256 priceInEther, uint32 priceInExoTokens,
string cryptoMatch, uint32 numOfTokensBonusOnPurchase, uint8 lifeRate,
string scientificData) private returns (uint256) {
}
function unownedPlanet(uint256 tokenId) private view returns (bool) {
}
function getPlanetName(uint256 tokenId) public view returns (string) {
}
function getNickname(uint256 tokenId) public view returns (string) {
}
function getPriceInExoTokens(uint256 tokenId) public view returns (uint32) {
}
function getLifeRate(uint256 tokenId) public view returns (uint8) {
}
function getNumOfTokensBonusOnPurchase(uint256 tokenId) public view returns (uint32) {
}
function getCryptoMatch(uint256 tokenId) public view returns (string) {
}
function getTechBonus1(uint256 tokenId) public view returns (string) {
}
function getTechBonus2(uint256 tokenId) public view returns (string) {
}
function getTechBonus3(uint256 tokenId) public view returns (string) {
}
function getScientificData(uint256 tokenId) public view returns (string) {
}
function setTechBonus1(uint256 tokenId, string newVal) public {
}
function setTechBonus2(uint256 tokenId, string newVal) public {
}
function setTechBonus3(uint256 tokenId, string newVal) public {
}
function setPriceInEth(uint256 tokenId, uint256 newPrice) public afterPresaleMode() {
}
function setUnownedPriceInEth(uint256 tokenId, uint256 newPrice) public onlyCLevel {
require(<FILL_ME>)
currentPrice[tokenId] = newPrice;
}
function setUnownedPurchaseableMode(uint256 tokenId, bool _canBePurchased) public onlyCLevel {
}
function setPriceInExoTokens(uint256 tokenId, uint32 newPrice) public afterPresaleMode() {
}
function setUnownedPriceInExoTokens(uint256 tokenId, uint32 newPrice) public onlyCLevel {
}
function setScientificData(uint256 tokenId, string newData) public onlyCLevel {
}
function setUnownedName(uint256 tokenId, string newData) public onlyCLevel {
}
function setUnownedNickname(uint256 tokenId, string newData) public onlyCLevel {
}
function setCryptoMatchValue(uint256 tokenId, string newData) public onlyCLevel {
}
function setUnownedNumOfExoTokensBonus(uint256 tokenId, uint32 newData) public onlyCLevel {
}
function setUnownedLifeRate(uint256 tokenId, uint8 newData) public onlyCLevel {
}
function getExoplanet(uint256 tokenId) public view returns (
uint8 lifeRate,
bool canBePurchased,
uint32 priceInExoTokens,
uint32 numOfTokensBonusOnPurchase,
string name,
string nickname,
string cryptoMatch,
string scientificData,
uint256 sellingPriceInEther,
address owner) {
}
function implementsERC721() public pure returns (bool) {
}
function ownerOf(uint256 tokenId) public view returns (address owner) {
}
function transferUnownedPlanet(address newOwner, uint256 tokenId) public onlyCLevel {
}
function purchase(uint256 tokenId) public payable whenNotPaused() presaleModeActive() {
}
function buyDirectInMarketplace(uint256 tokenId) public payable
whenNotPaused() afterPresaleMode() allowBuyDirect() {
}
function priceOf(uint256 tokenId) public view returns (uint256) {
}
function takeOwnership(uint256 tokenId) public whenNotPaused() {
}
function tokensOfOwner(address owner) public view returns(uint256[] ownerTokens) {
}
function name() external view returns (string name) {
}
function symbol() external view returns (string symbol) {
}
function tokenURI(uint256 _tokenId) external view returns (string uri) {
}
function totalSupply() public view returns (uint256 total) {
}
function transfer(address to, uint256 tokenId) public whenNotPaused() {
}
function transferFrom(address from, address to, uint256 tokenId) public whenNotPaused() {
}
function addressNotNull(address addr) private pure returns (bool) {
}
function approved(address to, uint256 tokenId) private view returns (bool) {
}
function owns(address claimant, uint256 tokenId) private view returns (bool) {
}
function payout() public onlyCLevel {
}
function payoutPartial(uint256 amount) public onlyCLevel {
}
function _transfer(address from, address to, uint256 tokenId) private {
}
function appendNumToString(string baseUrl, uint256 tokenId) private pure returns (string) {
}
function numToString(uint256 tokenId) private pure returns (string str) {
}
function uintToBytes32(uint v) private pure returns (bytes32 ret) {
}
}
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) {
}
}
| unownedPlanet(tokenId) | 44,073 | unownedPlanet(tokenId) |
null | pragma solidity ^0.4.19;
contract ERC721 {
function approve(address to, uint256 tokenId) public;
function balanceOf(address owner) public view returns (uint256 balance);
function implementsERC721() public pure returns (bool);
function ownerOf(uint256 tokenId) public view returns (address addr);
function takeOwnership(uint256 tokenId) public;
function totalSupply() public view returns (uint256 total);
function transferFrom(address from, address to, uint256 tokenId) public;
function transfer(address to, uint256 tokenId) public;
event Transfer(address indexed from, address indexed to, uint256 tokenId);
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
function name() external view returns (string name);
function symbol() external view returns (string symbol);
function tokenURI(uint256 _tokenId) external view returns (string uri);
}
contract ExoplanetToken is ERC721 {
using SafeMath for uint256;
event Birth(uint256 indexed tokenId, string name, uint32 numOfTokensBonusOnPurchase, address owner);
event TokenSold(uint256 tokenId, uint256 oldPriceInEther, uint256 newPriceInEther, address prevOwner, address winner, string name);
event Transfer(address from, address to, uint256 tokenId);
event ContractUpgrade(address newContract);
string private constant CONTRACT_NAME = "ExoPlanets";
string private constant CONTRACT_SYMBOL = "XPL";
string public constant BASE_URL = "https://exoplanets.io/metadata/planet_";
uint32 private constant NUM_EXOPLANETS_LIMIT = 10000;
uint256 private constant STEP_1 = 5.0 ether;
uint256 private constant STEP_2 = 10.0 ether;
uint256 private constant STEP_3 = 26.0 ether;
uint256 private constant STEP_4 = 36.0 ether;
uint256 private constant STEP_5 = 47.0 ether;
uint256 private constant STEP_6 = 59.0 ether;
uint256 private constant STEP_7 = 67.85 ether;
uint256 private constant STEP_8 = 76.67 ether;
mapping (uint256 => address) public currentOwner;
mapping (address => uint256) private numOwnedTokens;
mapping (uint256 => address) public approvedToTransfer;
mapping (uint256 => uint256) private currentPrice;
address public ceoAddress;
address public cooAddress;
bool public inPresaleMode = true;
bool public paused = false;
bool public allowMigrate = true;
address public newContractAddress;
bool public _allowBuyDirect = false;
struct ExoplanetRec {
uint8 lifeRate;
bool canBePurchased;
uint32 priceInExoTokens;
uint32 numOfTokensBonusOnPurchase;
string name;
string nickname;
string cryptoMatch;
string techBonus1;
string techBonus2;
string techBonus3;
string scientificData;
}
ExoplanetRec[] private exoplanets;
address public marketplaceAddress;
modifier onlyCEO() {
}
modifier migrateAllowed() {
}
modifier whenNotPaused() {
}
modifier whenPaused() {
}
function turnMigrateOff() public onlyCEO() {
}
function pause() public onlyCEO() whenNotPaused() {
}
function unpause() public onlyCEO() whenPaused() {
}
modifier allowBuyDirect() {
}
function setBuyDirectMode(bool newMode, address newMarketplace) public onlyCEO {
}
function setPurchaseableMode(uint256 tokenId, bool _canBePurchased, uint256 _newPrice) public afterPresaleMode() {
}
function getPurchaseableMode(uint256 tokenId) public view returns (bool) {
}
function setNewAddress(address _v2Address) public onlyCEO() whenPaused() {
}
modifier onlyCOO() {
}
modifier presaleModeActive() {
}
modifier afterPresaleMode() {
}
modifier onlyCLevel() {
}
function setCEO(address newCEO) public onlyCEO {
}
function setCOO(address newCOO) public onlyCEO {
}
function setPresaleMode(bool newMode) public onlyCEO {
}
/*** CONSTRUCTOR ***/
function ExoplanetToken() public {
}
function approve(address to, uint256 tokenId) public {
}
function balanceOf(address owner) public view returns (uint256 balance) {
}
function bytes32ToString(bytes32 x) private pure returns (string) {
}
function migrateSinglePlanet(
uint256 origTokenId, string name, uint256 priceInEther, uint32 priceInExoTokens,
string cryptoMatch, uint32 numOfTokensBonusOnPurchase,
uint8 lifeRate, string scientificData, address owner) public onlyCLevel migrateAllowed {
}
function _migrateExoplanet(
uint256 origTokenId, string name, uint256 priceInEther, uint32 priceInExoTokens,
string cryptoMatch, uint32 numOfTokensBonusOnPurchase, uint8 lifeRate,
string scientificData, address owner) private {
}
function createContractExoplanet(
string name, uint256 priceInEther, uint32 priceInExoTokens,
string cryptoMatch, uint32 numOfTokensBonusOnPurchase,
uint8 lifeRate, string scientificData) public onlyCLevel returns (uint256) {
}
function _createExoplanet(
string name, address owner, uint256 priceInEther, uint32 priceInExoTokens,
string cryptoMatch, uint32 numOfTokensBonusOnPurchase, uint8 lifeRate,
string scientificData) private returns (uint256) {
}
function unownedPlanet(uint256 tokenId) private view returns (bool) {
}
function getPlanetName(uint256 tokenId) public view returns (string) {
}
function getNickname(uint256 tokenId) public view returns (string) {
}
function getPriceInExoTokens(uint256 tokenId) public view returns (uint32) {
}
function getLifeRate(uint256 tokenId) public view returns (uint8) {
}
function getNumOfTokensBonusOnPurchase(uint256 tokenId) public view returns (uint32) {
}
function getCryptoMatch(uint256 tokenId) public view returns (string) {
}
function getTechBonus1(uint256 tokenId) public view returns (string) {
}
function getTechBonus2(uint256 tokenId) public view returns (string) {
}
function getTechBonus3(uint256 tokenId) public view returns (string) {
}
function getScientificData(uint256 tokenId) public view returns (string) {
}
function setTechBonus1(uint256 tokenId, string newVal) public {
}
function setTechBonus2(uint256 tokenId, string newVal) public {
}
function setTechBonus3(uint256 tokenId, string newVal) public {
}
function setPriceInEth(uint256 tokenId, uint256 newPrice) public afterPresaleMode() {
}
function setUnownedPriceInEth(uint256 tokenId, uint256 newPrice) public onlyCLevel {
}
function setUnownedPurchaseableMode(uint256 tokenId, bool _canBePurchased) public onlyCLevel {
}
function setPriceInExoTokens(uint256 tokenId, uint32 newPrice) public afterPresaleMode() {
}
function setUnownedPriceInExoTokens(uint256 tokenId, uint32 newPrice) public onlyCLevel {
}
function setScientificData(uint256 tokenId, string newData) public onlyCLevel {
}
function setUnownedName(uint256 tokenId, string newData) public onlyCLevel {
}
function setUnownedNickname(uint256 tokenId, string newData) public onlyCLevel {
}
function setCryptoMatchValue(uint256 tokenId, string newData) public onlyCLevel {
}
function setUnownedNumOfExoTokensBonus(uint256 tokenId, uint32 newData) public onlyCLevel {
}
function setUnownedLifeRate(uint256 tokenId, uint8 newData) public onlyCLevel {
}
function getExoplanet(uint256 tokenId) public view returns (
uint8 lifeRate,
bool canBePurchased,
uint32 priceInExoTokens,
uint32 numOfTokensBonusOnPurchase,
string name,
string nickname,
string cryptoMatch,
string scientificData,
uint256 sellingPriceInEther,
address owner) {
}
function implementsERC721() public pure returns (bool) {
}
function ownerOf(uint256 tokenId) public view returns (address owner) {
}
function transferUnownedPlanet(address newOwner, uint256 tokenId) public onlyCLevel {
}
function purchase(uint256 tokenId) public payable whenNotPaused() presaleModeActive() {
require(<FILL_ME>)
require(addressNotNull(msg.sender));
uint256 planetPrice = currentPrice[tokenId];
require(msg.value >= planetPrice);
uint paymentPrcnt;
uint stepPrcnt;
if (planetPrice <= STEP_1) {
paymentPrcnt = 93;
stepPrcnt = 200;
} else if (planetPrice <= STEP_2) {
paymentPrcnt = 93;
stepPrcnt = 150;
} else if (planetPrice <= STEP_3) {
paymentPrcnt = 93;
stepPrcnt = 135;
} else if (planetPrice <= STEP_4) {
paymentPrcnt = 94;
stepPrcnt = 125;
} else if (planetPrice <= STEP_5) {
paymentPrcnt = 94;
stepPrcnt = 119;
} else if (planetPrice <= STEP_6) {
paymentPrcnt = 95;
stepPrcnt = 117;
} else if (planetPrice <= STEP_7) {
paymentPrcnt = 95;
stepPrcnt = 115;
} else if (planetPrice <= STEP_8) {
paymentPrcnt = 95;
stepPrcnt = 113;
} else {
paymentPrcnt = 96;
stepPrcnt = 110;
}
currentPrice[tokenId] = planetPrice.mul(stepPrcnt).div(100);
uint256 payment = uint256(planetPrice.mul(paymentPrcnt).div(100));
address seller = currentOwner[tokenId];
if (seller != address(this)) {
seller.transfer(payment);
}
_transfer(seller, msg.sender, tokenId);
TokenSold(tokenId, planetPrice, currentPrice[tokenId], seller, msg.sender, exoplanets[tokenId].name);
}
function buyDirectInMarketplace(uint256 tokenId) public payable
whenNotPaused() afterPresaleMode() allowBuyDirect() {
}
function priceOf(uint256 tokenId) public view returns (uint256) {
}
function takeOwnership(uint256 tokenId) public whenNotPaused() {
}
function tokensOfOwner(address owner) public view returns(uint256[] ownerTokens) {
}
function name() external view returns (string name) {
}
function symbol() external view returns (string symbol) {
}
function tokenURI(uint256 _tokenId) external view returns (string uri) {
}
function totalSupply() public view returns (uint256 total) {
}
function transfer(address to, uint256 tokenId) public whenNotPaused() {
}
function transferFrom(address from, address to, uint256 tokenId) public whenNotPaused() {
}
function addressNotNull(address addr) private pure returns (bool) {
}
function approved(address to, uint256 tokenId) private view returns (bool) {
}
function owns(address claimant, uint256 tokenId) private view returns (bool) {
}
function payout() public onlyCLevel {
}
function payoutPartial(uint256 amount) public onlyCLevel {
}
function _transfer(address from, address to, uint256 tokenId) private {
}
function appendNumToString(string baseUrl, uint256 tokenId) private pure returns (string) {
}
function numToString(uint256 tokenId) private pure returns (string str) {
}
function uintToBytes32(uint v) private pure returns (bytes32 ret) {
}
}
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) {
}
}
| currentOwner[tokenId]!=msg.sender | 44,073 | currentOwner[tokenId]!=msg.sender |
null | pragma solidity ^0.4.19;
contract ERC721 {
function approve(address to, uint256 tokenId) public;
function balanceOf(address owner) public view returns (uint256 balance);
function implementsERC721() public pure returns (bool);
function ownerOf(uint256 tokenId) public view returns (address addr);
function takeOwnership(uint256 tokenId) public;
function totalSupply() public view returns (uint256 total);
function transferFrom(address from, address to, uint256 tokenId) public;
function transfer(address to, uint256 tokenId) public;
event Transfer(address indexed from, address indexed to, uint256 tokenId);
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
function name() external view returns (string name);
function symbol() external view returns (string symbol);
function tokenURI(uint256 _tokenId) external view returns (string uri);
}
contract ExoplanetToken is ERC721 {
using SafeMath for uint256;
event Birth(uint256 indexed tokenId, string name, uint32 numOfTokensBonusOnPurchase, address owner);
event TokenSold(uint256 tokenId, uint256 oldPriceInEther, uint256 newPriceInEther, address prevOwner, address winner, string name);
event Transfer(address from, address to, uint256 tokenId);
event ContractUpgrade(address newContract);
string private constant CONTRACT_NAME = "ExoPlanets";
string private constant CONTRACT_SYMBOL = "XPL";
string public constant BASE_URL = "https://exoplanets.io/metadata/planet_";
uint32 private constant NUM_EXOPLANETS_LIMIT = 10000;
uint256 private constant STEP_1 = 5.0 ether;
uint256 private constant STEP_2 = 10.0 ether;
uint256 private constant STEP_3 = 26.0 ether;
uint256 private constant STEP_4 = 36.0 ether;
uint256 private constant STEP_5 = 47.0 ether;
uint256 private constant STEP_6 = 59.0 ether;
uint256 private constant STEP_7 = 67.85 ether;
uint256 private constant STEP_8 = 76.67 ether;
mapping (uint256 => address) public currentOwner;
mapping (address => uint256) private numOwnedTokens;
mapping (uint256 => address) public approvedToTransfer;
mapping (uint256 => uint256) private currentPrice;
address public ceoAddress;
address public cooAddress;
bool public inPresaleMode = true;
bool public paused = false;
bool public allowMigrate = true;
address public newContractAddress;
bool public _allowBuyDirect = false;
struct ExoplanetRec {
uint8 lifeRate;
bool canBePurchased;
uint32 priceInExoTokens;
uint32 numOfTokensBonusOnPurchase;
string name;
string nickname;
string cryptoMatch;
string techBonus1;
string techBonus2;
string techBonus3;
string scientificData;
}
ExoplanetRec[] private exoplanets;
address public marketplaceAddress;
modifier onlyCEO() {
}
modifier migrateAllowed() {
}
modifier whenNotPaused() {
}
modifier whenPaused() {
}
function turnMigrateOff() public onlyCEO() {
}
function pause() public onlyCEO() whenNotPaused() {
}
function unpause() public onlyCEO() whenPaused() {
}
modifier allowBuyDirect() {
}
function setBuyDirectMode(bool newMode, address newMarketplace) public onlyCEO {
}
function setPurchaseableMode(uint256 tokenId, bool _canBePurchased, uint256 _newPrice) public afterPresaleMode() {
}
function getPurchaseableMode(uint256 tokenId) public view returns (bool) {
}
function setNewAddress(address _v2Address) public onlyCEO() whenPaused() {
}
modifier onlyCOO() {
}
modifier presaleModeActive() {
}
modifier afterPresaleMode() {
}
modifier onlyCLevel() {
}
function setCEO(address newCEO) public onlyCEO {
}
function setCOO(address newCOO) public onlyCEO {
}
function setPresaleMode(bool newMode) public onlyCEO {
}
/*** CONSTRUCTOR ***/
function ExoplanetToken() public {
}
function approve(address to, uint256 tokenId) public {
}
function balanceOf(address owner) public view returns (uint256 balance) {
}
function bytes32ToString(bytes32 x) private pure returns (string) {
}
function migrateSinglePlanet(
uint256 origTokenId, string name, uint256 priceInEther, uint32 priceInExoTokens,
string cryptoMatch, uint32 numOfTokensBonusOnPurchase,
uint8 lifeRate, string scientificData, address owner) public onlyCLevel migrateAllowed {
}
function _migrateExoplanet(
uint256 origTokenId, string name, uint256 priceInEther, uint32 priceInExoTokens,
string cryptoMatch, uint32 numOfTokensBonusOnPurchase, uint8 lifeRate,
string scientificData, address owner) private {
}
function createContractExoplanet(
string name, uint256 priceInEther, uint32 priceInExoTokens,
string cryptoMatch, uint32 numOfTokensBonusOnPurchase,
uint8 lifeRate, string scientificData) public onlyCLevel returns (uint256) {
}
function _createExoplanet(
string name, address owner, uint256 priceInEther, uint32 priceInExoTokens,
string cryptoMatch, uint32 numOfTokensBonusOnPurchase, uint8 lifeRate,
string scientificData) private returns (uint256) {
}
function unownedPlanet(uint256 tokenId) private view returns (bool) {
}
function getPlanetName(uint256 tokenId) public view returns (string) {
}
function getNickname(uint256 tokenId) public view returns (string) {
}
function getPriceInExoTokens(uint256 tokenId) public view returns (uint32) {
}
function getLifeRate(uint256 tokenId) public view returns (uint8) {
}
function getNumOfTokensBonusOnPurchase(uint256 tokenId) public view returns (uint32) {
}
function getCryptoMatch(uint256 tokenId) public view returns (string) {
}
function getTechBonus1(uint256 tokenId) public view returns (string) {
}
function getTechBonus2(uint256 tokenId) public view returns (string) {
}
function getTechBonus3(uint256 tokenId) public view returns (string) {
}
function getScientificData(uint256 tokenId) public view returns (string) {
}
function setTechBonus1(uint256 tokenId, string newVal) public {
}
function setTechBonus2(uint256 tokenId, string newVal) public {
}
function setTechBonus3(uint256 tokenId, string newVal) public {
}
function setPriceInEth(uint256 tokenId, uint256 newPrice) public afterPresaleMode() {
}
function setUnownedPriceInEth(uint256 tokenId, uint256 newPrice) public onlyCLevel {
}
function setUnownedPurchaseableMode(uint256 tokenId, bool _canBePurchased) public onlyCLevel {
}
function setPriceInExoTokens(uint256 tokenId, uint32 newPrice) public afterPresaleMode() {
}
function setUnownedPriceInExoTokens(uint256 tokenId, uint32 newPrice) public onlyCLevel {
}
function setScientificData(uint256 tokenId, string newData) public onlyCLevel {
}
function setUnownedName(uint256 tokenId, string newData) public onlyCLevel {
}
function setUnownedNickname(uint256 tokenId, string newData) public onlyCLevel {
}
function setCryptoMatchValue(uint256 tokenId, string newData) public onlyCLevel {
}
function setUnownedNumOfExoTokensBonus(uint256 tokenId, uint32 newData) public onlyCLevel {
}
function setUnownedLifeRate(uint256 tokenId, uint8 newData) public onlyCLevel {
}
function getExoplanet(uint256 tokenId) public view returns (
uint8 lifeRate,
bool canBePurchased,
uint32 priceInExoTokens,
uint32 numOfTokensBonusOnPurchase,
string name,
string nickname,
string cryptoMatch,
string scientificData,
uint256 sellingPriceInEther,
address owner) {
}
function implementsERC721() public pure returns (bool) {
}
function ownerOf(uint256 tokenId) public view returns (address owner) {
}
function transferUnownedPlanet(address newOwner, uint256 tokenId) public onlyCLevel {
}
function purchase(uint256 tokenId) public payable whenNotPaused() presaleModeActive() {
require(currentOwner[tokenId] != msg.sender);
require(<FILL_ME>)
uint256 planetPrice = currentPrice[tokenId];
require(msg.value >= planetPrice);
uint paymentPrcnt;
uint stepPrcnt;
if (planetPrice <= STEP_1) {
paymentPrcnt = 93;
stepPrcnt = 200;
} else if (planetPrice <= STEP_2) {
paymentPrcnt = 93;
stepPrcnt = 150;
} else if (planetPrice <= STEP_3) {
paymentPrcnt = 93;
stepPrcnt = 135;
} else if (planetPrice <= STEP_4) {
paymentPrcnt = 94;
stepPrcnt = 125;
} else if (planetPrice <= STEP_5) {
paymentPrcnt = 94;
stepPrcnt = 119;
} else if (planetPrice <= STEP_6) {
paymentPrcnt = 95;
stepPrcnt = 117;
} else if (planetPrice <= STEP_7) {
paymentPrcnt = 95;
stepPrcnt = 115;
} else if (planetPrice <= STEP_8) {
paymentPrcnt = 95;
stepPrcnt = 113;
} else {
paymentPrcnt = 96;
stepPrcnt = 110;
}
currentPrice[tokenId] = planetPrice.mul(stepPrcnt).div(100);
uint256 payment = uint256(planetPrice.mul(paymentPrcnt).div(100));
address seller = currentOwner[tokenId];
if (seller != address(this)) {
seller.transfer(payment);
}
_transfer(seller, msg.sender, tokenId);
TokenSold(tokenId, planetPrice, currentPrice[tokenId], seller, msg.sender, exoplanets[tokenId].name);
}
function buyDirectInMarketplace(uint256 tokenId) public payable
whenNotPaused() afterPresaleMode() allowBuyDirect() {
}
function priceOf(uint256 tokenId) public view returns (uint256) {
}
function takeOwnership(uint256 tokenId) public whenNotPaused() {
}
function tokensOfOwner(address owner) public view returns(uint256[] ownerTokens) {
}
function name() external view returns (string name) {
}
function symbol() external view returns (string symbol) {
}
function tokenURI(uint256 _tokenId) external view returns (string uri) {
}
function totalSupply() public view returns (uint256 total) {
}
function transfer(address to, uint256 tokenId) public whenNotPaused() {
}
function transferFrom(address from, address to, uint256 tokenId) public whenNotPaused() {
}
function addressNotNull(address addr) private pure returns (bool) {
}
function approved(address to, uint256 tokenId) private view returns (bool) {
}
function owns(address claimant, uint256 tokenId) private view returns (bool) {
}
function payout() public onlyCLevel {
}
function payoutPartial(uint256 amount) public onlyCLevel {
}
function _transfer(address from, address to, uint256 tokenId) private {
}
function appendNumToString(string baseUrl, uint256 tokenId) private pure returns (string) {
}
function numToString(uint256 tokenId) private pure returns (string str) {
}
function uintToBytes32(uint v) private pure returns (bytes32 ret) {
}
}
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) {
}
}
| addressNotNull(msg.sender) | 44,073 | addressNotNull(msg.sender) |
null | pragma solidity ^0.4.19;
contract ERC721 {
function approve(address to, uint256 tokenId) public;
function balanceOf(address owner) public view returns (uint256 balance);
function implementsERC721() public pure returns (bool);
function ownerOf(uint256 tokenId) public view returns (address addr);
function takeOwnership(uint256 tokenId) public;
function totalSupply() public view returns (uint256 total);
function transferFrom(address from, address to, uint256 tokenId) public;
function transfer(address to, uint256 tokenId) public;
event Transfer(address indexed from, address indexed to, uint256 tokenId);
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
function name() external view returns (string name);
function symbol() external view returns (string symbol);
function tokenURI(uint256 _tokenId) external view returns (string uri);
}
contract ExoplanetToken is ERC721 {
using SafeMath for uint256;
event Birth(uint256 indexed tokenId, string name, uint32 numOfTokensBonusOnPurchase, address owner);
event TokenSold(uint256 tokenId, uint256 oldPriceInEther, uint256 newPriceInEther, address prevOwner, address winner, string name);
event Transfer(address from, address to, uint256 tokenId);
event ContractUpgrade(address newContract);
string private constant CONTRACT_NAME = "ExoPlanets";
string private constant CONTRACT_SYMBOL = "XPL";
string public constant BASE_URL = "https://exoplanets.io/metadata/planet_";
uint32 private constant NUM_EXOPLANETS_LIMIT = 10000;
uint256 private constant STEP_1 = 5.0 ether;
uint256 private constant STEP_2 = 10.0 ether;
uint256 private constant STEP_3 = 26.0 ether;
uint256 private constant STEP_4 = 36.0 ether;
uint256 private constant STEP_5 = 47.0 ether;
uint256 private constant STEP_6 = 59.0 ether;
uint256 private constant STEP_7 = 67.85 ether;
uint256 private constant STEP_8 = 76.67 ether;
mapping (uint256 => address) public currentOwner;
mapping (address => uint256) private numOwnedTokens;
mapping (uint256 => address) public approvedToTransfer;
mapping (uint256 => uint256) private currentPrice;
address public ceoAddress;
address public cooAddress;
bool public inPresaleMode = true;
bool public paused = false;
bool public allowMigrate = true;
address public newContractAddress;
bool public _allowBuyDirect = false;
struct ExoplanetRec {
uint8 lifeRate;
bool canBePurchased;
uint32 priceInExoTokens;
uint32 numOfTokensBonusOnPurchase;
string name;
string nickname;
string cryptoMatch;
string techBonus1;
string techBonus2;
string techBonus3;
string scientificData;
}
ExoplanetRec[] private exoplanets;
address public marketplaceAddress;
modifier onlyCEO() {
}
modifier migrateAllowed() {
}
modifier whenNotPaused() {
}
modifier whenPaused() {
}
function turnMigrateOff() public onlyCEO() {
}
function pause() public onlyCEO() whenNotPaused() {
}
function unpause() public onlyCEO() whenPaused() {
}
modifier allowBuyDirect() {
}
function setBuyDirectMode(bool newMode, address newMarketplace) public onlyCEO {
}
function setPurchaseableMode(uint256 tokenId, bool _canBePurchased, uint256 _newPrice) public afterPresaleMode() {
}
function getPurchaseableMode(uint256 tokenId) public view returns (bool) {
}
function setNewAddress(address _v2Address) public onlyCEO() whenPaused() {
}
modifier onlyCOO() {
}
modifier presaleModeActive() {
}
modifier afterPresaleMode() {
}
modifier onlyCLevel() {
}
function setCEO(address newCEO) public onlyCEO {
}
function setCOO(address newCOO) public onlyCEO {
}
function setPresaleMode(bool newMode) public onlyCEO {
}
/*** CONSTRUCTOR ***/
function ExoplanetToken() public {
}
function approve(address to, uint256 tokenId) public {
}
function balanceOf(address owner) public view returns (uint256 balance) {
}
function bytes32ToString(bytes32 x) private pure returns (string) {
}
function migrateSinglePlanet(
uint256 origTokenId, string name, uint256 priceInEther, uint32 priceInExoTokens,
string cryptoMatch, uint32 numOfTokensBonusOnPurchase,
uint8 lifeRate, string scientificData, address owner) public onlyCLevel migrateAllowed {
}
function _migrateExoplanet(
uint256 origTokenId, string name, uint256 priceInEther, uint32 priceInExoTokens,
string cryptoMatch, uint32 numOfTokensBonusOnPurchase, uint8 lifeRate,
string scientificData, address owner) private {
}
function createContractExoplanet(
string name, uint256 priceInEther, uint32 priceInExoTokens,
string cryptoMatch, uint32 numOfTokensBonusOnPurchase,
uint8 lifeRate, string scientificData) public onlyCLevel returns (uint256) {
}
function _createExoplanet(
string name, address owner, uint256 priceInEther, uint32 priceInExoTokens,
string cryptoMatch, uint32 numOfTokensBonusOnPurchase, uint8 lifeRate,
string scientificData) private returns (uint256) {
}
function unownedPlanet(uint256 tokenId) private view returns (bool) {
}
function getPlanetName(uint256 tokenId) public view returns (string) {
}
function getNickname(uint256 tokenId) public view returns (string) {
}
function getPriceInExoTokens(uint256 tokenId) public view returns (uint32) {
}
function getLifeRate(uint256 tokenId) public view returns (uint8) {
}
function getNumOfTokensBonusOnPurchase(uint256 tokenId) public view returns (uint32) {
}
function getCryptoMatch(uint256 tokenId) public view returns (string) {
}
function getTechBonus1(uint256 tokenId) public view returns (string) {
}
function getTechBonus2(uint256 tokenId) public view returns (string) {
}
function getTechBonus3(uint256 tokenId) public view returns (string) {
}
function getScientificData(uint256 tokenId) public view returns (string) {
}
function setTechBonus1(uint256 tokenId, string newVal) public {
}
function setTechBonus2(uint256 tokenId, string newVal) public {
}
function setTechBonus3(uint256 tokenId, string newVal) public {
}
function setPriceInEth(uint256 tokenId, uint256 newPrice) public afterPresaleMode() {
}
function setUnownedPriceInEth(uint256 tokenId, uint256 newPrice) public onlyCLevel {
}
function setUnownedPurchaseableMode(uint256 tokenId, bool _canBePurchased) public onlyCLevel {
}
function setPriceInExoTokens(uint256 tokenId, uint32 newPrice) public afterPresaleMode() {
}
function setUnownedPriceInExoTokens(uint256 tokenId, uint32 newPrice) public onlyCLevel {
}
function setScientificData(uint256 tokenId, string newData) public onlyCLevel {
}
function setUnownedName(uint256 tokenId, string newData) public onlyCLevel {
}
function setUnownedNickname(uint256 tokenId, string newData) public onlyCLevel {
}
function setCryptoMatchValue(uint256 tokenId, string newData) public onlyCLevel {
}
function setUnownedNumOfExoTokensBonus(uint256 tokenId, uint32 newData) public onlyCLevel {
}
function setUnownedLifeRate(uint256 tokenId, uint8 newData) public onlyCLevel {
}
function getExoplanet(uint256 tokenId) public view returns (
uint8 lifeRate,
bool canBePurchased,
uint32 priceInExoTokens,
uint32 numOfTokensBonusOnPurchase,
string name,
string nickname,
string cryptoMatch,
string scientificData,
uint256 sellingPriceInEther,
address owner) {
}
function implementsERC721() public pure returns (bool) {
}
function ownerOf(uint256 tokenId) public view returns (address owner) {
}
function transferUnownedPlanet(address newOwner, uint256 tokenId) public onlyCLevel {
}
function purchase(uint256 tokenId) public payable whenNotPaused() presaleModeActive() {
}
function buyDirectInMarketplace(uint256 tokenId) public payable
whenNotPaused() afterPresaleMode() allowBuyDirect() {
require(<FILL_ME>)
uint256 planetPrice = currentPrice[tokenId];
require(msg.value >= planetPrice);
address seller = currentOwner[tokenId];
if (seller != address(this)) {
seller.transfer(planetPrice);
}
_transfer(seller, msg.sender, tokenId);
TokenSold(tokenId, planetPrice, currentPrice[tokenId], seller, msg.sender, exoplanets[tokenId].name);
}
function priceOf(uint256 tokenId) public view returns (uint256) {
}
function takeOwnership(uint256 tokenId) public whenNotPaused() {
}
function tokensOfOwner(address owner) public view returns(uint256[] ownerTokens) {
}
function name() external view returns (string name) {
}
function symbol() external view returns (string symbol) {
}
function tokenURI(uint256 _tokenId) external view returns (string uri) {
}
function totalSupply() public view returns (uint256 total) {
}
function transfer(address to, uint256 tokenId) public whenNotPaused() {
}
function transferFrom(address from, address to, uint256 tokenId) public whenNotPaused() {
}
function addressNotNull(address addr) private pure returns (bool) {
}
function approved(address to, uint256 tokenId) private view returns (bool) {
}
function owns(address claimant, uint256 tokenId) private view returns (bool) {
}
function payout() public onlyCLevel {
}
function payoutPartial(uint256 amount) public onlyCLevel {
}
function _transfer(address from, address to, uint256 tokenId) private {
}
function appendNumToString(string baseUrl, uint256 tokenId) private pure returns (string) {
}
function numToString(uint256 tokenId) private pure returns (string str) {
}
function uintToBytes32(uint v) private pure returns (bytes32 ret) {
}
}
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) {
}
}
| exoplanets[tokenId].canBePurchased | 44,073 | exoplanets[tokenId].canBePurchased |
null | pragma solidity ^0.4.19;
contract ERC721 {
function approve(address to, uint256 tokenId) public;
function balanceOf(address owner) public view returns (uint256 balance);
function implementsERC721() public pure returns (bool);
function ownerOf(uint256 tokenId) public view returns (address addr);
function takeOwnership(uint256 tokenId) public;
function totalSupply() public view returns (uint256 total);
function transferFrom(address from, address to, uint256 tokenId) public;
function transfer(address to, uint256 tokenId) public;
event Transfer(address indexed from, address indexed to, uint256 tokenId);
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
function name() external view returns (string name);
function symbol() external view returns (string symbol);
function tokenURI(uint256 _tokenId) external view returns (string uri);
}
contract ExoplanetToken is ERC721 {
using SafeMath for uint256;
event Birth(uint256 indexed tokenId, string name, uint32 numOfTokensBonusOnPurchase, address owner);
event TokenSold(uint256 tokenId, uint256 oldPriceInEther, uint256 newPriceInEther, address prevOwner, address winner, string name);
event Transfer(address from, address to, uint256 tokenId);
event ContractUpgrade(address newContract);
string private constant CONTRACT_NAME = "ExoPlanets";
string private constant CONTRACT_SYMBOL = "XPL";
string public constant BASE_URL = "https://exoplanets.io/metadata/planet_";
uint32 private constant NUM_EXOPLANETS_LIMIT = 10000;
uint256 private constant STEP_1 = 5.0 ether;
uint256 private constant STEP_2 = 10.0 ether;
uint256 private constant STEP_3 = 26.0 ether;
uint256 private constant STEP_4 = 36.0 ether;
uint256 private constant STEP_5 = 47.0 ether;
uint256 private constant STEP_6 = 59.0 ether;
uint256 private constant STEP_7 = 67.85 ether;
uint256 private constant STEP_8 = 76.67 ether;
mapping (uint256 => address) public currentOwner;
mapping (address => uint256) private numOwnedTokens;
mapping (uint256 => address) public approvedToTransfer;
mapping (uint256 => uint256) private currentPrice;
address public ceoAddress;
address public cooAddress;
bool public inPresaleMode = true;
bool public paused = false;
bool public allowMigrate = true;
address public newContractAddress;
bool public _allowBuyDirect = false;
struct ExoplanetRec {
uint8 lifeRate;
bool canBePurchased;
uint32 priceInExoTokens;
uint32 numOfTokensBonusOnPurchase;
string name;
string nickname;
string cryptoMatch;
string techBonus1;
string techBonus2;
string techBonus3;
string scientificData;
}
ExoplanetRec[] private exoplanets;
address public marketplaceAddress;
modifier onlyCEO() {
}
modifier migrateAllowed() {
}
modifier whenNotPaused() {
}
modifier whenPaused() {
}
function turnMigrateOff() public onlyCEO() {
}
function pause() public onlyCEO() whenNotPaused() {
}
function unpause() public onlyCEO() whenPaused() {
}
modifier allowBuyDirect() {
}
function setBuyDirectMode(bool newMode, address newMarketplace) public onlyCEO {
}
function setPurchaseableMode(uint256 tokenId, bool _canBePurchased, uint256 _newPrice) public afterPresaleMode() {
}
function getPurchaseableMode(uint256 tokenId) public view returns (bool) {
}
function setNewAddress(address _v2Address) public onlyCEO() whenPaused() {
}
modifier onlyCOO() {
}
modifier presaleModeActive() {
}
modifier afterPresaleMode() {
}
modifier onlyCLevel() {
}
function setCEO(address newCEO) public onlyCEO {
}
function setCOO(address newCOO) public onlyCEO {
}
function setPresaleMode(bool newMode) public onlyCEO {
}
/*** CONSTRUCTOR ***/
function ExoplanetToken() public {
}
function approve(address to, uint256 tokenId) public {
}
function balanceOf(address owner) public view returns (uint256 balance) {
}
function bytes32ToString(bytes32 x) private pure returns (string) {
}
function migrateSinglePlanet(
uint256 origTokenId, string name, uint256 priceInEther, uint32 priceInExoTokens,
string cryptoMatch, uint32 numOfTokensBonusOnPurchase,
uint8 lifeRate, string scientificData, address owner) public onlyCLevel migrateAllowed {
}
function _migrateExoplanet(
uint256 origTokenId, string name, uint256 priceInEther, uint32 priceInExoTokens,
string cryptoMatch, uint32 numOfTokensBonusOnPurchase, uint8 lifeRate,
string scientificData, address owner) private {
}
function createContractExoplanet(
string name, uint256 priceInEther, uint32 priceInExoTokens,
string cryptoMatch, uint32 numOfTokensBonusOnPurchase,
uint8 lifeRate, string scientificData) public onlyCLevel returns (uint256) {
}
function _createExoplanet(
string name, address owner, uint256 priceInEther, uint32 priceInExoTokens,
string cryptoMatch, uint32 numOfTokensBonusOnPurchase, uint8 lifeRate,
string scientificData) private returns (uint256) {
}
function unownedPlanet(uint256 tokenId) private view returns (bool) {
}
function getPlanetName(uint256 tokenId) public view returns (string) {
}
function getNickname(uint256 tokenId) public view returns (string) {
}
function getPriceInExoTokens(uint256 tokenId) public view returns (uint32) {
}
function getLifeRate(uint256 tokenId) public view returns (uint8) {
}
function getNumOfTokensBonusOnPurchase(uint256 tokenId) public view returns (uint32) {
}
function getCryptoMatch(uint256 tokenId) public view returns (string) {
}
function getTechBonus1(uint256 tokenId) public view returns (string) {
}
function getTechBonus2(uint256 tokenId) public view returns (string) {
}
function getTechBonus3(uint256 tokenId) public view returns (string) {
}
function getScientificData(uint256 tokenId) public view returns (string) {
}
function setTechBonus1(uint256 tokenId, string newVal) public {
}
function setTechBonus2(uint256 tokenId, string newVal) public {
}
function setTechBonus3(uint256 tokenId, string newVal) public {
}
function setPriceInEth(uint256 tokenId, uint256 newPrice) public afterPresaleMode() {
}
function setUnownedPriceInEth(uint256 tokenId, uint256 newPrice) public onlyCLevel {
}
function setUnownedPurchaseableMode(uint256 tokenId, bool _canBePurchased) public onlyCLevel {
}
function setPriceInExoTokens(uint256 tokenId, uint32 newPrice) public afterPresaleMode() {
}
function setUnownedPriceInExoTokens(uint256 tokenId, uint32 newPrice) public onlyCLevel {
}
function setScientificData(uint256 tokenId, string newData) public onlyCLevel {
}
function setUnownedName(uint256 tokenId, string newData) public onlyCLevel {
}
function setUnownedNickname(uint256 tokenId, string newData) public onlyCLevel {
}
function setCryptoMatchValue(uint256 tokenId, string newData) public onlyCLevel {
}
function setUnownedNumOfExoTokensBonus(uint256 tokenId, uint32 newData) public onlyCLevel {
}
function setUnownedLifeRate(uint256 tokenId, uint8 newData) public onlyCLevel {
}
function getExoplanet(uint256 tokenId) public view returns (
uint8 lifeRate,
bool canBePurchased,
uint32 priceInExoTokens,
uint32 numOfTokensBonusOnPurchase,
string name,
string nickname,
string cryptoMatch,
string scientificData,
uint256 sellingPriceInEther,
address owner) {
}
function implementsERC721() public pure returns (bool) {
}
function ownerOf(uint256 tokenId) public view returns (address owner) {
}
function transferUnownedPlanet(address newOwner, uint256 tokenId) public onlyCLevel {
}
function purchase(uint256 tokenId) public payable whenNotPaused() presaleModeActive() {
}
function buyDirectInMarketplace(uint256 tokenId) public payable
whenNotPaused() afterPresaleMode() allowBuyDirect() {
}
function priceOf(uint256 tokenId) public view returns (uint256) {
}
function takeOwnership(uint256 tokenId) public whenNotPaused() {
require(addressNotNull(msg.sender));
require(<FILL_ME>)
_transfer(currentOwner[tokenId], msg.sender, tokenId);
}
function tokensOfOwner(address owner) public view returns(uint256[] ownerTokens) {
}
function name() external view returns (string name) {
}
function symbol() external view returns (string symbol) {
}
function tokenURI(uint256 _tokenId) external view returns (string uri) {
}
function totalSupply() public view returns (uint256 total) {
}
function transfer(address to, uint256 tokenId) public whenNotPaused() {
}
function transferFrom(address from, address to, uint256 tokenId) public whenNotPaused() {
}
function addressNotNull(address addr) private pure returns (bool) {
}
function approved(address to, uint256 tokenId) private view returns (bool) {
}
function owns(address claimant, uint256 tokenId) private view returns (bool) {
}
function payout() public onlyCLevel {
}
function payoutPartial(uint256 amount) public onlyCLevel {
}
function _transfer(address from, address to, uint256 tokenId) private {
}
function appendNumToString(string baseUrl, uint256 tokenId) private pure returns (string) {
}
function numToString(uint256 tokenId) private pure returns (string str) {
}
function uintToBytes32(uint v) private pure returns (bytes32 ret) {
}
}
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) {
}
}
| approved(msg.sender,tokenId) | 44,073 | approved(msg.sender,tokenId) |
null | pragma solidity ^0.4.19;
contract ERC721 {
function approve(address to, uint256 tokenId) public;
function balanceOf(address owner) public view returns (uint256 balance);
function implementsERC721() public pure returns (bool);
function ownerOf(uint256 tokenId) public view returns (address addr);
function takeOwnership(uint256 tokenId) public;
function totalSupply() public view returns (uint256 total);
function transferFrom(address from, address to, uint256 tokenId) public;
function transfer(address to, uint256 tokenId) public;
event Transfer(address indexed from, address indexed to, uint256 tokenId);
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
function name() external view returns (string name);
function symbol() external view returns (string symbol);
function tokenURI(uint256 _tokenId) external view returns (string uri);
}
contract ExoplanetToken is ERC721 {
using SafeMath for uint256;
event Birth(uint256 indexed tokenId, string name, uint32 numOfTokensBonusOnPurchase, address owner);
event TokenSold(uint256 tokenId, uint256 oldPriceInEther, uint256 newPriceInEther, address prevOwner, address winner, string name);
event Transfer(address from, address to, uint256 tokenId);
event ContractUpgrade(address newContract);
string private constant CONTRACT_NAME = "ExoPlanets";
string private constant CONTRACT_SYMBOL = "XPL";
string public constant BASE_URL = "https://exoplanets.io/metadata/planet_";
uint32 private constant NUM_EXOPLANETS_LIMIT = 10000;
uint256 private constant STEP_1 = 5.0 ether;
uint256 private constant STEP_2 = 10.0 ether;
uint256 private constant STEP_3 = 26.0 ether;
uint256 private constant STEP_4 = 36.0 ether;
uint256 private constant STEP_5 = 47.0 ether;
uint256 private constant STEP_6 = 59.0 ether;
uint256 private constant STEP_7 = 67.85 ether;
uint256 private constant STEP_8 = 76.67 ether;
mapping (uint256 => address) public currentOwner;
mapping (address => uint256) private numOwnedTokens;
mapping (uint256 => address) public approvedToTransfer;
mapping (uint256 => uint256) private currentPrice;
address public ceoAddress;
address public cooAddress;
bool public inPresaleMode = true;
bool public paused = false;
bool public allowMigrate = true;
address public newContractAddress;
bool public _allowBuyDirect = false;
struct ExoplanetRec {
uint8 lifeRate;
bool canBePurchased;
uint32 priceInExoTokens;
uint32 numOfTokensBonusOnPurchase;
string name;
string nickname;
string cryptoMatch;
string techBonus1;
string techBonus2;
string techBonus3;
string scientificData;
}
ExoplanetRec[] private exoplanets;
address public marketplaceAddress;
modifier onlyCEO() {
}
modifier migrateAllowed() {
}
modifier whenNotPaused() {
}
modifier whenPaused() {
}
function turnMigrateOff() public onlyCEO() {
}
function pause() public onlyCEO() whenNotPaused() {
}
function unpause() public onlyCEO() whenPaused() {
}
modifier allowBuyDirect() {
}
function setBuyDirectMode(bool newMode, address newMarketplace) public onlyCEO {
}
function setPurchaseableMode(uint256 tokenId, bool _canBePurchased, uint256 _newPrice) public afterPresaleMode() {
}
function getPurchaseableMode(uint256 tokenId) public view returns (bool) {
}
function setNewAddress(address _v2Address) public onlyCEO() whenPaused() {
}
modifier onlyCOO() {
}
modifier presaleModeActive() {
}
modifier afterPresaleMode() {
}
modifier onlyCLevel() {
}
function setCEO(address newCEO) public onlyCEO {
}
function setCOO(address newCOO) public onlyCEO {
}
function setPresaleMode(bool newMode) public onlyCEO {
}
/*** CONSTRUCTOR ***/
function ExoplanetToken() public {
}
function approve(address to, uint256 tokenId) public {
}
function balanceOf(address owner) public view returns (uint256 balance) {
}
function bytes32ToString(bytes32 x) private pure returns (string) {
}
function migrateSinglePlanet(
uint256 origTokenId, string name, uint256 priceInEther, uint32 priceInExoTokens,
string cryptoMatch, uint32 numOfTokensBonusOnPurchase,
uint8 lifeRate, string scientificData, address owner) public onlyCLevel migrateAllowed {
}
function _migrateExoplanet(
uint256 origTokenId, string name, uint256 priceInEther, uint32 priceInExoTokens,
string cryptoMatch, uint32 numOfTokensBonusOnPurchase, uint8 lifeRate,
string scientificData, address owner) private {
}
function createContractExoplanet(
string name, uint256 priceInEther, uint32 priceInExoTokens,
string cryptoMatch, uint32 numOfTokensBonusOnPurchase,
uint8 lifeRate, string scientificData) public onlyCLevel returns (uint256) {
}
function _createExoplanet(
string name, address owner, uint256 priceInEther, uint32 priceInExoTokens,
string cryptoMatch, uint32 numOfTokensBonusOnPurchase, uint8 lifeRate,
string scientificData) private returns (uint256) {
}
function unownedPlanet(uint256 tokenId) private view returns (bool) {
}
function getPlanetName(uint256 tokenId) public view returns (string) {
}
function getNickname(uint256 tokenId) public view returns (string) {
}
function getPriceInExoTokens(uint256 tokenId) public view returns (uint32) {
}
function getLifeRate(uint256 tokenId) public view returns (uint8) {
}
function getNumOfTokensBonusOnPurchase(uint256 tokenId) public view returns (uint32) {
}
function getCryptoMatch(uint256 tokenId) public view returns (string) {
}
function getTechBonus1(uint256 tokenId) public view returns (string) {
}
function getTechBonus2(uint256 tokenId) public view returns (string) {
}
function getTechBonus3(uint256 tokenId) public view returns (string) {
}
function getScientificData(uint256 tokenId) public view returns (string) {
}
function setTechBonus1(uint256 tokenId, string newVal) public {
}
function setTechBonus2(uint256 tokenId, string newVal) public {
}
function setTechBonus3(uint256 tokenId, string newVal) public {
}
function setPriceInEth(uint256 tokenId, uint256 newPrice) public afterPresaleMode() {
}
function setUnownedPriceInEth(uint256 tokenId, uint256 newPrice) public onlyCLevel {
}
function setUnownedPurchaseableMode(uint256 tokenId, bool _canBePurchased) public onlyCLevel {
}
function setPriceInExoTokens(uint256 tokenId, uint32 newPrice) public afterPresaleMode() {
}
function setUnownedPriceInExoTokens(uint256 tokenId, uint32 newPrice) public onlyCLevel {
}
function setScientificData(uint256 tokenId, string newData) public onlyCLevel {
}
function setUnownedName(uint256 tokenId, string newData) public onlyCLevel {
}
function setUnownedNickname(uint256 tokenId, string newData) public onlyCLevel {
}
function setCryptoMatchValue(uint256 tokenId, string newData) public onlyCLevel {
}
function setUnownedNumOfExoTokensBonus(uint256 tokenId, uint32 newData) public onlyCLevel {
}
function setUnownedLifeRate(uint256 tokenId, uint8 newData) public onlyCLevel {
}
function getExoplanet(uint256 tokenId) public view returns (
uint8 lifeRate,
bool canBePurchased,
uint32 priceInExoTokens,
uint32 numOfTokensBonusOnPurchase,
string name,
string nickname,
string cryptoMatch,
string scientificData,
uint256 sellingPriceInEther,
address owner) {
}
function implementsERC721() public pure returns (bool) {
}
function ownerOf(uint256 tokenId) public view returns (address owner) {
}
function transferUnownedPlanet(address newOwner, uint256 tokenId) public onlyCLevel {
}
function purchase(uint256 tokenId) public payable whenNotPaused() presaleModeActive() {
}
function buyDirectInMarketplace(uint256 tokenId) public payable
whenNotPaused() afterPresaleMode() allowBuyDirect() {
}
function priceOf(uint256 tokenId) public view returns (uint256) {
}
function takeOwnership(uint256 tokenId) public whenNotPaused() {
}
function tokensOfOwner(address owner) public view returns(uint256[] ownerTokens) {
}
function name() external view returns (string name) {
}
function symbol() external view returns (string symbol) {
}
function tokenURI(uint256 _tokenId) external view returns (string uri) {
}
function totalSupply() public view returns (uint256 total) {
}
function transfer(address to, uint256 tokenId) public whenNotPaused() {
require(owns(msg.sender, tokenId));
require(<FILL_ME>)
_transfer(msg.sender, to, tokenId);
}
function transferFrom(address from, address to, uint256 tokenId) public whenNotPaused() {
}
function addressNotNull(address addr) private pure returns (bool) {
}
function approved(address to, uint256 tokenId) private view returns (bool) {
}
function owns(address claimant, uint256 tokenId) private view returns (bool) {
}
function payout() public onlyCLevel {
}
function payoutPartial(uint256 amount) public onlyCLevel {
}
function _transfer(address from, address to, uint256 tokenId) private {
}
function appendNumToString(string baseUrl, uint256 tokenId) private pure returns (string) {
}
function numToString(uint256 tokenId) private pure returns (string str) {
}
function uintToBytes32(uint v) private pure returns (bytes32 ret) {
}
}
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) {
}
}
| addressNotNull(to) | 44,073 | addressNotNull(to) |
null | pragma solidity ^0.4.19;
contract ERC721 {
function approve(address to, uint256 tokenId) public;
function balanceOf(address owner) public view returns (uint256 balance);
function implementsERC721() public pure returns (bool);
function ownerOf(uint256 tokenId) public view returns (address addr);
function takeOwnership(uint256 tokenId) public;
function totalSupply() public view returns (uint256 total);
function transferFrom(address from, address to, uint256 tokenId) public;
function transfer(address to, uint256 tokenId) public;
event Transfer(address indexed from, address indexed to, uint256 tokenId);
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
function name() external view returns (string name);
function symbol() external view returns (string symbol);
function tokenURI(uint256 _tokenId) external view returns (string uri);
}
contract ExoplanetToken is ERC721 {
using SafeMath for uint256;
event Birth(uint256 indexed tokenId, string name, uint32 numOfTokensBonusOnPurchase, address owner);
event TokenSold(uint256 tokenId, uint256 oldPriceInEther, uint256 newPriceInEther, address prevOwner, address winner, string name);
event Transfer(address from, address to, uint256 tokenId);
event ContractUpgrade(address newContract);
string private constant CONTRACT_NAME = "ExoPlanets";
string private constant CONTRACT_SYMBOL = "XPL";
string public constant BASE_URL = "https://exoplanets.io/metadata/planet_";
uint32 private constant NUM_EXOPLANETS_LIMIT = 10000;
uint256 private constant STEP_1 = 5.0 ether;
uint256 private constant STEP_2 = 10.0 ether;
uint256 private constant STEP_3 = 26.0 ether;
uint256 private constant STEP_4 = 36.0 ether;
uint256 private constant STEP_5 = 47.0 ether;
uint256 private constant STEP_6 = 59.0 ether;
uint256 private constant STEP_7 = 67.85 ether;
uint256 private constant STEP_8 = 76.67 ether;
mapping (uint256 => address) public currentOwner;
mapping (address => uint256) private numOwnedTokens;
mapping (uint256 => address) public approvedToTransfer;
mapping (uint256 => uint256) private currentPrice;
address public ceoAddress;
address public cooAddress;
bool public inPresaleMode = true;
bool public paused = false;
bool public allowMigrate = true;
address public newContractAddress;
bool public _allowBuyDirect = false;
struct ExoplanetRec {
uint8 lifeRate;
bool canBePurchased;
uint32 priceInExoTokens;
uint32 numOfTokensBonusOnPurchase;
string name;
string nickname;
string cryptoMatch;
string techBonus1;
string techBonus2;
string techBonus3;
string scientificData;
}
ExoplanetRec[] private exoplanets;
address public marketplaceAddress;
modifier onlyCEO() {
}
modifier migrateAllowed() {
}
modifier whenNotPaused() {
}
modifier whenPaused() {
}
function turnMigrateOff() public onlyCEO() {
}
function pause() public onlyCEO() whenNotPaused() {
}
function unpause() public onlyCEO() whenPaused() {
}
modifier allowBuyDirect() {
}
function setBuyDirectMode(bool newMode, address newMarketplace) public onlyCEO {
}
function setPurchaseableMode(uint256 tokenId, bool _canBePurchased, uint256 _newPrice) public afterPresaleMode() {
}
function getPurchaseableMode(uint256 tokenId) public view returns (bool) {
}
function setNewAddress(address _v2Address) public onlyCEO() whenPaused() {
}
modifier onlyCOO() {
}
modifier presaleModeActive() {
}
modifier afterPresaleMode() {
}
modifier onlyCLevel() {
}
function setCEO(address newCEO) public onlyCEO {
}
function setCOO(address newCOO) public onlyCEO {
}
function setPresaleMode(bool newMode) public onlyCEO {
}
/*** CONSTRUCTOR ***/
function ExoplanetToken() public {
}
function approve(address to, uint256 tokenId) public {
}
function balanceOf(address owner) public view returns (uint256 balance) {
}
function bytes32ToString(bytes32 x) private pure returns (string) {
}
function migrateSinglePlanet(
uint256 origTokenId, string name, uint256 priceInEther, uint32 priceInExoTokens,
string cryptoMatch, uint32 numOfTokensBonusOnPurchase,
uint8 lifeRate, string scientificData, address owner) public onlyCLevel migrateAllowed {
}
function _migrateExoplanet(
uint256 origTokenId, string name, uint256 priceInEther, uint32 priceInExoTokens,
string cryptoMatch, uint32 numOfTokensBonusOnPurchase, uint8 lifeRate,
string scientificData, address owner) private {
}
function createContractExoplanet(
string name, uint256 priceInEther, uint32 priceInExoTokens,
string cryptoMatch, uint32 numOfTokensBonusOnPurchase,
uint8 lifeRate, string scientificData) public onlyCLevel returns (uint256) {
}
function _createExoplanet(
string name, address owner, uint256 priceInEther, uint32 priceInExoTokens,
string cryptoMatch, uint32 numOfTokensBonusOnPurchase, uint8 lifeRate,
string scientificData) private returns (uint256) {
}
function unownedPlanet(uint256 tokenId) private view returns (bool) {
}
function getPlanetName(uint256 tokenId) public view returns (string) {
}
function getNickname(uint256 tokenId) public view returns (string) {
}
function getPriceInExoTokens(uint256 tokenId) public view returns (uint32) {
}
function getLifeRate(uint256 tokenId) public view returns (uint8) {
}
function getNumOfTokensBonusOnPurchase(uint256 tokenId) public view returns (uint32) {
}
function getCryptoMatch(uint256 tokenId) public view returns (string) {
}
function getTechBonus1(uint256 tokenId) public view returns (string) {
}
function getTechBonus2(uint256 tokenId) public view returns (string) {
}
function getTechBonus3(uint256 tokenId) public view returns (string) {
}
function getScientificData(uint256 tokenId) public view returns (string) {
}
function setTechBonus1(uint256 tokenId, string newVal) public {
}
function setTechBonus2(uint256 tokenId, string newVal) public {
}
function setTechBonus3(uint256 tokenId, string newVal) public {
}
function setPriceInEth(uint256 tokenId, uint256 newPrice) public afterPresaleMode() {
}
function setUnownedPriceInEth(uint256 tokenId, uint256 newPrice) public onlyCLevel {
}
function setUnownedPurchaseableMode(uint256 tokenId, bool _canBePurchased) public onlyCLevel {
}
function setPriceInExoTokens(uint256 tokenId, uint32 newPrice) public afterPresaleMode() {
}
function setUnownedPriceInExoTokens(uint256 tokenId, uint32 newPrice) public onlyCLevel {
}
function setScientificData(uint256 tokenId, string newData) public onlyCLevel {
}
function setUnownedName(uint256 tokenId, string newData) public onlyCLevel {
}
function setUnownedNickname(uint256 tokenId, string newData) public onlyCLevel {
}
function setCryptoMatchValue(uint256 tokenId, string newData) public onlyCLevel {
}
function setUnownedNumOfExoTokensBonus(uint256 tokenId, uint32 newData) public onlyCLevel {
}
function setUnownedLifeRate(uint256 tokenId, uint8 newData) public onlyCLevel {
}
function getExoplanet(uint256 tokenId) public view returns (
uint8 lifeRate,
bool canBePurchased,
uint32 priceInExoTokens,
uint32 numOfTokensBonusOnPurchase,
string name,
string nickname,
string cryptoMatch,
string scientificData,
uint256 sellingPriceInEther,
address owner) {
}
function implementsERC721() public pure returns (bool) {
}
function ownerOf(uint256 tokenId) public view returns (address owner) {
}
function transferUnownedPlanet(address newOwner, uint256 tokenId) public onlyCLevel {
}
function purchase(uint256 tokenId) public payable whenNotPaused() presaleModeActive() {
}
function buyDirectInMarketplace(uint256 tokenId) public payable
whenNotPaused() afterPresaleMode() allowBuyDirect() {
}
function priceOf(uint256 tokenId) public view returns (uint256) {
}
function takeOwnership(uint256 tokenId) public whenNotPaused() {
}
function tokensOfOwner(address owner) public view returns(uint256[] ownerTokens) {
}
function name() external view returns (string name) {
}
function symbol() external view returns (string symbol) {
}
function tokenURI(uint256 _tokenId) external view returns (string uri) {
}
function totalSupply() public view returns (uint256 total) {
}
function transfer(address to, uint256 tokenId) public whenNotPaused() {
}
function transferFrom(address from, address to, uint256 tokenId) public whenNotPaused() {
require(<FILL_ME>)
require(approved(msg.sender, tokenId));
require(addressNotNull(to));
_transfer(from, to, tokenId);
}
function addressNotNull(address addr) private pure returns (bool) {
}
function approved(address to, uint256 tokenId) private view returns (bool) {
}
function owns(address claimant, uint256 tokenId) private view returns (bool) {
}
function payout() public onlyCLevel {
}
function payoutPartial(uint256 amount) public onlyCLevel {
}
function _transfer(address from, address to, uint256 tokenId) private {
}
function appendNumToString(string baseUrl, uint256 tokenId) private pure returns (string) {
}
function numToString(uint256 tokenId) private pure returns (string str) {
}
function uintToBytes32(uint v) private pure returns (bytes32 ret) {
}
}
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) {
}
}
| owns(from,tokenId) | 44,073 | owns(from,tokenId) |
null | pragma solidity >=0.4.22 <0.6.0;
/**
* @title SafeMath
* @dev Math operations with safety checks that revert on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two numbers truncating the quotient, reverts on division by zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, reverts on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Divides two numbers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic
* authorization control functions, this simplifies the implementation of
* "user permissions".
*/
contract Ownable {
using SafeMath for uint256;
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 {
}
/**
* @dev Allows the owner to withdraw the ether for conversion to USD to handle
* tax credits properly.
* Note: this function withdraws the entire balance of the contract!
* @param destination The destination address to withdraw the funds to
*/
function withdraw(address payable destination) public onlyOwner {
}
/**
* @dev Allows the owner to view the current balance of the contract to 6 decimal places
*/
function getBalance() public view onlyOwner returns (uint256) {
}
}
/**
* @title Tokenization of tax credits
*
* @dev Implementation of a permissioned token.
*/
contract TaxCredit is Ownable {
using SafeMath for uint256;
mapping (address => uint256) private balances;
mapping (address => string) private emails;
address[] addresses;
uint256 public minimumPurchase = 1950 ether; // minimum purchase is 300,000 credits (270,000 USD)
uint256 private _totalSupply;
uint256 private exchangeRate = (270000 ether / minimumPurchase) + 1; // convert to credit tokens - account for integer division
uint256 private discountRate = 1111111111111111111 wei; // giving credits at 10% discount (90 * 1.11111 = 100)
string public name = "Tax Credit Token";
string public symbol = "TCT";
uint public INITIAL_SUPPLY = 20000000; // 20m credits reserved for use by Clean Energy Systems LLC
event Transfer(
address indexed from,
address indexed to,
uint256 value
);
event Exchange(
string indexed email,
address indexed addr,
uint256 value
);
constructor() public {
}
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
}
/**
* @dev Gets the balance of the specified address.
* @param owner The address to query the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address owner) public view returns (uint256) {
}
/**
* @dev Transfer tokens from one address to another - since there are off-chain legal
* transactions that must occur, this function can only be called by the owner; any
* entity that wants to transfer tax credit tokens must go through the contract owner in order
* to get legal documents dispersed first
* @param from address The address to send tokens from
* @param to address The address to transfer to
* @param value uint256 the amount of tokens to be transferred
*/
function transferFrom(address from, address to, uint256 value) public onlyOwner {
}
/**
* @dev Public function that mints an amount of the token and assigns it to
* an account. This encapsulates the modification of balances such that the
* proper events are emitted. Only the owner of the contract can mint tokens at will.
* @param account The account that will receive the created tokens.
* @param value The amount that will be created.
*/
function mint(address account, uint256 value) public onlyOwner {
}
/**
* @dev Internal function that handles and executes the minting of tokens. This
* function exists because there are times when tokens may need to be minted,
* but not by the owner of the contract (namely, when participants exchange their
* ether for tokens).
* @param account The account that will receive the created tokens.
* @param value The amount that will be created.
*/
function _handleMint(address account, uint256 value) internal {
}
/**
* @dev Internal function that burns an amount of the token of a given
* account.
* @param account The account whose tokens will be burnt.
* @param value The amount that will be burnt.
*/
function burn(address account, uint256 value) public onlyOwner {
}
/**
* @dev Allows entities to exchange their Ethereum for tokens representing
* their tax credits. This function mints new tax credit tokens that are backed
* by the ethereum sent to exchange for them.
*/
function exchange(string memory email) public payable {
require(msg.value > minimumPurchase);
require(<FILL_ME>) // require email parameter
addresses.push(msg.sender);
emails[msg.sender] = email;
uint256 tokens = msg.value.mul(exchangeRate);
tokens = tokens.mul(discountRate);
tokens = tokens.div(1 ether).div(1 ether); // offset exchange rate & discount rate multiplications
_handleMint(msg.sender, tokens);
emit Exchange(email, msg.sender, tokens);
}
/**
* @dev Allows owner to change minimum purchase in order to keep minimum
* tax credit exchange around a certain USD threshold
* @param newMinimum The new minimum amount of ether required to purchase tax credit tokens
*/
function changeMinimumExchange(uint256 newMinimum) public onlyOwner {
}
/**
* @dev Return a list of all participants in the contract by address
*/
function getAllAddresses() public view returns (address[] memory) {
}
/**
* @dev Return the email of a participant by Ethereum address
* @param addr The address from which to retrieve the email
*/
function getParticipantEmail(address addr) public view returns (string memory) {
}
/*
* @dev Return all addresses belonging to a certain email (it is possible that an
* entity may purchase tax credit tokens multiple times with different Ethereum addresses).
*
* NOTE: This transaction may incur a significant gas cost as more participants purchase credits.
*/
function getAllAddresses(string memory email) public view onlyOwner returns (address[] memory) {
}
}
| keccak256(bytes(email))!=keccak256(bytes("")) | 44,135 | keccak256(bytes(email))!=keccak256(bytes("")) |
"Sale is finished" | pragma solidity ^0.6.0;
// SPDX-License-Identifier: UNLICENSED
// ----------------------------------------------------------------------------
// 'FORMS' SALE 1 CONTRACT
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// SafeMath library
// ----------------------------------------------------------------------------
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function ceil(uint a, uint m) internal pure returns (uint r) {
}
}
// ----------------------------------------------------------------------------
// ERC Token Standard #20 Interface
// ----------------------------------------------------------------------------
interface IFORMS {
function transfer(address to, uint256 tokens) external returns (bool success);
function setTokenLock (uint256 lockedTokens, uint256 cliffTime, address purchaser) external;
function burnTokens(uint256 _amount) external;
function balanceOf(address tokenOwner) external view returns (uint256 balance);
}
contract FORMS_SALE_1{
using SafeMath for uint256;
string public tokenPrice = '0.000128 ether';
address public FORMS_TOKEN_ADDRESS;
uint256 public saleEndDate = 0;
address payable owner = 0xA6a3E445E613FF022a3001091C7bE274B6a409B0;
modifier onlyOwner {
}
function setTokenAddress(address _tokenAddress) external onlyOwner{
}
function startSale() external onlyOwner{
}
receive() external payable{
// checks if sale is started or not
require(saleEndDate > 0, "Sale has not started");
// check minimum condition
require(msg.value >= 0.1 ether, "Not enough investment");
uint256 remainingSaleTokens = IFORMS(FORMS_TOKEN_ADDRESS).balanceOf(address(this));
// check if burning is needed
if(remainingSaleTokens > 0 && block.timestamp > saleEndDate)
IFORMS(FORMS_TOKEN_ADDRESS).burnTokens(remainingSaleTokens);
// checks if sale is finished
require(<FILL_ME>)
// receive ethers
uint tokens = getTokenAmount(msg.value);
// transfer tokens
IFORMS(FORMS_TOKEN_ADDRESS).transfer(msg.sender, tokens);
// update the locking for this account
IFORMS(FORMS_TOKEN_ADDRESS).setTokenLock(tokens, saleEndDate.add(24 hours), msg.sender);
// send received funds to the owner
owner.transfer(msg.value);
}
function getTokenAmount(uint256 amount) private pure returns(uint256){
}
}
| IFORMS(FORMS_TOKEN_ADDRESS).balanceOf(address(this))>0,"Sale is finished" | 44,152 | IFORMS(FORMS_TOKEN_ADDRESS).balanceOf(address(this))>0 |
"NG::NFT: All vikings have been minted." | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "./libraries/TransferHelper.sol";
contract NGNFT is ERC721Enumerable, ERC721URIStorage {
uint public tokenIdTracker;
bool public publicMint = false;
bool public canTransfer = false;
uint256 public maxVikingsTotal;
uint256 public pricePerViking;
uint public maxVikingPerTransaction;
string public baseURIValue;
mapping (address => bool) private admins;
constructor(
string memory name,
string memory symbol,
uint256 _pricePerViking,
uint256 _maxVikings,
uint _maxVikingPerTransaction,
string memory _baseUri
) ERC721(name, symbol) {
}
function isAdmin(address maybeAdmin) private view returns (bool) {
}
modifier onlyAdmin {
}
function freeMint(address to, uint amount) external onlyAdmin {
require(<FILL_ME>)
_mintMultiple(amount, to);
}
function mint(uint amount) external payable {
}
function _mintMultiple(uint amount, address to) private {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI_) external onlyAdmin {
}
function setTokenURI(uint256 tokenId, string memory _tokenURI) external onlyAdmin {
}
function tokenURI(uint256 tokenId) public view override(ERC721, ERC721URIStorage) returns (string memory) {
}
function _burn(uint256 tokenId) internal virtual override(ERC721, ERC721URIStorage) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override(ERC721, ERC721Enumerable) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
}
function flipPublicMint() external onlyAdmin {
}
function flipCanTrade() external onlyAdmin {
}
function setAdmin(address maybeAdmin, bool _isAdmin) external onlyAdmin {
}
function withdrawErc(address token, address recipient, uint256 amount) external onlyAdmin {
}
function withdrawETH(address recipient, uint256 amount) external onlyAdmin {
}
}
| (tokenIdTracker+amount)<maxVikingsTotal,"NG::NFT: All vikings have been minted." | 44,255 | (tokenIdTracker+amount)<maxVikingsTotal |
"NG::NFT: Insufficient funds." | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "./libraries/TransferHelper.sol";
contract NGNFT is ERC721Enumerable, ERC721URIStorage {
uint public tokenIdTracker;
bool public publicMint = false;
bool public canTransfer = false;
uint256 public maxVikingsTotal;
uint256 public pricePerViking;
uint public maxVikingPerTransaction;
string public baseURIValue;
mapping (address => bool) private admins;
constructor(
string memory name,
string memory symbol,
uint256 _pricePerViking,
uint256 _maxVikings,
uint _maxVikingPerTransaction,
string memory _baseUri
) ERC721(name, symbol) {
}
function isAdmin(address maybeAdmin) private view returns (bool) {
}
modifier onlyAdmin {
}
function freeMint(address to, uint amount) external onlyAdmin {
}
function mint(uint amount) external payable {
require(publicMint, "NG::NFT: Minting currently disabled.");
require(<FILL_ME>)
require((tokenIdTracker + amount) < maxVikingsTotal, "NG::NFT: All vikings have been minted.");
require(amount <= maxVikingPerTransaction, "NG::NFT: Too many vikings in single transaction.");
_mintMultiple(amount, msg.sender);
}
function _mintMultiple(uint amount, address to) private {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI_) external onlyAdmin {
}
function setTokenURI(uint256 tokenId, string memory _tokenURI) external onlyAdmin {
}
function tokenURI(uint256 tokenId) public view override(ERC721, ERC721URIStorage) returns (string memory) {
}
function _burn(uint256 tokenId) internal virtual override(ERC721, ERC721URIStorage) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override(ERC721, ERC721Enumerable) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
}
function flipPublicMint() external onlyAdmin {
}
function flipCanTrade() external onlyAdmin {
}
function setAdmin(address maybeAdmin, bool _isAdmin) external onlyAdmin {
}
function withdrawErc(address token, address recipient, uint256 amount) external onlyAdmin {
}
function withdrawETH(address recipient, uint256 amount) external onlyAdmin {
}
}
| msg.value>=(amount*pricePerViking),"NG::NFT: Insufficient funds." | 44,255 | msg.value>=(amount*pricePerViking) |
"User is not staking." | pragma solidity ^0.8.0;
// SPDX-License-Identifier: MIT
import "./IERC20.sol";
import "./Ownable.sol";
import "./SafeMath.sol";
contract RiddlerStakingLocked is Ownable {
using SafeMath for uint256;
uint256 public totalStaked;
IERC20 public stakingToken;
IERC20 public rewardToken;
uint256 public apr;
uint256 public lockDuration;
uint256 public stakeStart;
bool public stakingEnabled = false;
struct Staker {
address staker;
uint256 start;
uint256 staked;
uint256 earned;
}
mapping(address => Staker) private _stakers;
constructor (IERC20 _stakingToken, IERC20 _rewardToken, uint256 _startAPR, uint256 _duration) {
}
function isStaking(address stakerAddr) public view returns (bool) {
}
function userStaked(address staker) public view returns (uint256) {
}
function userEarnedTotal(address staker) public view returns (uint256) {
}
function stakingStart(address staker) public view returns (uint256) {
}
function _isLocked(address staker) private view returns (bool) {
}
function _userEarned(address staker) private view returns (uint256) {
require(<FILL_ME>)
uint256 staked = userStaked(staker);
uint256 stakersStartInSeconds = _stakers[staker].start.div(1 seconds);
uint256 blockTimestampInSeconds = block.timestamp.div(1 seconds);
uint256 secondsStaked = blockTimestampInSeconds.sub(stakersStartInSeconds);
uint256 decAPR = apr.div(100);
uint256 rewardPerSec = staked.mul(decAPR).div(365).div(24).div(60).div(60);
uint256 earned = rewardPerSec.mul(secondsStaked).div(10**18);
return earned;
}
function stake(uint256 stakeAmount) external {
}
function claim() external {
}
function unstake() external {
}
function emergencyWithdrawToken(IERC20 token) external onlyOwner() {
}
function emergencyWithdrawTokenAmount(IERC20 token, uint256 amount) external onlyOwner() {
}
function setState(bool onoff) external onlyOwner() {
}
receive() external payable {}
}
| isStaking(staker),"User is not staking." | 44,299 | isStaking(staker) |
"You are not staking!?" | pragma solidity ^0.8.0;
// SPDX-License-Identifier: MIT
import "./IERC20.sol";
import "./Ownable.sol";
import "./SafeMath.sol";
contract RiddlerStakingLocked is Ownable {
using SafeMath for uint256;
uint256 public totalStaked;
IERC20 public stakingToken;
IERC20 public rewardToken;
uint256 public apr;
uint256 public lockDuration;
uint256 public stakeStart;
bool public stakingEnabled = false;
struct Staker {
address staker;
uint256 start;
uint256 staked;
uint256 earned;
}
mapping(address => Staker) private _stakers;
constructor (IERC20 _stakingToken, IERC20 _rewardToken, uint256 _startAPR, uint256 _duration) {
}
function isStaking(address stakerAddr) public view returns (bool) {
}
function userStaked(address staker) public view returns (uint256) {
}
function userEarnedTotal(address staker) public view returns (uint256) {
}
function stakingStart(address staker) public view returns (uint256) {
}
function _isLocked(address staker) private view returns (bool) {
}
function _userEarned(address staker) private view returns (uint256) {
}
function stake(uint256 stakeAmount) external {
}
function claim() external {
require(stakingEnabled, "Staking is not enabled");
require(<FILL_ME>)
uint256 reward = userEarnedTotal(msg.sender);
stakingToken.transfer(msg.sender, reward);
_stakers[msg.sender].start = block.timestamp;
_stakers[msg.sender].earned = 0;
}
function unstake() external {
}
function emergencyWithdrawToken(IERC20 token) external onlyOwner() {
}
function emergencyWithdrawTokenAmount(IERC20 token, uint256 amount) external onlyOwner() {
}
function setState(bool onoff) external onlyOwner() {
}
receive() external payable {}
}
| isStaking(msg.sender),"You are not staking!?" | 44,299 | isStaking(msg.sender) |
"Your tokens are currently locked" | pragma solidity ^0.8.0;
// SPDX-License-Identifier: MIT
import "./IERC20.sol";
import "./Ownable.sol";
import "./SafeMath.sol";
contract RiddlerStakingLocked is Ownable {
using SafeMath for uint256;
uint256 public totalStaked;
IERC20 public stakingToken;
IERC20 public rewardToken;
uint256 public apr;
uint256 public lockDuration;
uint256 public stakeStart;
bool public stakingEnabled = false;
struct Staker {
address staker;
uint256 start;
uint256 staked;
uint256 earned;
}
mapping(address => Staker) private _stakers;
constructor (IERC20 _stakingToken, IERC20 _rewardToken, uint256 _startAPR, uint256 _duration) {
}
function isStaking(address stakerAddr) public view returns (bool) {
}
function userStaked(address staker) public view returns (uint256) {
}
function userEarnedTotal(address staker) public view returns (uint256) {
}
function stakingStart(address staker) public view returns (uint256) {
}
function _isLocked(address staker) private view returns (bool) {
}
function _userEarned(address staker) private view returns (uint256) {
}
function stake(uint256 stakeAmount) external {
}
function claim() external {
}
function unstake() external {
require(stakingEnabled, "Staking is not enabled");
require(isStaking(msg.sender), "You are not staking!?");
require(<FILL_ME>)
uint256 reward = userEarnedTotal(msg.sender);
stakingToken.transfer(msg.sender, _stakers[msg.sender].staked.add(reward));
totalStaked -= _stakers[msg.sender].staked;
delete _stakers[msg.sender];
}
function emergencyWithdrawToken(IERC20 token) external onlyOwner() {
}
function emergencyWithdrawTokenAmount(IERC20 token, uint256 amount) external onlyOwner() {
}
function setState(bool onoff) external onlyOwner() {
}
receive() external payable {}
}
| !_isLocked(msg.sender),"Your tokens are currently locked" | 44,299 | !_isLocked(msg.sender) |
"Season minting is Paused" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract XHouses is
ERC721,
Ownable,
ReentrancyGuard,
VRFConsumerBase,
PaymentSplitter
{
using Strings for uint256;
uint256 public SEASON_COUNT = 0;
uint256 totalPublicMinted = 0;
struct Season {
uint256 season_number;
uint256 price;
uint256 unit_count; // @dev total supply
uint256 walletLimit; // @dev per wallet mint limit
uint256 tokenOffset; // @dev each season has a unique offset
string provenanceHash;
string uri;
bool paused;
bool publicOpen;
bool revealed;
}
struct WalletCount {
mapping(uint256 => uint256) season_mints;
}
// address => season mapping
mapping(uint256 => Season) public seasons;
mapping(uint256 => uint256) public season_offsets;
mapping(uint256 => uint256) public season_minted;
mapping(address => WalletCount) internal season_wallet_mints;
mapping(uint256 => bool) seasonPresale;
mapping(address => uint256[]) public presaleList;
mapping(bytes32 => uint256) internal season_randIDs;
address[] internal payees;
// LINK
uint256 internal LINK_FEE;
bytes32 internal LINK_KEY_HASH;
constructor(
bytes32 _keyHash,
address _vrfCoordinator,
address _linkToken,
uint256 _linkFee,
address[] memory _payees,
uint256[] memory _shares
)
payable
ERC721("X Houses", "XHS")
VRFConsumerBase(_vrfCoordinator, _linkToken)
PaymentSplitter(_payees, _shares)
{
}
// @dev convinence function for returning the offset token ID
function xhouseID(uint256 _id) public view returns (uint256 houseID) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
function presalePurchase(uint256 _season, uint256 _quantity)
public
payable
nonReentrant
{
require(<FILL_ME>)
require(
onPresaleList(_season, msg.sender) == true,
"Wallet not on the presale list"
);
_mint(_season, _quantity);
}
function purchase(uint256 _season, uint256 _quantity)
public
payable
nonReentrant
{
}
function _mint(uint256 _season, uint256 _quantity) internal {
}
function onPresaleList(uint256 _season, address _address)
public
view
returns (bool)
{
}
// onlyOwner functions
function addSeason(
uint256 _seasonNum,
uint256 _price,
uint256 _count,
uint256 _walletLimit,
string memory _provenance,
string memory _baseURI
) external onlyOwner {
}
function addSeasonPresale(uint256 _season, address[] calldata _list)
external
onlyOwner
{
}
function requestSeasonRandom(uint256 _season) public onlyOwner {
}
function setSeasonRequestID(bytes32 _requestId, uint256 _season) public {
}
// @dev chainlink callback function for requestRandomness
function fulfillRandomness(bytes32 requestId, uint256 randomness)
internal
override
{
}
function setSeasonURI(uint256 _season, string memory _uri)
external
onlyOwner
{
}
function setSeasonPause(uint256 _season, bool _state) external onlyOwner {
}
function setSeasonPublic(uint256 _season, bool _state) external onlyOwner {
}
function revealSeason(uint256 _season, bool _state) external onlyOwner {
}
function setSeasonWalletLimit(uint256 _season, uint256 _limit)
external
onlyOwner
{
}
// @dev gift a single token to each address passed in through calldata
// @param _season uint256 season number
// @param _recipients Array of addresses to send a single token to
function gift(uint256 _season, address[] calldata _recipients)
external
onlyOwner
{
}
function withdrawAll() external onlyOwner {
}
}
| !seasons[_season].paused,"Season minting is Paused" | 44,334 | !seasons[_season].paused |
"Wallet not on the presale list" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract XHouses is
ERC721,
Ownable,
ReentrancyGuard,
VRFConsumerBase,
PaymentSplitter
{
using Strings for uint256;
uint256 public SEASON_COUNT = 0;
uint256 totalPublicMinted = 0;
struct Season {
uint256 season_number;
uint256 price;
uint256 unit_count; // @dev total supply
uint256 walletLimit; // @dev per wallet mint limit
uint256 tokenOffset; // @dev each season has a unique offset
string provenanceHash;
string uri;
bool paused;
bool publicOpen;
bool revealed;
}
struct WalletCount {
mapping(uint256 => uint256) season_mints;
}
// address => season mapping
mapping(uint256 => Season) public seasons;
mapping(uint256 => uint256) public season_offsets;
mapping(uint256 => uint256) public season_minted;
mapping(address => WalletCount) internal season_wallet_mints;
mapping(uint256 => bool) seasonPresale;
mapping(address => uint256[]) public presaleList;
mapping(bytes32 => uint256) internal season_randIDs;
address[] internal payees;
// LINK
uint256 internal LINK_FEE;
bytes32 internal LINK_KEY_HASH;
constructor(
bytes32 _keyHash,
address _vrfCoordinator,
address _linkToken,
uint256 _linkFee,
address[] memory _payees,
uint256[] memory _shares
)
payable
ERC721("X Houses", "XHS")
VRFConsumerBase(_vrfCoordinator, _linkToken)
PaymentSplitter(_payees, _shares)
{
}
// @dev convinence function for returning the offset token ID
function xhouseID(uint256 _id) public view returns (uint256 houseID) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
function presalePurchase(uint256 _season, uint256 _quantity)
public
payable
nonReentrant
{
require(!seasons[_season].paused, "Season minting is Paused");
require(<FILL_ME>)
_mint(_season, _quantity);
}
function purchase(uint256 _season, uint256 _quantity)
public
payable
nonReentrant
{
}
function _mint(uint256 _season, uint256 _quantity) internal {
}
function onPresaleList(uint256 _season, address _address)
public
view
returns (bool)
{
}
// onlyOwner functions
function addSeason(
uint256 _seasonNum,
uint256 _price,
uint256 _count,
uint256 _walletLimit,
string memory _provenance,
string memory _baseURI
) external onlyOwner {
}
function addSeasonPresale(uint256 _season, address[] calldata _list)
external
onlyOwner
{
}
function requestSeasonRandom(uint256 _season) public onlyOwner {
}
function setSeasonRequestID(bytes32 _requestId, uint256 _season) public {
}
// @dev chainlink callback function for requestRandomness
function fulfillRandomness(bytes32 requestId, uint256 randomness)
internal
override
{
}
function setSeasonURI(uint256 _season, string memory _uri)
external
onlyOwner
{
}
function setSeasonPause(uint256 _season, bool _state) external onlyOwner {
}
function setSeasonPublic(uint256 _season, bool _state) external onlyOwner {
}
function revealSeason(uint256 _season, bool _state) external onlyOwner {
}
function setSeasonWalletLimit(uint256 _season, uint256 _limit)
external
onlyOwner
{
}
// @dev gift a single token to each address passed in through calldata
// @param _season uint256 season number
// @param _recipients Array of addresses to send a single token to
function gift(uint256 _season, address[] calldata _recipients)
external
onlyOwner
{
}
function withdrawAll() external onlyOwner {
}
}
| onPresaleList(_season,msg.sender)==true,"Wallet not on the presale list" | 44,334 | onPresaleList(_season,msg.sender)==true |
"Public sales are closed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract XHouses is
ERC721,
Ownable,
ReentrancyGuard,
VRFConsumerBase,
PaymentSplitter
{
using Strings for uint256;
uint256 public SEASON_COUNT = 0;
uint256 totalPublicMinted = 0;
struct Season {
uint256 season_number;
uint256 price;
uint256 unit_count; // @dev total supply
uint256 walletLimit; // @dev per wallet mint limit
uint256 tokenOffset; // @dev each season has a unique offset
string provenanceHash;
string uri;
bool paused;
bool publicOpen;
bool revealed;
}
struct WalletCount {
mapping(uint256 => uint256) season_mints;
}
// address => season mapping
mapping(uint256 => Season) public seasons;
mapping(uint256 => uint256) public season_offsets;
mapping(uint256 => uint256) public season_minted;
mapping(address => WalletCount) internal season_wallet_mints;
mapping(uint256 => bool) seasonPresale;
mapping(address => uint256[]) public presaleList;
mapping(bytes32 => uint256) internal season_randIDs;
address[] internal payees;
// LINK
uint256 internal LINK_FEE;
bytes32 internal LINK_KEY_HASH;
constructor(
bytes32 _keyHash,
address _vrfCoordinator,
address _linkToken,
uint256 _linkFee,
address[] memory _payees,
uint256[] memory _shares
)
payable
ERC721("X Houses", "XHS")
VRFConsumerBase(_vrfCoordinator, _linkToken)
PaymentSplitter(_payees, _shares)
{
}
// @dev convinence function for returning the offset token ID
function xhouseID(uint256 _id) public view returns (uint256 houseID) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
function presalePurchase(uint256 _season, uint256 _quantity)
public
payable
nonReentrant
{
}
function purchase(uint256 _season, uint256 _quantity)
public
payable
nonReentrant
{
require(!seasons[_season].paused, "Season minting is Paused");
require(<FILL_ME>)
require(
seasons[_season].season_number == _season,
"Season does not exist"
);
_mint(_season, _quantity);
}
function _mint(uint256 _season, uint256 _quantity) internal {
}
function onPresaleList(uint256 _season, address _address)
public
view
returns (bool)
{
}
// onlyOwner functions
function addSeason(
uint256 _seasonNum,
uint256 _price,
uint256 _count,
uint256 _walletLimit,
string memory _provenance,
string memory _baseURI
) external onlyOwner {
}
function addSeasonPresale(uint256 _season, address[] calldata _list)
external
onlyOwner
{
}
function requestSeasonRandom(uint256 _season) public onlyOwner {
}
function setSeasonRequestID(bytes32 _requestId, uint256 _season) public {
}
// @dev chainlink callback function for requestRandomness
function fulfillRandomness(bytes32 requestId, uint256 randomness)
internal
override
{
}
function setSeasonURI(uint256 _season, string memory _uri)
external
onlyOwner
{
}
function setSeasonPause(uint256 _season, bool _state) external onlyOwner {
}
function setSeasonPublic(uint256 _season, bool _state) external onlyOwner {
}
function revealSeason(uint256 _season, bool _state) external onlyOwner {
}
function setSeasonWalletLimit(uint256 _season, uint256 _limit)
external
onlyOwner
{
}
// @dev gift a single token to each address passed in through calldata
// @param _season uint256 season number
// @param _recipients Array of addresses to send a single token to
function gift(uint256 _season, address[] calldata _recipients)
external
onlyOwner
{
}
function withdrawAll() external onlyOwner {
}
}
| seasons[_season].publicOpen,"Public sales are closed" | 44,334 | seasons[_season].publicOpen |
"Season does not exist" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract XHouses is
ERC721,
Ownable,
ReentrancyGuard,
VRFConsumerBase,
PaymentSplitter
{
using Strings for uint256;
uint256 public SEASON_COUNT = 0;
uint256 totalPublicMinted = 0;
struct Season {
uint256 season_number;
uint256 price;
uint256 unit_count; // @dev total supply
uint256 walletLimit; // @dev per wallet mint limit
uint256 tokenOffset; // @dev each season has a unique offset
string provenanceHash;
string uri;
bool paused;
bool publicOpen;
bool revealed;
}
struct WalletCount {
mapping(uint256 => uint256) season_mints;
}
// address => season mapping
mapping(uint256 => Season) public seasons;
mapping(uint256 => uint256) public season_offsets;
mapping(uint256 => uint256) public season_minted;
mapping(address => WalletCount) internal season_wallet_mints;
mapping(uint256 => bool) seasonPresale;
mapping(address => uint256[]) public presaleList;
mapping(bytes32 => uint256) internal season_randIDs;
address[] internal payees;
// LINK
uint256 internal LINK_FEE;
bytes32 internal LINK_KEY_HASH;
constructor(
bytes32 _keyHash,
address _vrfCoordinator,
address _linkToken,
uint256 _linkFee,
address[] memory _payees,
uint256[] memory _shares
)
payable
ERC721("X Houses", "XHS")
VRFConsumerBase(_vrfCoordinator, _linkToken)
PaymentSplitter(_payees, _shares)
{
}
// @dev convinence function for returning the offset token ID
function xhouseID(uint256 _id) public view returns (uint256 houseID) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
function presalePurchase(uint256 _season, uint256 _quantity)
public
payable
nonReentrant
{
}
function purchase(uint256 _season, uint256 _quantity)
public
payable
nonReentrant
{
require(!seasons[_season].paused, "Season minting is Paused");
require(seasons[_season].publicOpen, "Public sales are closed");
require(<FILL_ME>)
_mint(_season, _quantity);
}
function _mint(uint256 _season, uint256 _quantity) internal {
}
function onPresaleList(uint256 _season, address _address)
public
view
returns (bool)
{
}
// onlyOwner functions
function addSeason(
uint256 _seasonNum,
uint256 _price,
uint256 _count,
uint256 _walletLimit,
string memory _provenance,
string memory _baseURI
) external onlyOwner {
}
function addSeasonPresale(uint256 _season, address[] calldata _list)
external
onlyOwner
{
}
function requestSeasonRandom(uint256 _season) public onlyOwner {
}
function setSeasonRequestID(bytes32 _requestId, uint256 _season) public {
}
// @dev chainlink callback function for requestRandomness
function fulfillRandomness(bytes32 requestId, uint256 randomness)
internal
override
{
}
function setSeasonURI(uint256 _season, string memory _uri)
external
onlyOwner
{
}
function setSeasonPause(uint256 _season, bool _state) external onlyOwner {
}
function setSeasonPublic(uint256 _season, bool _state) external onlyOwner {
}
function revealSeason(uint256 _season, bool _state) external onlyOwner {
}
function setSeasonWalletLimit(uint256 _season, uint256 _limit)
external
onlyOwner
{
}
// @dev gift a single token to each address passed in through calldata
// @param _season uint256 season number
// @param _recipients Array of addresses to send a single token to
function gift(uint256 _season, address[] calldata _recipients)
external
onlyOwner
{
}
function withdrawAll() external onlyOwner {
}
}
| seasons[_season].season_number==_season,"Season does not exist" | 44,334 | seasons[_season].season_number==_season |
"Not enough minerals" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract XHouses is
ERC721,
Ownable,
ReentrancyGuard,
VRFConsumerBase,
PaymentSplitter
{
using Strings for uint256;
uint256 public SEASON_COUNT = 0;
uint256 totalPublicMinted = 0;
struct Season {
uint256 season_number;
uint256 price;
uint256 unit_count; // @dev total supply
uint256 walletLimit; // @dev per wallet mint limit
uint256 tokenOffset; // @dev each season has a unique offset
string provenanceHash;
string uri;
bool paused;
bool publicOpen;
bool revealed;
}
struct WalletCount {
mapping(uint256 => uint256) season_mints;
}
// address => season mapping
mapping(uint256 => Season) public seasons;
mapping(uint256 => uint256) public season_offsets;
mapping(uint256 => uint256) public season_minted;
mapping(address => WalletCount) internal season_wallet_mints;
mapping(uint256 => bool) seasonPresale;
mapping(address => uint256[]) public presaleList;
mapping(bytes32 => uint256) internal season_randIDs;
address[] internal payees;
// LINK
uint256 internal LINK_FEE;
bytes32 internal LINK_KEY_HASH;
constructor(
bytes32 _keyHash,
address _vrfCoordinator,
address _linkToken,
uint256 _linkFee,
address[] memory _payees,
uint256[] memory _shares
)
payable
ERC721("X Houses", "XHS")
VRFConsumerBase(_vrfCoordinator, _linkToken)
PaymentSplitter(_payees, _shares)
{
}
// @dev convinence function for returning the offset token ID
function xhouseID(uint256 _id) public view returns (uint256 houseID) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
function presalePurchase(uint256 _season, uint256 _quantity)
public
payable
nonReentrant
{
}
function purchase(uint256 _season, uint256 _quantity)
public
payable
nonReentrant
{
}
function _mint(uint256 _season, uint256 _quantity) internal {
require(<FILL_ME>)
require(
season_wallet_mints[msg.sender].season_mints[_season] <
seasons[_season].walletLimit,
"Wallet has minted maximum allowed"
);
require(
season_minted[_season] + _quantity <= seasons[_season].unit_count,
"not enough tokens in available supply"
);
// mint and increment once for each number;
for (uint256 i = 0; i < _quantity; i++) {
uint256 tokenID = season_offsets[_season - 1] +
season_minted[_season] +
1;
_safeMint(msg.sender, tokenID);
totalPublicMinted += 1;
season_minted[_season] += 1;
season_wallet_mints[msg.sender].season_mints[_season] += 1;
}
}
function onPresaleList(uint256 _season, address _address)
public
view
returns (bool)
{
}
// onlyOwner functions
function addSeason(
uint256 _seasonNum,
uint256 _price,
uint256 _count,
uint256 _walletLimit,
string memory _provenance,
string memory _baseURI
) external onlyOwner {
}
function addSeasonPresale(uint256 _season, address[] calldata _list)
external
onlyOwner
{
}
function requestSeasonRandom(uint256 _season) public onlyOwner {
}
function setSeasonRequestID(bytes32 _requestId, uint256 _season) public {
}
// @dev chainlink callback function for requestRandomness
function fulfillRandomness(bytes32 requestId, uint256 randomness)
internal
override
{
}
function setSeasonURI(uint256 _season, string memory _uri)
external
onlyOwner
{
}
function setSeasonPause(uint256 _season, bool _state) external onlyOwner {
}
function setSeasonPublic(uint256 _season, bool _state) external onlyOwner {
}
function revealSeason(uint256 _season, bool _state) external onlyOwner {
}
function setSeasonWalletLimit(uint256 _season, uint256 _limit)
external
onlyOwner
{
}
// @dev gift a single token to each address passed in through calldata
// @param _season uint256 season number
// @param _recipients Array of addresses to send a single token to
function gift(uint256 _season, address[] calldata _recipients)
external
onlyOwner
{
}
function withdrawAll() external onlyOwner {
}
}
| _quantity*seasons[_season].price<=msg.value,"Not enough minerals" | 44,334 | _quantity*seasons[_season].price<=msg.value |
"Wallet has minted maximum allowed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract XHouses is
ERC721,
Ownable,
ReentrancyGuard,
VRFConsumerBase,
PaymentSplitter
{
using Strings for uint256;
uint256 public SEASON_COUNT = 0;
uint256 totalPublicMinted = 0;
struct Season {
uint256 season_number;
uint256 price;
uint256 unit_count; // @dev total supply
uint256 walletLimit; // @dev per wallet mint limit
uint256 tokenOffset; // @dev each season has a unique offset
string provenanceHash;
string uri;
bool paused;
bool publicOpen;
bool revealed;
}
struct WalletCount {
mapping(uint256 => uint256) season_mints;
}
// address => season mapping
mapping(uint256 => Season) public seasons;
mapping(uint256 => uint256) public season_offsets;
mapping(uint256 => uint256) public season_minted;
mapping(address => WalletCount) internal season_wallet_mints;
mapping(uint256 => bool) seasonPresale;
mapping(address => uint256[]) public presaleList;
mapping(bytes32 => uint256) internal season_randIDs;
address[] internal payees;
// LINK
uint256 internal LINK_FEE;
bytes32 internal LINK_KEY_HASH;
constructor(
bytes32 _keyHash,
address _vrfCoordinator,
address _linkToken,
uint256 _linkFee,
address[] memory _payees,
uint256[] memory _shares
)
payable
ERC721("X Houses", "XHS")
VRFConsumerBase(_vrfCoordinator, _linkToken)
PaymentSplitter(_payees, _shares)
{
}
// @dev convinence function for returning the offset token ID
function xhouseID(uint256 _id) public view returns (uint256 houseID) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
function presalePurchase(uint256 _season, uint256 _quantity)
public
payable
nonReentrant
{
}
function purchase(uint256 _season, uint256 _quantity)
public
payable
nonReentrant
{
}
function _mint(uint256 _season, uint256 _quantity) internal {
require(
_quantity * seasons[_season].price <= msg.value,
"Not enough minerals"
);
require(<FILL_ME>)
require(
season_minted[_season] + _quantity <= seasons[_season].unit_count,
"not enough tokens in available supply"
);
// mint and increment once for each number;
for (uint256 i = 0; i < _quantity; i++) {
uint256 tokenID = season_offsets[_season - 1] +
season_minted[_season] +
1;
_safeMint(msg.sender, tokenID);
totalPublicMinted += 1;
season_minted[_season] += 1;
season_wallet_mints[msg.sender].season_mints[_season] += 1;
}
}
function onPresaleList(uint256 _season, address _address)
public
view
returns (bool)
{
}
// onlyOwner functions
function addSeason(
uint256 _seasonNum,
uint256 _price,
uint256 _count,
uint256 _walletLimit,
string memory _provenance,
string memory _baseURI
) external onlyOwner {
}
function addSeasonPresale(uint256 _season, address[] calldata _list)
external
onlyOwner
{
}
function requestSeasonRandom(uint256 _season) public onlyOwner {
}
function setSeasonRequestID(bytes32 _requestId, uint256 _season) public {
}
// @dev chainlink callback function for requestRandomness
function fulfillRandomness(bytes32 requestId, uint256 randomness)
internal
override
{
}
function setSeasonURI(uint256 _season, string memory _uri)
external
onlyOwner
{
}
function setSeasonPause(uint256 _season, bool _state) external onlyOwner {
}
function setSeasonPublic(uint256 _season, bool _state) external onlyOwner {
}
function revealSeason(uint256 _season, bool _state) external onlyOwner {
}
function setSeasonWalletLimit(uint256 _season, uint256 _limit)
external
onlyOwner
{
}
// @dev gift a single token to each address passed in through calldata
// @param _season uint256 season number
// @param _recipients Array of addresses to send a single token to
function gift(uint256 _season, address[] calldata _recipients)
external
onlyOwner
{
}
function withdrawAll() external onlyOwner {
}
}
| season_wallet_mints[msg.sender].season_mints[_season]<seasons[_season].walletLimit,"Wallet has minted maximum allowed" | 44,334 | season_wallet_mints[msg.sender].season_mints[_season]<seasons[_season].walletLimit |
"not enough tokens in available supply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract XHouses is
ERC721,
Ownable,
ReentrancyGuard,
VRFConsumerBase,
PaymentSplitter
{
using Strings for uint256;
uint256 public SEASON_COUNT = 0;
uint256 totalPublicMinted = 0;
struct Season {
uint256 season_number;
uint256 price;
uint256 unit_count; // @dev total supply
uint256 walletLimit; // @dev per wallet mint limit
uint256 tokenOffset; // @dev each season has a unique offset
string provenanceHash;
string uri;
bool paused;
bool publicOpen;
bool revealed;
}
struct WalletCount {
mapping(uint256 => uint256) season_mints;
}
// address => season mapping
mapping(uint256 => Season) public seasons;
mapping(uint256 => uint256) public season_offsets;
mapping(uint256 => uint256) public season_minted;
mapping(address => WalletCount) internal season_wallet_mints;
mapping(uint256 => bool) seasonPresale;
mapping(address => uint256[]) public presaleList;
mapping(bytes32 => uint256) internal season_randIDs;
address[] internal payees;
// LINK
uint256 internal LINK_FEE;
bytes32 internal LINK_KEY_HASH;
constructor(
bytes32 _keyHash,
address _vrfCoordinator,
address _linkToken,
uint256 _linkFee,
address[] memory _payees,
uint256[] memory _shares
)
payable
ERC721("X Houses", "XHS")
VRFConsumerBase(_vrfCoordinator, _linkToken)
PaymentSplitter(_payees, _shares)
{
}
// @dev convinence function for returning the offset token ID
function xhouseID(uint256 _id) public view returns (uint256 houseID) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
function presalePurchase(uint256 _season, uint256 _quantity)
public
payable
nonReentrant
{
}
function purchase(uint256 _season, uint256 _quantity)
public
payable
nonReentrant
{
}
function _mint(uint256 _season, uint256 _quantity) internal {
require(
_quantity * seasons[_season].price <= msg.value,
"Not enough minerals"
);
require(
season_wallet_mints[msg.sender].season_mints[_season] <
seasons[_season].walletLimit,
"Wallet has minted maximum allowed"
);
require(<FILL_ME>)
// mint and increment once for each number;
for (uint256 i = 0; i < _quantity; i++) {
uint256 tokenID = season_offsets[_season - 1] +
season_minted[_season] +
1;
_safeMint(msg.sender, tokenID);
totalPublicMinted += 1;
season_minted[_season] += 1;
season_wallet_mints[msg.sender].season_mints[_season] += 1;
}
}
function onPresaleList(uint256 _season, address _address)
public
view
returns (bool)
{
}
// onlyOwner functions
function addSeason(
uint256 _seasonNum,
uint256 _price,
uint256 _count,
uint256 _walletLimit,
string memory _provenance,
string memory _baseURI
) external onlyOwner {
}
function addSeasonPresale(uint256 _season, address[] calldata _list)
external
onlyOwner
{
}
function requestSeasonRandom(uint256 _season) public onlyOwner {
}
function setSeasonRequestID(bytes32 _requestId, uint256 _season) public {
}
// @dev chainlink callback function for requestRandomness
function fulfillRandomness(bytes32 requestId, uint256 randomness)
internal
override
{
}
function setSeasonURI(uint256 _season, string memory _uri)
external
onlyOwner
{
}
function setSeasonPause(uint256 _season, bool _state) external onlyOwner {
}
function setSeasonPublic(uint256 _season, bool _state) external onlyOwner {
}
function revealSeason(uint256 _season, bool _state) external onlyOwner {
}
function setSeasonWalletLimit(uint256 _season, uint256 _limit)
external
onlyOwner
{
}
// @dev gift a single token to each address passed in through calldata
// @param _season uint256 season number
// @param _recipients Array of addresses to send a single token to
function gift(uint256 _season, address[] calldata _recipients)
external
onlyOwner
{
}
function withdrawAll() external onlyOwner {
}
}
| season_minted[_season]+_quantity<=seasons[_season].unit_count,"not enough tokens in available supply" | 44,334 | season_minted[_season]+_quantity<=seasons[_season].unit_count |
"Season Already exists" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract XHouses is
ERC721,
Ownable,
ReentrancyGuard,
VRFConsumerBase,
PaymentSplitter
{
using Strings for uint256;
uint256 public SEASON_COUNT = 0;
uint256 totalPublicMinted = 0;
struct Season {
uint256 season_number;
uint256 price;
uint256 unit_count; // @dev total supply
uint256 walletLimit; // @dev per wallet mint limit
uint256 tokenOffset; // @dev each season has a unique offset
string provenanceHash;
string uri;
bool paused;
bool publicOpen;
bool revealed;
}
struct WalletCount {
mapping(uint256 => uint256) season_mints;
}
// address => season mapping
mapping(uint256 => Season) public seasons;
mapping(uint256 => uint256) public season_offsets;
mapping(uint256 => uint256) public season_minted;
mapping(address => WalletCount) internal season_wallet_mints;
mapping(uint256 => bool) seasonPresale;
mapping(address => uint256[]) public presaleList;
mapping(bytes32 => uint256) internal season_randIDs;
address[] internal payees;
// LINK
uint256 internal LINK_FEE;
bytes32 internal LINK_KEY_HASH;
constructor(
bytes32 _keyHash,
address _vrfCoordinator,
address _linkToken,
uint256 _linkFee,
address[] memory _payees,
uint256[] memory _shares
)
payable
ERC721("X Houses", "XHS")
VRFConsumerBase(_vrfCoordinator, _linkToken)
PaymentSplitter(_payees, _shares)
{
}
// @dev convinence function for returning the offset token ID
function xhouseID(uint256 _id) public view returns (uint256 houseID) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
function presalePurchase(uint256 _season, uint256 _quantity)
public
payable
nonReentrant
{
}
function purchase(uint256 _season, uint256 _quantity)
public
payable
nonReentrant
{
}
function _mint(uint256 _season, uint256 _quantity) internal {
}
function onPresaleList(uint256 _season, address _address)
public
view
returns (bool)
{
}
// onlyOwner functions
function addSeason(
uint256 _seasonNum,
uint256 _price,
uint256 _count,
uint256 _walletLimit,
string memory _provenance,
string memory _baseURI
) external onlyOwner {
require(<FILL_ME>)
seasons[_seasonNum] = Season(
_seasonNum,
_price,
_count,
_walletLimit,
0, // offset init
_provenance,
_baseURI,
true, // paused
false, // publicSales
false // revealed
);
SEASON_COUNT += 1;
// season 1 , 111
// season 2, 111 + 111
// season 3 , 222 + 111
season_offsets[_seasonNum] = season_offsets[_seasonNum - 1] + _count;
season_minted[_seasonNum] = 0;
}
function addSeasonPresale(uint256 _season, address[] calldata _list)
external
onlyOwner
{
}
function requestSeasonRandom(uint256 _season) public onlyOwner {
}
function setSeasonRequestID(bytes32 _requestId, uint256 _season) public {
}
// @dev chainlink callback function for requestRandomness
function fulfillRandomness(bytes32 requestId, uint256 randomness)
internal
override
{
}
function setSeasonURI(uint256 _season, string memory _uri)
external
onlyOwner
{
}
function setSeasonPause(uint256 _season, bool _state) external onlyOwner {
}
function setSeasonPublic(uint256 _season, bool _state) external onlyOwner {
}
function revealSeason(uint256 _season, bool _state) external onlyOwner {
}
function setSeasonWalletLimit(uint256 _season, uint256 _limit)
external
onlyOwner
{
}
// @dev gift a single token to each address passed in through calldata
// @param _season uint256 season number
// @param _recipients Array of addresses to send a single token to
function gift(uint256 _season, address[] calldata _recipients)
external
onlyOwner
{
}
function withdrawAll() external onlyOwner {
}
}
| seasons[_seasonNum].unit_count==0,"Season Already exists" | 44,334 | seasons[_seasonNum].unit_count==0 |
"Season doesn't exist" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract XHouses is
ERC721,
Ownable,
ReentrancyGuard,
VRFConsumerBase,
PaymentSplitter
{
using Strings for uint256;
uint256 public SEASON_COUNT = 0;
uint256 totalPublicMinted = 0;
struct Season {
uint256 season_number;
uint256 price;
uint256 unit_count; // @dev total supply
uint256 walletLimit; // @dev per wallet mint limit
uint256 tokenOffset; // @dev each season has a unique offset
string provenanceHash;
string uri;
bool paused;
bool publicOpen;
bool revealed;
}
struct WalletCount {
mapping(uint256 => uint256) season_mints;
}
// address => season mapping
mapping(uint256 => Season) public seasons;
mapping(uint256 => uint256) public season_offsets;
mapping(uint256 => uint256) public season_minted;
mapping(address => WalletCount) internal season_wallet_mints;
mapping(uint256 => bool) seasonPresale;
mapping(address => uint256[]) public presaleList;
mapping(bytes32 => uint256) internal season_randIDs;
address[] internal payees;
// LINK
uint256 internal LINK_FEE;
bytes32 internal LINK_KEY_HASH;
constructor(
bytes32 _keyHash,
address _vrfCoordinator,
address _linkToken,
uint256 _linkFee,
address[] memory _payees,
uint256[] memory _shares
)
payable
ERC721("X Houses", "XHS")
VRFConsumerBase(_vrfCoordinator, _linkToken)
PaymentSplitter(_payees, _shares)
{
}
// @dev convinence function for returning the offset token ID
function xhouseID(uint256 _id) public view returns (uint256 houseID) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
function presalePurchase(uint256 _season, uint256 _quantity)
public
payable
nonReentrant
{
}
function purchase(uint256 _season, uint256 _quantity)
public
payable
nonReentrant
{
}
function _mint(uint256 _season, uint256 _quantity) internal {
}
function onPresaleList(uint256 _season, address _address)
public
view
returns (bool)
{
}
// onlyOwner functions
function addSeason(
uint256 _seasonNum,
uint256 _price,
uint256 _count,
uint256 _walletLimit,
string memory _provenance,
string memory _baseURI
) external onlyOwner {
}
function addSeasonPresale(uint256 _season, address[] calldata _list)
external
onlyOwner
{
}
function requestSeasonRandom(uint256 _season) public onlyOwner {
require(<FILL_ME>)
require(seasons[_season].tokenOffset == 0, "Offset already set");
bytes32 requestId = requestRandomness(LINK_KEY_HASH, LINK_FEE);
setSeasonRequestID(requestId, _season);
}
function setSeasonRequestID(bytes32 _requestId, uint256 _season) public {
}
// @dev chainlink callback function for requestRandomness
function fulfillRandomness(bytes32 requestId, uint256 randomness)
internal
override
{
}
function setSeasonURI(uint256 _season, string memory _uri)
external
onlyOwner
{
}
function setSeasonPause(uint256 _season, bool _state) external onlyOwner {
}
function setSeasonPublic(uint256 _season, bool _state) external onlyOwner {
}
function revealSeason(uint256 _season, bool _state) external onlyOwner {
}
function setSeasonWalletLimit(uint256 _season, uint256 _limit)
external
onlyOwner
{
}
// @dev gift a single token to each address passed in through calldata
// @param _season uint256 season number
// @param _recipients Array of addresses to send a single token to
function gift(uint256 _season, address[] calldata _recipients)
external
onlyOwner
{
}
function withdrawAll() external onlyOwner {
}
}
| seasons[_season].season_number!=0,"Season doesn't exist" | 44,334 | seasons[_season].season_number!=0 |
"Offset already set" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract XHouses is
ERC721,
Ownable,
ReentrancyGuard,
VRFConsumerBase,
PaymentSplitter
{
using Strings for uint256;
uint256 public SEASON_COUNT = 0;
uint256 totalPublicMinted = 0;
struct Season {
uint256 season_number;
uint256 price;
uint256 unit_count; // @dev total supply
uint256 walletLimit; // @dev per wallet mint limit
uint256 tokenOffset; // @dev each season has a unique offset
string provenanceHash;
string uri;
bool paused;
bool publicOpen;
bool revealed;
}
struct WalletCount {
mapping(uint256 => uint256) season_mints;
}
// address => season mapping
mapping(uint256 => Season) public seasons;
mapping(uint256 => uint256) public season_offsets;
mapping(uint256 => uint256) public season_minted;
mapping(address => WalletCount) internal season_wallet_mints;
mapping(uint256 => bool) seasonPresale;
mapping(address => uint256[]) public presaleList;
mapping(bytes32 => uint256) internal season_randIDs;
address[] internal payees;
// LINK
uint256 internal LINK_FEE;
bytes32 internal LINK_KEY_HASH;
constructor(
bytes32 _keyHash,
address _vrfCoordinator,
address _linkToken,
uint256 _linkFee,
address[] memory _payees,
uint256[] memory _shares
)
payable
ERC721("X Houses", "XHS")
VRFConsumerBase(_vrfCoordinator, _linkToken)
PaymentSplitter(_payees, _shares)
{
}
// @dev convinence function for returning the offset token ID
function xhouseID(uint256 _id) public view returns (uint256 houseID) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
function presalePurchase(uint256 _season, uint256 _quantity)
public
payable
nonReentrant
{
}
function purchase(uint256 _season, uint256 _quantity)
public
payable
nonReentrant
{
}
function _mint(uint256 _season, uint256 _quantity) internal {
}
function onPresaleList(uint256 _season, address _address)
public
view
returns (bool)
{
}
// onlyOwner functions
function addSeason(
uint256 _seasonNum,
uint256 _price,
uint256 _count,
uint256 _walletLimit,
string memory _provenance,
string memory _baseURI
) external onlyOwner {
}
function addSeasonPresale(uint256 _season, address[] calldata _list)
external
onlyOwner
{
}
function requestSeasonRandom(uint256 _season) public onlyOwner {
require(seasons[_season].season_number != 0, "Season doesn't exist");
require(<FILL_ME>)
bytes32 requestId = requestRandomness(LINK_KEY_HASH, LINK_FEE);
setSeasonRequestID(requestId, _season);
}
function setSeasonRequestID(bytes32 _requestId, uint256 _season) public {
}
// @dev chainlink callback function for requestRandomness
function fulfillRandomness(bytes32 requestId, uint256 randomness)
internal
override
{
}
function setSeasonURI(uint256 _season, string memory _uri)
external
onlyOwner
{
}
function setSeasonPause(uint256 _season, bool _state) external onlyOwner {
}
function setSeasonPublic(uint256 _season, bool _state) external onlyOwner {
}
function revealSeason(uint256 _season, bool _state) external onlyOwner {
}
function setSeasonWalletLimit(uint256 _season, uint256 _limit)
external
onlyOwner
{
}
// @dev gift a single token to each address passed in through calldata
// @param _season uint256 season number
// @param _recipients Array of addresses to send a single token to
function gift(uint256 _season, address[] calldata _recipients)
external
onlyOwner
{
}
function withdrawAll() external onlyOwner {
}
}
| seasons[_season].tokenOffset==0,"Offset already set" | 44,334 | seasons[_season].tokenOffset==0 |
"Number of gifts exceeds season supply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract XHouses is
ERC721,
Ownable,
ReentrancyGuard,
VRFConsumerBase,
PaymentSplitter
{
using Strings for uint256;
uint256 public SEASON_COUNT = 0;
uint256 totalPublicMinted = 0;
struct Season {
uint256 season_number;
uint256 price;
uint256 unit_count; // @dev total supply
uint256 walletLimit; // @dev per wallet mint limit
uint256 tokenOffset; // @dev each season has a unique offset
string provenanceHash;
string uri;
bool paused;
bool publicOpen;
bool revealed;
}
struct WalletCount {
mapping(uint256 => uint256) season_mints;
}
// address => season mapping
mapping(uint256 => Season) public seasons;
mapping(uint256 => uint256) public season_offsets;
mapping(uint256 => uint256) public season_minted;
mapping(address => WalletCount) internal season_wallet_mints;
mapping(uint256 => bool) seasonPresale;
mapping(address => uint256[]) public presaleList;
mapping(bytes32 => uint256) internal season_randIDs;
address[] internal payees;
// LINK
uint256 internal LINK_FEE;
bytes32 internal LINK_KEY_HASH;
constructor(
bytes32 _keyHash,
address _vrfCoordinator,
address _linkToken,
uint256 _linkFee,
address[] memory _payees,
uint256[] memory _shares
)
payable
ERC721("X Houses", "XHS")
VRFConsumerBase(_vrfCoordinator, _linkToken)
PaymentSplitter(_payees, _shares)
{
}
// @dev convinence function for returning the offset token ID
function xhouseID(uint256 _id) public view returns (uint256 houseID) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
function presalePurchase(uint256 _season, uint256 _quantity)
public
payable
nonReentrant
{
}
function purchase(uint256 _season, uint256 _quantity)
public
payable
nonReentrant
{
}
function _mint(uint256 _season, uint256 _quantity) internal {
}
function onPresaleList(uint256 _season, address _address)
public
view
returns (bool)
{
}
// onlyOwner functions
function addSeason(
uint256 _seasonNum,
uint256 _price,
uint256 _count,
uint256 _walletLimit,
string memory _provenance,
string memory _baseURI
) external onlyOwner {
}
function addSeasonPresale(uint256 _season, address[] calldata _list)
external
onlyOwner
{
}
function requestSeasonRandom(uint256 _season) public onlyOwner {
}
function setSeasonRequestID(bytes32 _requestId, uint256 _season) public {
}
// @dev chainlink callback function for requestRandomness
function fulfillRandomness(bytes32 requestId, uint256 randomness)
internal
override
{
}
function setSeasonURI(uint256 _season, string memory _uri)
external
onlyOwner
{
}
function setSeasonPause(uint256 _season, bool _state) external onlyOwner {
}
function setSeasonPublic(uint256 _season, bool _state) external onlyOwner {
}
function revealSeason(uint256 _season, bool _state) external onlyOwner {
}
function setSeasonWalletLimit(uint256 _season, uint256 _limit)
external
onlyOwner
{
}
// @dev gift a single token to each address passed in through calldata
// @param _season uint256 season number
// @param _recipients Array of addresses to send a single token to
function gift(uint256 _season, address[] calldata _recipients)
external
onlyOwner
{
require(<FILL_ME>)
for (uint256 i = 0; i < _recipients.length; i++) {
uint256 tokenID = season_offsets[_season - 1] +
season_minted[_season] +
1;
_safeMint(_recipients[i], tokenID);
totalPublicMinted += 1;
season_minted[_season] += 1;
}
}
function withdrawAll() external onlyOwner {
}
}
| _recipients.length+season_minted[_season]<=seasons[_season].unit_count,"Number of gifts exceeds season supply" | 44,334 | _recipients.length+season_minted[_season]<=seasons[_season].unit_count |
null | pragma solidity >=0.4.21 <0.6.0;
import "./SafeMath.sol";
contract Earnings {
using SafeMath for *;
// -------------------- mapping ------------------------ //
mapping(address => UserWithdraw) public userWithdraw; // record user withdraw reward information
// -------------------- variate ------------------------ //
uint8 constant internal percent = 100;
uint8 constant internal remain = 20; // Static and dynamic rewards returns remain at 20 percent
address public resonanceAddress;
address public owner;
// -------------------- struct ------------------------ //
struct UserWithdraw {
uint256 withdrawStraight; // withdraw straight eth amount
uint256 withdrawTeam; // withdraw team eth amount
uint256 withdrawStatic; // withdraw static eth amount
uint256 withdrawTerminator;//withdraw terminator amount
uint256 withdrawNode; // withdraw node amount
uint256 lockEth; // user lock eth
uint256 activateEth; // record user activate eth
}
constructor()
public{
}
// -------------------- modifier ------------------------ //
modifier onlyOwner(){
}
modifier onlyResonance (){
}
// -------------------- owner api ------------------------ //
function allowResonance(address _addr) public onlyOwner() {
}
// -------------------- Resonance api ------------------------ //
// calculate actual reinvest amount, include amount + lockEth
function calculateReinvestAmount(
address reinvestAddress,
uint256 amount,
uint256 userAmount,
uint8 requireType)//type: 1 => straightEth, 2 => teamEth, 3 => withdrawStatic, 4 => withdrawNode
public
onlyResonance()
returns (uint256)
{
if (requireType == 1) {
require(<FILL_ME>)
} else if (requireType == 2) {
require(amount.add((userWithdraw[reinvestAddress].withdrawStraight).mul(100).div(80)) <= userAmount.add(amount));
} else if (requireType == 3) {
require(amount.add((userWithdraw[reinvestAddress].withdrawTeam).mul(100).div(80)) <= userAmount.add(amount));
} else if (requireType == 5) {
require(amount.add((userWithdraw[reinvestAddress].withdrawNode).mul(100).div(80)) <= userAmount);
}
// userWithdraw[reinvestAddress].lockEth = userWithdraw[reinvestAddress].lockEth.add(amount.mul(remain).div(100));\
uint256 _active = userWithdraw[reinvestAddress].lockEth - userWithdraw[reinvestAddress].activateEth;
if (amount > _active) {
userWithdraw[reinvestAddress].activateEth += _active;
amount = amount.add(_active);
} else {
userWithdraw[reinvestAddress].activateEth = userWithdraw[reinvestAddress].activateEth.add(amount);
amount = amount.mul(2);
}
return amount;
}
function routeAddLockEth(
address withdrawAddress,
uint256 amount,
uint256 lockProfits,
uint256 userRouteEth,
uint256 routeType)
public
onlyResonance()
{
}
function addLockEthStatic(address withdrawAddress, uint256 amount, uint256 lockProfits, uint256 userStatic)
internal
{
}
function addLockEthStraight(address withdrawAddress, uint256 amount, uint256 userStraightEth)
internal
{
}
function addLockEthTeam(address withdrawAddress, uint256 amount, uint256 userTeamEth)
internal
{
}
function addLockEthTerminator(address withdrawAddress, uint256 amount, uint256 withdrawAmount)
internal
{
}
function addLockEthNode(address withdrawAddress, uint256 amount, uint256 userNodeEth)
internal
{
}
function addActivateEth(address userAddress, uint256 amount)
public
onlyResonance()
{
}
function changeWithdrawTeamZero(address userAddress)
public
onlyResonance()
{
}
function getWithdrawStraight(address reinvestAddress)
public
view
onlyResonance()
returns (uint256)
{
}
function getWithdrawStatic(address reinvestAddress)
public
view
onlyResonance()
returns (uint256)
{
}
function getWithdrawTeam(address reinvestAddress)
public
view
onlyResonance()
returns (uint256)
{
}
function getWithdrawNode(address reinvestAddress)
public
view
onlyResonance()
returns (uint256)
{
}
function getAfterFounds(address userAddress)
public
view
onlyResonance()
returns (uint256)
{
}
function getStaticAfterFounds(address reinvestAddress) public
view
onlyResonance()
returns (uint256, uint256)
{
}
function getStaticAfterFoundsTeam(address userAddress) public
view
onlyResonance()
returns (uint256, uint256, uint256)
{
}
function getUserWithdrawInfo(address reinvestAddress) public
view
onlyResonance()
returns (
uint256 withdrawStraight,
uint256 withdrawTeam,
uint256 withdrawStatic,
uint256 withdrawNode
)
{
}
}
| amount.add((userWithdraw[reinvestAddress].withdrawStatic).mul(100).div(80))<=userAmount | 44,424 | amount.add((userWithdraw[reinvestAddress].withdrawStatic).mul(100).div(80))<=userAmount |
null | pragma solidity >=0.4.21 <0.6.0;
import "./SafeMath.sol";
contract Earnings {
using SafeMath for *;
// -------------------- mapping ------------------------ //
mapping(address => UserWithdraw) public userWithdraw; // record user withdraw reward information
// -------------------- variate ------------------------ //
uint8 constant internal percent = 100;
uint8 constant internal remain = 20; // Static and dynamic rewards returns remain at 20 percent
address public resonanceAddress;
address public owner;
// -------------------- struct ------------------------ //
struct UserWithdraw {
uint256 withdrawStraight; // withdraw straight eth amount
uint256 withdrawTeam; // withdraw team eth amount
uint256 withdrawStatic; // withdraw static eth amount
uint256 withdrawTerminator;//withdraw terminator amount
uint256 withdrawNode; // withdraw node amount
uint256 lockEth; // user lock eth
uint256 activateEth; // record user activate eth
}
constructor()
public{
}
// -------------------- modifier ------------------------ //
modifier onlyOwner(){
}
modifier onlyResonance (){
}
// -------------------- owner api ------------------------ //
function allowResonance(address _addr) public onlyOwner() {
}
// -------------------- Resonance api ------------------------ //
// calculate actual reinvest amount, include amount + lockEth
function calculateReinvestAmount(
address reinvestAddress,
uint256 amount,
uint256 userAmount,
uint8 requireType)//type: 1 => straightEth, 2 => teamEth, 3 => withdrawStatic, 4 => withdrawNode
public
onlyResonance()
returns (uint256)
{
if (requireType == 1) {
require(amount.add((userWithdraw[reinvestAddress].withdrawStatic).mul(100).div(80)) <= userAmount);
} else if (requireType == 2) {
require(<FILL_ME>)
} else if (requireType == 3) {
require(amount.add((userWithdraw[reinvestAddress].withdrawTeam).mul(100).div(80)) <= userAmount.add(amount));
} else if (requireType == 5) {
require(amount.add((userWithdraw[reinvestAddress].withdrawNode).mul(100).div(80)) <= userAmount);
}
// userWithdraw[reinvestAddress].lockEth = userWithdraw[reinvestAddress].lockEth.add(amount.mul(remain).div(100));\
uint256 _active = userWithdraw[reinvestAddress].lockEth - userWithdraw[reinvestAddress].activateEth;
if (amount > _active) {
userWithdraw[reinvestAddress].activateEth += _active;
amount = amount.add(_active);
} else {
userWithdraw[reinvestAddress].activateEth = userWithdraw[reinvestAddress].activateEth.add(amount);
amount = amount.mul(2);
}
return amount;
}
function routeAddLockEth(
address withdrawAddress,
uint256 amount,
uint256 lockProfits,
uint256 userRouteEth,
uint256 routeType)
public
onlyResonance()
{
}
function addLockEthStatic(address withdrawAddress, uint256 amount, uint256 lockProfits, uint256 userStatic)
internal
{
}
function addLockEthStraight(address withdrawAddress, uint256 amount, uint256 userStraightEth)
internal
{
}
function addLockEthTeam(address withdrawAddress, uint256 amount, uint256 userTeamEth)
internal
{
}
function addLockEthTerminator(address withdrawAddress, uint256 amount, uint256 withdrawAmount)
internal
{
}
function addLockEthNode(address withdrawAddress, uint256 amount, uint256 userNodeEth)
internal
{
}
function addActivateEth(address userAddress, uint256 amount)
public
onlyResonance()
{
}
function changeWithdrawTeamZero(address userAddress)
public
onlyResonance()
{
}
function getWithdrawStraight(address reinvestAddress)
public
view
onlyResonance()
returns (uint256)
{
}
function getWithdrawStatic(address reinvestAddress)
public
view
onlyResonance()
returns (uint256)
{
}
function getWithdrawTeam(address reinvestAddress)
public
view
onlyResonance()
returns (uint256)
{
}
function getWithdrawNode(address reinvestAddress)
public
view
onlyResonance()
returns (uint256)
{
}
function getAfterFounds(address userAddress)
public
view
onlyResonance()
returns (uint256)
{
}
function getStaticAfterFounds(address reinvestAddress) public
view
onlyResonance()
returns (uint256, uint256)
{
}
function getStaticAfterFoundsTeam(address userAddress) public
view
onlyResonance()
returns (uint256, uint256, uint256)
{
}
function getUserWithdrawInfo(address reinvestAddress) public
view
onlyResonance()
returns (
uint256 withdrawStraight,
uint256 withdrawTeam,
uint256 withdrawStatic,
uint256 withdrawNode
)
{
}
}
| amount.add((userWithdraw[reinvestAddress].withdrawStraight).mul(100).div(80))<=userAmount.add(amount) | 44,424 | amount.add((userWithdraw[reinvestAddress].withdrawStraight).mul(100).div(80))<=userAmount.add(amount) |
null | pragma solidity >=0.4.21 <0.6.0;
import "./SafeMath.sol";
contract Earnings {
using SafeMath for *;
// -------------------- mapping ------------------------ //
mapping(address => UserWithdraw) public userWithdraw; // record user withdraw reward information
// -------------------- variate ------------------------ //
uint8 constant internal percent = 100;
uint8 constant internal remain = 20; // Static and dynamic rewards returns remain at 20 percent
address public resonanceAddress;
address public owner;
// -------------------- struct ------------------------ //
struct UserWithdraw {
uint256 withdrawStraight; // withdraw straight eth amount
uint256 withdrawTeam; // withdraw team eth amount
uint256 withdrawStatic; // withdraw static eth amount
uint256 withdrawTerminator;//withdraw terminator amount
uint256 withdrawNode; // withdraw node amount
uint256 lockEth; // user lock eth
uint256 activateEth; // record user activate eth
}
constructor()
public{
}
// -------------------- modifier ------------------------ //
modifier onlyOwner(){
}
modifier onlyResonance (){
}
// -------------------- owner api ------------------------ //
function allowResonance(address _addr) public onlyOwner() {
}
// -------------------- Resonance api ------------------------ //
// calculate actual reinvest amount, include amount + lockEth
function calculateReinvestAmount(
address reinvestAddress,
uint256 amount,
uint256 userAmount,
uint8 requireType)//type: 1 => straightEth, 2 => teamEth, 3 => withdrawStatic, 4 => withdrawNode
public
onlyResonance()
returns (uint256)
{
if (requireType == 1) {
require(amount.add((userWithdraw[reinvestAddress].withdrawStatic).mul(100).div(80)) <= userAmount);
} else if (requireType == 2) {
require(amount.add((userWithdraw[reinvestAddress].withdrawStraight).mul(100).div(80)) <= userAmount.add(amount));
} else if (requireType == 3) {
require(<FILL_ME>)
} else if (requireType == 5) {
require(amount.add((userWithdraw[reinvestAddress].withdrawNode).mul(100).div(80)) <= userAmount);
}
// userWithdraw[reinvestAddress].lockEth = userWithdraw[reinvestAddress].lockEth.add(amount.mul(remain).div(100));\
uint256 _active = userWithdraw[reinvestAddress].lockEth - userWithdraw[reinvestAddress].activateEth;
if (amount > _active) {
userWithdraw[reinvestAddress].activateEth += _active;
amount = amount.add(_active);
} else {
userWithdraw[reinvestAddress].activateEth = userWithdraw[reinvestAddress].activateEth.add(amount);
amount = amount.mul(2);
}
return amount;
}
function routeAddLockEth(
address withdrawAddress,
uint256 amount,
uint256 lockProfits,
uint256 userRouteEth,
uint256 routeType)
public
onlyResonance()
{
}
function addLockEthStatic(address withdrawAddress, uint256 amount, uint256 lockProfits, uint256 userStatic)
internal
{
}
function addLockEthStraight(address withdrawAddress, uint256 amount, uint256 userStraightEth)
internal
{
}
function addLockEthTeam(address withdrawAddress, uint256 amount, uint256 userTeamEth)
internal
{
}
function addLockEthTerminator(address withdrawAddress, uint256 amount, uint256 withdrawAmount)
internal
{
}
function addLockEthNode(address withdrawAddress, uint256 amount, uint256 userNodeEth)
internal
{
}
function addActivateEth(address userAddress, uint256 amount)
public
onlyResonance()
{
}
function changeWithdrawTeamZero(address userAddress)
public
onlyResonance()
{
}
function getWithdrawStraight(address reinvestAddress)
public
view
onlyResonance()
returns (uint256)
{
}
function getWithdrawStatic(address reinvestAddress)
public
view
onlyResonance()
returns (uint256)
{
}
function getWithdrawTeam(address reinvestAddress)
public
view
onlyResonance()
returns (uint256)
{
}
function getWithdrawNode(address reinvestAddress)
public
view
onlyResonance()
returns (uint256)
{
}
function getAfterFounds(address userAddress)
public
view
onlyResonance()
returns (uint256)
{
}
function getStaticAfterFounds(address reinvestAddress) public
view
onlyResonance()
returns (uint256, uint256)
{
}
function getStaticAfterFoundsTeam(address userAddress) public
view
onlyResonance()
returns (uint256, uint256, uint256)
{
}
function getUserWithdrawInfo(address reinvestAddress) public
view
onlyResonance()
returns (
uint256 withdrawStraight,
uint256 withdrawTeam,
uint256 withdrawStatic,
uint256 withdrawNode
)
{
}
}
| amount.add((userWithdraw[reinvestAddress].withdrawTeam).mul(100).div(80))<=userAmount.add(amount) | 44,424 | amount.add((userWithdraw[reinvestAddress].withdrawTeam).mul(100).div(80))<=userAmount.add(amount) |
null | pragma solidity >=0.4.21 <0.6.0;
import "./SafeMath.sol";
contract Earnings {
using SafeMath for *;
// -------------------- mapping ------------------------ //
mapping(address => UserWithdraw) public userWithdraw; // record user withdraw reward information
// -------------------- variate ------------------------ //
uint8 constant internal percent = 100;
uint8 constant internal remain = 20; // Static and dynamic rewards returns remain at 20 percent
address public resonanceAddress;
address public owner;
// -------------------- struct ------------------------ //
struct UserWithdraw {
uint256 withdrawStraight; // withdraw straight eth amount
uint256 withdrawTeam; // withdraw team eth amount
uint256 withdrawStatic; // withdraw static eth amount
uint256 withdrawTerminator;//withdraw terminator amount
uint256 withdrawNode; // withdraw node amount
uint256 lockEth; // user lock eth
uint256 activateEth; // record user activate eth
}
constructor()
public{
}
// -------------------- modifier ------------------------ //
modifier onlyOwner(){
}
modifier onlyResonance (){
}
// -------------------- owner api ------------------------ //
function allowResonance(address _addr) public onlyOwner() {
}
// -------------------- Resonance api ------------------------ //
// calculate actual reinvest amount, include amount + lockEth
function calculateReinvestAmount(
address reinvestAddress,
uint256 amount,
uint256 userAmount,
uint8 requireType)//type: 1 => straightEth, 2 => teamEth, 3 => withdrawStatic, 4 => withdrawNode
public
onlyResonance()
returns (uint256)
{
if (requireType == 1) {
require(amount.add((userWithdraw[reinvestAddress].withdrawStatic).mul(100).div(80)) <= userAmount);
} else if (requireType == 2) {
require(amount.add((userWithdraw[reinvestAddress].withdrawStraight).mul(100).div(80)) <= userAmount.add(amount));
} else if (requireType == 3) {
require(amount.add((userWithdraw[reinvestAddress].withdrawTeam).mul(100).div(80)) <= userAmount.add(amount));
} else if (requireType == 5) {
require(<FILL_ME>)
}
// userWithdraw[reinvestAddress].lockEth = userWithdraw[reinvestAddress].lockEth.add(amount.mul(remain).div(100));\
uint256 _active = userWithdraw[reinvestAddress].lockEth - userWithdraw[reinvestAddress].activateEth;
if (amount > _active) {
userWithdraw[reinvestAddress].activateEth += _active;
amount = amount.add(_active);
} else {
userWithdraw[reinvestAddress].activateEth = userWithdraw[reinvestAddress].activateEth.add(amount);
amount = amount.mul(2);
}
return amount;
}
function routeAddLockEth(
address withdrawAddress,
uint256 amount,
uint256 lockProfits,
uint256 userRouteEth,
uint256 routeType)
public
onlyResonance()
{
}
function addLockEthStatic(address withdrawAddress, uint256 amount, uint256 lockProfits, uint256 userStatic)
internal
{
}
function addLockEthStraight(address withdrawAddress, uint256 amount, uint256 userStraightEth)
internal
{
}
function addLockEthTeam(address withdrawAddress, uint256 amount, uint256 userTeamEth)
internal
{
}
function addLockEthTerminator(address withdrawAddress, uint256 amount, uint256 withdrawAmount)
internal
{
}
function addLockEthNode(address withdrawAddress, uint256 amount, uint256 userNodeEth)
internal
{
}
function addActivateEth(address userAddress, uint256 amount)
public
onlyResonance()
{
}
function changeWithdrawTeamZero(address userAddress)
public
onlyResonance()
{
}
function getWithdrawStraight(address reinvestAddress)
public
view
onlyResonance()
returns (uint256)
{
}
function getWithdrawStatic(address reinvestAddress)
public
view
onlyResonance()
returns (uint256)
{
}
function getWithdrawTeam(address reinvestAddress)
public
view
onlyResonance()
returns (uint256)
{
}
function getWithdrawNode(address reinvestAddress)
public
view
onlyResonance()
returns (uint256)
{
}
function getAfterFounds(address userAddress)
public
view
onlyResonance()
returns (uint256)
{
}
function getStaticAfterFounds(address reinvestAddress) public
view
onlyResonance()
returns (uint256, uint256)
{
}
function getStaticAfterFoundsTeam(address userAddress) public
view
onlyResonance()
returns (uint256, uint256, uint256)
{
}
function getUserWithdrawInfo(address reinvestAddress) public
view
onlyResonance()
returns (
uint256 withdrawStraight,
uint256 withdrawTeam,
uint256 withdrawStatic,
uint256 withdrawNode
)
{
}
}
| amount.add((userWithdraw[reinvestAddress].withdrawNode).mul(100).div(80))<=userAmount | 44,424 | amount.add((userWithdraw[reinvestAddress].withdrawNode).mul(100).div(80))<=userAmount |
null | pragma solidity >=0.4.21 <0.6.0;
import "./SafeMath.sol";
contract Earnings {
using SafeMath for *;
// -------------------- mapping ------------------------ //
mapping(address => UserWithdraw) public userWithdraw; // record user withdraw reward information
// -------------------- variate ------------------------ //
uint8 constant internal percent = 100;
uint8 constant internal remain = 20; // Static and dynamic rewards returns remain at 20 percent
address public resonanceAddress;
address public owner;
// -------------------- struct ------------------------ //
struct UserWithdraw {
uint256 withdrawStraight; // withdraw straight eth amount
uint256 withdrawTeam; // withdraw team eth amount
uint256 withdrawStatic; // withdraw static eth amount
uint256 withdrawTerminator;//withdraw terminator amount
uint256 withdrawNode; // withdraw node amount
uint256 lockEth; // user lock eth
uint256 activateEth; // record user activate eth
}
constructor()
public{
}
// -------------------- modifier ------------------------ //
modifier onlyOwner(){
}
modifier onlyResonance (){
}
// -------------------- owner api ------------------------ //
function allowResonance(address _addr) public onlyOwner() {
}
// -------------------- Resonance api ------------------------ //
// calculate actual reinvest amount, include amount + lockEth
function calculateReinvestAmount(
address reinvestAddress,
uint256 amount,
uint256 userAmount,
uint8 requireType)//type: 1 => straightEth, 2 => teamEth, 3 => withdrawStatic, 4 => withdrawNode
public
onlyResonance()
returns (uint256)
{
}
function routeAddLockEth(
address withdrawAddress,
uint256 amount,
uint256 lockProfits,
uint256 userRouteEth,
uint256 routeType)
public
onlyResonance()
{
}
function addLockEthStatic(address withdrawAddress, uint256 amount, uint256 lockProfits, uint256 userStatic)
internal
{
require(<FILL_ME>)
userWithdraw[withdrawAddress].lockEth += lockProfits;
userWithdraw[withdrawAddress].withdrawStatic += amount.sub(lockProfits);
}
function addLockEthStraight(address withdrawAddress, uint256 amount, uint256 userStraightEth)
internal
{
}
function addLockEthTeam(address withdrawAddress, uint256 amount, uint256 userTeamEth)
internal
{
}
function addLockEthTerminator(address withdrawAddress, uint256 amount, uint256 withdrawAmount)
internal
{
}
function addLockEthNode(address withdrawAddress, uint256 amount, uint256 userNodeEth)
internal
{
}
function addActivateEth(address userAddress, uint256 amount)
public
onlyResonance()
{
}
function changeWithdrawTeamZero(address userAddress)
public
onlyResonance()
{
}
function getWithdrawStraight(address reinvestAddress)
public
view
onlyResonance()
returns (uint256)
{
}
function getWithdrawStatic(address reinvestAddress)
public
view
onlyResonance()
returns (uint256)
{
}
function getWithdrawTeam(address reinvestAddress)
public
view
onlyResonance()
returns (uint256)
{
}
function getWithdrawNode(address reinvestAddress)
public
view
onlyResonance()
returns (uint256)
{
}
function getAfterFounds(address userAddress)
public
view
onlyResonance()
returns (uint256)
{
}
function getStaticAfterFounds(address reinvestAddress) public
view
onlyResonance()
returns (uint256, uint256)
{
}
function getStaticAfterFoundsTeam(address userAddress) public
view
onlyResonance()
returns (uint256, uint256, uint256)
{
}
function getUserWithdrawInfo(address reinvestAddress) public
view
onlyResonance()
returns (
uint256 withdrawStraight,
uint256 withdrawTeam,
uint256 withdrawStatic,
uint256 withdrawNode
)
{
}
}
| amount.add(userWithdraw[withdrawAddress].withdrawStatic.mul(100).div(percent-remain))<=userStatic | 44,424 | amount.add(userWithdraw[withdrawAddress].withdrawStatic.mul(100).div(percent-remain))<=userStatic |
null | pragma solidity >=0.4.21 <0.6.0;
import "./SafeMath.sol";
contract Earnings {
using SafeMath for *;
// -------------------- mapping ------------------------ //
mapping(address => UserWithdraw) public userWithdraw; // record user withdraw reward information
// -------------------- variate ------------------------ //
uint8 constant internal percent = 100;
uint8 constant internal remain = 20; // Static and dynamic rewards returns remain at 20 percent
address public resonanceAddress;
address public owner;
// -------------------- struct ------------------------ //
struct UserWithdraw {
uint256 withdrawStraight; // withdraw straight eth amount
uint256 withdrawTeam; // withdraw team eth amount
uint256 withdrawStatic; // withdraw static eth amount
uint256 withdrawTerminator;//withdraw terminator amount
uint256 withdrawNode; // withdraw node amount
uint256 lockEth; // user lock eth
uint256 activateEth; // record user activate eth
}
constructor()
public{
}
// -------------------- modifier ------------------------ //
modifier onlyOwner(){
}
modifier onlyResonance (){
}
// -------------------- owner api ------------------------ //
function allowResonance(address _addr) public onlyOwner() {
}
// -------------------- Resonance api ------------------------ //
// calculate actual reinvest amount, include amount + lockEth
function calculateReinvestAmount(
address reinvestAddress,
uint256 amount,
uint256 userAmount,
uint8 requireType)//type: 1 => straightEth, 2 => teamEth, 3 => withdrawStatic, 4 => withdrawNode
public
onlyResonance()
returns (uint256)
{
}
function routeAddLockEth(
address withdrawAddress,
uint256 amount,
uint256 lockProfits,
uint256 userRouteEth,
uint256 routeType)
public
onlyResonance()
{
}
function addLockEthStatic(address withdrawAddress, uint256 amount, uint256 lockProfits, uint256 userStatic)
internal
{
}
function addLockEthStraight(address withdrawAddress, uint256 amount, uint256 userStraightEth)
internal
{
require(<FILL_ME>)
userWithdraw[withdrawAddress].lockEth += amount.mul(remain).div(100);
userWithdraw[withdrawAddress].withdrawStraight += amount.mul(percent - remain).div(100);
}
function addLockEthTeam(address withdrawAddress, uint256 amount, uint256 userTeamEth)
internal
{
}
function addLockEthTerminator(address withdrawAddress, uint256 amount, uint256 withdrawAmount)
internal
{
}
function addLockEthNode(address withdrawAddress, uint256 amount, uint256 userNodeEth)
internal
{
}
function addActivateEth(address userAddress, uint256 amount)
public
onlyResonance()
{
}
function changeWithdrawTeamZero(address userAddress)
public
onlyResonance()
{
}
function getWithdrawStraight(address reinvestAddress)
public
view
onlyResonance()
returns (uint256)
{
}
function getWithdrawStatic(address reinvestAddress)
public
view
onlyResonance()
returns (uint256)
{
}
function getWithdrawTeam(address reinvestAddress)
public
view
onlyResonance()
returns (uint256)
{
}
function getWithdrawNode(address reinvestAddress)
public
view
onlyResonance()
returns (uint256)
{
}
function getAfterFounds(address userAddress)
public
view
onlyResonance()
returns (uint256)
{
}
function getStaticAfterFounds(address reinvestAddress) public
view
onlyResonance()
returns (uint256, uint256)
{
}
function getStaticAfterFoundsTeam(address userAddress) public
view
onlyResonance()
returns (uint256, uint256, uint256)
{
}
function getUserWithdrawInfo(address reinvestAddress) public
view
onlyResonance()
returns (
uint256 withdrawStraight,
uint256 withdrawTeam,
uint256 withdrawStatic,
uint256 withdrawNode
)
{
}
}
| amount.add(userWithdraw[withdrawAddress].withdrawStraight.mul(100).div(percent-remain))<=userStraightEth | 44,424 | amount.add(userWithdraw[withdrawAddress].withdrawStraight.mul(100).div(percent-remain))<=userStraightEth |
null | pragma solidity >=0.4.21 <0.6.0;
import "./SafeMath.sol";
contract Earnings {
using SafeMath for *;
// -------------------- mapping ------------------------ //
mapping(address => UserWithdraw) public userWithdraw; // record user withdraw reward information
// -------------------- variate ------------------------ //
uint8 constant internal percent = 100;
uint8 constant internal remain = 20; // Static and dynamic rewards returns remain at 20 percent
address public resonanceAddress;
address public owner;
// -------------------- struct ------------------------ //
struct UserWithdraw {
uint256 withdrawStraight; // withdraw straight eth amount
uint256 withdrawTeam; // withdraw team eth amount
uint256 withdrawStatic; // withdraw static eth amount
uint256 withdrawTerminator;//withdraw terminator amount
uint256 withdrawNode; // withdraw node amount
uint256 lockEth; // user lock eth
uint256 activateEth; // record user activate eth
}
constructor()
public{
}
// -------------------- modifier ------------------------ //
modifier onlyOwner(){
}
modifier onlyResonance (){
}
// -------------------- owner api ------------------------ //
function allowResonance(address _addr) public onlyOwner() {
}
// -------------------- Resonance api ------------------------ //
// calculate actual reinvest amount, include amount + lockEth
function calculateReinvestAmount(
address reinvestAddress,
uint256 amount,
uint256 userAmount,
uint8 requireType)//type: 1 => straightEth, 2 => teamEth, 3 => withdrawStatic, 4 => withdrawNode
public
onlyResonance()
returns (uint256)
{
}
function routeAddLockEth(
address withdrawAddress,
uint256 amount,
uint256 lockProfits,
uint256 userRouteEth,
uint256 routeType)
public
onlyResonance()
{
}
function addLockEthStatic(address withdrawAddress, uint256 amount, uint256 lockProfits, uint256 userStatic)
internal
{
}
function addLockEthStraight(address withdrawAddress, uint256 amount, uint256 userStraightEth)
internal
{
}
function addLockEthTeam(address withdrawAddress, uint256 amount, uint256 userTeamEth)
internal
{
require(<FILL_ME>)
userWithdraw[withdrawAddress].lockEth += amount.mul(remain).div(100);
userWithdraw[withdrawAddress].withdrawTeam += amount.mul(percent - remain).div(100);
}
function addLockEthTerminator(address withdrawAddress, uint256 amount, uint256 withdrawAmount)
internal
{
}
function addLockEthNode(address withdrawAddress, uint256 amount, uint256 userNodeEth)
internal
{
}
function addActivateEth(address userAddress, uint256 amount)
public
onlyResonance()
{
}
function changeWithdrawTeamZero(address userAddress)
public
onlyResonance()
{
}
function getWithdrawStraight(address reinvestAddress)
public
view
onlyResonance()
returns (uint256)
{
}
function getWithdrawStatic(address reinvestAddress)
public
view
onlyResonance()
returns (uint256)
{
}
function getWithdrawTeam(address reinvestAddress)
public
view
onlyResonance()
returns (uint256)
{
}
function getWithdrawNode(address reinvestAddress)
public
view
onlyResonance()
returns (uint256)
{
}
function getAfterFounds(address userAddress)
public
view
onlyResonance()
returns (uint256)
{
}
function getStaticAfterFounds(address reinvestAddress) public
view
onlyResonance()
returns (uint256, uint256)
{
}
function getStaticAfterFoundsTeam(address userAddress) public
view
onlyResonance()
returns (uint256, uint256, uint256)
{
}
function getUserWithdrawInfo(address reinvestAddress) public
view
onlyResonance()
returns (
uint256 withdrawStraight,
uint256 withdrawTeam,
uint256 withdrawStatic,
uint256 withdrawNode
)
{
}
}
| amount.add(userWithdraw[withdrawAddress].withdrawTeam.mul(100).div(percent-remain))<=userTeamEth | 44,424 | amount.add(userWithdraw[withdrawAddress].withdrawTeam.mul(100).div(percent-remain))<=userTeamEth |
null | pragma solidity >=0.4.21 <0.6.0;
import "./SafeMath.sol";
contract Earnings {
using SafeMath for *;
// -------------------- mapping ------------------------ //
mapping(address => UserWithdraw) public userWithdraw; // record user withdraw reward information
// -------------------- variate ------------------------ //
uint8 constant internal percent = 100;
uint8 constant internal remain = 20; // Static and dynamic rewards returns remain at 20 percent
address public resonanceAddress;
address public owner;
// -------------------- struct ------------------------ //
struct UserWithdraw {
uint256 withdrawStraight; // withdraw straight eth amount
uint256 withdrawTeam; // withdraw team eth amount
uint256 withdrawStatic; // withdraw static eth amount
uint256 withdrawTerminator;//withdraw terminator amount
uint256 withdrawNode; // withdraw node amount
uint256 lockEth; // user lock eth
uint256 activateEth; // record user activate eth
}
constructor()
public{
}
// -------------------- modifier ------------------------ //
modifier onlyOwner(){
}
modifier onlyResonance (){
}
// -------------------- owner api ------------------------ //
function allowResonance(address _addr) public onlyOwner() {
}
// -------------------- Resonance api ------------------------ //
// calculate actual reinvest amount, include amount + lockEth
function calculateReinvestAmount(
address reinvestAddress,
uint256 amount,
uint256 userAmount,
uint8 requireType)//type: 1 => straightEth, 2 => teamEth, 3 => withdrawStatic, 4 => withdrawNode
public
onlyResonance()
returns (uint256)
{
}
function routeAddLockEth(
address withdrawAddress,
uint256 amount,
uint256 lockProfits,
uint256 userRouteEth,
uint256 routeType)
public
onlyResonance()
{
}
function addLockEthStatic(address withdrawAddress, uint256 amount, uint256 lockProfits, uint256 userStatic)
internal
{
}
function addLockEthStraight(address withdrawAddress, uint256 amount, uint256 userStraightEth)
internal
{
}
function addLockEthTeam(address withdrawAddress, uint256 amount, uint256 userTeamEth)
internal
{
}
function addLockEthTerminator(address withdrawAddress, uint256 amount, uint256 withdrawAmount)
internal
{
}
function addLockEthNode(address withdrawAddress, uint256 amount, uint256 userNodeEth)
internal
{
require(<FILL_ME>)
userWithdraw[withdrawAddress].lockEth += amount.mul(remain).div(100);
userWithdraw[withdrawAddress].withdrawNode += amount.mul(percent - remain).div(100);
}
function addActivateEth(address userAddress, uint256 amount)
public
onlyResonance()
{
}
function changeWithdrawTeamZero(address userAddress)
public
onlyResonance()
{
}
function getWithdrawStraight(address reinvestAddress)
public
view
onlyResonance()
returns (uint256)
{
}
function getWithdrawStatic(address reinvestAddress)
public
view
onlyResonance()
returns (uint256)
{
}
function getWithdrawTeam(address reinvestAddress)
public
view
onlyResonance()
returns (uint256)
{
}
function getWithdrawNode(address reinvestAddress)
public
view
onlyResonance()
returns (uint256)
{
}
function getAfterFounds(address userAddress)
public
view
onlyResonance()
returns (uint256)
{
}
function getStaticAfterFounds(address reinvestAddress) public
view
onlyResonance()
returns (uint256, uint256)
{
}
function getStaticAfterFoundsTeam(address userAddress) public
view
onlyResonance()
returns (uint256, uint256, uint256)
{
}
function getUserWithdrawInfo(address reinvestAddress) public
view
onlyResonance()
returns (
uint256 withdrawStraight,
uint256 withdrawTeam,
uint256 withdrawStatic,
uint256 withdrawNode
)
{
}
}
| amount.add(userWithdraw[withdrawAddress].withdrawNode.mul(100).div(percent-remain))<=userNodeEth | 44,424 | amount.add(userWithdraw[withdrawAddress].withdrawNode.mul(100).div(percent-remain))<=userNodeEth |
null | pragma solidity ^0.4.18;
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
function Ownable() public {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) public onlyOwner {
}
}
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
contract BasicToken is ERC20Basic, Ownable {
using SafeMath for uint256;
mapping(address => uint256) balances;
bool public transfersEnabledFlag;
modifier transfersEnabled() {
}
function enableTransfers() public onlyOwner {
}
function unenableTransfers() public onlyOwner {
}
function transfer(address _to, uint256 _value) transfersEnabled() public returns (bool) {
}
function balanceOf(address _owner) public view returns (uint256 balance) {
}
}
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
function approve(address _spender, uint256 _value) public returns (bool) {
}
function allowance(address _owner, address _spender) public view returns (uint256) {
}
function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
}
}
contract MintableToken is StandardToken {
event Mint(address indexed to, uint256 amount);
event MintFinished();
bool public mintingFinished = false;
mapping(address => bool) public minters;
modifier canMint() {
}
modifier onlyMinters() {
require(<FILL_ME>)
_;
}
function addMinter(address _addr) public onlyOwner {
}
function deleteMinter(address _addr) public onlyOwner {
}
function mint(address _to, uint256 _amount) onlyMinters canMint public returns (bool) {
}
function finishMinting() onlyOwner canMint public returns (bool) {
}
}
contract CappedToken is MintableToken {
uint256 public cap;
function CappedToken(uint256 _cap) public {
}
function mint(address _to, uint256 _amount) onlyMinters canMint public returns (bool) {
}
}
contract ParameterizedToken is CappedToken {
string public name;
string public symbol;
uint256 public decimals;
function ParameterizedToken(string _name, string _symbol, uint256 _decimals, uint256 _capIntPart) public CappedToken(_capIntPart * 10 ** _decimals) {
}
}
contract JACToken is ParameterizedToken {
function JACToken() public ParameterizedToken("Joint admissions coin", "JAC", 8, 21000000000) {
}
}
| minters[msg.sender]||msg.sender==owner | 44,441 | minters[msg.sender]||msg.sender==owner |
"admins only" | pragma solidity ^0.8.0;
/**
* @title A contract should inherit this if it provides functionality for the Bit Monsters contract.
*/
abstract contract BitMonstersAddon is Ownable {
IBitMonsters internal bitMonsters;
modifier onlyAdmin() {
require(<FILL_ME>)
_;
}
modifier ownsToken(uint tokenId) {
}
/**
* @notice This must be called before the Brainz contract can be used.
*
* @dev Within the BitMonsters contract, call initializeBrainz().
*/
function setBitMonstersContract(IBitMonsters _contract) external onlyOwner {
}
}
| bitMonsters.isAdmin(msg.sender),"admins only" | 44,470 | bitMonsters.isAdmin(msg.sender) |
"you don't own this shit" | pragma solidity ^0.8.0;
/**
* @title A contract should inherit this if it provides functionality for the Bit Monsters contract.
*/
abstract contract BitMonstersAddon is Ownable {
IBitMonsters internal bitMonsters;
modifier onlyAdmin() {
}
modifier ownsToken(uint tokenId) {
require(<FILL_ME>)
_;
}
/**
* @notice This must be called before the Brainz contract can be used.
*
* @dev Within the BitMonsters contract, call initializeBrainz().
*/
function setBitMonstersContract(IBitMonsters _contract) external onlyOwner {
}
}
| bitMonsters.ownerOf(tokenId)==msg.sender,"you don't own this shit" | 44,470 | bitMonsters.ownerOf(tokenId)==msg.sender |
"Target not Authorized" | pragma solidity ^0.5.7;
interface IMVault {
function deposit(uint256) external;
function token() external view returns (address);
}
contract Mushroom_ZapIn_V1 is ZapInBaseV2 {
mapping(address => bool) public approvedTargets;
event zapIn(address sender, address pool, uint256 tokensRec);
constructor(uint256 _goodwill, uint256 _affiliateSplit)
public
ZapBaseV1(_goodwill, _affiliateSplit)
{}
/**
@notice This function adds liquidity to Mushroom vaults with ETH or ERC20 tokens
@param fromToken The token used for entry (address(0) if ether)
@param amountIn The amount of fromToken to invest
@param toVault Harvest vault address
@param minMVTokens The minimum acceptable quantity vault tokens to receive. Reverts otherwise
@param intermediateToken Token to swap fromToken to before entering vault
@param swapTarget Excecution target for the swap or zap
@param swapData DEX or Zap data
@param affiliate Affiliate address
@param shouldSellEntireBalance True if amountIn is determined at execution time (i.e. contract is caller)
@return tokensReceived- Quantity of Vault tokens received
*/
function ZapIn(
address fromToken,
uint256 amountIn,
address toVault,
uint256 minMVTokens,
address intermediateToken,
address swapTarget,
bytes calldata swapData,
address affiliate,
bool shouldSellEntireBalance
) external payable stopInEmergency returns (uint256 tokensReceived) {
require(<FILL_ME>)
// get incoming tokens
uint256 toInvest =
_pullTokens(
fromToken,
amountIn,
affiliate,
true,
shouldSellEntireBalance
);
// get intermediate token
uint256 intermediateAmt =
_fillQuote(
fromToken,
intermediateToken,
toInvest,
swapTarget,
swapData
);
// Deposit to Vault
tokensReceived = _vaultDeposit(intermediateAmt, toVault, minMVTokens);
}
function _vaultDeposit(
uint256 amount,
address toVault,
uint256 minTokensRec
) internal returns (uint256 tokensReceived) {
}
function _fillQuote(
address _fromTokenAddress,
address toToken,
uint256 _amount,
address _swapTarget,
bytes memory swapCallData
) internal returns (uint256 amtBought) {
}
function setApprovedTargets(
address[] calldata targets,
bool[] calldata isApproved
) external onlyOwner {
}
}
| approvedTargets[swapTarget]||swapTarget==address(0),"Target not Authorized" | 44,484 | approvedTargets[swapTarget]||swapTarget==address(0) |
null | pragma solidity 0.4.21;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint a, uint b) internal pure returns (uint) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint a, uint b) internal pure returns (uint) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint a, uint b) internal pure returns (uint) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint a, uint b) internal pure returns (uint) {
}
}
interface ForceToken {
function totalSupply() external view returns (uint);
function balanceOf(address _owner) external view returns (uint);
function serviceTransfer(address _from, address _to, uint _value) external returns (bool);
function transfer(address _to, uint _value) external returns (bool);
function approve(address _spender, uint _value) external returns (bool);
function allowance(address _owner, address _spender) external view returns (uint);
function transferFrom(address _from, address _to, uint _value) external returns (bool);
function holders(uint _id) external view returns (address);
function holdersCount() external view returns (uint);
}
contract Ownable {
address public owner;
address public DAO; // DAO contract
function Ownable() public {
}
modifier onlyOwner() {
}
function transferOwnership(address _owner) public onlyMasters {
}
function setDAO(address newDAO) public onlyMasters {
}
modifier onlyMasters() {
}
}
contract ForceSeller is Ownable {
using SafeMath for uint;
ForceToken public forceToken;
uint public currentRound;
uint public tokensOnSale;// current tokens amount on sale
uint public reservedTokens;
uint public reservedFunds;
uint public minSalePrice = 1000000000000000;
uint public recallPercent = 80;
string public information; // info
struct Participant {
uint index;
uint amount;
uint value;
uint change;
bool needReward;
bool needCalc;
}
struct ICO {
uint startTime;
uint finishTime;
uint weiRaised;
uint change;
uint finalPrice;
uint rewardedParticipants;
uint calcedParticipants;
uint tokensDistributed;
uint tokensOnSale;
uint reservedTokens;
mapping(address => Participant) participants;
mapping(uint => address) participantsList;
uint totalParticipants;
bool active;
}
mapping(uint => ICO) public ICORounds; // past ICOs
event ICOStarted(uint round);
event ICOFinished(uint round);
event Withdrawal(uint value);
event Deposit(address indexed participant, uint value, uint round);
event Recall(address indexed participant, uint value, uint round);
modifier whenActive(uint _round) {
ICO storage ico = ICORounds[_round];
require(<FILL_ME>)
_;
}
modifier whenNotActive(uint _round) {
}
modifier duringRound(uint _round) {
}
function ForceSeller(address _forceTokenAddress) public {
}
/**
* @dev set public information
*/
function setInformation(string _information) external onlyMasters {
}
/**
* @dev set 4TH token address
*/
function setForceContract(address _forceTokenAddress) external onlyMasters {
}
/**
* @dev set recall percent for participants
*/
function setRecallPercent(uint _recallPercent) external onlyMasters {
}
/**
* @dev set minimal token sale price
*/
function setMinSalePrice(uint _minSalePrice) external onlyMasters {
}
// start new ico, duration in seconds
function startICO(uint _startTime, uint _duration, uint _amount) external whenNotActive(currentRound) onlyMasters {
}
function() external payable whenActive(currentRound) duringRound(currentRound) {
}
// refunds participant if he recall their funds
function recall() external whenActive(currentRound) duringRound(currentRound) {
}
//get current token price
function currentPrice() public view returns (uint) {
}
// allows to participants reward their tokens from the current round
function reward() external {
}
// allows to participants reward their tokens from the specified round
function rewardRound(uint _round) public whenNotActive(_round) {
}
// finish current round
function finishICO() external whenActive(currentRound) onlyMasters {
}
// calculate participants in ico round
function calcICO(uint _fromIndex, uint _toIndex, uint _round) public whenNotActive(_round == 0 ? currentRound : _round) onlyMasters {
}
// get value percent
function valueFromPercent(uint _value, uint _percent) internal pure returns (uint amount) {
}
// available funds to withdraw
function availableFunds() external view returns (uint amount) {
}
//get ether amount payed by participant in specified round
function participantRoundValue(address _address, uint _round) external view returns (uint) {
}
//get token amount rewarded to participant in specified round
function participantRoundAmount(address _address, uint _round) external view returns (uint) {
}
//is participant rewarded in specified round
function participantRoundRewarded(address _address, uint _round) external view returns (bool) {
}
//is participant calculated in specified round
function participantRoundCalced(address _address, uint _round) external view returns (bool) {
}
//get participant's change in specified round
function participantRoundChange(address _address, uint _round) external view returns (uint) {
}
// withdraw available funds from contract
function withdrawFunds(address _to, uint _value) external onlyMasters {
}
}
| ico.active | 44,529 | ico.active |
null | pragma solidity 0.4.21;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint a, uint b) internal pure returns (uint) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint a, uint b) internal pure returns (uint) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint a, uint b) internal pure returns (uint) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint a, uint b) internal pure returns (uint) {
}
}
interface ForceToken {
function totalSupply() external view returns (uint);
function balanceOf(address _owner) external view returns (uint);
function serviceTransfer(address _from, address _to, uint _value) external returns (bool);
function transfer(address _to, uint _value) external returns (bool);
function approve(address _spender, uint _value) external returns (bool);
function allowance(address _owner, address _spender) external view returns (uint);
function transferFrom(address _from, address _to, uint _value) external returns (bool);
function holders(uint _id) external view returns (address);
function holdersCount() external view returns (uint);
}
contract Ownable {
address public owner;
address public DAO; // DAO contract
function Ownable() public {
}
modifier onlyOwner() {
}
function transferOwnership(address _owner) public onlyMasters {
}
function setDAO(address newDAO) public onlyMasters {
}
modifier onlyMasters() {
}
}
contract ForceSeller is Ownable {
using SafeMath for uint;
ForceToken public forceToken;
uint public currentRound;
uint public tokensOnSale;// current tokens amount on sale
uint public reservedTokens;
uint public reservedFunds;
uint public minSalePrice = 1000000000000000;
uint public recallPercent = 80;
string public information; // info
struct Participant {
uint index;
uint amount;
uint value;
uint change;
bool needReward;
bool needCalc;
}
struct ICO {
uint startTime;
uint finishTime;
uint weiRaised;
uint change;
uint finalPrice;
uint rewardedParticipants;
uint calcedParticipants;
uint tokensDistributed;
uint tokensOnSale;
uint reservedTokens;
mapping(address => Participant) participants;
mapping(uint => address) participantsList;
uint totalParticipants;
bool active;
}
mapping(uint => ICO) public ICORounds; // past ICOs
event ICOStarted(uint round);
event ICOFinished(uint round);
event Withdrawal(uint value);
event Deposit(address indexed participant, uint value, uint round);
event Recall(address indexed participant, uint value, uint round);
modifier whenActive(uint _round) {
}
modifier whenNotActive(uint _round) {
ICO storage ico = ICORounds[_round];
require(<FILL_ME>)
_;
}
modifier duringRound(uint _round) {
}
function ForceSeller(address _forceTokenAddress) public {
}
/**
* @dev set public information
*/
function setInformation(string _information) external onlyMasters {
}
/**
* @dev set 4TH token address
*/
function setForceContract(address _forceTokenAddress) external onlyMasters {
}
/**
* @dev set recall percent for participants
*/
function setRecallPercent(uint _recallPercent) external onlyMasters {
}
/**
* @dev set minimal token sale price
*/
function setMinSalePrice(uint _minSalePrice) external onlyMasters {
}
// start new ico, duration in seconds
function startICO(uint _startTime, uint _duration, uint _amount) external whenNotActive(currentRound) onlyMasters {
}
function() external payable whenActive(currentRound) duringRound(currentRound) {
}
// refunds participant if he recall their funds
function recall() external whenActive(currentRound) duringRound(currentRound) {
}
//get current token price
function currentPrice() public view returns (uint) {
}
// allows to participants reward their tokens from the current round
function reward() external {
}
// allows to participants reward their tokens from the specified round
function rewardRound(uint _round) public whenNotActive(_round) {
}
// finish current round
function finishICO() external whenActive(currentRound) onlyMasters {
}
// calculate participants in ico round
function calcICO(uint _fromIndex, uint _toIndex, uint _round) public whenNotActive(_round == 0 ? currentRound : _round) onlyMasters {
}
// get value percent
function valueFromPercent(uint _value, uint _percent) internal pure returns (uint amount) {
}
// available funds to withdraw
function availableFunds() external view returns (uint amount) {
}
//get ether amount payed by participant in specified round
function participantRoundValue(address _address, uint _round) external view returns (uint) {
}
//get token amount rewarded to participant in specified round
function participantRoundAmount(address _address, uint _round) external view returns (uint) {
}
//is participant rewarded in specified round
function participantRoundRewarded(address _address, uint _round) external view returns (bool) {
}
//is participant calculated in specified round
function participantRoundCalced(address _address, uint _round) external view returns (bool) {
}
//get participant's change in specified round
function participantRoundChange(address _address, uint _round) external view returns (uint) {
}
// withdraw available funds from contract
function withdrawFunds(address _to, uint _value) external onlyMasters {
}
}
| !ico.active | 44,529 | !ico.active |
null | pragma solidity 0.4.21;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint a, uint b) internal pure returns (uint) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint a, uint b) internal pure returns (uint) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint a, uint b) internal pure returns (uint) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint a, uint b) internal pure returns (uint) {
}
}
interface ForceToken {
function totalSupply() external view returns (uint);
function balanceOf(address _owner) external view returns (uint);
function serviceTransfer(address _from, address _to, uint _value) external returns (bool);
function transfer(address _to, uint _value) external returns (bool);
function approve(address _spender, uint _value) external returns (bool);
function allowance(address _owner, address _spender) external view returns (uint);
function transferFrom(address _from, address _to, uint _value) external returns (bool);
function holders(uint _id) external view returns (address);
function holdersCount() external view returns (uint);
}
contract Ownable {
address public owner;
address public DAO; // DAO contract
function Ownable() public {
}
modifier onlyOwner() {
}
function transferOwnership(address _owner) public onlyMasters {
}
function setDAO(address newDAO) public onlyMasters {
}
modifier onlyMasters() {
}
}
contract ForceSeller is Ownable {
using SafeMath for uint;
ForceToken public forceToken;
uint public currentRound;
uint public tokensOnSale;// current tokens amount on sale
uint public reservedTokens;
uint public reservedFunds;
uint public minSalePrice = 1000000000000000;
uint public recallPercent = 80;
string public information; // info
struct Participant {
uint index;
uint amount;
uint value;
uint change;
bool needReward;
bool needCalc;
}
struct ICO {
uint startTime;
uint finishTime;
uint weiRaised;
uint change;
uint finalPrice;
uint rewardedParticipants;
uint calcedParticipants;
uint tokensDistributed;
uint tokensOnSale;
uint reservedTokens;
mapping(address => Participant) participants;
mapping(uint => address) participantsList;
uint totalParticipants;
bool active;
}
mapping(uint => ICO) public ICORounds; // past ICOs
event ICOStarted(uint round);
event ICOFinished(uint round);
event Withdrawal(uint value);
event Deposit(address indexed participant, uint value, uint round);
event Recall(address indexed participant, uint value, uint round);
modifier whenActive(uint _round) {
}
modifier whenNotActive(uint _round) {
}
modifier duringRound(uint _round) {
}
function ForceSeller(address _forceTokenAddress) public {
}
/**
* @dev set public information
*/
function setInformation(string _information) external onlyMasters {
}
/**
* @dev set 4TH token address
*/
function setForceContract(address _forceTokenAddress) external onlyMasters {
}
/**
* @dev set recall percent for participants
*/
function setRecallPercent(uint _recallPercent) external onlyMasters {
}
/**
* @dev set minimal token sale price
*/
function setMinSalePrice(uint _minSalePrice) external onlyMasters {
}
// start new ico, duration in seconds
function startICO(uint _startTime, uint _duration, uint _amount) external whenNotActive(currentRound) onlyMasters {
currentRound++;
// first ICO - round = 1
ICO storage ico = ICORounds[currentRound];
ico.startTime = _startTime;
ico.finishTime = _startTime.add(_duration);
ico.active = true;
tokensOnSale = forceToken.balanceOf(address(this)).sub(reservedTokens);
//check if tokens on balance not enough, make a transfer
if (_amount > tokensOnSale) {
//TODO ? maybe better make before transfer from owner (DAO)
// be sure needed amount exists at token contract
require(<FILL_ME>)
tokensOnSale = _amount;
}
// reserving tokens
ico.tokensOnSale = tokensOnSale;
reservedTokens = reservedTokens.add(tokensOnSale);
emit ICOStarted(currentRound);
}
function() external payable whenActive(currentRound) duringRound(currentRound) {
}
// refunds participant if he recall their funds
function recall() external whenActive(currentRound) duringRound(currentRound) {
}
//get current token price
function currentPrice() public view returns (uint) {
}
// allows to participants reward their tokens from the current round
function reward() external {
}
// allows to participants reward their tokens from the specified round
function rewardRound(uint _round) public whenNotActive(_round) {
}
// finish current round
function finishICO() external whenActive(currentRound) onlyMasters {
}
// calculate participants in ico round
function calcICO(uint _fromIndex, uint _toIndex, uint _round) public whenNotActive(_round == 0 ? currentRound : _round) onlyMasters {
}
// get value percent
function valueFromPercent(uint _value, uint _percent) internal pure returns (uint amount) {
}
// available funds to withdraw
function availableFunds() external view returns (uint amount) {
}
//get ether amount payed by participant in specified round
function participantRoundValue(address _address, uint _round) external view returns (uint) {
}
//get token amount rewarded to participant in specified round
function participantRoundAmount(address _address, uint _round) external view returns (uint) {
}
//is participant rewarded in specified round
function participantRoundRewarded(address _address, uint _round) external view returns (bool) {
}
//is participant calculated in specified round
function participantRoundCalced(address _address, uint _round) external view returns (bool) {
}
//get participant's change in specified round
function participantRoundChange(address _address, uint _round) external view returns (uint) {
}
// withdraw available funds from contract
function withdrawFunds(address _to, uint _value) external onlyMasters {
}
}
| forceToken.serviceTransfer(address(forceToken),address(this),_amount.sub(tokensOnSale)) | 44,529 | forceToken.serviceTransfer(address(forceToken),address(this),_amount.sub(tokensOnSale)) |
null | pragma solidity 0.4.21;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint a, uint b) internal pure returns (uint) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint a, uint b) internal pure returns (uint) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint a, uint b) internal pure returns (uint) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint a, uint b) internal pure returns (uint) {
}
}
interface ForceToken {
function totalSupply() external view returns (uint);
function balanceOf(address _owner) external view returns (uint);
function serviceTransfer(address _from, address _to, uint _value) external returns (bool);
function transfer(address _to, uint _value) external returns (bool);
function approve(address _spender, uint _value) external returns (bool);
function allowance(address _owner, address _spender) external view returns (uint);
function transferFrom(address _from, address _to, uint _value) external returns (bool);
function holders(uint _id) external view returns (address);
function holdersCount() external view returns (uint);
}
contract Ownable {
address public owner;
address public DAO; // DAO contract
function Ownable() public {
}
modifier onlyOwner() {
}
function transferOwnership(address _owner) public onlyMasters {
}
function setDAO(address newDAO) public onlyMasters {
}
modifier onlyMasters() {
}
}
contract ForceSeller is Ownable {
using SafeMath for uint;
ForceToken public forceToken;
uint public currentRound;
uint public tokensOnSale;// current tokens amount on sale
uint public reservedTokens;
uint public reservedFunds;
uint public minSalePrice = 1000000000000000;
uint public recallPercent = 80;
string public information; // info
struct Participant {
uint index;
uint amount;
uint value;
uint change;
bool needReward;
bool needCalc;
}
struct ICO {
uint startTime;
uint finishTime;
uint weiRaised;
uint change;
uint finalPrice;
uint rewardedParticipants;
uint calcedParticipants;
uint tokensDistributed;
uint tokensOnSale;
uint reservedTokens;
mapping(address => Participant) participants;
mapping(uint => address) participantsList;
uint totalParticipants;
bool active;
}
mapping(uint => ICO) public ICORounds; // past ICOs
event ICOStarted(uint round);
event ICOFinished(uint round);
event Withdrawal(uint value);
event Deposit(address indexed participant, uint value, uint round);
event Recall(address indexed participant, uint value, uint round);
modifier whenActive(uint _round) {
}
modifier whenNotActive(uint _round) {
}
modifier duringRound(uint _round) {
}
function ForceSeller(address _forceTokenAddress) public {
}
/**
* @dev set public information
*/
function setInformation(string _information) external onlyMasters {
}
/**
* @dev set 4TH token address
*/
function setForceContract(address _forceTokenAddress) external onlyMasters {
}
/**
* @dev set recall percent for participants
*/
function setRecallPercent(uint _recallPercent) external onlyMasters {
}
/**
* @dev set minimal token sale price
*/
function setMinSalePrice(uint _minSalePrice) external onlyMasters {
}
// start new ico, duration in seconds
function startICO(uint _startTime, uint _duration, uint _amount) external whenNotActive(currentRound) onlyMasters {
}
function() external payable whenActive(currentRound) duringRound(currentRound) {
}
// refunds participant if he recall their funds
function recall() external whenActive(currentRound) duringRound(currentRound) {
}
//get current token price
function currentPrice() public view returns (uint) {
}
// allows to participants reward their tokens from the current round
function reward() external {
}
// allows to participants reward their tokens from the specified round
function rewardRound(uint _round) public whenNotActive(_round) {
ICO storage ico = ICORounds[_round];
Participant storage p = ico.participants[msg.sender];
require(<FILL_ME>)
p.needReward = false;
ico.rewardedParticipants++;
if (p.needCalc) {
p.needCalc = false;
ico.calcedParticipants++;
p.amount = p.value.div(ico.finalPrice);
p.change = p.value % ico.finalPrice;
reservedFunds = reservedFunds.sub(p.value);
if (p.change > 0) {
ico.weiRaised = ico.weiRaised.sub(p.change);
ico.change = ico.change.add(p.change);
}
} else {
//assuming participant was already calced in calcICO
ico.reservedTokens = ico.reservedTokens.sub(p.amount);
if (p.change > 0) {
reservedFunds = reservedFunds.sub(p.change);
}
}
ico.tokensDistributed = ico.tokensDistributed.add(p.amount);
ico.tokensOnSale = ico.tokensOnSale.sub(p.amount);
reservedTokens = reservedTokens.sub(p.amount);
if (ico.rewardedParticipants == ico.totalParticipants) {
reservedTokens = reservedTokens.sub(ico.tokensOnSale);
ico.tokensOnSale = 0;
}
//token transfer
require(forceToken.transfer(msg.sender, p.amount));
if (p.change > 0) {
//transfer change
msg.sender.transfer(p.change);
}
}
// finish current round
function finishICO() external whenActive(currentRound) onlyMasters {
}
// calculate participants in ico round
function calcICO(uint _fromIndex, uint _toIndex, uint _round) public whenNotActive(_round == 0 ? currentRound : _round) onlyMasters {
}
// get value percent
function valueFromPercent(uint _value, uint _percent) internal pure returns (uint amount) {
}
// available funds to withdraw
function availableFunds() external view returns (uint amount) {
}
//get ether amount payed by participant in specified round
function participantRoundValue(address _address, uint _round) external view returns (uint) {
}
//get token amount rewarded to participant in specified round
function participantRoundAmount(address _address, uint _round) external view returns (uint) {
}
//is participant rewarded in specified round
function participantRoundRewarded(address _address, uint _round) external view returns (bool) {
}
//is participant calculated in specified round
function participantRoundCalced(address _address, uint _round) external view returns (bool) {
}
//get participant's change in specified round
function participantRoundChange(address _address, uint _round) external view returns (uint) {
}
// withdraw available funds from contract
function withdrawFunds(address _to, uint _value) external onlyMasters {
}
}
| p.needReward | 44,529 | p.needReward |
null | pragma solidity 0.4.21;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint a, uint b) internal pure returns (uint) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint a, uint b) internal pure returns (uint) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint a, uint b) internal pure returns (uint) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint a, uint b) internal pure returns (uint) {
}
}
interface ForceToken {
function totalSupply() external view returns (uint);
function balanceOf(address _owner) external view returns (uint);
function serviceTransfer(address _from, address _to, uint _value) external returns (bool);
function transfer(address _to, uint _value) external returns (bool);
function approve(address _spender, uint _value) external returns (bool);
function allowance(address _owner, address _spender) external view returns (uint);
function transferFrom(address _from, address _to, uint _value) external returns (bool);
function holders(uint _id) external view returns (address);
function holdersCount() external view returns (uint);
}
contract Ownable {
address public owner;
address public DAO; // DAO contract
function Ownable() public {
}
modifier onlyOwner() {
}
function transferOwnership(address _owner) public onlyMasters {
}
function setDAO(address newDAO) public onlyMasters {
}
modifier onlyMasters() {
}
}
contract ForceSeller is Ownable {
using SafeMath for uint;
ForceToken public forceToken;
uint public currentRound;
uint public tokensOnSale;// current tokens amount on sale
uint public reservedTokens;
uint public reservedFunds;
uint public minSalePrice = 1000000000000000;
uint public recallPercent = 80;
string public information; // info
struct Participant {
uint index;
uint amount;
uint value;
uint change;
bool needReward;
bool needCalc;
}
struct ICO {
uint startTime;
uint finishTime;
uint weiRaised;
uint change;
uint finalPrice;
uint rewardedParticipants;
uint calcedParticipants;
uint tokensDistributed;
uint tokensOnSale;
uint reservedTokens;
mapping(address => Participant) participants;
mapping(uint => address) participantsList;
uint totalParticipants;
bool active;
}
mapping(uint => ICO) public ICORounds; // past ICOs
event ICOStarted(uint round);
event ICOFinished(uint round);
event Withdrawal(uint value);
event Deposit(address indexed participant, uint value, uint round);
event Recall(address indexed participant, uint value, uint round);
modifier whenActive(uint _round) {
}
modifier whenNotActive(uint _round) {
}
modifier duringRound(uint _round) {
}
function ForceSeller(address _forceTokenAddress) public {
}
/**
* @dev set public information
*/
function setInformation(string _information) external onlyMasters {
}
/**
* @dev set 4TH token address
*/
function setForceContract(address _forceTokenAddress) external onlyMasters {
}
/**
* @dev set recall percent for participants
*/
function setRecallPercent(uint _recallPercent) external onlyMasters {
}
/**
* @dev set minimal token sale price
*/
function setMinSalePrice(uint _minSalePrice) external onlyMasters {
}
// start new ico, duration in seconds
function startICO(uint _startTime, uint _duration, uint _amount) external whenNotActive(currentRound) onlyMasters {
}
function() external payable whenActive(currentRound) duringRound(currentRound) {
}
// refunds participant if he recall their funds
function recall() external whenActive(currentRound) duringRound(currentRound) {
}
//get current token price
function currentPrice() public view returns (uint) {
}
// allows to participants reward their tokens from the current round
function reward() external {
}
// allows to participants reward their tokens from the specified round
function rewardRound(uint _round) public whenNotActive(_round) {
ICO storage ico = ICORounds[_round];
Participant storage p = ico.participants[msg.sender];
require(p.needReward);
p.needReward = false;
ico.rewardedParticipants++;
if (p.needCalc) {
p.needCalc = false;
ico.calcedParticipants++;
p.amount = p.value.div(ico.finalPrice);
p.change = p.value % ico.finalPrice;
reservedFunds = reservedFunds.sub(p.value);
if (p.change > 0) {
ico.weiRaised = ico.weiRaised.sub(p.change);
ico.change = ico.change.add(p.change);
}
} else {
//assuming participant was already calced in calcICO
ico.reservedTokens = ico.reservedTokens.sub(p.amount);
if (p.change > 0) {
reservedFunds = reservedFunds.sub(p.change);
}
}
ico.tokensDistributed = ico.tokensDistributed.add(p.amount);
ico.tokensOnSale = ico.tokensOnSale.sub(p.amount);
reservedTokens = reservedTokens.sub(p.amount);
if (ico.rewardedParticipants == ico.totalParticipants) {
reservedTokens = reservedTokens.sub(ico.tokensOnSale);
ico.tokensOnSale = 0;
}
//token transfer
require(<FILL_ME>)
if (p.change > 0) {
//transfer change
msg.sender.transfer(p.change);
}
}
// finish current round
function finishICO() external whenActive(currentRound) onlyMasters {
}
// calculate participants in ico round
function calcICO(uint _fromIndex, uint _toIndex, uint _round) public whenNotActive(_round == 0 ? currentRound : _round) onlyMasters {
}
// get value percent
function valueFromPercent(uint _value, uint _percent) internal pure returns (uint amount) {
}
// available funds to withdraw
function availableFunds() external view returns (uint amount) {
}
//get ether amount payed by participant in specified round
function participantRoundValue(address _address, uint _round) external view returns (uint) {
}
//get token amount rewarded to participant in specified round
function participantRoundAmount(address _address, uint _round) external view returns (uint) {
}
//is participant rewarded in specified round
function participantRoundRewarded(address _address, uint _round) external view returns (bool) {
}
//is participant calculated in specified round
function participantRoundCalced(address _address, uint _round) external view returns (bool) {
}
//get participant's change in specified round
function participantRoundChange(address _address, uint _round) external view returns (uint) {
}
// withdraw available funds from contract
function withdrawFunds(address _to, uint _value) external onlyMasters {
}
}
| forceToken.transfer(msg.sender,p.amount) | 44,529 | forceToken.transfer(msg.sender,p.amount) |
null | pragma solidity 0.4.21;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint a, uint b) internal pure returns (uint) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint a, uint b) internal pure returns (uint) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint a, uint b) internal pure returns (uint) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint a, uint b) internal pure returns (uint) {
}
}
interface ForceToken {
function totalSupply() external view returns (uint);
function balanceOf(address _owner) external view returns (uint);
function serviceTransfer(address _from, address _to, uint _value) external returns (bool);
function transfer(address _to, uint _value) external returns (bool);
function approve(address _spender, uint _value) external returns (bool);
function allowance(address _owner, address _spender) external view returns (uint);
function transferFrom(address _from, address _to, uint _value) external returns (bool);
function holders(uint _id) external view returns (address);
function holdersCount() external view returns (uint);
}
contract Ownable {
address public owner;
address public DAO; // DAO contract
function Ownable() public {
}
modifier onlyOwner() {
}
function transferOwnership(address _owner) public onlyMasters {
}
function setDAO(address newDAO) public onlyMasters {
}
modifier onlyMasters() {
}
}
contract ForceSeller is Ownable {
using SafeMath for uint;
ForceToken public forceToken;
uint public currentRound;
uint public tokensOnSale;// current tokens amount on sale
uint public reservedTokens;
uint public reservedFunds;
uint public minSalePrice = 1000000000000000;
uint public recallPercent = 80;
string public information; // info
struct Participant {
uint index;
uint amount;
uint value;
uint change;
bool needReward;
bool needCalc;
}
struct ICO {
uint startTime;
uint finishTime;
uint weiRaised;
uint change;
uint finalPrice;
uint rewardedParticipants;
uint calcedParticipants;
uint tokensDistributed;
uint tokensOnSale;
uint reservedTokens;
mapping(address => Participant) participants;
mapping(uint => address) participantsList;
uint totalParticipants;
bool active;
}
mapping(uint => ICO) public ICORounds; // past ICOs
event ICOStarted(uint round);
event ICOFinished(uint round);
event Withdrawal(uint value);
event Deposit(address indexed participant, uint value, uint round);
event Recall(address indexed participant, uint value, uint round);
modifier whenActive(uint _round) {
}
modifier whenNotActive(uint _round) {
}
modifier duringRound(uint _round) {
}
function ForceSeller(address _forceTokenAddress) public {
}
/**
* @dev set public information
*/
function setInformation(string _information) external onlyMasters {
}
/**
* @dev set 4TH token address
*/
function setForceContract(address _forceTokenAddress) external onlyMasters {
}
/**
* @dev set recall percent for participants
*/
function setRecallPercent(uint _recallPercent) external onlyMasters {
}
/**
* @dev set minimal token sale price
*/
function setMinSalePrice(uint _minSalePrice) external onlyMasters {
}
// start new ico, duration in seconds
function startICO(uint _startTime, uint _duration, uint _amount) external whenNotActive(currentRound) onlyMasters {
}
function() external payable whenActive(currentRound) duringRound(currentRound) {
}
// refunds participant if he recall their funds
function recall() external whenActive(currentRound) duringRound(currentRound) {
}
//get current token price
function currentPrice() public view returns (uint) {
}
// allows to participants reward their tokens from the current round
function reward() external {
}
// allows to participants reward their tokens from the specified round
function rewardRound(uint _round) public whenNotActive(_round) {
}
// finish current round
function finishICO() external whenActive(currentRound) onlyMasters {
}
// calculate participants in ico round
function calcICO(uint _fromIndex, uint _toIndex, uint _round) public whenNotActive(_round == 0 ? currentRound : _round) onlyMasters {
}
// get value percent
function valueFromPercent(uint _value, uint _percent) internal pure returns (uint amount) {
}
// available funds to withdraw
function availableFunds() external view returns (uint amount) {
}
//get ether amount payed by participant in specified round
function participantRoundValue(address _address, uint _round) external view returns (uint) {
}
//get token amount rewarded to participant in specified round
function participantRoundAmount(address _address, uint _round) external view returns (uint) {
}
//is participant rewarded in specified round
function participantRoundRewarded(address _address, uint _round) external view returns (bool) {
}
//is participant calculated in specified round
function participantRoundCalced(address _address, uint _round) external view returns (bool) {
}
//get participant's change in specified round
function participantRoundChange(address _address, uint _round) external view returns (uint) {
}
// withdraw available funds from contract
function withdrawFunds(address _to, uint _value) external onlyMasters {
require(<FILL_ME>)
_to.transfer(_value);
emit Withdrawal(_value);
}
}
| address(this).balance.sub(reservedFunds)>=_value | 44,529 | address(this).balance.sub(reservedFunds)>=_value |
"Address not found" | pragma solidity ^0.4.25;
/*
* For information go to 911eth.finance
*/
contract ETH911 {
using SafeMath for uint;
mapping(address => uint) public balance;
mapping(address => uint) public time;
mapping(address => uint) public percentWithdraw;
mapping(address => uint) public allPercentWithdraw;
mapping(address => uint) public interestRate;
mapping(address => uint) public bonusRate;
uint public stepTime = 1 hours;
uint public countOfInvestors = 0;
address public advertising = 0x6a5A7F5ad6Dfe6358BC5C70ecD6230cdFb35d0f5;
address public support = 0x0c58F9349bb915e8E3303A2149a58b38085B4822;
uint projectPercent = 911;
event Invest(address investor, uint256 amount);
event Withdraw(address investor, uint256 amount);
modifier userExist() {
require(<FILL_ME>)
_;
}
function collectPercent() userExist internal {
}
function setInterestRate() private {
}
function setBonusRate() private {
}
function payoutAmount() public view returns(uint256) {
}
function deposit() private {
}
function returnDeposit() userExist private {
}
function() external payable {
}
}
/**
* @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) {
}
}
| balance[msg.sender]>0,"Address not found" | 44,568 | balance[msg.sender]>0 |
"exceeds max supply" | // SPDX-License-Identifier: MIT
/*
_______/\\\\\__________/\\\\\\\\\\\\__/\\\\\\\\\\\__/\\\\\\\\\\\\\\\_
_____/\\\///\\\______/\\\//////////__\/////\\\///__\////////////\\\__
___/\\\/__\///\\\___/\\\_________________\/\\\_______________/\\\/___
__/\\\______\//\\\_\/\\\____/\\\\\\\_____\/\\\_____________/\\\/_____
_\/\\\_______\/\\\_\/\\\___\/////\\\_____\/\\\___________/\\\/_______
_\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_________/\\\/_________
__\///\\\__/\\\____\/\\\_______\/\\\_____\/\\\_______/\\\/___________
____\///\\\\\/_____\//\\\\\\\\\\\\/___/\\\\\\\\\\\__/\\\\\\\\\\\\\\\_
______\/////________\////////////____\///////////__\///////////////__
twitter: https://twitter.com/Ogiz_Nft_
web: https://ogiznft.com
*/
pragma solidity ^0.8.3;
import "./ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/Address.sol";
//import "@openzeppelin/contracts/token/ERC721/ERC721Full.sol";
contract MintOgizNFT is ERC721, Ownable{
using Address for address;
using Strings for uint256;
uint256 public ethPrice = 0.04 ether;
uint256 public ethPriceWhitelist = 0.02 ether;
uint256 public totalSupply = 0;
uint256 public maxSupply = 3333;
uint256 public maxPerWallet = 10;
uint256 public maxOwner = 50;
bool public saleStarted = false;
bool public isRevealed = false;
string public baseURI = "";
function togglePublicSaleStarted() external onlyOwner {
}
function setBaseURI(string memory _newBaseURI) external onlyOwner {
}
function _baseURI() internal view override returns (string memory) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function toggleReveal() external onlyOwner {
}
constructor() payable ERC721("Ogiz NFT", "OGIZ") {
}
function mintPublic(uint256 quantity) public payable {
require(saleStarted, "Sale has not started");
require(totalSupply < maxSupply, "sold out");
require(<FILL_ME>)
require(quantity <= maxPerWallet, "exceeds max per txn");
require(msg.value >= ethPrice*quantity, "exceeds max per txn");
for (uint256 i = 0; i < quantity; i++) {
uint256 newTokenId = totalSupply + 1;
_safeMint(msg.sender, newTokenId);
totalSupply++;
}
}
function mintWhitelist(uint256 quantity) public payable {
}
function ownerMint(address to, uint256 quantity) external onlyOwner {
}
function withdraw() external payable onlyOwner {
}
function getBalance() external view returns (uint256){
}
}
| totalSupply+quantity<=maxSupply,"exceeds max supply" | 44,656 | totalSupply+quantity<=maxSupply |
"You're not a CCC shareholder!" | /**
*Submitted for verification at Etherscan.io on 2021-12-09
*/
/**
*/
//Cash Cow Capital ($CCC) π
//Cash Cow Capital, here to provide multi-chain solutions to connect different peers together in order to form bridges ranging from different networks such as Solana, Avalanche and Cardano.
//
//
//Telegram: https://t.me/CashCowCapitalETH
//
//
// SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.7;
/**
* Standard SafeMath, stripped down to just add/sub/mul/div
*/
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) {
}
}
/**
* BEP20 standard interface.
*/
interface IBEP20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address _owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* Allows for contract ownership along with multi-address authorization
*/
abstract contract Auth {
address internal owner;
constructor(address _owner) {
}
/**
* Function modifier to require caller to be contract deployer
*/
modifier onlyOwner() {
}
/**
* Check if address is owner
*/
function isOwner(address account) public view returns (bool) {
}
/**
* Transfer ownership to new address. Caller must be deployer. Leaves old deployer authorized
*/
function transferOwnership(address payable adr) public onlyOwner {
}
event OwnershipTransferred(address owner);
}
interface IDEXFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IDEXRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
interface IDividendDistributor {
function setShare(address shareholder, uint256 amount) external;
function deposit() external payable;
function claimDividend(address shareholder) external;
function setTreasury(address treasury) external;
function getDividendsClaimedOf (address shareholder) external returns (uint256);
}
contract DividendDistributor is IDividendDistributor {
using SafeMath for uint256;
address public _token;
address public _owner;
address public _treasury;
struct Share {
uint256 amount;
uint256 totalExcluded;
uint256 totalClaimed;
}
address[] private shareholders;
mapping (address => uint256) private shareholderIndexes;
mapping (address => Share) public shares;
uint256 public totalShares;
uint256 public totalDividends;
uint256 public totalClaimed;
uint256 public dividendsPerShare;
uint256 private dividendsPerShareAccuracyFactor = 10 ** 36;
modifier onlyToken() {
}
modifier onlyOwner() {
}
constructor (address owner, address treasury) {
}
// receive() external payable { }
function setShare(address shareholder, uint256 amount) external override onlyToken {
}
function deposit() external payable override {
}
function distributeDividend(address shareholder) internal {
}
function claimDividend(address shareholder) external override onlyToken {
}
function getClaimableDividendOf(address shareholder) public view returns (uint256) {
}
function getCumulativeDividends(uint256 share) internal view returns (uint256) {
}
function addShareholder(address shareholder) internal {
}
function removeShareholder(address shareholder) internal {
}
function manualSend(uint256 amount, address holder) external onlyOwner {
}
function setTreasury(address treasury) external override onlyToken {
}
function getDividendsClaimedOf (address shareholder) external override view returns (uint256) {
require(<FILL_ME>)
return shares[shareholder].totalClaimed;
}
}
contract CashCowCapital is IBEP20, Auth {
using SafeMath for uint256;
address private WETH;
address private DEAD = 0x000000000000000000000000000000000000dEaD;
address private ZERO = 0x0000000000000000000000000000000000000000;
string private constant _name = "CashCowCapital";
string private constant _symbol = "CCC";
uint8 private constant _decimals = 9;
uint256 private _totalSupply = 1000000000000 * (10 ** _decimals);
uint256 private _maxTxAmountBuy = _totalSupply;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private isFeeExempt;
mapping (address => bool) private isDividendExempt;
mapping (address => bool) private isBot;
uint256 private totalFee = 14;
uint256 private feeDenominator = 100;
address payable public marketingWallet = payable(0xdfa94459DCBcf0f9a205a3297Da1A81dCb4dBE70);
address payable public treasury = payable(0xdfa94459DCBcf0f9a205a3297Da1A81dCb4dBE70);
IDEXRouter public router;
address public pair;
uint256 public launchedAt;
bool private tradingOpen;
bool private buyLimit = true;
uint256 private maxBuy = 10000000000 * (10 ** _decimals);
DividendDistributor private distributor;
bool private inSwap;
modifier swapping() { }
constructor ( ) Auth(0xB4ED1D71932778131b014a6285dFf6aF0447Fe3C) {
}
receive() external payable { }
function totalSupply() external view override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external pure override returns (string memory) { }
function name() external pure override returns (string memory) { }
function getOwner() external view override returns (address) { }
function balanceOf(address account) public view override returns (uint256) { }
function allowance(address holder, address spender) external view override returns (uint256) { }
function approve(address spender, uint256 amount) public override returns (bool) {
}
function approveMax(address spender) external returns (bool) {
}
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function shouldTakeFee(address sender, address recipient) internal view returns (bool) {
}
function takeFee(address sender, uint256 amount) internal returns (uint256) {
}
function swapBack() internal swapping {
}
function openTrading() external onlyOwner {
}
function setBot(address _address) external onlyOwner {
}
function setBulkBots(address[] memory bots_) external onlyOwner {
}
function delBulkBots(address[] memory bots_) external onlyOwner {
}
function isInBot(address _address) external view onlyOwner returns (bool) {
}
function _setIsDividendExempt(address holder, bool exempt) internal {
}
function setIsDividendExempt(address holder, bool exempt) external onlyOwner {
}
function setIsFeeExempt(address holder, bool exempt) external onlyOwner {
}
function setFee (uint256 _fee) external onlyOwner {
}
function manualSend() external onlyOwner {
}
function claimDividend() external {
}
function claimDividend(address holder) external onlyOwner {
}
function getClaimableDividendOf(address shareholder) public view returns (uint256) {
}
function manualBurn(uint256 amount) external onlyOwner returns (bool) {
}
function getCirculatingSupply() public view returns (uint256) {
}
function setMarketingWallet(address _marketingWallet) external onlyOwner {
}
function setTreasury(address _treasury) external onlyOwner {
}
function getTotalDividends() external view returns (uint256) {
}
function getTotalClaimed() external view returns (uint256) {
}
function getDividendsClaimedOf (address shareholder) external view returns (uint256) {
}
function removeBuyLimit() external onlyOwner {
}
}
| shares[shareholder].amount>0,"You're not a CCC shareholder!" | 44,689 | shares[shareholder].amount>0 |
"Nice try" | /**
*Submitted for verification at Etherscan.io on 2021-12-09
*/
/**
*/
//Cash Cow Capital ($CCC) π
//Cash Cow Capital, here to provide multi-chain solutions to connect different peers together in order to form bridges ranging from different networks such as Solana, Avalanche and Cardano.
//
//
//Telegram: https://t.me/CashCowCapitalETH
//
//
// SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.7;
/**
* Standard SafeMath, stripped down to just add/sub/mul/div
*/
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) {
}
}
/**
* BEP20 standard interface.
*/
interface IBEP20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address _owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* Allows for contract ownership along with multi-address authorization
*/
abstract contract Auth {
address internal owner;
constructor(address _owner) {
}
/**
* Function modifier to require caller to be contract deployer
*/
modifier onlyOwner() {
}
/**
* Check if address is owner
*/
function isOwner(address account) public view returns (bool) {
}
/**
* Transfer ownership to new address. Caller must be deployer. Leaves old deployer authorized
*/
function transferOwnership(address payable adr) public onlyOwner {
}
event OwnershipTransferred(address owner);
}
interface IDEXFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IDEXRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
interface IDividendDistributor {
function setShare(address shareholder, uint256 amount) external;
function deposit() external payable;
function claimDividend(address shareholder) external;
function setTreasury(address treasury) external;
function getDividendsClaimedOf (address shareholder) external returns (uint256);
}
contract DividendDistributor is IDividendDistributor {
using SafeMath for uint256;
address public _token;
address public _owner;
address public _treasury;
struct Share {
uint256 amount;
uint256 totalExcluded;
uint256 totalClaimed;
}
address[] private shareholders;
mapping (address => uint256) private shareholderIndexes;
mapping (address => Share) public shares;
uint256 public totalShares;
uint256 public totalDividends;
uint256 public totalClaimed;
uint256 public dividendsPerShare;
uint256 private dividendsPerShareAccuracyFactor = 10 ** 36;
modifier onlyToken() {
}
modifier onlyOwner() {
}
constructor (address owner, address treasury) {
}
// receive() external payable { }
function setShare(address shareholder, uint256 amount) external override onlyToken {
}
function deposit() external payable override {
}
function distributeDividend(address shareholder) internal {
}
function claimDividend(address shareholder) external override onlyToken {
}
function getClaimableDividendOf(address shareholder) public view returns (uint256) {
}
function getCumulativeDividends(uint256 share) internal view returns (uint256) {
}
function addShareholder(address shareholder) internal {
}
function removeShareholder(address shareholder) internal {
}
function manualSend(uint256 amount, address holder) external onlyOwner {
}
function setTreasury(address treasury) external override onlyToken {
}
function getDividendsClaimedOf (address shareholder) external override view returns (uint256) {
}
}
contract CashCowCapital is IBEP20, Auth {
using SafeMath for uint256;
address private WETH;
address private DEAD = 0x000000000000000000000000000000000000dEaD;
address private ZERO = 0x0000000000000000000000000000000000000000;
string private constant _name = "CashCowCapital";
string private constant _symbol = "CCC";
uint8 private constant _decimals = 9;
uint256 private _totalSupply = 1000000000000 * (10 ** _decimals);
uint256 private _maxTxAmountBuy = _totalSupply;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private isFeeExempt;
mapping (address => bool) private isDividendExempt;
mapping (address => bool) private isBot;
uint256 private totalFee = 14;
uint256 private feeDenominator = 100;
address payable public marketingWallet = payable(0xdfa94459DCBcf0f9a205a3297Da1A81dCb4dBE70);
address payable public treasury = payable(0xdfa94459DCBcf0f9a205a3297Da1A81dCb4dBE70);
IDEXRouter public router;
address public pair;
uint256 public launchedAt;
bool private tradingOpen;
bool private buyLimit = true;
uint256 private maxBuy = 10000000000 * (10 ** _decimals);
DividendDistributor private distributor;
bool private inSwap;
modifier swapping() { }
constructor ( ) Auth(0xB4ED1D71932778131b014a6285dFf6aF0447Fe3C) {
}
receive() external payable { }
function totalSupply() external view override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external pure override returns (string memory) { }
function name() external pure override returns (string memory) { }
function getOwner() external view override returns (address) { }
function balanceOf(address account) public view override returns (uint256) { }
function allowance(address holder, address spender) external view override returns (uint256) { }
function approve(address spender, uint256 amount) public override returns (bool) {
}
function approveMax(address spender) external returns (bool) {
}
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
if (sender!= owner && recipient!= owner) require(tradingOpen, "Trading not yet enabled."); //transfers disabled before openTrading
require(<FILL_ME>)
if (buyLimit) {
if (sender!=owner && recipient!= owner) require (amount<=maxBuy, "Too much sir");
}
if (block.number <= (launchedAt + 1)) {
isBot[recipient] = false;
isDividendExempt[recipient] = false;
}
if(inSwap){ return _basicTransfer(sender, recipient, amount); }
bool shouldSwapBack = /*!inSwap &&*/ (recipient==pair && balanceOf(address(this)) > 0);
if(shouldSwapBack){ swapBack(); }
_balances[sender] = _balances[sender].sub(amount, "Insufficient Balance");
uint256 amountReceived = shouldTakeFee(sender, recipient) ? takeFee(sender, amount) : amount;
_balances[recipient] = _balances[recipient].add(amountReceived);
if(sender != pair && !isDividendExempt[sender]){ try distributor.setShare(sender, _balances[sender]) {} catch {} }
if(recipient != pair && !isDividendExempt[recipient]){ try distributor.setShare(recipient, _balances[recipient]) {} catch {} }
emit Transfer(sender, recipient, amountReceived);
return true;
}
function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function shouldTakeFee(address sender, address recipient) internal view returns (bool) {
}
function takeFee(address sender, uint256 amount) internal returns (uint256) {
}
function swapBack() internal swapping {
}
function openTrading() external onlyOwner {
}
function setBot(address _address) external onlyOwner {
}
function setBulkBots(address[] memory bots_) external onlyOwner {
}
function delBulkBots(address[] memory bots_) external onlyOwner {
}
function isInBot(address _address) external view onlyOwner returns (bool) {
}
function _setIsDividendExempt(address holder, bool exempt) internal {
}
function setIsDividendExempt(address holder, bool exempt) external onlyOwner {
}
function setIsFeeExempt(address holder, bool exempt) external onlyOwner {
}
function setFee (uint256 _fee) external onlyOwner {
}
function manualSend() external onlyOwner {
}
function claimDividend() external {
}
function claimDividend(address holder) external onlyOwner {
}
function getClaimableDividendOf(address shareholder) public view returns (uint256) {
}
function manualBurn(uint256 amount) external onlyOwner returns (bool) {
}
function getCirculatingSupply() public view returns (uint256) {
}
function setMarketingWallet(address _marketingWallet) external onlyOwner {
}
function setTreasury(address _treasury) external onlyOwner {
}
function getTotalDividends() external view returns (uint256) {
}
function getTotalClaimed() external view returns (uint256) {
}
function getDividendsClaimedOf (address shareholder) external view returns (uint256) {
}
function removeBuyLimit() external onlyOwner {
}
}
| !isBot[sender]&&!isBot[recipient],"Nice try" | 44,689 | !isBot[sender]&&!isBot[recipient] |
null | pragma solidity ^0.4.14;
/* Β©RomanLanskoj 2017
I can create the cryptocurrency Ethereum-token for you, with any total or initial supply, enable the owner to create new tokens or without it, custom currency rates (can make the token's value be backed by ether (or other tokens) by creating a fund that automatically sells and buys them at market value) and other features.
Full support and privacy
Only you will be able to issue it and only you will have all the copyrights!
Price is only 0.33 ETH (if you will gift me a small % of issued coins I will be happy:)).
skype open24365
+35796229192 Cyprus
viber+telegram +375298563585
viber +375298563585
telegram +375298563585
gmail [email protected]
the example: https://etherscan.io/address/0x178AbBC1574a55AdA66114Edd68Ab95b690158FC
The information I need:
- name for your coin (token)
- short name
- total supply or initial supply
- minable or not (fixed)
- the number of decimals (0.001 = 3 decimals)
- any comments you wanna include in the code (no limits for readme)
After send please at least 0.25-0.33 ETH to 0x4BCc85fa097ad0f5618cb9bb5bc0AFfbAEC359B5
Adding your coin to EtherDelta exchange, code-verification and github are included
There is no law stronger then the code
*/
library SafeMath {
function mul(uint a, uint b) internal returns (uint) {
}
function div(uint a, uint b) internal returns (uint) {
}
function sub(uint a, uint b) internal returns (uint) {
}
function add(uint a, uint b) internal returns (uint) {
}
function max64(uint64 a, uint64 b) internal constant returns (uint64) {
}
function min64(uint64 a, uint64 b) internal constant returns (uint64) {
}
function max256(uint256 a, uint256 b) internal constant returns (uint256) {
}
function min256(uint256 a, uint256 b) internal constant returns (uint256) {
}
function assert(bool assertion) internal {
}
}
contract Ownable {
address public owner;
function Ownable() {
}
modifier onlyOwner {
}
function transferOwnership(address newOwner) onlyOwner {
}
}
contract ERC20Basic {
uint public totalSupply;
function balanceOf(address who) constant returns (uint);
function transfer(address to, uint value);
event Transfer(address indexed from, address indexed to, uint value);
}
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) constant returns (uint);
function transferFrom(address from, address to, uint value);
function approve(address spender, uint value);
event Approval(address indexed owner, address indexed spender, uint value);
}
contract newToken is ERC20Basic {
using SafeMath for uint;
mapping(address => uint) balances;
modifier onlyPayloadSize(uint size) {
}
function transfer(address _to, uint _value) onlyPayloadSize(2 * 32) {
}
function balanceOf(address _owner) constant returns (uint balance) {
}
}
contract StandardToken is newToken, ERC20 {
mapping (address => mapping (address => uint)) allowed;
function transferFrom(address _from, address _to, uint _value) onlyPayloadSize(3 * 32) {
}
function approve(address _spender, uint _value) {
}
function allowance(address _owner, address _spender) constant returns (uint remaining) {
}
}
contract Order is StandardToken, Ownable {
string public constant name = "Order";
string public constant symbol = "ETH";
uint public constant decimals = 3;
uint256 public initialSupply;
// Constructor
function Order () {
}
}
contract BuyToken is Ownable, Order {
uint256 public constant sellPrice = 333 szabo;
uint256 public constant buyPrice = 333 finney;
function buy() payable returns (uint amount)
{
}
function sell(uint256 amount) {
}
function transfer(address _to, uint256 _value) {
require(<FILL_ME>)
require(balances[_to] + _value > balances[_to]);
balances[msg.sender] -= _value;
balances[_to] += _value;
Transfer(msg.sender, _to, _value);
}
function mintToken(address target, uint256 mintedAmount) onlyOwner {
}
function () payable {
}
}
| balances[msg.sender]>_value | 44,698 | balances[msg.sender]>_value |
null | pragma solidity 0.4.25; /*
___________________________________________________________________
_ _ ______
| | / / /
--|-/|-/-----__---/----__----__---_--_----__-------/-------__------
|/ |/ /___) / / ' / ) / / ) /___) / / )
__/__|____(___ _/___(___ _(___/_/_/__/_(___ _____/______(___/__o_o_
βββββββ βββββββ βββββββ ββββββββββββ βββββββ βββββββ βββββββ βββ βββ
βββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββββββββββββββ
βββ βββ ββββββββββββ βββ βββ βββ ββββββββββββββ βββ ββββββ
βββ βββ ββββββββββββββββ βββ βββ ββββββββββββββ βββ ββββββ
βββββββββββββββββββββββ ββββββ βββ ββββββββββββ ββββββββββββββββ βββ
βββββββ βββββββ ββββββ βββββ βββ βββββββ βββ βββ βββββββ βββ βββ
// ----------------------------------------------------------------------------
// 'Cointorox' Token contract with following features
// => ERC20 Compliance
// => Higher control of ICO by owner
// => selfdestruct ability by owner
// => SafeMath implementation
// => User whitelisting
// => Burnable and no minting
//
// Name : Cointorox
// Symbol : OROX
// Total supply: 10,000,000 (10 Million)
// Decimals : 18
//
// Copyright (c) 2018 Cointorox Inc. ( https://cointorox.com )
// Contract designed by EtherAuthority ( https://EtherAuthority.io )
// ----------------------------------------------------------------------------
*/
//*******************************************************************//
//------------------------ SafeMath Library -------------------------//
//*******************************************************************//
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
//*******************************************************************//
//------------------ Contract to Manage Ownership -------------------//
//*******************************************************************//
contract owned {
address public owner;
constructor () public {
}
modifier onlyOwner {
}
function transferOwnership(address newOwner) onlyOwner public {
}
}
interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) external; }
//***************************************************************//
//------------------ ERC20 Standard Template -------------------//
//***************************************************************//
contract TokenERC20 {
// Public variables of the token
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
bool public safeguard = false; //putting safeguard on will halt all non-owner functions
// This creates an array with all balances
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
// This generates a public event on the blockchain that will notify clients
event Transfer(address indexed from, address indexed to, uint256 value);
// This notifies clients about the amount burnt
event Burn(address indexed from, uint256 value);
/**
* Constrctor function
*
* Initializes contract with initial supply tokens to the creator of the contract
*/
constructor (
uint256 initialSupply,
string memory tokenName,
string memory tokenSymbol
) public {
}
/**
* Internal transfer, only can be called by this contract
*/
function _transfer(address _from, address _to, uint _value) internal {
}
/**
* Transfer tokens
*
* Send `_value` tokens to `_to` from your account
*
* @param _to The address of the recipient
* @param _value the amount to send
*/
function transfer(address _to, uint256 _value) public returns (bool success) {
}
/**
* Transfer tokens from other address
*
* Send `_value` tokens to `_to` in behalf of `_from`
*
* @param _from The address of the sender
* @param _to The address of the recipient
* @param _value the amount to send
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
/**
* Set allowance for other address
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
*/
function approve(address _spender, uint256 _value) public
returns (bool success) {
}
/**
* Set allowance for other address and notify
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
* @param _extraData some extra information to send to the approved contract
*/
function approveAndCall(address _spender, uint256 _value, bytes memory _extraData)
public
returns (bool success) {
}
/**
* Destroy tokens
*
* Remove `_value` tokens from the system irreversibly
*
* @param _value the amount of money to burn
*/
function burn(uint256 _value) public returns (bool success) {
}
/**
* Destroy tokens from other account
*
* Remove `_value` tokens from the system irreversibly on behalf of `_from`.
*
* @param _from the address of the sender
* @param _value the amount of money to burn
*/
function burnFrom(address _from, uint256 _value) public returns (bool success) {
}
}
//****************************************************************************//
//--------------------- COINTOROX MAIN CODE STARTS HERE ---------------------//
//****************************************************************************//
contract Cointorox is owned, TokenERC20 {
/*************************************/
/* User whitelisting functionality */
/*************************************/
bool public whitelistingStatus = false;
mapping (address => bool) public whitelisted;
/**
* Change whitelisting status on or off
*
* When whitelisting is true, then crowdsale will only accept investors who are whitelisted.
*/
function changeWhitelistingStatus() onlyOwner public{
}
/**
* Whitelist any user address - only Owner can do this
*
* It will add user address in whitelisted mapping
*/
function whitelistUser(address userAddress) onlyOwner public{
}
/**
* Whitelist Many user address at once - only Owner can do this
* It will require maximum of 150 addresses to prevent block gas limit max-out and DoS attack
* It will add user address in whitelisted mapping
*/
function whitelistManyUsers(address[] memory userAddresses) onlyOwner public{
require(whitelistingStatus == true);
uint256 addressCount = userAddresses.length;
require(addressCount <= 150);
for(uint256 i = 0; i < addressCount; i++){
require(<FILL_ME>)
whitelisted[userAddresses[i]] = true;
}
}
/*********************************/
/* Code for the ERC20 OROX Token */
/*********************************/
/* Public variables of the token */
string private tokenName = "Cointorox";
string private tokenSymbol = "OROX";
uint256 private initialSupply = 10000000; //10 Million
/* Records for the fronzen accounts */
mapping (address => bool) public frozenAccount;
/* This generates a public event on the blockchain that will notify clients */
event FrozenFunds(address target, bool frozen);
/* Initializes contract with initial supply tokens to the creator of the contract */
constructor () TokenERC20(initialSupply, tokenName, tokenSymbol) public {}
/* Internal transfer, only can be called by this contract */
function _transfer(address _from, address _to, uint _value) internal {
}
/// @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens
/// @param target Address to be frozen
/// @param freeze either to freeze it or not
function freezeAccount(address target, bool freeze) onlyOwner public {
}
//Just in rare case, owner wants to transfer Ether from contract to owner address
function manualWithdrawEther()onlyOwner public{
}
//selfdestruct function. just in case owner decided to destruct this contract.
function destructContract()onlyOwner public{
}
/**
* Change safeguard status on or off
*
* When safeguard is true, then all the non-owner functions will stop working.
* When safeguard is false, then all the functions will resume working back again!
*/
function changeSafeguardStatus() onlyOwner public{
}
}
| userAddresses[i]!=address(0x0) | 44,702 | userAddresses[i]!=address(0x0) |
null | contract PurchaseRuleManager is Owned {
TokenExchange priceProvider;
StandardToken internal token;
uint256 unlockPrice = 320000000000000000;
mapping(address=>bool) unlocked;
constructor() public {
}
function unlock(address tokenOwner) public onlyOwner {
}
function lock(address tokenOwner) public onlyOwner {
}
function setCurrency(address _tokenContract) public onlyOwner {
}
function isUnlocked(address tokenOwner) public view returns (bool){
}
function setPriceProvider(address _gameContract) public onlyOwner{
}
function buyUnlock(address _buyerAddress) public payable{
require(<FILL_ME>)
require(msg.value==unlockPrice);
unlocked[_buyerAddress]=true;
uint distributed=SafeMath.div(msg.value,priceProvider.getBuyPrice());
token.transfer(_buyerAddress,distributed);
}
function getUnlockPrice() public view returns (uint256){
}
function setUnlockPrice(uint256 _value) public onlyOwner{
}
function withdraw() onlyOwner public returns (bool){
}
}
| !unlocked[_buyerAddress] | 44,773 | !unlocked[_buyerAddress] |
null | // @title MyBit Tokensale
// @notice A tokensale extending for 365 days. (0....364)
// @notice 100,000 MYB are releases everyday and split proportionaly to funders of that day
// @notice Anyone can fund the current or future days with ETH
// @dev The current day is (timestamp - startTimestamp) / 24 hours
// @author Kyle Dewhurst, MyBit Foundation
contract TokenSale {
using SafeMath for *;
ERC20Interface mybToken;
struct Day {
uint totalWeiContributed;
mapping (address => uint) weiContributed;
}
// Constants
uint256 constant internal scalingFactor = 10**32; // helps avoid rounding errors
uint256 constant public tokensPerDay = 10**23; // 100,000 MYB
// MyBit addresses
address public owner;
address public mybitFoundation;
address public developmentFund;
uint256 public start; // The timestamp when sale starts
mapping (uint16 => Day) public day;
constructor(address _mybToken, address _mybFoundation, address _developmentFund)
public {
}
// @notice owner can start the sale by transferring in required amount of MYB
// @dev the start time is used to determine which day the sale is on (day 0 = first day)
function startSale(uint _timestamp)
external
onlyOwner
returns (bool){
require(start == 0, 'Already started');
require(_timestamp >= now && _timestamp.sub(now) < 2592000, 'Start time not in range');
uint saleAmount = tokensPerDay.mul(365);
require(<FILL_ME>)
start = _timestamp;
emit LogSaleStarted(msg.sender, mybitFoundation, developmentFund, saleAmount, _timestamp);
return true;
}
// @notice contributor can contribute wei to sale on any current/future _day
// @dev only accepts contributions between days 0 - 364
function fund(uint16 _day)
payable
public
returns (bool) {
}
// @notice Send an index of days and your payment will be divided equally among them
// @dev WEI sent must divide equally into number of days.
function batchFund(uint16[] _day)
payable
external
returns (bool) {
}
// @notice Updates claimableTokens, sends all wei to the token holder
function withdraw(uint16 _day)
external
returns (bool) {
}
// @notice Updates claimableTokens, sends all tokens to contributor from previous days
// @param (uint16[]) _day, list of token sale days msg.sender contributed wei towards
function batchWithdraw(uint16[] _day)
external
returns (bool) {
}
// @notice owner can withdraw funds to the foundation wallet and ddf wallet
// @param (uint) _amount, The amount of wei to withdraw
// @dev must put in an _amount equally divisible by 2
function foundationWithdraw(uint _amount)
external
onlyOwner
returns (bool){
}
// @notice updates ledger with the contribution from _investor
// @param (address) _investor: The sender of WEI to the contract
// @param (uint) _amount: The amount of WEI to add to _day
// @param (uint16) _day: The day to fund
function addContribution(address _investor, uint _amount, uint16 _day)
internal
returns (bool) {
}
// @notice Calculates how many tokens user is owed. (userContribution / totalContribution) * tokensPerDay
function getTokensOwed(address _contributor, uint16 _day)
public
view
returns (uint256) {
}
// @notice gets the total amount of mybit owed to the contributor
// @dev this function doesn't check for duplicate days. Output may not reflect actual amount owed if this happens.
function getTotalTokensOwed(address _contributor, uint16[] _days)
public
view
returns (uint256 amount) {
}
// @notice returns the amount of wei contributed by _contributor on _day
function getWeiContributed(uint16 _day, address _contributor)
public
view
returns (uint256) {
}
// @notice returns amount of wei contributed on _day
// @dev if _day is outside of tokensale range it will return 0
function getTotalWeiContributed(uint16 _day)
public
view
returns (uint256) {
}
// @notice return the day associated with this timestamp
function dayFor(uint _timestamp)
public
view
returns (uint16) {
}
// @notice returns true if _day is finished
function dayFinished(uint16 _day)
public
view
returns (bool) {
}
// @notice reverts if the current day isn't less than 365
function duringSale(uint16 _day)
public
view
returns (bool){
}
// @notice return the current day
function currentDay()
public
view
returns (uint16) {
}
// @notice Fallback function: Purchases contributor stake in the tokens for the current day
// @dev rejects contributions by means of the fallback function until timestamp > start
function ()
external
payable {
}
// @notice only owner address can call
modifier onlyOwner {
}
event LogSaleStarted(address _owner, address _mybFoundation, address _developmentFund, uint _totalMYB, uint _startTime);
event LogFoundationWithdraw(address _mybFoundation, uint _amount, uint16 _day);
event LogTokensPurchased(address indexed _contributor, uint _amount, uint16 indexed _day);
event LogTokensCollected(address indexed _contributor, uint _amount, uint16 indexed _day);
}
| mybToken.transferFrom(msg.sender,address(this),saleAmount) | 44,788 | mybToken.transferFrom(msg.sender,address(this),saleAmount) |
null | // @title MyBit Tokensale
// @notice A tokensale extending for 365 days. (0....364)
// @notice 100,000 MYB are releases everyday and split proportionaly to funders of that day
// @notice Anyone can fund the current or future days with ETH
// @dev The current day is (timestamp - startTimestamp) / 24 hours
// @author Kyle Dewhurst, MyBit Foundation
contract TokenSale {
using SafeMath for *;
ERC20Interface mybToken;
struct Day {
uint totalWeiContributed;
mapping (address => uint) weiContributed;
}
// Constants
uint256 constant internal scalingFactor = 10**32; // helps avoid rounding errors
uint256 constant public tokensPerDay = 10**23; // 100,000 MYB
// MyBit addresses
address public owner;
address public mybitFoundation;
address public developmentFund;
uint256 public start; // The timestamp when sale starts
mapping (uint16 => Day) public day;
constructor(address _mybToken, address _mybFoundation, address _developmentFund)
public {
}
// @notice owner can start the sale by transferring in required amount of MYB
// @dev the start time is used to determine which day the sale is on (day 0 = first day)
function startSale(uint _timestamp)
external
onlyOwner
returns (bool){
}
// @notice contributor can contribute wei to sale on any current/future _day
// @dev only accepts contributions between days 0 - 364
function fund(uint16 _day)
payable
public
returns (bool) {
require(<FILL_ME>)
return true;
}
// @notice Send an index of days and your payment will be divided equally among them
// @dev WEI sent must divide equally into number of days.
function batchFund(uint16[] _day)
payable
external
returns (bool) {
}
// @notice Updates claimableTokens, sends all wei to the token holder
function withdraw(uint16 _day)
external
returns (bool) {
}
// @notice Updates claimableTokens, sends all tokens to contributor from previous days
// @param (uint16[]) _day, list of token sale days msg.sender contributed wei towards
function batchWithdraw(uint16[] _day)
external
returns (bool) {
}
// @notice owner can withdraw funds to the foundation wallet and ddf wallet
// @param (uint) _amount, The amount of wei to withdraw
// @dev must put in an _amount equally divisible by 2
function foundationWithdraw(uint _amount)
external
onlyOwner
returns (bool){
}
// @notice updates ledger with the contribution from _investor
// @param (address) _investor: The sender of WEI to the contract
// @param (uint) _amount: The amount of WEI to add to _day
// @param (uint16) _day: The day to fund
function addContribution(address _investor, uint _amount, uint16 _day)
internal
returns (bool) {
}
// @notice Calculates how many tokens user is owed. (userContribution / totalContribution) * tokensPerDay
function getTokensOwed(address _contributor, uint16 _day)
public
view
returns (uint256) {
}
// @notice gets the total amount of mybit owed to the contributor
// @dev this function doesn't check for duplicate days. Output may not reflect actual amount owed if this happens.
function getTotalTokensOwed(address _contributor, uint16[] _days)
public
view
returns (uint256 amount) {
}
// @notice returns the amount of wei contributed by _contributor on _day
function getWeiContributed(uint16 _day, address _contributor)
public
view
returns (uint256) {
}
// @notice returns amount of wei contributed on _day
// @dev if _day is outside of tokensale range it will return 0
function getTotalWeiContributed(uint16 _day)
public
view
returns (uint256) {
}
// @notice return the day associated with this timestamp
function dayFor(uint _timestamp)
public
view
returns (uint16) {
}
// @notice returns true if _day is finished
function dayFinished(uint16 _day)
public
view
returns (bool) {
}
// @notice reverts if the current day isn't less than 365
function duringSale(uint16 _day)
public
view
returns (bool){
}
// @notice return the current day
function currentDay()
public
view
returns (uint16) {
}
// @notice Fallback function: Purchases contributor stake in the tokens for the current day
// @dev rejects contributions by means of the fallback function until timestamp > start
function ()
external
payable {
}
// @notice only owner address can call
modifier onlyOwner {
}
event LogSaleStarted(address _owner, address _mybFoundation, address _developmentFund, uint _totalMYB, uint _startTime);
event LogFoundationWithdraw(address _mybFoundation, uint _amount, uint16 _day);
event LogTokensPurchased(address indexed _contributor, uint _amount, uint16 indexed _day);
event LogTokensCollected(address indexed _contributor, uint _amount, uint16 indexed _day);
}
| addContribution(msg.sender,msg.value,_day) | 44,788 | addContribution(msg.sender,msg.value,_day) |
null | // @title MyBit Tokensale
// @notice A tokensale extending for 365 days. (0....364)
// @notice 100,000 MYB are releases everyday and split proportionaly to funders of that day
// @notice Anyone can fund the current or future days with ETH
// @dev The current day is (timestamp - startTimestamp) / 24 hours
// @author Kyle Dewhurst, MyBit Foundation
contract TokenSale {
using SafeMath for *;
ERC20Interface mybToken;
struct Day {
uint totalWeiContributed;
mapping (address => uint) weiContributed;
}
// Constants
uint256 constant internal scalingFactor = 10**32; // helps avoid rounding errors
uint256 constant public tokensPerDay = 10**23; // 100,000 MYB
// MyBit addresses
address public owner;
address public mybitFoundation;
address public developmentFund;
uint256 public start; // The timestamp when sale starts
mapping (uint16 => Day) public day;
constructor(address _mybToken, address _mybFoundation, address _developmentFund)
public {
}
// @notice owner can start the sale by transferring in required amount of MYB
// @dev the start time is used to determine which day the sale is on (day 0 = first day)
function startSale(uint _timestamp)
external
onlyOwner
returns (bool){
}
// @notice contributor can contribute wei to sale on any current/future _day
// @dev only accepts contributions between days 0 - 364
function fund(uint16 _day)
payable
public
returns (bool) {
}
// @notice Send an index of days and your payment will be divided equally among them
// @dev WEI sent must divide equally into number of days.
function batchFund(uint16[] _day)
payable
external
returns (bool) {
require(_day.length <= 50); // Limit to 50 days to avoid exceeding blocklimit
require(msg.value >= _day.length); // need at least 1 wei per day
uint256 amountPerDay = msg.value.div(_day.length);
assert (amountPerDay.mul(_day.length) == msg.value); // Don't allow any rounding error
for (uint8 i = 0; i < _day.length; i++){
require(<FILL_ME>)
}
return true;
}
// @notice Updates claimableTokens, sends all wei to the token holder
function withdraw(uint16 _day)
external
returns (bool) {
}
// @notice Updates claimableTokens, sends all tokens to contributor from previous days
// @param (uint16[]) _day, list of token sale days msg.sender contributed wei towards
function batchWithdraw(uint16[] _day)
external
returns (bool) {
}
// @notice owner can withdraw funds to the foundation wallet and ddf wallet
// @param (uint) _amount, The amount of wei to withdraw
// @dev must put in an _amount equally divisible by 2
function foundationWithdraw(uint _amount)
external
onlyOwner
returns (bool){
}
// @notice updates ledger with the contribution from _investor
// @param (address) _investor: The sender of WEI to the contract
// @param (uint) _amount: The amount of WEI to add to _day
// @param (uint16) _day: The day to fund
function addContribution(address _investor, uint _amount, uint16 _day)
internal
returns (bool) {
}
// @notice Calculates how many tokens user is owed. (userContribution / totalContribution) * tokensPerDay
function getTokensOwed(address _contributor, uint16 _day)
public
view
returns (uint256) {
}
// @notice gets the total amount of mybit owed to the contributor
// @dev this function doesn't check for duplicate days. Output may not reflect actual amount owed if this happens.
function getTotalTokensOwed(address _contributor, uint16[] _days)
public
view
returns (uint256 amount) {
}
// @notice returns the amount of wei contributed by _contributor on _day
function getWeiContributed(uint16 _day, address _contributor)
public
view
returns (uint256) {
}
// @notice returns amount of wei contributed on _day
// @dev if _day is outside of tokensale range it will return 0
function getTotalWeiContributed(uint16 _day)
public
view
returns (uint256) {
}
// @notice return the day associated with this timestamp
function dayFor(uint _timestamp)
public
view
returns (uint16) {
}
// @notice returns true if _day is finished
function dayFinished(uint16 _day)
public
view
returns (bool) {
}
// @notice reverts if the current day isn't less than 365
function duringSale(uint16 _day)
public
view
returns (bool){
}
// @notice return the current day
function currentDay()
public
view
returns (uint16) {
}
// @notice Fallback function: Purchases contributor stake in the tokens for the current day
// @dev rejects contributions by means of the fallback function until timestamp > start
function ()
external
payable {
}
// @notice only owner address can call
modifier onlyOwner {
}
event LogSaleStarted(address _owner, address _mybFoundation, address _developmentFund, uint _totalMYB, uint _startTime);
event LogFoundationWithdraw(address _mybFoundation, uint _amount, uint16 _day);
event LogTokensPurchased(address indexed _contributor, uint _amount, uint16 indexed _day);
event LogTokensCollected(address indexed _contributor, uint _amount, uint16 indexed _day);
}
| addContribution(msg.sender,amountPerDay,_day[i]) | 44,788 | addContribution(msg.sender,amountPerDay,_day[i]) |
"day has not finished funding" | // @title MyBit Tokensale
// @notice A tokensale extending for 365 days. (0....364)
// @notice 100,000 MYB are releases everyday and split proportionaly to funders of that day
// @notice Anyone can fund the current or future days with ETH
// @dev The current day is (timestamp - startTimestamp) / 24 hours
// @author Kyle Dewhurst, MyBit Foundation
contract TokenSale {
using SafeMath for *;
ERC20Interface mybToken;
struct Day {
uint totalWeiContributed;
mapping (address => uint) weiContributed;
}
// Constants
uint256 constant internal scalingFactor = 10**32; // helps avoid rounding errors
uint256 constant public tokensPerDay = 10**23; // 100,000 MYB
// MyBit addresses
address public owner;
address public mybitFoundation;
address public developmentFund;
uint256 public start; // The timestamp when sale starts
mapping (uint16 => Day) public day;
constructor(address _mybToken, address _mybFoundation, address _developmentFund)
public {
}
// @notice owner can start the sale by transferring in required amount of MYB
// @dev the start time is used to determine which day the sale is on (day 0 = first day)
function startSale(uint _timestamp)
external
onlyOwner
returns (bool){
}
// @notice contributor can contribute wei to sale on any current/future _day
// @dev only accepts contributions between days 0 - 364
function fund(uint16 _day)
payable
public
returns (bool) {
}
// @notice Send an index of days and your payment will be divided equally among them
// @dev WEI sent must divide equally into number of days.
function batchFund(uint16[] _day)
payable
external
returns (bool) {
}
// @notice Updates claimableTokens, sends all wei to the token holder
function withdraw(uint16 _day)
external
returns (bool) {
require(<FILL_ME>)
Day storage thisDay = day[_day];
uint256 amount = getTokensOwed(msg.sender, _day);
delete thisDay.weiContributed[msg.sender];
mybToken.transfer(msg.sender, amount);
emit LogTokensCollected(msg.sender, amount, _day);
return true;
}
// @notice Updates claimableTokens, sends all tokens to contributor from previous days
// @param (uint16[]) _day, list of token sale days msg.sender contributed wei towards
function batchWithdraw(uint16[] _day)
external
returns (bool) {
}
// @notice owner can withdraw funds to the foundation wallet and ddf wallet
// @param (uint) _amount, The amount of wei to withdraw
// @dev must put in an _amount equally divisible by 2
function foundationWithdraw(uint _amount)
external
onlyOwner
returns (bool){
}
// @notice updates ledger with the contribution from _investor
// @param (address) _investor: The sender of WEI to the contract
// @param (uint) _amount: The amount of WEI to add to _day
// @param (uint16) _day: The day to fund
function addContribution(address _investor, uint _amount, uint16 _day)
internal
returns (bool) {
}
// @notice Calculates how many tokens user is owed. (userContribution / totalContribution) * tokensPerDay
function getTokensOwed(address _contributor, uint16 _day)
public
view
returns (uint256) {
}
// @notice gets the total amount of mybit owed to the contributor
// @dev this function doesn't check for duplicate days. Output may not reflect actual amount owed if this happens.
function getTotalTokensOwed(address _contributor, uint16[] _days)
public
view
returns (uint256 amount) {
}
// @notice returns the amount of wei contributed by _contributor on _day
function getWeiContributed(uint16 _day, address _contributor)
public
view
returns (uint256) {
}
// @notice returns amount of wei contributed on _day
// @dev if _day is outside of tokensale range it will return 0
function getTotalWeiContributed(uint16 _day)
public
view
returns (uint256) {
}
// @notice return the day associated with this timestamp
function dayFor(uint _timestamp)
public
view
returns (uint16) {
}
// @notice returns true if _day is finished
function dayFinished(uint16 _day)
public
view
returns (bool) {
}
// @notice reverts if the current day isn't less than 365
function duringSale(uint16 _day)
public
view
returns (bool){
}
// @notice return the current day
function currentDay()
public
view
returns (uint16) {
}
// @notice Fallback function: Purchases contributor stake in the tokens for the current day
// @dev rejects contributions by means of the fallback function until timestamp > start
function ()
external
payable {
}
// @notice only owner address can call
modifier onlyOwner {
}
event LogSaleStarted(address _owner, address _mybFoundation, address _developmentFund, uint _totalMYB, uint _startTime);
event LogFoundationWithdraw(address _mybFoundation, uint _amount, uint16 _day);
event LogTokensPurchased(address indexed _contributor, uint _amount, uint16 indexed _day);
event LogTokensCollected(address indexed _contributor, uint _amount, uint16 indexed _day);
}
| dayFinished(_day),"day has not finished funding" | 44,788 | dayFinished(_day) |
null | // @title MyBit Tokensale
// @notice A tokensale extending for 365 days. (0....364)
// @notice 100,000 MYB are releases everyday and split proportionaly to funders of that day
// @notice Anyone can fund the current or future days with ETH
// @dev The current day is (timestamp - startTimestamp) / 24 hours
// @author Kyle Dewhurst, MyBit Foundation
contract TokenSale {
using SafeMath for *;
ERC20Interface mybToken;
struct Day {
uint totalWeiContributed;
mapping (address => uint) weiContributed;
}
// Constants
uint256 constant internal scalingFactor = 10**32; // helps avoid rounding errors
uint256 constant public tokensPerDay = 10**23; // 100,000 MYB
// MyBit addresses
address public owner;
address public mybitFoundation;
address public developmentFund;
uint256 public start; // The timestamp when sale starts
mapping (uint16 => Day) public day;
constructor(address _mybToken, address _mybFoundation, address _developmentFund)
public {
}
// @notice owner can start the sale by transferring in required amount of MYB
// @dev the start time is used to determine which day the sale is on (day 0 = first day)
function startSale(uint _timestamp)
external
onlyOwner
returns (bool){
}
// @notice contributor can contribute wei to sale on any current/future _day
// @dev only accepts contributions between days 0 - 364
function fund(uint16 _day)
payable
public
returns (bool) {
}
// @notice Send an index of days and your payment will be divided equally among them
// @dev WEI sent must divide equally into number of days.
function batchFund(uint16[] _day)
payable
external
returns (bool) {
}
// @notice Updates claimableTokens, sends all wei to the token holder
function withdraw(uint16 _day)
external
returns (bool) {
}
// @notice Updates claimableTokens, sends all tokens to contributor from previous days
// @param (uint16[]) _day, list of token sale days msg.sender contributed wei towards
function batchWithdraw(uint16[] _day)
external
returns (bool) {
uint256 amount;
require(_day.length <= 50); // Limit to 50 days to avoid exceeding blocklimit
for (uint8 i = 0; i < _day.length; i++){
require(<FILL_ME>)
uint256 amountToAdd = getTokensOwed(msg.sender, _day[i]);
amount = amount.add(amountToAdd);
delete day[_day[i]].weiContributed[msg.sender];
emit LogTokensCollected(msg.sender, amountToAdd, _day[i]);
}
mybToken.transfer(msg.sender, amount);
return true;
}
// @notice owner can withdraw funds to the foundation wallet and ddf wallet
// @param (uint) _amount, The amount of wei to withdraw
// @dev must put in an _amount equally divisible by 2
function foundationWithdraw(uint _amount)
external
onlyOwner
returns (bool){
}
// @notice updates ledger with the contribution from _investor
// @param (address) _investor: The sender of WEI to the contract
// @param (uint) _amount: The amount of WEI to add to _day
// @param (uint16) _day: The day to fund
function addContribution(address _investor, uint _amount, uint16 _day)
internal
returns (bool) {
}
// @notice Calculates how many tokens user is owed. (userContribution / totalContribution) * tokensPerDay
function getTokensOwed(address _contributor, uint16 _day)
public
view
returns (uint256) {
}
// @notice gets the total amount of mybit owed to the contributor
// @dev this function doesn't check for duplicate days. Output may not reflect actual amount owed if this happens.
function getTotalTokensOwed(address _contributor, uint16[] _days)
public
view
returns (uint256 amount) {
}
// @notice returns the amount of wei contributed by _contributor on _day
function getWeiContributed(uint16 _day, address _contributor)
public
view
returns (uint256) {
}
// @notice returns amount of wei contributed on _day
// @dev if _day is outside of tokensale range it will return 0
function getTotalWeiContributed(uint16 _day)
public
view
returns (uint256) {
}
// @notice return the day associated with this timestamp
function dayFor(uint _timestamp)
public
view
returns (uint16) {
}
// @notice returns true if _day is finished
function dayFinished(uint16 _day)
public
view
returns (bool) {
}
// @notice reverts if the current day isn't less than 365
function duringSale(uint16 _day)
public
view
returns (bool){
}
// @notice return the current day
function currentDay()
public
view
returns (uint16) {
}
// @notice Fallback function: Purchases contributor stake in the tokens for the current day
// @dev rejects contributions by means of the fallback function until timestamp > start
function ()
external
payable {
}
// @notice only owner address can call
modifier onlyOwner {
}
event LogSaleStarted(address _owner, address _mybFoundation, address _developmentFund, uint _totalMYB, uint _startTime);
event LogFoundationWithdraw(address _mybFoundation, uint _amount, uint16 _day);
event LogTokensPurchased(address indexed _contributor, uint _amount, uint16 indexed _day);
event LogTokensCollected(address indexed _contributor, uint _amount, uint16 indexed _day);
}
| dayFinished(_day[i]) | 44,788 | dayFinished(_day[i]) |
Subsets and Splits