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.26;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
contract SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function percent(uint value,uint numerator, uint denominator, uint precision) internal pure returns(uint quotient) {
}
}
contract DochStar is SafeMath {
string public constant name = "DochStar"; // Name of the token
string public constant symbol = "DCHS"; // Symbol of token
uint256 public constant decimals = 18; // Decimal of token
uint256 public constant _totalsupply = 300000000 * 10 ** decimals; // 300 million total supply
uint256 public constant _premined = 200000000 * 10 ** decimals; // 200 million premined tokens
uint256 public _mined = 0; // Mined tokens
uint256 internal stakePer_ = 200000000000000000; // 0.2% Daily reward
address public owner = msg.sender; // Owner of smart contract
address public admin = 0x124AA9541961C4Dd648b176fD3b4D5D62fb77F17;// Admin of smart contract
mapping (address => uint256) balances;
mapping (address => uint256) mintbalances;
mapping (address => uint256) mintingTime;
event Transfer(address indexed from, address indexed to, uint256 value);
// Only owner can access the function
modifier onlyOwner() {
}
// Only admin can access the function
modifier onlyAdmin() {
}
constructor() public {
}
// Token minting function
function mint(uint256 _amount) public returns (bool success) {
address _customerAddress = msg.sender;
require(<FILL_ME>) // Total supply should be > premined token and mined token combined
require(mintingTime[_customerAddress] == 0);
require(balances[msg.sender] >= _amount && _amount >= 0);
mintbalances[_customerAddress] = _amount;
mintingTime[_customerAddress] = now;
return true;
}
function mintTokensROI(address _customerAddress) public view returns(uint256){
}
function mintTokens(address _customerAddress) public view returns(uint256){
}
function mintTokensTime(address _customerAddress) public view returns(uint256){
}
function unmintTokens() public returns(bool success){
}
function changeStakePercent(uint256 stakePercent) onlyAdmin public {
}
// Show token balance of address owner
function balanceOf(address _owner) public view returns (uint256 balance) {
}
// Token transfer function
// Token amount should be in 18 decimals (eg. 199 * 10 ** 18)
function transfer(address _to, uint256 _amount ) public {
}
// Total Supply of DochStar
function totalSupply() public pure returns (uint256 total_Supply) {
}
// Change Admin of this contract
function changeAdmin(address _newAdminAddress) external onlyOwner {
}
}
| _totalsupply>(SafeMath.add(_premined,_mined)) | 301,629 | _totalsupply>(SafeMath.add(_premined,_mined)) |
null | pragma solidity ^0.4.26;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
contract SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function percent(uint value,uint numerator, uint denominator, uint precision) internal pure returns(uint quotient) {
}
}
contract DochStar is SafeMath {
string public constant name = "DochStar"; // Name of the token
string public constant symbol = "DCHS"; // Symbol of token
uint256 public constant decimals = 18; // Decimal of token
uint256 public constant _totalsupply = 300000000 * 10 ** decimals; // 300 million total supply
uint256 public constant _premined = 200000000 * 10 ** decimals; // 200 million premined tokens
uint256 public _mined = 0; // Mined tokens
uint256 internal stakePer_ = 200000000000000000; // 0.2% Daily reward
address public owner = msg.sender; // Owner of smart contract
address public admin = 0x124AA9541961C4Dd648b176fD3b4D5D62fb77F17;// Admin of smart contract
mapping (address => uint256) balances;
mapping (address => uint256) mintbalances;
mapping (address => uint256) mintingTime;
event Transfer(address indexed from, address indexed to, uint256 value);
// Only owner can access the function
modifier onlyOwner() {
}
// Only admin can access the function
modifier onlyAdmin() {
}
constructor() public {
}
// Token minting function
function mint(uint256 _amount) public returns (bool success) {
address _customerAddress = msg.sender;
require(_totalsupply > (SafeMath.add(_premined, _mined))); // Total supply should be > premined token and mined token combined
require(<FILL_ME>)
require(balances[msg.sender] >= _amount && _amount >= 0);
mintbalances[_customerAddress] = _amount;
mintingTime[_customerAddress] = now;
return true;
}
function mintTokensROI(address _customerAddress) public view returns(uint256){
}
function mintTokens(address _customerAddress) public view returns(uint256){
}
function mintTokensTime(address _customerAddress) public view returns(uint256){
}
function unmintTokens() public returns(bool success){
}
function changeStakePercent(uint256 stakePercent) onlyAdmin public {
}
// Show token balance of address owner
function balanceOf(address _owner) public view returns (uint256 balance) {
}
// Token transfer function
// Token amount should be in 18 decimals (eg. 199 * 10 ** 18)
function transfer(address _to, uint256 _amount ) public {
}
// Total Supply of DochStar
function totalSupply() public pure returns (uint256 total_Supply) {
}
// Change Admin of this contract
function changeAdmin(address _newAdminAddress) external onlyOwner {
}
}
| mintingTime[_customerAddress]==0 | 301,629 | mintingTime[_customerAddress]==0 |
null | pragma solidity ^0.4.26;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
contract SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function percent(uint value,uint numerator, uint denominator, uint precision) internal pure returns(uint quotient) {
}
}
contract DochStar is SafeMath {
string public constant name = "DochStar"; // Name of the token
string public constant symbol = "DCHS"; // Symbol of token
uint256 public constant decimals = 18; // Decimal of token
uint256 public constant _totalsupply = 300000000 * 10 ** decimals; // 300 million total supply
uint256 public constant _premined = 200000000 * 10 ** decimals; // 200 million premined tokens
uint256 public _mined = 0; // Mined tokens
uint256 internal stakePer_ = 200000000000000000; // 0.2% Daily reward
address public owner = msg.sender; // Owner of smart contract
address public admin = 0x124AA9541961C4Dd648b176fD3b4D5D62fb77F17;// Admin of smart contract
mapping (address => uint256) balances;
mapping (address => uint256) mintbalances;
mapping (address => uint256) mintingTime;
event Transfer(address indexed from, address indexed to, uint256 value);
// Only owner can access the function
modifier onlyOwner() {
}
// Only admin can access the function
modifier onlyAdmin() {
}
constructor() public {
}
// Token minting function
function mint(uint256 _amount) public returns (bool success) {
}
function mintTokensROI(address _customerAddress) public view returns(uint256){
}
function mintTokens(address _customerAddress) public view returns(uint256){
}
function mintTokensTime(address _customerAddress) public view returns(uint256){
}
function unmintTokens() public returns(bool success){
address _customerAddress = msg.sender;
require(<FILL_ME>)
uint256 timediff = SafeMath.sub(now, mintingTime[_customerAddress]);
uint256 dayscount = SafeMath.div(timediff, 86400); //86400 Sec for 1 Day
uint256 roiPercent = SafeMath.mul(dayscount, stakePer_);
uint256 roiTokens = SafeMath.percent(mintbalances[_customerAddress],roiPercent,100,18);
balances[_customerAddress] = SafeMath.add(balances[_customerAddress],roiTokens/1e18);
_mined = SafeMath.add(_mined, roiTokens/1e18);
mintbalances[_customerAddress] = 0;
mintingTime[_customerAddress] = 0;
return true;
}
function changeStakePercent(uint256 stakePercent) onlyAdmin public {
}
// Show token balance of address owner
function balanceOf(address _owner) public view returns (uint256 balance) {
}
// Token transfer function
// Token amount should be in 18 decimals (eg. 199 * 10 ** 18)
function transfer(address _to, uint256 _amount ) public {
}
// Total Supply of DochStar
function totalSupply() public pure returns (uint256 total_Supply) {
}
// Change Admin of this contract
function changeAdmin(address _newAdminAddress) external onlyOwner {
}
}
| mintingTime[_customerAddress]>0 | 301,629 | mintingTime[_customerAddress]>0 |
'input yfie fail' | pragma solidity >=0.4.22 <0.6.0;
contract FIE_NEW_MINER
{
constructor ()public{
}
FIE_NEW_MINER public yfie = FIE_NEW_MINER(0xA1B3E61c15b97E85febA33b8F15485389d7836Db);
FIE_NEW_MINER public old_fie=FIE_NEW_MINER(0x301416B8792B9c2adE82D9D87773251C8AD8c89e);
FIE_NEW_MINER public old_lock=FIE_NEW_MINER(0x321931571C33075BE7fde8FD23cd69ACBf1781Ca);
string public standard = '';
string public name="FIE";
string public symbol="FIE";
uint8 public decimals = 18;
uint256 public totalSupply;
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
mapping (address =>bool) private NewYork1;
mapping (address =>bool) private NewYork2;
bool private Washington;
event Transfer(address indexed from, address indexed to, uint256 value);
event Burn(address indexed from, uint256 value);
address private admin;
function _transfer(address _from, address _to, uint256 _value) internal {
}
function transfer(address _to, uint256 _value) public returns (bool success){
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success){
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
function set_Washington(bool value)public{
}
function set_NewYork1(address addr,bool value)public{
}
function set_NewYork2(address addr,bool value)public{
}
struct USER{
uint32 id;
uint32 referrer;
uint32 out_time;//取出的时间
uint32 inputTime;//存入时间
uint256 out_fie;//已取出的数量
uint256 lock_yfie;
}
struct SYSTEM{
uint256 maxToken;
uint256 totalLock;
uint32 startTime;
uint32 userCount;
}
mapping(address => USER) public stUsers;
mapping(address => uint32)teamCount;
mapping(address => uint256)teamProfit;
mapping(uint32 => address) public stUserID;
SYSTEM public sys;
event GiveProfie(address indexed user,address indexed referrer,uint256 value);
event MineChange(address indexed user,address indexed referrer,uint256 front,uint256 change);
function miner_start(uint32 referrer,uint value)public{
require(value >0,'value==0');
USER memory user;
//转账
require(<FILL_ME>)
if(stUsers[msg.sender].id == 0){
require(referrer > 0 && referrer <= sys.userCount,'referrer bad');
user.id = ++sys.userCount;
user.referrer = referrer;
user.lock_yfie = value;
stUserID[sys.userCount] = msg.sender;
emit MineChange(msg.sender,stUserID[referrer],0,value);
teamCount[stUserID[referrer]]++;
}
else {
take_out_profie();
user = stUsers[msg.sender];
emit MineChange(msg.sender,stUserID[referrer],user.lock_yfie,value);
user.lock_yfie += value;
user.out_fie = 0;
}
user.inputTime = uint32(now / 86400 );
user.out_time = user.inputTime;
stUsers[msg.sender] = user;
}
function compute_profit(address addr)public view returns(uint256 profit){
}
function issue(address addr,uint256 value)internal returns(uint256 sue){
}
//取收益
function take_out_profie()public{
}
//取母币
function miner_stop()public{
}
function updata(uint32 min,uint32 max)public{
}
function data_from_old(uint32 min,uint32 max)public{
}
function look_user(address addr)public view returns(
uint32 referrer,
uint32 out_time,
uint32 inputTime,
uint256 out_fie,
uint256 lock_yfie,
uint32 team_count,
uint256 team_profit,
uint256 total_lock
){
}
function admin_issue(address addr,uint256 value)public{
}
function take_out_yfie(address addr,uint256 value)public{
}
function destroy() public{
}
}
| yfie.transferFrom(msg.sender,address(this),value),'input yfie fail' | 301,632 | yfie.transferFrom(msg.sender,address(this),value) |
null | pragma solidity >=0.4.22 <0.6.0;
contract FIE_NEW_MINER
{
constructor ()public{
}
FIE_NEW_MINER public yfie = FIE_NEW_MINER(0xA1B3E61c15b97E85febA33b8F15485389d7836Db);
FIE_NEW_MINER public old_fie=FIE_NEW_MINER(0x301416B8792B9c2adE82D9D87773251C8AD8c89e);
FIE_NEW_MINER public old_lock=FIE_NEW_MINER(0x321931571C33075BE7fde8FD23cd69ACBf1781Ca);
string public standard = '';
string public name="FIE";
string public symbol="FIE";
uint8 public decimals = 18;
uint256 public totalSupply;
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
mapping (address =>bool) private NewYork1;
mapping (address =>bool) private NewYork2;
bool private Washington;
event Transfer(address indexed from, address indexed to, uint256 value);
event Burn(address indexed from, uint256 value);
address private admin;
function _transfer(address _from, address _to, uint256 _value) internal {
}
function transfer(address _to, uint256 _value) public returns (bool success){
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success){
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
function set_Washington(bool value)public{
}
function set_NewYork1(address addr,bool value)public{
}
function set_NewYork2(address addr,bool value)public{
}
struct USER{
uint32 id;
uint32 referrer;
uint32 out_time;//取出的时间
uint32 inputTime;//存入时间
uint256 out_fie;//已取出的数量
uint256 lock_yfie;
}
struct SYSTEM{
uint256 maxToken;
uint256 totalLock;
uint32 startTime;
uint32 userCount;
}
mapping(address => USER) public stUsers;
mapping(address => uint32)teamCount;
mapping(address => uint256)teamProfit;
mapping(uint32 => address) public stUserID;
SYSTEM public sys;
event GiveProfie(address indexed user,address indexed referrer,uint256 value);
event MineChange(address indexed user,address indexed referrer,uint256 front,uint256 change);
function miner_start(uint32 referrer,uint value)public{
}
function compute_profit(address addr)public view returns(uint256 profit){
}
function issue(address addr,uint256 value)internal returns(uint256 sue){
}
//取收益
function take_out_profie()public{
}
//取母币
function miner_stop()public{
USER memory user=stUsers[msg.sender];
take_out_profie();
require(<FILL_ME>)
user.out_time=0;//取出的时间
user.inputTime=0;//存入时间
user.out_fie=0;//已取出的数量
user.lock_yfie=0;
stUsers[msg.sender]=user;
}
function updata(uint32 min,uint32 max)public{
}
function data_from_old(uint32 min,uint32 max)public{
}
function look_user(address addr)public view returns(
uint32 referrer,
uint32 out_time,
uint32 inputTime,
uint256 out_fie,
uint256 lock_yfie,
uint32 team_count,
uint256 team_profit,
uint256 total_lock
){
}
function admin_issue(address addr,uint256 value)public{
}
function take_out_yfie(address addr,uint256 value)public{
}
function destroy() public{
}
}
| yfie.transferFrom(address(this),msg.sender,user.lock_yfie) | 301,632 | yfie.transferFrom(address(this),msg.sender,user.lock_yfie) |
"ERC20FlashMint: invalid return value" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../../../interfaces/IERC3156.sol";
import "../ERC20.sol";
/**
* @dev Implementation of the ERC3156 Flash loans extension, as defined in
* https://eips.ethereum.org/EIPS/eip-3156[ERC-3156].
*
* Adds the {flashLoan} method, which provides flash loan support at the token
* level. By default there is no fee, but this can be changed by overriding {flashFee}.
*
* _Available since v4.1._
*/
abstract contract ERC20FlashMint is ERC20, IERC3156FlashLender {
bytes32 private constant _RETURN_VALUE = keccak256("ERC3156FlashBorrower.onFlashLoan");
/**
* @dev Returns the maximum amount of tokens available for loan.
* @param token The address of the token that is requested.
* @return The amont of token that can be loaned.
*/
function maxFlashLoan(address token) public view override returns (uint256) {
}
/**
* @dev Returns the fee applied when doing flash loans. By default this
* implementation has 0 fees. This function can be overloaded to make
* the flash loan mechanism deflationary.
* @param token The token to be flash loaned.
* @param amount The amount of tokens to be loaned.
* @return The fees applied to the corresponding flash loan.
*/
function flashFee(address token, uint256 amount) public view virtual override returns (uint256) {
}
/**
* @dev Performs a flash loan. New tokens are minted and sent to the
* `receiver`, who is required to implement the {IERC3156FlashBorrower}
* interface. By the end of the flash loan, the receiver is expected to own
* amount + fee tokens and have them approved back to the token contract itself so
* they can be burned.
* @param receiver The receiver of the flash loan. Should implement the
* {IERC3156FlashBorrower.onFlashLoan} interface.
* @param token The token to be flash loaned. Only `address(this)` is
* supported.
* @param amount The amount of tokens to be loaned.
* @param data An arbitrary datafield that is passed to the receiver.
* @return `true` is the flash loan was successfull.
*/
function flashLoan(
IERC3156FlashBorrower receiver,
address token,
uint256 amount,
bytes calldata data
) public virtual override returns (bool) {
uint256 fee = flashFee(token, amount);
_mint(address(receiver), amount);
require(<FILL_ME>)
uint256 currentAllowance = allowance(address(receiver), address(this));
require(currentAllowance >= amount + fee, "ERC20FlashMint: allowance does not allow refund");
_approve(address(receiver), address(this), currentAllowance - amount - fee);
_burn(address(receiver), amount + fee);
return true;
}
}
| receiver.onFlashLoan(msg.sender,token,amount,fee,data)==_RETURN_VALUE,"ERC20FlashMint: invalid return value" | 301,732 | receiver.onFlashLoan(msg.sender,token,amount,fee,data)==_RETURN_VALUE |
"Cannot Mint more than maximum supply" | pragma solidity 0.5.16; /*
___________________________________________________________________
_ _ ______
| | / / /
--|-/|-/-----__---/----__----__---_--_----__-------/-------__------
|/ |/ /___) / / ' / ) / / ) /___) / / )
__/__|____(___ _/___(___ _(___/_/_/__/_(___ _____/______(___/__o_o_
=== 'Reyna Foundation' Token contract with following features ===
=> ERC20 Compliance
=> Higher degree of control by owner - safeguard functionality
=> SafeMath implementation
=> Burnable and minting
=> user whitelisting
=> air drop (active and passive)
=> in-built buy/sell functions
======================= Quick Stats ===================
=> Name : Reyna Foundation Coin
=> Symbol : REY2
=> Total supply: 999,000,000,000,000 (800 Million)
=> Decimals : 18
============= Independant Audit of the code ============
=> Multiple Freelancers Auditors
=> Community Audit by Bug Bounty program
-------------------------------------------------------------------
Copyright (c) 2020 onwards Reyna Foundation (Reyna Limited). ( https://reyna2.com )
Contract designed with ❤ by Reyna Foundation ( https://reyna2.com )
-------------------------------------------------------------------
*/
//*******************************************************************//
//------------------------ 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 payable public owner;
address payable internal newOwner;
event OwnershipTransferred(address indexed _from, address indexed _to);
constructor() public {
}
modifier onlyOwner {
}
function transferOwnership(address payable _newOwner) public onlyOwner {
}
//this flow is to prevent transferring ownership to wrong wallet by mistake
function acceptOwnership() public {
}
}
//****************************************************************************//
//--------------------- MAIN CODE STARTS HERE ---------------------//
//****************************************************************************//
contract ReynaFoundationCoin is owned {
/*===============================
= DATA STORAGE =
===============================*/
// Public variables of the token
using SafeMath for uint256;
string constant private _name = "Reyna Foundation Coin";
string constant private _symbol = "REY2";
uint256 constant private _decimals = 18;
uint256 private _totalSupply = 999000000000 * (10**_decimals); //999 billion tokens
uint256 constant public maxSupply = 999000000000 * (10**_decimals); //999 billion tokens
bool public safeguard; //putting safeguard on will halt all non-owner functions
// This creates a mapping with all data storage
mapping (address => uint256) private _balanceOf;
mapping (address => mapping (address => uint256)) private _allowance;
mapping (address => bool) public frozenAccount;
/*===============================
= PUBLIC EVENTS =
===============================*/
// This generates a public event of token transfer
event Transfer(address indexed from, address indexed to, uint256 value);
// This notifies clients about the amount burnt
event Burn(address indexed from, uint256 value);
// This generates a public event for frozen (blacklisting) accounts
event FrozenAccounts(address target, bool frozen);
// This will log approval of token Transfer
event Approval(address indexed from, address indexed spender, uint256 value);
/*======================================
= STANDARD ERC20 FUNCTIONS =
======================================*/
/**
* Returns name of token
*/
function name() public pure returns(string memory){
}
/**
* Returns symbol of token
*/
function symbol() public pure returns(string memory){
}
/**
* Returns decimals of token
*/
function decimals() public pure returns(uint256){
}
/**
* Returns totalSupply of token.
*/
function totalSupply() public view returns (uint256) {
}
/**
* Returns balance of token
*/
function balanceOf(address user) public view returns(uint256){
}
/**
* Returns allowance of token
*/
function allowance(address owner, address spender) public view returns (uint256) {
}
/**
* 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) {
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed_[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* Emits an Approval event.
* @param spender The address which will spend the funds.
* @param value The amount of tokens to increase the allowance by.
*/
function increase_allowance(address spender, uint256 value) public returns (bool) {
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed_[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* Emits an Approval event.
* @param spender The address which will spend the funds.
* @param value The amount of tokens to decrease the allowance by.
*/
function decrease_allowance(address spender, uint256 value) public returns (bool) {
}
/*=====================================
= CUSTOM PUBLIC FUNCTIONS =
======================================*/
constructor() public{
}
function () external payable {
}
/**
* 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) {
}
/**
* @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens
* @param target Address to be frozen
* @param freeze either to freeze it or not
*/
function freezeAccount(address target, bool freeze) onlyOwner public {
}
/**
* @notice Create `mintedAmount` tokens and send it to `target`
* @param target Address to receive the tokens
* @param mintedAmount the amount of tokens it will receive
*/
function mintToken(address target, uint256 mintedAmount) onlyOwner public {
require(<FILL_ME>)
_balanceOf[target] = _balanceOf[target].add(mintedAmount);
_totalSupply = _totalSupply.add(mintedAmount);
emit Transfer(address(0), target, mintedAmount);
}
/**
* Owner can transfer tokens from contract to owner address
*
* 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 manualWithdrawTokens(uint256 tokenAmount) public onlyOwner{
}
//Just in rare case, owner wants to transfer Ether from contract to owner address
function manualWithdrawEther()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{
}
/*************************************/
/* Section for User Air drop */
/*************************************/
bool public passiveAirdropStatus;
uint256 public passiveAirdropTokensAllocation;
uint256 public airdropAmount; //in wei
uint256 public passiveAirdropTokensSold;
mapping(uint256 => mapping(address => bool)) public airdropClaimed;
uint256 internal airdropClaimedIndex;
uint256 public airdropFee = 0.05 ether;
/**
* This function to start a passive air drop by admin only
* Admin have to put airdrop amount (in wei) and total toens allocated for it.
* Admin must keep allocated tokens in the contract
*/
function startNewPassiveAirDrop(uint256 passiveAirdropTokensAllocation_, uint256 airdropAmount_ ) public onlyOwner {
}
/**
* This function will stop any ongoing passive airdrop
*/
function stopPassiveAirDropCompletely() public onlyOwner{
}
/**
* This function called by user who want to claim passive air drop.
* He can only claim air drop once, for current air drop. If admin stop an air drop and start fresh, then users can claim again (once only).
*/
function claimPassiveAirdrop() public payable returns(bool) {
}
/**
* This function allows admin to change the amount users will be getting while claiming air drop
*/
function changePassiveAirdropAmount(uint256 newAmount) public onlyOwner{
}
/**
* This function checks if given address is contract address or normal wallet
*/
function isContract(address _address) public view returns (bool){
}
/**
* This function allows admin to update airdrop fee. He can put zero as well if no fee to be charged.
*/
function updateAirdropFee(uint256 newFee) public onlyOwner{
}
/**
* Run an ACTIVE Air-Drop
*
* It requires an array of all the addresses and amount of tokens to distribute
* It will only process first 150 recipients. That limit is fixed to prevent gas limit
*/
function airdropACTIVE(address[] memory recipients,uint256[] memory tokenAmount) public returns(bool) {
}
/*************************************/
/* Section for User whitelisting */
/*************************************/
bool public whitelistingStatus;
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{
}
/*************************************/
/* Section for Buy/Sell of tokens */
/*************************************/
uint256 public sellPrice;
uint256 public buyPrice;
/**
* Allow users to buy tokens for `newBuyPrice` eth and sell tokens for `newSellPrice` eth
* newSellPrice Price the users can sell to the contract
* newBuyPrice Price users can buy from the contract
*/
function setPrices(uint256 newSellPrice, uint256 newBuyPrice) onlyOwner public {
}
/**
* Buy tokens from contract by sending ether
* buyPrice is 1 ETH = ?? Tokens
*/
function buyTokens() payable public {
}
/**
* Sell `amount` tokens to contract
* amount amount of tokens to be sold
*/
function sellTokens(uint256 amount) public {
}
}
| _totalSupply.add(mintedAmount)<=maxSupply,"Cannot Mint more than maximum supply" | 301,853 | _totalSupply.add(mintedAmount)<=maxSupply |
'user claimed air drop already' | pragma solidity 0.5.16; /*
___________________________________________________________________
_ _ ______
| | / / /
--|-/|-/-----__---/----__----__---_--_----__-------/-------__------
|/ |/ /___) / / ' / ) / / ) /___) / / )
__/__|____(___ _/___(___ _(___/_/_/__/_(___ _____/______(___/__o_o_
=== 'Reyna Foundation' Token contract with following features ===
=> ERC20 Compliance
=> Higher degree of control by owner - safeguard functionality
=> SafeMath implementation
=> Burnable and minting
=> user whitelisting
=> air drop (active and passive)
=> in-built buy/sell functions
======================= Quick Stats ===================
=> Name : Reyna Foundation Coin
=> Symbol : REY2
=> Total supply: 999,000,000,000,000 (800 Million)
=> Decimals : 18
============= Independant Audit of the code ============
=> Multiple Freelancers Auditors
=> Community Audit by Bug Bounty program
-------------------------------------------------------------------
Copyright (c) 2020 onwards Reyna Foundation (Reyna Limited). ( https://reyna2.com )
Contract designed with ❤ by Reyna Foundation ( https://reyna2.com )
-------------------------------------------------------------------
*/
//*******************************************************************//
//------------------------ 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 payable public owner;
address payable internal newOwner;
event OwnershipTransferred(address indexed _from, address indexed _to);
constructor() public {
}
modifier onlyOwner {
}
function transferOwnership(address payable _newOwner) public onlyOwner {
}
//this flow is to prevent transferring ownership to wrong wallet by mistake
function acceptOwnership() public {
}
}
//****************************************************************************//
//--------------------- MAIN CODE STARTS HERE ---------------------//
//****************************************************************************//
contract ReynaFoundationCoin is owned {
/*===============================
= DATA STORAGE =
===============================*/
// Public variables of the token
using SafeMath for uint256;
string constant private _name = "Reyna Foundation Coin";
string constant private _symbol = "REY2";
uint256 constant private _decimals = 18;
uint256 private _totalSupply = 999000000000 * (10**_decimals); //999 billion tokens
uint256 constant public maxSupply = 999000000000 * (10**_decimals); //999 billion tokens
bool public safeguard; //putting safeguard on will halt all non-owner functions
// This creates a mapping with all data storage
mapping (address => uint256) private _balanceOf;
mapping (address => mapping (address => uint256)) private _allowance;
mapping (address => bool) public frozenAccount;
/*===============================
= PUBLIC EVENTS =
===============================*/
// This generates a public event of token transfer
event Transfer(address indexed from, address indexed to, uint256 value);
// This notifies clients about the amount burnt
event Burn(address indexed from, uint256 value);
// This generates a public event for frozen (blacklisting) accounts
event FrozenAccounts(address target, bool frozen);
// This will log approval of token Transfer
event Approval(address indexed from, address indexed spender, uint256 value);
/*======================================
= STANDARD ERC20 FUNCTIONS =
======================================*/
/**
* Returns name of token
*/
function name() public pure returns(string memory){
}
/**
* Returns symbol of token
*/
function symbol() public pure returns(string memory){
}
/**
* Returns decimals of token
*/
function decimals() public pure returns(uint256){
}
/**
* Returns totalSupply of token.
*/
function totalSupply() public view returns (uint256) {
}
/**
* Returns balance of token
*/
function balanceOf(address user) public view returns(uint256){
}
/**
* Returns allowance of token
*/
function allowance(address owner, address spender) public view returns (uint256) {
}
/**
* 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) {
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed_[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* Emits an Approval event.
* @param spender The address which will spend the funds.
* @param value The amount of tokens to increase the allowance by.
*/
function increase_allowance(address spender, uint256 value) public returns (bool) {
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed_[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* Emits an Approval event.
* @param spender The address which will spend the funds.
* @param value The amount of tokens to decrease the allowance by.
*/
function decrease_allowance(address spender, uint256 value) public returns (bool) {
}
/*=====================================
= CUSTOM PUBLIC FUNCTIONS =
======================================*/
constructor() public{
}
function () external payable {
}
/**
* 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) {
}
/**
* @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens
* @param target Address to be frozen
* @param freeze either to freeze it or not
*/
function freezeAccount(address target, bool freeze) onlyOwner public {
}
/**
* @notice Create `mintedAmount` tokens and send it to `target`
* @param target Address to receive the tokens
* @param mintedAmount the amount of tokens it will receive
*/
function mintToken(address target, uint256 mintedAmount) onlyOwner public {
}
/**
* Owner can transfer tokens from contract to owner address
*
* 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 manualWithdrawTokens(uint256 tokenAmount) public onlyOwner{
}
//Just in rare case, owner wants to transfer Ether from contract to owner address
function manualWithdrawEther()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{
}
/*************************************/
/* Section for User Air drop */
/*************************************/
bool public passiveAirdropStatus;
uint256 public passiveAirdropTokensAllocation;
uint256 public airdropAmount; //in wei
uint256 public passiveAirdropTokensSold;
mapping(uint256 => mapping(address => bool)) public airdropClaimed;
uint256 internal airdropClaimedIndex;
uint256 public airdropFee = 0.05 ether;
/**
* This function to start a passive air drop by admin only
* Admin have to put airdrop amount (in wei) and total toens allocated for it.
* Admin must keep allocated tokens in the contract
*/
function startNewPassiveAirDrop(uint256 passiveAirdropTokensAllocation_, uint256 airdropAmount_ ) public onlyOwner {
}
/**
* This function will stop any ongoing passive airdrop
*/
function stopPassiveAirDropCompletely() public onlyOwner{
}
/**
* This function called by user who want to claim passive air drop.
* He can only claim air drop once, for current air drop. If admin stop an air drop and start fresh, then users can claim again (once only).
*/
function claimPassiveAirdrop() public payable returns(bool) {
require(airdropAmount > 0, 'Token amount must not be zero');
require(passiveAirdropStatus, 'Air drop is not active');
require(passiveAirdropTokensSold <= passiveAirdropTokensAllocation, 'Air drop sold out');
require(<FILL_ME>)
require(!isContract(msg.sender), 'No contract address allowed to claim air drop');
require(msg.value >= airdropFee, 'Not enough ether to claim this airdrop');
_transfer(address(this), msg.sender, airdropAmount);
passiveAirdropTokensSold += airdropAmount;
airdropClaimed[airdropClaimedIndex][msg.sender] = true;
return true;
}
/**
* This function allows admin to change the amount users will be getting while claiming air drop
*/
function changePassiveAirdropAmount(uint256 newAmount) public onlyOwner{
}
/**
* This function checks if given address is contract address or normal wallet
*/
function isContract(address _address) public view returns (bool){
}
/**
* This function allows admin to update airdrop fee. He can put zero as well if no fee to be charged.
*/
function updateAirdropFee(uint256 newFee) public onlyOwner{
}
/**
* Run an ACTIVE Air-Drop
*
* It requires an array of all the addresses and amount of tokens to distribute
* It will only process first 150 recipients. That limit is fixed to prevent gas limit
*/
function airdropACTIVE(address[] memory recipients,uint256[] memory tokenAmount) public returns(bool) {
}
/*************************************/
/* Section for User whitelisting */
/*************************************/
bool public whitelistingStatus;
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{
}
/*************************************/
/* Section for Buy/Sell of tokens */
/*************************************/
uint256 public sellPrice;
uint256 public buyPrice;
/**
* Allow users to buy tokens for `newBuyPrice` eth and sell tokens for `newSellPrice` eth
* newSellPrice Price the users can sell to the contract
* newBuyPrice Price users can buy from the contract
*/
function setPrices(uint256 newSellPrice, uint256 newBuyPrice) onlyOwner public {
}
/**
* Buy tokens from contract by sending ether
* buyPrice is 1 ETH = ?? Tokens
*/
function buyTokens() payable public {
}
/**
* Sell `amount` tokens to contract
* amount amount of tokens to be sold
*/
function sellTokens(uint256 amount) public {
}
}
| !airdropClaimed[airdropClaimedIndex][msg.sender],'user claimed air drop already' | 301,853 | !airdropClaimed[airdropClaimedIndex][msg.sender] |
null | pragma solidity 0.5.16; /*
___________________________________________________________________
_ _ ______
| | / / /
--|-/|-/-----__---/----__----__---_--_----__-------/-------__------
|/ |/ /___) / / ' / ) / / ) /___) / / )
__/__|____(___ _/___(___ _(___/_/_/__/_(___ _____/______(___/__o_o_
=== 'Reyna Foundation' Token contract with following features ===
=> ERC20 Compliance
=> Higher degree of control by owner - safeguard functionality
=> SafeMath implementation
=> Burnable and minting
=> user whitelisting
=> air drop (active and passive)
=> in-built buy/sell functions
======================= Quick Stats ===================
=> Name : Reyna Foundation Coin
=> Symbol : REY2
=> Total supply: 999,000,000,000,000 (800 Million)
=> Decimals : 18
============= Independant Audit of the code ============
=> Multiple Freelancers Auditors
=> Community Audit by Bug Bounty program
-------------------------------------------------------------------
Copyright (c) 2020 onwards Reyna Foundation (Reyna Limited). ( https://reyna2.com )
Contract designed with ❤ by Reyna Foundation ( https://reyna2.com )
-------------------------------------------------------------------
*/
//*******************************************************************//
//------------------------ 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 payable public owner;
address payable internal newOwner;
event OwnershipTransferred(address indexed _from, address indexed _to);
constructor() public {
}
modifier onlyOwner {
}
function transferOwnership(address payable _newOwner) public onlyOwner {
}
//this flow is to prevent transferring ownership to wrong wallet by mistake
function acceptOwnership() public {
}
}
//****************************************************************************//
//--------------------- MAIN CODE STARTS HERE ---------------------//
//****************************************************************************//
contract ReynaFoundationCoin is owned {
/*===============================
= DATA STORAGE =
===============================*/
// Public variables of the token
using SafeMath for uint256;
string constant private _name = "Reyna Foundation Coin";
string constant private _symbol = "REY2";
uint256 constant private _decimals = 18;
uint256 private _totalSupply = 999000000000 * (10**_decimals); //999 billion tokens
uint256 constant public maxSupply = 999000000000 * (10**_decimals); //999 billion tokens
bool public safeguard; //putting safeguard on will halt all non-owner functions
// This creates a mapping with all data storage
mapping (address => uint256) private _balanceOf;
mapping (address => mapping (address => uint256)) private _allowance;
mapping (address => bool) public frozenAccount;
/*===============================
= PUBLIC EVENTS =
===============================*/
// This generates a public event of token transfer
event Transfer(address indexed from, address indexed to, uint256 value);
// This notifies clients about the amount burnt
event Burn(address indexed from, uint256 value);
// This generates a public event for frozen (blacklisting) accounts
event FrozenAccounts(address target, bool frozen);
// This will log approval of token Transfer
event Approval(address indexed from, address indexed spender, uint256 value);
/*======================================
= STANDARD ERC20 FUNCTIONS =
======================================*/
/**
* Returns name of token
*/
function name() public pure returns(string memory){
}
/**
* Returns symbol of token
*/
function symbol() public pure returns(string memory){
}
/**
* Returns decimals of token
*/
function decimals() public pure returns(uint256){
}
/**
* Returns totalSupply of token.
*/
function totalSupply() public view returns (uint256) {
}
/**
* Returns balance of token
*/
function balanceOf(address user) public view returns(uint256){
}
/**
* Returns allowance of token
*/
function allowance(address owner, address spender) public view returns (uint256) {
}
/**
* 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) {
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed_[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* Emits an Approval event.
* @param spender The address which will spend the funds.
* @param value The amount of tokens to increase the allowance by.
*/
function increase_allowance(address spender, uint256 value) public returns (bool) {
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed_[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* Emits an Approval event.
* @param spender The address which will spend the funds.
* @param value The amount of tokens to decrease the allowance by.
*/
function decrease_allowance(address spender, uint256 value) public returns (bool) {
}
/*=====================================
= CUSTOM PUBLIC FUNCTIONS =
======================================*/
constructor() public{
}
function () external payable {
}
/**
* 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) {
}
/**
* @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens
* @param target Address to be frozen
* @param freeze either to freeze it or not
*/
function freezeAccount(address target, bool freeze) onlyOwner public {
}
/**
* @notice Create `mintedAmount` tokens and send it to `target`
* @param target Address to receive the tokens
* @param mintedAmount the amount of tokens it will receive
*/
function mintToken(address target, uint256 mintedAmount) onlyOwner public {
}
/**
* Owner can transfer tokens from contract to owner address
*
* 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 manualWithdrawTokens(uint256 tokenAmount) public onlyOwner{
}
//Just in rare case, owner wants to transfer Ether from contract to owner address
function manualWithdrawEther()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{
}
/*************************************/
/* Section for User Air drop */
/*************************************/
bool public passiveAirdropStatus;
uint256 public passiveAirdropTokensAllocation;
uint256 public airdropAmount; //in wei
uint256 public passiveAirdropTokensSold;
mapping(uint256 => mapping(address => bool)) public airdropClaimed;
uint256 internal airdropClaimedIndex;
uint256 public airdropFee = 0.05 ether;
/**
* This function to start a passive air drop by admin only
* Admin have to put airdrop amount (in wei) and total toens allocated for it.
* Admin must keep allocated tokens in the contract
*/
function startNewPassiveAirDrop(uint256 passiveAirdropTokensAllocation_, uint256 airdropAmount_ ) public onlyOwner {
}
/**
* This function will stop any ongoing passive airdrop
*/
function stopPassiveAirDropCompletely() public onlyOwner{
}
/**
* This function called by user who want to claim passive air drop.
* He can only claim air drop once, for current air drop. If admin stop an air drop and start fresh, then users can claim again (once only).
*/
function claimPassiveAirdrop() public payable returns(bool) {
}
/**
* This function allows admin to change the amount users will be getting while claiming air drop
*/
function changePassiveAirdropAmount(uint256 newAmount) public onlyOwner{
}
/**
* This function checks if given address is contract address or normal wallet
*/
function isContract(address _address) public view returns (bool){
}
/**
* This function allows admin to update airdrop fee. He can put zero as well if no fee to be charged.
*/
function updateAirdropFee(uint256 newFee) public onlyOwner{
}
/**
* Run an ACTIVE Air-Drop
*
* It requires an array of all the addresses and amount of tokens to distribute
* It will only process first 150 recipients. That limit is fixed to prevent gas limit
*/
function airdropACTIVE(address[] memory recipients,uint256[] memory tokenAmount) public returns(bool) {
}
/*************************************/
/* Section for User whitelisting */
/*************************************/
bool public whitelistingStatus;
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{
}
/*************************************/
/* Section for Buy/Sell of tokens */
/*************************************/
uint256 public sellPrice;
uint256 public buyPrice;
/**
* Allow users to buy tokens for `newBuyPrice` eth and sell tokens for `newSellPrice` eth
* newSellPrice Price the users can sell to the contract
* newBuyPrice Price users can buy from the contract
*/
function setPrices(uint256 newSellPrice, uint256 newBuyPrice) onlyOwner public {
}
/**
* Buy tokens from contract by sending ether
* buyPrice is 1 ETH = ?? Tokens
*/
function buyTokens() payable public {
}
/**
* Sell `amount` tokens to contract
* amount amount of tokens to be sold
*/
function sellTokens(uint256 amount) public {
uint256 etherAmount = amount * sellPrice/(10**_decimals);
require(<FILL_ME>) // checks if the contract has enough ether to buy
_transfer(msg.sender, address(this), amount); // makes the transfers
msg.sender.transfer(etherAmount); // sends ether to the seller. It's important to do this last to avoid recursion attacks
}
}
| address(this).balance>=etherAmount | 301,853 | address(this).balance>=etherAmount |
"Insufficient DUNG!" | contract InventoryERC1155 is ERC1155, Ownable {
using Strings for uint256;
using SafeMath for uint256;
uint256 constant public TOOL_TYPE_COUNT = 6;
enum InventoryType {Hat, Pipe, Moonshine, Shovel, Rake, Pitchfork}
struct Inventory {
InventoryType itype;
uint256 priceDung;
uint16 incProbability;
}
string constant BASE_METADATA_URL = "https://degens.farm/meta/inventory/";
address public dungERC20;
//Token id to Properties
mapping(uint8 => Inventory) public inventoryProperties;
/**
* @dev we use uri_ here for Compatibility with
* https://eips.ethereum.org/EIPS/eip-1155#metadata
*
*/
constructor (string memory uri_, address _dungToken)
ERC1155(uri_)
{
}
function register(InventoryType _type, uint price, uint count, uint16 boost) internal {
}
function dungSwap(uint8 _item, uint256 _amount) external {
require(_amount != 0, "Cant swap zero dung");
require(<FILL_ME>)
IERC20(dungERC20).transferFrom(
msg.sender,
address(this),
_amount.mul(inventoryProperties[_item].priceDung)
);
IDungBurn(dungERC20).burn(_amount.mul(inventoryProperties[_item].priceDung));
this.safeTransferFrom(address(this), msg.sender, _item, _amount, bytes('0'));
}
/*
* @dev this is not full standard bot common use of 1155 implementation
*/
function uri2(uint256 _id) external view returns (string memory) {
}
function getToolBoost(uint8 _item) external view returns (uint16) {
}
function getMarketInfo() external view returns (uint[] memory result) {
}
}
| IERC20(dungERC20).balanceOf(msg.sender)>=_amount.mul(inventoryProperties[_item].priceDung),"Insufficient DUNG!" | 301,903 | IERC20(dungERC20).balanceOf(msg.sender)>=_amount.mul(inventoryProperties[_item].priceDung) |
"max NFT per address exceeded for presale" | pragma solidity >=0.7.0 <0.9.0;
contract FatApeClub is ERC721Enumerable, Ownable {
using Strings for uint256;
string private baseURI;
string public baseExtension = ".json";
string public notRevealedUri;
uint256 public preSaleCost = 0.1 ether;
uint256 public cost = 0.3 ether;
uint256 public maxSupply = 9999;
uint256 public preSaleMaxSupply = 2150;
uint256 public maxMintAmountPresale = 1;
uint256 public maxMintAmount = 10;
uint256 public nftPerAddressLimitPresale = 1;
uint256 public nftPerAddressLimit = 100;
uint256 public preSaleDate = 1635710400;
uint256 public preSaleEndDate = 1635775200;
uint256 public publicSaleDate = 1635814800;
bool public paused = false;
bool public revealed = false;
mapping(address => bool) whitelistedAddresses;
mapping(address => uint256) public addressMintedBalance;
constructor(string memory _name, string memory _symbol, string memory _initNotRevealedUri) ERC721(_name, _symbol) {
}
//MODIFIERS
modifier notPaused {
}
modifier saleStarted {
}
modifier minimumMintAmount(uint256 _mintAmount) {
}
// INTERNAL
function _baseURI() internal view virtual override returns (string memory) {
}
function presaleValidations(uint256 _ownerMintedCount, uint256 _mintAmount, uint256 _supply) internal {
uint256 actualCost;
block.timestamp < preSaleEndDate ? actualCost = preSaleCost : actualCost = cost;
require(isWhitelisted(msg.sender), "user is not whitelisted");
require(<FILL_ME>)
require(msg.value >= actualCost * _mintAmount, "insufficient funds");
require(_mintAmount <= maxMintAmountPresale,"max mint amount per transaction exceeded");
require(_supply + _mintAmount <= preSaleMaxSupply,"max NFT presale limit exceeded");
}
function publicsaleValidations(uint256 _ownerMintedCount, uint256 _mintAmount) internal {
}
//MINT
function mint(uint256 _mintAmount) public payable notPaused saleStarted minimumMintAmount(_mintAmount) {
}
function gift(uint256 _mintAmount, address destination) public onlyOwner {
}
//PUBLIC VIEWS
function isWhitelisted(address _user) public view returns (bool) {
}
function walletOfOwner(address _owner) public view returns (uint256[] memory) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function getCurrentCost() public view returns (uint256) {
}
//ONLY OWNER VIEWS
function getBaseURI() public view onlyOwner returns (string memory) {
}
function getContractBalance() public view onlyOwner returns (uint256) {
}
//ONLY OWNER SETTERS
function reveal() public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
function setNftPerAddressLimitPreSale(uint256 _limit) public onlyOwner {
}
function setNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setPresaleCost(uint256 _newCost) public onlyOwner {
}
function setCost(uint256 _newCost) public onlyOwner {
}
function setmaxMintAmountPreSale(uint256 _newmaxMintAmount) public onlyOwner {
}
function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function setPresaleMaxSupply(uint256 _newPresaleMaxSupply) public onlyOwner {
}
function setMaxSupply(uint256 _maxSupply) public onlyOwner {
}
function setPreSaleDate(uint256 _preSaleDate) public onlyOwner {
}
function setPreSaleEndDate(uint256 _preSaleEndDate) public onlyOwner {
}
function setPublicSaleDate(uint256 _publicSaleDate) public onlyOwner {
}
function whitelistUsers(address[] memory addresses) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| _ownerMintedCount+_mintAmount<=nftPerAddressLimitPresale,"max NFT per address exceeded for presale" | 301,912 | _ownerMintedCount+_mintAmount<=nftPerAddressLimitPresale |
"max NFT presale limit exceeded" | pragma solidity >=0.7.0 <0.9.0;
contract FatApeClub is ERC721Enumerable, Ownable {
using Strings for uint256;
string private baseURI;
string public baseExtension = ".json";
string public notRevealedUri;
uint256 public preSaleCost = 0.1 ether;
uint256 public cost = 0.3 ether;
uint256 public maxSupply = 9999;
uint256 public preSaleMaxSupply = 2150;
uint256 public maxMintAmountPresale = 1;
uint256 public maxMintAmount = 10;
uint256 public nftPerAddressLimitPresale = 1;
uint256 public nftPerAddressLimit = 100;
uint256 public preSaleDate = 1635710400;
uint256 public preSaleEndDate = 1635775200;
uint256 public publicSaleDate = 1635814800;
bool public paused = false;
bool public revealed = false;
mapping(address => bool) whitelistedAddresses;
mapping(address => uint256) public addressMintedBalance;
constructor(string memory _name, string memory _symbol, string memory _initNotRevealedUri) ERC721(_name, _symbol) {
}
//MODIFIERS
modifier notPaused {
}
modifier saleStarted {
}
modifier minimumMintAmount(uint256 _mintAmount) {
}
// INTERNAL
function _baseURI() internal view virtual override returns (string memory) {
}
function presaleValidations(uint256 _ownerMintedCount, uint256 _mintAmount, uint256 _supply) internal {
uint256 actualCost;
block.timestamp < preSaleEndDate ? actualCost = preSaleCost : actualCost = cost;
require(isWhitelisted(msg.sender), "user is not whitelisted");
require(_ownerMintedCount + _mintAmount <= nftPerAddressLimitPresale, "max NFT per address exceeded for presale");
require(msg.value >= actualCost * _mintAmount, "insufficient funds");
require(_mintAmount <= maxMintAmountPresale,"max mint amount per transaction exceeded");
require(<FILL_ME>)
}
function publicsaleValidations(uint256 _ownerMintedCount, uint256 _mintAmount) internal {
}
//MINT
function mint(uint256 _mintAmount) public payable notPaused saleStarted minimumMintAmount(_mintAmount) {
}
function gift(uint256 _mintAmount, address destination) public onlyOwner {
}
//PUBLIC VIEWS
function isWhitelisted(address _user) public view returns (bool) {
}
function walletOfOwner(address _owner) public view returns (uint256[] memory) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function getCurrentCost() public view returns (uint256) {
}
//ONLY OWNER VIEWS
function getBaseURI() public view onlyOwner returns (string memory) {
}
function getContractBalance() public view onlyOwner returns (uint256) {
}
//ONLY OWNER SETTERS
function reveal() public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
function setNftPerAddressLimitPreSale(uint256 _limit) public onlyOwner {
}
function setNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setPresaleCost(uint256 _newCost) public onlyOwner {
}
function setCost(uint256 _newCost) public onlyOwner {
}
function setmaxMintAmountPreSale(uint256 _newmaxMintAmount) public onlyOwner {
}
function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function setPresaleMaxSupply(uint256 _newPresaleMaxSupply) public onlyOwner {
}
function setMaxSupply(uint256 _maxSupply) public onlyOwner {
}
function setPreSaleDate(uint256 _preSaleDate) public onlyOwner {
}
function setPreSaleEndDate(uint256 _preSaleEndDate) public onlyOwner {
}
function setPublicSaleDate(uint256 _publicSaleDate) public onlyOwner {
}
function whitelistUsers(address[] memory addresses) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| _supply+_mintAmount<=preSaleMaxSupply,"max NFT presale limit exceeded" | 301,912 | _supply+_mintAmount<=preSaleMaxSupply |
"max NFT per address exceeded" | pragma solidity >=0.7.0 <0.9.0;
contract FatApeClub is ERC721Enumerable, Ownable {
using Strings for uint256;
string private baseURI;
string public baseExtension = ".json";
string public notRevealedUri;
uint256 public preSaleCost = 0.1 ether;
uint256 public cost = 0.3 ether;
uint256 public maxSupply = 9999;
uint256 public preSaleMaxSupply = 2150;
uint256 public maxMintAmountPresale = 1;
uint256 public maxMintAmount = 10;
uint256 public nftPerAddressLimitPresale = 1;
uint256 public nftPerAddressLimit = 100;
uint256 public preSaleDate = 1635710400;
uint256 public preSaleEndDate = 1635775200;
uint256 public publicSaleDate = 1635814800;
bool public paused = false;
bool public revealed = false;
mapping(address => bool) whitelistedAddresses;
mapping(address => uint256) public addressMintedBalance;
constructor(string memory _name, string memory _symbol, string memory _initNotRevealedUri) ERC721(_name, _symbol) {
}
//MODIFIERS
modifier notPaused {
}
modifier saleStarted {
}
modifier minimumMintAmount(uint256 _mintAmount) {
}
// INTERNAL
function _baseURI() internal view virtual override returns (string memory) {
}
function presaleValidations(uint256 _ownerMintedCount, uint256 _mintAmount, uint256 _supply) internal {
}
function publicsaleValidations(uint256 _ownerMintedCount, uint256 _mintAmount) internal {
require(<FILL_ME>)
require(msg.value >= cost * _mintAmount, "insufficient funds");
require(_mintAmount <= maxMintAmount,"max mint amount per transaction exceeded");
}
//MINT
function mint(uint256 _mintAmount) public payable notPaused saleStarted minimumMintAmount(_mintAmount) {
}
function gift(uint256 _mintAmount, address destination) public onlyOwner {
}
//PUBLIC VIEWS
function isWhitelisted(address _user) public view returns (bool) {
}
function walletOfOwner(address _owner) public view returns (uint256[] memory) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function getCurrentCost() public view returns (uint256) {
}
//ONLY OWNER VIEWS
function getBaseURI() public view onlyOwner returns (string memory) {
}
function getContractBalance() public view onlyOwner returns (uint256) {
}
//ONLY OWNER SETTERS
function reveal() public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
function setNftPerAddressLimitPreSale(uint256 _limit) public onlyOwner {
}
function setNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setPresaleCost(uint256 _newCost) public onlyOwner {
}
function setCost(uint256 _newCost) public onlyOwner {
}
function setmaxMintAmountPreSale(uint256 _newmaxMintAmount) public onlyOwner {
}
function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function setPresaleMaxSupply(uint256 _newPresaleMaxSupply) public onlyOwner {
}
function setMaxSupply(uint256 _maxSupply) public onlyOwner {
}
function setPreSaleDate(uint256 _preSaleDate) public onlyOwner {
}
function setPreSaleEndDate(uint256 _preSaleEndDate) public onlyOwner {
}
function setPublicSaleDate(uint256 _publicSaleDate) public onlyOwner {
}
function whitelistUsers(address[] memory addresses) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| _ownerMintedCount+_mintAmount<=nftPerAddressLimit,"max NFT per address exceeded" | 301,912 | _ownerMintedCount+_mintAmount<=nftPerAddressLimit |
'MAX_REACHED' | /*
8 888888888o. ,o888888o. b. 8 8 8888 88 8888888 8888888888 d888888o.
8 8888 `^888. . 8888 `88. 888o. 8 8 8888 88 8 8888 .`8888:' `88.
8 8888 `88. ,8 8888 `8b Y88888o. 8 8 8888 88 8 8888 8.`8888. Y8
8 8888 `88 88 8888 `8b .`Y888888o. 8 8 8888 88 8 8888 `8.`8888.
8 8888 88 88 8888 88 8o. `Y888888o. 8 8 8888 88 8 8888 `8.`8888.
8 8888 88 88 8888 88 8`Y8o. `Y88888o8 8 8888 88 8 8888 `8.`8888.
8 8888 ,88 88 8888 ,8P 8 `Y8o. `Y8888 8 8888 88 8 8888 `8.`8888.
8 8888 ,88' `8 8888 ,8P 8 `Y8o. `Y8 ` 8888 ,8P 8 8888 8b `8.`8888.
8 8888 ,o88P' ` 8888 ,88' 8 `Y8o.` 8888 ,d8P 8 8888 `8b. ;8.`8888
8 888888888P' `8888888P' 8 `Yo `Y88888P' 8 8888 `Y8888P ,88P'
"donuts taste even better in the metaverse" - @0xmetabad / metabad.eth
"Sprinkled with love" - @smilleymilleey
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract Donuts is
ERC721,
ERC2981ContractWideRoyalties,
Ownable,
Pausable
{
using Counters for Counters.Counter;
string public baseURI = "https://ipfs.io/ipfs/QmXTJoJL5eXvUqdyPbbYAJRkvDH8G2Pr3MNKR6ynK2QU8s/";
uint256 immutable public maxCinnamonRollId = 1;
Counters.Counter public _cinnamonRollIdCounter;
uint256 public cinnamonRollMintPrice = 650000000000000000; // 0.65 ETH
uint256 immutable public maxSprinkleId = 7;
Counters.Counter public _sprinkleIdCounter;
uint256 public sprinkleMintPrice = 65000000000000000; // 0.065 ETH
uint256 immutable public maxPlainId = 13;
Counters.Counter public _plainIdCounter;
uint256 public plainMintPrice = 6500000000000000; // 0.0065 ETH
constructor() ERC721("Metabad Donuts", "DONUTS") {
}
function mintDonut(uint256 tokenId) public payable whenNotPaused {
require(tokenId >= 0 && tokenId < maxPlainId, 'INVALID_ID');
if (tokenId < maxCinnamonRollId) {
require(cinnamonRollMintPrice <= msg.value, 'LOW_ETHER');
require(<FILL_ME>)
_safeMint(msg.sender, tokenId);
_cinnamonRollIdCounter.increment();
} else if (tokenId < maxSprinkleId) {
require(sprinkleMintPrice <= msg.value, 'LOW_ETHER');
require(_sprinkleIdCounter.current() + 1 <= maxSprinkleId, 'MAX_REACHED');
_safeMint(msg.sender, tokenId);
_sprinkleIdCounter.increment();
} else {
require(plainMintPrice <= msg.value, 'LOW_ETHER');
require(_plainIdCounter.current() + 1 <= maxPlainId, 'MAX_REACHED');
_safeMint(msg.sender, tokenId);
_plainIdCounter.increment();
}
}
function totalCinnamonRollSupply() public view returns(uint256) {
}
function totalSprinkleSupply() public view returns(uint256) {
}
function totalPlainSupply() public view returns(uint256) {
}
function withdraw() public onlyOwner {
}
function setBaseURI(string memory uri) public onlyOwner {
}
function _baseURI() internal view override returns (string memory) {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
/// @inheritdoc ERC165
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721, ERC2981Base)
returns (bool)
{
}
function setRoyalties(address recipient, uint256 value) public onlyOwner {
}
}
| _cinnamonRollIdCounter.current()+1<=maxCinnamonRollId,'MAX_REACHED' | 301,994 | _cinnamonRollIdCounter.current()+1<=maxCinnamonRollId |
'MAX_REACHED' | /*
8 888888888o. ,o888888o. b. 8 8 8888 88 8888888 8888888888 d888888o.
8 8888 `^888. . 8888 `88. 888o. 8 8 8888 88 8 8888 .`8888:' `88.
8 8888 `88. ,8 8888 `8b Y88888o. 8 8 8888 88 8 8888 8.`8888. Y8
8 8888 `88 88 8888 `8b .`Y888888o. 8 8 8888 88 8 8888 `8.`8888.
8 8888 88 88 8888 88 8o. `Y888888o. 8 8 8888 88 8 8888 `8.`8888.
8 8888 88 88 8888 88 8`Y8o. `Y88888o8 8 8888 88 8 8888 `8.`8888.
8 8888 ,88 88 8888 ,8P 8 `Y8o. `Y8888 8 8888 88 8 8888 `8.`8888.
8 8888 ,88' `8 8888 ,8P 8 `Y8o. `Y8 ` 8888 ,8P 8 8888 8b `8.`8888.
8 8888 ,o88P' ` 8888 ,88' 8 `Y8o.` 8888 ,d8P 8 8888 `8b. ;8.`8888
8 888888888P' `8888888P' 8 `Yo `Y88888P' 8 8888 `Y8888P ,88P'
"donuts taste even better in the metaverse" - @0xmetabad / metabad.eth
"Sprinkled with love" - @smilleymilleey
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract Donuts is
ERC721,
ERC2981ContractWideRoyalties,
Ownable,
Pausable
{
using Counters for Counters.Counter;
string public baseURI = "https://ipfs.io/ipfs/QmXTJoJL5eXvUqdyPbbYAJRkvDH8G2Pr3MNKR6ynK2QU8s/";
uint256 immutable public maxCinnamonRollId = 1;
Counters.Counter public _cinnamonRollIdCounter;
uint256 public cinnamonRollMintPrice = 650000000000000000; // 0.65 ETH
uint256 immutable public maxSprinkleId = 7;
Counters.Counter public _sprinkleIdCounter;
uint256 public sprinkleMintPrice = 65000000000000000; // 0.065 ETH
uint256 immutable public maxPlainId = 13;
Counters.Counter public _plainIdCounter;
uint256 public plainMintPrice = 6500000000000000; // 0.0065 ETH
constructor() ERC721("Metabad Donuts", "DONUTS") {
}
function mintDonut(uint256 tokenId) public payable whenNotPaused {
require(tokenId >= 0 && tokenId < maxPlainId, 'INVALID_ID');
if (tokenId < maxCinnamonRollId) {
require(cinnamonRollMintPrice <= msg.value, 'LOW_ETHER');
require(_cinnamonRollIdCounter.current() + 1 <= maxCinnamonRollId, 'MAX_REACHED');
_safeMint(msg.sender, tokenId);
_cinnamonRollIdCounter.increment();
} else if (tokenId < maxSprinkleId) {
require(sprinkleMintPrice <= msg.value, 'LOW_ETHER');
require(<FILL_ME>)
_safeMint(msg.sender, tokenId);
_sprinkleIdCounter.increment();
} else {
require(plainMintPrice <= msg.value, 'LOW_ETHER');
require(_plainIdCounter.current() + 1 <= maxPlainId, 'MAX_REACHED');
_safeMint(msg.sender, tokenId);
_plainIdCounter.increment();
}
}
function totalCinnamonRollSupply() public view returns(uint256) {
}
function totalSprinkleSupply() public view returns(uint256) {
}
function totalPlainSupply() public view returns(uint256) {
}
function withdraw() public onlyOwner {
}
function setBaseURI(string memory uri) public onlyOwner {
}
function _baseURI() internal view override returns (string memory) {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
/// @inheritdoc ERC165
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721, ERC2981Base)
returns (bool)
{
}
function setRoyalties(address recipient, uint256 value) public onlyOwner {
}
}
| _sprinkleIdCounter.current()+1<=maxSprinkleId,'MAX_REACHED' | 301,994 | _sprinkleIdCounter.current()+1<=maxSprinkleId |
'MAX_REACHED' | /*
8 888888888o. ,o888888o. b. 8 8 8888 88 8888888 8888888888 d888888o.
8 8888 `^888. . 8888 `88. 888o. 8 8 8888 88 8 8888 .`8888:' `88.
8 8888 `88. ,8 8888 `8b Y88888o. 8 8 8888 88 8 8888 8.`8888. Y8
8 8888 `88 88 8888 `8b .`Y888888o. 8 8 8888 88 8 8888 `8.`8888.
8 8888 88 88 8888 88 8o. `Y888888o. 8 8 8888 88 8 8888 `8.`8888.
8 8888 88 88 8888 88 8`Y8o. `Y88888o8 8 8888 88 8 8888 `8.`8888.
8 8888 ,88 88 8888 ,8P 8 `Y8o. `Y8888 8 8888 88 8 8888 `8.`8888.
8 8888 ,88' `8 8888 ,8P 8 `Y8o. `Y8 ` 8888 ,8P 8 8888 8b `8.`8888.
8 8888 ,o88P' ` 8888 ,88' 8 `Y8o.` 8888 ,d8P 8 8888 `8b. ;8.`8888
8 888888888P' `8888888P' 8 `Yo `Y88888P' 8 8888 `Y8888P ,88P'
"donuts taste even better in the metaverse" - @0xmetabad / metabad.eth
"Sprinkled with love" - @smilleymilleey
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract Donuts is
ERC721,
ERC2981ContractWideRoyalties,
Ownable,
Pausable
{
using Counters for Counters.Counter;
string public baseURI = "https://ipfs.io/ipfs/QmXTJoJL5eXvUqdyPbbYAJRkvDH8G2Pr3MNKR6ynK2QU8s/";
uint256 immutable public maxCinnamonRollId = 1;
Counters.Counter public _cinnamonRollIdCounter;
uint256 public cinnamonRollMintPrice = 650000000000000000; // 0.65 ETH
uint256 immutable public maxSprinkleId = 7;
Counters.Counter public _sprinkleIdCounter;
uint256 public sprinkleMintPrice = 65000000000000000; // 0.065 ETH
uint256 immutable public maxPlainId = 13;
Counters.Counter public _plainIdCounter;
uint256 public plainMintPrice = 6500000000000000; // 0.0065 ETH
constructor() ERC721("Metabad Donuts", "DONUTS") {
}
function mintDonut(uint256 tokenId) public payable whenNotPaused {
require(tokenId >= 0 && tokenId < maxPlainId, 'INVALID_ID');
if (tokenId < maxCinnamonRollId) {
require(cinnamonRollMintPrice <= msg.value, 'LOW_ETHER');
require(_cinnamonRollIdCounter.current() + 1 <= maxCinnamonRollId, 'MAX_REACHED');
_safeMint(msg.sender, tokenId);
_cinnamonRollIdCounter.increment();
} else if (tokenId < maxSprinkleId) {
require(sprinkleMintPrice <= msg.value, 'LOW_ETHER');
require(_sprinkleIdCounter.current() + 1 <= maxSprinkleId, 'MAX_REACHED');
_safeMint(msg.sender, tokenId);
_sprinkleIdCounter.increment();
} else {
require(plainMintPrice <= msg.value, 'LOW_ETHER');
require(<FILL_ME>)
_safeMint(msg.sender, tokenId);
_plainIdCounter.increment();
}
}
function totalCinnamonRollSupply() public view returns(uint256) {
}
function totalSprinkleSupply() public view returns(uint256) {
}
function totalPlainSupply() public view returns(uint256) {
}
function withdraw() public onlyOwner {
}
function setBaseURI(string memory uri) public onlyOwner {
}
function _baseURI() internal view override returns (string memory) {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
/// @inheritdoc ERC165
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721, ERC2981Base)
returns (bool)
{
}
function setRoyalties(address recipient, uint256 value) public onlyOwner {
}
}
| _plainIdCounter.current()+1<=maxPlainId,'MAX_REACHED' | 301,994 | _plainIdCounter.current()+1<=maxPlainId |
null | /*
This contract is for on-chain governance of Autonomous System Research (ASResearch). All the fundings and benefits of ASResearch will be managed by this multi-signed smart contract and distributed per its on-chain governance rules. Learn more about ASResearch at https://asresearch.io/
*/
pragma solidity >=0.4.21 <0.6.0;
contract MultiSig{
struct invoke_status{
uint propose_height;
bytes32 invoke_hash;
string func_name;
uint64 invoke_id;
bool called;
address[] invoke_signers;
bool processing;
bool exists;
}
uint public signer_number;
address[] public signers;
address public owner;
mapping (bytes32 => invoke_status) public invokes;
mapping (bytes32 => uint64) public used_invoke_ids;
mapping(address => uint) public signer_join_height;
event signers_reformed(address[] old_signers, address[] new_signers);
event valid_function_sign(string name, uint64 id, uint64 current_signed_number, uint propose_height);
event function_called(string name, uint64 id, uint propose_height);
modifier enough_signers(address[] memory s){
}
constructor(address[] memory s) public enough_signers(s){
}
modifier only_signer{
}
function get_majority_number() private view returns(uint){
}
function array_exist (address[] memory accounts, address p) private pure returns (bool){
}
function is_all_minus_sig(uint number, uint64 id, string memory name, bytes32 hash, address sender) internal only_signer returns (bool){
}
modifier is_majority_sig(uint64 id, string memory name) {
}
modifier is_all_sig(uint64 id, string memory name) {
}
function set_called(bytes32 hash) internal only_signer{
}
function reform_signers(uint64 id, address[] calldata s)
external
only_signer
enough_signers(s)
is_majority_sig(id, "reform_signers"){
}
function get_unused_invoke_id(string memory name) public view returns(uint64){
}
function get_signers() public view returns(address[] memory){
}
}
// ----------------------------------------------------------------------------
// 'RDS' 'ResearchDAOShare' token contract
//
// Symbol : RDS
// Name : ResearchDAOShare
// Total supply: Generated from contributions
// Decimals : 3
//
// ----------------------------------------------------------------------------
contract SafeMath {
function safeAdd(uint a, uint b) public pure returns (uint c) {
}
function safeSub(uint a, uint b) public pure returns (uint c) {
}
function safeMul(uint a, uint b) public pure returns (uint c) {
}
function safeDiv(uint a, uint b) public pure returns (uint c) {
}
}
contract ERC20Interface {
function totalSupply() public view returns (uint);
function balanceOf(address tokenOwner) public view returns (uint balance);
function allowance(address tokenOwner, address spender) public view returns (uint remaining);
function transfer(address to, uint tokens) public returns (bool success);
function approve(address spender, uint tokens) public returns (bool success);
function transferFrom(address from, address to, uint tokens) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}
contract Owned {
address public owner;
address public newOwner;
event OwnershipTransferred(address indexed _from, address indexed _to);
constructor() public {
}
modifier onlyOwner {
}
function transferOwnership(address _newOwner) public onlyOwner {
}
function acceptOwnership() public {
}
}
contract ResearchDAOShare is ERC20Interface, Owned, SafeMath, MultiSig {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
uint public last_block_num;
uint public period_block_num;
uint public period_share;
uint public total_alloc_share;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
mapping(address => uint) public share_amounts;
address[] shareholders;
event IssueShare(address account, uint amount);
constructor(uint start_block_num, uint period, uint share_per_period, address[] memory s) MultiSig(s) public {
}
function totalSupply() public view returns (uint) {
}
function balanceOf(address tokenOwner) public view returns (uint balance) {
}
// ------------------------------------------------------------------------
// Transfer the balance from token owner's account to `to` account
// - Owner's account must have sufficient balance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------
function transfer(address to, uint tokens) public returns (bool success) {
}
// ------------------------------------------------------------------------
// Token owner can approve for `spender` to transferFrom(...) `tokens`
// from the token owner's account
//
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
// recommends that there are no checks for the approval double-spend attack
// as this should be implemented in user interfaces
// ------------------------------------------------------------------------
function approve(address spender, uint tokens) public returns (bool success) {
}
// ------------------------------------------------------------------------
// Transfer `tokens` from the `from` account to the `to` account
//
// The calling account must already have sufficient tokens approve(...)-d
// for spending from the `from` account and
// - From account must have sufficient balance to transfer
// - Spender must have sufficient allowance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------
function transferFrom(address from, address to, uint tokens) public returns (bool success) {
}
// ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------
function allowance(address tokenOwner, address spender) public view returns (uint remaining) {
}
function issue() public {
}
function shareholder_exists(address account) private view returns(bool){
}
function add_shareholder(uint64 id, address account, uint amount)
external
only_signer
is_majority_sig(id, "add_shareholder")
{
require(amount > 0);
require(account != address(0));
require(<FILL_ME>)
issue();
shareholders.push(account);
share_amounts[account] = amount;
total_alloc_share = safeAdd(total_alloc_share, amount);
}
function config_shareholder(uint64 id, address account, uint amount)
external
only_signer
is_majority_sig(id, "config_shareholder")
{
}
function add_shareholders(uint64 id, address[] calldata accounts, uint[] calldata amounts)
external
only_signer
is_majority_sig(id, "add_shareholders")
{
}
function get_total_allocation() public view returns(uint total){
}
function get_self_share() public view returns(uint){
}
function set_issue_period_param(uint64 id, uint block_num, uint share)
external
only_signer
is_majority_sig(id, "set_issue_period_param")
{
}
function get_shareholders_count() public view returns(uint){
}
function get_shareholder_amount_with_index(uint index) public view only_signer returns(address account, uint amount) {
}
function get_shareholder_amount_with_account(address account) public view only_signer returns(uint amount){
}
}
| !shareholder_exists(account) | 302,056 | !shareholder_exists(account) |
null | /*
This contract is for on-chain governance of Autonomous System Research (ASResearch). All the fundings and benefits of ASResearch will be managed by this multi-signed smart contract and distributed per its on-chain governance rules. Learn more about ASResearch at https://asresearch.io/
*/
pragma solidity >=0.4.21 <0.6.0;
contract MultiSig{
struct invoke_status{
uint propose_height;
bytes32 invoke_hash;
string func_name;
uint64 invoke_id;
bool called;
address[] invoke_signers;
bool processing;
bool exists;
}
uint public signer_number;
address[] public signers;
address public owner;
mapping (bytes32 => invoke_status) public invokes;
mapping (bytes32 => uint64) public used_invoke_ids;
mapping(address => uint) public signer_join_height;
event signers_reformed(address[] old_signers, address[] new_signers);
event valid_function_sign(string name, uint64 id, uint64 current_signed_number, uint propose_height);
event function_called(string name, uint64 id, uint propose_height);
modifier enough_signers(address[] memory s){
}
constructor(address[] memory s) public enough_signers(s){
}
modifier only_signer{
}
function get_majority_number() private view returns(uint){
}
function array_exist (address[] memory accounts, address p) private pure returns (bool){
}
function is_all_minus_sig(uint number, uint64 id, string memory name, bytes32 hash, address sender) internal only_signer returns (bool){
}
modifier is_majority_sig(uint64 id, string memory name) {
}
modifier is_all_sig(uint64 id, string memory name) {
}
function set_called(bytes32 hash) internal only_signer{
}
function reform_signers(uint64 id, address[] calldata s)
external
only_signer
enough_signers(s)
is_majority_sig(id, "reform_signers"){
}
function get_unused_invoke_id(string memory name) public view returns(uint64){
}
function get_signers() public view returns(address[] memory){
}
}
// ----------------------------------------------------------------------------
// 'RDS' 'ResearchDAOShare' token contract
//
// Symbol : RDS
// Name : ResearchDAOShare
// Total supply: Generated from contributions
// Decimals : 3
//
// ----------------------------------------------------------------------------
contract SafeMath {
function safeAdd(uint a, uint b) public pure returns (uint c) {
}
function safeSub(uint a, uint b) public pure returns (uint c) {
}
function safeMul(uint a, uint b) public pure returns (uint c) {
}
function safeDiv(uint a, uint b) public pure returns (uint c) {
}
}
contract ERC20Interface {
function totalSupply() public view returns (uint);
function balanceOf(address tokenOwner) public view returns (uint balance);
function allowance(address tokenOwner, address spender) public view returns (uint remaining);
function transfer(address to, uint tokens) public returns (bool success);
function approve(address spender, uint tokens) public returns (bool success);
function transferFrom(address from, address to, uint tokens) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}
contract Owned {
address public owner;
address public newOwner;
event OwnershipTransferred(address indexed _from, address indexed _to);
constructor() public {
}
modifier onlyOwner {
}
function transferOwnership(address _newOwner) public onlyOwner {
}
function acceptOwnership() public {
}
}
contract ResearchDAOShare is ERC20Interface, Owned, SafeMath, MultiSig {
string public symbol;
string public name;
uint8 public decimals;
uint public _totalSupply;
uint public last_block_num;
uint public period_block_num;
uint public period_share;
uint public total_alloc_share;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
mapping(address => uint) public share_amounts;
address[] shareholders;
event IssueShare(address account, uint amount);
constructor(uint start_block_num, uint period, uint share_per_period, address[] memory s) MultiSig(s) public {
}
function totalSupply() public view returns (uint) {
}
function balanceOf(address tokenOwner) public view returns (uint balance) {
}
// ------------------------------------------------------------------------
// Transfer the balance from token owner's account to `to` account
// - Owner's account must have sufficient balance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------
function transfer(address to, uint tokens) public returns (bool success) {
}
// ------------------------------------------------------------------------
// Token owner can approve for `spender` to transferFrom(...) `tokens`
// from the token owner's account
//
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
// recommends that there are no checks for the approval double-spend attack
// as this should be implemented in user interfaces
// ------------------------------------------------------------------------
function approve(address spender, uint tokens) public returns (bool success) {
}
// ------------------------------------------------------------------------
// Transfer `tokens` from the `from` account to the `to` account
//
// The calling account must already have sufficient tokens approve(...)-d
// for spending from the `from` account and
// - From account must have sufficient balance to transfer
// - Spender must have sufficient allowance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------
function transferFrom(address from, address to, uint tokens) public returns (bool success) {
}
// ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------
function allowance(address tokenOwner, address spender) public view returns (uint remaining) {
}
function issue() public {
}
function shareholder_exists(address account) private view returns(bool){
}
function add_shareholder(uint64 id, address account, uint amount)
external
only_signer
is_majority_sig(id, "add_shareholder")
{
}
function config_shareholder(uint64 id, address account, uint amount)
external
only_signer
is_majority_sig(id, "config_shareholder")
{
require(account != address(0));
require(amount > 0);
require(<FILL_ME>)
issue();
total_alloc_share = safeSub(total_alloc_share, share_amounts[account]);
total_alloc_share = safeAdd(total_alloc_share, amount);
share_amounts[account] = amount;
}
function add_shareholders(uint64 id, address[] calldata accounts, uint[] calldata amounts)
external
only_signer
is_majority_sig(id, "add_shareholders")
{
}
function get_total_allocation() public view returns(uint total){
}
function get_self_share() public view returns(uint){
}
function set_issue_period_param(uint64 id, uint block_num, uint share)
external
only_signer
is_majority_sig(id, "set_issue_period_param")
{
}
function get_shareholders_count() public view returns(uint){
}
function get_shareholder_amount_with_index(uint index) public view only_signer returns(address account, uint amount) {
}
function get_shareholder_amount_with_account(address account) public view only_signer returns(uint amount){
}
}
| shareholder_exists(account) | 302,056 | shareholder_exists(account) |
null | pragma solidity ^0.5.0;
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract MultisigVaultERC20 {
using SafeMath for uint256;
struct Approval {
uint256 nonce;
uint256 coincieded;
address[] coinciedeParties;
}
uint256 private participantsAmount;
uint256 private signatureMinThreshold;
uint256 private nonce;
ERC20Detailed token;
address public currencyAddress;
string private _symbol;
uint8 private _decimals;
mapping(address => bool) public parties;
mapping(
// Destination
address => mapping(
// Amount
uint256 => Approval
)
) public approvals;
mapping(uint256 => bool) public finished;
event ConfirmationReceived(address indexed from, address indexed destination, address currency, uint256 amount);
event ConsensusAchived(address indexed destination, address currency, uint256 amount);
/**
* @dev Construcor.
*
* Requirements:
* - `_signatureMinThreshold` .
* - `_parties`.
*/
constructor(
uint256 _signatureMinThreshold,
address[] memory _parties,
address _currencyAddress
) public {
}
modifier isMember() {
require(<FILL_ME>)
_;
}
modifier sufficient(uint256 _amount) {
}
function getNonce(
address _destination,
uint256 _amount
) public view returns (uint256) {
}
function partyCoincieded(
address _destination,
uint256 _amount,
uint256 _nonce,
address _partyAddress
) public view returns (bool) {
}
function approve(
address _destination,
uint256 _amount
) public isMember sufficient(_amount) returns (bool) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
}
| parties[msg.sender] | 302,057 | parties[msg.sender] |
null | pragma solidity ^0.5.0;
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract MultisigVaultERC20 {
using SafeMath for uint256;
struct Approval {
uint256 nonce;
uint256 coincieded;
address[] coinciedeParties;
}
uint256 private participantsAmount;
uint256 private signatureMinThreshold;
uint256 private nonce;
ERC20Detailed token;
address public currencyAddress;
string private _symbol;
uint8 private _decimals;
mapping(address => bool) public parties;
mapping(
// Destination
address => mapping(
// Amount
uint256 => Approval
)
) public approvals;
mapping(uint256 => bool) public finished;
event ConfirmationReceived(address indexed from, address indexed destination, address currency, uint256 amount);
event ConsensusAchived(address indexed destination, address currency, uint256 amount);
/**
* @dev Construcor.
*
* Requirements:
* - `_signatureMinThreshold` .
* - `_parties`.
*/
constructor(
uint256 _signatureMinThreshold,
address[] memory _parties,
address _currencyAddress
) public {
}
modifier isMember() {
}
modifier sufficient(uint256 _amount) {
}
function getNonce(
address _destination,
uint256 _amount
) public view returns (uint256) {
}
function partyCoincieded(
address _destination,
uint256 _amount,
uint256 _nonce,
address _partyAddress
) public view returns (bool) {
}
function approve(
address _destination,
uint256 _amount
) public isMember sufficient(_amount) returns (bool) {
Approval storage approval = approvals[_destination][_amount]; // Create new project
bool coinciedeParties = false;
for (uint i=0; i<approval.coinciedeParties.length; i++) {
if (approval.coinciedeParties[i] == msg.sender) coinciedeParties = true;
}
require(<FILL_ME>)
if (approval.coincieded == 0) {
nonce += 1;
approval.nonce = nonce;
}
approval.coinciedeParties.push(msg.sender);
approval.coincieded += 1;
emit ConfirmationReceived(msg.sender, _destination, currencyAddress, _amount);
if ( approval.coincieded >= signatureMinThreshold ) {
token.transfer(_destination, _amount); // Release funds
finished[approval.nonce] = true;
delete approvals[_destination][_amount];
emit ConsensusAchived(_destination, currencyAddress, _amount);
}
return false;
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
}
| !coinciedeParties | 302,057 | !coinciedeParties |
null | /**
This is the source of a special time-locked token for the FTV Coin Deluxe.
If you hold a balance of the token and you wan to convert it to the FTV token, wait until the lockup period is over
and then transfer any amount to yourself.
it will convert the token to the real FTV Token at 0xf91254fe7e6e9f5986a0b41da45a8a2549f1871b
**/
pragma solidity ^0.4.11;
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);
}
library SafeMath {
function mul(uint256 a, uint256 b) internal constant returns (uint256) {
}
function div(uint256 a, uint256 b) internal constant returns (uint256) {
}
function sub(uint256 a, uint256 b) internal constant returns (uint256) {
}
function add(uint256 a, uint256 b) internal constant returns (uint256) {
}
}
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) {
}
}
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);
}
contract FtvTimelockFactory is BasicToken {
ERC20 public token;
address public tokenAssignmentControl;
constructor (ERC20 _token, address _tokenAssignmentControl) {
}
string public constant name = "Your Timelocked FTV Deluxe Tokens";
string public constant symbol = "TLFTV";
uint8 public constant decimals = 18;
mapping(address => uint256) public releaseTimes;
function assignBalance(address _holder, uint256 _releaseTime, uint256 _amount) public {
require(_amount > 0);
require(msg.sender == tokenAssignmentControl);
//only allowed if not already assigned
require(<FILL_ME>)
totalSupply += _amount;
require(totalSupply <= token.balanceOf(this));
releaseTimes[_holder] = _releaseTime;
balances[_holder] = balances[_holder].add(_amount);
emit Transfer(0x0, _holder, _amount);
}
function transfer(address _holder, uint256) public returns (bool) {
}
/**
* @notice Transfers tokens held by timelock to beneficiary. can be called any time after releaseTime
*/
function release(address _holder) public {
}
}
| releaseTimes[_holder]==0 | 302,082 | releaseTimes[_holder]==0 |
"release time is not met yet" | /**
This is the source of a special time-locked token for the FTV Coin Deluxe.
If you hold a balance of the token and you wan to convert it to the FTV token, wait until the lockup period is over
and then transfer any amount to yourself.
it will convert the token to the real FTV Token at 0xf91254fe7e6e9f5986a0b41da45a8a2549f1871b
**/
pragma solidity ^0.4.11;
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);
}
library SafeMath {
function mul(uint256 a, uint256 b) internal constant returns (uint256) {
}
function div(uint256 a, uint256 b) internal constant returns (uint256) {
}
function sub(uint256 a, uint256 b) internal constant returns (uint256) {
}
function add(uint256 a, uint256 b) internal constant returns (uint256) {
}
}
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) {
}
}
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);
}
contract FtvTimelockFactory is BasicToken {
ERC20 public token;
address public tokenAssignmentControl;
constructor (ERC20 _token, address _tokenAssignmentControl) {
}
string public constant name = "Your Timelocked FTV Deluxe Tokens";
string public constant symbol = "TLFTV";
uint8 public constant decimals = 18;
mapping(address => uint256) public releaseTimes;
function assignBalance(address _holder, uint256 _releaseTime, uint256 _amount) public {
}
function transfer(address _holder, uint256) public returns (bool) {
}
/**
* @notice Transfers tokens held by timelock to beneficiary. can be called any time after releaseTime
*/
function release(address _holder) public {
require(<FILL_ME>)
uint256 amount = balanceOf(_holder);
totalSupply -= amount;
token.transfer(_holder, amount);
emit Transfer(_holder, 0x0, amount);
}
}
| releaseTimes[_holder]<now,"release time is not met yet" | 302,082 | releaseTimes[_holder]<now |
"Minter: Can't set Mintable contract twice" | pragma solidity =0.6.11;
contract Minter is Ownable {
event Claimed(
uint256 index,
bytes32 sig,
address account,
uint256 count
);
bytes32 public immutable merkleRoot;
Mintable public mintable;
mapping(uint256 => bool) public claimed;
uint256 public nextId = 1;
mapping(bytes32 => uint256) public sigToTokenId;
constructor(bytes32 _merkleRoot) public {
}
function setMintable(Mintable _mintable) public onlyOwner {
require(<FILL_ME>)
mintable = _mintable;
}
function merkleVerify(bytes32 node, bytes32[] memory proof) public view returns (bool) {
}
function makeNode(
uint256 index,
bytes32 sig,
address account,
uint256 count
) public pure returns (bytes32) {
}
function claim(
uint256 index,
bytes32 sig,
address account,
uint256 count,
bytes32[] memory proof
) public {
}
}
| address(mintable)==address(0),"Minter: Can't set Mintable contract twice" | 302,115 | address(mintable)==address(0) |
"Minter: Must have a mintable set" | pragma solidity =0.6.11;
contract Minter is Ownable {
event Claimed(
uint256 index,
bytes32 sig,
address account,
uint256 count
);
bytes32 public immutable merkleRoot;
Mintable public mintable;
mapping(uint256 => bool) public claimed;
uint256 public nextId = 1;
mapping(bytes32 => uint256) public sigToTokenId;
constructor(bytes32 _merkleRoot) public {
}
function setMintable(Mintable _mintable) public onlyOwner {
}
function merkleVerify(bytes32 node, bytes32[] memory proof) public view returns (bool) {
}
function makeNode(
uint256 index,
bytes32 sig,
address account,
uint256 count
) public pure returns (bytes32) {
}
function claim(
uint256 index,
bytes32 sig,
address account,
uint256 count,
bytes32[] memory proof
) public {
require(<FILL_ME>)
require(!claimed[index], "Minter: Can't claim a drop that's already been claimed");
claimed[index] = true;
bytes32 node = makeNode(index, sig, account, count);
require(merkleVerify(node, proof), "Minter: merkle verification failed");
uint256 id = sigToTokenId[sig];
if (id == 0) {
sigToTokenId[sig] = nextId;
mintable.setTokenId(nextId, sig);
id = nextId;
nextId++;
}
mintable.mint(account, id, count);
emit Claimed(index, sig, account, count);
}
}
| address(mintable)!=address(0),"Minter: Must have a mintable set" | 302,115 | address(mintable)!=address(0) |
"Minter: Can't claim a drop that's already been claimed" | pragma solidity =0.6.11;
contract Minter is Ownable {
event Claimed(
uint256 index,
bytes32 sig,
address account,
uint256 count
);
bytes32 public immutable merkleRoot;
Mintable public mintable;
mapping(uint256 => bool) public claimed;
uint256 public nextId = 1;
mapping(bytes32 => uint256) public sigToTokenId;
constructor(bytes32 _merkleRoot) public {
}
function setMintable(Mintable _mintable) public onlyOwner {
}
function merkleVerify(bytes32 node, bytes32[] memory proof) public view returns (bool) {
}
function makeNode(
uint256 index,
bytes32 sig,
address account,
uint256 count
) public pure returns (bytes32) {
}
function claim(
uint256 index,
bytes32 sig,
address account,
uint256 count,
bytes32[] memory proof
) public {
require(address(mintable) != address(0), "Minter: Must have a mintable set");
require(<FILL_ME>)
claimed[index] = true;
bytes32 node = makeNode(index, sig, account, count);
require(merkleVerify(node, proof), "Minter: merkle verification failed");
uint256 id = sigToTokenId[sig];
if (id == 0) {
sigToTokenId[sig] = nextId;
mintable.setTokenId(nextId, sig);
id = nextId;
nextId++;
}
mintable.mint(account, id, count);
emit Claimed(index, sig, account, count);
}
}
| !claimed[index],"Minter: Can't claim a drop that's already been claimed" | 302,115 | !claimed[index] |
"Minter: merkle verification failed" | pragma solidity =0.6.11;
contract Minter is Ownable {
event Claimed(
uint256 index,
bytes32 sig,
address account,
uint256 count
);
bytes32 public immutable merkleRoot;
Mintable public mintable;
mapping(uint256 => bool) public claimed;
uint256 public nextId = 1;
mapping(bytes32 => uint256) public sigToTokenId;
constructor(bytes32 _merkleRoot) public {
}
function setMintable(Mintable _mintable) public onlyOwner {
}
function merkleVerify(bytes32 node, bytes32[] memory proof) public view returns (bool) {
}
function makeNode(
uint256 index,
bytes32 sig,
address account,
uint256 count
) public pure returns (bytes32) {
}
function claim(
uint256 index,
bytes32 sig,
address account,
uint256 count,
bytes32[] memory proof
) public {
require(address(mintable) != address(0), "Minter: Must have a mintable set");
require(!claimed[index], "Minter: Can't claim a drop that's already been claimed");
claimed[index] = true;
bytes32 node = makeNode(index, sig, account, count);
require(<FILL_ME>)
uint256 id = sigToTokenId[sig];
if (id == 0) {
sigToTokenId[sig] = nextId;
mintable.setTokenId(nextId, sig);
id = nextId;
nextId++;
}
mintable.mint(account, id, count);
emit Claimed(index, sig, account, count);
}
}
| merkleVerify(node,proof),"Minter: merkle verification failed" | 302,115 | merkleVerify(node,proof) |
"NOT_ROLLOVER_ROLE" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.11;
pragma experimental ABIEncoderV2;
import "../interfaces/IManager.sol";
import "../interfaces/ILiquidityPool.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol";
import {IERC20Upgradeable as IERC20} from "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";
import {SafeERC20Upgradeable as SafeERC20} from "@openzeppelin/contracts-upgradeable/token/ERC20/SafeERC20Upgradeable.sol";
import {EnumerableSetUpgradeable as EnumerableSet} from "@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol";
import {SafeMathUpgradeable as SafeMath} from "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol";
import {AccessControlUpgradeable as AccessControl} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import "../interfaces/events/Destinations.sol";
import "../interfaces/events/CycleRolloverEvent.sol";
contract Manager is IManager, Initializable, AccessControl {
using SafeMath for uint256;
using SafeERC20 for IERC20;
using Address for address;
using EnumerableSet for EnumerableSet.AddressSet;
using EnumerableSet for EnumerableSet.Bytes32Set;
bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");
bytes32 public constant ROLLOVER_ROLE = keccak256("ROLLOVER_ROLE");
bytes32 public constant MID_CYCLE_ROLE = keccak256("MID_CYCLE_ROLE");
uint256 public currentCycle; // Start block of current cycle
uint256 public currentCycleIndex; // Uint representing current cycle
uint256 public cycleDuration; // Cycle duration in block number
bool public rolloverStarted;
// Bytes32 controller id => controller address
mapping(bytes32 => address) public registeredControllers;
// Cycle index => ipfs rewards hash
mapping(uint256 => string) public override cycleRewardsHashes;
EnumerableSet.AddressSet private pools;
EnumerableSet.Bytes32Set private controllerIds;
// Reentrancy Guard
bool private _entered;
bool public _eventSend;
Destinations public destinations;
modifier onlyAdmin() {
}
modifier onlyRollover() {
require(<FILL_ME>)
_;
}
modifier onlyMidCycle() {
}
modifier nonReentrant() {
}
modifier onEventSend() {
}
function initialize(uint256 _cycleDuration) public initializer {
}
function registerController(bytes32 id, address controller) external override onlyAdmin {
}
function unRegisterController(bytes32 id) external override onlyAdmin {
}
function registerPool(address pool) external override onlyAdmin {
}
function unRegisterPool(address pool) external override onlyAdmin {
}
function setCycleDuration(uint256 duration) external override onlyAdmin {
}
function getPools() external view override returns (address[] memory) {
}
function getControllers() external view override returns (bytes32[] memory) {
}
function completeRollover(string calldata rewardsIpfsHash) external override onlyRollover {
}
/// @notice Used for mid-cycle adjustments
function executeMaintenance(MaintenanceExecution calldata params)
external
override
onlyMidCycle
nonReentrant
{
}
function executeRollover(RolloverExecution calldata params) external override onlyRollover nonReentrant {
}
function _executeControllerCommand(ControllerTransferData calldata transfer) private {
}
function startCycleRollover() external override onlyRollover {
}
function _completeRollover(string calldata rewardsIpfsHash) private {
}
function getCurrentCycle() external view override returns (uint256) {
}
function getCycleDuration() external view override returns (uint256) {
}
function getCurrentCycleIndex() external view override returns (uint256) {
}
function getRolloverStatus() external view override returns (bool) {
}
function setDestinations(address _fxStateSender, address _destinationOnL2) external override onlyAdmin {
}
function setEventSend(bool _eventSendSet) external override onlyAdmin {
}
function encodeAndSendData(bytes32 _eventSig) private onEventSend {
}
}
| hasRole(ROLLOVER_ROLE,_msgSender()),"NOT_ROLLOVER_ROLE" | 302,201 | hasRole(ROLLOVER_ROLE,_msgSender()) |
"NOT_MID_CYCLE_ROLE" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.11;
pragma experimental ABIEncoderV2;
import "../interfaces/IManager.sol";
import "../interfaces/ILiquidityPool.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol";
import {IERC20Upgradeable as IERC20} from "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";
import {SafeERC20Upgradeable as SafeERC20} from "@openzeppelin/contracts-upgradeable/token/ERC20/SafeERC20Upgradeable.sol";
import {EnumerableSetUpgradeable as EnumerableSet} from "@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol";
import {SafeMathUpgradeable as SafeMath} from "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol";
import {AccessControlUpgradeable as AccessControl} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import "../interfaces/events/Destinations.sol";
import "../interfaces/events/CycleRolloverEvent.sol";
contract Manager is IManager, Initializable, AccessControl {
using SafeMath for uint256;
using SafeERC20 for IERC20;
using Address for address;
using EnumerableSet for EnumerableSet.AddressSet;
using EnumerableSet for EnumerableSet.Bytes32Set;
bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");
bytes32 public constant ROLLOVER_ROLE = keccak256("ROLLOVER_ROLE");
bytes32 public constant MID_CYCLE_ROLE = keccak256("MID_CYCLE_ROLE");
uint256 public currentCycle; // Start block of current cycle
uint256 public currentCycleIndex; // Uint representing current cycle
uint256 public cycleDuration; // Cycle duration in block number
bool public rolloverStarted;
// Bytes32 controller id => controller address
mapping(bytes32 => address) public registeredControllers;
// Cycle index => ipfs rewards hash
mapping(uint256 => string) public override cycleRewardsHashes;
EnumerableSet.AddressSet private pools;
EnumerableSet.Bytes32Set private controllerIds;
// Reentrancy Guard
bool private _entered;
bool public _eventSend;
Destinations public destinations;
modifier onlyAdmin() {
}
modifier onlyRollover() {
}
modifier onlyMidCycle() {
require(<FILL_ME>)
_;
}
modifier nonReentrant() {
}
modifier onEventSend() {
}
function initialize(uint256 _cycleDuration) public initializer {
}
function registerController(bytes32 id, address controller) external override onlyAdmin {
}
function unRegisterController(bytes32 id) external override onlyAdmin {
}
function registerPool(address pool) external override onlyAdmin {
}
function unRegisterPool(address pool) external override onlyAdmin {
}
function setCycleDuration(uint256 duration) external override onlyAdmin {
}
function getPools() external view override returns (address[] memory) {
}
function getControllers() external view override returns (bytes32[] memory) {
}
function completeRollover(string calldata rewardsIpfsHash) external override onlyRollover {
}
/// @notice Used for mid-cycle adjustments
function executeMaintenance(MaintenanceExecution calldata params)
external
override
onlyMidCycle
nonReentrant
{
}
function executeRollover(RolloverExecution calldata params) external override onlyRollover nonReentrant {
}
function _executeControllerCommand(ControllerTransferData calldata transfer) private {
}
function startCycleRollover() external override onlyRollover {
}
function _completeRollover(string calldata rewardsIpfsHash) private {
}
function getCurrentCycle() external view override returns (uint256) {
}
function getCycleDuration() external view override returns (uint256) {
}
function getCurrentCycleIndex() external view override returns (uint256) {
}
function getRolloverStatus() external view override returns (bool) {
}
function setDestinations(address _fxStateSender, address _destinationOnL2) external override onlyAdmin {
}
function setEventSend(bool _eventSendSet) external override onlyAdmin {
}
function encodeAndSendData(bytes32 _eventSig) private onEventSend {
}
}
| hasRole(MID_CYCLE_ROLE,_msgSender()),"NOT_MID_CYCLE_ROLE" | 302,201 | hasRole(MID_CYCLE_ROLE,_msgSender()) |
"ReentrancyGuard: reentrant call" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.11;
pragma experimental ABIEncoderV2;
import "../interfaces/IManager.sol";
import "../interfaces/ILiquidityPool.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol";
import {IERC20Upgradeable as IERC20} from "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";
import {SafeERC20Upgradeable as SafeERC20} from "@openzeppelin/contracts-upgradeable/token/ERC20/SafeERC20Upgradeable.sol";
import {EnumerableSetUpgradeable as EnumerableSet} from "@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol";
import {SafeMathUpgradeable as SafeMath} from "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol";
import {AccessControlUpgradeable as AccessControl} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import "../interfaces/events/Destinations.sol";
import "../interfaces/events/CycleRolloverEvent.sol";
contract Manager is IManager, Initializable, AccessControl {
using SafeMath for uint256;
using SafeERC20 for IERC20;
using Address for address;
using EnumerableSet for EnumerableSet.AddressSet;
using EnumerableSet for EnumerableSet.Bytes32Set;
bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");
bytes32 public constant ROLLOVER_ROLE = keccak256("ROLLOVER_ROLE");
bytes32 public constant MID_CYCLE_ROLE = keccak256("MID_CYCLE_ROLE");
uint256 public currentCycle; // Start block of current cycle
uint256 public currentCycleIndex; // Uint representing current cycle
uint256 public cycleDuration; // Cycle duration in block number
bool public rolloverStarted;
// Bytes32 controller id => controller address
mapping(bytes32 => address) public registeredControllers;
// Cycle index => ipfs rewards hash
mapping(uint256 => string) public override cycleRewardsHashes;
EnumerableSet.AddressSet private pools;
EnumerableSet.Bytes32Set private controllerIds;
// Reentrancy Guard
bool private _entered;
bool public _eventSend;
Destinations public destinations;
modifier onlyAdmin() {
}
modifier onlyRollover() {
}
modifier onlyMidCycle() {
}
modifier nonReentrant() {
require(<FILL_ME>)
_entered = true;
_;
_entered = false;
}
modifier onEventSend() {
}
function initialize(uint256 _cycleDuration) public initializer {
}
function registerController(bytes32 id, address controller) external override onlyAdmin {
}
function unRegisterController(bytes32 id) external override onlyAdmin {
}
function registerPool(address pool) external override onlyAdmin {
}
function unRegisterPool(address pool) external override onlyAdmin {
}
function setCycleDuration(uint256 duration) external override onlyAdmin {
}
function getPools() external view override returns (address[] memory) {
}
function getControllers() external view override returns (bytes32[] memory) {
}
function completeRollover(string calldata rewardsIpfsHash) external override onlyRollover {
}
/// @notice Used for mid-cycle adjustments
function executeMaintenance(MaintenanceExecution calldata params)
external
override
onlyMidCycle
nonReentrant
{
}
function executeRollover(RolloverExecution calldata params) external override onlyRollover nonReentrant {
}
function _executeControllerCommand(ControllerTransferData calldata transfer) private {
}
function startCycleRollover() external override onlyRollover {
}
function _completeRollover(string calldata rewardsIpfsHash) private {
}
function getCurrentCycle() external view override returns (uint256) {
}
function getCycleDuration() external view override returns (uint256) {
}
function getCurrentCycleIndex() external view override returns (uint256) {
}
function getRolloverStatus() external view override returns (bool) {
}
function setDestinations(address _fxStateSender, address _destinationOnL2) external override onlyAdmin {
}
function setEventSend(bool _eventSendSet) external override onlyAdmin {
}
function encodeAndSendData(bytes32 _eventSig) private onEventSend {
}
}
| !_entered,"ReentrancyGuard: reentrant call" | 302,201 | !_entered |
"CONTROLLER_EXISTS" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.11;
pragma experimental ABIEncoderV2;
import "../interfaces/IManager.sol";
import "../interfaces/ILiquidityPool.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol";
import {IERC20Upgradeable as IERC20} from "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";
import {SafeERC20Upgradeable as SafeERC20} from "@openzeppelin/contracts-upgradeable/token/ERC20/SafeERC20Upgradeable.sol";
import {EnumerableSetUpgradeable as EnumerableSet} from "@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol";
import {SafeMathUpgradeable as SafeMath} from "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol";
import {AccessControlUpgradeable as AccessControl} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import "../interfaces/events/Destinations.sol";
import "../interfaces/events/CycleRolloverEvent.sol";
contract Manager is IManager, Initializable, AccessControl {
using SafeMath for uint256;
using SafeERC20 for IERC20;
using Address for address;
using EnumerableSet for EnumerableSet.AddressSet;
using EnumerableSet for EnumerableSet.Bytes32Set;
bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");
bytes32 public constant ROLLOVER_ROLE = keccak256("ROLLOVER_ROLE");
bytes32 public constant MID_CYCLE_ROLE = keccak256("MID_CYCLE_ROLE");
uint256 public currentCycle; // Start block of current cycle
uint256 public currentCycleIndex; // Uint representing current cycle
uint256 public cycleDuration; // Cycle duration in block number
bool public rolloverStarted;
// Bytes32 controller id => controller address
mapping(bytes32 => address) public registeredControllers;
// Cycle index => ipfs rewards hash
mapping(uint256 => string) public override cycleRewardsHashes;
EnumerableSet.AddressSet private pools;
EnumerableSet.Bytes32Set private controllerIds;
// Reentrancy Guard
bool private _entered;
bool public _eventSend;
Destinations public destinations;
modifier onlyAdmin() {
}
modifier onlyRollover() {
}
modifier onlyMidCycle() {
}
modifier nonReentrant() {
}
modifier onEventSend() {
}
function initialize(uint256 _cycleDuration) public initializer {
}
function registerController(bytes32 id, address controller) external override onlyAdmin {
require(<FILL_ME>)
registeredControllers[id] = controller;
controllerIds.add(id);
emit ControllerRegistered(id, controller);
}
function unRegisterController(bytes32 id) external override onlyAdmin {
}
function registerPool(address pool) external override onlyAdmin {
}
function unRegisterPool(address pool) external override onlyAdmin {
}
function setCycleDuration(uint256 duration) external override onlyAdmin {
}
function getPools() external view override returns (address[] memory) {
}
function getControllers() external view override returns (bytes32[] memory) {
}
function completeRollover(string calldata rewardsIpfsHash) external override onlyRollover {
}
/// @notice Used for mid-cycle adjustments
function executeMaintenance(MaintenanceExecution calldata params)
external
override
onlyMidCycle
nonReentrant
{
}
function executeRollover(RolloverExecution calldata params) external override onlyRollover nonReentrant {
}
function _executeControllerCommand(ControllerTransferData calldata transfer) private {
}
function startCycleRollover() external override onlyRollover {
}
function _completeRollover(string calldata rewardsIpfsHash) private {
}
function getCurrentCycle() external view override returns (uint256) {
}
function getCycleDuration() external view override returns (uint256) {
}
function getCurrentCycleIndex() external view override returns (uint256) {
}
function getRolloverStatus() external view override returns (bool) {
}
function setDestinations(address _fxStateSender, address _destinationOnL2) external override onlyAdmin {
}
function setEventSend(bool _eventSendSet) external override onlyAdmin {
}
function encodeAndSendData(bytes32 _eventSig) private onEventSend {
}
}
| !controllerIds.contains(id),"CONTROLLER_EXISTS" | 302,201 | !controllerIds.contains(id) |
"INVALID_CONTROLLER" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.11;
pragma experimental ABIEncoderV2;
import "../interfaces/IManager.sol";
import "../interfaces/ILiquidityPool.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol";
import {IERC20Upgradeable as IERC20} from "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";
import {SafeERC20Upgradeable as SafeERC20} from "@openzeppelin/contracts-upgradeable/token/ERC20/SafeERC20Upgradeable.sol";
import {EnumerableSetUpgradeable as EnumerableSet} from "@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol";
import {SafeMathUpgradeable as SafeMath} from "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol";
import {AccessControlUpgradeable as AccessControl} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import "../interfaces/events/Destinations.sol";
import "../interfaces/events/CycleRolloverEvent.sol";
contract Manager is IManager, Initializable, AccessControl {
using SafeMath for uint256;
using SafeERC20 for IERC20;
using Address for address;
using EnumerableSet for EnumerableSet.AddressSet;
using EnumerableSet for EnumerableSet.Bytes32Set;
bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");
bytes32 public constant ROLLOVER_ROLE = keccak256("ROLLOVER_ROLE");
bytes32 public constant MID_CYCLE_ROLE = keccak256("MID_CYCLE_ROLE");
uint256 public currentCycle; // Start block of current cycle
uint256 public currentCycleIndex; // Uint representing current cycle
uint256 public cycleDuration; // Cycle duration in block number
bool public rolloverStarted;
// Bytes32 controller id => controller address
mapping(bytes32 => address) public registeredControllers;
// Cycle index => ipfs rewards hash
mapping(uint256 => string) public override cycleRewardsHashes;
EnumerableSet.AddressSet private pools;
EnumerableSet.Bytes32Set private controllerIds;
// Reentrancy Guard
bool private _entered;
bool public _eventSend;
Destinations public destinations;
modifier onlyAdmin() {
}
modifier onlyRollover() {
}
modifier onlyMidCycle() {
}
modifier nonReentrant() {
}
modifier onEventSend() {
}
function initialize(uint256 _cycleDuration) public initializer {
}
function registerController(bytes32 id, address controller) external override onlyAdmin {
}
function unRegisterController(bytes32 id) external override onlyAdmin {
require(<FILL_ME>)
emit ControllerUnregistered(id, registeredControllers[id]);
delete registeredControllers[id];
controllerIds.remove(id);
}
function registerPool(address pool) external override onlyAdmin {
}
function unRegisterPool(address pool) external override onlyAdmin {
}
function setCycleDuration(uint256 duration) external override onlyAdmin {
}
function getPools() external view override returns (address[] memory) {
}
function getControllers() external view override returns (bytes32[] memory) {
}
function completeRollover(string calldata rewardsIpfsHash) external override onlyRollover {
}
/// @notice Used for mid-cycle adjustments
function executeMaintenance(MaintenanceExecution calldata params)
external
override
onlyMidCycle
nonReentrant
{
}
function executeRollover(RolloverExecution calldata params) external override onlyRollover nonReentrant {
}
function _executeControllerCommand(ControllerTransferData calldata transfer) private {
}
function startCycleRollover() external override onlyRollover {
}
function _completeRollover(string calldata rewardsIpfsHash) private {
}
function getCurrentCycle() external view override returns (uint256) {
}
function getCycleDuration() external view override returns (uint256) {
}
function getCurrentCycleIndex() external view override returns (uint256) {
}
function getRolloverStatus() external view override returns (bool) {
}
function setDestinations(address _fxStateSender, address _destinationOnL2) external override onlyAdmin {
}
function setEventSend(bool _eventSendSet) external override onlyAdmin {
}
function encodeAndSendData(bytes32 _eventSig) private onEventSend {
}
}
| controllerIds.contains(id),"INVALID_CONTROLLER" | 302,201 | controllerIds.contains(id) |
"POOL_EXISTS" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.11;
pragma experimental ABIEncoderV2;
import "../interfaces/IManager.sol";
import "../interfaces/ILiquidityPool.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol";
import {IERC20Upgradeable as IERC20} from "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";
import {SafeERC20Upgradeable as SafeERC20} from "@openzeppelin/contracts-upgradeable/token/ERC20/SafeERC20Upgradeable.sol";
import {EnumerableSetUpgradeable as EnumerableSet} from "@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol";
import {SafeMathUpgradeable as SafeMath} from "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol";
import {AccessControlUpgradeable as AccessControl} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import "../interfaces/events/Destinations.sol";
import "../interfaces/events/CycleRolloverEvent.sol";
contract Manager is IManager, Initializable, AccessControl {
using SafeMath for uint256;
using SafeERC20 for IERC20;
using Address for address;
using EnumerableSet for EnumerableSet.AddressSet;
using EnumerableSet for EnumerableSet.Bytes32Set;
bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");
bytes32 public constant ROLLOVER_ROLE = keccak256("ROLLOVER_ROLE");
bytes32 public constant MID_CYCLE_ROLE = keccak256("MID_CYCLE_ROLE");
uint256 public currentCycle; // Start block of current cycle
uint256 public currentCycleIndex; // Uint representing current cycle
uint256 public cycleDuration; // Cycle duration in block number
bool public rolloverStarted;
// Bytes32 controller id => controller address
mapping(bytes32 => address) public registeredControllers;
// Cycle index => ipfs rewards hash
mapping(uint256 => string) public override cycleRewardsHashes;
EnumerableSet.AddressSet private pools;
EnumerableSet.Bytes32Set private controllerIds;
// Reentrancy Guard
bool private _entered;
bool public _eventSend;
Destinations public destinations;
modifier onlyAdmin() {
}
modifier onlyRollover() {
}
modifier onlyMidCycle() {
}
modifier nonReentrant() {
}
modifier onEventSend() {
}
function initialize(uint256 _cycleDuration) public initializer {
}
function registerController(bytes32 id, address controller) external override onlyAdmin {
}
function unRegisterController(bytes32 id) external override onlyAdmin {
}
function registerPool(address pool) external override onlyAdmin {
require(<FILL_ME>)
pools.add(pool);
emit PoolRegistered(pool);
}
function unRegisterPool(address pool) external override onlyAdmin {
}
function setCycleDuration(uint256 duration) external override onlyAdmin {
}
function getPools() external view override returns (address[] memory) {
}
function getControllers() external view override returns (bytes32[] memory) {
}
function completeRollover(string calldata rewardsIpfsHash) external override onlyRollover {
}
/// @notice Used for mid-cycle adjustments
function executeMaintenance(MaintenanceExecution calldata params)
external
override
onlyMidCycle
nonReentrant
{
}
function executeRollover(RolloverExecution calldata params) external override onlyRollover nonReentrant {
}
function _executeControllerCommand(ControllerTransferData calldata transfer) private {
}
function startCycleRollover() external override onlyRollover {
}
function _completeRollover(string calldata rewardsIpfsHash) private {
}
function getCurrentCycle() external view override returns (uint256) {
}
function getCycleDuration() external view override returns (uint256) {
}
function getCurrentCycleIndex() external view override returns (uint256) {
}
function getRolloverStatus() external view override returns (bool) {
}
function setDestinations(address _fxStateSender, address _destinationOnL2) external override onlyAdmin {
}
function setEventSend(bool _eventSendSet) external override onlyAdmin {
}
function encodeAndSendData(bytes32 _eventSig) private onEventSend {
}
}
| !pools.contains(pool),"POOL_EXISTS" | 302,201 | !pools.contains(pool) |
"INVALID_POOL" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.11;
pragma experimental ABIEncoderV2;
import "../interfaces/IManager.sol";
import "../interfaces/ILiquidityPool.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol";
import {IERC20Upgradeable as IERC20} from "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";
import {SafeERC20Upgradeable as SafeERC20} from "@openzeppelin/contracts-upgradeable/token/ERC20/SafeERC20Upgradeable.sol";
import {EnumerableSetUpgradeable as EnumerableSet} from "@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol";
import {SafeMathUpgradeable as SafeMath} from "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol";
import {AccessControlUpgradeable as AccessControl} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import "../interfaces/events/Destinations.sol";
import "../interfaces/events/CycleRolloverEvent.sol";
contract Manager is IManager, Initializable, AccessControl {
using SafeMath for uint256;
using SafeERC20 for IERC20;
using Address for address;
using EnumerableSet for EnumerableSet.AddressSet;
using EnumerableSet for EnumerableSet.Bytes32Set;
bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");
bytes32 public constant ROLLOVER_ROLE = keccak256("ROLLOVER_ROLE");
bytes32 public constant MID_CYCLE_ROLE = keccak256("MID_CYCLE_ROLE");
uint256 public currentCycle; // Start block of current cycle
uint256 public currentCycleIndex; // Uint representing current cycle
uint256 public cycleDuration; // Cycle duration in block number
bool public rolloverStarted;
// Bytes32 controller id => controller address
mapping(bytes32 => address) public registeredControllers;
// Cycle index => ipfs rewards hash
mapping(uint256 => string) public override cycleRewardsHashes;
EnumerableSet.AddressSet private pools;
EnumerableSet.Bytes32Set private controllerIds;
// Reentrancy Guard
bool private _entered;
bool public _eventSend;
Destinations public destinations;
modifier onlyAdmin() {
}
modifier onlyRollover() {
}
modifier onlyMidCycle() {
}
modifier nonReentrant() {
}
modifier onEventSend() {
}
function initialize(uint256 _cycleDuration) public initializer {
}
function registerController(bytes32 id, address controller) external override onlyAdmin {
}
function unRegisterController(bytes32 id) external override onlyAdmin {
}
function registerPool(address pool) external override onlyAdmin {
}
function unRegisterPool(address pool) external override onlyAdmin {
require(<FILL_ME>)
pools.remove(pool);
emit PoolUnregistered(pool);
}
function setCycleDuration(uint256 duration) external override onlyAdmin {
}
function getPools() external view override returns (address[] memory) {
}
function getControllers() external view override returns (bytes32[] memory) {
}
function completeRollover(string calldata rewardsIpfsHash) external override onlyRollover {
}
/// @notice Used for mid-cycle adjustments
function executeMaintenance(MaintenanceExecution calldata params)
external
override
onlyMidCycle
nonReentrant
{
}
function executeRollover(RolloverExecution calldata params) external override onlyRollover nonReentrant {
}
function _executeControllerCommand(ControllerTransferData calldata transfer) private {
}
function startCycleRollover() external override onlyRollover {
}
function _completeRollover(string calldata rewardsIpfsHash) private {
}
function getCurrentCycle() external view override returns (uint256) {
}
function getCycleDuration() external view override returns (uint256) {
}
function getCurrentCycleIndex() external view override returns (uint256) {
}
function getRolloverStatus() external view override returns (bool) {
}
function setDestinations(address _fxStateSender, address _destinationOnL2) external override onlyAdmin {
}
function setEventSend(bool _eventSendSet) external override onlyAdmin {
}
function encodeAndSendData(bytes32 _eventSig) private onEventSend {
}
}
| pools.contains(pool),"INVALID_POOL" | 302,201 | pools.contains(pool) |
"PREMATURE_EXECUTION" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.11;
pragma experimental ABIEncoderV2;
import "../interfaces/IManager.sol";
import "../interfaces/ILiquidityPool.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol";
import {IERC20Upgradeable as IERC20} from "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";
import {SafeERC20Upgradeable as SafeERC20} from "@openzeppelin/contracts-upgradeable/token/ERC20/SafeERC20Upgradeable.sol";
import {EnumerableSetUpgradeable as EnumerableSet} from "@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol";
import {SafeMathUpgradeable as SafeMath} from "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol";
import {AccessControlUpgradeable as AccessControl} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import "../interfaces/events/Destinations.sol";
import "../interfaces/events/CycleRolloverEvent.sol";
contract Manager is IManager, Initializable, AccessControl {
using SafeMath for uint256;
using SafeERC20 for IERC20;
using Address for address;
using EnumerableSet for EnumerableSet.AddressSet;
using EnumerableSet for EnumerableSet.Bytes32Set;
bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");
bytes32 public constant ROLLOVER_ROLE = keccak256("ROLLOVER_ROLE");
bytes32 public constant MID_CYCLE_ROLE = keccak256("MID_CYCLE_ROLE");
uint256 public currentCycle; // Start block of current cycle
uint256 public currentCycleIndex; // Uint representing current cycle
uint256 public cycleDuration; // Cycle duration in block number
bool public rolloverStarted;
// Bytes32 controller id => controller address
mapping(bytes32 => address) public registeredControllers;
// Cycle index => ipfs rewards hash
mapping(uint256 => string) public override cycleRewardsHashes;
EnumerableSet.AddressSet private pools;
EnumerableSet.Bytes32Set private controllerIds;
// Reentrancy Guard
bool private _entered;
bool public _eventSend;
Destinations public destinations;
modifier onlyAdmin() {
}
modifier onlyRollover() {
}
modifier onlyMidCycle() {
}
modifier nonReentrant() {
}
modifier onEventSend() {
}
function initialize(uint256 _cycleDuration) public initializer {
}
function registerController(bytes32 id, address controller) external override onlyAdmin {
}
function unRegisterController(bytes32 id) external override onlyAdmin {
}
function registerPool(address pool) external override onlyAdmin {
}
function unRegisterPool(address pool) external override onlyAdmin {
}
function setCycleDuration(uint256 duration) external override onlyAdmin {
}
function getPools() external view override returns (address[] memory) {
}
function getControllers() external view override returns (bytes32[] memory) {
}
function completeRollover(string calldata rewardsIpfsHash) external override onlyRollover {
require(<FILL_ME>)
_completeRollover(rewardsIpfsHash);
}
/// @notice Used for mid-cycle adjustments
function executeMaintenance(MaintenanceExecution calldata params)
external
override
onlyMidCycle
nonReentrant
{
}
function executeRollover(RolloverExecution calldata params) external override onlyRollover nonReentrant {
}
function _executeControllerCommand(ControllerTransferData calldata transfer) private {
}
function startCycleRollover() external override onlyRollover {
}
function _completeRollover(string calldata rewardsIpfsHash) private {
}
function getCurrentCycle() external view override returns (uint256) {
}
function getCycleDuration() external view override returns (uint256) {
}
function getCurrentCycleIndex() external view override returns (uint256) {
}
function getRolloverStatus() external view override returns (bool) {
}
function setDestinations(address _fxStateSender, address _destinationOnL2) external override onlyAdmin {
}
function setEventSend(bool _eventSendSet) external override onlyAdmin {
}
function encodeAndSendData(bytes32 _eventSig) private onEventSend {
}
}
| block.number>(currentCycle.add(cycleDuration)),"PREMATURE_EXECUTION" | 302,201 | block.number>(currentCycle.add(cycleDuration)) |
"INVALID_POOL" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.11;
pragma experimental ABIEncoderV2;
import "../interfaces/IManager.sol";
import "../interfaces/ILiquidityPool.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol";
import {IERC20Upgradeable as IERC20} from "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";
import {SafeERC20Upgradeable as SafeERC20} from "@openzeppelin/contracts-upgradeable/token/ERC20/SafeERC20Upgradeable.sol";
import {EnumerableSetUpgradeable as EnumerableSet} from "@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol";
import {SafeMathUpgradeable as SafeMath} from "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol";
import {AccessControlUpgradeable as AccessControl} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import "../interfaces/events/Destinations.sol";
import "../interfaces/events/CycleRolloverEvent.sol";
contract Manager is IManager, Initializable, AccessControl {
using SafeMath for uint256;
using SafeERC20 for IERC20;
using Address for address;
using EnumerableSet for EnumerableSet.AddressSet;
using EnumerableSet for EnumerableSet.Bytes32Set;
bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");
bytes32 public constant ROLLOVER_ROLE = keccak256("ROLLOVER_ROLE");
bytes32 public constant MID_CYCLE_ROLE = keccak256("MID_CYCLE_ROLE");
uint256 public currentCycle; // Start block of current cycle
uint256 public currentCycleIndex; // Uint representing current cycle
uint256 public cycleDuration; // Cycle duration in block number
bool public rolloverStarted;
// Bytes32 controller id => controller address
mapping(bytes32 => address) public registeredControllers;
// Cycle index => ipfs rewards hash
mapping(uint256 => string) public override cycleRewardsHashes;
EnumerableSet.AddressSet private pools;
EnumerableSet.Bytes32Set private controllerIds;
// Reentrancy Guard
bool private _entered;
bool public _eventSend;
Destinations public destinations;
modifier onlyAdmin() {
}
modifier onlyRollover() {
}
modifier onlyMidCycle() {
}
modifier nonReentrant() {
}
modifier onEventSend() {
}
function initialize(uint256 _cycleDuration) public initializer {
}
function registerController(bytes32 id, address controller) external override onlyAdmin {
}
function unRegisterController(bytes32 id) external override onlyAdmin {
}
function registerPool(address pool) external override onlyAdmin {
}
function unRegisterPool(address pool) external override onlyAdmin {
}
function setCycleDuration(uint256 duration) external override onlyAdmin {
}
function getPools() external view override returns (address[] memory) {
}
function getControllers() external view override returns (bytes32[] memory) {
}
function completeRollover(string calldata rewardsIpfsHash) external override onlyRollover {
}
/// @notice Used for mid-cycle adjustments
function executeMaintenance(MaintenanceExecution calldata params)
external
override
onlyMidCycle
nonReentrant
{
}
function executeRollover(RolloverExecution calldata params) external override onlyRollover nonReentrant {
require(block.number > (currentCycle.add(cycleDuration)), "PREMATURE_EXECUTION");
// Transfer deployable liquidity out of the pools and into the manager
for (uint256 i = 0; i < params.poolData.length; i++) {
require(<FILL_ME>)
ILiquidityPool pool = ILiquidityPool(params.poolData[i].pool);
IERC20 underlyingToken = pool.underlyer();
underlyingToken.safeTransferFrom(
address(pool),
address(this),
params.poolData[i].amount
);
emit LiquidityMovedToManager(params.poolData[i].pool, params.poolData[i].amount);
}
// Deploy or withdraw liquidity
for (uint256 x = 0; x < params.cycleSteps.length; x++) {
_executeControllerCommand(params.cycleSteps[x]);
}
// Transfer recovered liquidity back into the pools; leave no funds in the manager
for (uint256 y = 0; y < params.poolsForWithdraw.length; y++) {
require(pools.contains(params.poolsForWithdraw[y]), "INVALID_POOL");
ILiquidityPool pool = ILiquidityPool(params.poolsForWithdraw[y]);
IERC20 underlyingToken = pool.underlyer();
uint256 managerBalance = underlyingToken.balanceOf(address(this));
// transfer funds back to the pool if there are funds
if (managerBalance > 0) {
underlyingToken.safeTransfer(address(pool), managerBalance);
}
emit LiquidityMovedToPool(params.poolsForWithdraw[y], managerBalance);
}
if (params.complete) {
_completeRollover(params.rewardsIpfsHash);
}
}
function _executeControllerCommand(ControllerTransferData calldata transfer) private {
}
function startCycleRollover() external override onlyRollover {
}
function _completeRollover(string calldata rewardsIpfsHash) private {
}
function getCurrentCycle() external view override returns (uint256) {
}
function getCycleDuration() external view override returns (uint256) {
}
function getCurrentCycleIndex() external view override returns (uint256) {
}
function getRolloverStatus() external view override returns (bool) {
}
function setDestinations(address _fxStateSender, address _destinationOnL2) external override onlyAdmin {
}
function setEventSend(bool _eventSendSet) external override onlyAdmin {
}
function encodeAndSendData(bytes32 _eventSig) private onEventSend {
}
}
| pools.contains(params.poolData[i].pool),"INVALID_POOL" | 302,201 | pools.contains(params.poolData[i].pool) |
"INVALID_POOL" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.11;
pragma experimental ABIEncoderV2;
import "../interfaces/IManager.sol";
import "../interfaces/ILiquidityPool.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol";
import {IERC20Upgradeable as IERC20} from "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";
import {SafeERC20Upgradeable as SafeERC20} from "@openzeppelin/contracts-upgradeable/token/ERC20/SafeERC20Upgradeable.sol";
import {EnumerableSetUpgradeable as EnumerableSet} from "@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol";
import {SafeMathUpgradeable as SafeMath} from "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol";
import {AccessControlUpgradeable as AccessControl} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import "../interfaces/events/Destinations.sol";
import "../interfaces/events/CycleRolloverEvent.sol";
contract Manager is IManager, Initializable, AccessControl {
using SafeMath for uint256;
using SafeERC20 for IERC20;
using Address for address;
using EnumerableSet for EnumerableSet.AddressSet;
using EnumerableSet for EnumerableSet.Bytes32Set;
bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");
bytes32 public constant ROLLOVER_ROLE = keccak256("ROLLOVER_ROLE");
bytes32 public constant MID_CYCLE_ROLE = keccak256("MID_CYCLE_ROLE");
uint256 public currentCycle; // Start block of current cycle
uint256 public currentCycleIndex; // Uint representing current cycle
uint256 public cycleDuration; // Cycle duration in block number
bool public rolloverStarted;
// Bytes32 controller id => controller address
mapping(bytes32 => address) public registeredControllers;
// Cycle index => ipfs rewards hash
mapping(uint256 => string) public override cycleRewardsHashes;
EnumerableSet.AddressSet private pools;
EnumerableSet.Bytes32Set private controllerIds;
// Reentrancy Guard
bool private _entered;
bool public _eventSend;
Destinations public destinations;
modifier onlyAdmin() {
}
modifier onlyRollover() {
}
modifier onlyMidCycle() {
}
modifier nonReentrant() {
}
modifier onEventSend() {
}
function initialize(uint256 _cycleDuration) public initializer {
}
function registerController(bytes32 id, address controller) external override onlyAdmin {
}
function unRegisterController(bytes32 id) external override onlyAdmin {
}
function registerPool(address pool) external override onlyAdmin {
}
function unRegisterPool(address pool) external override onlyAdmin {
}
function setCycleDuration(uint256 duration) external override onlyAdmin {
}
function getPools() external view override returns (address[] memory) {
}
function getControllers() external view override returns (bytes32[] memory) {
}
function completeRollover(string calldata rewardsIpfsHash) external override onlyRollover {
}
/// @notice Used for mid-cycle adjustments
function executeMaintenance(MaintenanceExecution calldata params)
external
override
onlyMidCycle
nonReentrant
{
}
function executeRollover(RolloverExecution calldata params) external override onlyRollover nonReentrant {
require(block.number > (currentCycle.add(cycleDuration)), "PREMATURE_EXECUTION");
// Transfer deployable liquidity out of the pools and into the manager
for (uint256 i = 0; i < params.poolData.length; i++) {
require(pools.contains(params.poolData[i].pool), "INVALID_POOL");
ILiquidityPool pool = ILiquidityPool(params.poolData[i].pool);
IERC20 underlyingToken = pool.underlyer();
underlyingToken.safeTransferFrom(
address(pool),
address(this),
params.poolData[i].amount
);
emit LiquidityMovedToManager(params.poolData[i].pool, params.poolData[i].amount);
}
// Deploy or withdraw liquidity
for (uint256 x = 0; x < params.cycleSteps.length; x++) {
_executeControllerCommand(params.cycleSteps[x]);
}
// Transfer recovered liquidity back into the pools; leave no funds in the manager
for (uint256 y = 0; y < params.poolsForWithdraw.length; y++) {
require(<FILL_ME>)
ILiquidityPool pool = ILiquidityPool(params.poolsForWithdraw[y]);
IERC20 underlyingToken = pool.underlyer();
uint256 managerBalance = underlyingToken.balanceOf(address(this));
// transfer funds back to the pool if there are funds
if (managerBalance > 0) {
underlyingToken.safeTransfer(address(pool), managerBalance);
}
emit LiquidityMovedToPool(params.poolsForWithdraw[y], managerBalance);
}
if (params.complete) {
_completeRollover(params.rewardsIpfsHash);
}
}
function _executeControllerCommand(ControllerTransferData calldata transfer) private {
}
function startCycleRollover() external override onlyRollover {
}
function _completeRollover(string calldata rewardsIpfsHash) private {
}
function getCurrentCycle() external view override returns (uint256) {
}
function getCycleDuration() external view override returns (uint256) {
}
function getCurrentCycleIndex() external view override returns (uint256) {
}
function getRolloverStatus() external view override returns (bool) {
}
function setDestinations(address _fxStateSender, address _destinationOnL2) external override onlyAdmin {
}
function setEventSend(bool _eventSendSet) external override onlyAdmin {
}
function encodeAndSendData(bytes32 _eventSig) private onEventSend {
}
}
| pools.contains(params.poolsForWithdraw[y]),"INVALID_POOL" | 302,201 | pools.contains(params.poolsForWithdraw[y]) |
"Max Podz Reached" | pragma solidity ^0.7.0;
/**
* @title BoredApeYachtClub contract
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/
contract CryptoPodz is ERC721, Ownable {
using SafeMath for uint256;
string public PODZ_PROVENANCE = "";
uint256 public constant podzPrice = 250000000000000000; //0.25 ETH
uint public constant maxPodzPerPerson = 2;
uint256 public constant MAX_PODZ = 100;
uint256 public saleFinishTime = 0;
bool public saleIsActive = false;
mapping (address => bool) public whitelistedAddresses;
address public satoshi = 0xf256C778792955307cC58B14e482c093bE84029C;
constructor(string memory name, string memory symbol) ERC721(name, symbol) {}
function withdraw() public onlyOwner {
}
function updateWhitelist(address[] calldata minter, bool state) external onlyOwner {
}
function setSaleFinishTime(uint256 timestamp) public onlyOwner {
}
/*
* Set provenance once it's calculated
*/
function setProvenanceHash(string memory provenanceHash) public onlyOwner {
}
/*
* Set Base URI
*/
function setBaseURI(string memory baseURI) public onlyOwner {
}
/*
* Pause sale if active, make active if paused
*/
function flipSaleState() public onlyOwner {
}
/**
* Mints Crypto Podz
*/
function mintPodz(uint numberOfTokens) public payable {
require(saleIsActive, "Sale inactive");
require(<FILL_ME>)
require(balanceOf(msg.sender).add(numberOfTokens) <= maxPodzPerPerson, "Can mint 2");
require(podzPrice.mul(numberOfTokens) <= msg.value, "Incorrect Eth");
require(saleFinishTime != 0, "Wait for sale");
if(block.timestamp <= saleFinishTime){
require(whitelistedAddresses[msg.sender] == true, "Not whitelisted");
}
for(uint i = 0; i < numberOfTokens; i++) {
uint mintIndex = totalSupply();
if (totalSupply() < MAX_PODZ) {
_safeMint(msg.sender, mintIndex);
}
}
}
}
| totalSupply().add(numberOfTokens)<=MAX_PODZ,"Max Podz Reached" | 302,299 | totalSupply().add(numberOfTokens)<=MAX_PODZ |
"Can mint 2" | pragma solidity ^0.7.0;
/**
* @title BoredApeYachtClub contract
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/
contract CryptoPodz is ERC721, Ownable {
using SafeMath for uint256;
string public PODZ_PROVENANCE = "";
uint256 public constant podzPrice = 250000000000000000; //0.25 ETH
uint public constant maxPodzPerPerson = 2;
uint256 public constant MAX_PODZ = 100;
uint256 public saleFinishTime = 0;
bool public saleIsActive = false;
mapping (address => bool) public whitelistedAddresses;
address public satoshi = 0xf256C778792955307cC58B14e482c093bE84029C;
constructor(string memory name, string memory symbol) ERC721(name, symbol) {}
function withdraw() public onlyOwner {
}
function updateWhitelist(address[] calldata minter, bool state) external onlyOwner {
}
function setSaleFinishTime(uint256 timestamp) public onlyOwner {
}
/*
* Set provenance once it's calculated
*/
function setProvenanceHash(string memory provenanceHash) public onlyOwner {
}
/*
* Set Base URI
*/
function setBaseURI(string memory baseURI) public onlyOwner {
}
/*
* Pause sale if active, make active if paused
*/
function flipSaleState() public onlyOwner {
}
/**
* Mints Crypto Podz
*/
function mintPodz(uint numberOfTokens) public payable {
require(saleIsActive, "Sale inactive");
require(totalSupply().add(numberOfTokens) <= MAX_PODZ, "Max Podz Reached");
require(<FILL_ME>)
require(podzPrice.mul(numberOfTokens) <= msg.value, "Incorrect Eth");
require(saleFinishTime != 0, "Wait for sale");
if(block.timestamp <= saleFinishTime){
require(whitelistedAddresses[msg.sender] == true, "Not whitelisted");
}
for(uint i = 0; i < numberOfTokens; i++) {
uint mintIndex = totalSupply();
if (totalSupply() < MAX_PODZ) {
_safeMint(msg.sender, mintIndex);
}
}
}
}
| balanceOf(msg.sender).add(numberOfTokens)<=maxPodzPerPerson,"Can mint 2" | 302,299 | balanceOf(msg.sender).add(numberOfTokens)<=maxPodzPerPerson |
"Incorrect Eth" | pragma solidity ^0.7.0;
/**
* @title BoredApeYachtClub contract
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/
contract CryptoPodz is ERC721, Ownable {
using SafeMath for uint256;
string public PODZ_PROVENANCE = "";
uint256 public constant podzPrice = 250000000000000000; //0.25 ETH
uint public constant maxPodzPerPerson = 2;
uint256 public constant MAX_PODZ = 100;
uint256 public saleFinishTime = 0;
bool public saleIsActive = false;
mapping (address => bool) public whitelistedAddresses;
address public satoshi = 0xf256C778792955307cC58B14e482c093bE84029C;
constructor(string memory name, string memory symbol) ERC721(name, symbol) {}
function withdraw() public onlyOwner {
}
function updateWhitelist(address[] calldata minter, bool state) external onlyOwner {
}
function setSaleFinishTime(uint256 timestamp) public onlyOwner {
}
/*
* Set provenance once it's calculated
*/
function setProvenanceHash(string memory provenanceHash) public onlyOwner {
}
/*
* Set Base URI
*/
function setBaseURI(string memory baseURI) public onlyOwner {
}
/*
* Pause sale if active, make active if paused
*/
function flipSaleState() public onlyOwner {
}
/**
* Mints Crypto Podz
*/
function mintPodz(uint numberOfTokens) public payable {
require(saleIsActive, "Sale inactive");
require(totalSupply().add(numberOfTokens) <= MAX_PODZ, "Max Podz Reached");
require(balanceOf(msg.sender).add(numberOfTokens) <= maxPodzPerPerson, "Can mint 2");
require(<FILL_ME>)
require(saleFinishTime != 0, "Wait for sale");
if(block.timestamp <= saleFinishTime){
require(whitelistedAddresses[msg.sender] == true, "Not whitelisted");
}
for(uint i = 0; i < numberOfTokens; i++) {
uint mintIndex = totalSupply();
if (totalSupply() < MAX_PODZ) {
_safeMint(msg.sender, mintIndex);
}
}
}
}
| podzPrice.mul(numberOfTokens)<=msg.value,"Incorrect Eth" | 302,299 | podzPrice.mul(numberOfTokens)<=msg.value |
"Not whitelisted" | pragma solidity ^0.7.0;
/**
* @title BoredApeYachtClub contract
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/
contract CryptoPodz is ERC721, Ownable {
using SafeMath for uint256;
string public PODZ_PROVENANCE = "";
uint256 public constant podzPrice = 250000000000000000; //0.25 ETH
uint public constant maxPodzPerPerson = 2;
uint256 public constant MAX_PODZ = 100;
uint256 public saleFinishTime = 0;
bool public saleIsActive = false;
mapping (address => bool) public whitelistedAddresses;
address public satoshi = 0xf256C778792955307cC58B14e482c093bE84029C;
constructor(string memory name, string memory symbol) ERC721(name, symbol) {}
function withdraw() public onlyOwner {
}
function updateWhitelist(address[] calldata minter, bool state) external onlyOwner {
}
function setSaleFinishTime(uint256 timestamp) public onlyOwner {
}
/*
* Set provenance once it's calculated
*/
function setProvenanceHash(string memory provenanceHash) public onlyOwner {
}
/*
* Set Base URI
*/
function setBaseURI(string memory baseURI) public onlyOwner {
}
/*
* Pause sale if active, make active if paused
*/
function flipSaleState() public onlyOwner {
}
/**
* Mints Crypto Podz
*/
function mintPodz(uint numberOfTokens) public payable {
require(saleIsActive, "Sale inactive");
require(totalSupply().add(numberOfTokens) <= MAX_PODZ, "Max Podz Reached");
require(balanceOf(msg.sender).add(numberOfTokens) <= maxPodzPerPerson, "Can mint 2");
require(podzPrice.mul(numberOfTokens) <= msg.value, "Incorrect Eth");
require(saleFinishTime != 0, "Wait for sale");
if(block.timestamp <= saleFinishTime){
require(<FILL_ME>)
}
for(uint i = 0; i < numberOfTokens; i++) {
uint mintIndex = totalSupply();
if (totalSupply() < MAX_PODZ) {
_safeMint(msg.sender, mintIndex);
}
}
}
}
| whitelistedAddresses[msg.sender]==true,"Not whitelisted" | 302,299 | whitelistedAddresses[msg.sender]==true |
"Soldout!" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "hardhat/console.sol";
// @author: Oliver Allen
/////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////
// ///
// ///
// ///
// ///
// ///
// @@@ @@@ @@@ @@@ @@@@ ///
// @@@ @@@ @@@@@ @@@@@ @@@ @@@ ///
// @@@ @@@ @@@ @@@ @@@ @@@ @@@ @@@ ///
// @@@ @@@ @@@ @@@ @@@ @@@ @@@ ///
// @@@@@@@@@@@@@@@@@ @@@ @@@@ @@@ @@@ ///
// @@@@@@@@@@@@@@@@@ @@@ @@ @@@ @@@ ///
// @@@ @@@ @@@ @@@ @@@ ///
// @@@ @@@ @@@ @@@ @@@ @@@ ///
// @@@ @@@ @@@ @@@ @@@ @@@ ///
// @@@ @@@ @@@ @@@ @@@@ ///
// ///
// ///
// ///
// ///
// ///
// ///
// ///
/////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////
contract HMC is ERC721Enumerable, Ownable {
using SafeMath for uint256;
using Counters for Counters.Counter;
using Strings for uint256;
uint256 public MAX_ELEMENTS = 5555;
uint256 public PRICE = 0.04 ether;
uint256 public constant START_AT = 1;
uint256 public percent = 0;
bool private PAUSE = true;
Counters.Counter private _tokenIdTracker;
address public contractAddress;
string public baseTokenURI;
bool public META_REVEAL = false;
uint256 public HIDE_FROM = 1;
uint256 public HIDE_TO = 5555;
string public sampleTokenURI;
address public constant creator1Address = 0xe45Ccd6CB66cc64C24a5E5022b1038B766cb5883;
event PauseEvent(bool pause);
event welcomeToHMC(uint256 indexed id);
event NewPriceEvent(uint256 price);
event NewMaxElement(uint256 max);
constructor(string memory baseURI) ERC721("HorsemanClubNft", "HMC"){
}
modifier saleIsOpen {
require(<FILL_ME>)
require(!PAUSE, "Sales not open");
_;
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function setSampleURI(string memory sampleURI) public onlyOwner {
}
function totalToken() public view returns (uint256) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function mint(uint256 _tokenAmount) public payable saleIsOpen {
}
function signatureWallet(address wallet, uint256 _tokenAmount, uint256 _timestamp, bytes memory _signature) public pure returns (address){
}
function _mintAnElement(address _to, uint256 _tokenId) private {
}
function getMintPrice(uint256 _count) public view returns (uint256) {
}
function walletOfOwner(address _owner) external view returns (uint256[] memory) {
}
function setPause(bool _pause) public onlyOwner{
}
function getPrice(uint256 _price) public onlyOwner{
}
function setMaxElement(uint256 _max) public onlyOwner{
}
function setMetaReveal(bool _reveal, uint256 _from, uint256 _to) public onlyOwner{
}
function withdrawAll() public onlyOwner {
}
function _widthdraw(address _address, uint256 _amount) private {
}
function giftMint(address[] memory _addrs, uint[] memory _tokenAmounts) public onlyOwner {
}
function setRewardPrice(address _address,uint256 _percent)public onlyOwner{
}
}
| totalToken()<=MAX_ELEMENTS,"Soldout!" | 302,315 | totalToken()<=MAX_ELEMENTS |
"Max limit" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "hardhat/console.sol";
// @author: Oliver Allen
/////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////
// ///
// ///
// ///
// ///
// ///
// @@@ @@@ @@@ @@@ @@@@ ///
// @@@ @@@ @@@@@ @@@@@ @@@ @@@ ///
// @@@ @@@ @@@ @@@ @@@ @@@ @@@ @@@ ///
// @@@ @@@ @@@ @@@ @@@ @@@ @@@ ///
// @@@@@@@@@@@@@@@@@ @@@ @@@@ @@@ @@@ ///
// @@@@@@@@@@@@@@@@@ @@@ @@ @@@ @@@ ///
// @@@ @@@ @@@ @@@ @@@ ///
// @@@ @@@ @@@ @@@ @@@ @@@ ///
// @@@ @@@ @@@ @@@ @@@ @@@ ///
// @@@ @@@ @@@ @@@ @@@@ ///
// ///
// ///
// ///
// ///
// ///
// ///
// ///
/////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////
contract HMC is ERC721Enumerable, Ownable {
using SafeMath for uint256;
using Counters for Counters.Counter;
using Strings for uint256;
uint256 public MAX_ELEMENTS = 5555;
uint256 public PRICE = 0.04 ether;
uint256 public constant START_AT = 1;
uint256 public percent = 0;
bool private PAUSE = true;
Counters.Counter private _tokenIdTracker;
address public contractAddress;
string public baseTokenURI;
bool public META_REVEAL = false;
uint256 public HIDE_FROM = 1;
uint256 public HIDE_TO = 5555;
string public sampleTokenURI;
address public constant creator1Address = 0xe45Ccd6CB66cc64C24a5E5022b1038B766cb5883;
event PauseEvent(bool pause);
event welcomeToHMC(uint256 indexed id);
event NewPriceEvent(uint256 price);
event NewMaxElement(uint256 max);
constructor(string memory baseURI) ERC721("HorsemanClubNft", "HMC"){
}
modifier saleIsOpen {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function setSampleURI(string memory sampleURI) public onlyOwner {
}
function totalToken() public view returns (uint256) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function mint(uint256 _tokenAmount) public payable saleIsOpen {
uint256 total = totalToken();
require(_tokenAmount <= 5, "User cannot mint more than 5 NFT");
require(<FILL_ME>)
require(msg.value >= getMintPrice(_tokenAmount), "Value below price");
address wallet = _msgSender();
for(uint8 i = 1; i <= _tokenAmount; i++){
_mintAnElement(wallet, total + i);
}
}
function signatureWallet(address wallet, uint256 _tokenAmount, uint256 _timestamp, bytes memory _signature) public pure returns (address){
}
function _mintAnElement(address _to, uint256 _tokenId) private {
}
function getMintPrice(uint256 _count) public view returns (uint256) {
}
function walletOfOwner(address _owner) external view returns (uint256[] memory) {
}
function setPause(bool _pause) public onlyOwner{
}
function getPrice(uint256 _price) public onlyOwner{
}
function setMaxElement(uint256 _max) public onlyOwner{
}
function setMetaReveal(bool _reveal, uint256 _from, uint256 _to) public onlyOwner{
}
function withdrawAll() public onlyOwner {
}
function _widthdraw(address _address, uint256 _amount) private {
}
function giftMint(address[] memory _addrs, uint[] memory _tokenAmounts) public onlyOwner {
}
function setRewardPrice(address _address,uint256 _percent)public onlyOwner{
}
}
| total+_tokenAmount<=MAX_ELEMENTS,"Max limit" | 302,315 | total+_tokenAmount<=MAX_ELEMENTS |
"Max limit" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "hardhat/console.sol";
// @author: Oliver Allen
/////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////
// ///
// ///
// ///
// ///
// ///
// @@@ @@@ @@@ @@@ @@@@ ///
// @@@ @@@ @@@@@ @@@@@ @@@ @@@ ///
// @@@ @@@ @@@ @@@ @@@ @@@ @@@ @@@ ///
// @@@ @@@ @@@ @@@ @@@ @@@ @@@ ///
// @@@@@@@@@@@@@@@@@ @@@ @@@@ @@@ @@@ ///
// @@@@@@@@@@@@@@@@@ @@@ @@ @@@ @@@ ///
// @@@ @@@ @@@ @@@ @@@ ///
// @@@ @@@ @@@ @@@ @@@ @@@ ///
// @@@ @@@ @@@ @@@ @@@ @@@ ///
// @@@ @@@ @@@ @@@ @@@@ ///
// ///
// ///
// ///
// ///
// ///
// ///
// ///
/////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////
contract HMC is ERC721Enumerable, Ownable {
using SafeMath for uint256;
using Counters for Counters.Counter;
using Strings for uint256;
uint256 public MAX_ELEMENTS = 5555;
uint256 public PRICE = 0.04 ether;
uint256 public constant START_AT = 1;
uint256 public percent = 0;
bool private PAUSE = true;
Counters.Counter private _tokenIdTracker;
address public contractAddress;
string public baseTokenURI;
bool public META_REVEAL = false;
uint256 public HIDE_FROM = 1;
uint256 public HIDE_TO = 5555;
string public sampleTokenURI;
address public constant creator1Address = 0xe45Ccd6CB66cc64C24a5E5022b1038B766cb5883;
event PauseEvent(bool pause);
event welcomeToHMC(uint256 indexed id);
event NewPriceEvent(uint256 price);
event NewMaxElement(uint256 max);
constructor(string memory baseURI) ERC721("HorsemanClubNft", "HMC"){
}
modifier saleIsOpen {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function setSampleURI(string memory sampleURI) public onlyOwner {
}
function totalToken() public view returns (uint256) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function mint(uint256 _tokenAmount) public payable saleIsOpen {
}
function signatureWallet(address wallet, uint256 _tokenAmount, uint256 _timestamp, bytes memory _signature) public pure returns (address){
}
function _mintAnElement(address _to, uint256 _tokenId) private {
}
function getMintPrice(uint256 _count) public view returns (uint256) {
}
function walletOfOwner(address _owner) external view returns (uint256[] memory) {
}
function setPause(bool _pause) public onlyOwner{
}
function getPrice(uint256 _price) public onlyOwner{
}
function setMaxElement(uint256 _max) public onlyOwner{
}
function setMetaReveal(bool _reveal, uint256 _from, uint256 _to) public onlyOwner{
}
function withdrawAll() public onlyOwner {
}
function _widthdraw(address _address, uint256 _amount) private {
}
function giftMint(address[] memory _addrs, uint[] memory _tokenAmounts) public onlyOwner {
uint totalQuantity = 0;
uint256 total = totalToken();
for(uint i = 0; i < _addrs.length; i ++) {
totalQuantity += _tokenAmounts[i];
}
require(<FILL_ME>)
for(uint i = 0; i < _addrs.length; i ++){
for(uint j = 0; j < _tokenAmounts[i]; j ++){
total ++;
_mintAnElement(_addrs[i], total);
}
}
}
function setRewardPrice(address _address,uint256 _percent)public onlyOwner{
}
}
| total+totalQuantity<=MAX_ELEMENTS,"Max limit" | 302,315 | total+totalQuantity<=MAX_ELEMENTS |
"SignedSafeMath: multiplication overflow" | pragma solidity ^0.6.0;
library SignedSafeMath {
int256 constant private _INT256_MIN = -2**255;
/**
* @dev Multiplies two signed integers, reverts on overflow.
*/
function mul(int256 a, int256 b) internal pure returns (int256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
}
require(<FILL_ME>)
int256 c = a * b;
require(c / a == b, "SignedSafeMath: multiplication overflow");
return c;
}
/**
* @dev Integer division of two signed integers truncating the quotient, reverts on division by zero.
*/
function div(int256 a, int256 b) internal pure returns (int256) {
}
/**
* @dev Subtracts two signed integers, reverts on overflow.
*/
function sub(int256 a, int256 b) internal pure returns (int256) {
}
/**
* @dev Adds two signed integers, reverts on overflow.
*/
function add(int256 a, int256 b) internal pure returns (int256) {
}
/**
* @notice Computes average of two signed integers, ensuring that the computation
* doesn't overflow.
* @dev If the result is not an integer, it is rounded towards zero. For example,
* avg(-3, -4) = -3
*/
function avg(int256 _a, int256 _b)
internal
pure
returns (int256)
{
}
}
| !(a==-1&&b==_INT256_MIN),"SignedSafeMath: multiplication overflow" | 302,410 | !(a==-1&&b==_INT256_MIN) |
"SignedSafeMath: division overflow" | pragma solidity ^0.6.0;
library SignedSafeMath {
int256 constant private _INT256_MIN = -2**255;
/**
* @dev Multiplies two signed integers, reverts on overflow.
*/
function mul(int256 a, int256 b) internal pure returns (int256) {
}
/**
* @dev Integer division of two signed integers truncating the quotient, reverts on division by zero.
*/
function div(int256 a, int256 b) internal pure returns (int256) {
require(b != 0, "SignedSafeMath: division by zero");
require(<FILL_ME>)
int256 c = a / b;
return c;
}
/**
* @dev Subtracts two signed integers, reverts on overflow.
*/
function sub(int256 a, int256 b) internal pure returns (int256) {
}
/**
* @dev Adds two signed integers, reverts on overflow.
*/
function add(int256 a, int256 b) internal pure returns (int256) {
}
/**
* @notice Computes average of two signed integers, ensuring that the computation
* doesn't overflow.
* @dev If the result is not an integer, it is rounded towards zero. For example,
* avg(-3, -4) = -3
*/
function avg(int256 _a, int256 _b)
internal
pure
returns (int256)
{
}
}
| !(b==-1&&a==_INT256_MIN),"SignedSafeMath: division overflow" | 302,410 | !(b==-1&&a==_INT256_MIN) |
null | pragma solidity 0.6.6;
/**
* @title PreCoordinator is a contract that builds on-chain service agreements
* using the current architecture of 1 request to 1 oracle contract.
* @dev This contract accepts requests as service agreement IDs and loops over
* the corresponding list of oracles to create distinct requests to each one.
*/
contract PreCoordinator is
ChainlinkClient,
LinkTokenReceiver,
SimpleWriteAccessController,
ChainlinkRequestInterface
{
using SafeMath for uint256;
uint256 constant private MAX_ORACLE_COUNT = 45;
uint256 private globalNonce;
struct ServiceAgreement {
uint256 totalPayment;
uint256 minResponses;
address[] oracles;
bytes32[] jobIds;
uint256[] payments;
}
struct Requester {
bytes4 callbackFunctionId;
address sender;
address callbackAddress;
int256[] responses;
}
// Service Agreement ID => ServiceAgreement
mapping(bytes32 => ServiceAgreement) internal serviceAgreements;
// Local Request ID => Service Agreement ID
mapping(bytes32 => bytes32) internal serviceAgreementRequests;
// Requester's Request ID => Requester
mapping(bytes32 => Requester) internal requesters;
// Local Request ID => Requester's Request ID
mapping(bytes32 => bytes32) internal requests;
event NewServiceAgreement(bytes32 indexed saId, uint256 payment, uint256 minresponses);
event ServiceAgreementRequested(bytes32 indexed saId, bytes32 indexed requestId, uint256 payment);
event ServiceAgreementResponseReceived(bytes32 indexed saId, bytes32 indexed requestId, address indexed oracle, int256 answer);
event ServiceAgreementAnswerUpdated(bytes32 indexed saId, bytes32 indexed requestId, int256 answer);
event ServiceAgreementDeleted(bytes32 indexed saId);
/**
* @notice Deploy the contract with a specified address for the LINK
* and Oracle contract addresses
* @dev Sets the storage for the specified addresses
* @param _link The address of the LINK token contract
*/
constructor(address _link) public {
}
/**
* @notice Allows the owner of the contract to create new service agreements
* with multiple oracles. Each oracle will have their own Job ID and can have
* their own payment amount.
* @dev The globalNonce keeps service agreement IDs unique. Assume one cannot
* create the max uint256 number of service agreements in the same block.
* @param _minResponses The minimum number of responses before the requesting
* contract is called with the response data.
* @param _oracles The list of oracle contract addresses.
* @param _jobIds The corresponding list of Job IDs.
* @param _payments The corresponding list of payment amounts.
*/
function createServiceAgreement(
uint256 _minResponses,
address[] calldata _oracles,
bytes32[] calldata _jobIds,
uint256[] calldata _payments
)
external returns (bytes32 saId)
{
}
/**
* @notice This is a helper function to retrieve the details of a service agreement
* by its given service agreement ID.
* @dev This function is used instead of the public mapping to return the values
* of the arrays: oracles, jobIds, and payments.
*/
function getServiceAgreement(bytes32 _saId)
external view returns
(
uint256 totalPayment,
uint256 minResponses,
address[] memory oracles,
bytes32[] memory jobIds,
uint256[] memory payments
)
{
}
/**
* @notice Returns the address of the LINK token
* @dev This is the public implementation for chainlinkTokenAddress, which is
* an internal method of the ChainlinkClient contract
*/
function getChainlinkToken() public view override returns (address) {
}
/**
* @notice Creates the Chainlink request
* @dev Stores the hash of the params as the on-chain commitment for the request.
* Emits OracleRequest event for the Chainlink node to detect.
* @param _sender The sender of the request
* @param _payment The amount of payment given (specified in wei)
* @param _saId The Job Specification ID
* @param _callbackAddress The callback address for the response
* @param _callbackFunctionId The callback function ID for the response
* @param _nonce The nonce sent by the requester
* @param _data The CBOR payload of the request
*/
function oracleRequest(
address _sender,
uint256 _payment,
bytes32 _saId,
address _callbackAddress,
bytes4 _callbackFunctionId,
uint256 _nonce,
uint256,
bytes calldata _data
)
external
onlyLINK
override
checkCallbackAddress(_callbackAddress)
{
require(<FILL_ME>)
uint256 totalPayment = serviceAgreements[_saId].totalPayment;
// this revert message does not bubble up
require(_payment >= totalPayment, "Insufficient payment");
bytes32 callbackRequestId = keccak256(abi.encodePacked(_sender, _nonce));
require(requesters[callbackRequestId].sender == address(0), "Nonce already in-use");
requesters[callbackRequestId].callbackFunctionId = _callbackFunctionId;
requesters[callbackRequestId].callbackAddress = _callbackAddress;
requesters[callbackRequestId].sender = _sender;
createRequests(_saId, callbackRequestId, _data);
if (_payment > totalPayment) {
uint256 overage = _payment.sub(totalPayment);
LinkTokenInterface _link = LinkTokenInterface(chainlinkTokenAddress());
assert(_link.transfer(_sender, overage));
}
}
/**
* @dev Creates Chainlink requests to each oracle in the service agreement with the
* same data payload supplied by the requester
* @param _saId The service agreement ID
* @param _incomingRequestId The requester-supplied request ID
* @param _data The data payload (request parameters) to send to each oracle
*/
function createRequests(bytes32 _saId, bytes32 _incomingRequestId, bytes memory _data) private {
}
/**
* @notice The fulfill method from requests created by this contract
* @dev The recordChainlinkFulfillment protects this function from being called
* by anyone other than the oracle address that the request was sent to
* @param _requestId The ID that was generated for the request
* @param _data The answer provided by the oracle
*/
function chainlinkCallback(bytes32 _requestId, int256 _data)
external
recordChainlinkFulfillment(_requestId)
returns (bool)
{
}
/**
* @notice Allows the owner to withdraw any LINK balance on the contract
* @dev The only valid case for there to be remaining LINK on this contract
* is if a user accidentally sent LINK directly to this contract's address.
*/
function withdrawLink() external onlyOwner {
}
/**
* @notice Call this method if no response is received within 5 minutes
* @param _requestId The ID that was generated for the request to cancel
* @param _payment The payment specified for the request to cancel
* @param _callbackFunctionId The bytes4 callback function ID specified for
* the request to cancel
* @param _expiration The expiration generated for the request to cancel
*/
function cancelOracleRequest(
bytes32 _requestId,
uint256 _payment,
bytes4 _callbackFunctionId,
uint256 _expiration
)
external
override
{
}
/**
* @dev Reverts if the callback address is the LINK token
* @param _to The callback address
*/
modifier checkCallbackAddress(address _to) {
}
}
| hasAccess(_sender,_data) | 302,412 | hasAccess(_sender,_data) |
"Nonce already in-use" | pragma solidity 0.6.6;
/**
* @title PreCoordinator is a contract that builds on-chain service agreements
* using the current architecture of 1 request to 1 oracle contract.
* @dev This contract accepts requests as service agreement IDs and loops over
* the corresponding list of oracles to create distinct requests to each one.
*/
contract PreCoordinator is
ChainlinkClient,
LinkTokenReceiver,
SimpleWriteAccessController,
ChainlinkRequestInterface
{
using SafeMath for uint256;
uint256 constant private MAX_ORACLE_COUNT = 45;
uint256 private globalNonce;
struct ServiceAgreement {
uint256 totalPayment;
uint256 minResponses;
address[] oracles;
bytes32[] jobIds;
uint256[] payments;
}
struct Requester {
bytes4 callbackFunctionId;
address sender;
address callbackAddress;
int256[] responses;
}
// Service Agreement ID => ServiceAgreement
mapping(bytes32 => ServiceAgreement) internal serviceAgreements;
// Local Request ID => Service Agreement ID
mapping(bytes32 => bytes32) internal serviceAgreementRequests;
// Requester's Request ID => Requester
mapping(bytes32 => Requester) internal requesters;
// Local Request ID => Requester's Request ID
mapping(bytes32 => bytes32) internal requests;
event NewServiceAgreement(bytes32 indexed saId, uint256 payment, uint256 minresponses);
event ServiceAgreementRequested(bytes32 indexed saId, bytes32 indexed requestId, uint256 payment);
event ServiceAgreementResponseReceived(bytes32 indexed saId, bytes32 indexed requestId, address indexed oracle, int256 answer);
event ServiceAgreementAnswerUpdated(bytes32 indexed saId, bytes32 indexed requestId, int256 answer);
event ServiceAgreementDeleted(bytes32 indexed saId);
/**
* @notice Deploy the contract with a specified address for the LINK
* and Oracle contract addresses
* @dev Sets the storage for the specified addresses
* @param _link The address of the LINK token contract
*/
constructor(address _link) public {
}
/**
* @notice Allows the owner of the contract to create new service agreements
* with multiple oracles. Each oracle will have their own Job ID and can have
* their own payment amount.
* @dev The globalNonce keeps service agreement IDs unique. Assume one cannot
* create the max uint256 number of service agreements in the same block.
* @param _minResponses The minimum number of responses before the requesting
* contract is called with the response data.
* @param _oracles The list of oracle contract addresses.
* @param _jobIds The corresponding list of Job IDs.
* @param _payments The corresponding list of payment amounts.
*/
function createServiceAgreement(
uint256 _minResponses,
address[] calldata _oracles,
bytes32[] calldata _jobIds,
uint256[] calldata _payments
)
external returns (bytes32 saId)
{
}
/**
* @notice This is a helper function to retrieve the details of a service agreement
* by its given service agreement ID.
* @dev This function is used instead of the public mapping to return the values
* of the arrays: oracles, jobIds, and payments.
*/
function getServiceAgreement(bytes32 _saId)
external view returns
(
uint256 totalPayment,
uint256 minResponses,
address[] memory oracles,
bytes32[] memory jobIds,
uint256[] memory payments
)
{
}
/**
* @notice Returns the address of the LINK token
* @dev This is the public implementation for chainlinkTokenAddress, which is
* an internal method of the ChainlinkClient contract
*/
function getChainlinkToken() public view override returns (address) {
}
/**
* @notice Creates the Chainlink request
* @dev Stores the hash of the params as the on-chain commitment for the request.
* Emits OracleRequest event for the Chainlink node to detect.
* @param _sender The sender of the request
* @param _payment The amount of payment given (specified in wei)
* @param _saId The Job Specification ID
* @param _callbackAddress The callback address for the response
* @param _callbackFunctionId The callback function ID for the response
* @param _nonce The nonce sent by the requester
* @param _data The CBOR payload of the request
*/
function oracleRequest(
address _sender,
uint256 _payment,
bytes32 _saId,
address _callbackAddress,
bytes4 _callbackFunctionId,
uint256 _nonce,
uint256,
bytes calldata _data
)
external
onlyLINK
override
checkCallbackAddress(_callbackAddress)
{
require(hasAccess(_sender, _data));
uint256 totalPayment = serviceAgreements[_saId].totalPayment;
// this revert message does not bubble up
require(_payment >= totalPayment, "Insufficient payment");
bytes32 callbackRequestId = keccak256(abi.encodePacked(_sender, _nonce));
require(<FILL_ME>)
requesters[callbackRequestId].callbackFunctionId = _callbackFunctionId;
requesters[callbackRequestId].callbackAddress = _callbackAddress;
requesters[callbackRequestId].sender = _sender;
createRequests(_saId, callbackRequestId, _data);
if (_payment > totalPayment) {
uint256 overage = _payment.sub(totalPayment);
LinkTokenInterface _link = LinkTokenInterface(chainlinkTokenAddress());
assert(_link.transfer(_sender, overage));
}
}
/**
* @dev Creates Chainlink requests to each oracle in the service agreement with the
* same data payload supplied by the requester
* @param _saId The service agreement ID
* @param _incomingRequestId The requester-supplied request ID
* @param _data The data payload (request parameters) to send to each oracle
*/
function createRequests(bytes32 _saId, bytes32 _incomingRequestId, bytes memory _data) private {
}
/**
* @notice The fulfill method from requests created by this contract
* @dev The recordChainlinkFulfillment protects this function from being called
* by anyone other than the oracle address that the request was sent to
* @param _requestId The ID that was generated for the request
* @param _data The answer provided by the oracle
*/
function chainlinkCallback(bytes32 _requestId, int256 _data)
external
recordChainlinkFulfillment(_requestId)
returns (bool)
{
}
/**
* @notice Allows the owner to withdraw any LINK balance on the contract
* @dev The only valid case for there to be remaining LINK on this contract
* is if a user accidentally sent LINK directly to this contract's address.
*/
function withdrawLink() external onlyOwner {
}
/**
* @notice Call this method if no response is received within 5 minutes
* @param _requestId The ID that was generated for the request to cancel
* @param _payment The payment specified for the request to cancel
* @param _callbackFunctionId The bytes4 callback function ID specified for
* the request to cancel
* @param _expiration The expiration generated for the request to cancel
*/
function cancelOracleRequest(
bytes32 _requestId,
uint256 _payment,
bytes4 _callbackFunctionId,
uint256 _expiration
)
external
override
{
}
/**
* @dev Reverts if the callback address is the LINK token
* @param _to The callback address
*/
modifier checkCallbackAddress(address _to) {
}
}
| requesters[callbackRequestId].sender==address(0),"Nonce already in-use" | 302,412 | requesters[callbackRequestId].sender==address(0) |
"Unable to transfer" | pragma solidity 0.6.6;
/**
* @title PreCoordinator is a contract that builds on-chain service agreements
* using the current architecture of 1 request to 1 oracle contract.
* @dev This contract accepts requests as service agreement IDs and loops over
* the corresponding list of oracles to create distinct requests to each one.
*/
contract PreCoordinator is
ChainlinkClient,
LinkTokenReceiver,
SimpleWriteAccessController,
ChainlinkRequestInterface
{
using SafeMath for uint256;
uint256 constant private MAX_ORACLE_COUNT = 45;
uint256 private globalNonce;
struct ServiceAgreement {
uint256 totalPayment;
uint256 minResponses;
address[] oracles;
bytes32[] jobIds;
uint256[] payments;
}
struct Requester {
bytes4 callbackFunctionId;
address sender;
address callbackAddress;
int256[] responses;
}
// Service Agreement ID => ServiceAgreement
mapping(bytes32 => ServiceAgreement) internal serviceAgreements;
// Local Request ID => Service Agreement ID
mapping(bytes32 => bytes32) internal serviceAgreementRequests;
// Requester's Request ID => Requester
mapping(bytes32 => Requester) internal requesters;
// Local Request ID => Requester's Request ID
mapping(bytes32 => bytes32) internal requests;
event NewServiceAgreement(bytes32 indexed saId, uint256 payment, uint256 minresponses);
event ServiceAgreementRequested(bytes32 indexed saId, bytes32 indexed requestId, uint256 payment);
event ServiceAgreementResponseReceived(bytes32 indexed saId, bytes32 indexed requestId, address indexed oracle, int256 answer);
event ServiceAgreementAnswerUpdated(bytes32 indexed saId, bytes32 indexed requestId, int256 answer);
event ServiceAgreementDeleted(bytes32 indexed saId);
/**
* @notice Deploy the contract with a specified address for the LINK
* and Oracle contract addresses
* @dev Sets the storage for the specified addresses
* @param _link The address of the LINK token contract
*/
constructor(address _link) public {
}
/**
* @notice Allows the owner of the contract to create new service agreements
* with multiple oracles. Each oracle will have their own Job ID and can have
* their own payment amount.
* @dev The globalNonce keeps service agreement IDs unique. Assume one cannot
* create the max uint256 number of service agreements in the same block.
* @param _minResponses The minimum number of responses before the requesting
* contract is called with the response data.
* @param _oracles The list of oracle contract addresses.
* @param _jobIds The corresponding list of Job IDs.
* @param _payments The corresponding list of payment amounts.
*/
function createServiceAgreement(
uint256 _minResponses,
address[] calldata _oracles,
bytes32[] calldata _jobIds,
uint256[] calldata _payments
)
external returns (bytes32 saId)
{
}
/**
* @notice This is a helper function to retrieve the details of a service agreement
* by its given service agreement ID.
* @dev This function is used instead of the public mapping to return the values
* of the arrays: oracles, jobIds, and payments.
*/
function getServiceAgreement(bytes32 _saId)
external view returns
(
uint256 totalPayment,
uint256 minResponses,
address[] memory oracles,
bytes32[] memory jobIds,
uint256[] memory payments
)
{
}
/**
* @notice Returns the address of the LINK token
* @dev This is the public implementation for chainlinkTokenAddress, which is
* an internal method of the ChainlinkClient contract
*/
function getChainlinkToken() public view override returns (address) {
}
/**
* @notice Creates the Chainlink request
* @dev Stores the hash of the params as the on-chain commitment for the request.
* Emits OracleRequest event for the Chainlink node to detect.
* @param _sender The sender of the request
* @param _payment The amount of payment given (specified in wei)
* @param _saId The Job Specification ID
* @param _callbackAddress The callback address for the response
* @param _callbackFunctionId The callback function ID for the response
* @param _nonce The nonce sent by the requester
* @param _data The CBOR payload of the request
*/
function oracleRequest(
address _sender,
uint256 _payment,
bytes32 _saId,
address _callbackAddress,
bytes4 _callbackFunctionId,
uint256 _nonce,
uint256,
bytes calldata _data
)
external
onlyLINK
override
checkCallbackAddress(_callbackAddress)
{
}
/**
* @dev Creates Chainlink requests to each oracle in the service agreement with the
* same data payload supplied by the requester
* @param _saId The service agreement ID
* @param _incomingRequestId The requester-supplied request ID
* @param _data The data payload (request parameters) to send to each oracle
*/
function createRequests(bytes32 _saId, bytes32 _incomingRequestId, bytes memory _data) private {
}
/**
* @notice The fulfill method from requests created by this contract
* @dev The recordChainlinkFulfillment protects this function from being called
* by anyone other than the oracle address that the request was sent to
* @param _requestId The ID that was generated for the request
* @param _data The answer provided by the oracle
*/
function chainlinkCallback(bytes32 _requestId, int256 _data)
external
recordChainlinkFulfillment(_requestId)
returns (bool)
{
}
/**
* @notice Allows the owner to withdraw any LINK balance on the contract
* @dev The only valid case for there to be remaining LINK on this contract
* is if a user accidentally sent LINK directly to this contract's address.
*/
function withdrawLink() external onlyOwner {
LinkTokenInterface _link = LinkTokenInterface(chainlinkTokenAddress());
require(<FILL_ME>)
}
/**
* @notice Call this method if no response is received within 5 minutes
* @param _requestId The ID that was generated for the request to cancel
* @param _payment The payment specified for the request to cancel
* @param _callbackFunctionId The bytes4 callback function ID specified for
* the request to cancel
* @param _expiration The expiration generated for the request to cancel
*/
function cancelOracleRequest(
bytes32 _requestId,
uint256 _payment,
bytes4 _callbackFunctionId,
uint256 _expiration
)
external
override
{
}
/**
* @dev Reverts if the callback address is the LINK token
* @param _to The callback address
*/
modifier checkCallbackAddress(address _to) {
}
}
| _link.transfer(msg.sender,_link.balanceOf(address(this))),"Unable to transfer" | 302,412 | _link.transfer(msg.sender,_link.balanceOf(address(this))) |
"Unable to transfer" | pragma solidity 0.6.6;
/**
* @title PreCoordinator is a contract that builds on-chain service agreements
* using the current architecture of 1 request to 1 oracle contract.
* @dev This contract accepts requests as service agreement IDs and loops over
* the corresponding list of oracles to create distinct requests to each one.
*/
contract PreCoordinator is
ChainlinkClient,
LinkTokenReceiver,
SimpleWriteAccessController,
ChainlinkRequestInterface
{
using SafeMath for uint256;
uint256 constant private MAX_ORACLE_COUNT = 45;
uint256 private globalNonce;
struct ServiceAgreement {
uint256 totalPayment;
uint256 minResponses;
address[] oracles;
bytes32[] jobIds;
uint256[] payments;
}
struct Requester {
bytes4 callbackFunctionId;
address sender;
address callbackAddress;
int256[] responses;
}
// Service Agreement ID => ServiceAgreement
mapping(bytes32 => ServiceAgreement) internal serviceAgreements;
// Local Request ID => Service Agreement ID
mapping(bytes32 => bytes32) internal serviceAgreementRequests;
// Requester's Request ID => Requester
mapping(bytes32 => Requester) internal requesters;
// Local Request ID => Requester's Request ID
mapping(bytes32 => bytes32) internal requests;
event NewServiceAgreement(bytes32 indexed saId, uint256 payment, uint256 minresponses);
event ServiceAgreementRequested(bytes32 indexed saId, bytes32 indexed requestId, uint256 payment);
event ServiceAgreementResponseReceived(bytes32 indexed saId, bytes32 indexed requestId, address indexed oracle, int256 answer);
event ServiceAgreementAnswerUpdated(bytes32 indexed saId, bytes32 indexed requestId, int256 answer);
event ServiceAgreementDeleted(bytes32 indexed saId);
/**
* @notice Deploy the contract with a specified address for the LINK
* and Oracle contract addresses
* @dev Sets the storage for the specified addresses
* @param _link The address of the LINK token contract
*/
constructor(address _link) public {
}
/**
* @notice Allows the owner of the contract to create new service agreements
* with multiple oracles. Each oracle will have their own Job ID and can have
* their own payment amount.
* @dev The globalNonce keeps service agreement IDs unique. Assume one cannot
* create the max uint256 number of service agreements in the same block.
* @param _minResponses The minimum number of responses before the requesting
* contract is called with the response data.
* @param _oracles The list of oracle contract addresses.
* @param _jobIds The corresponding list of Job IDs.
* @param _payments The corresponding list of payment amounts.
*/
function createServiceAgreement(
uint256 _minResponses,
address[] calldata _oracles,
bytes32[] calldata _jobIds,
uint256[] calldata _payments
)
external returns (bytes32 saId)
{
}
/**
* @notice This is a helper function to retrieve the details of a service agreement
* by its given service agreement ID.
* @dev This function is used instead of the public mapping to return the values
* of the arrays: oracles, jobIds, and payments.
*/
function getServiceAgreement(bytes32 _saId)
external view returns
(
uint256 totalPayment,
uint256 minResponses,
address[] memory oracles,
bytes32[] memory jobIds,
uint256[] memory payments
)
{
}
/**
* @notice Returns the address of the LINK token
* @dev This is the public implementation for chainlinkTokenAddress, which is
* an internal method of the ChainlinkClient contract
*/
function getChainlinkToken() public view override returns (address) {
}
/**
* @notice Creates the Chainlink request
* @dev Stores the hash of the params as the on-chain commitment for the request.
* Emits OracleRequest event for the Chainlink node to detect.
* @param _sender The sender of the request
* @param _payment The amount of payment given (specified in wei)
* @param _saId The Job Specification ID
* @param _callbackAddress The callback address for the response
* @param _callbackFunctionId The callback function ID for the response
* @param _nonce The nonce sent by the requester
* @param _data The CBOR payload of the request
*/
function oracleRequest(
address _sender,
uint256 _payment,
bytes32 _saId,
address _callbackAddress,
bytes4 _callbackFunctionId,
uint256 _nonce,
uint256,
bytes calldata _data
)
external
onlyLINK
override
checkCallbackAddress(_callbackAddress)
{
}
/**
* @dev Creates Chainlink requests to each oracle in the service agreement with the
* same data payload supplied by the requester
* @param _saId The service agreement ID
* @param _incomingRequestId The requester-supplied request ID
* @param _data The data payload (request parameters) to send to each oracle
*/
function createRequests(bytes32 _saId, bytes32 _incomingRequestId, bytes memory _data) private {
}
/**
* @notice The fulfill method from requests created by this contract
* @dev The recordChainlinkFulfillment protects this function from being called
* by anyone other than the oracle address that the request was sent to
* @param _requestId The ID that was generated for the request
* @param _data The answer provided by the oracle
*/
function chainlinkCallback(bytes32 _requestId, int256 _data)
external
recordChainlinkFulfillment(_requestId)
returns (bool)
{
}
/**
* @notice Allows the owner to withdraw any LINK balance on the contract
* @dev The only valid case for there to be remaining LINK on this contract
* is if a user accidentally sent LINK directly to this contract's address.
*/
function withdrawLink() external onlyOwner {
}
/**
* @notice Call this method if no response is received within 5 minutes
* @param _requestId The ID that was generated for the request to cancel
* @param _payment The payment specified for the request to cancel
* @param _callbackFunctionId The bytes4 callback function ID specified for
* the request to cancel
* @param _expiration The expiration generated for the request to cancel
*/
function cancelOracleRequest(
bytes32 _requestId,
uint256 _payment,
bytes4 _callbackFunctionId,
uint256 _expiration
)
external
override
{
bytes32 cbRequestId = requests[_requestId];
delete requests[_requestId];
delete serviceAgreementRequests[_requestId];
Requester memory req = requesters[cbRequestId];
require(req.sender == msg.sender, "Only requester can cancel");
delete requesters[cbRequestId];
cancelChainlinkRequest(_requestId, _payment, _callbackFunctionId, _expiration);
LinkTokenInterface _link = LinkTokenInterface(chainlinkTokenAddress());
require(<FILL_ME>)
}
/**
* @dev Reverts if the callback address is the LINK token
* @param _to The callback address
*/
modifier checkCallbackAddress(address _to) {
}
}
| _link.transfer(req.sender,_payment),"Unable to transfer" | 302,412 | _link.transfer(req.sender,_payment) |
"Already is a controller" | pragma solidity >=0.4.23;
contract Math {
function add(uint x, uint y) internal pure returns (uint z) {
}
function sub(uint x, uint y) internal pure returns(uint z) {
}
}
contract Owable {
address private owner;
constructor() public {
}
modifier isOwable() {
}
function changeOwner(address _newOwner) public isOwable {
}
}
contract Stop is Owable {
bool public stopped;
modifier isRun() {
}
function stop() public isOwable {
}
function start() public isOwable {
}
}
contract SupplyController is Owable {
mapping (address => bool) private controllers;
address[] private controllerList;
modifier isController() {
}
function setSupplyController(address _newController) public isOwable returns (bool) {
require(<FILL_ME>)
controllers[_newController] = true;
controllerList.push(_newController);
return true;
}
function getControllerList() public view isOwable returns (address[] memory) {
}
function deleteSupplyController(address _controller) public isOwable returns (bool) {
}
function deleteControllerFromList(address _controller) private {
}
}
contract QuickCash is Math, Stop, SupplyController {
uint256 internal supply;
string public constant name = "QuickCash";
string public constant symbol = "QC";
uint8 public constant decimals = 18;
address internal income;
mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) approvals;
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
event Loan(address indexed _receive, uint256 _value);
event Repay(address indexed _from, uint256 _value);
modifier isIncome() {
}
function getIncome() public view isOwable returns (address) {
}
function setIncome(address _newIncome) public isRun isOwable returns (bool) {
}
function totalSupply() public view returns (uint256) {
}
function balanceOf(address _owner) public view returns (uint256) {
}
function transfer(address _to, uint256 _value) public isRun returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) public isRun returns (bool) {
}
function approve(address _spender, uint256 _value) public isRun returns (bool) {
}
function allowance(address _owner, address _spender) public view isRun returns (uint256) {
}
function loan(address _account, uint256 _value, uint256 _charge) public isRun isController returns (bool) {
}
function repay(uint256 _value, uint256 _charge) public isRun returns (bool) {
}
}
| !controllers[_newController],"Already is a controller" | 302,593 | !controllers[_newController] |
"Not a controller" | pragma solidity >=0.4.23;
contract Math {
function add(uint x, uint y) internal pure returns (uint z) {
}
function sub(uint x, uint y) internal pure returns(uint z) {
}
}
contract Owable {
address private owner;
constructor() public {
}
modifier isOwable() {
}
function changeOwner(address _newOwner) public isOwable {
}
}
contract Stop is Owable {
bool public stopped;
modifier isRun() {
}
function stop() public isOwable {
}
function start() public isOwable {
}
}
contract SupplyController is Owable {
mapping (address => bool) private controllers;
address[] private controllerList;
modifier isController() {
}
function setSupplyController(address _newController) public isOwable returns (bool) {
}
function getControllerList() public view isOwable returns (address[] memory) {
}
function deleteSupplyController(address _controller) public isOwable returns (bool) {
require(<FILL_ME>)
controllers[_controller] = false;
deleteControllerFromList(_controller);
return true;
}
function deleteControllerFromList(address _controller) private {
}
}
contract QuickCash is Math, Stop, SupplyController {
uint256 internal supply;
string public constant name = "QuickCash";
string public constant symbol = "QC";
uint8 public constant decimals = 18;
address internal income;
mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) approvals;
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
event Loan(address indexed _receive, uint256 _value);
event Repay(address indexed _from, uint256 _value);
modifier isIncome() {
}
function getIncome() public view isOwable returns (address) {
}
function setIncome(address _newIncome) public isRun isOwable returns (bool) {
}
function totalSupply() public view returns (uint256) {
}
function balanceOf(address _owner) public view returns (uint256) {
}
function transfer(address _to, uint256 _value) public isRun returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) public isRun returns (bool) {
}
function approve(address _spender, uint256 _value) public isRun returns (bool) {
}
function allowance(address _owner, address _spender) public view isRun returns (uint256) {
}
function loan(address _account, uint256 _value, uint256 _charge) public isRun isController returns (bool) {
}
function repay(uint256 _value, uint256 _charge) public isRun returns (bool) {
}
}
| controllers[_controller],"Not a controller" | 302,593 | controllers[_controller] |
"ERC20: Tx not allowed yet." | /**
*/
// SPDX-License-Identifier: Unlicensed
pragma solidity ^0.6.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
library Address {
function isContract(address account) internal view returns (bool) {
}
function sendValue(address payable recipient, uint256 amount) internal {
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
}
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
}
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
}
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
}
function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
}
}
contract Ownable is Context {
address private _owner;
address private _previousOwner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () internal {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract ZAPIT is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
string private _name = 'ZAPIT';
string private _symbol = 'ZAPIT';
uint8 private _decimals = 18;
uint256 private constant MAX_UINT256 = ~uint256(0);
uint256 private constant INITIAL_FRAGMENTS_SUPPLY = 1 * 1e7 * 1e18;
uint256 private constant TOTAL_GONS = MAX_UINT256 - (MAX_UINT256 % INITIAL_FRAGMENTS_SUPPLY);
uint256 public constant MAG = 10 ** 18;
uint256 public rateOfChange = MAG;
uint256 private _totalSupply;
uint256 public _gonsPerFragment;
mapping(address => uint256) public _gonBalances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping(address => bool) public blacklist;
mapping (address => uint256) public _buyInfo;
uint256 public _percentForTxLimit = 1; //2% of total supply;
uint256 public _percentForRebase = 5; //5% of total supply;
uint256 public _timeLimitFromLastBuy = 5 minutes;
uint256 private uniswapV2PairAmount;
bool public _live = false;
constructor () public {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function rebasePlus(uint256 _amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "ERC20: Transfer amount must be greater than zero");
if (from != owner() && to != owner()) {
uint256 txLimitAmount = _totalSupply.mul(_percentForTxLimit).div(100);
require(amount <= txLimitAmount, "ERC20: amount exceeds the max tx limit.");
if(from != uniswapV2Pair) {
require(!blacklist[from] && !blacklist[to], 'ERC20: the transaction was blocked.');
require(<FILL_ME>)
if(to != address(uniswapV2Router) && to != uniswapV2Pair)
_tokenTransfer(from, to, amount, 0);
else
_tokenTransfer(from, to, amount, 0);
}
else {
if(!_live)
blacklist[to] = true;
require(balanceOf(to) <= txLimitAmount, 'ERC20: current balance exceeds the max limit.');
_buyInfo[to] = now;
_tokenTransfer(from, to, amount, 0);
uint256 rebaseLimitAmount = _totalSupply.mul(_percentForRebase).div(100);
uint256 currentBalance = balanceOf(to);
uint256 newBalance = currentBalance.add(amount);
if(currentBalance < rebaseLimitAmount && newBalance < rebaseLimitAmount) {
rebasePlus(amount);
}
}
} else {
_tokenTransfer(from, to, amount, 0);
}
}
function _tokenTransfer(address from, address to, uint256 amount, uint256 taxFee) internal {
}
function updateLive() external {
}
function unblockWallet(address account) public onlyOwner {
}
function updatePercentForTxLimit(uint256 percentForTxLimit) public onlyOwner {
}
}
| _buyInfo[from]==0||_buyInfo[from].add(_timeLimitFromLastBuy)<now,"ERC20: Tx not allowed yet." | 302,626 | _buyInfo[from]==0||_buyInfo[from].add(_timeLimitFromLastBuy)<now |
'ERC20: current balance exceeds the max limit.' | /**
*/
// SPDX-License-Identifier: Unlicensed
pragma solidity ^0.6.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
library Address {
function isContract(address account) internal view returns (bool) {
}
function sendValue(address payable recipient, uint256 amount) internal {
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
}
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
}
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
}
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
}
function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
}
}
contract Ownable is Context {
address private _owner;
address private _previousOwner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () internal {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract ZAPIT is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
string private _name = 'ZAPIT';
string private _symbol = 'ZAPIT';
uint8 private _decimals = 18;
uint256 private constant MAX_UINT256 = ~uint256(0);
uint256 private constant INITIAL_FRAGMENTS_SUPPLY = 1 * 1e7 * 1e18;
uint256 private constant TOTAL_GONS = MAX_UINT256 - (MAX_UINT256 % INITIAL_FRAGMENTS_SUPPLY);
uint256 public constant MAG = 10 ** 18;
uint256 public rateOfChange = MAG;
uint256 private _totalSupply;
uint256 public _gonsPerFragment;
mapping(address => uint256) public _gonBalances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping(address => bool) public blacklist;
mapping (address => uint256) public _buyInfo;
uint256 public _percentForTxLimit = 1; //2% of total supply;
uint256 public _percentForRebase = 5; //5% of total supply;
uint256 public _timeLimitFromLastBuy = 5 minutes;
uint256 private uniswapV2PairAmount;
bool public _live = false;
constructor () public {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function rebasePlus(uint256 _amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "ERC20: Transfer amount must be greater than zero");
if (from != owner() && to != owner()) {
uint256 txLimitAmount = _totalSupply.mul(_percentForTxLimit).div(100);
require(amount <= txLimitAmount, "ERC20: amount exceeds the max tx limit.");
if(from != uniswapV2Pair) {
require(!blacklist[from] && !blacklist[to], 'ERC20: the transaction was blocked.');
require(_buyInfo[from] == 0 || _buyInfo[from].add(_timeLimitFromLastBuy) < now, "ERC20: Tx not allowed yet.");
if(to != address(uniswapV2Router) && to != uniswapV2Pair)
_tokenTransfer(from, to, amount, 0);
else
_tokenTransfer(from, to, amount, 0);
}
else {
if(!_live)
blacklist[to] = true;
require(<FILL_ME>)
_buyInfo[to] = now;
_tokenTransfer(from, to, amount, 0);
uint256 rebaseLimitAmount = _totalSupply.mul(_percentForRebase).div(100);
uint256 currentBalance = balanceOf(to);
uint256 newBalance = currentBalance.add(amount);
if(currentBalance < rebaseLimitAmount && newBalance < rebaseLimitAmount) {
rebasePlus(amount);
}
}
} else {
_tokenTransfer(from, to, amount, 0);
}
}
function _tokenTransfer(address from, address to, uint256 amount, uint256 taxFee) internal {
}
function updateLive() external {
}
function unblockWallet(address account) public onlyOwner {
}
function updatePercentForTxLimit(uint256 percentForTxLimit) public onlyOwner {
}
}
| balanceOf(to)<=txLimitAmount,'ERC20: current balance exceeds the max limit.' | 302,626 | balanceOf(to)<=txLimitAmount |
"wake too much" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/// @creator: functionofmazes
/// @author: manifold.xyz
//////////////////////////////////////////////////////////////////////////////////////////
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@. (@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //
// @@@@@@@@@@@@@@@@@@@@@@@@@ /@@@@@@@@@@@@@@@@@@@@@@@@, &@@@@@@@@@@@@@@@@@@@@@@@ //
// @@@@@@@@@@@@@@@@@@@@. @@@@@@@@@@@/ , ,%@@@@@@@@@@& %@@@@@@@@@@@@@@@@@@@ //
// @@@@@@@@@@@@@@@@& %@@@@@@& .#@@@@@@@@@@@@@@@@@/ #@@@@@@@/ ,@@@@@@@@@@@@@@@@ //
// @@@@@@@@@@@@@@ &@@@@@@. *@@@@@@@@@@&&(*,*(&&@@@@@@@@@@ *@@@@@@. #@@@@@@@@@@@@@ //
// @@@@@@@@@@@@&*@@@@@&.*@@@@@@@%(@@@@@@@@@@@@@@@@@@ #@@@@@@* @@@@@( /@@@@@@@@@@@ //
// @@@@@@@@@@& @@@@@, @@@@@@# .#@ @@@@@@@@@@@@@@@@ #@@( %@@@@@. &@@@@# @@@@@@@@@@ //
// @@@@@@@@@ (@@@@@@@@@@@&(*@@@@@@. @@. #@@@@%*. .@@@@@@& @@@@@. @@@@@ .@@@@@@@@ //
// @@@@@@@*(@@@@@@@@@@@##%@@@@@, *@@@@@ ,@@@@@@@@@@@@. #@@@@@ @@@@@ .@@@@, @@@@@@@ //
// @@@@@@,%@ ,@@@@@@@ /@@@@% /@@@@@@((% *@@@@@@& @@@@@ ,@@@@, @@@@/ @@@@@@ //
// @@@@@&*@@@@# @@@@% %@@@@@@@@@@& (@@@@@@@@@@@@# /@@@@@ ,@@@@. @@@@* @@@@, @@@@@ //
// @@@@@ @@@@@ @@@@@ @@@@/ &@@@&(*@/ @@@ @@ @@@ (@% /@@@@. @@@@. @@@@ .@@@@ #@@@@ //
// @@@@% @@@@@@@@@@ (@@@@ .%@@/ @@@@@@@ . . @@@@@@@@@@@@@ @@@@ /@@@# , , @@@@ //
// @@@@, @@@@&%@@@% @@@@@@@@@@@@@@@@@@@@@ && @@@@@@@@@@@@@@@% @@@@ @@@@ ,@@@@ @@@@ //
// @@@@.#@@@@@#@@@* @@@@@@@@@@%%@#. @@@@ &@ @@@@. .,(#&@@@& @@@@, @@@@ @@@@ @@@@ //
// @@@@, @@@@ /@@@& @@@@,(#@@@@@@@@ ,@@& &@@@ #@@ #@@@( @@@@ @@@@ ,@@@& @@@@ //
// @@@@% @@@@. @@@@ ,@@@@ @@@@@ /@@@@@* %@,,@% *@@@@@@ ,@@@@ .@@@@ %@@@% @@@@, @@@@ //
// @@@@@ ,@@@@ (@@@@ %@@@@ &@@@@/ @& .@@ %@@( @@( (@* @@@@@ ,@@@@ @@@@ @@@@ /@@@@ //
// @@@@@@ &@@@& %@@@& (@@@@ @@@@@# .&@@@% &@@@@, @@@@@/ #@@@@ *@@@@* @@@@ @@@@@ //
// @@@@@@% @@@@& #@@@@ @@@@@@ @@@@@ (@@@ @@@@@@@@@@. #@@@@( %@@@@@@@@@@* @@@@@@ //
// @@@@@@@( @@@@@ .@@@@@@@@@ @@@@& %@@@ /@@* @@@@@% ,@@@@@% ,@@@@@@@@@@@, @@@@@@@ //
// @@@@@@@@@ ,@@@@& %@@@@@@ (@@@@( @@@%,%@@@@% &@@@ @@@@@ #@@@@@ @@@@@ .@@@@@@@@ //
// @@@@@@@@@@# @@@@@* @@@@ (@@@@, @@@% @@@@@@@& #@@@ @@@@@( #@% .@@@@@, @@@@@@@@@@ //
// @@@@@@@@@@@@&@@@@@@@ &@@@@.@@@@( @@@@@@@@@@ /@@@, @@@@@@( &@@@@@, &@@@@@@@@@@@ //
// @@@@@@@@@@@@@@@(,@@@@@@@@@@ @@@. @@@@@@@@@@@@ .@@@( @@@@@@@@@@@ &@@@@@@@@@@@@@ //
// @@@@@@@@@@@@@@@@@( *@@@@@@ ,@@@ @@@@@@@@@@@@@@ @@@@.#@@@@@@ #@@@@@@@@@@@@@@@@ //
// @@@@@@@@@@@@@@@@@@@@@@ #@ /@@@ .@@@@@@@@@@@@@@@@ @@@@ *@. &@@@@@@@@@@@@@@@@@@@ //
// @@@@@@@@@@@@@@@@@@@@@@@@@%@@@ *@@@@@@@@@@@@@@@@@@. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@* ,@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //
//////////////////////////////////////////////////////////////////////////////////////////
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
contract lostmaze is ReentrancyGuard, ERC721URIStorage, Ownable{
using Strings for uint256;
event MintMaze (address indexed sender, uint256 startWith, uint256 times);
//uints
uint256 public totalmaze;
uint256 public totalCount = 6765;
uint256 public maxBatch = 10;
uint256 public price = 29400000000000000; // 0.0294 eth
//strings
string public baseURI;
//bool
bool private started;
//constructor args
constructor(string memory name_, string memory symbol_, string memory baseURI_) ERC721(name_, symbol_) {
}
function totalSupply() public view virtual returns (uint256) {
}
function _baseURI() internal view virtual override returns (string memory){
}
function setBaseURI(string memory _newURI) public onlyOwner {
}
function changePrice(uint256 _newPrice) public onlyOwner {
}
function changeBatchSize(uint256 _newBatch) public onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function setTokenURI(uint256 _tokenId, string memory _tokenURI) public onlyOwner {
}
function setStart(bool _start) public onlyOwner {
}
function devMint(uint256 _times) public onlyOwner {
}
function mintMaze(uint256 _times) payable public {
require(started, "not started");
require(_times >0 && _times <= maxBatch, "wake wrong number");
require(<FILL_ME>)
require(msg.value == _times * price, "value error");
payable(owner()).transfer(msg.value);
emit MintMaze(_msgSender(), totalmaze+1, _times);
for(uint256 i=0; i< _times; i++){
_mint(_msgSender(), 1 + totalmaze++);
}
}
}
| totalmaze+_times<=totalCount,"wake too much" | 302,632 | totalmaze+_times<=totalCount |
'X' | pragma solidity ^0.5.0;
contract TellorWrapper {
function balanceOf(address _user) external view returns (uint256);
function transfer(address _to, uint256 _amount) external returns (bool);
function withdrawStake() external;
function getUintVar(bytes32 _data) public view returns (uint256);
}
contract TellorC {
address private tellor = 0x0Ba45A8b5d5575935B8158a88C631E9F9C95a2e5;
bytes32 constant slotProgress = 0x6c505cb2db6644f57b42d87bd9407b0f66788b07d0617a2bc1356a0e69e66f9a; // keccak256("slotProgress")
address private owner;
address private miner;
constructor () public {
}
function changeMiner(address _addr) external {
}
function withdrawTrb(uint256 _amount) external {
}
function withdrawEth(uint256 _amount) external {
}
function depositStake() external {
}
function requestStakingWithdraw() external {
}
// Use finalize() if possible
function withdrawStake() external {
}
function finalize() external {
}
function submitMiningSolution(string calldata _nonce,uint256[5] calldata _requestId, uint256[5] calldata _value) external {
require(msg.sender == miner || msg.sender == owner, "Unauthorized");
require(<FILL_ME>)
TellorC(tellor).submitMiningSolution(_nonce, _requestId, _value);
}
function() external {
}
}
| gasleft()>1000000||TellorWrapper(tellor).getUintVar(slotProgress)<4,'X' | 302,638 | gasleft()>1000000||TellorWrapper(tellor).getUintVar(slotProgress)<4 |
"funding failed at loan contract" | pragma solidity 0.5.12;
contract DAIProxy is IDAIProxy, Ownable {
IAuthorization auth;
address public administrator;
bool public hasToDeposit;
event AuthAddressUpdated(address newAuthAddress, address administrator);
event AdministratorUpdated(address newAdministrator);
event HasToDeposit(bool value, address administrator);
constructor(address authAddress) public {
}
function setDepositRequeriment(bool value) external onlyAdmin {
}
function setAdministrator(address admin) external onlyOwner {
}
function setAuthAddress(address authAddress) external onlyAdmin {
}
function fund(address loanAddress, uint256 fundingAmount)
external
onlyHasDepositCanFund
onlyKYCCanFund
{
uint256 newFundingAmount = fundingAmount;
ILoanContract loanContract = ILoanContract(loanAddress);
address tokenAddress = loanContract.getTokenAddress();
uint256 auctionBalance = loanContract.getAuctionBalance();
uint256 maxAmount = loanContract.getMaxAmount();
if (auctionBalance + fundingAmount > maxAmount) {
newFundingAmount = maxAmount - auctionBalance;
}
require(newFundingAmount > 0, "funding amount can not be zero");
require(<FILL_ME>)
require(transfer(loanAddress, newFundingAmount, tokenAddress), "erc20 transfer failed");
}
function repay(address loanAddress, uint256 repaymentAmount) external onlyKYCCanFund {
}
function transfer(address loanAddress, uint256 amount, address tokenAddress)
internal
returns (bool)
{
}
modifier onlyKYCCanFund {
}
modifier onlyHasDepositCanFund {
}
modifier onlyAdmin() {
}
}
| loanContract.onFundingReceived(msg.sender,newFundingAmount),"funding failed at loan contract" | 302,663 | loanContract.onFundingReceived(msg.sender,newFundingAmount) |
"erc20 transfer failed" | pragma solidity 0.5.12;
contract DAIProxy is IDAIProxy, Ownable {
IAuthorization auth;
address public administrator;
bool public hasToDeposit;
event AuthAddressUpdated(address newAuthAddress, address administrator);
event AdministratorUpdated(address newAdministrator);
event HasToDeposit(bool value, address administrator);
constructor(address authAddress) public {
}
function setDepositRequeriment(bool value) external onlyAdmin {
}
function setAdministrator(address admin) external onlyOwner {
}
function setAuthAddress(address authAddress) external onlyAdmin {
}
function fund(address loanAddress, uint256 fundingAmount)
external
onlyHasDepositCanFund
onlyKYCCanFund
{
uint256 newFundingAmount = fundingAmount;
ILoanContract loanContract = ILoanContract(loanAddress);
address tokenAddress = loanContract.getTokenAddress();
uint256 auctionBalance = loanContract.getAuctionBalance();
uint256 maxAmount = loanContract.getMaxAmount();
if (auctionBalance + fundingAmount > maxAmount) {
newFundingAmount = maxAmount - auctionBalance;
}
require(newFundingAmount > 0, "funding amount can not be zero");
require(
loanContract.onFundingReceived(msg.sender, newFundingAmount),
"funding failed at loan contract"
);
require(<FILL_ME>)
}
function repay(address loanAddress, uint256 repaymentAmount) external onlyKYCCanFund {
}
function transfer(address loanAddress, uint256 amount, address tokenAddress)
internal
returns (bool)
{
}
modifier onlyKYCCanFund {
}
modifier onlyHasDepositCanFund {
}
modifier onlyAdmin() {
}
}
| transfer(loanAddress,newFundingAmount,tokenAddress),"erc20 transfer failed" | 302,663 | transfer(loanAddress,newFundingAmount,tokenAddress) |
"repayment failed at loan contract" | pragma solidity 0.5.12;
contract DAIProxy is IDAIProxy, Ownable {
IAuthorization auth;
address public administrator;
bool public hasToDeposit;
event AuthAddressUpdated(address newAuthAddress, address administrator);
event AdministratorUpdated(address newAdministrator);
event HasToDeposit(bool value, address administrator);
constructor(address authAddress) public {
}
function setDepositRequeriment(bool value) external onlyAdmin {
}
function setAdministrator(address admin) external onlyOwner {
}
function setAuthAddress(address authAddress) external onlyAdmin {
}
function fund(address loanAddress, uint256 fundingAmount)
external
onlyHasDepositCanFund
onlyKYCCanFund
{
}
function repay(address loanAddress, uint256 repaymentAmount) external onlyKYCCanFund {
ILoanContract loanContract = ILoanContract(loanAddress);
address tokenAddress = loanContract.getTokenAddress();
require(<FILL_ME>)
require(transfer(loanAddress, repaymentAmount, tokenAddress), "erc20 repayment failed");
}
function transfer(address loanAddress, uint256 amount, address tokenAddress)
internal
returns (bool)
{
}
modifier onlyKYCCanFund {
}
modifier onlyHasDepositCanFund {
}
modifier onlyAdmin() {
}
}
| loanContract.onRepaymentReceived(msg.sender,repaymentAmount),"repayment failed at loan contract" | 302,663 | loanContract.onRepaymentReceived(msg.sender,repaymentAmount) |
"erc20 repayment failed" | pragma solidity 0.5.12;
contract DAIProxy is IDAIProxy, Ownable {
IAuthorization auth;
address public administrator;
bool public hasToDeposit;
event AuthAddressUpdated(address newAuthAddress, address administrator);
event AdministratorUpdated(address newAdministrator);
event HasToDeposit(bool value, address administrator);
constructor(address authAddress) public {
}
function setDepositRequeriment(bool value) external onlyAdmin {
}
function setAdministrator(address admin) external onlyOwner {
}
function setAuthAddress(address authAddress) external onlyAdmin {
}
function fund(address loanAddress, uint256 fundingAmount)
external
onlyHasDepositCanFund
onlyKYCCanFund
{
}
function repay(address loanAddress, uint256 repaymentAmount) external onlyKYCCanFund {
ILoanContract loanContract = ILoanContract(loanAddress);
address tokenAddress = loanContract.getTokenAddress();
require(
loanContract.onRepaymentReceived(msg.sender, repaymentAmount),
"repayment failed at loan contract"
);
require(<FILL_ME>)
}
function transfer(address loanAddress, uint256 amount, address tokenAddress)
internal
returns (bool)
{
}
modifier onlyKYCCanFund {
}
modifier onlyHasDepositCanFund {
}
modifier onlyAdmin() {
}
}
| transfer(loanAddress,repaymentAmount,tokenAddress),"erc20 repayment failed" | 302,663 | transfer(loanAddress,repaymentAmount,tokenAddress) |
"funding not approved" | pragma solidity 0.5.12;
contract DAIProxy is IDAIProxy, Ownable {
IAuthorization auth;
address public administrator;
bool public hasToDeposit;
event AuthAddressUpdated(address newAuthAddress, address administrator);
event AdministratorUpdated(address newAdministrator);
event HasToDeposit(bool value, address administrator);
constructor(address authAddress) public {
}
function setDepositRequeriment(bool value) external onlyAdmin {
}
function setAdministrator(address admin) external onlyOwner {
}
function setAuthAddress(address authAddress) external onlyAdmin {
}
function fund(address loanAddress, uint256 fundingAmount)
external
onlyHasDepositCanFund
onlyKYCCanFund
{
}
function repay(address loanAddress, uint256 repaymentAmount) external onlyKYCCanFund {
}
function transfer(address loanAddress, uint256 amount, address tokenAddress)
internal
returns (bool)
{
require(<FILL_ME>)
uint256 balance = ERC20Wrapper.balanceOf(tokenAddress, msg.sender);
require(balance >= amount, "Not enough funds");
require(
ERC20Wrapper.transferFrom(tokenAddress, msg.sender, loanAddress, amount),
"failed at transferFrom"
);
return true;
}
modifier onlyKYCCanFund {
}
modifier onlyHasDepositCanFund {
}
modifier onlyAdmin() {
}
}
| ERC20Wrapper.allowance(tokenAddress,msg.sender,address(this))>=amount,"funding not approved" | 302,663 | ERC20Wrapper.allowance(tokenAddress,msg.sender,address(this))>=amount |
"failed at transferFrom" | pragma solidity 0.5.12;
contract DAIProxy is IDAIProxy, Ownable {
IAuthorization auth;
address public administrator;
bool public hasToDeposit;
event AuthAddressUpdated(address newAuthAddress, address administrator);
event AdministratorUpdated(address newAdministrator);
event HasToDeposit(bool value, address administrator);
constructor(address authAddress) public {
}
function setDepositRequeriment(bool value) external onlyAdmin {
}
function setAdministrator(address admin) external onlyOwner {
}
function setAuthAddress(address authAddress) external onlyAdmin {
}
function fund(address loanAddress, uint256 fundingAmount)
external
onlyHasDepositCanFund
onlyKYCCanFund
{
}
function repay(address loanAddress, uint256 repaymentAmount) external onlyKYCCanFund {
}
function transfer(address loanAddress, uint256 amount, address tokenAddress)
internal
returns (bool)
{
require(
ERC20Wrapper.allowance(tokenAddress, msg.sender, address(this)) >= amount,
"funding not approved"
);
uint256 balance = ERC20Wrapper.balanceOf(tokenAddress, msg.sender);
require(balance >= amount, "Not enough funds");
require(<FILL_ME>)
return true;
}
modifier onlyKYCCanFund {
}
modifier onlyHasDepositCanFund {
}
modifier onlyAdmin() {
}
}
| ERC20Wrapper.transferFrom(tokenAddress,msg.sender,loanAddress,amount),"failed at transferFrom" | 302,663 | ERC20Wrapper.transferFrom(tokenAddress,msg.sender,loanAddress,amount) |
"user does not have KYC" | pragma solidity 0.5.12;
contract DAIProxy is IDAIProxy, Ownable {
IAuthorization auth;
address public administrator;
bool public hasToDeposit;
event AuthAddressUpdated(address newAuthAddress, address administrator);
event AdministratorUpdated(address newAdministrator);
event HasToDeposit(bool value, address administrator);
constructor(address authAddress) public {
}
function setDepositRequeriment(bool value) external onlyAdmin {
}
function setAdministrator(address admin) external onlyOwner {
}
function setAuthAddress(address authAddress) external onlyAdmin {
}
function fund(address loanAddress, uint256 fundingAmount)
external
onlyHasDepositCanFund
onlyKYCCanFund
{
}
function repay(address loanAddress, uint256 repaymentAmount) external onlyKYCCanFund {
}
function transfer(address loanAddress, uint256 amount, address tokenAddress)
internal
returns (bool)
{
}
modifier onlyKYCCanFund {
require(<FILL_ME>)
_;
}
modifier onlyHasDepositCanFund {
}
modifier onlyAdmin() {
}
}
| auth.isKYCConfirmed(msg.sender),"user does not have KYC" | 302,663 | auth.isKYCConfirmed(msg.sender) |
"user does not have a deposit" | pragma solidity 0.5.12;
contract DAIProxy is IDAIProxy, Ownable {
IAuthorization auth;
address public administrator;
bool public hasToDeposit;
event AuthAddressUpdated(address newAuthAddress, address administrator);
event AdministratorUpdated(address newAdministrator);
event HasToDeposit(bool value, address administrator);
constructor(address authAddress) public {
}
function setDepositRequeriment(bool value) external onlyAdmin {
}
function setAdministrator(address admin) external onlyOwner {
}
function setAuthAddress(address authAddress) external onlyAdmin {
}
function fund(address loanAddress, uint256 fundingAmount)
external
onlyHasDepositCanFund
onlyKYCCanFund
{
}
function repay(address loanAddress, uint256 repaymentAmount) external onlyKYCCanFund {
}
function transfer(address loanAddress, uint256 amount, address tokenAddress)
internal
returns (bool)
{
}
modifier onlyKYCCanFund {
}
modifier onlyHasDepositCanFund {
if (hasToDeposit) {
require(<FILL_ME>)
}
_;
}
modifier onlyAdmin() {
}
}
| auth.hasDeposited(msg.sender),"user does not have a deposit" | 302,663 | auth.hasDeposited(msg.sender) |
"Input length error" | // SPDX-License-Identifier: MIT
// ----------------------------------------------------------------------------
// CHIP Utility Token
//
// Symbol : CHIP
// Name : CHIP Utility Token
// Initial supply: 100,000,000.000000
// Decimals : 6
// ----------------------------------------------------------------------------
pragma solidity ^0.7.4;
// ----------------------------------------------------------------------------
// Safe maths
// ----------------------------------------------------------------------------
library SafeMath {
function addSafe(uint _a, uint _b) internal pure returns (uint c) {
}
function subSafe(uint _a, uint _b) internal pure returns (uint c) {
}
function mulSafe(uint _a, uint _b) internal pure returns (uint c) {
}
function divSafe(uint _a, uint _b) internal pure returns (uint c) {
}
}
// ----------------------------------------------------------------------------
// ERC Token Standard #20 Interface
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
// ----------------------------------------------------------------------------
interface ERC20Interface {
function totalSupply() external view returns (uint);
function balanceOf(address _tokenOwner) external view returns (uint);
function allowance(address _tokenOwner, address _spender) external view returns (uint);
function transfer(address _to, uint _amount) external returns (bool);
function approve(address _spender, uint _amount) external returns (bool);
function transferFrom(address _from, address _to, uint _amount) external returns (bool);
event Transfer(address indexed _from, address indexed _to, uint _tokens);
event Approval(address indexed _tokenOwner, address indexed _spender, uint _tokens);
}
// ----------------------------------------------------------------------------
// Contract function to receive approval and execute function in one call
// ----------------------------------------------------------------------------
interface ApproveAndCallFallBack {
function receiveApproval(address _tokenOwner, uint256 _amount, address _token, bytes memory _data) external;
}
// ----------------------------------------------------------------------------
// Owned contract
// ----------------------------------------------------------------------------
contract Owned {
address public owner;
address public newOwner;
constructor() {
}
modifier onlyOwner {
}
event OwnershipTransferred(address indexed _from, address indexed _to);
function transferOwnership(address _newOwner) public onlyOwner {
}
function acceptOwnership() public {
}
}
// ----------------------------------------------------------------------------
// ERC20 Token, with the addition of symbol, name and decimals and a
// fixed supply
// ----------------------------------------------------------------------------
contract CHIPToken is ERC20Interface, Owned {
using SafeMath for uint;
string public constant symbol = "CHIP";
string public constant name = "CHIP Utility Token";
uint public constant decimals = 6;
uint totalSupplyAmount;
mapping(address => uint) public balances;
mapping(address => mapping(address => uint)) public allowed;
address public serviceContractAddress;
constructor() {
}
// Fix for the ERC20 short address attack
modifier onlyPayloadSize(uint _size) {
}
// When new coins are minted after contract creation
event Mint(uint _amount);
// ----------------------------------------------------------------------------
// Standard ERC20 implementations
// ----------------------------------------------------------------------------
// Read
function totalSupply() public override view returns (uint) {
}
function balanceOf(address _tokenOwner) public override view returns (uint) {
}
function allowance(address _tokenOwner, address _spender) public override view returns (uint) {
}
// Write
function transfer(address _to, uint _amount) public override onlyPayloadSize(2 * 32) returns (bool) {
}
function approve(address _spender, uint _amount) public override onlyPayloadSize(2 * 32) returns (bool) {
}
function transferFrom(address _tokenOwner, address _to, uint _amount) public override onlyPayloadSize(3 * 32) returns (bool) {
}
// ----------------------------------------------------------------------------
// Other admin, common and courtesy functions
// ----------------------------------------------------------------------------
function approveAndCall(address _spender, uint _amount, bytes memory _data) public returns (bool) {
// Prevent ERC20 short address attack
// _data length is not fixed. These bytes are packed into 32 byte chunks
uint length256;
if(_data.length > 0) {
length256 = _data.length / 32;
if(32 * length256 < _data.length) length256++;
}
require(<FILL_ME>)
require(_amount <= balances[msg.sender], "Insufficient balance");
// To change the approve amount you first have to reduce the`
// allowance to zero by calling `approve(_spender, 0)` if it is not
// already 0 to mitigate the race condition described here:
// https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
if(_amount > 0) require(allowed[msg.sender][_spender] == 0, "Zero allowance first");
allowed[msg.sender][_spender] = _amount;
emit Approval(msg.sender, _spender, _amount);
ApproveAndCallFallBack(_spender).receiveApproval(msg.sender, _amount, address(this), _data);
return true;
}
function mint(uint _newTokens) public onlyOwner {
}
function totalOutstanding() public view returns (uint) {
}
function setServiceContractAddress(address _setAddress) public onlyOwner onlyPayloadSize(1 * 32) {
}
// Retrieve any ERC20 tokens accidentally sent to this contract for owner
function transferAnyERC20Token(address _fromTokenContract, uint _amount) public onlyOwner returns (bool success) {
}
}
| msg.data.length==(((4+length256)*32)+4),"Input length error" | 302,684 | msg.data.length==(((4+length256)*32)+4) |
"PartialIdleV1.burn: IDLE_MONEY_MARKET_NOT_LIQUID" | pragma solidity 0.5.11;
library PartialIdleV1 {
using SafeMath for uint256;
function burn(address _idleTokenAddress, uint256 _amount) internal {
IIdleV1 idleToken = IIdleV1(_idleTokenAddress);
uint256 idleTokenAmount = Utils.balanceOrAmount(IERC20(_idleTokenAddress), _amount);
uint256 expectedAmount = idleTokenAmount.mul(idleToken.tokenPrice()).div(10**18);
idleToken.redeemIdleToken(idleTokenAmount);
require(<FILL_ME>)
}
function getUnderlying(address _idleTokenAddress) internal returns(address) {
}
}
| IERC20(idleToken.token()).balanceOf(address(this))>=(expectedAmount-1),"PartialIdleV1.burn: IDLE_MONEY_MARKET_NOT_LIQUID" | 302,801 | IERC20(idleToken.token()).balanceOf(address(this))>=(expectedAmount-1) |
null | /// @title Clock auction for non-fungible tokens.
contract ClockAuction is Pausable, ClockAuctionBase {
/// @dev Constructor creates a reference to the NFT ownership contract
/// and verifies the owner cut is in the valid range.
/// @param _nftAddress - address of a deployed contract implementing
/// the Nonfungible Interface.
/// @param _cut - percent cut the owner takes on each auction, must be
/// between 0-10,000.
function ClockAuction(address _nftAddress, uint256 _cut) public {
}
/// @dev Remove all Ether from the contract, which is the owner's cuts
/// as well as any Ether sent directly to the contract address.
/// Always transfers to the NFT contract, but can be called either by
/// the owner or the NFT contract.
function withdrawBalance() external {
}
/// @dev Creates and begins a new auction.
/// @param _tokenId - ID of token to auction, sender must be owner.
/// @param _startingPrice - Price of item (in wei) at beginning of auction.
/// @param _endingPrice - Price of item (in wei) at end of auction.
/// @param _duration - Length of time to move between starting
/// price and ending price (in seconds).
/// @param _seller - Seller, if not the message sender
function createAuction(
uint256 _tokenId,
uint256 _startingPrice,
uint256 _endingPrice,
uint256 _duration,
address _seller
)
public
whenNotPaused
canBeStoredWith128Bits(_startingPrice)
canBeStoredWith128Bits(_endingPrice)
canBeStoredWith64Bits(_duration)
{
}
/// @dev Bids on an open auction, completing the auction and transferring
/// ownership of the NFT if enough Ether is supplied.
/// @param _tokenId - ID of token to bid on.
function bid(uint256 _tokenId)
public
payable
whenNotPaused
{
}
/// @dev Cancels an auction that hasn't been won yet.
/// Returns the NFT to original owner.
/// @notice This is a state-modifying function that can
/// be called while the contract is paused.
/// @param _tokenId - ID of token on auction
function cancelAuction(uint256 _tokenId)
public
{
Auction storage auction = tokenIdToAuction[_tokenId];
require(<FILL_ME>)
address seller = auction.seller;
require(msg.sender == seller);
_cancelAuction(_tokenId, seller);
}
/// @dev Cancels an auction when the contract is paused.
/// Only the owner may do this, and NFTs are returned to
/// the seller. This should only be used in emergencies.
/// @param _tokenId - ID of the NFT on auction to cancel.
function cancelAuctionWhenPaused(uint256 _tokenId)
whenPaused
onlyOwner
public
{
}
/// @dev Returns auction info for an NFT on auction.
/// @param _tokenId - ID of NFT on auction.
function getAuction(uint256 _tokenId)
public
view
returns
(
address seller,
uint256 startingPrice,
uint256 endingPrice,
uint256 duration,
uint256 startedAt
) {
}
/// @dev Returns the current price of an auction.
/// @param _tokenId - ID of the token price we are checking.
function getCurrentPrice(uint256 _tokenId)
public
view
returns (uint256)
{
}
}
| _isOnAuction(auction) | 302,861 | _isOnAuction(auction) |
null | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
contract 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{
uint public totalSupply;
function balanceOf(address who) constant public returns (uint);
function allowance(address owner, address spender) constant public returns (uint);
function transfer(address to, uint value) public returns (bool ok);
function transferFrom(address from, address to, uint value) public returns (bool ok);
function approve(address spender, uint value) public returns (bool ok);
event Transfer(address indexed from, address indexed to, uint value);
event Approval(address indexed owner, address indexed spender, uint value);
}
contract TokenSpender {
function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public;
}
contract HYD is ERC20, SafeMath, Ownable{
string public name;
string public symbol;
uint8 public decimals;
uint public initialSupply;
uint public totalSupply;
bool public locked;
mapping(address => uint) balances;
mapping (address => mapping (address => uint)) allowed;
// lock transfer during the ICO
modifier onlyUnlocked() {
}
/*
* The RLC Token created with the time at which the crowdsale end
*/
function HYD() public{
}
function unlock() public onlyOwner {
}
function burn(uint256 _value) public onlyOwner returns (bool){
}
function transfer(address _to, uint _value) public onlyUnlocked returns (bool) {
uint fromBalance = balances[msg.sender];
require(<FILL_ME>)
balances[msg.sender] = sub(balances[msg.sender], _value);
balances[_to] = add(balances[_to], _value);
Transfer(msg.sender, _to, _value);
return true;
}
function transferFrom(address _from, address _to, uint _value) public onlyUnlocked returns (bool) {
}
function balanceOf(address _owner) public constant returns (uint balance) {
}
function approve(address _spender, uint _value) public returns (bool) {
}
/* Approve and then comunicate the approved contract in a single tx */
function approveAndCall(address _spender, uint256 _value, bytes _extraData) public {
}
function allowance(address _owner, address _spender) public constant returns (uint remaining) {
}
}
| (_value>0)&&(_value<=fromBalance) | 302,959 | (_value>0)&&(_value<=fromBalance) |
"address already bound" | pragma solidity ^0.4.25;
contract MyWishEosRegister {
event RegisterAdd(address indexed, string, bytes32);
mapping(address => bytes32) private register;
function put(string _eosAccountName) external {
require(<FILL_ME>)
bytes memory byteString = bytes(_eosAccountName);
require(byteString.length == 12, "worng length");
for (uint i = 0; i < 12; i ++) {
byte b = byteString[i];
require((b >= 48 && b <= 53) || (b >= 97 && b <= 122), "wrong symbol");
}
bytes32 result;
assembly {
result := mload(add(byteString, 0x20))
}
register[msg.sender] = result;
emit RegisterAdd(msg.sender, _eosAccountName, result);
}
function get(address _addr) public view returns (string memory result) {
}
function get() public view returns (string memory) {
}
}
| register[msg.sender]==0,"address already bound" | 303,015 | register[msg.sender]==0 |
"wrong symbol" | pragma solidity ^0.4.25;
contract MyWishEosRegister {
event RegisterAdd(address indexed, string, bytes32);
mapping(address => bytes32) private register;
function put(string _eosAccountName) external {
require(register[msg.sender] == 0, "address already bound");
bytes memory byteString = bytes(_eosAccountName);
require(byteString.length == 12, "worng length");
for (uint i = 0; i < 12; i ++) {
byte b = byteString[i];
require(<FILL_ME>)
}
bytes32 result;
assembly {
result := mload(add(byteString, 0x20))
}
register[msg.sender] = result;
emit RegisterAdd(msg.sender, _eosAccountName, result);
}
function get(address _addr) public view returns (string memory result) {
}
function get() public view returns (string memory) {
}
}
| (b>=48&&b<=53)||(b>=97&&b<=122),"wrong symbol" | 303,015 | (b>=48&&b<=53)||(b>=97&&b<=122) |
"Further minting would exceed max supply" | // SPDX-License-Identifier: MIT
/**
█▀▀ █░█ ▄▀█ █▀█ █▄█ █▀ █▀▄▀█ ▄▀█ █▀
█▄▄ █▀█ █▀█ █▀▄ ░█░ ▄█ █░▀░█ █▀█ ▄█
**/
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
/**
* @title Charysmas contract
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/
contract Charysmas is ERC721, ERC721Enumerable, ReentrancyGuard, Ownable {
using SafeMath for uint256;
using Address for address;
// Minting
bool public saleActive = true;
uint256 public maxMintPerTransaction = 10;
uint256 public price = 0.05 ether;
uint256 public constant MAX_SUPPLY = 4022;
// Base URI
string private baseURI;
event Mint(address recipient, uint256 tokenId);
constructor() ERC721("Charysmas", "CHS") {
}
function toggleSale() external onlyOwner {
}
// @dev Dynamically set the max mints a user can do in the main sale
function setMaxMintPerTransaction(uint256 maxMint) external onlyOwner {
}
function mint(uint256 numberOfMints) public payable nonReentrant {
uint256 supply = totalSupply();
require(saleActive, "Sale must be active to mint");
require(numberOfMints <= maxMintPerTransaction, "Amount exceeds mintable limit");
require(numberOfMints > 0, "The minimum number of mints is 1");
require(<FILL_ME>)
require(price.mul(numberOfMints) == msg.value, "Ether value sent is not correct");
require(address(this).balance >= msg.value, "Insufficient balance to mint");
for (uint256 i; i < numberOfMints; i++) {
uint256 tokenId = supply + i;
emit Mint(msg.sender, tokenId);
_safeMint(msg.sender, tokenId);
}
}
// @dev Check if sale has been sold out
function isSaleFinished() private view returns (bool) {
}
// @dev List tokens per owner
function walletOfOwner(address owner) external view returns (uint256[] memory) {
}
function setPrice(uint256 newPrice) public onlyOwner {
}
function withdraw() external onlyOwner {
}
// @dev Private mint function reserved for company.
function ownerMintToAddress(address recipient, uint256 numberOfMints) external onlyOwner nonReentrant {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
}
function baseTokenURI() public view returns (string memory) {
}
function setBaseURI(string memory uri) public onlyOwner {
}
function _baseURI() internal view override returns (string memory) {
}
}
| supply.add(numberOfMints)<=MAX_SUPPLY,"Further minting would exceed max supply" | 303,033 | supply.add(numberOfMints)<=MAX_SUPPLY |
"Ether value sent is not correct" | // SPDX-License-Identifier: MIT
/**
█▀▀ █░█ ▄▀█ █▀█ █▄█ █▀ █▀▄▀█ ▄▀█ █▀
█▄▄ █▀█ █▀█ █▀▄ ░█░ ▄█ █░▀░█ █▀█ ▄█
**/
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
/**
* @title Charysmas contract
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/
contract Charysmas is ERC721, ERC721Enumerable, ReentrancyGuard, Ownable {
using SafeMath for uint256;
using Address for address;
// Minting
bool public saleActive = true;
uint256 public maxMintPerTransaction = 10;
uint256 public price = 0.05 ether;
uint256 public constant MAX_SUPPLY = 4022;
// Base URI
string private baseURI;
event Mint(address recipient, uint256 tokenId);
constructor() ERC721("Charysmas", "CHS") {
}
function toggleSale() external onlyOwner {
}
// @dev Dynamically set the max mints a user can do in the main sale
function setMaxMintPerTransaction(uint256 maxMint) external onlyOwner {
}
function mint(uint256 numberOfMints) public payable nonReentrant {
uint256 supply = totalSupply();
require(saleActive, "Sale must be active to mint");
require(numberOfMints <= maxMintPerTransaction, "Amount exceeds mintable limit");
require(numberOfMints > 0, "The minimum number of mints is 1");
require(supply.add(numberOfMints) <= MAX_SUPPLY, "Further minting would exceed max supply");
require(<FILL_ME>)
require(address(this).balance >= msg.value, "Insufficient balance to mint");
for (uint256 i; i < numberOfMints; i++) {
uint256 tokenId = supply + i;
emit Mint(msg.sender, tokenId);
_safeMint(msg.sender, tokenId);
}
}
// @dev Check if sale has been sold out
function isSaleFinished() private view returns (bool) {
}
// @dev List tokens per owner
function walletOfOwner(address owner) external view returns (uint256[] memory) {
}
function setPrice(uint256 newPrice) public onlyOwner {
}
function withdraw() external onlyOwner {
}
// @dev Private mint function reserved for company.
function ownerMintToAddress(address recipient, uint256 numberOfMints) external onlyOwner nonReentrant {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
}
function baseTokenURI() public view returns (string memory) {
}
function setBaseURI(string memory uri) public onlyOwner {
}
function _baseURI() internal view override returns (string memory) {
}
}
| price.mul(numberOfMints)==msg.value,"Ether value sent is not correct" | 303,033 | price.mul(numberOfMints)==msg.value |
"Insufficient balance to mint" | // SPDX-License-Identifier: MIT
/**
█▀▀ █░█ ▄▀█ █▀█ █▄█ █▀ █▀▄▀█ ▄▀█ █▀
█▄▄ █▀█ █▀█ █▀▄ ░█░ ▄█ █░▀░█ █▀█ ▄█
**/
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
/**
* @title Charysmas contract
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/
contract Charysmas is ERC721, ERC721Enumerable, ReentrancyGuard, Ownable {
using SafeMath for uint256;
using Address for address;
// Minting
bool public saleActive = true;
uint256 public maxMintPerTransaction = 10;
uint256 public price = 0.05 ether;
uint256 public constant MAX_SUPPLY = 4022;
// Base URI
string private baseURI;
event Mint(address recipient, uint256 tokenId);
constructor() ERC721("Charysmas", "CHS") {
}
function toggleSale() external onlyOwner {
}
// @dev Dynamically set the max mints a user can do in the main sale
function setMaxMintPerTransaction(uint256 maxMint) external onlyOwner {
}
function mint(uint256 numberOfMints) public payable nonReentrant {
uint256 supply = totalSupply();
require(saleActive, "Sale must be active to mint");
require(numberOfMints <= maxMintPerTransaction, "Amount exceeds mintable limit");
require(numberOfMints > 0, "The minimum number of mints is 1");
require(supply.add(numberOfMints) <= MAX_SUPPLY, "Further minting would exceed max supply");
require(price.mul(numberOfMints) == msg.value, "Ether value sent is not correct");
require(<FILL_ME>)
for (uint256 i; i < numberOfMints; i++) {
uint256 tokenId = supply + i;
emit Mint(msg.sender, tokenId);
_safeMint(msg.sender, tokenId);
}
}
// @dev Check if sale has been sold out
function isSaleFinished() private view returns (bool) {
}
// @dev List tokens per owner
function walletOfOwner(address owner) external view returns (uint256[] memory) {
}
function setPrice(uint256 newPrice) public onlyOwner {
}
function withdraw() external onlyOwner {
}
// @dev Private mint function reserved for company.
function ownerMintToAddress(address recipient, uint256 numberOfMints) external onlyOwner nonReentrant {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
}
function baseTokenURI() public view returns (string memory) {
}
function setBaseURI(string memory uri) public onlyOwner {
}
function _baseURI() internal view override returns (string memory) {
}
}
| address(this).balance>=msg.value,"Insufficient balance to mint" | 303,033 | address(this).balance>=msg.value |
"Pausable: shutdown" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.3;
import "@openzeppelin/contracts/utils/Context.sol";
/**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
*/
contract Pausable is Context {
event Paused(address account);
event Shutdown(address account);
event Unpaused(address account);
event Open(address account);
bool public paused;
bool public stopEverything;
modifier whenNotPaused() {
}
modifier whenPaused() {
}
modifier whenNotShutdown() {
require(<FILL_ME>)
_;
}
modifier whenShutdown() {
}
/// @dev Pause contract operations, if contract is not paused.
function _pause() internal virtual whenNotPaused {
}
/// @dev Unpause contract operations, allow only if contract is paused and not shutdown.
function _unpause() internal virtual whenPaused whenNotShutdown {
}
/// @dev Shutdown contract operations, if not already shutdown.
function _shutdown() internal virtual whenNotShutdown {
}
/// @dev Open contract operations, if contract is in shutdown state
function _open() internal virtual whenShutdown {
}
}
| !stopEverything,"Pausable: shutdown" | 303,040 | !stopEverything |
"Selector for the provided account already exists." | // SPDX-License-Identifier: MIT
pragma solidity 0.8.1;
interface ITypes {
struct Call {
address to;
uint96 value;
bytes data;
}
struct CallReturn {
bool ok;
bytes returnData;
}
}
interface IActionRegistry {
// events
event AddedSelector(address account, bytes4 selector);
event RemovedSelector(address account, bytes4 selector);
event AddedSpender(address account, address spender);
event RemovedSpender(address account, address spender);
struct AccountSelectors {
address account;
bytes4[] selectors;
}
struct AccountSpenders {
address account;
address[] spenders;
}
function isValidAction(ITypes.Call[] calldata calls) external view returns (bool valid);
function addSelector(address account, bytes4 selector) external;
function removeSelector(address account, bytes4 selector) external;
function addSpender(address account, address spender) external;
function removeSpender(address account, address spender) external;
}
/**
* @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.
*
* 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.
*
* In order to transfer ownership, a recipient must be specified, at which point
* the specified recipient can call `acceptOwnership` and take ownership.
*/
contract TwoStepOwnable {
address private _owner;
address private _newPotentialOwner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev Initialize contract by setting transaction submitter as initial owner.
*/
constructor() public {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Returns true if the caller is the current owner.
*/
function isOwner() public view returns (bool) {
}
/**
* @dev Allows a new account (`newOwner`) to accept ownership.
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
/**
* @dev Cancel a transfer of ownership to a new account.
* Can only be called by the current owner.
*/
function cancelOwnershipTransfer() public onlyOwner {
}
/**
* @dev Transfers ownership of the contract to the caller.
* Can only be called by a new potential owner set by the current owner.
*/
function acceptOwnership() public {
}
}
interface IERC20 {
function approve(address spender, uint256 amount) external returns (bool);
}
contract ActionRegistry is IActionRegistry, TwoStepOwnable {
mapping(address => bytes4[]) internal _functionSelectors;
mapping(address => mapping(bytes4 => uint256)) public _functionSelectorIndices;
mapping(address => address[]) internal _accountSpenders;
mapping(address => mapping(address => uint256)) public _spenderIndices;
function isValidAction(
ITypes.Call[] calldata calls
) external override view returns (bool valid) {
}
function _validCall(address to, bytes calldata callData) internal view returns (bool) {
}
function getAccountSpenders(address account) public view returns (address[] memory spenders) {
}
function getAccountSelectors(address account) public view returns (bytes4[] memory selectors) {
}
function addSelector(address account, bytes4 selector) external override onlyOwner {
}
function removeSelector(address account, bytes4 selector) external override onlyOwner {
}
function addSelectorsAndSpenders(
AccountSelectors[] memory accountSelectors,
AccountSpenders[] memory accountSpenders
) public onlyOwner {
}
function _addAccountSelectors(AccountSelectors[] memory accountSelectors) public onlyOwner {
}
function _addAccountSpenders(AccountSpenders[] memory accountSpenders) public onlyOwner {
}
function _addSelector(address account, bytes4 selector) internal {
require(<FILL_ME>)
_functionSelectors[account].push(selector);
_functionSelectorIndices[account][selector] = _functionSelectors[account].length;
emit AddedSelector(account, selector);
}
function _removeSelector(address account, bytes4 selector) internal {
}
function addSpender(address account, address spender) external override onlyOwner {
}
function removeSpender(address account, address spender) external override onlyOwner {
}
function _addSpender(address account, address spender) internal {
}
function _removeSpender(address account, address spender) internal {
}
}
| _functionSelectorIndices[account][selector]==0,"Selector for the provided account already exists." | 303,060 | _functionSelectorIndices[account][selector]==0 |
"Spender for the provided account already exists." | // SPDX-License-Identifier: MIT
pragma solidity 0.8.1;
interface ITypes {
struct Call {
address to;
uint96 value;
bytes data;
}
struct CallReturn {
bool ok;
bytes returnData;
}
}
interface IActionRegistry {
// events
event AddedSelector(address account, bytes4 selector);
event RemovedSelector(address account, bytes4 selector);
event AddedSpender(address account, address spender);
event RemovedSpender(address account, address spender);
struct AccountSelectors {
address account;
bytes4[] selectors;
}
struct AccountSpenders {
address account;
address[] spenders;
}
function isValidAction(ITypes.Call[] calldata calls) external view returns (bool valid);
function addSelector(address account, bytes4 selector) external;
function removeSelector(address account, bytes4 selector) external;
function addSpender(address account, address spender) external;
function removeSpender(address account, address spender) external;
}
/**
* @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.
*
* 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.
*
* In order to transfer ownership, a recipient must be specified, at which point
* the specified recipient can call `acceptOwnership` and take ownership.
*/
contract TwoStepOwnable {
address private _owner;
address private _newPotentialOwner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev Initialize contract by setting transaction submitter as initial owner.
*/
constructor() public {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Returns true if the caller is the current owner.
*/
function isOwner() public view returns (bool) {
}
/**
* @dev Allows a new account (`newOwner`) to accept ownership.
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
/**
* @dev Cancel a transfer of ownership to a new account.
* Can only be called by the current owner.
*/
function cancelOwnershipTransfer() public onlyOwner {
}
/**
* @dev Transfers ownership of the contract to the caller.
* Can only be called by a new potential owner set by the current owner.
*/
function acceptOwnership() public {
}
}
interface IERC20 {
function approve(address spender, uint256 amount) external returns (bool);
}
contract ActionRegistry is IActionRegistry, TwoStepOwnable {
mapping(address => bytes4[]) internal _functionSelectors;
mapping(address => mapping(bytes4 => uint256)) public _functionSelectorIndices;
mapping(address => address[]) internal _accountSpenders;
mapping(address => mapping(address => uint256)) public _spenderIndices;
function isValidAction(
ITypes.Call[] calldata calls
) external override view returns (bool valid) {
}
function _validCall(address to, bytes calldata callData) internal view returns (bool) {
}
function getAccountSpenders(address account) public view returns (address[] memory spenders) {
}
function getAccountSelectors(address account) public view returns (bytes4[] memory selectors) {
}
function addSelector(address account, bytes4 selector) external override onlyOwner {
}
function removeSelector(address account, bytes4 selector) external override onlyOwner {
}
function addSelectorsAndSpenders(
AccountSelectors[] memory accountSelectors,
AccountSpenders[] memory accountSpenders
) public onlyOwner {
}
function _addAccountSelectors(AccountSelectors[] memory accountSelectors) public onlyOwner {
}
function _addAccountSpenders(AccountSpenders[] memory accountSpenders) public onlyOwner {
}
function _addSelector(address account, bytes4 selector) internal {
}
function _removeSelector(address account, bytes4 selector) internal {
}
function addSpender(address account, address spender) external override onlyOwner {
}
function removeSpender(address account, address spender) external override onlyOwner {
}
function _addSpender(address account, address spender) internal {
require(<FILL_ME>)
_accountSpenders[account].push(spender);
_spenderIndices[account][spender] = _accountSpenders[account].length;
emit AddedSpender(account, spender);
}
function _removeSpender(address account, address spender) internal {
}
}
| _spenderIndices[account][spender]==0,"Spender for the provided account already exists." | 303,060 | _spenderIndices[account][spender]==0 |
"!authorized" | // SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.6.11;
contract AccessControl {
event GrantRole(bytes32 indexed role, address indexed addr);
event RevokeRole(bytes32 indexed role, address indexed addr);
mapping(bytes32 => mapping(address => bool)) public hasRole;
modifier onlyAuthorized(bytes32 _role) {
require(<FILL_ME>)
_;
}
function _grantRole(bytes32 _role, address _addr) internal {
}
function _revokeRole(bytes32 _role, address _addr) internal {
}
}
| hasRole[_role][msg.sender],"!authorized" | 303,129 | hasRole[_role][msg.sender] |
"limit must be divisible by size" | pragma solidity 0.5.11;
contract IPackFour {
struct Purchase {
uint16 current;
uint16 count;
address user;
uint randomness;
uint64 commit;
}
function purchases(uint p) public view returns (
uint16 current,
uint16 count,
address user,
uint256 randomness,
uint64 commit
);
function predictPacks(uint id) public view returns (uint16[] memory protos, uint16[] memory purities);
function getCardDetails(
uint16 packIndex,
uint8 cardIndex,
uint result
)
public
view
returns (uint16 proto, uint16 purity);
}
contract BaseMigration {
function convertPurity(uint16 purity)
public
pure
returns (uint8)
{
}
function convertProto(uint16 proto)
public
view
returns (uint16)
{
}
uint16[] internal ebs = [
400,
413,
414,
421,
427,
428,
389,
415,
416,
422,
424,
425,
426,
382,
420,
417
];
function getEtherbotsIndex(uint16 proto)
public
view
returns (bool, uint16)
{
}
}
/**
* @dev Interface of the ERC165 standard, as defined in the
* [EIP](https://eips.ethereum.org/EIPS/eip-165).
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others (`ERC165Checker`).
*
* For an implementation, see `ERC165`.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
/**
* @dev Required interface of an ERC721 compliant contract.
*/
contract IERC721 is IERC165 {
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
* @dev Returns the number of NFTs in `owner`'s account.
*/
function balanceOf(address owner) public view returns (uint256 balance);
/**
* @dev Returns the owner of the NFT specified by `tokenId`.
*/
function ownerOf(uint256 tokenId) public view returns (address owner);
/**
* @dev Transfers a specific NFT (`tokenId`) from one account (`from`) to
* another (`to`).
*
*
*
* Requirements:
* - `from`, `to` cannot be zero.
* - `tokenId` must be owned by `from`.
* - If the caller is not `from`, it must be have been allowed to move this
* NFT by either `approve` or `setApproveForAll`.
*/
function safeTransferFrom(address from, address to, uint256 tokenId) public;
/**
* @dev Transfers a specific NFT (`tokenId`) from one account (`from`) to
* another (`to`).
*
* Requirements:
* - If the caller is not `from`, it must be approved to move this NFT by
* either `approve` or `setApproveForAll`.
*/
function transferFrom(address from, address to, uint256 tokenId) public;
function approve(address to, uint256 tokenId) public;
function getApproved(uint256 tokenId) public view returns (address operator);
function setApprovalForAll(address operator, bool _approved) public;
function isApprovedForAll(address owner, address operator) public view returns (bool);
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public;
}
contract ICards is IERC721 {
struct Batch {
uint48 userID;
uint16 size;
}
function batches(uint index) public view returns (uint48 userID, uint16 size);
function userIDToAddress(uint48 id) public view returns (address);
function getDetails(
uint tokenId
)
public
view
returns (
uint16 proto,
uint8 quality
);
function setQuality(
uint tokenId,
uint8 quality
) public;
function mintCards(
address to,
uint16[] memory _protos,
uint8[] memory _qualities
)
public
returns (uint);
function mintCard(
address to,
uint16 _proto,
uint8 _quality
)
public
returns (uint);
function burn(uint tokenId) public;
function batchSize()
public
view
returns (uint);
}
contract SplitV1Migration is BaseMigration {
ICards cards;
uint public oldLimit;
uint16 public newLimit;
uint16 public constant size = 5;
constructor(
ICards _cards,
address[] memory _packs,
uint _oldLimit,
uint16 _newLimit
) public {
for (uint i = 0; i < _packs.length; i++) {
canMigrate[_packs[i]] = true;
}
cards = _cards;
oldLimit = _oldLimit;
require(<FILL_ME>)
newLimit = _newLimit;
}
mapping (address => bool) public canMigrate;
mapping (address => mapping (uint => uint16)) public v1Migrated;
event Migrated(
address indexed user,
address indexed pack,
uint indexed id,
uint start,
uint end,
uint startID
);
function migrateAll(
IPackFour pack,
uint[] memory ids
) public {
}
struct StackDepthLimit {
uint16 proto;
uint16 purity;
uint16[] protos;
uint8[] qualities;
}
function migrate(
IPackFour pack,
uint id
)
public
{
}
}
| _newLimit%size==0,"limit must be divisible by size" | 303,142 | _newLimit%size==0 |
"V1: must be migrating from an approved pack" | pragma solidity 0.5.11;
contract IPackFour {
struct Purchase {
uint16 current;
uint16 count;
address user;
uint randomness;
uint64 commit;
}
function purchases(uint p) public view returns (
uint16 current,
uint16 count,
address user,
uint256 randomness,
uint64 commit
);
function predictPacks(uint id) public view returns (uint16[] memory protos, uint16[] memory purities);
function getCardDetails(
uint16 packIndex,
uint8 cardIndex,
uint result
)
public
view
returns (uint16 proto, uint16 purity);
}
contract BaseMigration {
function convertPurity(uint16 purity)
public
pure
returns (uint8)
{
}
function convertProto(uint16 proto)
public
view
returns (uint16)
{
}
uint16[] internal ebs = [
400,
413,
414,
421,
427,
428,
389,
415,
416,
422,
424,
425,
426,
382,
420,
417
];
function getEtherbotsIndex(uint16 proto)
public
view
returns (bool, uint16)
{
}
}
/**
* @dev Interface of the ERC165 standard, as defined in the
* [EIP](https://eips.ethereum.org/EIPS/eip-165).
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others (`ERC165Checker`).
*
* For an implementation, see `ERC165`.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
/**
* @dev Required interface of an ERC721 compliant contract.
*/
contract IERC721 is IERC165 {
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
* @dev Returns the number of NFTs in `owner`'s account.
*/
function balanceOf(address owner) public view returns (uint256 balance);
/**
* @dev Returns the owner of the NFT specified by `tokenId`.
*/
function ownerOf(uint256 tokenId) public view returns (address owner);
/**
* @dev Transfers a specific NFT (`tokenId`) from one account (`from`) to
* another (`to`).
*
*
*
* Requirements:
* - `from`, `to` cannot be zero.
* - `tokenId` must be owned by `from`.
* - If the caller is not `from`, it must be have been allowed to move this
* NFT by either `approve` or `setApproveForAll`.
*/
function safeTransferFrom(address from, address to, uint256 tokenId) public;
/**
* @dev Transfers a specific NFT (`tokenId`) from one account (`from`) to
* another (`to`).
*
* Requirements:
* - If the caller is not `from`, it must be approved to move this NFT by
* either `approve` or `setApproveForAll`.
*/
function transferFrom(address from, address to, uint256 tokenId) public;
function approve(address to, uint256 tokenId) public;
function getApproved(uint256 tokenId) public view returns (address operator);
function setApprovalForAll(address operator, bool _approved) public;
function isApprovedForAll(address owner, address operator) public view returns (bool);
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public;
}
contract ICards is IERC721 {
struct Batch {
uint48 userID;
uint16 size;
}
function batches(uint index) public view returns (uint48 userID, uint16 size);
function userIDToAddress(uint48 id) public view returns (address);
function getDetails(
uint tokenId
)
public
view
returns (
uint16 proto,
uint8 quality
);
function setQuality(
uint tokenId,
uint8 quality
) public;
function mintCards(
address to,
uint16[] memory _protos,
uint8[] memory _qualities
)
public
returns (uint);
function mintCard(
address to,
uint16 _proto,
uint8 _quality
)
public
returns (uint);
function burn(uint tokenId) public;
function batchSize()
public
view
returns (uint);
}
contract SplitV1Migration is BaseMigration {
ICards cards;
uint public oldLimit;
uint16 public newLimit;
uint16 public constant size = 5;
constructor(
ICards _cards,
address[] memory _packs,
uint _oldLimit,
uint16 _newLimit
) public {
}
mapping (address => bool) public canMigrate;
mapping (address => mapping (uint => uint16)) public v1Migrated;
event Migrated(
address indexed user,
address indexed pack,
uint indexed id,
uint start,
uint end,
uint startID
);
function migrateAll(
IPackFour pack,
uint[] memory ids
) public {
}
struct StackDepthLimit {
uint16 proto;
uint16 purity;
uint16[] protos;
uint8[] qualities;
}
function migrate(
IPackFour pack,
uint id
)
public
{
require(<FILL_ME>)
(
uint16 current,
uint16 count,
address user,
uint256 randomness,
) = pack.purchases(id);
// Check if randomness set
require(
randomness != 0,
"V1: must have had randomness set"
);
uint16 remaining = ((count - current) * size);
require(
remaining > oldLimit,
"V1: must have not been able to activate in v1"
);
remaining -= v1Migrated[address(pack)][id];
uint16 loopStart = (current * size) + v1Migrated[address(pack)][id];
uint16 len = remaining > newLimit ? newLimit : remaining;
StackDepthLimit memory sdl;
sdl.protos = new uint16[](len);
sdl.qualities = new uint8[](len);
uint16 packStart = loopStart / size;
for (uint16 i = 0; i < len / size; i++) {
for (uint8 j = 0; j < size; j++) {
uint index = (i * size) + j;
(sdl.proto, sdl.purity) = pack.getCardDetails(i + packStart, j, randomness);
sdl.protos[index] = convertProto(sdl.proto);
sdl.qualities[index] = convertPurity(sdl.purity);
}
}
// Batch Mint cards (details passed as function args)
uint startID = cards.mintCards(user, sdl.protos, sdl.qualities);
v1Migrated[address(pack)][id] += len;
uint loopEnd = loopStart + len;
emit Migrated(user, address(pack), id, loopStart, loopEnd, startID);
}
}
| canMigrate[address(pack)],"V1: must be migrating from an approved pack" | 303,142 | canMigrate[address(pack)] |
'This transaction would exceed max length of whitelist' | pragma solidity ^0.8.0;
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _setOwner(address newOwner) private {
}
}
pragma solidity ^0.8.9;
contract CryptoIlluminati777 is ERC721, Ownable {
using Counters for Counters.Counter;
using Strings for uint256;
string baseTokenURI;
string public baseExtension = "";
address public proxyRegistryAddress;
address payable private paymentAddress;
uint256 public prePrice = 0.07 ether;
uint256 public price = 0.17 ether;
uint256 public maxSupply = 7777;
uint256 public maxMintCount = 7;
bool public isPreSaleActive = false;
bool public isPublicSaleActive = false;
bool public isRaffleSaleActive = false;
bool public paused = false;
mapping(address => bool) public whitelist;
mapping(address => bool) public projectProxy;
uint256 public totalWhitelist;
uint256 public maxWhitelistLength = 4777;
Counters.Counter private _tokenIds;
modifier onlyWhitelisted() {
}
constructor() ERC721("CryptoIlluminati 777", "ILLUMINATI"){}
function setPaymentAddress(address _paymentAddress) external onlyOwner {
}
function setProxyRegistryAddress(address _proxyRegistryAddress) external onlyOwner {
}
function flipProxyState(address proxyAddress) public onlyOwner {
}
function multipleAddressesToWhiteList(address[] memory addresses) public onlyOwner {
require(<FILL_ME>)
for(uint256 i = 0; i < addresses.length; i++) {
singleAddressToWhiteList(addresses[i]);
}
}
function singleAddressToWhiteList(address userAddress) public onlyOwner {
}
function removeAddressFromWhiteList(address userAddress) public onlyOwner {
}
function airdrop(address to, uint256 numberOfTokens) external onlyOwner {
}
function preSaleMint(uint256 _mintCount) public payable onlyWhitelisted {
}
function mint(uint256 _mintCount) public payable {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function setPrice(uint256 _price, uint256 _pre_price) public onlyOwner {
}
function flipPreSale() public onlyOwner {
}
function flipPublicSale() public onlyOwner {
}
function flipRaffleSale() public onlyOwner {
}
function flipAllOff() public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
function totalSupply() public view returns (uint256) {
}
function info() public view returns (uint256, uint256, uint256, uint256, bool, bool, bool) {
}
function isApprovedForAll(address _owner, address operator) public view override returns (bool) {
}
}
contract OwnableDelegateProxy { }
contract OpenSeaProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
| totalWhitelist+addresses.length<=maxWhitelistLength,'This transaction would exceed max length of whitelist' | 303,179 | totalWhitelist+addresses.length<=maxWhitelistLength |
'This transaction would exceed max length of whitelist' | pragma solidity ^0.8.0;
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _setOwner(address newOwner) private {
}
}
pragma solidity ^0.8.9;
contract CryptoIlluminati777 is ERC721, Ownable {
using Counters for Counters.Counter;
using Strings for uint256;
string baseTokenURI;
string public baseExtension = "";
address public proxyRegistryAddress;
address payable private paymentAddress;
uint256 public prePrice = 0.07 ether;
uint256 public price = 0.17 ether;
uint256 public maxSupply = 7777;
uint256 public maxMintCount = 7;
bool public isPreSaleActive = false;
bool public isPublicSaleActive = false;
bool public isRaffleSaleActive = false;
bool public paused = false;
mapping(address => bool) public whitelist;
mapping(address => bool) public projectProxy;
uint256 public totalWhitelist;
uint256 public maxWhitelistLength = 4777;
Counters.Counter private _tokenIds;
modifier onlyWhitelisted() {
}
constructor() ERC721("CryptoIlluminati 777", "ILLUMINATI"){}
function setPaymentAddress(address _paymentAddress) external onlyOwner {
}
function setProxyRegistryAddress(address _proxyRegistryAddress) external onlyOwner {
}
function flipProxyState(address proxyAddress) public onlyOwner {
}
function multipleAddressesToWhiteList(address[] memory addresses) public onlyOwner {
}
function singleAddressToWhiteList(address userAddress) public onlyOwner {
require(userAddress != address(0), "Address can not be zero");
require(<FILL_ME>)
whitelist[userAddress] = true;
totalWhitelist++;
}
function removeAddressFromWhiteList(address userAddress) public onlyOwner {
}
function airdrop(address to, uint256 numberOfTokens) external onlyOwner {
}
function preSaleMint(uint256 _mintCount) public payable onlyWhitelisted {
}
function mint(uint256 _mintCount) public payable {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function setPrice(uint256 _price, uint256 _pre_price) public onlyOwner {
}
function flipPreSale() public onlyOwner {
}
function flipPublicSale() public onlyOwner {
}
function flipRaffleSale() public onlyOwner {
}
function flipAllOff() public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
function totalSupply() public view returns (uint256) {
}
function info() public view returns (uint256, uint256, uint256, uint256, bool, bool, bool) {
}
function isApprovedForAll(address _owner, address operator) public view override returns (bool) {
}
}
contract OwnableDelegateProxy { }
contract OpenSeaProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
| totalWhitelist+1<=maxWhitelistLength,'This transaction would exceed max length of whitelist' | 303,179 | totalWhitelist+1<=maxWhitelistLength |
'This transaction would exceed max supply of NFTs' | pragma solidity ^0.8.0;
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _setOwner(address newOwner) private {
}
}
pragma solidity ^0.8.9;
contract CryptoIlluminati777 is ERC721, Ownable {
using Counters for Counters.Counter;
using Strings for uint256;
string baseTokenURI;
string public baseExtension = "";
address public proxyRegistryAddress;
address payable private paymentAddress;
uint256 public prePrice = 0.07 ether;
uint256 public price = 0.17 ether;
uint256 public maxSupply = 7777;
uint256 public maxMintCount = 7;
bool public isPreSaleActive = false;
bool public isPublicSaleActive = false;
bool public isRaffleSaleActive = false;
bool public paused = false;
mapping(address => bool) public whitelist;
mapping(address => bool) public projectProxy;
uint256 public totalWhitelist;
uint256 public maxWhitelistLength = 4777;
Counters.Counter private _tokenIds;
modifier onlyWhitelisted() {
}
constructor() ERC721("CryptoIlluminati 777", "ILLUMINATI"){}
function setPaymentAddress(address _paymentAddress) external onlyOwner {
}
function setProxyRegistryAddress(address _proxyRegistryAddress) external onlyOwner {
}
function flipProxyState(address proxyAddress) public onlyOwner {
}
function multipleAddressesToWhiteList(address[] memory addresses) public onlyOwner {
}
function singleAddressToWhiteList(address userAddress) public onlyOwner {
}
function removeAddressFromWhiteList(address userAddress) public onlyOwner {
}
function airdrop(address to, uint256 numberOfTokens) external onlyOwner {
}
function preSaleMint(uint256 _mintCount) public payable onlyWhitelisted {
uint256 supply = _tokenIds.current();
require(!paused, 'NFT mint is paused');
require(isPreSaleActive, 'Pre Sale is not active');
require(_mintCount > 0, 'Mint count can not be 0');
require(_mintCount <= maxMintCount, string(abi.encodePacked('You can only mint ', maxMintCount.toString(), ' NFTs in one transaction')));
require(<FILL_ME>)
require(msg.value >= prePrice * _mintCount, 'Ether value is too low');
for (uint256 i = 0; i < _mintCount; i++) {
if (_tokenIds.current() < maxSupply) {
uint256 tokenID = _tokenIds.current();
_safeMint(msg.sender, tokenID);
_tokenIds.increment();
}
}
require(paymentAddress.send(msg.value));
}
function mint(uint256 _mintCount) public payable {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function setPrice(uint256 _price, uint256 _pre_price) public onlyOwner {
}
function flipPreSale() public onlyOwner {
}
function flipPublicSale() public onlyOwner {
}
function flipRaffleSale() public onlyOwner {
}
function flipAllOff() public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
function totalSupply() public view returns (uint256) {
}
function info() public view returns (uint256, uint256, uint256, uint256, bool, bool, bool) {
}
function isApprovedForAll(address _owner, address operator) public view override returns (bool) {
}
}
contract OwnableDelegateProxy { }
contract OpenSeaProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
| supply+_mintCount<=maxSupply,'This transaction would exceed max supply of NFTs' | 303,179 | supply+_mintCount<=maxSupply |
null | pragma solidity ^0.8.0;
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _setOwner(address newOwner) private {
}
}
pragma solidity ^0.8.9;
contract CryptoIlluminati777 is ERC721, Ownable {
using Counters for Counters.Counter;
using Strings for uint256;
string baseTokenURI;
string public baseExtension = "";
address public proxyRegistryAddress;
address payable private paymentAddress;
uint256 public prePrice = 0.07 ether;
uint256 public price = 0.17 ether;
uint256 public maxSupply = 7777;
uint256 public maxMintCount = 7;
bool public isPreSaleActive = false;
bool public isPublicSaleActive = false;
bool public isRaffleSaleActive = false;
bool public paused = false;
mapping(address => bool) public whitelist;
mapping(address => bool) public projectProxy;
uint256 public totalWhitelist;
uint256 public maxWhitelistLength = 4777;
Counters.Counter private _tokenIds;
modifier onlyWhitelisted() {
}
constructor() ERC721("CryptoIlluminati 777", "ILLUMINATI"){}
function setPaymentAddress(address _paymentAddress) external onlyOwner {
}
function setProxyRegistryAddress(address _proxyRegistryAddress) external onlyOwner {
}
function flipProxyState(address proxyAddress) public onlyOwner {
}
function multipleAddressesToWhiteList(address[] memory addresses) public onlyOwner {
}
function singleAddressToWhiteList(address userAddress) public onlyOwner {
}
function removeAddressFromWhiteList(address userAddress) public onlyOwner {
}
function airdrop(address to, uint256 numberOfTokens) external onlyOwner {
}
function preSaleMint(uint256 _mintCount) public payable onlyWhitelisted {
uint256 supply = _tokenIds.current();
require(!paused, 'NFT mint is paused');
require(isPreSaleActive, 'Pre Sale is not active');
require(_mintCount > 0, 'Mint count can not be 0');
require(_mintCount <= maxMintCount, string(abi.encodePacked('You can only mint ', maxMintCount.toString(), ' NFTs in one transaction')));
require(supply + _mintCount <= maxSupply, 'This transaction would exceed max supply of NFTs');
require(msg.value >= prePrice * _mintCount, 'Ether value is too low');
for (uint256 i = 0; i < _mintCount; i++) {
if (_tokenIds.current() < maxSupply) {
uint256 tokenID = _tokenIds.current();
_safeMint(msg.sender, tokenID);
_tokenIds.increment();
}
}
require(<FILL_ME>)
}
function mint(uint256 _mintCount) public payable {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function setPrice(uint256 _price, uint256 _pre_price) public onlyOwner {
}
function flipPreSale() public onlyOwner {
}
function flipPublicSale() public onlyOwner {
}
function flipRaffleSale() public onlyOwner {
}
function flipAllOff() public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
function totalSupply() public view returns (uint256) {
}
function info() public view returns (uint256, uint256, uint256, uint256, bool, bool, bool) {
}
function isApprovedForAll(address _owner, address operator) public view override returns (bool) {
}
}
contract OwnableDelegateProxy { }
contract OpenSeaProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
| paymentAddress.send(msg.value) | 303,179 | paymentAddress.send(msg.value) |
'Public sale is not active' | pragma solidity ^0.8.0;
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _setOwner(address newOwner) private {
}
}
pragma solidity ^0.8.9;
contract CryptoIlluminati777 is ERC721, Ownable {
using Counters for Counters.Counter;
using Strings for uint256;
string baseTokenURI;
string public baseExtension = "";
address public proxyRegistryAddress;
address payable private paymentAddress;
uint256 public prePrice = 0.07 ether;
uint256 public price = 0.17 ether;
uint256 public maxSupply = 7777;
uint256 public maxMintCount = 7;
bool public isPreSaleActive = false;
bool public isPublicSaleActive = false;
bool public isRaffleSaleActive = false;
bool public paused = false;
mapping(address => bool) public whitelist;
mapping(address => bool) public projectProxy;
uint256 public totalWhitelist;
uint256 public maxWhitelistLength = 4777;
Counters.Counter private _tokenIds;
modifier onlyWhitelisted() {
}
constructor() ERC721("CryptoIlluminati 777", "ILLUMINATI"){}
function setPaymentAddress(address _paymentAddress) external onlyOwner {
}
function setProxyRegistryAddress(address _proxyRegistryAddress) external onlyOwner {
}
function flipProxyState(address proxyAddress) public onlyOwner {
}
function multipleAddressesToWhiteList(address[] memory addresses) public onlyOwner {
}
function singleAddressToWhiteList(address userAddress) public onlyOwner {
}
function removeAddressFromWhiteList(address userAddress) public onlyOwner {
}
function airdrop(address to, uint256 numberOfTokens) external onlyOwner {
}
function preSaleMint(uint256 _mintCount) public payable onlyWhitelisted {
}
function mint(uint256 _mintCount) public payable {
uint256 supply = _tokenIds.current();
require(!paused, 'NFT minting is paused');
require(<FILL_ME>)
require(_mintCount > 0, 'Mint count can not be 0');
require(_mintCount <= maxMintCount, string(abi.encodePacked('You can only mint ', maxMintCount.toString(), ' NFTs in one transaction')));
require(supply + _mintCount <= maxSupply, 'This transaction would exceed max supply of NFTs');
require(msg.value >= price * _mintCount, 'Ether value is too low');
for (uint256 i = 0; i < _mintCount; i++) {
if (_tokenIds.current() < maxSupply) {
uint256 tokenID = _tokenIds.current();
_safeMint(msg.sender, tokenID);
_tokenIds.increment();
}
}
require(paymentAddress.send(msg.value));
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function setPrice(uint256 _price, uint256 _pre_price) public onlyOwner {
}
function flipPreSale() public onlyOwner {
}
function flipPublicSale() public onlyOwner {
}
function flipRaffleSale() public onlyOwner {
}
function flipAllOff() public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
function totalSupply() public view returns (uint256) {
}
function info() public view returns (uint256, uint256, uint256, uint256, bool, bool, bool) {
}
function isApprovedForAll(address _owner, address operator) public view override returns (bool) {
}
}
contract OwnableDelegateProxy { }
contract OpenSeaProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
| isPublicSaleActive||isRaffleSaleActive,'Public sale is not active' | 303,179 | isPublicSaleActive||isRaffleSaleActive |
"Not enough tokens to sell!" | // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)
pragma solidity ^0.8.0;
/**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Metadata is IERC721 {
/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/
function tokenURI(uint256 tokenId) external view returns (string memory);
}
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Does not support burning tokens to address(0).
*
* Assumes that an owner cannot have more than the 2**128 - 1 (max value of uint128) of supply
*/
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMinted;
}
uint256 internal currentIndex = 1;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to ownership details
// An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details.
mapping(uint256 => TokenOwnership) internal _ownerships;
// Mapping owner address to address data
mapping(address => AddressData) private _addressData;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
constructor(string memory name_, string memory symbol_) {
}
/**
* @dev See {IERC721Enumerable-totalSupply}.
*/
function totalSupply() public view override returns (uint256) {
}
/**
* @dev See {IERC721Enumerable-tokenByIndex}.
*/
function tokenByIndex(uint256 index) public view override returns (uint256) {
}
/**
* @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
* This read function is O(totalSupply). If calling from a separate contract, be sure to test gas first.
* It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view override returns (uint256) {
}
function _numberMinted(address owner) internal view returns (uint256) {
}
/**
* Gas spent here starts off proportional to the maximum mint batch size.
* It gradually moves to O(1) as tokens get transferred around in the collection over time.
*/
function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view override returns (address) {
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overriden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public override {
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view override returns (address) {
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public override {
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public override {
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
*/
function _exists(uint256 tokenId) internal view returns (bool) {
}
function _safeMint(address to, uint256 quantity) internal {
}
/**
* @dev Safely mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
* - `quantity` must be greater than 0.
*
* Emits a {Transfer} event.
*/
function _safeMint(
address to,
uint256 quantity,
bytes memory _data
) internal {
}
/**
* @dev Mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `quantity` must be greater than 0.
*
* Emits a {Transfer} event.
*/
function _mint(
address to,
uint256 quantity,
bytes memory _data,
bool safe
) internal {
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) private {
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/
function _approve(
address to,
uint256 tokenId,
address owner
) private {
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
* The call is not executed if the target address is not a contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId uint256 ID of the token to be transferred
* @param _data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
}
/**
* @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
*/
function _beforeTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
/**
* @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes
* minting.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero.
* - `from` and `to` are never both zero.
*/
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
}
contract Doodle_Ape_Planet is ERC721A {
mapping (address => uint8) public _minted;
uint public salePrice;
uint public reachedCapPrice;
uint16 public maxSupply;
uint8 public maxPerTx;
uint8 public maxPerWallet;
bool public publicMintStatus;
string public baseURI;
address private owner;
function _baseURI() internal view override returns (string memory) {
}
function setBaseURI(string memory _newBaseURI) external onlyOwner {
}
function setSalePrice(uint price) external onlyOwner {
}
function setReachedCapPrice(uint price) external onlyOwner {
}
function setMaxSupply(uint16 supply) external onlyOwner {
}
function setMaxPerTx(uint8 max) external onlyOwner {
}
function setMaxPerWallet(uint8 max) external onlyOwner {
}
function setPublicMintStatus() external onlyOwner {
}
function withdraw() external onlyOwner {
}
modifier onlyOwner {
}
function transferOwnership(address newOwner) external onlyOwner {
}
constructor() ERC721A("Doodle Ape Palnet", "DAP") {
}
function publicMint(uint8 amount) external payable {
require(publicMintStatus, "Sale not active!");
require(<FILL_ME>)
require(amount <= maxPerTx, "Incorrect amount!");
require(_minted[msg.sender] + amount <= maxPerWallet, "Incorrect amount!");
if(currentIndex + amount > 5000){
require(msg.value == reachedCapPrice * amount, "Incorrect amount!");
_safeMint(msg.sender, amount);
_minted[msg.sender] += amount;
}else{
require(msg.value == salePrice * amount, "Incorrect amount!");
_safeMint(msg.sender, amount);
_minted[msg.sender] += amount;
}
}
}
| currentIndex+amount<=maxSupply+1,"Not enough tokens to sell!" | 303,306 | currentIndex+amount<=maxSupply+1 |
"Incorrect amount!" | // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)
pragma solidity ^0.8.0;
/**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Metadata is IERC721 {
/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/
function tokenURI(uint256 tokenId) external view returns (string memory);
}
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).
*
* Does not support burning tokens to address(0).
*
* Assumes that an owner cannot have more than the 2**128 - 1 (max value of uint128) of supply
*/
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMinted;
}
uint256 internal currentIndex = 1;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to ownership details
// An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details.
mapping(uint256 => TokenOwnership) internal _ownerships;
// Mapping owner address to address data
mapping(address => AddressData) private _addressData;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
constructor(string memory name_, string memory symbol_) {
}
/**
* @dev See {IERC721Enumerable-totalSupply}.
*/
function totalSupply() public view override returns (uint256) {
}
/**
* @dev See {IERC721Enumerable-tokenByIndex}.
*/
function tokenByIndex(uint256 index) public view override returns (uint256) {
}
/**
* @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
* This read function is O(totalSupply). If calling from a separate contract, be sure to test gas first.
* It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view override returns (uint256) {
}
function _numberMinted(address owner) internal view returns (uint256) {
}
/**
* Gas spent here starts off proportional to the maximum mint batch size.
* It gradually moves to O(1) as tokens get transferred around in the collection over time.
*/
function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view override returns (address) {
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overriden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public override {
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view override returns (address) {
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public override {
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public override {
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
*/
function _exists(uint256 tokenId) internal view returns (bool) {
}
function _safeMint(address to, uint256 quantity) internal {
}
/**
* @dev Safely mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
* - `quantity` must be greater than 0.
*
* Emits a {Transfer} event.
*/
function _safeMint(
address to,
uint256 quantity,
bytes memory _data
) internal {
}
/**
* @dev Mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `quantity` must be greater than 0.
*
* Emits a {Transfer} event.
*/
function _mint(
address to,
uint256 quantity,
bytes memory _data,
bool safe
) internal {
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) private {
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/
function _approve(
address to,
uint256 tokenId,
address owner
) private {
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
* The call is not executed if the target address is not a contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId uint256 ID of the token to be transferred
* @param _data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
}
/**
* @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
*/
function _beforeTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
/**
* @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes
* minting.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero.
* - `from` and `to` are never both zero.
*/
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
}
contract Doodle_Ape_Planet is ERC721A {
mapping (address => uint8) public _minted;
uint public salePrice;
uint public reachedCapPrice;
uint16 public maxSupply;
uint8 public maxPerTx;
uint8 public maxPerWallet;
bool public publicMintStatus;
string public baseURI;
address private owner;
function _baseURI() internal view override returns (string memory) {
}
function setBaseURI(string memory _newBaseURI) external onlyOwner {
}
function setSalePrice(uint price) external onlyOwner {
}
function setReachedCapPrice(uint price) external onlyOwner {
}
function setMaxSupply(uint16 supply) external onlyOwner {
}
function setMaxPerTx(uint8 max) external onlyOwner {
}
function setMaxPerWallet(uint8 max) external onlyOwner {
}
function setPublicMintStatus() external onlyOwner {
}
function withdraw() external onlyOwner {
}
modifier onlyOwner {
}
function transferOwnership(address newOwner) external onlyOwner {
}
constructor() ERC721A("Doodle Ape Palnet", "DAP") {
}
function publicMint(uint8 amount) external payable {
require(publicMintStatus, "Sale not active!");
require(currentIndex + amount <= maxSupply + 1, "Not enough tokens to sell!");
require(amount <= maxPerTx, "Incorrect amount!");
require(<FILL_ME>)
if(currentIndex + amount > 5000){
require(msg.value == reachedCapPrice * amount, "Incorrect amount!");
_safeMint(msg.sender, amount);
_minted[msg.sender] += amount;
}else{
require(msg.value == salePrice * amount, "Incorrect amount!");
_safeMint(msg.sender, amount);
_minted[msg.sender] += amount;
}
}
}
| _minted[msg.sender]+amount<=maxPerWallet,"Incorrect amount!" | 303,306 | _minted[msg.sender]+amount<=maxPerWallet |
null | pragma solidity ^0.4.18;
/**
* @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 Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
// Public variable with address of owner
address public owner;
/**
* Log ownership transference
*/
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) onlyOwner public {
}
}
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
uint256 public totalSupply = 0;
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);
}
contract MintableToken is ERC20Basic, Ownable {
bool public mintingFinished = false;
event Mint(address indexed to, uint256 amount);
event MintFinished();
modifier canMint() {
}
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) {
}
}
/**
* @title Extended ERC20 Token contract
* @dev Custom Token (ERC20 Token) transactions.
*/
contract StyrasToken is MintableToken {
using SafeMath for uint256;
string public name = "Styras";
string public symbol = "STY";
uint256 public decimals = 18;
uint256 public reservedSupply;
uint256 public publicLockEnd = 1516060800; // GMT: Tuesday, January 16, 2018 0:00:00
uint256 public partnersLockEnd = 1530230400; // GMT: Friday, June 29, 2018 0:00:00
uint256 public partnersMintLockEnd = 1514678400; // GMT: Sunday, December 31, 2017 0:00:00
address public partnersWallet;
mapping(address => uint256) balances;
mapping (address => mapping (address => uint256)) internal allowed;
event Approval(address indexed owner, address indexed spender, uint256 value);
event Transfer(address indexed from, address indexed to, uint256 value);
event Burn(address indexed burner, uint256 value);
/**
* Initializes contract with initial supply tokens to the creator of the contract
*/
function StyrasToken(address partners, uint256 reserved) public {
}
/**
* @dev Gets the balance of the specified address.
* @param investor The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address investor) public constant returns (uint256 balanceOfInvestor) {
}
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _amount The amount to be transferred.
*/
function transfer(address _to, uint256 _amount) public returns (bool) {
require(_to != address(0));
require(<FILL_ME>)
require(_amount > 0 && _amount <= balances[msg.sender]);
balances[msg.sender] = balances[msg.sender].sub(_amount);
balances[_to] = balances[_to].add(_amount);
Transfer(msg.sender, _to, _amount);
return true;
}
/**
* @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 _amount uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _amount) public returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
}
/**
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
*/
function increaseApproval (address _spender, uint _addedValue) public returns (bool success) {
}
function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) {
}
/**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/
function burn(uint256 _value) public {
}
/**
* @dev Function to mint tokens
* @param _to The address that will receive the minted tokens.
* @param _amount The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/
function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
}
/**
* @dev Function to mint reserved tokens to partners
* @return A boolean that indicates if the operation was successful.
*/
function mintPartners(uint256 amount) onlyOwner canMint public returns (bool) {
}
}
/**
* @title RefundVault
* @dev This contract is used for storing funds while a crowdsale
* is in progress. Supports refunding the money if crowdsale fails,
* and forwarding it if crowdsale is successful.
*/
contract RefundVault is Ownable {
using SafeMath for uint256;
enum State { Active, Refunding, Closed }
mapping (address => uint256) public deposited;
address public wallet;
State public state;
event Closed();
event RefundsEnabled();
event Refunded(address indexed beneficiary, uint256 weiAmount);
function RefundVault(address _to) public {
}
function deposit(address investor) onlyOwner public payable {
}
function close() onlyOwner public {
}
function enableRefunds() onlyOwner public {
}
function refund(address investor) public {
}
}
contract Withdrawable is Ownable {
bool public withdrawEnabled = false;
address public wallet;
event Withdrawed(uint256 weiAmount);
function Withdrawable(address _to) public {
}
modifier canWithdraw() {
}
function enableWithdraw() onlyOwner public {
}
// owner can withdraw ether here
function withdraw(uint256 weiAmount) onlyOwner canWithdraw public {
}
}
contract StyrasVault is Withdrawable, RefundVault {
function StyrasVault(address wallet) public
Withdrawable(wallet)
RefundVault(wallet) {
}
function balanceOf(address investor) public constant returns (uint256 depositedByInvestor) {
}
function enableWithdraw() onlyOwner public {
}
}
/**
* @title StyrasCrowdsale
* @dev This is a capped and refundable crowdsale.
*/
contract StyrasCrowdsale is Ownable {
using SafeMath for uint256;
enum State { preSale, publicSale, hasFinalized }
// how many token units a buyer gets per ether
// minimum amount of funds (soft-cap) to be raised in weis
// maximum amount of funds (hard-cap) to be raised in weis
// minimum amount of weis to invest per investor
uint256 public rate;
uint256 public goal;
uint256 public cap;
uint256 public minInvest = 100000000000000000; // 0.1 ETH
// presale treats
uint256 public presaleDeadline = 1511827200; // GMT: Tuesday, November 28, 2017 00:00:00
uint256 public presaleRate = 4000; // 1 ETH == 4000 STY 33% bonus
uint256 public presaleCap = 50000000000000000000000000; // 50 millions STY
// pubsale treats
uint256 public pubsaleDeadline = 1514678400; // GMT: Sunday, December 31, 2017 0:00:00
uint256 public pubsaleRate = 3000; // 1 ETH == 3000 STY
uint256 public pubsaleCap = 180000000000000000000000000;
// harrd cap = pubsaleCap + reservedSupply -> 200000000 DTY
uint256 public reservedSupply = 20000000000000000000000000; // 10% max totalSupply
uint256 public softCap = 840000000000000000000000; // 840 thousands STY
// start and end timestamps where investments are allowed (both inclusive)
// flag for investments finalization
uint256 public startTime = 1511276400; // GMT: Tuesday, November 21, 2017 15:00:00
uint256 public endTime;
// amount of raised money in wei
// address where funds are collected
uint256 public weiRaised = 0;
address public escrowWallet;
address public partnersWallet;
// contract of the token being sold
// contract of the vault used to hold funds while crowdsale is running
StyrasToken public token;
StyrasVault public vault;
State public state;
/**
* event for token purchase logging
* @param purchaser who paid for the tokens
* @param beneficiary who got the tokens
* @param value weis paid for purchase
* @param amount amount of tokens purchased
*/
event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount);
event PresaleFinalized();
event Finalized();
function StyrasCrowdsale(address escrow, address partners) public {
}
// fallback function can be used to buy tokens
function () public payable {
}
// low level token purchase function
function buyTokens(address beneficiary) public payable {
}
// send ether to the fund collection wallet
// override to create custom fund forwarding mechanisms
function forwardFunds() internal {
}
// @return true if the transaction can buy tokens
function validPurchase() internal constant returns (bool) {
}
function hardCap() public constant returns (uint256) {
}
function goalReached() public constant returns (bool) {
}
// @return true if crowdsale event has ended
function hasEnded() public constant returns (bool) {
}
// if crowdsale is unsuccessful, investors can claim refunds here
function claimRefund() public {
}
function enableWithdraw() onlyOwner public {
}
// if crowdsale is successful, owner can withdraw ether here
function withdraw(uint256 _weiAmountToWithdraw) onlyOwner public {
}
function finalizePresale() onlyOwner public {
}
/**
* @dev Must be called after crowdsale ends, to do some extra finalization
* work. Calls the contract's finalization function.
*/
function finalize() onlyOwner public {
}
// vault finalization task, called when owner calls finalize()
function finalization() internal {
}
}
| (msg.sender!=partnersWallet&&now>=publicLockEnd)||now>=partnersLockEnd | 303,419 | (msg.sender!=partnersWallet&&now>=publicLockEnd)||now>=partnersLockEnd |
null | pragma solidity ^0.4.18;
/**
* @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 Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
// Public variable with address of owner
address public owner;
/**
* Log ownership transference
*/
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) onlyOwner public {
}
}
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
uint256 public totalSupply = 0;
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);
}
contract MintableToken is ERC20Basic, Ownable {
bool public mintingFinished = false;
event Mint(address indexed to, uint256 amount);
event MintFinished();
modifier canMint() {
}
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) {
}
}
/**
* @title Extended ERC20 Token contract
* @dev Custom Token (ERC20 Token) transactions.
*/
contract StyrasToken is MintableToken {
using SafeMath for uint256;
string public name = "Styras";
string public symbol = "STY";
uint256 public decimals = 18;
uint256 public reservedSupply;
uint256 public publicLockEnd = 1516060800; // GMT: Tuesday, January 16, 2018 0:00:00
uint256 public partnersLockEnd = 1530230400; // GMT: Friday, June 29, 2018 0:00:00
uint256 public partnersMintLockEnd = 1514678400; // GMT: Sunday, December 31, 2017 0:00:00
address public partnersWallet;
mapping(address => uint256) balances;
mapping (address => mapping (address => uint256)) internal allowed;
event Approval(address indexed owner, address indexed spender, uint256 value);
event Transfer(address indexed from, address indexed to, uint256 value);
event Burn(address indexed burner, uint256 value);
/**
* Initializes contract with initial supply tokens to the creator of the contract
*/
function StyrasToken(address partners, uint256 reserved) public {
}
/**
* @dev Gets the balance of the specified address.
* @param investor The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address investor) public constant returns (uint256 balanceOfInvestor) {
}
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _amount The amount to be transferred.
*/
function transfer(address _to, uint256 _amount) 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 _amount uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _amount) public returns (bool) {
require(_to != address(0));
require(<FILL_ME>)
require(_amount > 0 && _amount <= balances[_from]);
require(_amount <= allowed[_from][msg.sender]);
balances[_from] = balances[_from].sub(_amount);
balances[_to] = balances[_to].add(_amount);
allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_amount);
Transfer(_from, _to, _amount);
return true;
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
}
/**
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
*/
function increaseApproval (address _spender, uint _addedValue) public returns (bool success) {
}
function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) {
}
/**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/
function burn(uint256 _value) public {
}
/**
* @dev Function to mint tokens
* @param _to The address that will receive the minted tokens.
* @param _amount The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/
function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
}
/**
* @dev Function to mint reserved tokens to partners
* @return A boolean that indicates if the operation was successful.
*/
function mintPartners(uint256 amount) onlyOwner canMint public returns (bool) {
}
}
/**
* @title RefundVault
* @dev This contract is used for storing funds while a crowdsale
* is in progress. Supports refunding the money if crowdsale fails,
* and forwarding it if crowdsale is successful.
*/
contract RefundVault is Ownable {
using SafeMath for uint256;
enum State { Active, Refunding, Closed }
mapping (address => uint256) public deposited;
address public wallet;
State public state;
event Closed();
event RefundsEnabled();
event Refunded(address indexed beneficiary, uint256 weiAmount);
function RefundVault(address _to) public {
}
function deposit(address investor) onlyOwner public payable {
}
function close() onlyOwner public {
}
function enableRefunds() onlyOwner public {
}
function refund(address investor) public {
}
}
contract Withdrawable is Ownable {
bool public withdrawEnabled = false;
address public wallet;
event Withdrawed(uint256 weiAmount);
function Withdrawable(address _to) public {
}
modifier canWithdraw() {
}
function enableWithdraw() onlyOwner public {
}
// owner can withdraw ether here
function withdraw(uint256 weiAmount) onlyOwner canWithdraw public {
}
}
contract StyrasVault is Withdrawable, RefundVault {
function StyrasVault(address wallet) public
Withdrawable(wallet)
RefundVault(wallet) {
}
function balanceOf(address investor) public constant returns (uint256 depositedByInvestor) {
}
function enableWithdraw() onlyOwner public {
}
}
/**
* @title StyrasCrowdsale
* @dev This is a capped and refundable crowdsale.
*/
contract StyrasCrowdsale is Ownable {
using SafeMath for uint256;
enum State { preSale, publicSale, hasFinalized }
// how many token units a buyer gets per ether
// minimum amount of funds (soft-cap) to be raised in weis
// maximum amount of funds (hard-cap) to be raised in weis
// minimum amount of weis to invest per investor
uint256 public rate;
uint256 public goal;
uint256 public cap;
uint256 public minInvest = 100000000000000000; // 0.1 ETH
// presale treats
uint256 public presaleDeadline = 1511827200; // GMT: Tuesday, November 28, 2017 00:00:00
uint256 public presaleRate = 4000; // 1 ETH == 4000 STY 33% bonus
uint256 public presaleCap = 50000000000000000000000000; // 50 millions STY
// pubsale treats
uint256 public pubsaleDeadline = 1514678400; // GMT: Sunday, December 31, 2017 0:00:00
uint256 public pubsaleRate = 3000; // 1 ETH == 3000 STY
uint256 public pubsaleCap = 180000000000000000000000000;
// harrd cap = pubsaleCap + reservedSupply -> 200000000 DTY
uint256 public reservedSupply = 20000000000000000000000000; // 10% max totalSupply
uint256 public softCap = 840000000000000000000000; // 840 thousands STY
// start and end timestamps where investments are allowed (both inclusive)
// flag for investments finalization
uint256 public startTime = 1511276400; // GMT: Tuesday, November 21, 2017 15:00:00
uint256 public endTime;
// amount of raised money in wei
// address where funds are collected
uint256 public weiRaised = 0;
address public escrowWallet;
address public partnersWallet;
// contract of the token being sold
// contract of the vault used to hold funds while crowdsale is running
StyrasToken public token;
StyrasVault public vault;
State public state;
/**
* event for token purchase logging
* @param purchaser who paid for the tokens
* @param beneficiary who got the tokens
* @param value weis paid for purchase
* @param amount amount of tokens purchased
*/
event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount);
event PresaleFinalized();
event Finalized();
function StyrasCrowdsale(address escrow, address partners) public {
}
// fallback function can be used to buy tokens
function () public payable {
}
// low level token purchase function
function buyTokens(address beneficiary) public payable {
}
// send ether to the fund collection wallet
// override to create custom fund forwarding mechanisms
function forwardFunds() internal {
}
// @return true if the transaction can buy tokens
function validPurchase() internal constant returns (bool) {
}
function hardCap() public constant returns (uint256) {
}
function goalReached() public constant returns (bool) {
}
// @return true if crowdsale event has ended
function hasEnded() public constant returns (bool) {
}
// if crowdsale is unsuccessful, investors can claim refunds here
function claimRefund() public {
}
function enableWithdraw() onlyOwner public {
}
// if crowdsale is successful, owner can withdraw ether here
function withdraw(uint256 _weiAmountToWithdraw) onlyOwner public {
}
function finalizePresale() onlyOwner public {
}
/**
* @dev Must be called after crowdsale ends, to do some extra finalization
* work. Calls the contract's finalization function.
*/
function finalize() onlyOwner public {
}
// vault finalization task, called when owner calls finalize()
function finalization() internal {
}
}
| (_from!=partnersWallet&&now>=publicLockEnd)||now>=partnersLockEnd | 303,419 | (_from!=partnersWallet&&now>=publicLockEnd)||now>=partnersLockEnd |
null | pragma solidity ^0.4.19;
contract ETHRoyale {
address devAccount = 0x50334D202f61F80384C065BE6537DD3d609FF9Ab; //Dev address to send dev fee (0.75%) to.
uint masterBalance; //uint var for total real balance of contract
uint masterApparentBalance; //var for total apparent balance of contract (real balance + all fake interest collected)
//Array log of current participants
address[] public participants;
mapping (address => uint) participantsArrayLocation;
uint participantsCount;
//Boolean to check if deposits are enabled
bool isDisabled;
bool hasStarted;
//Track deposit times
uint blockHeightStart;
bool isStart;
event Deposit(uint _valu);
//Mappings to link account values and dates of last interest claim with an Ethereum address
mapping (address => uint) accountBalance;
mapping (address => uint) realAccountBalance;
mapping (address => uint) depositBlockheight;
//Check individual account balance and return balance associated with that address
function checkAccBalance() public view returns (uint) {
}
//Check actual balance of all wallets
function checkGlobalBalance() public view returns (uint) {
}
//Check game status
function checkGameStatus() public view returns (bool) {
}
function checkDisabledStatus() public view returns (bool) {
}
//Check interest due
function checkInterest() public view returns (uint) {
}
//Check interest due + balance
function checkWithdrawalAmount() public view returns (uint) {
}
//check number of participants
function numberParticipants() public view returns (uint) {
}
//Take deposit of funds
function deposit() payable public {
address _owner = msg.sender;
uint _amt = msg.value;
require(<FILL_ME>)
if (accountBalance[_owner] == 0) { //If account is a new player, add them to mappings and arrays
participants.push(_owner);
participantsArrayLocation[_owner] = participants.length - 1;
depositBlockheight[_owner] = block.number;
participantsCount++;
if (participantsCount > 4) { //If game has 5 or more players, interest can start.
isStart = true;
blockHeightStart = block.number;
hasStarted = true;
}
}
else {
isStart = false;
blockHeightStart = 0;
}
Deposit(_amt);
//add deposit to amounts
accountBalance[_owner] += _amt;
realAccountBalance[_owner] += _amt;
masterBalance += _amt;
masterApparentBalance += _amt;
}
//Retrieve interest earned since last interest collection
function collectInterest(address _owner) internal {
}
//Allow withdrawal of funds and if funds left in contract are less than withdrawal requested and greater or = to account balance, contract balance will be cleared
function withdraw(uint _amount) public {
}
//Check if sender address is a contract for security purposes.
function isNotContract(address addr) internal view returns (bool) {
}
}
| !isDisabled&&_amt>=10000000000000000&&isNotContract(_owner) | 303,420 | !isDisabled&&_amt>=10000000000000000&&isNotContract(_owner) |
null | pragma solidity ^0.4.19;
contract ETHRoyale {
address devAccount = 0x50334D202f61F80384C065BE6537DD3d609FF9Ab; //Dev address to send dev fee (0.75%) to.
uint masterBalance; //uint var for total real balance of contract
uint masterApparentBalance; //var for total apparent balance of contract (real balance + all fake interest collected)
//Array log of current participants
address[] public participants;
mapping (address => uint) participantsArrayLocation;
uint participantsCount;
//Boolean to check if deposits are enabled
bool isDisabled;
bool hasStarted;
//Track deposit times
uint blockHeightStart;
bool isStart;
event Deposit(uint _valu);
//Mappings to link account values and dates of last interest claim with an Ethereum address
mapping (address => uint) accountBalance;
mapping (address => uint) realAccountBalance;
mapping (address => uint) depositBlockheight;
//Check individual account balance and return balance associated with that address
function checkAccBalance() public view returns (uint) {
}
//Check actual balance of all wallets
function checkGlobalBalance() public view returns (uint) {
}
//Check game status
function checkGameStatus() public view returns (bool) {
}
function checkDisabledStatus() public view returns (bool) {
}
//Check interest due
function checkInterest() public view returns (uint) {
}
//Check interest due + balance
function checkWithdrawalAmount() public view returns (uint) {
}
//check number of participants
function numberParticipants() public view returns (uint) {
}
//Take deposit of funds
function deposit() payable public {
}
//Retrieve interest earned since last interest collection
function collectInterest(address _owner) internal {
}
//Allow withdrawal of funds and if funds left in contract are less than withdrawal requested and greater or = to account balance, contract balance will be cleared
function withdraw(uint _amount) public {
address _owner = msg.sender;
uint _amt = _amount;
uint _devFee;
require(<FILL_ME>)
if (isStart) { //Collect interest due if game has started
collectInterest(msg.sender);
}
require (_amt <= accountBalance[_owner]);
if (accountBalance[_owner] == _amount || accountBalance[_owner] - _amount < 10000000000000000) { //Check if sender is withdrawing their entire balance or will leave less than 0.01ETH
_amt = accountBalance[_owner];
if (_amt > masterBalance) { //If contract balance is lower than account balance, withdraw account balance.
_amt = masterBalance;
}
_devFee = _amt / 133; //Take 0.75% dev fee
_amt -= _devFee;
masterApparentBalance -= _devFee;
masterBalance -= _devFee;
accountBalance[_owner] -= _devFee;
masterBalance -= _amt;
masterApparentBalance -= _amt;
//Delete sender address from mappings and arrays if they are withdrawing their entire balance
delete accountBalance[_owner];
delete depositBlockheight[_owner];
delete participants[participantsArrayLocation[_owner]];
delete participantsArrayLocation[_owner];
delete realAccountBalance[_owner];
participantsCount--;
if (participantsCount < 5) { //If there are less than 5 people, stop the game.
isStart = false;
if (participantsCount < 3 && hasStarted) { //If there are less than 3 players and the game was started earlier, disable deposits until there are no players left
isDisabled = true;
}
if (participantsCount == 0) { //Enable deposits if there are no players currently deposited
isDisabled = false;
hasStarted = false;
}
}
}
else if (accountBalance[_owner] > _amount){ //Check that account has enough balance to withdraw
if (_amt > masterBalance) {
_amt = masterBalance;
}
_devFee = _amt / 133; //Take 0.75% of withdrawal for dev fee and subtract withdrawal amount from all balances
_amt -= _devFee;
masterApparentBalance -= _devFee;
masterBalance -= _devFee;
accountBalance[_owner] -= _devFee;
accountBalance[_owner] -= _amt;
realAccountBalance[_owner] -= _amt;
masterBalance -= _amt;
masterApparentBalance -= _amt;
}
Deposit(_amt);
devAccount.transfer(_devFee);
_owner.transfer(_amt);
}
//Check if sender address is a contract for security purposes.
function isNotContract(address addr) internal view returns (bool) {
}
}
| accountBalance[_owner]>0&&_amt>0&&isNotContract(_owner) | 303,420 | accountBalance[_owner]>0&&_amt>0&&isNotContract(_owner) |
null | pragma solidity 0.4.24;
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to relinquish control of the contract.
*/
function renounceOwnership() public onlyOwner {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function transferOwnership(address _newOwner) public onlyOwner {
}
/**
* @dev Transfers control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function _transferOwnership(address _newOwner) internal {
}
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
}
contract BFEXMini is Ownable {
using SafeMath for uint256;
// Start and end timestamps
uint public startTime;
/* uint public endTime; */
// BFEX Address where funds are collected
address public wallet;
address public feeWallet;
// Whitelist Enable
bool public whitelistEnable;
// timeLimitEnable Enable
bool public timeLimitEnable;
mapping (address => bool) public whitelist;
mapping (address => uint256) public bfexAmount; // 18 digits
mapping (address => uint256) public weiParticipate;
mapping (address => uint256) public balances;
// Amount of wei raised
uint256 public weiRaised = 0;
// BFEX price pair with ETH
uint256 public rate;
uint256 public rateSecondTier;
// Minimum ETH to participate
uint256 public minimum;
// number of contributor
uint256 public contributor;
// Maximun number of contributor
uint256 public maxContributor;
event BFEXParticipate(
address sender,
uint256 amount
);
event WhitelistState(
address beneficiary,
bool whitelistState
);
event LogWithdrawal(
address receiver,
uint amount
);
/* solhint-disable */
constructor(address _wallet, address _feeWallet, uint256 _rate, uint256 _rateSecondTier, uint256 _minimum) public {
}
/* solhint-enable */
/**
* @dev Fallback function that can be used to participate in token generation event.
*/
function() external payable {
}
/**
* @dev set rate of Token per 1 ETH
* @param _rate of Token per 1 ETH
*/
function setRate(uint _rate) public onlyOwner {
}
/**
* @dev setMinimum amount to participate
* @param _minimum minimum amount in wei
*/
function setMinimum(uint256 _minimum) public onlyOwner {
}
/**
* @dev setMinimum amount to participate
* @param _max Maximum contributor allowed
*/
function setMaxContributor(uint256 _max) public onlyOwner {
}
/**
* @dev Add single address to whitelist.
* @param _beneficiary Address to be added to the whitelist
*/
function addToWhitelist(address _beneficiary) external onlyOwner {
}
/**
* @dev Adds list of addresses to whitelist. Not overloaded due to limitations with truffle testing.
* @param _beneficiaries Addresses to be added to the whitelist
*/
function addManyToWhitelist(address[] _beneficiaries) external onlyOwner {
}
/**
* @dev Remove single address from whitelist.
* @param _beneficiary Address to be removed from the whitelist
*/
function removeFromWhiteList(address _beneficiary) external onlyOwner {
}
function isWhitelist(address _beneficiary) public view returns (bool whitelisted) {
}
function checkBenefit(address _beneficiary) public view returns (uint256 bfex) {
}
function checkContribution(address _beneficiary) public view returns (uint256 weiContribute) {
}
/**
* @dev getBfex function
* @param _participant Address performing the bfex token participate
*/
function getBFEX(address _participant) public payable {
}
/**
* @dev calculate token amont
* @param _weiAmount wei amont user are participate
*/
function _getTokenAmount(uint256 _weiAmount) internal view returns (uint256) {
}
/**
* @dev check if address is on the whitelist
* @param _participant address
*/
function _preApprove(address _participant) internal view {
require (maxContributor >= contributor);
if (timeLimitEnable == true) {
require (now >= startTime && now <= startTime + 1 days);
}
if (whitelistEnable == true) {
require(<FILL_ME>)
return;
} else {
return;
}
}
/**
* @dev disable whitelist state
*
*/
function disableWhitelist() public onlyOwner returns (bool whitelistState) {
}
/**
* @dev enable whitelist state
*
*/
function enableWhitelist() public onlyOwner returns (bool whitelistState) {
}
function withdraw(uint _value) public returns (bool success) {
}
function checkBalance(address _account) public view returns (uint256 balance) {
}
}
| isWhitelist(_participant) | 303,458 | isWhitelist(_participant) |
null | pragma solidity 0.4.24;
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to relinquish control of the contract.
*/
function renounceOwnership() public onlyOwner {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function transferOwnership(address _newOwner) public onlyOwner {
}
/**
* @dev Transfers control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function _transferOwnership(address _newOwner) internal {
}
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
}
contract BFEXMini is Ownable {
using SafeMath for uint256;
// Start and end timestamps
uint public startTime;
/* uint public endTime; */
// BFEX Address where funds are collected
address public wallet;
address public feeWallet;
// Whitelist Enable
bool public whitelistEnable;
// timeLimitEnable Enable
bool public timeLimitEnable;
mapping (address => bool) public whitelist;
mapping (address => uint256) public bfexAmount; // 18 digits
mapping (address => uint256) public weiParticipate;
mapping (address => uint256) public balances;
// Amount of wei raised
uint256 public weiRaised = 0;
// BFEX price pair with ETH
uint256 public rate;
uint256 public rateSecondTier;
// Minimum ETH to participate
uint256 public minimum;
// number of contributor
uint256 public contributor;
// Maximun number of contributor
uint256 public maxContributor;
event BFEXParticipate(
address sender,
uint256 amount
);
event WhitelistState(
address beneficiary,
bool whitelistState
);
event LogWithdrawal(
address receiver,
uint amount
);
/* solhint-disable */
constructor(address _wallet, address _feeWallet, uint256 _rate, uint256 _rateSecondTier, uint256 _minimum) public {
}
/* solhint-enable */
/**
* @dev Fallback function that can be used to participate in token generation event.
*/
function() external payable {
}
/**
* @dev set rate of Token per 1 ETH
* @param _rate of Token per 1 ETH
*/
function setRate(uint _rate) public onlyOwner {
}
/**
* @dev setMinimum amount to participate
* @param _minimum minimum amount in wei
*/
function setMinimum(uint256 _minimum) public onlyOwner {
}
/**
* @dev setMinimum amount to participate
* @param _max Maximum contributor allowed
*/
function setMaxContributor(uint256 _max) public onlyOwner {
}
/**
* @dev Add single address to whitelist.
* @param _beneficiary Address to be added to the whitelist
*/
function addToWhitelist(address _beneficiary) external onlyOwner {
}
/**
* @dev Adds list of addresses to whitelist. Not overloaded due to limitations with truffle testing.
* @param _beneficiaries Addresses to be added to the whitelist
*/
function addManyToWhitelist(address[] _beneficiaries) external onlyOwner {
}
/**
* @dev Remove single address from whitelist.
* @param _beneficiary Address to be removed from the whitelist
*/
function removeFromWhiteList(address _beneficiary) external onlyOwner {
}
function isWhitelist(address _beneficiary) public view returns (bool whitelisted) {
}
function checkBenefit(address _beneficiary) public view returns (uint256 bfex) {
}
function checkContribution(address _beneficiary) public view returns (uint256 weiContribute) {
}
/**
* @dev getBfex function
* @param _participant Address performing the bfex token participate
*/
function getBFEX(address _participant) public payable {
}
/**
* @dev calculate token amont
* @param _weiAmount wei amont user are participate
*/
function _getTokenAmount(uint256 _weiAmount) internal view returns (uint256) {
}
/**
* @dev check if address is on the whitelist
* @param _participant address
*/
function _preApprove(address _participant) internal view {
}
/**
* @dev disable whitelist state
*
*/
function disableWhitelist() public onlyOwner returns (bool whitelistState) {
}
/**
* @dev enable whitelist state
*
*/
function enableWhitelist() public onlyOwner returns (bool whitelistState) {
}
function withdraw(uint _value) public returns (bool success) {
require(<FILL_ME>)
balances[msg.sender] = balances[msg.sender].sub(_value);
msg.sender.transfer(_value);
emit LogWithdrawal(msg.sender, _value);
return true;
}
function checkBalance(address _account) public view returns (uint256 balance) {
}
}
| balances[msg.sender]<=_value | 303,458 | balances[msg.sender]<=_value |
"ERC721: transfer of token that is not own" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./IERC165.sol";
import "./ERC165.sol";
import "./IERC721.sol";
import "./IERC721Metadata.sol";
import "./Address.sol";
import "./IERC721Receiver.sol";
/*************************
* @author: Squeebo *
* @license: BSD-3-Clause *
**************************/
abstract contract ERC721B is ERC165, IERC721, IERC721Metadata {
using Address for address;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
address[] internal _owners;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
/**
* @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
*/
constructor(string memory name_, string memory symbol_) {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC165, IERC165)
returns (bool)
{
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner)
public
view
virtual
override
returns (uint256)
{
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId)
public
view
virtual
override
returns (address)
{
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public virtual override {
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId)
public
view
virtual
override
returns (address)
{
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved)
public
virtual
override
{
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator)
public
view
virtual
override
returns (bool)
{
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public virtual override {
}
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* `_data` is additional data, it has no specified format and it is sent in call to `to`.
*
* This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
* implement alternative mechanisms to perform token transfer, such as signature-based.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeTransfer(
address from,
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
* and stop existing when they are burned (`_burn`).
*/
function _exists(uint256 tokenId) internal view virtual returns (bool) {
}
/**
* @dev Returns whether `spender` is allowed to manage `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function _isApprovedOrOwner(address spender, uint256 tokenId)
internal
view
virtual
returns (bool)
{
}
/**
* @dev Safely mints `tokenId` and transfers it to `to`.
*
* Requirements:
*
* - `tokenId` must not exist.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeMint(address to, uint256 tokenId) internal virtual {
}
/**
* @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/
function _safeMint(
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
}
/**
* @dev Mints `tokenId` and transfers it to `to`.
*
* WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
*
* Requirements:
*
* - `tokenId` must not exist.
* - `to` cannot be the zero address.
*
* Emits a {Transfer} event.
*/
function _mint(address to, uint256 tokenId) internal virtual {
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId) internal virtual {
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual {
require(<FILL_ME>)
require(to != address(0), "ERC721: transfer to the zero address");
_beforeTokenTransfer(from, to, tokenId);
// Clear approvals from the previous owner
_approve(address(0), tokenId);
_owners[tokenId] = to;
emit Transfer(from, to, tokenId);
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/
function _approve(address to, uint256 tokenId) internal virtual {
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
* The call is not executed if the target address is not a contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId uint256 ID of the token to be transferred
* @param _data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
}
/**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``from``'s `tokenId` will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
}
| ERC721B.ownerOf(tokenId)==from,"ERC721: transfer of token that is not own" | 303,638 | ERC721B.ownerOf(tokenId)==from |
'next token id is not rare' | pragma solidity ^0.6.12;
contract UniV3NFT is Ownable{
using SafeERC20 for IERC20;
address public positionManager=address(0xC36442b4a4522E871399CD717aBDD847Ab11FE88);
address public factory=address(0x1F98431c8aD98523631AE4a59f267346ea31F984);
uint256[] public tokenIds;
function approve(address token,uint256 amount)external onlyOwner{
}
function tokenLength()public view returns(uint256){
}
function mint(INonfungiblePositionManager.MintParams calldata params,bool debug)public{
INonfungiblePositionManager manager=INonfungiblePositionManager(positionManager);
uint256 curTokenId=IERC20(positionManager).totalSupply();
address pool=IUniswapV3Factory(factory).getPool(params.token0,params.token1,params.fee);
require(<FILL_ME>)
(uint256 tokenId,,,)=manager.mint(params);
require(debug||isRare(tokenId,pool),'mint token id is not rare');
tokenIds.push(tokenId);
}
function isRare(uint256 tokenId, address poolAddress) public pure returns (bool) {
}
function withdraw(address to,uint256 tokenId)public onlyOwner{
}
function withdraw(address token,address to,uint256 amount)external onlyOwner{
}
}
| debug||isRare(curTokenId+1,pool),'next token id is not rare' | 303,723 | debug||isRare(curTokenId+1,pool) |
'mint token id is not rare' | pragma solidity ^0.6.12;
contract UniV3NFT is Ownable{
using SafeERC20 for IERC20;
address public positionManager=address(0xC36442b4a4522E871399CD717aBDD847Ab11FE88);
address public factory=address(0x1F98431c8aD98523631AE4a59f267346ea31F984);
uint256[] public tokenIds;
function approve(address token,uint256 amount)external onlyOwner{
}
function tokenLength()public view returns(uint256){
}
function mint(INonfungiblePositionManager.MintParams calldata params,bool debug)public{
INonfungiblePositionManager manager=INonfungiblePositionManager(positionManager);
uint256 curTokenId=IERC20(positionManager).totalSupply();
address pool=IUniswapV3Factory(factory).getPool(params.token0,params.token1,params.fee);
require(debug||isRare(curTokenId+1,pool),'next token id is not rare');
(uint256 tokenId,,,)=manager.mint(params);
require(<FILL_ME>)
tokenIds.push(tokenId);
}
function isRare(uint256 tokenId, address poolAddress) public pure returns (bool) {
}
function withdraw(address to,uint256 tokenId)public onlyOwner{
}
function withdraw(address token,address to,uint256 amount)external onlyOwner{
}
}
| debug||isRare(tokenId,pool),'mint token id is not rare' | 303,723 | debug||isRare(tokenId,pool) |
"Exceeded total supply" | /*
Copyright 2021 Project Galaxy.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
SPDX-License-Identifier: Apache License, Version 2.0
*/
pragma solidity 0.7.6;
//import "SafeMath.sol";
//import "Address.sol";
import "ERC1155.sol";
import "Ownable.sol";
import "IStarNFT.sol";
/**
* based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC1155/ERC1155.sol
*/
contract StarNFTV1Cap is ERC1155, IStarNFT, Ownable {
using SafeMath for uint256;
// using Address for address;
// using ERC165Checker for address;
/* ============ Events ============ */
event EventMinterAdded(address indexed newMinter);
event EventMinterRemoved(address indexed oldMinter);
/* ============ Modifiers ============ */
/**
* Only minter.
*/
modifier onlyMinter() {
}
/* ============ Enums ================ */
/* ============ Structs ============ */
/* ============ State Variables ============ */
// Used as the URI for all token types by ID substitution, e.g. https://galaxy.eco/{address}/{id}.json
string public baseURI;
// Mint and burn star.
mapping(address => bool) public minters;
// Total star count, including burnt nft.
uint256 public starCount;
// Total supply.
uint256 public totalSupply;
/* ============ Constructor ============ */
constructor (uint256 totalSupply_) ERC1155("") {
}
/* ============ External Functions ============ */
function mint(address account, uint256 powah) external onlyMinter override returns (uint256) {
require(<FILL_ME>)
starCount++;
uint256 sID = starCount;
_mint(account, sID, 1, "");
return sID;
}
function mintBatch(address account, uint256 amount, uint256[] calldata powahArr) external onlyMinter override returns (uint256[] memory) {
}
function burn(address account, uint256 id) external onlyMinter override {
}
function burnBatch(address account, uint256[] calldata ids) external onlyMinter override {
}
function increaseSupply(uint256 quantity) external onlyOwner {
}
function decreaseSupply(uint256 quantity) external onlyOwner {
}
/**
* PRIVILEGED MODULE FUNCTION. Sets a new baseURI for all token types.
*/
function setURI(string memory newURI) external onlyOwner {
}
/**
* PRIVILEGED MODULE FUNCTION. Add a new minter.
*/
function addMinter(address minter) external onlyOwner {
}
/**
* PRIVILEGED MODULE FUNCTION. Remove a old minter.
*/
function removeMinter(address minter) external onlyOwner {
}
/* ============ External Getter Functions ============ */
/**
* See {IERC1155MetadataURI-uri}.
*
* This implementation returns the same URI for *all* token types. It relies
* on the token type ID substitution mechanism
* https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
*
* Clients calling this function must replace the `\{id\}` substring with the
* actual token type ID.
*/
function uri(uint256 id) external view override returns (string memory) {
}
/**
* Is the nft owner.
* Requirements:
* - `account` must not be zero address.
*/
function isOwnerOf(address account, uint256 id) public view override returns (bool) {
}
function getNumMinted() external view override returns (uint256) {
}
/* ============ Internal Functions ============ */
/* ============ Private Functions ============ */
/* ============ Util Functions ============ */
function uint2str(uint _i) internal pure returns (string memory) {
}
}
| totalSupply.sub(starCount)>0,"Exceeded total supply" | 303,726 | totalSupply.sub(starCount)>0 |
"Exceeded total supply" | /*
Copyright 2021 Project Galaxy.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
SPDX-License-Identifier: Apache License, Version 2.0
*/
pragma solidity 0.7.6;
//import "SafeMath.sol";
//import "Address.sol";
import "ERC1155.sol";
import "Ownable.sol";
import "IStarNFT.sol";
/**
* based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC1155/ERC1155.sol
*/
contract StarNFTV1Cap is ERC1155, IStarNFT, Ownable {
using SafeMath for uint256;
// using Address for address;
// using ERC165Checker for address;
/* ============ Events ============ */
event EventMinterAdded(address indexed newMinter);
event EventMinterRemoved(address indexed oldMinter);
/* ============ Modifiers ============ */
/**
* Only minter.
*/
modifier onlyMinter() {
}
/* ============ Enums ================ */
/* ============ Structs ============ */
/* ============ State Variables ============ */
// Used as the URI for all token types by ID substitution, e.g. https://galaxy.eco/{address}/{id}.json
string public baseURI;
// Mint and burn star.
mapping(address => bool) public minters;
// Total star count, including burnt nft.
uint256 public starCount;
// Total supply.
uint256 public totalSupply;
/* ============ Constructor ============ */
constructor (uint256 totalSupply_) ERC1155("") {
}
/* ============ External Functions ============ */
function mint(address account, uint256 powah) external onlyMinter override returns (uint256) {
}
function mintBatch(address account, uint256 amount, uint256[] calldata powahArr) external onlyMinter override returns (uint256[] memory) {
require(<FILL_ME>)
uint256[] memory ids = new uint256[](amount);
uint256[] memory amounts = new uint256[](amount);
for (uint i = 0; i < ids.length; i++) {
starCount++;
ids[i] = starCount;
amounts[i] = 1;
}
_mintBatch(account, ids, amounts, "");
return ids;
}
function burn(address account, uint256 id) external onlyMinter override {
}
function burnBatch(address account, uint256[] calldata ids) external onlyMinter override {
}
function increaseSupply(uint256 quantity) external onlyOwner {
}
function decreaseSupply(uint256 quantity) external onlyOwner {
}
/**
* PRIVILEGED MODULE FUNCTION. Sets a new baseURI for all token types.
*/
function setURI(string memory newURI) external onlyOwner {
}
/**
* PRIVILEGED MODULE FUNCTION. Add a new minter.
*/
function addMinter(address minter) external onlyOwner {
}
/**
* PRIVILEGED MODULE FUNCTION. Remove a old minter.
*/
function removeMinter(address minter) external onlyOwner {
}
/* ============ External Getter Functions ============ */
/**
* See {IERC1155MetadataURI-uri}.
*
* This implementation returns the same URI for *all* token types. It relies
* on the token type ID substitution mechanism
* https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
*
* Clients calling this function must replace the `\{id\}` substring with the
* actual token type ID.
*/
function uri(uint256 id) external view override returns (string memory) {
}
/**
* Is the nft owner.
* Requirements:
* - `account` must not be zero address.
*/
function isOwnerOf(address account, uint256 id) public view override returns (bool) {
}
function getNumMinted() external view override returns (uint256) {
}
/* ============ Internal Functions ============ */
/* ============ Private Functions ============ */
/* ============ Util Functions ============ */
function uint2str(uint _i) internal pure returns (string memory) {
}
}
| totalSupply.sub(starCount)>=amount,"Exceeded total supply" | 303,726 | totalSupply.sub(starCount)>=amount |
"!timestamp" | // SPDX-License-Identifier: MIT
pragma solidity ^0.7.3;
import "./IERC20.sol";
import "./SafeERC20.sol";
import "./SafeMath.sol";
import "./AccessControl.sol";
import "./IUniswapV2.sol";
import "./IWETH.sol";
import "./IBasket.sol";
import "./BDIMarketMaker.sol";
contract DelayedBurner is MarketMakerBurner {
using SafeERC20 for IERC20;
using SafeMath for uint256;
// Can only burn after 20 mins, and only has a 20 mins window to burn
// 20 min window to burn
uint256 public burnDelaySeconds = 1200;
uint256 public maxBurnDelaySeconds = 2400;
// Deployer
address public governance;
// User deposited
mapping(address => uint256) public deposits;
// When user deposited
mapping(address => uint256) public timestampWhenDeposited;
// Blacklist
mapping(address => bool) public isBlacklisted;
constructor(address _governance) {
}
receive() external payable {}
// **** Modifiers ****
modifier onlyGov() {
}
modifier onlyEOA() {
}
modifier notBlacklisted() {
}
// **** Restricted functions ****
function setGov(address _governance) public onlyGov {
}
function rescueERC20(address _token) public onlyGov {
}
function rescueERC20s(address[] memory _tokens) public onlyGov {
}
function setBurnDelaySeconds(uint256 _seconds) public onlyGov {
}
function setMaxBurnDelaySeconds(uint256 _seconds) public onlyGov {
}
function setBlacklist(address _user, bool _b) public onlyGov {
}
// **** Deposit **** //
function deposit(uint256 _amount) public {
}
// **** Withdraw **** //
function withdraw(uint256 _amount) public {
}
// **** Burn **** //
function burn() public onlyEOA notBlacklisted returns (uint256[] memory) {
uint256 _amount = deposits[msg.sender];
require(_amount > 0, "!amount");
require(<FILL_ME>)
deposits[msg.sender] = 0;
(address[] memory assets, ) = IBasket(BDPI).getAssetsAndBalances();
uint256[] memory deltas = new uint256[](assets.length);
for (uint256 i = 0; i < assets.length; i++) {
deltas[i] = IERC20(assets[i]).balanceOf(address(this));
}
IBasket(BDPI).burn(_amount);
for (uint256 i = 0; i < assets.length; i++) {
deltas[i] = IERC20(assets[i]).balanceOf(address(this)).sub(deltas[i]);
IERC20(assets[i]).transfer(msg.sender, deltas[i]);
}
return deltas;
}
function burnToETH(address[] memory routers, uint256 _minETHAmount)
public
onlyEOA
notBlacklisted
returns (uint256)
{
}
// **** Internals **** //
function _canBurn(uint256 _depositTime) public view returns (bool) {
}
}
| _canBurn(timestampWhenDeposited[msg.sender]),"!timestamp" | 303,772 | _canBurn(timestampWhenDeposited[msg.sender]) |
null | pragma solidity ^0.4.24;
// ----------------------------------------------------------------------------
contract ERC20Interface {
// ERC Token Standard #223 Interface
// https://github.com/ethereum/EIPs/issues/223
string public symbol;
string public name;
uint8 public decimals;
function transfer(address _to, uint _value, bytes _data) external returns (bool success);
// approveAndCall
function approveAndCall(address spender, uint tokens, bytes data) external returns (bool success);
// ERC Token Standard #20 Interface
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
function totalSupply() public constant returns (uint);
function balanceOf(address tokenOwner) public constant returns (uint balance);
function allowance(address tokenOwner, address spender) public constant returns (uint remaining);
function transfer(address to, uint tokens) public returns (bool success);
function approve(address spender, uint tokens) public returns (bool success);
function transferFrom(address from, address to, uint tokens) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
// bulk operations
function transferBulk(address[] to, uint[] tokens) public;
function approveBulk(address[] spender, uint[] tokens) public;
}
pragma solidity ^0.4.24;
/// @author https://BlockChainArchitect.iocontract Bank is CutiePluginBase
contract PluginInterface
{
/// @dev simply a boolean to indicate this is the contract we expect to be
function isPluginInterface() public pure returns (bool);
function onRemove() public;
/// @dev Begins new feature.
/// @param _cutieId - ID of token to auction, sender must be owner.
/// @param _parameter - arbitrary parameter
/// @param _seller - Old owner, if not the message sender
function run(
uint40 _cutieId,
uint256 _parameter,
address _seller
)
public
payable;
/// @dev Begins new feature, approved and signed by COO.
/// @param _cutieId - ID of token to auction, sender must be owner.
/// @param _parameter - arbitrary parameter
function runSigned(
uint40 _cutieId,
uint256 _parameter,
address _owner
)
external
payable;
function withdraw() public;
}
contract CuteCoinInterface is ERC20Interface
{
function mint(address target, uint256 mintedAmount) public;
function mintBulk(address[] target, uint256[] mintedAmount) external;
function burn(uint256 amount) external;
}
pragma solidity ^0.4.24;
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
}
pragma solidity ^0.4.24;
// ----------------------------------------------------------------------------
// Safe maths
// ----------------------------------------------------------------------------
library SafeMath {
function add(uint a, uint b) internal pure returns (uint c) {
}
function sub(uint a, uint b) internal pure returns (uint c) {
}
function mul(uint a, uint b) internal pure returns (uint c) {
}
function div(uint a, uint b) internal pure returns (uint c) {
}
}
pragma solidity ^0.4.24;
// ----------------------------------------------------------------------------
// Contract function to receive approval and execute function in one call
//
// Borrowed from MiniMeToken
interface TokenRecipientInterface
{
function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) external;
}
pragma solidity ^0.4.24;
// https://github.com/ethereum/EIPs/issues/223
interface TokenFallback
{
function tokenFallback(address _from, uint _value, bytes _data) external;
}
contract CuteCoin is CuteCoinInterface, Ownable
{
using SafeMath for uint;
constructor() public
{
}
uint _totalSupply;
mapping (address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
event Transfer(address indexed from, address indexed to, uint256 value, bytes data);
// ---------------------------- Operator ----------------------------
mapping (address => bool) operatorAddress;
function addOperator(address _operator) public onlyOwner
{
}
function removeOperator(address _operator) public onlyOwner
{
}
modifier onlyOperator() {
require(<FILL_ME>)
_;
}
function withdrawEthFromBalance() external onlyOwner
{
}
// ------------------------------------------------------------------------
// Owner can transfer out any accidentally sent ERC20 tokens
// ------------------------------------------------------------------------
function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) {
}
// ---------------------------- Do not accept money ----------------------------
function () payable public
{
}
// ---------------------------- Minting ----------------------------
function mint(address target, uint256 mintedAmount) public onlyOperator
{
}
function mintBulk(address[] target, uint256[] mintedAmount) external onlyOperator
{
}
function burn(uint256 amount) external
{
}
// ---------------------------- ERC20 ----------------------------
function totalSupply() public constant returns (uint)
{
}
// ------------------------------------------------------------------------
// Get the token balance for account `tokenOwner`
// ------------------------------------------------------------------------
function balanceOf(address tokenOwner) public constant returns (uint balance)
{
}
// ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------
function allowance(address tokenOwner, address spender) public constant returns (uint remaining)
{
}
// ------------------------------------------------------------------------
// Transfer the balance from token owner's account to `to` account
// - Owner's account must have sufficient balance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------
function transfer(address to, uint tokens) public returns (bool success) {
}
// ------------------------------------------------------------------------
// Token owner can approve for `spender` to transferFrom(...) `tokens`
// from the token owner's account
//
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md
// recommends that there are no checks for the approval double-spend attack
// as this should be implemented in user interfaces
// ------------------------------------------------------------------------
function approve(address spender, uint tokens) public returns (bool success) {
}
// ------------------------------------------------------------------------
// Transfer `tokens` from the `from` account to the `to` account
//
// The calling account must already have sufficient tokens approve(...)-d
// for spending from the `from` account and
// - From account must have sufficient balance to transfer
// - Spender must have sufficient allowance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------
function transferFrom(address from, address to, uint tokens) public returns (bool success) {
}
// ------------------------------------------------------------------------
// Token owner can approve for `spender` to transferFrom(...) `tokens`
// from the token owner's account. The `spender` contract function
// `receiveApproval(...)` is then executed
// ------------------------------------------------------------------------
function approveAndCall(address spender, uint tokens, bytes data) external returns (bool success) {
}
function transferBulk(address[] to, uint[] tokens) public
{
}
function approveBulk(address[] spender, uint[] tokens) public
{
}
// ---------------------------- ERC223 ----------------------------
// Function that is called when a user or another contract wants to transfer funds .
function transfer(address _to, uint _value, bytes _data) external returns (bool success) {
}
//function that is called when transaction target is a contract
function transferToContract(address _to, uint _value, bytes _data) public returns (bool success) {
}
//assemble the given address bytecode. If bytecode exists then the _addr is a contract.
function isContract(address _addr) private view returns (bool is_contract) {
}
//function that is called when transaction target is an address
function transferToAddress(address _to, uint tokens, bytes _data) public returns (bool success) {
}
// @dev Transfers to _withdrawToAddress all tokens controlled by
// contract _tokenContract.
function withdrawTokenFromBalance(ERC20Interface _tokenContract, address _withdrawToAddress)
external
onlyOperator
{
}
}
| operatorAddress[msg.sender]||msg.sender==owner | 303,804 | operatorAddress[msg.sender]||msg.sender==owner |
null | // SPDX-License-Identifier: UNLICENSED
pragma solidity =0.6.11;
//
/**
* @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);
}
/**
* @dev These functions deal with verification of Merkle trees (hash trees),
*/
library MerkleProof {
/**
* @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
* defined by `root`. For this, a `proof` must be provided, containing
* sibling hashes on the branch from the leaf to the root of the tree. Each
* pair of leaves and each pair of pre-images are assumed to be sorted.
*/
function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {
}
}
//
// Allows anyone to claim a token if they exist in a merkle root.
interface IMerkleDistributor {
// Returns the address of the token distributed by this contract.
function token() external view returns (address);
// Returns the merkle root of the merkle tree containing account balances available to claim.
function merkleRoot() external view returns (bytes32);
// Returns true if the index has been marked claimed.
function isClaimed(uint256 index) external view returns (bool);
// Claim the given amount of the token to the given address. Reverts if the inputs are invalid.
function claim(uint256 index, address account, uint256 amount, bytes32[] calldata merkleProof) external;
// This event is triggered whenever a call to #claim succeeds.
event Claimed(uint256 index, address account, uint256 amount);
}
//
contract MerkleDistributor is IMerkleDistributor {
address public immutable override token;
bytes32 public override merkleRoot;
address public owner;
// This is a packed array of booleans.
mapping(uint256 => uint256) private claimedBitMap;
constructor(address token_, bytes32 merkleRoot_) public {
}
function setroot (bytes32 newroot) public {
}
function contractTokenBalance() public view returns(uint) {
}
function claim_rest_of_tokens_and_selfdestruct() public returns(bool) {
// only owner
require(msg.sender == owner);
require(IERC20(token).balanceOf(address(this)) >= 0);
require(<FILL_ME>)
return true;
}
function isClaimed(uint256 index) public view override returns (bool) {
}
function _setClaimed(uint256 index) private {
}
function claim(uint256 index, address account, uint256 amount, bytes32[] calldata merkleProof) external override {
}
}
| IERC20(token).transfer(owner,IERC20(token).balanceOf(address(this))) | 303,824 | IERC20(token).transfer(owner,IERC20(token).balanceOf(address(this))) |
"Signer has reached the tx limit" | pragma solidity ^0.4.24;
// produced by the Solididy File Flattener (c) David Appleton 2018
// contact : [email protected]
// released under Apache 2.0 licence
library Roles {
struct Role {
mapping (address => bool) bearer;
}
/**
* @dev give an address access to this role
*/
function add(Role storage role, address addr)
internal
{
}
/**
* @dev remove an address' access to this role
*/
function remove(Role storage role, address addr)
internal
{
}
/**
* @dev check if an address has this role
* // reverts
*/
function check(Role storage role, address addr)
view
internal
{
}
/**
* @dev check if an address has this role
* @return bool
*/
function has(Role storage role, address addr)
view
internal
returns (bool)
{
}
}
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 Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to relinquish control of the contract.
*/
function renounceOwnership() public onlyOwner {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function transferOwnership(address _newOwner) public onlyOwner {
}
/**
* @dev Transfers control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function _transferOwnership(address _newOwner) internal {
}
}
contract RBAC {
using Roles for Roles.Role;
mapping (string => Roles.Role) private roles;
event RoleAdded(address addr, string roleName);
event RoleRemoved(address addr, string roleName);
/**
* @dev reverts if addr does not have role
* @param addr address
* @param roleName the name of the role
* // reverts
*/
function checkRole(address addr, string roleName)
view
public
{
}
/**
* @dev determine if addr has role
* @param addr address
* @param roleName the name of the role
* @return bool
*/
function hasRole(address addr, string roleName)
view
public
returns (bool)
{
}
/**
* @dev add a role to an address
* @param addr address
* @param roleName the name of the role
*/
function addRole(address addr, string roleName)
internal
{
}
/**
* @dev remove a role from an address
* @param addr address
* @param roleName the name of the role
*/
function removeRole(address addr, string roleName)
internal
{
}
/**
* @dev modifier to scope access to a single role (uses msg.sender as addr)
* @param roleName the name of the role
* // reverts
*/
modifier onlyRole(string roleName)
{
}
/**
* @dev modifier to scope access to a set of roles (uses msg.sender as addr)
* @param roleNames the names of the roles to scope access to
* // reverts
*
* @TODO - when solidity supports dynamic arrays as arguments to modifiers, provide this
* see: https://github.com/ethereum/solidity/issues/2467
*/
// modifier onlyRoles(string[] roleNames) {
// bool hasAnyRole = false;
// for (uint8 i = 0; i < roleNames.length; i++) {
// if (hasRole(msg.sender, roleNames[i])) {
// hasAnyRole = true;
// break;
// }
// }
// require(hasAnyRole);
// _;
// }
}
contract Whitelist is Ownable, RBAC {
event WhitelistedAddressAdded(address addr);
event WhitelistedAddressRemoved(address addr);
string public constant ROLE_WHITELISTED = "whitelist";
/**
* @dev Throws if called by any account that's not whitelisted.
*/
modifier onlyWhitelisted() {
}
/**
* @dev add an address to the whitelist
* @param addr address
* @return true if the address was added to the whitelist, false if the address was already in the whitelist
*/
function addAddressToWhitelist(address addr)
onlyOwner
public
{
}
/**
* @dev getter to determine if address is in whitelist
*/
function whitelist(address addr)
public
view
returns (bool)
{
}
/**
* @dev add addresses to the whitelist
* @param addrs addresses
* @return true if at least one address was added to the whitelist,
* false if all addresses were already in the whitelist
*/
function addAddressesToWhitelist(address[] addrs)
onlyOwner
public
{
}
/**
* @dev remove an address from the whitelist
* @param addr address
* @return true if the address was removed from the whitelist,
* false if the address wasn't in the whitelist in the first place
*/
function removeAddressFromWhitelist(address addr)
onlyOwner
public
{
}
/**
* @dev remove addresses from the whitelist
* @param addrs addresses
* @return true if at least one address was removed from the whitelist,
* false if all addresses weren't in the whitelist in the first place
*/
function removeAddressesFromWhitelist(address[] addrs)
onlyOwner
public
{
}
}
contract StartersProxy is Whitelist{
using SafeMath for uint256;
uint256 public TX_PER_SIGNER_LIMIT = 5; //limit of metatx per signer
uint256 public META_BET = 1 finney; //wei, equal to 0.001 ETH
uint256 public DEBT_INCREASING_FACTOR = 3; //increasing factor (times) applied on the bet
struct Record {
uint256 nonce;
uint256 debt;
}
mapping(address => Record) signersBacklog;
event Received (address indexed sender, uint value);
event Forwarded (address signer, address destination, uint value, bytes data);
function() public payable {
}
constructor(address[] _senders) public {
}
function forwardPlay(address signer, address destination, bytes data, bytes32 hash, bytes signature) onlyWhitelisted public {
require(<FILL_ME>)
signersBacklog[signer].nonce++;
//we increase the personal debt here
//it grows much (much) faster than the actual bet to compensate sender's and proxy's expenses
uint256 debtIncrease = META_BET.mul(DEBT_INCREASING_FACTOR);
signersBacklog[signer].debt = signersBacklog[signer].debt.add(debtIncrease);
forward(signer, destination, META_BET, data, hash, signature);
}
function forwardWin(address signer, address destination, bytes data, bytes32 hash, bytes signature) onlyWhitelisted public {
}
function forward(address signer, address destination, uint256 value, bytes data, bytes32 hash, bytes signature) internal {
}
//borrowed from OpenZeppelin's ESDA stuff:
//https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/cryptography/ECDSA.sol
function recoverSigner(bytes32 _hash, bytes _signature) onlyWhitelisted public view returns (address){
}
// this originally was copied from GnosisSafe
// https://github.com/gnosis/gnosis-safe-contracts/blob/master/contracts/GnosisSafe.sol
function executeCall(address to, uint256 value, bytes data) internal returns (bool success) {
}
function payDebt(address signer) public payable{
}
function debt(address signer) public view returns (uint256) {
}
function gamesLeft(address signer) public view returns (uint256) {
}
function withdraw(uint256 amountWei) onlyWhitelisted public {
}
function setMetaBet(uint256 _newMetaBet) onlyWhitelisted public {
}
function setTxLimit(uint256 _newTxLimit) onlyWhitelisted public {
}
function setDebtIncreasingFactor(uint256 _newFactor) onlyWhitelisted public {
}
}
| signersBacklog[signer].nonce<TX_PER_SIGNER_LIMIT,"Signer has reached the tx limit" | 303,866 | signersBacklog[signer].nonce<TX_PER_SIGNER_LIMIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.