comment
stringlengths 1
211
⌀ | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
"only the admin may set the comp-like delegate" | pragma solidity ^0.5.16;
import "./CToken.sol";
interface CompLike {
function delegate(address delegatee) external;
}
/**
* @title Compound's CErc20 Contract
* @notice CTokens which wrap an EIP-20 underlying
* @dev This contract should not to be deployed on its own; instead, deploy `CErc20Delegator` (proxy contract) and `CErc20Delegate` (logic/implementation contract).
* @author Compound
*/
contract CErc20 is CToken, CErc20Interface {
/**
* @notice Initialize the new money market
* @param underlying_ The address of the underlying asset
* @param comptroller_ The address of the Comptroller
* @param interestRateModel_ The address of the interest rate model
* @param name_ ERC-20 name of this token
* @param symbol_ ERC-20 symbol of this token
*/
function initialize(address underlying_,
ComptrollerInterface comptroller_,
InterestRateModel interestRateModel_,
string memory name_,
string memory symbol_,
uint256 reserveFactorMantissa_,
uint256 adminFeeMantissa_) public {
}
/*** User Interface ***/
/**
* @notice Sender supplies assets into the market and receives cTokens in exchange
* @dev Accrues interest whether or not the operation succeeds, unless reverted
* @param mintAmount The amount of the underlying asset to supply
* @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
*/
function mint(uint mintAmount) external returns (uint) {
}
/**
* @notice Sender redeems cTokens in exchange for the underlying asset
* @dev Accrues interest whether or not the operation succeeds, unless reverted
* @param redeemTokens The number of cTokens to redeem into underlying
* @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
*/
function redeem(uint redeemTokens) external returns (uint) {
}
/**
* @notice Sender redeems cTokens in exchange for a specified amount of underlying asset
* @dev Accrues interest whether or not the operation succeeds, unless reverted
* @param redeemAmount The amount of underlying to redeem
* @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
*/
function redeemUnderlying(uint redeemAmount) external returns (uint) {
}
/**
* @notice Sender borrows assets from the protocol to their own address
* @param borrowAmount The amount of the underlying asset to borrow
* @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
*/
function borrow(uint borrowAmount) external returns (uint) {
}
/**
* @notice Sender repays their own borrow
* @param repayAmount The amount to repay
* @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
*/
function repayBorrow(uint repayAmount) external returns (uint) {
}
/**
* @notice Sender repays a borrow belonging to borrower
* @param borrower the account with the debt being payed off
* @param repayAmount The amount to repay
* @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
*/
function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint) {
}
/**
* @notice The sender liquidates the borrowers collateral.
* The collateral seized is transferred to the liquidator.
* @param borrower The borrower of this cToken to be liquidated
* @param repayAmount The amount of the underlying borrowed asset to repay
* @param cTokenCollateral The market in which to seize collateral from the borrower
* @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
*/
function liquidateBorrow(address borrower, uint repayAmount, CTokenInterface cTokenCollateral) external returns (uint) {
}
/*** Safe Token ***/
/**
* @notice Gets balance of this contract in terms of the underlying
* @dev This excludes the value of the current message, if any
* @return The quantity of underlying tokens owned by this contract
*/
function getCashPrior() internal view returns (uint) {
}
/**
* @dev Similar to EIP20 transfer, except it handles a False result from `transferFrom` and reverts in that case.
* This will revert due to insufficient balance or insufficient allowance.
* This function returns the actual amount received,
* which may be less than `amount` if there is a fee attached to the transfer.
*
* Note: This wrapper safely handles non-standard ERC-20 tokens that do not return a value.
* See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca
*/
function doTransferIn(address from, uint amount) internal returns (uint) {
}
/**
* @dev Similar to EIP20 transfer, except it handles a False success from `transfer` and returns an explanatory
* error code rather than reverting. If caller has not called checked protocol's balance, this may revert due to
* insufficient cash held in this contract. If caller has checked protocol's balance prior to this call, and verified
* it is >= amount, this should not revert in normal conditions.
*
* Note: This wrapper safely handles non-standard ERC-20 tokens that do not return a value.
* See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca
*/
function doTransferOut(address payable to, uint amount) internal {
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param data The call data (encoded using abi.encode or one of its variants).
* @param errorMessage The revert string to return on failure.
*/
function _callOptionalReturn(bytes memory data, string memory errorMessage) internal {
}
/**
* @notice Admin call to delegate the votes of the COMP-like underlying
* @param compLikeDelegatee The address to delegate votes to
* @dev CTokens whose underlying are not CompLike should revert here
*/
function _delegateCompLikeTo(address compLikeDelegatee) external {
require(<FILL_ME>)
CompLike(underlying).delegate(compLikeDelegatee);
}
}
| hasAdminRights(),"only the admin may set the comp-like delegate" | 20,659 | hasAdminRights() |
"UpgradeableProxy: new implementation is not a contract" | /**
* @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an
* implementation address that can be changed. This address is stored in storage in the location specified by
* https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the
* implementation behind the proxy.
*
* Upgradeability is only provided internally through {_upgradeTo}. For an externally upgradeable proxy see
* {TransparentUpgradeableProxy}.
*/
contract BaseUpgradeabilityProxy is Proxy {
/**
* @dev Storage slot with the address of the current implementation.
* This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is
* validated in the constructor.
*/
bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
event Upgraded(address indexed implementation);
/**
* @dev Returns the current implementation address.
*/
function _implementation() internal override view returns (address impl) {
}
/**
* @dev Upgrades the proxy to a new implementation.
*
* Emits an {Upgraded} event.
*/
function _upgradeTo(address newImplementation) internal {
}
/**
* @dev Stores a new address in the EIP1967 implementation slot.
*/
function _setImplementation(address newImplementation) internal {
require(<FILL_ME>)
bytes32 slot = IMPLEMENTATION_SLOT;
// solhint-disable-next-line no-inline-assembly
assembly {
sstore(slot, newImplementation)
}
}
}
| Address.isContract(newImplementation),"UpgradeableProxy: new implementation is not a contract" | 20,749 | Address.isContract(newImplementation) |
"Eeee! You're not even an orca" | //SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
import "@openzeppelin/contracts/token/ERC20/ERC20Capped.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/GSN/Context.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/math/Math.sol";
// Eeee! Welcome Dolphins!
//
//////////////////////////////////////////////////////////////////////
// __ //
// _.-~ ) ____ eeee ____ //
// _..--~~~~,' ,-/ _ //
// .-'. . . .' ,-',' ,' ) //
// ,'. . . _ ,--~,-'__..-' ,' //
// ,'. . . (@)' ---~~~~ ,' //
// /. . . . '~~ ,-' //
// /. . . . . ,-' //
// ; . . . . - . ,' //
// : . . . . _ / //
// . . . . . `-.: //
// . . . ./ - . ) //
// . . . | _____..---.._/ ____ dolphins.wtf ____ //
//~---~~~~-~~---~~~~----~~~~-~~~~-~~---~~~~----~~~~~~---~~~~-~~---~~//
// //
//////////////////////////////////////////////////////////////////////
//
// This code has not been audited, but has been reviewed. Hopefully it's bug free...
// If you do find bugs, remember those were features and part of the game... Don't hate the player.
//
// Also, this token is a worthless game token. Don't buy it. Just farm it, and then play games. It will be fun.
//
// Eeee! Let the games begin!
// eeee, hardcap set on deployment with minting to dev for subsequent deployment into DolphinPods (2x) & snatchFeeder
contract eeee is ERC20Capped, Ownable {
using SafeMath for uint256;
bool public _isGameActive;
uint256 public _lastUpdated;
uint256 public _coolDownTime;
uint256 public _snatchRate;
uint256 public _snatchPool;
uint256 public _devFoodBucket;
bool public _devCanEat;
bool public _isAnarchy;
uint256 public _orca;
uint256 public _river;
uint256 public _bottlenose;
uint256 public _flipper = 42069e17;
uint256 public _peter = 210345e17;
address public _owner;
address public _UniLP;
uint256 public _lpMin;
uint256 public _feeLevel1;
uint256 public _feeLevel2;
event Snatched(address indexed user, uint256 amount);
constructor() public
ERC20("dolphins.wtf", "EEEE")
ERC20Capped(42069e18)
{
}
// levels: checks caller's balance to determine if they can access a function
function uniLPBalance() public view returns (uint256) {
}
function amILP() public view returns(bool) {
}
function amIOrca() public view returns(bool) {
}
// Orcas (are you even a dolphin?) - 69 (0.00164%); Can: Snatch tax base
modifier onlyOrca() {
require(<FILL_ME>)
_;
}
function amIRiver() public view returns(bool) {
}
// River Dolphin (what is wrong with your nose?) - 420.69 (1%); Can: turn game on/off
modifier onlyRiver() {
}
function amIBottlenose() public view returns(bool) {
}
// Bottlenose Dolphin (now that's a dolphin) - 2103.45 (5%); Can: Change tax rate (up to 2.5%); Devs can eat (allows dev to withdraw from the dev food bucket)
modifier onlyBottlenose() {
}
function amIFlipper() public view returns(bool) {
}
// Flipper (A based dolphin) - 4206.9 (10%); Can: Change levels thresholds (except Flipper and Peter); Change tax rate (up to 10%); Change cooldown time
modifier onlyFlipper() {
}
function amIPeter() public view returns(bool) {
}
// Peter the Dolphin (ask Margaret Howe Lovatt) - 21034.5 (50%); Can: Burn the key and hand the world over to the dolphins, and stops feeding the devs
modifier onlyPeter() {
}
// Are you the dev?
modifier onlyDev() {
}
modifier cooledDown() {
}
// snatch - grab from snatch pool, requires min 0.01 EEEE in snatchpool -- always free
function snatchFood() public onlyOrca cooledDown {
}
// Add directly to the snatchpool, if the caller is not the dev then set to cooldown
function depositToSnatchPool(uint256 EEEEtoSnatchPool) public {
}
function depositToDevFood(uint256 EEEEtoDevFood) public {
}
// startGame -- call fee level 1
function startGame() public onlyRiver cooledDown {
}
// pauseGame -- call fee level 1
function pauseGame() public onlyRiver cooledDown {
}
// all payed function calls should pay snatch, even if the game is off
function callsAlwaysPaySnatch (uint256 amount) internal {
}
// allowDevToEat - can only be turned on once -- call fee level 1
function allowDevToEat() public onlyBottlenose {
}
// changeSnatchRate - with max of 3% if Bottlenose; with max of 10% if Flipper -- call fee level 2
function changeSnatchRate(uint256 newSnatchRate) public onlyBottlenose cooledDown {
}
// changeCoolDownTime - make the game go faster or slower, cooldown to be set in hours (min 1; max 24) -- call fee level 2
function updateCoolDown(uint256 newCoolDown) public onlyFlipper cooledDown {
}
// functions to change levels, caller should ensure to calculate this on 1e18 basis -- call fee level 1 * sought change
function getSizeChangeFee(uint256 currentThreshold, uint256 newThreshold) private pure returns (uint256) {
}
function updateOrca(uint256 updatedThreshold) public onlyFlipper {
}
function updateRiver(uint256 updatedThreshold) public onlyFlipper {
}
function updateBottlenose(uint256 updatedThreshold) public onlyFlipper {
}
// dolphinAnarchy - transfer owner permissions to 0xNull & stops feeding dev. CAREFUL: this cannot be undone and once you do it the dolphins swim alone. -- call fee level 2
function activateAnarchy() public onlyPeter {
}
// transfers tokens to snatchSupply and fees paid to dev (5%) only when we have not descended into Dolphin BASED anarchy
function _snatch(uint256 amount) internal {
}
function _calcSnatchAmount (uint256 amount) internal view returns (uint256) {
}
// Need the _transfer function to break at _beforeTokenTransfer to do a second transfer to this contract for SnatchPool & DevFood, but if
function _beforeTokenTransfer(address sender, address recipient, uint256 amount) internal override {
}
// feedDev - allows owner to withdraw 5% thrown into dev food buck. Must only be called by the Dev.
function feedDev() public onlyDev {
}
// change fees for function calls, can only be triggered by Dev, and then enters cooldown
function changeFunctionFees(uint256 newFeeLevel1, uint256 newFeeLevel2) public onlyDev {
}
function setLP(address addrUniV2LP, uint256 lpMin) public onlyDev {
}
function mint(address _to, uint256 amount) public onlyDev {
}
}
| amIOrca(),"Eeee! You're not even an orca" | 20,821 | amIOrca() |
"You're not even a river dolphin" | //SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
import "@openzeppelin/contracts/token/ERC20/ERC20Capped.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/GSN/Context.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/math/Math.sol";
// Eeee! Welcome Dolphins!
//
//////////////////////////////////////////////////////////////////////
// __ //
// _.-~ ) ____ eeee ____ //
// _..--~~~~,' ,-/ _ //
// .-'. . . .' ,-',' ,' ) //
// ,'. . . _ ,--~,-'__..-' ,' //
// ,'. . . (@)' ---~~~~ ,' //
// /. . . . '~~ ,-' //
// /. . . . . ,-' //
// ; . . . . - . ,' //
// : . . . . _ / //
// . . . . . `-.: //
// . . . ./ - . ) //
// . . . | _____..---.._/ ____ dolphins.wtf ____ //
//~---~~~~-~~---~~~~----~~~~-~~~~-~~---~~~~----~~~~~~---~~~~-~~---~~//
// //
//////////////////////////////////////////////////////////////////////
//
// This code has not been audited, but has been reviewed. Hopefully it's bug free...
// If you do find bugs, remember those were features and part of the game... Don't hate the player.
//
// Also, this token is a worthless game token. Don't buy it. Just farm it, and then play games. It will be fun.
//
// Eeee! Let the games begin!
// eeee, hardcap set on deployment with minting to dev for subsequent deployment into DolphinPods (2x) & snatchFeeder
contract eeee is ERC20Capped, Ownable {
using SafeMath for uint256;
bool public _isGameActive;
uint256 public _lastUpdated;
uint256 public _coolDownTime;
uint256 public _snatchRate;
uint256 public _snatchPool;
uint256 public _devFoodBucket;
bool public _devCanEat;
bool public _isAnarchy;
uint256 public _orca;
uint256 public _river;
uint256 public _bottlenose;
uint256 public _flipper = 42069e17;
uint256 public _peter = 210345e17;
address public _owner;
address public _UniLP;
uint256 public _lpMin;
uint256 public _feeLevel1;
uint256 public _feeLevel2;
event Snatched(address indexed user, uint256 amount);
constructor() public
ERC20("dolphins.wtf", "EEEE")
ERC20Capped(42069e18)
{
}
// levels: checks caller's balance to determine if they can access a function
function uniLPBalance() public view returns (uint256) {
}
function amILP() public view returns(bool) {
}
function amIOrca() public view returns(bool) {
}
// Orcas (are you even a dolphin?) - 69 (0.00164%); Can: Snatch tax base
modifier onlyOrca() {
}
function amIRiver() public view returns(bool) {
}
// River Dolphin (what is wrong with your nose?) - 420.69 (1%); Can: turn game on/off
modifier onlyRiver() {
require(<FILL_ME>)
_;
}
function amIBottlenose() public view returns(bool) {
}
// Bottlenose Dolphin (now that's a dolphin) - 2103.45 (5%); Can: Change tax rate (up to 2.5%); Devs can eat (allows dev to withdraw from the dev food bucket)
modifier onlyBottlenose() {
}
function amIFlipper() public view returns(bool) {
}
// Flipper (A based dolphin) - 4206.9 (10%); Can: Change levels thresholds (except Flipper and Peter); Change tax rate (up to 10%); Change cooldown time
modifier onlyFlipper() {
}
function amIPeter() public view returns(bool) {
}
// Peter the Dolphin (ask Margaret Howe Lovatt) - 21034.5 (50%); Can: Burn the key and hand the world over to the dolphins, and stops feeding the devs
modifier onlyPeter() {
}
// Are you the dev?
modifier onlyDev() {
}
modifier cooledDown() {
}
// snatch - grab from snatch pool, requires min 0.01 EEEE in snatchpool -- always free
function snatchFood() public onlyOrca cooledDown {
}
// Add directly to the snatchpool, if the caller is not the dev then set to cooldown
function depositToSnatchPool(uint256 EEEEtoSnatchPool) public {
}
function depositToDevFood(uint256 EEEEtoDevFood) public {
}
// startGame -- call fee level 1
function startGame() public onlyRiver cooledDown {
}
// pauseGame -- call fee level 1
function pauseGame() public onlyRiver cooledDown {
}
// all payed function calls should pay snatch, even if the game is off
function callsAlwaysPaySnatch (uint256 amount) internal {
}
// allowDevToEat - can only be turned on once -- call fee level 1
function allowDevToEat() public onlyBottlenose {
}
// changeSnatchRate - with max of 3% if Bottlenose; with max of 10% if Flipper -- call fee level 2
function changeSnatchRate(uint256 newSnatchRate) public onlyBottlenose cooledDown {
}
// changeCoolDownTime - make the game go faster or slower, cooldown to be set in hours (min 1; max 24) -- call fee level 2
function updateCoolDown(uint256 newCoolDown) public onlyFlipper cooledDown {
}
// functions to change levels, caller should ensure to calculate this on 1e18 basis -- call fee level 1 * sought change
function getSizeChangeFee(uint256 currentThreshold, uint256 newThreshold) private pure returns (uint256) {
}
function updateOrca(uint256 updatedThreshold) public onlyFlipper {
}
function updateRiver(uint256 updatedThreshold) public onlyFlipper {
}
function updateBottlenose(uint256 updatedThreshold) public onlyFlipper {
}
// dolphinAnarchy - transfer owner permissions to 0xNull & stops feeding dev. CAREFUL: this cannot be undone and once you do it the dolphins swim alone. -- call fee level 2
function activateAnarchy() public onlyPeter {
}
// transfers tokens to snatchSupply and fees paid to dev (5%) only when we have not descended into Dolphin BASED anarchy
function _snatch(uint256 amount) internal {
}
function _calcSnatchAmount (uint256 amount) internal view returns (uint256) {
}
// Need the _transfer function to break at _beforeTokenTransfer to do a second transfer to this contract for SnatchPool & DevFood, but if
function _beforeTokenTransfer(address sender, address recipient, uint256 amount) internal override {
}
// feedDev - allows owner to withdraw 5% thrown into dev food buck. Must only be called by the Dev.
function feedDev() public onlyDev {
}
// change fees for function calls, can only be triggered by Dev, and then enters cooldown
function changeFunctionFees(uint256 newFeeLevel1, uint256 newFeeLevel2) public onlyDev {
}
function setLP(address addrUniV2LP, uint256 lpMin) public onlyDev {
}
function mint(address _to, uint256 amount) public onlyDev {
}
}
| amIRiver(),"You're not even a river dolphin" | 20,821 | amIRiver() |
"You're not even a bottlenose dolphin" | //SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
import "@openzeppelin/contracts/token/ERC20/ERC20Capped.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/GSN/Context.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/math/Math.sol";
// Eeee! Welcome Dolphins!
//
//////////////////////////////////////////////////////////////////////
// __ //
// _.-~ ) ____ eeee ____ //
// _..--~~~~,' ,-/ _ //
// .-'. . . .' ,-',' ,' ) //
// ,'. . . _ ,--~,-'__..-' ,' //
// ,'. . . (@)' ---~~~~ ,' //
// /. . . . '~~ ,-' //
// /. . . . . ,-' //
// ; . . . . - . ,' //
// : . . . . _ / //
// . . . . . `-.: //
// . . . ./ - . ) //
// . . . | _____..---.._/ ____ dolphins.wtf ____ //
//~---~~~~-~~---~~~~----~~~~-~~~~-~~---~~~~----~~~~~~---~~~~-~~---~~//
// //
//////////////////////////////////////////////////////////////////////
//
// This code has not been audited, but has been reviewed. Hopefully it's bug free...
// If you do find bugs, remember those were features and part of the game... Don't hate the player.
//
// Also, this token is a worthless game token. Don't buy it. Just farm it, and then play games. It will be fun.
//
// Eeee! Let the games begin!
// eeee, hardcap set on deployment with minting to dev for subsequent deployment into DolphinPods (2x) & snatchFeeder
contract eeee is ERC20Capped, Ownable {
using SafeMath for uint256;
bool public _isGameActive;
uint256 public _lastUpdated;
uint256 public _coolDownTime;
uint256 public _snatchRate;
uint256 public _snatchPool;
uint256 public _devFoodBucket;
bool public _devCanEat;
bool public _isAnarchy;
uint256 public _orca;
uint256 public _river;
uint256 public _bottlenose;
uint256 public _flipper = 42069e17;
uint256 public _peter = 210345e17;
address public _owner;
address public _UniLP;
uint256 public _lpMin;
uint256 public _feeLevel1;
uint256 public _feeLevel2;
event Snatched(address indexed user, uint256 amount);
constructor() public
ERC20("dolphins.wtf", "EEEE")
ERC20Capped(42069e18)
{
}
// levels: checks caller's balance to determine if they can access a function
function uniLPBalance() public view returns (uint256) {
}
function amILP() public view returns(bool) {
}
function amIOrca() public view returns(bool) {
}
// Orcas (are you even a dolphin?) - 69 (0.00164%); Can: Snatch tax base
modifier onlyOrca() {
}
function amIRiver() public view returns(bool) {
}
// River Dolphin (what is wrong with your nose?) - 420.69 (1%); Can: turn game on/off
modifier onlyRiver() {
}
function amIBottlenose() public view returns(bool) {
}
// Bottlenose Dolphin (now that's a dolphin) - 2103.45 (5%); Can: Change tax rate (up to 2.5%); Devs can eat (allows dev to withdraw from the dev food bucket)
modifier onlyBottlenose() {
require(<FILL_ME>)
_;
}
function amIFlipper() public view returns(bool) {
}
// Flipper (A based dolphin) - 4206.9 (10%); Can: Change levels thresholds (except Flipper and Peter); Change tax rate (up to 10%); Change cooldown time
modifier onlyFlipper() {
}
function amIPeter() public view returns(bool) {
}
// Peter the Dolphin (ask Margaret Howe Lovatt) - 21034.5 (50%); Can: Burn the key and hand the world over to the dolphins, and stops feeding the devs
modifier onlyPeter() {
}
// Are you the dev?
modifier onlyDev() {
}
modifier cooledDown() {
}
// snatch - grab from snatch pool, requires min 0.01 EEEE in snatchpool -- always free
function snatchFood() public onlyOrca cooledDown {
}
// Add directly to the snatchpool, if the caller is not the dev then set to cooldown
function depositToSnatchPool(uint256 EEEEtoSnatchPool) public {
}
function depositToDevFood(uint256 EEEEtoDevFood) public {
}
// startGame -- call fee level 1
function startGame() public onlyRiver cooledDown {
}
// pauseGame -- call fee level 1
function pauseGame() public onlyRiver cooledDown {
}
// all payed function calls should pay snatch, even if the game is off
function callsAlwaysPaySnatch (uint256 amount) internal {
}
// allowDevToEat - can only be turned on once -- call fee level 1
function allowDevToEat() public onlyBottlenose {
}
// changeSnatchRate - with max of 3% if Bottlenose; with max of 10% if Flipper -- call fee level 2
function changeSnatchRate(uint256 newSnatchRate) public onlyBottlenose cooledDown {
}
// changeCoolDownTime - make the game go faster or slower, cooldown to be set in hours (min 1; max 24) -- call fee level 2
function updateCoolDown(uint256 newCoolDown) public onlyFlipper cooledDown {
}
// functions to change levels, caller should ensure to calculate this on 1e18 basis -- call fee level 1 * sought change
function getSizeChangeFee(uint256 currentThreshold, uint256 newThreshold) private pure returns (uint256) {
}
function updateOrca(uint256 updatedThreshold) public onlyFlipper {
}
function updateRiver(uint256 updatedThreshold) public onlyFlipper {
}
function updateBottlenose(uint256 updatedThreshold) public onlyFlipper {
}
// dolphinAnarchy - transfer owner permissions to 0xNull & stops feeding dev. CAREFUL: this cannot be undone and once you do it the dolphins swim alone. -- call fee level 2
function activateAnarchy() public onlyPeter {
}
// transfers tokens to snatchSupply and fees paid to dev (5%) only when we have not descended into Dolphin BASED anarchy
function _snatch(uint256 amount) internal {
}
function _calcSnatchAmount (uint256 amount) internal view returns (uint256) {
}
// Need the _transfer function to break at _beforeTokenTransfer to do a second transfer to this contract for SnatchPool & DevFood, but if
function _beforeTokenTransfer(address sender, address recipient, uint256 amount) internal override {
}
// feedDev - allows owner to withdraw 5% thrown into dev food buck. Must only be called by the Dev.
function feedDev() public onlyDev {
}
// change fees for function calls, can only be triggered by Dev, and then enters cooldown
function changeFunctionFees(uint256 newFeeLevel1, uint256 newFeeLevel2) public onlyDev {
}
function setLP(address addrUniV2LP, uint256 lpMin) public onlyDev {
}
function mint(address _to, uint256 amount) public onlyDev {
}
}
| amIBottlenose(),"You're not even a bottlenose dolphin" | 20,821 | amIBottlenose() |
"You're not flipper" | //SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
import "@openzeppelin/contracts/token/ERC20/ERC20Capped.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/GSN/Context.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/math/Math.sol";
// Eeee! Welcome Dolphins!
//
//////////////////////////////////////////////////////////////////////
// __ //
// _.-~ ) ____ eeee ____ //
// _..--~~~~,' ,-/ _ //
// .-'. . . .' ,-',' ,' ) //
// ,'. . . _ ,--~,-'__..-' ,' //
// ,'. . . (@)' ---~~~~ ,' //
// /. . . . '~~ ,-' //
// /. . . . . ,-' //
// ; . . . . - . ,' //
// : . . . . _ / //
// . . . . . `-.: //
// . . . ./ - . ) //
// . . . | _____..---.._/ ____ dolphins.wtf ____ //
//~---~~~~-~~---~~~~----~~~~-~~~~-~~---~~~~----~~~~~~---~~~~-~~---~~//
// //
//////////////////////////////////////////////////////////////////////
//
// This code has not been audited, but has been reviewed. Hopefully it's bug free...
// If you do find bugs, remember those were features and part of the game... Don't hate the player.
//
// Also, this token is a worthless game token. Don't buy it. Just farm it, and then play games. It will be fun.
//
// Eeee! Let the games begin!
// eeee, hardcap set on deployment with minting to dev for subsequent deployment into DolphinPods (2x) & snatchFeeder
contract eeee is ERC20Capped, Ownable {
using SafeMath for uint256;
bool public _isGameActive;
uint256 public _lastUpdated;
uint256 public _coolDownTime;
uint256 public _snatchRate;
uint256 public _snatchPool;
uint256 public _devFoodBucket;
bool public _devCanEat;
bool public _isAnarchy;
uint256 public _orca;
uint256 public _river;
uint256 public _bottlenose;
uint256 public _flipper = 42069e17;
uint256 public _peter = 210345e17;
address public _owner;
address public _UniLP;
uint256 public _lpMin;
uint256 public _feeLevel1;
uint256 public _feeLevel2;
event Snatched(address indexed user, uint256 amount);
constructor() public
ERC20("dolphins.wtf", "EEEE")
ERC20Capped(42069e18)
{
}
// levels: checks caller's balance to determine if they can access a function
function uniLPBalance() public view returns (uint256) {
}
function amILP() public view returns(bool) {
}
function amIOrca() public view returns(bool) {
}
// Orcas (are you even a dolphin?) - 69 (0.00164%); Can: Snatch tax base
modifier onlyOrca() {
}
function amIRiver() public view returns(bool) {
}
// River Dolphin (what is wrong with your nose?) - 420.69 (1%); Can: turn game on/off
modifier onlyRiver() {
}
function amIBottlenose() public view returns(bool) {
}
// Bottlenose Dolphin (now that's a dolphin) - 2103.45 (5%); Can: Change tax rate (up to 2.5%); Devs can eat (allows dev to withdraw from the dev food bucket)
modifier onlyBottlenose() {
}
function amIFlipper() public view returns(bool) {
}
// Flipper (A based dolphin) - 4206.9 (10%); Can: Change levels thresholds (except Flipper and Peter); Change tax rate (up to 10%); Change cooldown time
modifier onlyFlipper() {
require(<FILL_ME>)
_;
}
function amIPeter() public view returns(bool) {
}
// Peter the Dolphin (ask Margaret Howe Lovatt) - 21034.5 (50%); Can: Burn the key and hand the world over to the dolphins, and stops feeding the devs
modifier onlyPeter() {
}
// Are you the dev?
modifier onlyDev() {
}
modifier cooledDown() {
}
// snatch - grab from snatch pool, requires min 0.01 EEEE in snatchpool -- always free
function snatchFood() public onlyOrca cooledDown {
}
// Add directly to the snatchpool, if the caller is not the dev then set to cooldown
function depositToSnatchPool(uint256 EEEEtoSnatchPool) public {
}
function depositToDevFood(uint256 EEEEtoDevFood) public {
}
// startGame -- call fee level 1
function startGame() public onlyRiver cooledDown {
}
// pauseGame -- call fee level 1
function pauseGame() public onlyRiver cooledDown {
}
// all payed function calls should pay snatch, even if the game is off
function callsAlwaysPaySnatch (uint256 amount) internal {
}
// allowDevToEat - can only be turned on once -- call fee level 1
function allowDevToEat() public onlyBottlenose {
}
// changeSnatchRate - with max of 3% if Bottlenose; with max of 10% if Flipper -- call fee level 2
function changeSnatchRate(uint256 newSnatchRate) public onlyBottlenose cooledDown {
}
// changeCoolDownTime - make the game go faster or slower, cooldown to be set in hours (min 1; max 24) -- call fee level 2
function updateCoolDown(uint256 newCoolDown) public onlyFlipper cooledDown {
}
// functions to change levels, caller should ensure to calculate this on 1e18 basis -- call fee level 1 * sought change
function getSizeChangeFee(uint256 currentThreshold, uint256 newThreshold) private pure returns (uint256) {
}
function updateOrca(uint256 updatedThreshold) public onlyFlipper {
}
function updateRiver(uint256 updatedThreshold) public onlyFlipper {
}
function updateBottlenose(uint256 updatedThreshold) public onlyFlipper {
}
// dolphinAnarchy - transfer owner permissions to 0xNull & stops feeding dev. CAREFUL: this cannot be undone and once you do it the dolphins swim alone. -- call fee level 2
function activateAnarchy() public onlyPeter {
}
// transfers tokens to snatchSupply and fees paid to dev (5%) only when we have not descended into Dolphin BASED anarchy
function _snatch(uint256 amount) internal {
}
function _calcSnatchAmount (uint256 amount) internal view returns (uint256) {
}
// Need the _transfer function to break at _beforeTokenTransfer to do a second transfer to this contract for SnatchPool & DevFood, but if
function _beforeTokenTransfer(address sender, address recipient, uint256 amount) internal override {
}
// feedDev - allows owner to withdraw 5% thrown into dev food buck. Must only be called by the Dev.
function feedDev() public onlyDev {
}
// change fees for function calls, can only be triggered by Dev, and then enters cooldown
function changeFunctionFees(uint256 newFeeLevel1, uint256 newFeeLevel2) public onlyDev {
}
function setLP(address addrUniV2LP, uint256 lpMin) public onlyDev {
}
function mint(address _to, uint256 amount) public onlyDev {
}
}
| amIFlipper(),"You're not flipper" | 20,821 | amIFlipper() |
"You're not peter the dolphin" | //SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
import "@openzeppelin/contracts/token/ERC20/ERC20Capped.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/GSN/Context.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/math/Math.sol";
// Eeee! Welcome Dolphins!
//
//////////////////////////////////////////////////////////////////////
// __ //
// _.-~ ) ____ eeee ____ //
// _..--~~~~,' ,-/ _ //
// .-'. . . .' ,-',' ,' ) //
// ,'. . . _ ,--~,-'__..-' ,' //
// ,'. . . (@)' ---~~~~ ,' //
// /. . . . '~~ ,-' //
// /. . . . . ,-' //
// ; . . . . - . ,' //
// : . . . . _ / //
// . . . . . `-.: //
// . . . ./ - . ) //
// . . . | _____..---.._/ ____ dolphins.wtf ____ //
//~---~~~~-~~---~~~~----~~~~-~~~~-~~---~~~~----~~~~~~---~~~~-~~---~~//
// //
//////////////////////////////////////////////////////////////////////
//
// This code has not been audited, but has been reviewed. Hopefully it's bug free...
// If you do find bugs, remember those were features and part of the game... Don't hate the player.
//
// Also, this token is a worthless game token. Don't buy it. Just farm it, and then play games. It will be fun.
//
// Eeee! Let the games begin!
// eeee, hardcap set on deployment with minting to dev for subsequent deployment into DolphinPods (2x) & snatchFeeder
contract eeee is ERC20Capped, Ownable {
using SafeMath for uint256;
bool public _isGameActive;
uint256 public _lastUpdated;
uint256 public _coolDownTime;
uint256 public _snatchRate;
uint256 public _snatchPool;
uint256 public _devFoodBucket;
bool public _devCanEat;
bool public _isAnarchy;
uint256 public _orca;
uint256 public _river;
uint256 public _bottlenose;
uint256 public _flipper = 42069e17;
uint256 public _peter = 210345e17;
address public _owner;
address public _UniLP;
uint256 public _lpMin;
uint256 public _feeLevel1;
uint256 public _feeLevel2;
event Snatched(address indexed user, uint256 amount);
constructor() public
ERC20("dolphins.wtf", "EEEE")
ERC20Capped(42069e18)
{
}
// levels: checks caller's balance to determine if they can access a function
function uniLPBalance() public view returns (uint256) {
}
function amILP() public view returns(bool) {
}
function amIOrca() public view returns(bool) {
}
// Orcas (are you even a dolphin?) - 69 (0.00164%); Can: Snatch tax base
modifier onlyOrca() {
}
function amIRiver() public view returns(bool) {
}
// River Dolphin (what is wrong with your nose?) - 420.69 (1%); Can: turn game on/off
modifier onlyRiver() {
}
function amIBottlenose() public view returns(bool) {
}
// Bottlenose Dolphin (now that's a dolphin) - 2103.45 (5%); Can: Change tax rate (up to 2.5%); Devs can eat (allows dev to withdraw from the dev food bucket)
modifier onlyBottlenose() {
}
function amIFlipper() public view returns(bool) {
}
// Flipper (A based dolphin) - 4206.9 (10%); Can: Change levels thresholds (except Flipper and Peter); Change tax rate (up to 10%); Change cooldown time
modifier onlyFlipper() {
}
function amIPeter() public view returns(bool) {
}
// Peter the Dolphin (ask Margaret Howe Lovatt) - 21034.5 (50%); Can: Burn the key and hand the world over to the dolphins, and stops feeding the devs
modifier onlyPeter() {
require(<FILL_ME>)
_;
}
// Are you the dev?
modifier onlyDev() {
}
modifier cooledDown() {
}
// snatch - grab from snatch pool, requires min 0.01 EEEE in snatchpool -- always free
function snatchFood() public onlyOrca cooledDown {
}
// Add directly to the snatchpool, if the caller is not the dev then set to cooldown
function depositToSnatchPool(uint256 EEEEtoSnatchPool) public {
}
function depositToDevFood(uint256 EEEEtoDevFood) public {
}
// startGame -- call fee level 1
function startGame() public onlyRiver cooledDown {
}
// pauseGame -- call fee level 1
function pauseGame() public onlyRiver cooledDown {
}
// all payed function calls should pay snatch, even if the game is off
function callsAlwaysPaySnatch (uint256 amount) internal {
}
// allowDevToEat - can only be turned on once -- call fee level 1
function allowDevToEat() public onlyBottlenose {
}
// changeSnatchRate - with max of 3% if Bottlenose; with max of 10% if Flipper -- call fee level 2
function changeSnatchRate(uint256 newSnatchRate) public onlyBottlenose cooledDown {
}
// changeCoolDownTime - make the game go faster or slower, cooldown to be set in hours (min 1; max 24) -- call fee level 2
function updateCoolDown(uint256 newCoolDown) public onlyFlipper cooledDown {
}
// functions to change levels, caller should ensure to calculate this on 1e18 basis -- call fee level 1 * sought change
function getSizeChangeFee(uint256 currentThreshold, uint256 newThreshold) private pure returns (uint256) {
}
function updateOrca(uint256 updatedThreshold) public onlyFlipper {
}
function updateRiver(uint256 updatedThreshold) public onlyFlipper {
}
function updateBottlenose(uint256 updatedThreshold) public onlyFlipper {
}
// dolphinAnarchy - transfer owner permissions to 0xNull & stops feeding dev. CAREFUL: this cannot be undone and once you do it the dolphins swim alone. -- call fee level 2
function activateAnarchy() public onlyPeter {
}
// transfers tokens to snatchSupply and fees paid to dev (5%) only when we have not descended into Dolphin BASED anarchy
function _snatch(uint256 amount) internal {
}
function _calcSnatchAmount (uint256 amount) internal view returns (uint256) {
}
// Need the _transfer function to break at _beforeTokenTransfer to do a second transfer to this contract for SnatchPool & DevFood, but if
function _beforeTokenTransfer(address sender, address recipient, uint256 amount) internal override {
}
// feedDev - allows owner to withdraw 5% thrown into dev food buck. Must only be called by the Dev.
function feedDev() public onlyDev {
}
// change fees for function calls, can only be triggered by Dev, and then enters cooldown
function changeFunctionFees(uint256 newFeeLevel1, uint256 newFeeLevel2) public onlyDev {
}
function setLP(address addrUniV2LP, uint256 lpMin) public onlyDev {
}
function mint(address _to, uint256 amount) public onlyDev {
}
}
| amIPeter(),"You're not peter the dolphin" | 20,821 | amIPeter() |
"You're not the dev, get out of here" | //SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
import "@openzeppelin/contracts/token/ERC20/ERC20Capped.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/GSN/Context.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/math/Math.sol";
// Eeee! Welcome Dolphins!
//
//////////////////////////////////////////////////////////////////////
// __ //
// _.-~ ) ____ eeee ____ //
// _..--~~~~,' ,-/ _ //
// .-'. . . .' ,-',' ,' ) //
// ,'. . . _ ,--~,-'__..-' ,' //
// ,'. . . (@)' ---~~~~ ,' //
// /. . . . '~~ ,-' //
// /. . . . . ,-' //
// ; . . . . - . ,' //
// : . . . . _ / //
// . . . . . `-.: //
// . . . ./ - . ) //
// . . . | _____..---.._/ ____ dolphins.wtf ____ //
//~---~~~~-~~---~~~~----~~~~-~~~~-~~---~~~~----~~~~~~---~~~~-~~---~~//
// //
//////////////////////////////////////////////////////////////////////
//
// This code has not been audited, but has been reviewed. Hopefully it's bug free...
// If you do find bugs, remember those were features and part of the game... Don't hate the player.
//
// Also, this token is a worthless game token. Don't buy it. Just farm it, and then play games. It will be fun.
//
// Eeee! Let the games begin!
// eeee, hardcap set on deployment with minting to dev for subsequent deployment into DolphinPods (2x) & snatchFeeder
contract eeee is ERC20Capped, Ownable {
using SafeMath for uint256;
bool public _isGameActive;
uint256 public _lastUpdated;
uint256 public _coolDownTime;
uint256 public _snatchRate;
uint256 public _snatchPool;
uint256 public _devFoodBucket;
bool public _devCanEat;
bool public _isAnarchy;
uint256 public _orca;
uint256 public _river;
uint256 public _bottlenose;
uint256 public _flipper = 42069e17;
uint256 public _peter = 210345e17;
address public _owner;
address public _UniLP;
uint256 public _lpMin;
uint256 public _feeLevel1;
uint256 public _feeLevel2;
event Snatched(address indexed user, uint256 amount);
constructor() public
ERC20("dolphins.wtf", "EEEE")
ERC20Capped(42069e18)
{
}
// levels: checks caller's balance to determine if they can access a function
function uniLPBalance() public view returns (uint256) {
}
function amILP() public view returns(bool) {
}
function amIOrca() public view returns(bool) {
}
// Orcas (are you even a dolphin?) - 69 (0.00164%); Can: Snatch tax base
modifier onlyOrca() {
}
function amIRiver() public view returns(bool) {
}
// River Dolphin (what is wrong with your nose?) - 420.69 (1%); Can: turn game on/off
modifier onlyRiver() {
}
function amIBottlenose() public view returns(bool) {
}
// Bottlenose Dolphin (now that's a dolphin) - 2103.45 (5%); Can: Change tax rate (up to 2.5%); Devs can eat (allows dev to withdraw from the dev food bucket)
modifier onlyBottlenose() {
}
function amIFlipper() public view returns(bool) {
}
// Flipper (A based dolphin) - 4206.9 (10%); Can: Change levels thresholds (except Flipper and Peter); Change tax rate (up to 10%); Change cooldown time
modifier onlyFlipper() {
}
function amIPeter() public view returns(bool) {
}
// Peter the Dolphin (ask Margaret Howe Lovatt) - 21034.5 (50%); Can: Burn the key and hand the world over to the dolphins, and stops feeding the devs
modifier onlyPeter() {
}
// Are you the dev?
modifier onlyDev() {
require(<FILL_ME>)
_;
}
modifier cooledDown() {
}
// snatch - grab from snatch pool, requires min 0.01 EEEE in snatchpool -- always free
function snatchFood() public onlyOrca cooledDown {
}
// Add directly to the snatchpool, if the caller is not the dev then set to cooldown
function depositToSnatchPool(uint256 EEEEtoSnatchPool) public {
}
function depositToDevFood(uint256 EEEEtoDevFood) public {
}
// startGame -- call fee level 1
function startGame() public onlyRiver cooledDown {
}
// pauseGame -- call fee level 1
function pauseGame() public onlyRiver cooledDown {
}
// all payed function calls should pay snatch, even if the game is off
function callsAlwaysPaySnatch (uint256 amount) internal {
}
// allowDevToEat - can only be turned on once -- call fee level 1
function allowDevToEat() public onlyBottlenose {
}
// changeSnatchRate - with max of 3% if Bottlenose; with max of 10% if Flipper -- call fee level 2
function changeSnatchRate(uint256 newSnatchRate) public onlyBottlenose cooledDown {
}
// changeCoolDownTime - make the game go faster or slower, cooldown to be set in hours (min 1; max 24) -- call fee level 2
function updateCoolDown(uint256 newCoolDown) public onlyFlipper cooledDown {
}
// functions to change levels, caller should ensure to calculate this on 1e18 basis -- call fee level 1 * sought change
function getSizeChangeFee(uint256 currentThreshold, uint256 newThreshold) private pure returns (uint256) {
}
function updateOrca(uint256 updatedThreshold) public onlyFlipper {
}
function updateRiver(uint256 updatedThreshold) public onlyFlipper {
}
function updateBottlenose(uint256 updatedThreshold) public onlyFlipper {
}
// dolphinAnarchy - transfer owner permissions to 0xNull & stops feeding dev. CAREFUL: this cannot be undone and once you do it the dolphins swim alone. -- call fee level 2
function activateAnarchy() public onlyPeter {
}
// transfers tokens to snatchSupply and fees paid to dev (5%) only when we have not descended into Dolphin BASED anarchy
function _snatch(uint256 amount) internal {
}
function _calcSnatchAmount (uint256 amount) internal view returns (uint256) {
}
// Need the _transfer function to break at _beforeTokenTransfer to do a second transfer to this contract for SnatchPool & DevFood, but if
function _beforeTokenTransfer(address sender, address recipient, uint256 amount) internal override {
}
// feedDev - allows owner to withdraw 5% thrown into dev food buck. Must only be called by the Dev.
function feedDev() public onlyDev {
}
// change fees for function calls, can only be triggered by Dev, and then enters cooldown
function changeFunctionFees(uint256 newFeeLevel1, uint256 newFeeLevel2) public onlyDev {
}
function setLP(address addrUniV2LP, uint256 lpMin) public onlyDev {
}
function mint(address _to, uint256 amount) public onlyDev {
}
}
| address(msg.sender)==_owner,"You're not the dev, get out of here" | 20,821 | address(msg.sender)==_owner |
"Eeee! The game has already started" | //SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
import "@openzeppelin/contracts/token/ERC20/ERC20Capped.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/GSN/Context.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/math/Math.sol";
// Eeee! Welcome Dolphins!
//
//////////////////////////////////////////////////////////////////////
// __ //
// _.-~ ) ____ eeee ____ //
// _..--~~~~,' ,-/ _ //
// .-'. . . .' ,-',' ,' ) //
// ,'. . . _ ,--~,-'__..-' ,' //
// ,'. . . (@)' ---~~~~ ,' //
// /. . . . '~~ ,-' //
// /. . . . . ,-' //
// ; . . . . - . ,' //
// : . . . . _ / //
// . . . . . `-.: //
// . . . ./ - . ) //
// . . . | _____..---.._/ ____ dolphins.wtf ____ //
//~---~~~~-~~---~~~~----~~~~-~~~~-~~---~~~~----~~~~~~---~~~~-~~---~~//
// //
//////////////////////////////////////////////////////////////////////
//
// This code has not been audited, but has been reviewed. Hopefully it's bug free...
// If you do find bugs, remember those were features and part of the game... Don't hate the player.
//
// Also, this token is a worthless game token. Don't buy it. Just farm it, and then play games. It will be fun.
//
// Eeee! Let the games begin!
// eeee, hardcap set on deployment with minting to dev for subsequent deployment into DolphinPods (2x) & snatchFeeder
contract eeee is ERC20Capped, Ownable {
using SafeMath for uint256;
bool public _isGameActive;
uint256 public _lastUpdated;
uint256 public _coolDownTime;
uint256 public _snatchRate;
uint256 public _snatchPool;
uint256 public _devFoodBucket;
bool public _devCanEat;
bool public _isAnarchy;
uint256 public _orca;
uint256 public _river;
uint256 public _bottlenose;
uint256 public _flipper = 42069e17;
uint256 public _peter = 210345e17;
address public _owner;
address public _UniLP;
uint256 public _lpMin;
uint256 public _feeLevel1;
uint256 public _feeLevel2;
event Snatched(address indexed user, uint256 amount);
constructor() public
ERC20("dolphins.wtf", "EEEE")
ERC20Capped(42069e18)
{
}
// levels: checks caller's balance to determine if they can access a function
function uniLPBalance() public view returns (uint256) {
}
function amILP() public view returns(bool) {
}
function amIOrca() public view returns(bool) {
}
// Orcas (are you even a dolphin?) - 69 (0.00164%); Can: Snatch tax base
modifier onlyOrca() {
}
function amIRiver() public view returns(bool) {
}
// River Dolphin (what is wrong with your nose?) - 420.69 (1%); Can: turn game on/off
modifier onlyRiver() {
}
function amIBottlenose() public view returns(bool) {
}
// Bottlenose Dolphin (now that's a dolphin) - 2103.45 (5%); Can: Change tax rate (up to 2.5%); Devs can eat (allows dev to withdraw from the dev food bucket)
modifier onlyBottlenose() {
}
function amIFlipper() public view returns(bool) {
}
// Flipper (A based dolphin) - 4206.9 (10%); Can: Change levels thresholds (except Flipper and Peter); Change tax rate (up to 10%); Change cooldown time
modifier onlyFlipper() {
}
function amIPeter() public view returns(bool) {
}
// Peter the Dolphin (ask Margaret Howe Lovatt) - 21034.5 (50%); Can: Burn the key and hand the world over to the dolphins, and stops feeding the devs
modifier onlyPeter() {
}
// Are you the dev?
modifier onlyDev() {
}
modifier cooledDown() {
}
// snatch - grab from snatch pool, requires min 0.01 EEEE in snatchpool -- always free
function snatchFood() public onlyOrca cooledDown {
}
// Add directly to the snatchpool, if the caller is not the dev then set to cooldown
function depositToSnatchPool(uint256 EEEEtoSnatchPool) public {
}
function depositToDevFood(uint256 EEEEtoDevFood) public {
}
// startGame -- call fee level 1
function startGame() public onlyRiver cooledDown {
require(<FILL_ME>)
transfer(address(this), _feeLevel1);
// because the game doesn't turn on until after this call completes we need to manually add to snatch
callsAlwaysPaySnatch(_feeLevel1);
_isGameActive = true;
_lastUpdated = now;
}
// pauseGame -- call fee level 1
function pauseGame() public onlyRiver cooledDown {
}
// all payed function calls should pay snatch, even if the game is off
function callsAlwaysPaySnatch (uint256 amount) internal {
}
// allowDevToEat - can only be turned on once -- call fee level 1
function allowDevToEat() public onlyBottlenose {
}
// changeSnatchRate - with max of 3% if Bottlenose; with max of 10% if Flipper -- call fee level 2
function changeSnatchRate(uint256 newSnatchRate) public onlyBottlenose cooledDown {
}
// changeCoolDownTime - make the game go faster or slower, cooldown to be set in hours (min 1; max 24) -- call fee level 2
function updateCoolDown(uint256 newCoolDown) public onlyFlipper cooledDown {
}
// functions to change levels, caller should ensure to calculate this on 1e18 basis -- call fee level 1 * sought change
function getSizeChangeFee(uint256 currentThreshold, uint256 newThreshold) private pure returns (uint256) {
}
function updateOrca(uint256 updatedThreshold) public onlyFlipper {
}
function updateRiver(uint256 updatedThreshold) public onlyFlipper {
}
function updateBottlenose(uint256 updatedThreshold) public onlyFlipper {
}
// dolphinAnarchy - transfer owner permissions to 0xNull & stops feeding dev. CAREFUL: this cannot be undone and once you do it the dolphins swim alone. -- call fee level 2
function activateAnarchy() public onlyPeter {
}
// transfers tokens to snatchSupply and fees paid to dev (5%) only when we have not descended into Dolphin BASED anarchy
function _snatch(uint256 amount) internal {
}
function _calcSnatchAmount (uint256 amount) internal view returns (uint256) {
}
// Need the _transfer function to break at _beforeTokenTransfer to do a second transfer to this contract for SnatchPool & DevFood, but if
function _beforeTokenTransfer(address sender, address recipient, uint256 amount) internal override {
}
// feedDev - allows owner to withdraw 5% thrown into dev food buck. Must only be called by the Dev.
function feedDev() public onlyDev {
}
// change fees for function calls, can only be triggered by Dev, and then enters cooldown
function changeFunctionFees(uint256 newFeeLevel1, uint256 newFeeLevel2) public onlyDev {
}
function setLP(address addrUniV2LP, uint256 lpMin) public onlyDev {
}
function mint(address _to, uint256 amount) public onlyDev {
}
}
| !_isGameActive,"Eeee! The game has already started" | 20,821 | !_isGameActive |
"Eeee! Too late sucker, dev's eating tonight" | //SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
import "@openzeppelin/contracts/token/ERC20/ERC20Capped.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/GSN/Context.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/math/Math.sol";
// Eeee! Welcome Dolphins!
//
//////////////////////////////////////////////////////////////////////
// __ //
// _.-~ ) ____ eeee ____ //
// _..--~~~~,' ,-/ _ //
// .-'. . . .' ,-',' ,' ) //
// ,'. . . _ ,--~,-'__..-' ,' //
// ,'. . . (@)' ---~~~~ ,' //
// /. . . . '~~ ,-' //
// /. . . . . ,-' //
// ; . . . . - . ,' //
// : . . . . _ / //
// . . . . . `-.: //
// . . . ./ - . ) //
// . . . | _____..---.._/ ____ dolphins.wtf ____ //
//~---~~~~-~~---~~~~----~~~~-~~~~-~~---~~~~----~~~~~~---~~~~-~~---~~//
// //
//////////////////////////////////////////////////////////////////////
//
// This code has not been audited, but has been reviewed. Hopefully it's bug free...
// If you do find bugs, remember those were features and part of the game... Don't hate the player.
//
// Also, this token is a worthless game token. Don't buy it. Just farm it, and then play games. It will be fun.
//
// Eeee! Let the games begin!
// eeee, hardcap set on deployment with minting to dev for subsequent deployment into DolphinPods (2x) & snatchFeeder
contract eeee is ERC20Capped, Ownable {
using SafeMath for uint256;
bool public _isGameActive;
uint256 public _lastUpdated;
uint256 public _coolDownTime;
uint256 public _snatchRate;
uint256 public _snatchPool;
uint256 public _devFoodBucket;
bool public _devCanEat;
bool public _isAnarchy;
uint256 public _orca;
uint256 public _river;
uint256 public _bottlenose;
uint256 public _flipper = 42069e17;
uint256 public _peter = 210345e17;
address public _owner;
address public _UniLP;
uint256 public _lpMin;
uint256 public _feeLevel1;
uint256 public _feeLevel2;
event Snatched(address indexed user, uint256 amount);
constructor() public
ERC20("dolphins.wtf", "EEEE")
ERC20Capped(42069e18)
{
}
// levels: checks caller's balance to determine if they can access a function
function uniLPBalance() public view returns (uint256) {
}
function amILP() public view returns(bool) {
}
function amIOrca() public view returns(bool) {
}
// Orcas (are you even a dolphin?) - 69 (0.00164%); Can: Snatch tax base
modifier onlyOrca() {
}
function amIRiver() public view returns(bool) {
}
// River Dolphin (what is wrong with your nose?) - 420.69 (1%); Can: turn game on/off
modifier onlyRiver() {
}
function amIBottlenose() public view returns(bool) {
}
// Bottlenose Dolphin (now that's a dolphin) - 2103.45 (5%); Can: Change tax rate (up to 2.5%); Devs can eat (allows dev to withdraw from the dev food bucket)
modifier onlyBottlenose() {
}
function amIFlipper() public view returns(bool) {
}
// Flipper (A based dolphin) - 4206.9 (10%); Can: Change levels thresholds (except Flipper and Peter); Change tax rate (up to 10%); Change cooldown time
modifier onlyFlipper() {
}
function amIPeter() public view returns(bool) {
}
// Peter the Dolphin (ask Margaret Howe Lovatt) - 21034.5 (50%); Can: Burn the key and hand the world over to the dolphins, and stops feeding the devs
modifier onlyPeter() {
}
// Are you the dev?
modifier onlyDev() {
}
modifier cooledDown() {
}
// snatch - grab from snatch pool, requires min 0.01 EEEE in snatchpool -- always free
function snatchFood() public onlyOrca cooledDown {
}
// Add directly to the snatchpool, if the caller is not the dev then set to cooldown
function depositToSnatchPool(uint256 EEEEtoSnatchPool) public {
}
function depositToDevFood(uint256 EEEEtoDevFood) public {
}
// startGame -- call fee level 1
function startGame() public onlyRiver cooledDown {
}
// pauseGame -- call fee level 1
function pauseGame() public onlyRiver cooledDown {
}
// all payed function calls should pay snatch, even if the game is off
function callsAlwaysPaySnatch (uint256 amount) internal {
}
// allowDevToEat - can only be turned on once -- call fee level 1
function allowDevToEat() public onlyBottlenose {
require(<FILL_ME>)
transfer(address(this), _feeLevel1);
callsAlwaysPaySnatch(_feeLevel1);
_devCanEat = true;
_lastUpdated = now;
}
// changeSnatchRate - with max of 3% if Bottlenose; with max of 10% if Flipper -- call fee level 2
function changeSnatchRate(uint256 newSnatchRate) public onlyBottlenose cooledDown {
}
// changeCoolDownTime - make the game go faster or slower, cooldown to be set in hours (min 1; max 24) -- call fee level 2
function updateCoolDown(uint256 newCoolDown) public onlyFlipper cooledDown {
}
// functions to change levels, caller should ensure to calculate this on 1e18 basis -- call fee level 1 * sought change
function getSizeChangeFee(uint256 currentThreshold, uint256 newThreshold) private pure returns (uint256) {
}
function updateOrca(uint256 updatedThreshold) public onlyFlipper {
}
function updateRiver(uint256 updatedThreshold) public onlyFlipper {
}
function updateBottlenose(uint256 updatedThreshold) public onlyFlipper {
}
// dolphinAnarchy - transfer owner permissions to 0xNull & stops feeding dev. CAREFUL: this cannot be undone and once you do it the dolphins swim alone. -- call fee level 2
function activateAnarchy() public onlyPeter {
}
// transfers tokens to snatchSupply and fees paid to dev (5%) only when we have not descended into Dolphin BASED anarchy
function _snatch(uint256 amount) internal {
}
function _calcSnatchAmount (uint256 amount) internal view returns (uint256) {
}
// Need the _transfer function to break at _beforeTokenTransfer to do a second transfer to this contract for SnatchPool & DevFood, but if
function _beforeTokenTransfer(address sender, address recipient, uint256 amount) internal override {
}
// feedDev - allows owner to withdraw 5% thrown into dev food buck. Must only be called by the Dev.
function feedDev() public onlyDev {
}
// change fees for function calls, can only be triggered by Dev, and then enters cooldown
function changeFunctionFees(uint256 newFeeLevel1, uint256 newFeeLevel2) public onlyDev {
}
function setLP(address addrUniV2LP, uint256 lpMin) public onlyDev {
}
function mint(address _to, uint256 amount) public onlyDev {
}
}
| !_devCanEat,"Eeee! Too late sucker, dev's eating tonight" | 20,821 | !_devCanEat |
"Eeee! You don't have enough EEEE to make this change." | //SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
import "@openzeppelin/contracts/token/ERC20/ERC20Capped.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/GSN/Context.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/math/Math.sol";
// Eeee! Welcome Dolphins!
//
//////////////////////////////////////////////////////////////////////
// __ //
// _.-~ ) ____ eeee ____ //
// _..--~~~~,' ,-/ _ //
// .-'. . . .' ,-',' ,' ) //
// ,'. . . _ ,--~,-'__..-' ,' //
// ,'. . . (@)' ---~~~~ ,' //
// /. . . . '~~ ,-' //
// /. . . . . ,-' //
// ; . . . . - . ,' //
// : . . . . _ / //
// . . . . . `-.: //
// . . . ./ - . ) //
// . . . | _____..---.._/ ____ dolphins.wtf ____ //
//~---~~~~-~~---~~~~----~~~~-~~~~-~~---~~~~----~~~~~~---~~~~-~~---~~//
// //
//////////////////////////////////////////////////////////////////////
//
// This code has not been audited, but has been reviewed. Hopefully it's bug free...
// If you do find bugs, remember those were features and part of the game... Don't hate the player.
//
// Also, this token is a worthless game token. Don't buy it. Just farm it, and then play games. It will be fun.
//
// Eeee! Let the games begin!
// eeee, hardcap set on deployment with minting to dev for subsequent deployment into DolphinPods (2x) & snatchFeeder
contract eeee is ERC20Capped, Ownable {
using SafeMath for uint256;
bool public _isGameActive;
uint256 public _lastUpdated;
uint256 public _coolDownTime;
uint256 public _snatchRate;
uint256 public _snatchPool;
uint256 public _devFoodBucket;
bool public _devCanEat;
bool public _isAnarchy;
uint256 public _orca;
uint256 public _river;
uint256 public _bottlenose;
uint256 public _flipper = 42069e17;
uint256 public _peter = 210345e17;
address public _owner;
address public _UniLP;
uint256 public _lpMin;
uint256 public _feeLevel1;
uint256 public _feeLevel2;
event Snatched(address indexed user, uint256 amount);
constructor() public
ERC20("dolphins.wtf", "EEEE")
ERC20Capped(42069e18)
{
}
// levels: checks caller's balance to determine if they can access a function
function uniLPBalance() public view returns (uint256) {
}
function amILP() public view returns(bool) {
}
function amIOrca() public view returns(bool) {
}
// Orcas (are you even a dolphin?) - 69 (0.00164%); Can: Snatch tax base
modifier onlyOrca() {
}
function amIRiver() public view returns(bool) {
}
// River Dolphin (what is wrong with your nose?) - 420.69 (1%); Can: turn game on/off
modifier onlyRiver() {
}
function amIBottlenose() public view returns(bool) {
}
// Bottlenose Dolphin (now that's a dolphin) - 2103.45 (5%); Can: Change tax rate (up to 2.5%); Devs can eat (allows dev to withdraw from the dev food bucket)
modifier onlyBottlenose() {
}
function amIFlipper() public view returns(bool) {
}
// Flipper (A based dolphin) - 4206.9 (10%); Can: Change levels thresholds (except Flipper and Peter); Change tax rate (up to 10%); Change cooldown time
modifier onlyFlipper() {
}
function amIPeter() public view returns(bool) {
}
// Peter the Dolphin (ask Margaret Howe Lovatt) - 21034.5 (50%); Can: Burn the key and hand the world over to the dolphins, and stops feeding the devs
modifier onlyPeter() {
}
// Are you the dev?
modifier onlyDev() {
}
modifier cooledDown() {
}
// snatch - grab from snatch pool, requires min 0.01 EEEE in snatchpool -- always free
function snatchFood() public onlyOrca cooledDown {
}
// Add directly to the snatchpool, if the caller is not the dev then set to cooldown
function depositToSnatchPool(uint256 EEEEtoSnatchPool) public {
}
function depositToDevFood(uint256 EEEEtoDevFood) public {
}
// startGame -- call fee level 1
function startGame() public onlyRiver cooledDown {
}
// pauseGame -- call fee level 1
function pauseGame() public onlyRiver cooledDown {
}
// all payed function calls should pay snatch, even if the game is off
function callsAlwaysPaySnatch (uint256 amount) internal {
}
// allowDevToEat - can only be turned on once -- call fee level 1
function allowDevToEat() public onlyBottlenose {
}
// changeSnatchRate - with max of 3% if Bottlenose; with max of 10% if Flipper -- call fee level 2
function changeSnatchRate(uint256 newSnatchRate) public onlyBottlenose cooledDown {
}
// changeCoolDownTime - make the game go faster or slower, cooldown to be set in hours (min 1; max 24) -- call fee level 2
function updateCoolDown(uint256 newCoolDown) public onlyFlipper cooledDown {
}
// functions to change levels, caller should ensure to calculate this on 1e18 basis -- call fee level 1 * sought change
function getSizeChangeFee(uint256 currentThreshold, uint256 newThreshold) private pure returns (uint256) {
}
function updateOrca(uint256 updatedThreshold) public onlyFlipper {
uint256 changeFee = getSizeChangeFee(_orca, updatedThreshold);
require(<FILL_ME>)
require(updatedThreshold >= 1e18 && updatedThreshold <= 99e18, "Threshold for Orcas must be 1 to 99 EEEE");
require(updatedThreshold < _river, "Threshold for Orcas must be less than River Dolphins");
_orca = updatedThreshold;
transfer(address(this), changeFee);
callsAlwaysPaySnatch(changeFee);
_lastUpdated = now;
}
function updateRiver(uint256 updatedThreshold) public onlyFlipper {
}
function updateBottlenose(uint256 updatedThreshold) public onlyFlipper {
}
// dolphinAnarchy - transfer owner permissions to 0xNull & stops feeding dev. CAREFUL: this cannot be undone and once you do it the dolphins swim alone. -- call fee level 2
function activateAnarchy() public onlyPeter {
}
// transfers tokens to snatchSupply and fees paid to dev (5%) only when we have not descended into Dolphin BASED anarchy
function _snatch(uint256 amount) internal {
}
function _calcSnatchAmount (uint256 amount) internal view returns (uint256) {
}
// Need the _transfer function to break at _beforeTokenTransfer to do a second transfer to this contract for SnatchPool & DevFood, but if
function _beforeTokenTransfer(address sender, address recipient, uint256 amount) internal override {
}
// feedDev - allows owner to withdraw 5% thrown into dev food buck. Must only be called by the Dev.
function feedDev() public onlyDev {
}
// change fees for function calls, can only be triggered by Dev, and then enters cooldown
function changeFunctionFees(uint256 newFeeLevel1, uint256 newFeeLevel2) public onlyDev {
}
function setLP(address addrUniV2LP, uint256 lpMin) public onlyDev {
}
function mint(address _to, uint256 amount) public onlyDev {
}
}
| balanceOf(msg.sender)>=changeFee,"Eeee! You don't have enough EEEE to make this change." | 20,821 | balanceOf(msg.sender)>=changeFee |
"ERC20: transfer amount with snatch cost exceeds balance, send less" | //SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
import "@openzeppelin/contracts/token/ERC20/ERC20Capped.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/GSN/Context.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/math/Math.sol";
// Eeee! Welcome Dolphins!
//
//////////////////////////////////////////////////////////////////////
// __ //
// _.-~ ) ____ eeee ____ //
// _..--~~~~,' ,-/ _ //
// .-'. . . .' ,-',' ,' ) //
// ,'. . . _ ,--~,-'__..-' ,' //
// ,'. . . (@)' ---~~~~ ,' //
// /. . . . '~~ ,-' //
// /. . . . . ,-' //
// ; . . . . - . ,' //
// : . . . . _ / //
// . . . . . `-.: //
// . . . ./ - . ) //
// . . . | _____..---.._/ ____ dolphins.wtf ____ //
//~---~~~~-~~---~~~~----~~~~-~~~~-~~---~~~~----~~~~~~---~~~~-~~---~~//
// //
//////////////////////////////////////////////////////////////////////
//
// This code has not been audited, but has been reviewed. Hopefully it's bug free...
// If you do find bugs, remember those were features and part of the game... Don't hate the player.
//
// Also, this token is a worthless game token. Don't buy it. Just farm it, and then play games. It will be fun.
//
// Eeee! Let the games begin!
// eeee, hardcap set on deployment with minting to dev for subsequent deployment into DolphinPods (2x) & snatchFeeder
contract eeee is ERC20Capped, Ownable {
using SafeMath for uint256;
bool public _isGameActive;
uint256 public _lastUpdated;
uint256 public _coolDownTime;
uint256 public _snatchRate;
uint256 public _snatchPool;
uint256 public _devFoodBucket;
bool public _devCanEat;
bool public _isAnarchy;
uint256 public _orca;
uint256 public _river;
uint256 public _bottlenose;
uint256 public _flipper = 42069e17;
uint256 public _peter = 210345e17;
address public _owner;
address public _UniLP;
uint256 public _lpMin;
uint256 public _feeLevel1;
uint256 public _feeLevel2;
event Snatched(address indexed user, uint256 amount);
constructor() public
ERC20("dolphins.wtf", "EEEE")
ERC20Capped(42069e18)
{
}
// levels: checks caller's balance to determine if they can access a function
function uniLPBalance() public view returns (uint256) {
}
function amILP() public view returns(bool) {
}
function amIOrca() public view returns(bool) {
}
// Orcas (are you even a dolphin?) - 69 (0.00164%); Can: Snatch tax base
modifier onlyOrca() {
}
function amIRiver() public view returns(bool) {
}
// River Dolphin (what is wrong with your nose?) - 420.69 (1%); Can: turn game on/off
modifier onlyRiver() {
}
function amIBottlenose() public view returns(bool) {
}
// Bottlenose Dolphin (now that's a dolphin) - 2103.45 (5%); Can: Change tax rate (up to 2.5%); Devs can eat (allows dev to withdraw from the dev food bucket)
modifier onlyBottlenose() {
}
function amIFlipper() public view returns(bool) {
}
// Flipper (A based dolphin) - 4206.9 (10%); Can: Change levels thresholds (except Flipper and Peter); Change tax rate (up to 10%); Change cooldown time
modifier onlyFlipper() {
}
function amIPeter() public view returns(bool) {
}
// Peter the Dolphin (ask Margaret Howe Lovatt) - 21034.5 (50%); Can: Burn the key and hand the world over to the dolphins, and stops feeding the devs
modifier onlyPeter() {
}
// Are you the dev?
modifier onlyDev() {
}
modifier cooledDown() {
}
// snatch - grab from snatch pool, requires min 0.01 EEEE in snatchpool -- always free
function snatchFood() public onlyOrca cooledDown {
}
// Add directly to the snatchpool, if the caller is not the dev then set to cooldown
function depositToSnatchPool(uint256 EEEEtoSnatchPool) public {
}
function depositToDevFood(uint256 EEEEtoDevFood) public {
}
// startGame -- call fee level 1
function startGame() public onlyRiver cooledDown {
}
// pauseGame -- call fee level 1
function pauseGame() public onlyRiver cooledDown {
}
// all payed function calls should pay snatch, even if the game is off
function callsAlwaysPaySnatch (uint256 amount) internal {
}
// allowDevToEat - can only be turned on once -- call fee level 1
function allowDevToEat() public onlyBottlenose {
}
// changeSnatchRate - with max of 3% if Bottlenose; with max of 10% if Flipper -- call fee level 2
function changeSnatchRate(uint256 newSnatchRate) public onlyBottlenose cooledDown {
}
// changeCoolDownTime - make the game go faster or slower, cooldown to be set in hours (min 1; max 24) -- call fee level 2
function updateCoolDown(uint256 newCoolDown) public onlyFlipper cooledDown {
}
// functions to change levels, caller should ensure to calculate this on 1e18 basis -- call fee level 1 * sought change
function getSizeChangeFee(uint256 currentThreshold, uint256 newThreshold) private pure returns (uint256) {
}
function updateOrca(uint256 updatedThreshold) public onlyFlipper {
}
function updateRiver(uint256 updatedThreshold) public onlyFlipper {
}
function updateBottlenose(uint256 updatedThreshold) public onlyFlipper {
}
// dolphinAnarchy - transfer owner permissions to 0xNull & stops feeding dev. CAREFUL: this cannot be undone and once you do it the dolphins swim alone. -- call fee level 2
function activateAnarchy() public onlyPeter {
}
// transfers tokens to snatchSupply and fees paid to dev (5%) only when we have not descended into Dolphin BASED anarchy
function _snatch(uint256 amount) internal {
}
function _calcSnatchAmount (uint256 amount) internal view returns (uint256) {
}
// Need the _transfer function to break at _beforeTokenTransfer to do a second transfer to this contract for SnatchPool & DevFood, but if
function _beforeTokenTransfer(address sender, address recipient, uint256 amount) internal override {
super._beforeTokenTransfer(sender, recipient, amount);
// This function should only do anything if the game is active, otherwise it should allow normal transfers
if (_isGameActive) {
// TO DO, make sure that transfers from Uniswap LP pool adhere to this
// Don't snatch transfers from the Uniswap LP pool (if set)
if (_UniLP != address(sender)) {
// A first call to _transfer (where the recipient isn't this contract will create a second transfer to this contract
if (recipient != address(this)) {
//calculate snatchAmount
uint256 amountToSnatch = _calcSnatchAmount(amount);
// This function checks that the account sending funds has enough funds (transfer amount + snatch amount), otherwise reverts
require(<FILL_ME>)
// allocate amountToSnatch to snatchPool and devFoodBucket
_snatch(amountToSnatch);
// make transfer from sender to this address
_transfer(sender, address(this), amountToSnatch);
}
}
// After this, the normal function continues, and makes amount transfer to intended recipient
}
}
// feedDev - allows owner to withdraw 5% thrown into dev food buck. Must only be called by the Dev.
function feedDev() public onlyDev {
}
// change fees for function calls, can only be triggered by Dev, and then enters cooldown
function changeFunctionFees(uint256 newFeeLevel1, uint256 newFeeLevel2) public onlyDev {
}
function setLP(address addrUniV2LP, uint256 lpMin) public onlyDev {
}
function mint(address _to, uint256 amount) public onlyDev {
}
}
| balanceOf(sender).sub(amount).sub(amountToSnatch)>=0,"ERC20: transfer amount with snatch cost exceeds balance, send less" | 20,821 | balanceOf(sender).sub(amount).sub(amountToSnatch)>=0 |
"invalid input" | // SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.6.9;
pragma experimental ABIEncoderV2;
import { IERC20 } from "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/IERC20.sol";
import { Decimal } from "../utils/Decimal.sol";
import { PerpFiOwnableUpgrade } from "../utils/PerpFiOwnableUpgrade.sol";
import { DecimalERC20 } from "../utils/DecimalERC20.sol";
import { AddressArray } from "../utils/AddressArray.sol";
import { IRewardRecipient } from "../interface/IRewardRecipient.sol";
contract FeeTokenPoolDispatcherL1 is PerpFiOwnableUpgrade, DecimalERC20 {
using AddressArray for address[];
uint256 public constant TOKEN_AMOUNT_LIMIT = 20;
//
// EVENTS
//
event FeeRewardPoolAdded(address token, address feeRewardPool);
event FeeRewardPoolRemoved(address token, address feeRewardPool);
event FeeTransferred(address token, address feeRewardPool, uint256 amount);
//**********************************************************//
// Can not change the order of below state variables //
//**********************************************************//
mapping(IERC20 => IRewardRecipient) public feeRewardPoolMap;
address[] public feeTokens;
//**********************************************************//
// Can not change the order of above state variables //
//**********************************************************//
//◥◤◥◤◥◤◥◤◥◤◥◤◥◤◥◤ add state variables below ◥◤◥◤◥◤◥◤◥◤◥◤◥◤◥◤//
//◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣ add state variables above ◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣//
uint256[50] private __gap;
//
// FUNCTIONS
//
function initialize() external initializer {
}
function transferToFeeRewardPool() public {
}
function addFeeRewardPool(IRewardRecipient _recipient) external onlyOwner {
require(feeTokens.length < TOKEN_AMOUNT_LIMIT, "exceed token amount limit");
IERC20 token = _recipient.token();
require(<FILL_ME>)
feeRewardPoolMap[token] = _recipient;
emit FeeRewardPoolAdded(address(token), address(_recipient));
}
function removeFeeRewardPool(IRewardRecipient _recipient) external onlyOwner {
}
//
// VIEW FUNCTIONS
//
function isFeeTokenExisted(IERC20 _token) public view returns (bool) {
}
function getFeeTokenLength() external view returns (uint256) {
}
//
// INTERNAL FUNCTIONS
//
function transferToPool(IERC20 _token) private returns (bool) {
}
}
| feeTokens.add(address(token)),"invalid input" | 20,853 | feeTokens.add(address(token)) |
"invalid input" | // SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.6.9;
pragma experimental ABIEncoderV2;
import { IERC20 } from "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/IERC20.sol";
import { Decimal } from "../utils/Decimal.sol";
import { PerpFiOwnableUpgrade } from "../utils/PerpFiOwnableUpgrade.sol";
import { DecimalERC20 } from "../utils/DecimalERC20.sol";
import { AddressArray } from "../utils/AddressArray.sol";
import { IRewardRecipient } from "../interface/IRewardRecipient.sol";
contract FeeTokenPoolDispatcherL1 is PerpFiOwnableUpgrade, DecimalERC20 {
using AddressArray for address[];
uint256 public constant TOKEN_AMOUNT_LIMIT = 20;
//
// EVENTS
//
event FeeRewardPoolAdded(address token, address feeRewardPool);
event FeeRewardPoolRemoved(address token, address feeRewardPool);
event FeeTransferred(address token, address feeRewardPool, uint256 amount);
//**********************************************************//
// Can not change the order of below state variables //
//**********************************************************//
mapping(IERC20 => IRewardRecipient) public feeRewardPoolMap;
address[] public feeTokens;
//**********************************************************//
// Can not change the order of above state variables //
//**********************************************************//
//◥◤◥◤◥◤◥◤◥◤◥◤◥◤◥◤ add state variables below ◥◤◥◤◥◤◥◤◥◤◥◤◥◤◥◤//
//◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣ add state variables above ◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣//
uint256[50] private __gap;
//
// FUNCTIONS
//
function initialize() external initializer {
}
function transferToFeeRewardPool() public {
}
function addFeeRewardPool(IRewardRecipient _recipient) external onlyOwner {
}
function removeFeeRewardPool(IRewardRecipient _recipient) external onlyOwner {
require(<FILL_ME>)
IERC20 token = _recipient.token();
address removedAddr = feeTokens.remove(address(token));
require(removedAddr != address(0), "token does not exist");
require(removedAddr == address(token), "remove wrong token");
if (token.balanceOf(address(this)) > 0) {
transferToPool(token);
}
IRewardRecipient feeRewardPool = feeRewardPoolMap[token];
delete feeRewardPoolMap[token];
emit FeeRewardPoolRemoved(address(token), address(feeRewardPool));
}
//
// VIEW FUNCTIONS
//
function isFeeTokenExisted(IERC20 _token) public view returns (bool) {
}
function getFeeTokenLength() external view returns (uint256) {
}
//
// INTERNAL FUNCTIONS
//
function transferToPool(IERC20 _token) private returns (bool) {
}
}
| address(_recipient)!=address(0),"invalid input" | 20,853 | address(_recipient)!=address(0) |
null | pragma solidity ^0.4.2;
contract Likedapp{
//state variables
//like options: 1 - I love you-heart!, 2 - like-smile, 3 - youre cool-glasses, 4 - ok-regular, 5 -I dislike-angry you, 0 - welcome :)
//Model Raction
struct Reactions{
int8 action;
string message;
}
//Model User
struct User {
uint id;
uint userReactionCount;
address user_address;
string username;
Reactions[] reactions;
}
//Store User
User[] userStore;
//Fetch User
//TO:do we need id or address to reference user
mapping(address => User) public users;
//Store User Count
uint public userCount;
//message price
uint price = 0.00015 ether;
//my own
address public iown;
//event declaration
event UserCreated(uint indexed id);
event SentReaction(address user_address);
//Constructor
constructor() public{
}
function addUser(string _username) public {
//check string length
require(<FILL_ME>)
//TO DO: Check if username exist
require(users[msg.sender].id == 0);
userCount++;
userStore.length++;
User storage u = userStore[userStore.length - 1];
Reactions memory react = Reactions(0, "Welcome to LikeDapp! :D");
u.reactions.push(react);
u.id = userCount;
u.user_address = msg.sender;
u.username = _username;
u.userReactionCount++;
users[msg.sender] = u;
//UserCreated(userCount);
}
function getUserReaction(uint _i) external view returns (int8,string){
}
function sendReaction(address _a, int8 _l, string _m) public payable {
}
function getUserCount() external view returns (uint){
}
function getUsername() external view returns (string){
}
function getUserReactionCount() external view returns (uint){
}
//Payments
function buyMessage() public payable{
}
function withdraw() external{
}
function withdrawAmount(uint amount) external{
}
//check accounts
function checkAccount(address _a) external view returns (bool){
}
function amIin() external view returns (bool){
}
}
| bytes(_username).length>1 | 20,907 | bytes(_username).length>1 |
null | pragma solidity ^0.4.2;
contract Likedapp{
//state variables
//like options: 1 - I love you-heart!, 2 - like-smile, 3 - youre cool-glasses, 4 - ok-regular, 5 -I dislike-angry you, 0 - welcome :)
//Model Raction
struct Reactions{
int8 action;
string message;
}
//Model User
struct User {
uint id;
uint userReactionCount;
address user_address;
string username;
Reactions[] reactions;
}
//Store User
User[] userStore;
//Fetch User
//TO:do we need id or address to reference user
mapping(address => User) public users;
//Store User Count
uint public userCount;
//message price
uint price = 0.00015 ether;
//my own
address public iown;
//event declaration
event UserCreated(uint indexed id);
event SentReaction(address user_address);
//Constructor
constructor() public{
}
function addUser(string _username) public {
//check string length
require(bytes(_username).length > 1);
//TO DO: Check if username exist
require(<FILL_ME>)
userCount++;
userStore.length++;
User storage u = userStore[userStore.length - 1];
Reactions memory react = Reactions(0, "Welcome to LikeDapp! :D");
u.reactions.push(react);
u.id = userCount;
u.user_address = msg.sender;
u.username = _username;
u.userReactionCount++;
users[msg.sender] = u;
//UserCreated(userCount);
}
function getUserReaction(uint _i) external view returns (int8,string){
}
function sendReaction(address _a, int8 _l, string _m) public payable {
}
function getUserCount() external view returns (uint){
}
function getUsername() external view returns (string){
}
function getUserReactionCount() external view returns (uint){
}
//Payments
function buyMessage() public payable{
}
function withdraw() external{
}
function withdrawAmount(uint amount) external{
}
//check accounts
function checkAccount(address _a) external view returns (bool){
}
function amIin() external view returns (bool){
}
}
| users[msg.sender].id==0 | 20,907 | users[msg.sender].id==0 |
null | pragma solidity ^0.4.2;
contract Likedapp{
//state variables
//like options: 1 - I love you-heart!, 2 - like-smile, 3 - youre cool-glasses, 4 - ok-regular, 5 -I dislike-angry you, 0 - welcome :)
//Model Raction
struct Reactions{
int8 action;
string message;
}
//Model User
struct User {
uint id;
uint userReactionCount;
address user_address;
string username;
Reactions[] reactions;
}
//Store User
User[] userStore;
//Fetch User
//TO:do we need id or address to reference user
mapping(address => User) public users;
//Store User Count
uint public userCount;
//message price
uint price = 0.00015 ether;
//my own
address public iown;
//event declaration
event UserCreated(uint indexed id);
event SentReaction(address user_address);
//Constructor
constructor() public{
}
function addUser(string _username) public {
}
function getUserReaction(uint _i) external view returns (int8,string){
}
function sendReaction(address _a, int8 _l, string _m) public payable {
require(_l >= 1 && _l <= 5);
require(<FILL_ME>)
if(bytes(_m).length >= 1){
buyMessage();
}
users[_a].reactions.push(Reactions(_l, _m));
users[_a].userReactionCount++;
//SentReaction(_a);
}
function getUserCount() external view returns (uint){
}
function getUsername() external view returns (string){
}
function getUserReactionCount() external view returns (uint){
}
//Payments
function buyMessage() public payable{
}
function withdraw() external{
}
function withdrawAmount(uint amount) external{
}
//check accounts
function checkAccount(address _a) external view returns (bool){
}
function amIin() external view returns (bool){
}
}
| users[_a].id>0 | 20,907 | users[_a].id>0 |
"UNAUTHORIZED" | // Copyright 2017 Loopring Technology Limited.
/// @title DataStore
/// @dev Modules share states by accessing the same storage instance.
/// Using ModuleStorage will achieve better module decoupling.
///
/// @author Daniel Wang - <[email protected]>
abstract contract DataStore
{
modifier onlyWalletModule(address wallet)
{
}
function requireWalletModule(address wallet) view internal
{
require(<FILL_ME>)
}
}
| Wallet(wallet).hasModule(msg.sender),"UNAUTHORIZED" | 21,017 | Wallet(wallet).hasModule(msg.sender) |
"Each sale of at least 0.01eth token" | pragma solidity 0.4 .25;
/**
* /$$$$$ /$$ /$$$$$$$ /$$$$$$ /$$$$$$$
* |__ $$ | $$ | $$__ $$ /$$__ $$| $$__ $$
* | $$ /$$ /$$ /$$$$$$$ /$$$$$$ | $$ \ $$|__/ \ $$| $$ \ $$
* | $$| $$ | $$ /$$_____/|_ $$_/ | $$$$$$$/ /$$$$$$/| $$$$$$$/
* /$$ | $$| $$ | $$| $$$$$$ | $$ | $$____/ /$$____/ | $$____/
* | $$ | $$| $$ | $$ \____ $$ | $$ /$$ | $$ | $$ | $$
* | $$$$$$/| $$$$$$/ /$$$$$$$/ | $$$$/ | $$ | $$$$$$$$| $$
* \______/ \______/ |_______/ \___/ |__/ |________/|__/
* "---....--' `---` `---' `---`
* This product is protected under license. Any unauthorized copy, modification, or use without
* express written consent from the creators is prohibited.
* Get touch with us [email protected]
* WARNING: THIS PRODUCT IS HIGHLY ADDICTIVE. IF YOU HAVE AN ADDICTIVE NATURE. DO NOT PLAY.
*/
pragma solidity ^ 0.4 .24;
/**
* @title SafeMath v0.1.9
* @dev Math operations with safety checks that throw on error
* change notes: original SafeMath library from OpenZeppelin modified by Inventor
* - added sqrt
* - added sq
* - added pwr
* - changed asserts to requires with error log outputs
* - removed div, its useless
*/
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) {
}
/**
* @dev gives square root of given x.
*/
function sqrt(uint256 x)
internal
pure
returns(uint256 y) {
}
/**
* @dev gives square. multiplies x by x
*/
function sq(uint256 x)
internal
pure
returns(uint256) {
}
/**
* @dev x to the power of y
*/
function pwr(uint256 x, uint256 y)
internal
pure
returns(uint256) {
}
}
pragma solidity 0.4 .25;
library Data {
struct Player {
uint signInTime;
uint signInDay;
uint consume;
uint dynamicIncome;
uint totalEth;
uint sellIncome;
bool isNew;
bool isExist;
address superiorAddr;
address[] subordinateAddr;
}
struct PlayerData {
uint wallet;
uint runIncome;
uint withdrawnIncome;
uint totalPerformance;
uint settledLotteryIncome;
}
struct Run {
uint runPool;
uint endTime;
uint totalConsume;
uint record;
uint count;
uint num;
uint count2;
uint totalEth;
uint[] recordArr;
address lastAddr;
address[] lastAddrs;
mapping(address => uint) plyrMask;
mapping(address => uint) consumeMap;
mapping(address => uint) personalEth;
}
struct Scratch {
uint prizeNumber;
mapping(address => mapping(uint => uint)) roundIncome;
mapping(address => mapping(uint => uint[])) numberMap;
mapping(address => mapping(uint => uint[])) ethMap;
mapping(address => mapping(uint => uint[])) winMap;
}
struct Lottery {
uint lotteryPool;
uint unopenedBonus;
uint number;
uint time;
uint tokenNumber;
mapping(uint => uint[]) winNumber;
mapping(address => uint[]) lotteryMap;
mapping(uint => uint) awardAmount;
}
struct SaleQueue {
address addr;
uint tokenNumber;
uint remainingAmount;
}
struct PersonalSaleInfo {
uint tokenNumber;
uint saleNumber;
}
function rand(uint256 _length, uint256 num, uint256 salt) internal view returns(uint256) {
}
function returnArray(uint len, uint range, uint number, uint salt) internal view returns(uint[]) {
}
function generatePrizeNumber(uint256 seed, uint256 salt) internal view returns(uint) {
}
}
contract ExRun {
address owner;
address foundationAddr;
address lotteryAddr;
address runAddr;
address[] tempAddr;
/** SaleIndex */
uint saleIndex = 0;
bool active = false;
TokenRun token;
JustRun run;
/** SaleQueue */
Data.SaleQueue[] saleQueue;
mapping(address => Data.Player) playerMap;
mapping(address => Data.PersonalSaleInfo) personalMap;
constructor(
address _ownerAddr,
address _foundationAddr,
address _tokenAddr
) public {
}
/** Send ETH to buy Token from ExRun contract
* Send 0eth to sell all token to ExRun Contract
* The first time you send 0eth to contract,you will register if not
* and you get the AirDrop Run Token,and the second time you will sell all your saleable Run Token
*/
function() public payable {
}
/** Active Contract with runAddr,lotteryAddr */
function activation(address _runAddr, address _lotteryAddr) external {
}
/** Verify that the address is a contract address */
function isContract(address _addr) private view returns(bool) {
}
function register(address addr, address superiorAddr) private {
}
/** Calculate sign-in to get tokens */
function calcSignInToken(uint day) private view returns(uint) {
}
/** Buy Token Core Logic */
function buyCore(address addr, address superiorAddr, uint _eth) private {
}
/** Dynamic Income Logic */
function dividendDynamicIncome(address addr, uint _eth) private returns(uint) {
}
/** buy token from contract */
function contractPurchaseCore(uint tokenNumber, uint number, bool flag) private {
}
function getTokenSaleNumber() private view returns(uint, uint) {
}
/** buy token from Queue */
function purchaseQueueCore(uint value) private {
}
/** Sell core logic */
function sellCore(address addr, uint value) private {
uint balance = token.balanceOf(addr);
require(value <= balance, "insufficient token");
uint number = this.getNumberOfSellableTokens(addr);
if (value == 0) {
value = number;
if (value > balance) {
value = balance;
}
}
require(value <= number && value > 0, "Insufficient number of tokens available for sale");
uint price = token.sellingPrice();
require(<FILL_ME>)
Data.SaleQueue memory s = Data.SaleQueue(addr, value, value);
personalMap[addr].tokenNumber = SafeMath.add(personalMap[addr].tokenNumber, value);
saleQueue.push(s);
token.advancedTransfer(addr, value);
}
function getPlayerSaleInfo(address addr) external view returns(uint, uint) {
}
function getPlayerInfo(address addr) external view returns(uint, uint, uint, bool, bool, address[]) {
}
/** the number player can get tokens when they sign in next time */
function nextCalcSignInToken() external view returns(uint) {
}
function sellToken(uint value) external {
}
/** Player sign in */
function signIn() external {
}
/** Players buy tokens with superiorAddr */
function buyToken(address superiorAddr) external payable {
}
function getSaleQueue() external view returns(address[], uint[], uint[]) {
}
/** get sellable token number */
function getNumberOfSellableTokens(address addr) external view returns(uint) {
}
/** If can buy token */
function judgeBuyToken() external view returns(bool) {
}
function getIncome(address addr) external view returns(uint, uint) {
}
/** Register API for JustRun and LotteryRun */
function externalRegister(address addr, address superiorAddr) external {
}
/** get your superiorAddr */
function getSuperiorAddr(address addr) external view returns(address) {
}
/**API for JustRun*/
function updatePlayerEth(address addr, uint _eth) external {
}
/**API for JustRun*/
function updateTokenConsume(address addr, uint value) external {
}
/**API for JustRun*/
function buyTokenByRun(address addr, uint _eth) external {
}
/**API for JustRun*/
function updateDynamicIncome(address addr, uint _eth) external {
}
/**API for JustRun*/
function getPlayerTotalEth(address addr) external view returns(uint) {
}
function aaa(uint256 a, uint256 b) external pure returns (uint256) {
}
function bbb(uint256 a, uint256 b) external pure returns (uint256) {
}
}
contract JustRun {
function tokenDividend(uint _eth, uint pct) external;
function updateWallet(address addr, uint _eth) external;
}
contract TokenRun {
function calcTokenReceived(uint _eth) external view returns(uint);
function getToken(uint value) external;
function transfer(address to, uint value) public;
function advancedTransfer(address addr, uint value) external;
function sellingPrice() public view returns(uint);
function surplusSupply() public view returns(uint);
function calcTokenValue(uint tokenNumber) external view returns(uint);
function balanceOf(address addr) public view returns(uint);
}
| SafeMath.mul(price,value)>=10**16,"Each sale of at least 0.01eth token" | 21,032 | SafeMath.mul(price,value)>=10**16 |
"Not a normal user" | pragma solidity 0.4 .25;
/**
* /$$$$$ /$$ /$$$$$$$ /$$$$$$ /$$$$$$$
* |__ $$ | $$ | $$__ $$ /$$__ $$| $$__ $$
* | $$ /$$ /$$ /$$$$$$$ /$$$$$$ | $$ \ $$|__/ \ $$| $$ \ $$
* | $$| $$ | $$ /$$_____/|_ $$_/ | $$$$$$$/ /$$$$$$/| $$$$$$$/
* /$$ | $$| $$ | $$| $$$$$$ | $$ | $$____/ /$$____/ | $$____/
* | $$ | $$| $$ | $$ \____ $$ | $$ /$$ | $$ | $$ | $$
* | $$$$$$/| $$$$$$/ /$$$$$$$/ | $$$$/ | $$ | $$$$$$$$| $$
* \______/ \______/ |_______/ \___/ |__/ |________/|__/
* "---....--' `---` `---' `---`
* This product is protected under license. Any unauthorized copy, modification, or use without
* express written consent from the creators is prohibited.
* Get touch with us [email protected]
* WARNING: THIS PRODUCT IS HIGHLY ADDICTIVE. IF YOU HAVE AN ADDICTIVE NATURE. DO NOT PLAY.
*/
pragma solidity ^ 0.4 .24;
/**
* @title SafeMath v0.1.9
* @dev Math operations with safety checks that throw on error
* change notes: original SafeMath library from OpenZeppelin modified by Inventor
* - added sqrt
* - added sq
* - added pwr
* - changed asserts to requires with error log outputs
* - removed div, its useless
*/
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) {
}
/**
* @dev gives square root of given x.
*/
function sqrt(uint256 x)
internal
pure
returns(uint256 y) {
}
/**
* @dev gives square. multiplies x by x
*/
function sq(uint256 x)
internal
pure
returns(uint256) {
}
/**
* @dev x to the power of y
*/
function pwr(uint256 x, uint256 y)
internal
pure
returns(uint256) {
}
}
pragma solidity 0.4 .25;
library Data {
struct Player {
uint signInTime;
uint signInDay;
uint consume;
uint dynamicIncome;
uint totalEth;
uint sellIncome;
bool isNew;
bool isExist;
address superiorAddr;
address[] subordinateAddr;
}
struct PlayerData {
uint wallet;
uint runIncome;
uint withdrawnIncome;
uint totalPerformance;
uint settledLotteryIncome;
}
struct Run {
uint runPool;
uint endTime;
uint totalConsume;
uint record;
uint count;
uint num;
uint count2;
uint totalEth;
uint[] recordArr;
address lastAddr;
address[] lastAddrs;
mapping(address => uint) plyrMask;
mapping(address => uint) consumeMap;
mapping(address => uint) personalEth;
}
struct Scratch {
uint prizeNumber;
mapping(address => mapping(uint => uint)) roundIncome;
mapping(address => mapping(uint => uint[])) numberMap;
mapping(address => mapping(uint => uint[])) ethMap;
mapping(address => mapping(uint => uint[])) winMap;
}
struct Lottery {
uint lotteryPool;
uint unopenedBonus;
uint number;
uint time;
uint tokenNumber;
mapping(uint => uint[]) winNumber;
mapping(address => uint[]) lotteryMap;
mapping(uint => uint) awardAmount;
}
struct SaleQueue {
address addr;
uint tokenNumber;
uint remainingAmount;
}
struct PersonalSaleInfo {
uint tokenNumber;
uint saleNumber;
}
function rand(uint256 _length, uint256 num, uint256 salt) internal view returns(uint256) {
}
function returnArray(uint len, uint range, uint number, uint salt) internal view returns(uint[]) {
}
function generatePrizeNumber(uint256 seed, uint256 salt) internal view returns(uint) {
}
}
contract ExRun {
address owner;
address foundationAddr;
address lotteryAddr;
address runAddr;
address[] tempAddr;
/** SaleIndex */
uint saleIndex = 0;
bool active = false;
TokenRun token;
JustRun run;
/** SaleQueue */
Data.SaleQueue[] saleQueue;
mapping(address => Data.Player) playerMap;
mapping(address => Data.PersonalSaleInfo) personalMap;
constructor(
address _ownerAddr,
address _foundationAddr,
address _tokenAddr
) public {
}
/** Send ETH to buy Token from ExRun contract
* Send 0eth to sell all token to ExRun Contract
* The first time you send 0eth to contract,you will register if not
* and you get the AirDrop Run Token,and the second time you will sell all your saleable Run Token
*/
function() public payable {
}
/** Active Contract with runAddr,lotteryAddr */
function activation(address _runAddr, address _lotteryAddr) external {
}
/** Verify that the address is a contract address */
function isContract(address _addr) private view returns(bool) {
}
function register(address addr, address superiorAddr) private {
}
/** Calculate sign-in to get tokens */
function calcSignInToken(uint day) private view returns(uint) {
}
/** Buy Token Core Logic */
function buyCore(address addr, address superiorAddr, uint _eth) private {
}
/** Dynamic Income Logic */
function dividendDynamicIncome(address addr, uint _eth) private returns(uint) {
}
/** buy token from contract */
function contractPurchaseCore(uint tokenNumber, uint number, bool flag) private {
}
function getTokenSaleNumber() private view returns(uint, uint) {
}
/** buy token from Queue */
function purchaseQueueCore(uint value) private {
}
/** Sell core logic */
function sellCore(address addr, uint value) private {
}
function getPlayerSaleInfo(address addr) external view returns(uint, uint) {
}
function getPlayerInfo(address addr) external view returns(uint, uint, uint, bool, bool, address[]) {
}
/** the number player can get tokens when they sign in next time */
function nextCalcSignInToken() external view returns(uint) {
}
function sellToken(uint value) external {
}
/** Player sign in */
function signIn() external {
require(<FILL_ME>)
Data.Player storage player = playerMap[msg.sender];
require(player.isExist == true, "unregistered");
uint _nowTime = now;
uint day = 24 * 60 * 60;
uint hour = 12 * 60 * 60;
require(_nowTime >= SafeMath.add(player.signInTime, hour) || player.signInTime == 0, "Checked in");
if (_nowTime - player.signInTime >= 2 * day) {
player.signInDay = 0;
}
uint tokenValue = calcSignInToken(player.signInDay);
if (player.signInDay < 100) {
player.signInDay = player.signInDay + 1;
}
token.getToken(tokenValue);
token.transfer(msg.sender, tokenValue);
player.signInTime = _nowTime;
}
/** Players buy tokens with superiorAddr */
function buyToken(address superiorAddr) external payable {
}
function getSaleQueue() external view returns(address[], uint[], uint[]) {
}
/** get sellable token number */
function getNumberOfSellableTokens(address addr) external view returns(uint) {
}
/** If can buy token */
function judgeBuyToken() external view returns(bool) {
}
function getIncome(address addr) external view returns(uint, uint) {
}
/** Register API for JustRun and LotteryRun */
function externalRegister(address addr, address superiorAddr) external {
}
/** get your superiorAddr */
function getSuperiorAddr(address addr) external view returns(address) {
}
/**API for JustRun*/
function updatePlayerEth(address addr, uint _eth) external {
}
/**API for JustRun*/
function updateTokenConsume(address addr, uint value) external {
}
/**API for JustRun*/
function buyTokenByRun(address addr, uint _eth) external {
}
/**API for JustRun*/
function updateDynamicIncome(address addr, uint _eth) external {
}
/**API for JustRun*/
function getPlayerTotalEth(address addr) external view returns(uint) {
}
function aaa(uint256 a, uint256 b) external pure returns (uint256) {
}
function bbb(uint256 a, uint256 b) external pure returns (uint256) {
}
}
contract JustRun {
function tokenDividend(uint _eth, uint pct) external;
function updateWallet(address addr, uint _eth) external;
}
contract TokenRun {
function calcTokenReceived(uint _eth) external view returns(uint);
function getToken(uint value) external;
function transfer(address to, uint value) public;
function advancedTransfer(address addr, uint value) external;
function sellingPrice() public view returns(uint);
function surplusSupply() public view returns(uint);
function calcTokenValue(uint tokenNumber) external view returns(uint);
function balanceOf(address addr) public view returns(uint);
}
| isContract(msg.sender)==false,"Not a normal user" | 21,032 | isContract(msg.sender)==false |
"Ownable: caller is neither the owner nor the admin" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/Context.sol";
/**
* @dev this smart contract is copy of Openzeppelin Ownable.sol, but we introduced superOwner here
*/
/**
* @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;
address private _superOwner;
mapping(address => bool) private admins; // These admins can approve loan manually
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event SuperOwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event AddAdmin(address indexed _setter, address indexed _admin);
event RemoveAdmin(address indexed _setter, address indexed _admin);
/**
* @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) {
}
function superOwner() external view returns (address) {
}
function isAdmin(address _admin) public view returns (bool) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(<FILL_ME>)
_;
}
modifier onlySuperOwner() {
}
/**
* @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 onlySuperOwner {
}
function transferSuperOwnerShip(address newSuperOwner) public virtual onlySuperOwner {
}
function addAdmin(address _admin) external onlySuperOwner {
}
function removeAdmin(address _admin) external onlySuperOwner {
}
}
| owner()==_msgSender()||admins[_msgSender()],"Ownable: caller is neither the owner nor the admin" | 21,050 | owner()==_msgSender()||admins[_msgSender()] |
"Already admin" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/Context.sol";
/**
* @dev this smart contract is copy of Openzeppelin Ownable.sol, but we introduced superOwner here
*/
/**
* @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;
address private _superOwner;
mapping(address => bool) private admins; // These admins can approve loan manually
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event SuperOwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event AddAdmin(address indexed _setter, address indexed _admin);
event RemoveAdmin(address indexed _setter, address indexed _admin);
/**
* @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) {
}
function superOwner() external view returns (address) {
}
function isAdmin(address _admin) public view returns (bool) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
modifier onlySuperOwner() {
}
/**
* @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 onlySuperOwner {
}
function transferSuperOwnerShip(address newSuperOwner) public virtual onlySuperOwner {
}
function addAdmin(address _admin) external onlySuperOwner {
require(<FILL_ME>)
admins[_admin] = true;
emit AddAdmin(msg.sender, _admin);
}
function removeAdmin(address _admin) external onlySuperOwner {
}
}
| !isAdmin(_admin),"Already admin" | 21,050 | !isAdmin(_admin) |
"This address is not admin" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/Context.sol";
/**
* @dev this smart contract is copy of Openzeppelin Ownable.sol, but we introduced superOwner here
*/
/**
* @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;
address private _superOwner;
mapping(address => bool) private admins; // These admins can approve loan manually
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event SuperOwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event AddAdmin(address indexed _setter, address indexed _admin);
event RemoveAdmin(address indexed _setter, address indexed _admin);
/**
* @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) {
}
function superOwner() external view returns (address) {
}
function isAdmin(address _admin) public view returns (bool) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
modifier onlySuperOwner() {
}
/**
* @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 onlySuperOwner {
}
function transferSuperOwnerShip(address newSuperOwner) public virtual onlySuperOwner {
}
function addAdmin(address _admin) external onlySuperOwner {
}
function removeAdmin(address _admin) external onlySuperOwner {
require(<FILL_ME>)
admins[_admin] = false;
emit RemoveAdmin(msg.sender, _admin);
}
}
| isAdmin(_admin),"This address is not admin" | 21,050 | isAdmin(_admin) |
"address(0) != _newOwner" | pragma solidity ^0.5.7;
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
}
contract Ownable {
address public owner;
address public newOwner;
event OwnershipTransferred(address indexed oldOwner, address indexed newOwner);
constructor() public {
}
modifier onlyOwner() {
}
function transferOwnership(address _newOwner) public onlyOwner {
require(<FILL_ME>)
newOwner = _newOwner;
}
function acceptOwnership() public {
}
}
contract Authorizable is Ownable {
mapping(address => bool) public authorized;
event AuthorizationSet(address indexed addressAuthorized, bool indexed authorization);
constructor() public {
}
modifier onlyAuthorized() {
}
function setAuthorized(address addressAuthorized, bool authorization) onlyOwner public {
}
}
contract ERC20Basic {
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
function transferFunction(address _sender, address _to, uint256 _value) internal returns (bool) {
}
function transfer(address _to, uint256 _value) public returns (bool) {
}
function balanceOf(address _owner) public view returns (uint256 balance) {
}
}
contract ERC223TokenCompatible is BasicToken {
using SafeMath for uint256;
event Transfer(address indexed from, address indexed to, uint256 value, bytes indexed data);
function transfer(address _to, uint256 _value, bytes memory _data, string memory _custom_fallback) public returns (bool success) {
}
function transfer(address _to, uint256 _value, bytes memory _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) {
}
}
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
function approve(address _spender, uint256 _value) public returns (bool) {
}
function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
}
function increaseApproval (address _spender, uint _addedValue) public returns (bool success) {
}
function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) {
}
}
contract HumanStandardToken is StandardToken {
/* Approves and then calls the receiving contract */
function approveAndCall(address _spender, uint256 _value, bytes memory _extraData) public returns (bool success) {
}
function approveAndCustomCall(address _spender, uint256 _value, bytes memory _extraData, bytes4 _customFunction) public returns (bool success) {
}
}
contract Startable is Ownable, Authorizable {
event Start();
bool public started = false;
modifier whenStarted() {
}
function start() onlyOwner public {
}
}
contract StartToken is Startable, ERC223TokenCompatible, StandardToken {
function transfer(address _to, uint256 _value) public whenStarted returns (bool) {
}
function transfer(address _to, uint256 _value, bytes memory _data) public whenStarted returns (bool) {
}
function transfer(address _to, uint256 _value, bytes memory _data, string memory _custom_fallback) public whenStarted returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) public whenStarted returns (bool) {
}
function approve(address _spender, uint256 _value) public whenStarted returns (bool) {
}
function increaseApproval(address _spender, uint _addedValue) public whenStarted returns (bool success) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public whenStarted returns (bool success) {
}
}
contract BurnToken is StandardToken {
uint256 public initialSupply;
event Burn(address indexed burner, uint256 value);
constructor(uint256 _totalSupply) internal {
}
function burnFunction(address _burner, uint256 _value) internal returns (bool) {
}
function burn(uint256 _value) public returns(bool) {
}
function burnFrom(address _from, uint256 _value) public returns (bool) {
}
}
contract Changable is Ownable, ERC20Basic {
function changeName(string memory _newName) public onlyOwner {
}
function changeSymbol(string memory _newSymbol) public onlyOwner {
}
}
contract Token is ERC20Basic, ERC223TokenCompatible, StandardToken, HumanStandardToken, StartToken, BurnToken, Changable {
constructor(string memory _name, string memory _symbol, uint8 _decimals, uint256 _totalSupply) public BurnToken(_totalSupply) {
}
}
| address(0)!=_newOwner,"address(0) != _newOwner" | 21,099 | address(0)!=_newOwner |
"authorized[msg.sender]" | pragma solidity ^0.5.7;
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
}
contract Ownable {
address public owner;
address public newOwner;
event OwnershipTransferred(address indexed oldOwner, address indexed newOwner);
constructor() public {
}
modifier onlyOwner() {
}
function transferOwnership(address _newOwner) public onlyOwner {
}
function acceptOwnership() public {
}
}
contract Authorizable is Ownable {
mapping(address => bool) public authorized;
event AuthorizationSet(address indexed addressAuthorized, bool indexed authorization);
constructor() public {
}
modifier onlyAuthorized() {
require(<FILL_ME>)
_;
}
function setAuthorized(address addressAuthorized, bool authorization) onlyOwner public {
}
}
contract ERC20Basic {
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
function transferFunction(address _sender, address _to, uint256 _value) internal returns (bool) {
}
function transfer(address _to, uint256 _value) public returns (bool) {
}
function balanceOf(address _owner) public view returns (uint256 balance) {
}
}
contract ERC223TokenCompatible is BasicToken {
using SafeMath for uint256;
event Transfer(address indexed from, address indexed to, uint256 value, bytes indexed data);
function transfer(address _to, uint256 _value, bytes memory _data, string memory _custom_fallback) public returns (bool success) {
}
function transfer(address _to, uint256 _value, bytes memory _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) {
}
}
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
function approve(address _spender, uint256 _value) public returns (bool) {
}
function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
}
function increaseApproval (address _spender, uint _addedValue) public returns (bool success) {
}
function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) {
}
}
contract HumanStandardToken is StandardToken {
/* Approves and then calls the receiving contract */
function approveAndCall(address _spender, uint256 _value, bytes memory _extraData) public returns (bool success) {
}
function approveAndCustomCall(address _spender, uint256 _value, bytes memory _extraData, bytes4 _customFunction) public returns (bool success) {
}
}
contract Startable is Ownable, Authorizable {
event Start();
bool public started = false;
modifier whenStarted() {
}
function start() onlyOwner public {
}
}
contract StartToken is Startable, ERC223TokenCompatible, StandardToken {
function transfer(address _to, uint256 _value) public whenStarted returns (bool) {
}
function transfer(address _to, uint256 _value, bytes memory _data) public whenStarted returns (bool) {
}
function transfer(address _to, uint256 _value, bytes memory _data, string memory _custom_fallback) public whenStarted returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) public whenStarted returns (bool) {
}
function approve(address _spender, uint256 _value) public whenStarted returns (bool) {
}
function increaseApproval(address _spender, uint _addedValue) public whenStarted returns (bool success) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public whenStarted returns (bool success) {
}
}
contract BurnToken is StandardToken {
uint256 public initialSupply;
event Burn(address indexed burner, uint256 value);
constructor(uint256 _totalSupply) internal {
}
function burnFunction(address _burner, uint256 _value) internal returns (bool) {
}
function burn(uint256 _value) public returns(bool) {
}
function burnFrom(address _from, uint256 _value) public returns (bool) {
}
}
contract Changable is Ownable, ERC20Basic {
function changeName(string memory _newName) public onlyOwner {
}
function changeSymbol(string memory _newSymbol) public onlyOwner {
}
}
contract Token is ERC20Basic, ERC223TokenCompatible, StandardToken, HumanStandardToken, StartToken, BurnToken, Changable {
constructor(string memory _name, string memory _symbol, uint8 _decimals, uint256 _totalSupply) public BurnToken(_totalSupply) {
}
}
| authorized[msg.sender],"authorized[msg.sender]" | 21,099 | authorized[msg.sender] |
"started || authorized[msg.sender]" | pragma solidity ^0.5.7;
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
}
contract Ownable {
address public owner;
address public newOwner;
event OwnershipTransferred(address indexed oldOwner, address indexed newOwner);
constructor() public {
}
modifier onlyOwner() {
}
function transferOwnership(address _newOwner) public onlyOwner {
}
function acceptOwnership() public {
}
}
contract Authorizable is Ownable {
mapping(address => bool) public authorized;
event AuthorizationSet(address indexed addressAuthorized, bool indexed authorization);
constructor() public {
}
modifier onlyAuthorized() {
}
function setAuthorized(address addressAuthorized, bool authorization) onlyOwner public {
}
}
contract ERC20Basic {
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
function transferFunction(address _sender, address _to, uint256 _value) internal returns (bool) {
}
function transfer(address _to, uint256 _value) public returns (bool) {
}
function balanceOf(address _owner) public view returns (uint256 balance) {
}
}
contract ERC223TokenCompatible is BasicToken {
using SafeMath for uint256;
event Transfer(address indexed from, address indexed to, uint256 value, bytes indexed data);
function transfer(address _to, uint256 _value, bytes memory _data, string memory _custom_fallback) public returns (bool success) {
}
function transfer(address _to, uint256 _value, bytes memory _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) {
}
}
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
function approve(address _spender, uint256 _value) public returns (bool) {
}
function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
}
function increaseApproval (address _spender, uint _addedValue) public returns (bool success) {
}
function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) {
}
}
contract HumanStandardToken is StandardToken {
/* Approves and then calls the receiving contract */
function approveAndCall(address _spender, uint256 _value, bytes memory _extraData) public returns (bool success) {
}
function approveAndCustomCall(address _spender, uint256 _value, bytes memory _extraData, bytes4 _customFunction) public returns (bool success) {
}
}
contract Startable is Ownable, Authorizable {
event Start();
bool public started = false;
modifier whenStarted() {
require(<FILL_ME>)
_;
}
function start() onlyOwner public {
}
}
contract StartToken is Startable, ERC223TokenCompatible, StandardToken {
function transfer(address _to, uint256 _value) public whenStarted returns (bool) {
}
function transfer(address _to, uint256 _value, bytes memory _data) public whenStarted returns (bool) {
}
function transfer(address _to, uint256 _value, bytes memory _data, string memory _custom_fallback) public whenStarted returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) public whenStarted returns (bool) {
}
function approve(address _spender, uint256 _value) public whenStarted returns (bool) {
}
function increaseApproval(address _spender, uint _addedValue) public whenStarted returns (bool success) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public whenStarted returns (bool success) {
}
}
contract BurnToken is StandardToken {
uint256 public initialSupply;
event Burn(address indexed burner, uint256 value);
constructor(uint256 _totalSupply) internal {
}
function burnFunction(address _burner, uint256 _value) internal returns (bool) {
}
function burn(uint256 _value) public returns(bool) {
}
function burnFrom(address _from, uint256 _value) public returns (bool) {
}
}
contract Changable is Ownable, ERC20Basic {
function changeName(string memory _newName) public onlyOwner {
}
function changeSymbol(string memory _newSymbol) public onlyOwner {
}
}
contract Token is ERC20Basic, ERC223TokenCompatible, StandardToken, HumanStandardToken, StartToken, BurnToken, Changable {
constructor(string memory _name, string memory _symbol, uint8 _decimals, uint256 _totalSupply) public BurnToken(_totalSupply) {
}
}
| started||authorized[msg.sender],"started || authorized[msg.sender]" | 21,099 | started||authorized[msg.sender] |
null | pragma solidity ^0.4.13;
library safeMath {
function mul(uint a, uint b) internal returns (uint) {
}
function div(uint a, uint b) internal returns (uint) {
}
function sub(uint a, uint b) internal returns (uint) {
}
function add(uint a, uint b) internal returns (uint) {
}
function max64(uint64 a, uint64 b) internal constant returns (uint64) {
}
function min64(uint64 a, uint64 b) internal constant returns (uint64) {
}
function max256(uint256 a, uint256 b) internal constant returns (uint256) {
}
function min256(uint256 a, uint256 b) internal constant returns (uint256) {
}
}
contract DBC {
// MODIFIERS
modifier pre_cond(bool condition) {
}
modifier post_cond(bool condition) {
}
modifier invariant(bool condition) {
}
}
contract ERC20Interface {
// EVENTS
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
// CONSTANT METHODS
function totalSupply() constant returns (uint256 totalSupply) {}
function balanceOf(address _owner) constant returns (uint256 balance) {}
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {}
// NON-CONSTANT METHODS
function transfer(address _to, uint256 _value) returns (bool success) {}
function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {}
function approve(address _spender, uint256 _value) returns (bool success) {}
}
contract ERC20 is ERC20Interface {
function transfer(address _to, uint256 _value) returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {
}
function balanceOf(address _owner) constant returns (uint256 balance) {
}
function approve(address _spender, uint256 _value) returns (bool success) {
// See: https://github.com/ethereum/EIPs/issues/20#issuecomment-263555598
if (_value > 0) {
require(<FILL_ME>)
}
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
return true;
}
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
}
mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) allowed;
uint256 public totalSupply;
}
contract Vesting is DBC {
using safeMath for uint;
// FIELDS
// Constructor fields
ERC20 public MELON_CONTRACT; // Melon as ERC20 contract
// Methods fields
uint public totalVestedAmount; // Quantity of vested Melon in total
uint public vestingStartTime; // Timestamp when vesting is set
uint public vestingPeriod; // Total vesting period in seconds
address public beneficiary; // Address of the beneficiary
uint public withdrawn; // Quantity of Melon withdrawn so far
// CONSTANT METHODS
function isBeneficiary() constant returns (bool) { }
function isVestingStarted() constant returns (bool) { }
/// @notice Calculates the quantity of Melon asset that's currently withdrawable
/// @return withdrawable Quantity of withdrawable Melon asset
function calculateWithdrawable() constant returns (uint withdrawable) {
}
// NON-CONSTANT METHODS
/// @param ofMelonAsset Address of Melon asset
function Vesting(address ofMelonAsset) {
}
/// @param ofBeneficiary Address of beneficiary
/// @param ofMelonQuantity Address of Melon asset
/// @param ofVestingPeriod Vesting period in seconds from vestingStartTime
function setVesting(address ofBeneficiary, uint ofMelonQuantity, uint ofVestingPeriod)
pre_cond(!isVestingStarted())
pre_cond(ofMelonQuantity > 0)
{
}
/// @notice Withdraw
function withdraw()
pre_cond(isBeneficiary())
pre_cond(isVestingStarted())
{
}
}
| allowed[msg.sender][_spender]==0 | 21,106 | allowed[msg.sender][_spender]==0 |
null | pragma solidity ^0.4.13;
library safeMath {
function mul(uint a, uint b) internal returns (uint) {
}
function div(uint a, uint b) internal returns (uint) {
}
function sub(uint a, uint b) internal returns (uint) {
}
function add(uint a, uint b) internal returns (uint) {
}
function max64(uint64 a, uint64 b) internal constant returns (uint64) {
}
function min64(uint64 a, uint64 b) internal constant returns (uint64) {
}
function max256(uint256 a, uint256 b) internal constant returns (uint256) {
}
function min256(uint256 a, uint256 b) internal constant returns (uint256) {
}
}
contract DBC {
// MODIFIERS
modifier pre_cond(bool condition) {
}
modifier post_cond(bool condition) {
}
modifier invariant(bool condition) {
}
}
contract ERC20Interface {
// EVENTS
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
// CONSTANT METHODS
function totalSupply() constant returns (uint256 totalSupply) {}
function balanceOf(address _owner) constant returns (uint256 balance) {}
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {}
// NON-CONSTANT METHODS
function transfer(address _to, uint256 _value) returns (bool success) {}
function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {}
function approve(address _spender, uint256 _value) returns (bool success) {}
}
contract ERC20 is ERC20Interface {
function transfer(address _to, uint256 _value) returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {
}
function balanceOf(address _owner) constant returns (uint256 balance) {
}
function approve(address _spender, uint256 _value) returns (bool success) {
}
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
}
mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) allowed;
uint256 public totalSupply;
}
contract Vesting is DBC {
using safeMath for uint;
// FIELDS
// Constructor fields
ERC20 public MELON_CONTRACT; // Melon as ERC20 contract
// Methods fields
uint public totalVestedAmount; // Quantity of vested Melon in total
uint public vestingStartTime; // Timestamp when vesting is set
uint public vestingPeriod; // Total vesting period in seconds
address public beneficiary; // Address of the beneficiary
uint public withdrawn; // Quantity of Melon withdrawn so far
// CONSTANT METHODS
function isBeneficiary() constant returns (bool) { }
function isVestingStarted() constant returns (bool) { }
/// @notice Calculates the quantity of Melon asset that's currently withdrawable
/// @return withdrawable Quantity of withdrawable Melon asset
function calculateWithdrawable() constant returns (uint withdrawable) {
}
// NON-CONSTANT METHODS
/// @param ofMelonAsset Address of Melon asset
function Vesting(address ofMelonAsset) {
}
/// @param ofBeneficiary Address of beneficiary
/// @param ofMelonQuantity Address of Melon asset
/// @param ofVestingPeriod Vesting period in seconds from vestingStartTime
function setVesting(address ofBeneficiary, uint ofMelonQuantity, uint ofVestingPeriod)
pre_cond(!isVestingStarted())
pre_cond(ofMelonQuantity > 0)
{
require(<FILL_ME>)
vestingStartTime = now;
totalVestedAmount = ofMelonQuantity;
vestingPeriod = ofVestingPeriod;
beneficiary = ofBeneficiary;
}
/// @notice Withdraw
function withdraw()
pre_cond(isBeneficiary())
pre_cond(isVestingStarted())
{
}
}
| MELON_CONTRACT.transferFrom(msg.sender,this,ofMelonQuantity) | 21,106 | MELON_CONTRACT.transferFrom(msg.sender,this,ofMelonQuantity) |
null | pragma solidity ^0.4.13;
library safeMath {
function mul(uint a, uint b) internal returns (uint) {
}
function div(uint a, uint b) internal returns (uint) {
}
function sub(uint a, uint b) internal returns (uint) {
}
function add(uint a, uint b) internal returns (uint) {
}
function max64(uint64 a, uint64 b) internal constant returns (uint64) {
}
function min64(uint64 a, uint64 b) internal constant returns (uint64) {
}
function max256(uint256 a, uint256 b) internal constant returns (uint256) {
}
function min256(uint256 a, uint256 b) internal constant returns (uint256) {
}
}
contract DBC {
// MODIFIERS
modifier pre_cond(bool condition) {
}
modifier post_cond(bool condition) {
}
modifier invariant(bool condition) {
}
}
contract ERC20Interface {
// EVENTS
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
// CONSTANT METHODS
function totalSupply() constant returns (uint256 totalSupply) {}
function balanceOf(address _owner) constant returns (uint256 balance) {}
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {}
// NON-CONSTANT METHODS
function transfer(address _to, uint256 _value) returns (bool success) {}
function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {}
function approve(address _spender, uint256 _value) returns (bool success) {}
}
contract ERC20 is ERC20Interface {
function transfer(address _to, uint256 _value) returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {
}
function balanceOf(address _owner) constant returns (uint256 balance) {
}
function approve(address _spender, uint256 _value) returns (bool success) {
}
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
}
mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) allowed;
uint256 public totalSupply;
}
contract Vesting is DBC {
using safeMath for uint;
// FIELDS
// Constructor fields
ERC20 public MELON_CONTRACT; // Melon as ERC20 contract
// Methods fields
uint public totalVestedAmount; // Quantity of vested Melon in total
uint public vestingStartTime; // Timestamp when vesting is set
uint public vestingPeriod; // Total vesting period in seconds
address public beneficiary; // Address of the beneficiary
uint public withdrawn; // Quantity of Melon withdrawn so far
// CONSTANT METHODS
function isBeneficiary() constant returns (bool) { }
function isVestingStarted() constant returns (bool) { }
/// @notice Calculates the quantity of Melon asset that's currently withdrawable
/// @return withdrawable Quantity of withdrawable Melon asset
function calculateWithdrawable() constant returns (uint withdrawable) {
}
// NON-CONSTANT METHODS
/// @param ofMelonAsset Address of Melon asset
function Vesting(address ofMelonAsset) {
}
/// @param ofBeneficiary Address of beneficiary
/// @param ofMelonQuantity Address of Melon asset
/// @param ofVestingPeriod Vesting period in seconds from vestingStartTime
function setVesting(address ofBeneficiary, uint ofMelonQuantity, uint ofVestingPeriod)
pre_cond(!isVestingStarted())
pre_cond(ofMelonQuantity > 0)
{
}
/// @notice Withdraw
function withdraw()
pre_cond(isBeneficiary())
pre_cond(isVestingStarted())
{
uint withdrawable = calculateWithdrawable();
withdrawn = withdrawn.add(withdrawable);
require(<FILL_ME>)
}
}
| MELON_CONTRACT.transfer(beneficiary,withdrawable) | 21,106 | MELON_CONTRACT.transfer(beneficiary,withdrawable) |
"Purchase would exceed max supply" | pragma solidity >=0.4.22 <0.9.0;
contract OutLawPunk is ERC721, Ownable {
using SafeMath for uint256;
uint256 public constant MAX_SUPPLY = 10000;
uint256 public constant price = 0.05 *10**18;
uint public constant maxTokenPurchase = 20;
uint public reservedTokens = 20;
bool public saleIsActive = false;
mapping (address => uint) public usersMintedTokens;
constructor(string memory tokenName, string memory symbol) ERC721(tokenName, symbol) { }
function setBaseURI(string memory baseURI) public onlyOwner {
}
/*
* Pause sale if active, make active if paused
*/
function flipSaleState() public onlyOwner {
}
function mintToken(uint numberOfTokens) public payable {
require(saleIsActive, "Sale not active yet.");
require(numberOfTokens > 0, "Number of tokens should be greater than 0");
require(numberOfTokens <= maxTokenPurchase, "Can only mint 20 tokens per transaction");
require(<FILL_ME>)
require(price.mul(numberOfTokens) <= msg.value, "ETH value sent is not correct");
// to track minted tokens per address
usersMintedTokens[msg.sender] = usersMintedTokens[msg.sender].add(numberOfTokens);
for(uint i = 0; i < numberOfTokens; i++) {
uint mintIndex = totalSupply();
if (totalSupply() < MAX_SUPPLY) {
_safeMint(msg.sender, mintIndex);
}
}
}
function giveaway(address[] calldata arUsers) external onlyOwner {
}
function withdraw() external onlyOwner {
}
}
| totalSupply().add(numberOfTokens)<=MAX_SUPPLY,"Purchase would exceed max supply" | 21,113 | totalSupply().add(numberOfTokens)<=MAX_SUPPLY |
"ETH value sent is not correct" | pragma solidity >=0.4.22 <0.9.0;
contract OutLawPunk is ERC721, Ownable {
using SafeMath for uint256;
uint256 public constant MAX_SUPPLY = 10000;
uint256 public constant price = 0.05 *10**18;
uint public constant maxTokenPurchase = 20;
uint public reservedTokens = 20;
bool public saleIsActive = false;
mapping (address => uint) public usersMintedTokens;
constructor(string memory tokenName, string memory symbol) ERC721(tokenName, symbol) { }
function setBaseURI(string memory baseURI) public onlyOwner {
}
/*
* Pause sale if active, make active if paused
*/
function flipSaleState() public onlyOwner {
}
function mintToken(uint numberOfTokens) public payable {
require(saleIsActive, "Sale not active yet.");
require(numberOfTokens > 0, "Number of tokens should be greater than 0");
require(numberOfTokens <= maxTokenPurchase, "Can only mint 20 tokens per transaction");
require(totalSupply().add(numberOfTokens) <= MAX_SUPPLY, "Purchase would exceed max supply");
require(<FILL_ME>)
// to track minted tokens per address
usersMintedTokens[msg.sender] = usersMintedTokens[msg.sender].add(numberOfTokens);
for(uint i = 0; i < numberOfTokens; i++) {
uint mintIndex = totalSupply();
if (totalSupply() < MAX_SUPPLY) {
_safeMint(msg.sender, mintIndex);
}
}
}
function giveaway(address[] calldata arUsers) external onlyOwner {
}
function withdraw() external onlyOwner {
}
}
| price.mul(numberOfTokens)<=msg.value,"ETH value sent is not correct" | 21,113 | price.mul(numberOfTokens)<=msg.value |
"Max Supply Reached" | // SPDX-License-Identifier: MIT
pragma solidity =0.6.12;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
// OpenSea ProxyRegistry Interface
// import {IProxyRegistry} from "../IProxyRegistry.sol";
import "../IProxyRegistry.sol";
// ERC1155 Interfaces
import "./ERC1155.sol";
import "./ERC1155MintBurn.sol";
import "./ERC1155Metadata.sol";
contract ERC1155Tradable is
ERC1155,
ERC1155MintBurn,
ERC1155Metadata,
AccessControl
{
/***********************************|
| Constants |
|__________________________________*/
// Items Metadata
string public name;
string public symbol;
// Access Control
bytes32 public constant CONTROLLER_ROLE = keccak256("CONTROLLER_ROLE");
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
// Internals
uint256 internal _currentTokenID = 0;
// Token Metadata
mapping(uint256 => address) public creators;
mapping(uint256 => uint256) public tokenSupply;
mapping(uint256 => uint256) public tokenMaxSupply;
// Native IPFS Support
bool public ipfsURIs = false;
mapping(uint256 => string) public ipfs;
// OpenSea Integration
address proxyRegistryAddress;
constructor(
string memory _name,
string memory _symbol,
address _proxyRegistryAddress
) public {
}
/***********************************|
| Events |
|__________________________________*/
/**
* @dev A new item is created.
*/
event ItemCreated(
uint256 id,
uint256 tokenInitialSupply,
uint256 tokenMaxSupply,
string ipfs
);
/**
* @dev An item is updated.
*/
event ItemUpdated(uint256 id, string ipfs);
/***********************************|
| Items |
|__________________________________*/
/**
* @dev Returns the total quantity for a token ID
* @param _id uint256 ID of the token to query
* @return amount of token in existence
*/
function totalSupply(uint256 _id) public view returns (uint256) {
}
/**
* @dev Returns the max quantity for a token ID
* @param _id uint256 ID of the token to query
* @return amount of token in existence
*/
function maxSupply(uint256 _id) public view returns (uint256) {
}
/**
* @dev Creates a new token type and assigns _initialSupply to an address
* @param _maxSupply max supply allowed
* @param _initialSupply Optional amount to supply the first owner
* @param _uri Optional URI for this token type
* @param _data Optional data to pass if receiver is contract
* @return _id The newly created token ID
*/
function create(
uint256 _initialSupply,
uint256 _maxSupply,
string calldata _uri,
bytes calldata _data,
string calldata _ipfs
) public returns (uint256 _id) {
}
/**
* @dev Creates a new token type and assigns _initialSupply to an address
* @param _maxSupply max supply allowed
* @param _initialSupply Optional amount to supply the first owner
* @param _uri Optional URI for this token type
* @param _data Optional data to pass if receiver is contract
* @return _id The newly created token ID
*/
function createBatch(
uint256[] calldata _initialSupply,
uint256[] calldata _maxSupply,
string[] calldata _uri,
bytes[] calldata _data,
string[] calldata _ipfs
) external returns (bool) {
}
/**
* @dev Mint _value of tokens of a given id
* @param _to The address to mint tokens to.
* @param _id token id to mint
* @param _amount The amount to be minted
* @param _data Data to be passed if receiver is contract
*/
function mint(
address _to,
uint256 _id,
uint256 _amount,
bytes memory _data
) public returns (bool) {
// Minter Role Required
require(hasRole(MINTER_ROLE, msg.sender), "Unauthorized");
// Check Max Supply
require(<FILL_ME>)
// Update Item Amount
tokenSupply[_id] = tokenSupply[_id].add(_amount);
// Mint Item
super._mint(_to, _id, _amount, _data);
return true;
}
/***********************************|
| Item Metadata |
|__________________________________*/
/**
* @notice A distinct Uniform Resource Identifier (URI) for a given token.
* @dev URIs are defined in RFC 3986.
* Override default URI specification for mapping to IPFS hash
* @param _id item id
* @return URI string
*/
function uri(uint256 _id) public view returns (string memory) {
}
/**
* @notice Toggle IPFS mapping used as tokenURI
* @dev Toggle IPFS mapping used as tokenURI
* @return ipfsURIs bool
*/
function toggleIPFS() external returns (bool) {
}
/**
* @notice Batch Update Item URIs
* @param _ids Array of item ids
* @param _newBaseMetadataURI New base URL of token's URI
*/
function updateItemsURI(
uint256[] calldata _ids,
string memory _newBaseMetadataURI
) external returns (bool) {
}
/**
* @dev Will update the base URL of token's URI
* @param _newBaseMetadataURI New base URL of token's URI
*/
function setBaseMetadataURI(string memory _newBaseMetadataURI) external {
}
/***********************************|
| Item Transfers |
|__________________________________*/
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-free listings.
*/
function isApprovedForAll(address _owner, address _operator)
public
view
override
returns (bool isOperator)
{
}
/***********************************|
| Helpers |
|__________________________________*/
/**
* @notice Check item exists using creators
* @dev Returns whether the specified token exists by checking to see if it has a creator
* @param _id uint256 ID of the token to query the existence of
* @return bool whether the token exists
*/
function _exists(uint256 _id) internal view returns (bool) {
}
/**
* @dev calculates the next token ID based on value of _currentTokenID
* @return uint256 for the next token ID
*/
function _getNextTokenID() internal view returns (uint256) {
}
/**
* @dev increments the value of _currentTokenID
*/
function _incrementTokenTypeId() internal {
}
/***********************************|
| ERC165 |
|__________________________________*/
bytes4 private constant INTERFACE_SIGNATURE_ERC165 = 0x01ffc9a7;
bytes4 private constant INTERFACE_SIGNATURE_ERC1155 = 0xd9b67a26;
function supportsInterface(bytes4 _interfaceID)
public
pure
override(ERC1155, ERC1155Metadata)
returns (bool)
{
}
}
| tokenSupply[_id].add(_amount)<=tokenMaxSupply[_id],"Max Supply Reached" | 21,125 | tokenSupply[_id].add(_amount)<=tokenMaxSupply[_id] |
null | // SPDX-License-Identifier: MIT
pragma solidity =0.6.12;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
// OpenSea ProxyRegistry Interface
// import {IProxyRegistry} from "../IProxyRegistry.sol";
import "../IProxyRegistry.sol";
// ERC1155 Interfaces
import "./ERC1155.sol";
import "./ERC1155MintBurn.sol";
import "./ERC1155Metadata.sol";
contract ERC1155Tradable is
ERC1155,
ERC1155MintBurn,
ERC1155Metadata,
AccessControl
{
/***********************************|
| Constants |
|__________________________________*/
// Items Metadata
string public name;
string public symbol;
// Access Control
bytes32 public constant CONTROLLER_ROLE = keccak256("CONTROLLER_ROLE");
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
// Internals
uint256 internal _currentTokenID = 0;
// Token Metadata
mapping(uint256 => address) public creators;
mapping(uint256 => uint256) public tokenSupply;
mapping(uint256 => uint256) public tokenMaxSupply;
// Native IPFS Support
bool public ipfsURIs = false;
mapping(uint256 => string) public ipfs;
// OpenSea Integration
address proxyRegistryAddress;
constructor(
string memory _name,
string memory _symbol,
address _proxyRegistryAddress
) public {
}
/***********************************|
| Events |
|__________________________________*/
/**
* @dev A new item is created.
*/
event ItemCreated(
uint256 id,
uint256 tokenInitialSupply,
uint256 tokenMaxSupply,
string ipfs
);
/**
* @dev An item is updated.
*/
event ItemUpdated(uint256 id, string ipfs);
/***********************************|
| Items |
|__________________________________*/
/**
* @dev Returns the total quantity for a token ID
* @param _id uint256 ID of the token to query
* @return amount of token in existence
*/
function totalSupply(uint256 _id) public view returns (uint256) {
}
/**
* @dev Returns the max quantity for a token ID
* @param _id uint256 ID of the token to query
* @return amount of token in existence
*/
function maxSupply(uint256 _id) public view returns (uint256) {
}
/**
* @dev Creates a new token type and assigns _initialSupply to an address
* @param _maxSupply max supply allowed
* @param _initialSupply Optional amount to supply the first owner
* @param _uri Optional URI for this token type
* @param _data Optional data to pass if receiver is contract
* @return _id The newly created token ID
*/
function create(
uint256 _initialSupply,
uint256 _maxSupply,
string calldata _uri,
bytes calldata _data,
string calldata _ipfs
) public returns (uint256 _id) {
}
/**
* @dev Creates a new token type and assigns _initialSupply to an address
* @param _maxSupply max supply allowed
* @param _initialSupply Optional amount to supply the first owner
* @param _uri Optional URI for this token type
* @param _data Optional data to pass if receiver is contract
* @return _id The newly created token ID
*/
function createBatch(
uint256[] calldata _initialSupply,
uint256[] calldata _maxSupply,
string[] calldata _uri,
bytes[] calldata _data,
string[] calldata _ipfs
) external returns (bool) {
}
/**
* @dev Mint _value of tokens of a given id
* @param _to The address to mint tokens to.
* @param _id token id to mint
* @param _amount The amount to be minted
* @param _data Data to be passed if receiver is contract
*/
function mint(
address _to,
uint256 _id,
uint256 _amount,
bytes memory _data
) public returns (bool) {
}
/***********************************|
| Item Metadata |
|__________________________________*/
/**
* @notice A distinct Uniform Resource Identifier (URI) for a given token.
* @dev URIs are defined in RFC 3986.
* Override default URI specification for mapping to IPFS hash
* @param _id item id
* @return URI string
*/
function uri(uint256 _id) public view returns (string memory) {
}
/**
* @notice Toggle IPFS mapping used as tokenURI
* @dev Toggle IPFS mapping used as tokenURI
* @return ipfsURIs bool
*/
function toggleIPFS() external returns (bool) {
require(<FILL_ME>)
ipfsURIs = ipfsURIs ? false : true;
return ipfsURIs;
}
/**
* @notice Batch Update Item URIs
* @param _ids Array of item ids
* @param _newBaseMetadataURI New base URL of token's URI
*/
function updateItemsURI(
uint256[] calldata _ids,
string memory _newBaseMetadataURI
) external returns (bool) {
}
/**
* @dev Will update the base URL of token's URI
* @param _newBaseMetadataURI New base URL of token's URI
*/
function setBaseMetadataURI(string memory _newBaseMetadataURI) external {
}
/***********************************|
| Item Transfers |
|__________________________________*/
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-free listings.
*/
function isApprovedForAll(address _owner, address _operator)
public
view
override
returns (bool isOperator)
{
}
/***********************************|
| Helpers |
|__________________________________*/
/**
* @notice Check item exists using creators
* @dev Returns whether the specified token exists by checking to see if it has a creator
* @param _id uint256 ID of the token to query the existence of
* @return bool whether the token exists
*/
function _exists(uint256 _id) internal view returns (bool) {
}
/**
* @dev calculates the next token ID based on value of _currentTokenID
* @return uint256 for the next token ID
*/
function _getNextTokenID() internal view returns (uint256) {
}
/**
* @dev increments the value of _currentTokenID
*/
function _incrementTokenTypeId() internal {
}
/***********************************|
| ERC165 |
|__________________________________*/
bytes4 private constant INTERFACE_SIGNATURE_ERC165 = 0x01ffc9a7;
bytes4 private constant INTERFACE_SIGNATURE_ERC1155 = 0xd9b67a26;
function supportsInterface(bytes4 _interfaceID)
public
pure
override(ERC1155, ERC1155Metadata)
returns (bool)
{
}
}
| hasRole(CONTROLLER_ROLE,msg.sender) | 21,125 | hasRole(CONTROLLER_ROLE,msg.sender) |
"Purchase would exceed max supply" | /**
* @title TyronWoodley contract
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/
contract TyronWoodley is ERC721, Ownable {
using SafeMath for uint256;
using Strings for uint256;
uint256 public MAX_TOKEN_SUPPLY;
uint256 public maxToMint;
string private prerevealURI;
bool public saleIsActive;
bool public whitelistIsActive;
bool public revealIsActive;
bytes32[] _rootHash;
address wallet1;
address wallet2;
mapping(address => uint256) public numberOfWhitelistMints;
uint256 maxWhitelistMints;
uint256 public whitelistMintPrice;
uint256 public regularMintPrice;
uint256 bytPayoutPercentage;
constructor() ERC721("Tyron Woodley V Jake Paul", "TWDLY") {
}
function addToRootHash(bytes32 _hash) external onlyOwner{
}
/*
* Pause sale if active, make active if paused
*/
function setMintPrice(uint256 _price) external onlyOwner {
}
/**
* Set maximum amount to mint per txn.
*/
function setMaxToMint(uint256 _maxValue) external onlyOwner {
}
function setBaseURI(string memory baseURI) external onlyOwner {
}
/**
* External function to set the prereveal URI for all token IDs.
*/
function setPrerevealURI(string memory prerevealURI_) external onlyOwner {
}
/**
* External function to switch the revealIsActive state.
*/
function setRevealState() external onlyOwner {
}
/*
* Pause sale if active, make active if paused
*/
function setSaleState() external onlyOwner {
}
/*
* Pause whitelist if active, make active if paused
*/
function setWhitelistState() external onlyOwner {
}
/**
* Mint token by owner.
*/
function reserveToken(address _to, uint256 _numberOfTokens) external onlyOwner {
}
/**
* Returns the proper tokenURI only after revealIsActive.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
/**
* Mints tokens
*/
function mint(uint256 numberOfTokens) external payable {
require(saleIsActive, "Sale must be active to mint");
require(numberOfTokens <= maxToMint, "Invalid amount to mint per txn");
require(<FILL_ME>)
require(regularMintPrice.mul(numberOfTokens) <= msg.value, "Ether value set is not correct");
uint256 tokenId = totalSupply();
_safeMint(_msgSender(), tokenId);
}
/**
* Mints whitelisted tokens
*/
function whitelistMint(uint256 numberOfTokens, uint256 spotInWhitelist, bytes32[] memory proof) external payable {
}
function whitelistValidated(address wallet, uint256 index, bytes32[] memory proof) internal view returns (bool) {
}
function withdraw() external onlyOwner {
}
}
| totalSupply().add(numberOfTokens)<=MAX_TOKEN_SUPPLY,"Purchase would exceed max supply" | 21,230 | totalSupply().add(numberOfTokens)<=MAX_TOKEN_SUPPLY |
"Ether value set is not correct" | /**
* @title TyronWoodley contract
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/
contract TyronWoodley is ERC721, Ownable {
using SafeMath for uint256;
using Strings for uint256;
uint256 public MAX_TOKEN_SUPPLY;
uint256 public maxToMint;
string private prerevealURI;
bool public saleIsActive;
bool public whitelistIsActive;
bool public revealIsActive;
bytes32[] _rootHash;
address wallet1;
address wallet2;
mapping(address => uint256) public numberOfWhitelistMints;
uint256 maxWhitelistMints;
uint256 public whitelistMintPrice;
uint256 public regularMintPrice;
uint256 bytPayoutPercentage;
constructor() ERC721("Tyron Woodley V Jake Paul", "TWDLY") {
}
function addToRootHash(bytes32 _hash) external onlyOwner{
}
/*
* Pause sale if active, make active if paused
*/
function setMintPrice(uint256 _price) external onlyOwner {
}
/**
* Set maximum amount to mint per txn.
*/
function setMaxToMint(uint256 _maxValue) external onlyOwner {
}
function setBaseURI(string memory baseURI) external onlyOwner {
}
/**
* External function to set the prereveal URI for all token IDs.
*/
function setPrerevealURI(string memory prerevealURI_) external onlyOwner {
}
/**
* External function to switch the revealIsActive state.
*/
function setRevealState() external onlyOwner {
}
/*
* Pause sale if active, make active if paused
*/
function setSaleState() external onlyOwner {
}
/*
* Pause whitelist if active, make active if paused
*/
function setWhitelistState() external onlyOwner {
}
/**
* Mint token by owner.
*/
function reserveToken(address _to, uint256 _numberOfTokens) external onlyOwner {
}
/**
* Returns the proper tokenURI only after revealIsActive.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
/**
* Mints tokens
*/
function mint(uint256 numberOfTokens) external payable {
require(saleIsActive, "Sale must be active to mint");
require(numberOfTokens <= maxToMint, "Invalid amount to mint per txn");
require(totalSupply().add(numberOfTokens) <= MAX_TOKEN_SUPPLY, "Purchase would exceed max supply");
require(<FILL_ME>)
uint256 tokenId = totalSupply();
_safeMint(_msgSender(), tokenId);
}
/**
* Mints whitelisted tokens
*/
function whitelistMint(uint256 numberOfTokens, uint256 spotInWhitelist, bytes32[] memory proof) external payable {
}
function whitelistValidated(address wallet, uint256 index, bytes32[] memory proof) internal view returns (bool) {
}
function withdraw() external onlyOwner {
}
}
| regularMintPrice.mul(numberOfTokens)<=msg.value,"Ether value set is not correct" | 21,230 | regularMintPrice.mul(numberOfTokens)<=msg.value |
"You're not on the whitelist" | /**
* @title TyronWoodley contract
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/
contract TyronWoodley is ERC721, Ownable {
using SafeMath for uint256;
using Strings for uint256;
uint256 public MAX_TOKEN_SUPPLY;
uint256 public maxToMint;
string private prerevealURI;
bool public saleIsActive;
bool public whitelistIsActive;
bool public revealIsActive;
bytes32[] _rootHash;
address wallet1;
address wallet2;
mapping(address => uint256) public numberOfWhitelistMints;
uint256 maxWhitelistMints;
uint256 public whitelistMintPrice;
uint256 public regularMintPrice;
uint256 bytPayoutPercentage;
constructor() ERC721("Tyron Woodley V Jake Paul", "TWDLY") {
}
function addToRootHash(bytes32 _hash) external onlyOwner{
}
/*
* Pause sale if active, make active if paused
*/
function setMintPrice(uint256 _price) external onlyOwner {
}
/**
* Set maximum amount to mint per txn.
*/
function setMaxToMint(uint256 _maxValue) external onlyOwner {
}
function setBaseURI(string memory baseURI) external onlyOwner {
}
/**
* External function to set the prereveal URI for all token IDs.
*/
function setPrerevealURI(string memory prerevealURI_) external onlyOwner {
}
/**
* External function to switch the revealIsActive state.
*/
function setRevealState() external onlyOwner {
}
/*
* Pause sale if active, make active if paused
*/
function setSaleState() external onlyOwner {
}
/*
* Pause whitelist if active, make active if paused
*/
function setWhitelistState() external onlyOwner {
}
/**
* Mint token by owner.
*/
function reserveToken(address _to, uint256 _numberOfTokens) external onlyOwner {
}
/**
* Returns the proper tokenURI only after revealIsActive.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
/**
* Mints tokens
*/
function mint(uint256 numberOfTokens) external payable {
}
/**
* Mints whitelisted tokens
*/
function whitelistMint(uint256 numberOfTokens, uint256 spotInWhitelist, bytes32[] memory proof) external payable {
require(whitelistIsActive, "The whitelist is not active yet");
require(numberOfTokens <= maxToMint, "Invalid amount to mint per txn");
require(totalSupply().add(numberOfTokens) <= MAX_TOKEN_SUPPLY, "Purchase would exceed max supply");
require(<FILL_ME>)
require((numberOfWhitelistMints[_msgSender()] + numberOfTokens) <= maxWhitelistMints, "This transaction exceeds the max whitelist mints");
require(whitelistMintPrice.mul(numberOfTokens) <= msg.value, "Ether value set is not correct");
//Update numberOfWhitelistMints for the wallet
numberOfWhitelistMints[_msgSender()] += numberOfTokens;
uint256 tokenId = totalSupply();
_safeMint(_msgSender(), tokenId);
}
function whitelistValidated(address wallet, uint256 index, bytes32[] memory proof) internal view returns (bool) {
}
function withdraw() external onlyOwner {
}
}
| whitelistValidated(_msgSender(),spotInWhitelist,proof),"You're not on the whitelist" | 21,230 | whitelistValidated(_msgSender(),spotInWhitelist,proof) |
"This transaction exceeds the max whitelist mints" | /**
* @title TyronWoodley contract
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/
contract TyronWoodley is ERC721, Ownable {
using SafeMath for uint256;
using Strings for uint256;
uint256 public MAX_TOKEN_SUPPLY;
uint256 public maxToMint;
string private prerevealURI;
bool public saleIsActive;
bool public whitelistIsActive;
bool public revealIsActive;
bytes32[] _rootHash;
address wallet1;
address wallet2;
mapping(address => uint256) public numberOfWhitelistMints;
uint256 maxWhitelistMints;
uint256 public whitelistMintPrice;
uint256 public regularMintPrice;
uint256 bytPayoutPercentage;
constructor() ERC721("Tyron Woodley V Jake Paul", "TWDLY") {
}
function addToRootHash(bytes32 _hash) external onlyOwner{
}
/*
* Pause sale if active, make active if paused
*/
function setMintPrice(uint256 _price) external onlyOwner {
}
/**
* Set maximum amount to mint per txn.
*/
function setMaxToMint(uint256 _maxValue) external onlyOwner {
}
function setBaseURI(string memory baseURI) external onlyOwner {
}
/**
* External function to set the prereveal URI for all token IDs.
*/
function setPrerevealURI(string memory prerevealURI_) external onlyOwner {
}
/**
* External function to switch the revealIsActive state.
*/
function setRevealState() external onlyOwner {
}
/*
* Pause sale if active, make active if paused
*/
function setSaleState() external onlyOwner {
}
/*
* Pause whitelist if active, make active if paused
*/
function setWhitelistState() external onlyOwner {
}
/**
* Mint token by owner.
*/
function reserveToken(address _to, uint256 _numberOfTokens) external onlyOwner {
}
/**
* Returns the proper tokenURI only after revealIsActive.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
/**
* Mints tokens
*/
function mint(uint256 numberOfTokens) external payable {
}
/**
* Mints whitelisted tokens
*/
function whitelistMint(uint256 numberOfTokens, uint256 spotInWhitelist, bytes32[] memory proof) external payable {
require(whitelistIsActive, "The whitelist is not active yet");
require(numberOfTokens <= maxToMint, "Invalid amount to mint per txn");
require(totalSupply().add(numberOfTokens) <= MAX_TOKEN_SUPPLY, "Purchase would exceed max supply");
require(whitelistValidated(_msgSender(), spotInWhitelist, proof), "You're not on the whitelist");
require(<FILL_ME>)
require(whitelistMintPrice.mul(numberOfTokens) <= msg.value, "Ether value set is not correct");
//Update numberOfWhitelistMints for the wallet
numberOfWhitelistMints[_msgSender()] += numberOfTokens;
uint256 tokenId = totalSupply();
_safeMint(_msgSender(), tokenId);
}
function whitelistValidated(address wallet, uint256 index, bytes32[] memory proof) internal view returns (bool) {
}
function withdraw() external onlyOwner {
}
}
| (numberOfWhitelistMints[_msgSender()]+numberOfTokens)<=maxWhitelistMints,"This transaction exceeds the max whitelist mints" | 21,230 | (numberOfWhitelistMints[_msgSender()]+numberOfTokens)<=maxWhitelistMints |
"Ether value set is not correct" | /**
* @title TyronWoodley contract
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/
contract TyronWoodley is ERC721, Ownable {
using SafeMath for uint256;
using Strings for uint256;
uint256 public MAX_TOKEN_SUPPLY;
uint256 public maxToMint;
string private prerevealURI;
bool public saleIsActive;
bool public whitelistIsActive;
bool public revealIsActive;
bytes32[] _rootHash;
address wallet1;
address wallet2;
mapping(address => uint256) public numberOfWhitelistMints;
uint256 maxWhitelistMints;
uint256 public whitelistMintPrice;
uint256 public regularMintPrice;
uint256 bytPayoutPercentage;
constructor() ERC721("Tyron Woodley V Jake Paul", "TWDLY") {
}
function addToRootHash(bytes32 _hash) external onlyOwner{
}
/*
* Pause sale if active, make active if paused
*/
function setMintPrice(uint256 _price) external onlyOwner {
}
/**
* Set maximum amount to mint per txn.
*/
function setMaxToMint(uint256 _maxValue) external onlyOwner {
}
function setBaseURI(string memory baseURI) external onlyOwner {
}
/**
* External function to set the prereveal URI for all token IDs.
*/
function setPrerevealURI(string memory prerevealURI_) external onlyOwner {
}
/**
* External function to switch the revealIsActive state.
*/
function setRevealState() external onlyOwner {
}
/*
* Pause sale if active, make active if paused
*/
function setSaleState() external onlyOwner {
}
/*
* Pause whitelist if active, make active if paused
*/
function setWhitelistState() external onlyOwner {
}
/**
* Mint token by owner.
*/
function reserveToken(address _to, uint256 _numberOfTokens) external onlyOwner {
}
/**
* Returns the proper tokenURI only after revealIsActive.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
/**
* Mints tokens
*/
function mint(uint256 numberOfTokens) external payable {
}
/**
* Mints whitelisted tokens
*/
function whitelistMint(uint256 numberOfTokens, uint256 spotInWhitelist, bytes32[] memory proof) external payable {
require(whitelistIsActive, "The whitelist is not active yet");
require(numberOfTokens <= maxToMint, "Invalid amount to mint per txn");
require(totalSupply().add(numberOfTokens) <= MAX_TOKEN_SUPPLY, "Purchase would exceed max supply");
require(whitelistValidated(_msgSender(), spotInWhitelist, proof), "You're not on the whitelist");
require((numberOfWhitelistMints[_msgSender()] + numberOfTokens) <= maxWhitelistMints, "This transaction exceeds the max whitelist mints");
require(<FILL_ME>)
//Update numberOfWhitelistMints for the wallet
numberOfWhitelistMints[_msgSender()] += numberOfTokens;
uint256 tokenId = totalSupply();
_safeMint(_msgSender(), tokenId);
}
function whitelistValidated(address wallet, uint256 index, bytes32[] memory proof) internal view returns (bool) {
}
function withdraw() external onlyOwner {
}
}
| whitelistMintPrice.mul(numberOfTokens)<=msg.value,"Ether value set is not correct" | 21,230 | whitelistMintPrice.mul(numberOfTokens)<=msg.value |
"Already minted a free token!" | // SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./base64.sol";
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
// ░░░░░░░░░░░░░░░██████╗░███╗░░░███╗░░░░░░░░░░░░░░
// ░░░░░░░░░░░░░░██╔════╝░████╗░████║░░░░░░░░░░░░░░
// ░░░░░░░░░░░░░░██║░░███╗██╔████╔██║░░░░░░░░░░░░░░
// ░░░░░░░░░░░░░░██║░░░██║██║╚██╔╝██║░░░░░░░░░░░░░░
// ░░░░░░░░░░░░░░╚██████╔╝██║░╚═╝░██║░░░░░░░░░░░░░░
// ░░░░░░░░░░░░░░░╚═════╝░╚═╝░░░░░╚═╝░░░░░░░░░░░░░░
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
contract GM is ERC721, Ownable, ReentrancyGuard {
using SafeMath for uint256;
constructor(
string memory _name,
string memory _symbol,
uint256 _totalNFTs,
uint256 _totalCommunity
) ERC721(_name, _symbol) {
}
address private _fund = 0xc13576788F8f59FB4889F66938fd73157bd97c47;
uint256 public mintedNFTs;
uint256 mintedCommunity;
uint256 totalNFTs;
uint256 totalCommunity;
mapping (address => bool) internal mintedFree;
function communityTokens(
string memory custom, address toWallet, string memory tier) public onlyOwner {
}
function isMorningUTC(uint256 timestamp) public pure returns (string memory) {
}
function sayItBack(string memory custom) public payable nonReentrant {
require(mintedNFTs <= totalNFTs, "gm is sold out!");
uint256 charCount = uint256(bytes(custom).length);
string memory tier;
if (charCount <= 5){
require(charCount >= 1, "Custom text must not less than 1 character!");
require(<FILL_ME>)
mintedFree[msg.sender] = true;
tier = 'Black';
} else if (charCount > 5 && charCount <= 35) {
require(msg.value >= 0.01 ether, "Please send 0.01 ETH!");
tier = 'Blue';
} else if (charCount > 35) {
require(charCount <= 138, "Custom text must not be more than 138 characters!");
require(msg.value >= 0.03 ether, "Please send 0.03 ETH!");
tier = 'Gold';
}
_safeMint(_msgSender(), mintedNFTs);
payable(_fund).transfer(msg.value);
string memory customText = _concat('gm<br/><br/>', custom);
string memory morning = isMorningUTC(block.timestamp);
string memory tokenURI = _constructTokenURI(mintedNFTs, customText, morning, tier, charCount);
_setTokenURI(mintedNFTs, tokenURI);
mintedNFTs = mintedNFTs.add(1);
}
function _append(
string memory a,
string memory b,
string memory c,
string memory d,
string memory e,
string memory f,
string memory g,
string memory h
) private pure returns (string memory) {
}
function _compare(string memory a, string memory b) private pure returns (bool) {
}
function _concat(string memory a, string memory b) private pure returns (string memory) {
}
function _constructTokenURI(
uint256 tokenId,
string memory customText,
string memory morning,
string memory tier,
uint256 charCount
) private pure returns (string memory) {
}
function _drawSvg(
string memory customText,
string memory tier
) private pure returns (string memory) {
}
function _setTraits(
string memory morning,
string memory tier,
string memory charCount
) private pure returns (string memory) {
}
}
| mintedFree[msg.sender]==false,"Already minted a free token!" | 21,324 | mintedFree[msg.sender]==false |
null | pragma solidity ^0.4.13;
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 _a, uint256 _b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 _a, uint256 _b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
}
}
contract ERC20Basic {
function totalSupply() public view returns (uint256);
function balanceOf(address _who) public view returns (uint256);
function transfer(address _to, uint256 _value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) internal balances;
uint256 internal totalSupply_;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
}
/**
* @dev Transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) public view returns (uint256) {
}
}
contract ERC20 is ERC20Basic {
function allowance(address _owner, address _spender)
public view returns (uint256);
function transferFrom(address _from, address _to, uint256 _value)
public returns (bool);
function approve(address _spender, uint256 _value) public returns (bool);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(
address _from,
address _to,
uint256 _value
)
public
returns (bool)
{
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(
address _owner,
address _spender
)
public
view
returns (uint256)
{
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _addedValue The amount of tokens to increase the allowance by.
*/
function increaseApproval(
address _spender,
uint256 _addedValue
)
public
returns (bool)
{
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseApproval(
address _spender,
uint256 _subtractedValue
)
public
returns (bool)
{
}
}
contract AUDToken is StandardToken {
string public name = 'AUDToken';
string public token = 'AUD';
uint8 public decimals = 6;
uint public INITIAL_SUPPLY = 1000000*10**6;
uint public constant ONE_DECIMAL_QUANTUM_ANZ_TOKEN_PRICE = 1 ether/(100*10**6);
//EVENTS
event tokenOverriden(address investor, uint decimalTokenAmount);
event receivedEther(address sender, uint amount);
mapping (address => bool) administrators;
// previous BDA token values
address public tokenAdministrator = 0x5a27ACD4A9C68DC28A96918f2403F9a928f73b51;
address public vault= 0x8049335C4435892a52eA58eD7A73149C48452b45;
// MODIFIERS
modifier onlyAdministrators {
require(<FILL_ME>)
_;
}
function isEqualLength(address[] x, uint[] y) pure internal returns (bool) { }
modifier onlySameLengthArray(address[] x, uint[] y) {
}
constructor() public {
}
function()
payable
public
{
}
function addAdministrator(address newAdministrator)
public
onlyAdministrators
{
}
function overrideTokenHolders(address[] toOverride, uint[] decimalTokenAmount)
public
onlyAdministrators
onlySameLengthArray(toOverride, decimalTokenAmount)
{
}
function overrideTokenHolder(address toOverride, uint decimalTokenAmount)
public
onlyAdministrators
{
}
function resetContract()
public
onlyAdministrators
{
}
}
| administrators[msg.sender] | 21,357 | administrators[msg.sender] |
null | pragma solidity ^0.4.13;
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 _a, uint256 _b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 _a, uint256 _b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
}
}
contract ERC20Basic {
function totalSupply() public view returns (uint256);
function balanceOf(address _who) public view returns (uint256);
function transfer(address _to, uint256 _value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) internal balances;
uint256 internal totalSupply_;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
}
/**
* @dev Transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) public view returns (uint256) {
}
}
contract ERC20 is ERC20Basic {
function allowance(address _owner, address _spender)
public view returns (uint256);
function transferFrom(address _from, address _to, uint256 _value)
public returns (bool);
function approve(address _spender, uint256 _value) public returns (bool);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(
address _from,
address _to,
uint256 _value
)
public
returns (bool)
{
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(
address _owner,
address _spender
)
public
view
returns (uint256)
{
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _addedValue The amount of tokens to increase the allowance by.
*/
function increaseApproval(
address _spender,
uint256 _addedValue
)
public
returns (bool)
{
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseApproval(
address _spender,
uint256 _subtractedValue
)
public
returns (bool)
{
}
}
contract AUDToken is StandardToken {
string public name = 'AUDToken';
string public token = 'AUD';
uint8 public decimals = 6;
uint public INITIAL_SUPPLY = 1000000*10**6;
uint public constant ONE_DECIMAL_QUANTUM_ANZ_TOKEN_PRICE = 1 ether/(100*10**6);
//EVENTS
event tokenOverriden(address investor, uint decimalTokenAmount);
event receivedEther(address sender, uint amount);
mapping (address => bool) administrators;
// previous BDA token values
address public tokenAdministrator = 0x5a27ACD4A9C68DC28A96918f2403F9a928f73b51;
address public vault= 0x8049335C4435892a52eA58eD7A73149C48452b45;
// MODIFIERS
modifier onlyAdministrators {
}
function isEqualLength(address[] x, uint[] y) pure internal returns (bool) { }
modifier onlySameLengthArray(address[] x, uint[] y) {
require(<FILL_ME>)
_;
}
constructor() public {
}
function()
payable
public
{
}
function addAdministrator(address newAdministrator)
public
onlyAdministrators
{
}
function overrideTokenHolders(address[] toOverride, uint[] decimalTokenAmount)
public
onlyAdministrators
onlySameLengthArray(toOverride, decimalTokenAmount)
{
}
function overrideTokenHolder(address toOverride, uint decimalTokenAmount)
public
onlyAdministrators
{
}
function resetContract()
public
onlyAdministrators
{
}
}
| isEqualLength(x,y) | 21,357 | isEqualLength(x,y) |
null | pragma solidity ^0.4.13;
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 _a, uint256 _b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 _a, uint256 _b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
}
}
contract ERC20Basic {
function totalSupply() public view returns (uint256);
function balanceOf(address _who) public view returns (uint256);
function transfer(address _to, uint256 _value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) internal balances;
uint256 internal totalSupply_;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
}
/**
* @dev Transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) public view returns (uint256) {
}
}
contract ERC20 is ERC20Basic {
function allowance(address _owner, address _spender)
public view returns (uint256);
function transferFrom(address _from, address _to, uint256 _value)
public returns (bool);
function approve(address _spender, uint256 _value) public returns (bool);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(
address _from,
address _to,
uint256 _value
)
public
returns (bool)
{
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(
address _owner,
address _spender
)
public
view
returns (uint256)
{
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _addedValue The amount of tokens to increase the allowance by.
*/
function increaseApproval(
address _spender,
uint256 _addedValue
)
public
returns (bool)
{
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseApproval(
address _spender,
uint256 _subtractedValue
)
public
returns (bool)
{
}
}
contract AUDToken is StandardToken {
string public name = 'AUDToken';
string public token = 'AUD';
uint8 public decimals = 6;
uint public INITIAL_SUPPLY = 1000000*10**6;
uint public constant ONE_DECIMAL_QUANTUM_ANZ_TOKEN_PRICE = 1 ether/(100*10**6);
//EVENTS
event tokenOverriden(address investor, uint decimalTokenAmount);
event receivedEther(address sender, uint amount);
mapping (address => bool) administrators;
// previous BDA token values
address public tokenAdministrator = 0x5a27ACD4A9C68DC28A96918f2403F9a928f73b51;
address public vault= 0x8049335C4435892a52eA58eD7A73149C48452b45;
// MODIFIERS
modifier onlyAdministrators {
}
function isEqualLength(address[] x, uint[] y) pure internal returns (bool) { }
modifier onlySameLengthArray(address[] x, uint[] y) {
}
constructor() public {
}
function()
payable
public
{
uint amountSentInWei = msg.value;
uint decimalTokenAmount = amountSentInWei/ONE_DECIMAL_QUANTUM_ANZ_TOKEN_PRICE;
require(<FILL_ME>)
require(this.transfer(msg.sender, decimalTokenAmount));
emit receivedEther(msg.sender, amountSentInWei);
}
function addAdministrator(address newAdministrator)
public
onlyAdministrators
{
}
function overrideTokenHolders(address[] toOverride, uint[] decimalTokenAmount)
public
onlyAdministrators
onlySameLengthArray(toOverride, decimalTokenAmount)
{
}
function overrideTokenHolder(address toOverride, uint decimalTokenAmount)
public
onlyAdministrators
{
}
function resetContract()
public
onlyAdministrators
{
}
}
| vault.send(msg.value) | 21,357 | vault.send(msg.value) |
null | pragma solidity ^0.4.13;
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 _a, uint256 _b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 _a, uint256 _b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
}
}
contract ERC20Basic {
function totalSupply() public view returns (uint256);
function balanceOf(address _who) public view returns (uint256);
function transfer(address _to, uint256 _value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) internal balances;
uint256 internal totalSupply_;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
}
/**
* @dev Transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) public view returns (uint256) {
}
}
contract ERC20 is ERC20Basic {
function allowance(address _owner, address _spender)
public view returns (uint256);
function transferFrom(address _from, address _to, uint256 _value)
public returns (bool);
function approve(address _spender, uint256 _value) public returns (bool);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(
address _from,
address _to,
uint256 _value
)
public
returns (bool)
{
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(
address _owner,
address _spender
)
public
view
returns (uint256)
{
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _addedValue The amount of tokens to increase the allowance by.
*/
function increaseApproval(
address _spender,
uint256 _addedValue
)
public
returns (bool)
{
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseApproval(
address _spender,
uint256 _subtractedValue
)
public
returns (bool)
{
}
}
contract AUDToken is StandardToken {
string public name = 'AUDToken';
string public token = 'AUD';
uint8 public decimals = 6;
uint public INITIAL_SUPPLY = 1000000*10**6;
uint public constant ONE_DECIMAL_QUANTUM_ANZ_TOKEN_PRICE = 1 ether/(100*10**6);
//EVENTS
event tokenOverriden(address investor, uint decimalTokenAmount);
event receivedEther(address sender, uint amount);
mapping (address => bool) administrators;
// previous BDA token values
address public tokenAdministrator = 0x5a27ACD4A9C68DC28A96918f2403F9a928f73b51;
address public vault= 0x8049335C4435892a52eA58eD7A73149C48452b45;
// MODIFIERS
modifier onlyAdministrators {
}
function isEqualLength(address[] x, uint[] y) pure internal returns (bool) { }
modifier onlySameLengthArray(address[] x, uint[] y) {
}
constructor() public {
}
function()
payable
public
{
uint amountSentInWei = msg.value;
uint decimalTokenAmount = amountSentInWei/ONE_DECIMAL_QUANTUM_ANZ_TOKEN_PRICE;
require(vault.send(msg.value));
require(<FILL_ME>)
emit receivedEther(msg.sender, amountSentInWei);
}
function addAdministrator(address newAdministrator)
public
onlyAdministrators
{
}
function overrideTokenHolders(address[] toOverride, uint[] decimalTokenAmount)
public
onlyAdministrators
onlySameLengthArray(toOverride, decimalTokenAmount)
{
}
function overrideTokenHolder(address toOverride, uint decimalTokenAmount)
public
onlyAdministrators
{
}
function resetContract()
public
onlyAdministrators
{
}
}
| this.transfer(msg.sender,decimalTokenAmount) | 21,357 | this.transfer(msg.sender,decimalTokenAmount) |
"WhiteList: msg.sender not in whilteList." | // SPDX-License-Identifier: MIT
pragma solidity >=0.5.0 <0.8.0;
import "./Owned.sol";
contract WhiteList is Owned {
/// @notice Users with permissions
mapping(address => uint256) public whiter;
/// @notice Append address into whiteList successevent
event AppendWhiter(address adder);
/// @notice Remove address into whiteList successevent
event RemoveWhiter(address remover);
/**
* @notice Construct a new WhiteList, default owner in whiteList
*/
constructor() internal {
}
modifier onlyWhiter() {
require(<FILL_ME>)
_;
}
/**
* @notice Only onwer can append address into whitelist
* @param account The address not added, can added to the whitelist
*/
function appendWhiter(address account) public onlyOwner {
}
/**
* @notice Only onwer can remove address into whitelist
* @param account The address in whitelist yet
*/
function removeWhiter(address account) public onlyOwner {
}
/**
* @notice Check whether acccount in whitelist
* @param account Any address
*/
function isWhiter(address account) public view returns (bool) {
}
/**
* @notice Check whether msg.sender in whitelist overrides.
*/
function isWhiter() public view returns (bool) {
}
}
| isWhiter(),"WhiteList: msg.sender not in whilteList." | 21,425 | isWhiter() |
"WhiteListe: the account exsit whilteList yet" | // SPDX-License-Identifier: MIT
pragma solidity >=0.5.0 <0.8.0;
import "./Owned.sol";
contract WhiteList is Owned {
/// @notice Users with permissions
mapping(address => uint256) public whiter;
/// @notice Append address into whiteList successevent
event AppendWhiter(address adder);
/// @notice Remove address into whiteList successevent
event RemoveWhiter(address remover);
/**
* @notice Construct a new WhiteList, default owner in whiteList
*/
constructor() internal {
}
modifier onlyWhiter() {
}
/**
* @notice Only onwer can append address into whitelist
* @param account The address not added, can added to the whitelist
*/
function appendWhiter(address account) public onlyOwner {
require(account != address(0), "WhiteList: address not zero");
require(<FILL_ME>)
whiter[account] = 1;
emit AppendWhiter(account);
}
/**
* @notice Only onwer can remove address into whitelist
* @param account The address in whitelist yet
*/
function removeWhiter(address account) public onlyOwner {
}
/**
* @notice Check whether acccount in whitelist
* @param account Any address
*/
function isWhiter(address account) public view returns (bool) {
}
/**
* @notice Check whether msg.sender in whitelist overrides.
*/
function isWhiter() public view returns (bool) {
}
}
| !isWhiter(account),"WhiteListe: the account exsit whilteList yet" | 21,425 | !isWhiter(account) |
"WhiteListe: the account not exist whilteList" | // SPDX-License-Identifier: MIT
pragma solidity >=0.5.0 <0.8.0;
import "./Owned.sol";
contract WhiteList is Owned {
/// @notice Users with permissions
mapping(address => uint256) public whiter;
/// @notice Append address into whiteList successevent
event AppendWhiter(address adder);
/// @notice Remove address into whiteList successevent
event RemoveWhiter(address remover);
/**
* @notice Construct a new WhiteList, default owner in whiteList
*/
constructor() internal {
}
modifier onlyWhiter() {
}
/**
* @notice Only onwer can append address into whitelist
* @param account The address not added, can added to the whitelist
*/
function appendWhiter(address account) public onlyOwner {
}
/**
* @notice Only onwer can remove address into whitelist
* @param account The address in whitelist yet
*/
function removeWhiter(address account) public onlyOwner {
require(<FILL_ME>)
delete whiter[account];
emit RemoveWhiter(account);
}
/**
* @notice Check whether acccount in whitelist
* @param account Any address
*/
function isWhiter(address account) public view returns (bool) {
}
/**
* @notice Check whether msg.sender in whitelist overrides.
*/
function isWhiter() public view returns (bool) {
}
}
| isWhiter(account),"WhiteListe: the account not exist whilteList" | 21,425 | isWhiter(account) |
"NFTYPass: Contract frozen" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
contract NFTYPass is ERC721, ERC721Enumerable, Ownable {
using Strings for uint256;
using ECDSA for bytes32;
uint256 public constant TOKEN_COST = 2 ether;
uint256 public constant TOKEN_RENEWAL = 1 ether;
uint256 public constant TOKEN_MAXIMUM = 512;
uint256 public constant OWNER_MAX_MINT = 10;
bool public frozen;
bool public purchasable;
string public baseURI;
uint256 public ownerMint;
address private constant A = 0xc57112FB1872130A85ecF29877DD96042572a027;
address private constant B = 0x69827Bf658898541380f78e0FBaF920ff020203b;
address private signerAddress;
mapping(uint256 => uint256) public tokenExpiry;
mapping(address => uint256) private presalePurchases;
constructor() ERC721("NFTYPass", "NFTY") {}
modifier onlyEOA() {
}
function _isExpired(uint256 tokenId) internal view returns (bool) {
}
function purchase() external payable onlyEOA {
uint256 supply = totalSupply();
require(<FILL_ME>)
require(msg.value >= TOKEN_COST, "NFTYPass: Invalid ether amount");
require(purchasable, "NFTYPass: Sale is not live");
require(
supply + 1 <= TOKEN_MAXIMUM,
"NFTYPass: Exceeds supply maximum"
);
require(
balanceOf(msg.sender) == 0,
"NFTYPass: One pass per individual"
);
uint256 tokenId = supply + 1;
tokenExpiry[tokenId] = block.timestamp + 30 days;
_safeMint(msg.sender, tokenId);
}
function validatePresale(bytes calldata signature)
internal
view
returns (bool)
{
}
function presale(bytes calldata signature) external payable onlyEOA {
}
function sendGift(address to) external onlyOwner {
}
function renew(uint256 tokenId) external payable {
}
function enablePurchases() external onlyOwner {
}
function freeze() external onlyOwner {
}
function setSignerAddress(address signer) external onlyOwner {
}
function setExpiryTime(uint256 tokenId, uint256 time) external onlyOwner {
}
function isExpired(uint256 tokenId) external view returns (bool) {
}
function expiryTime(uint256 tokenId) external view returns (uint256) {
}
function _isTransferrable(uint256 tokenId) internal view returns (bool) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721, ERC721Enumerable) {
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
function setBaseURI(string calldata uri) external onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function withdrawBalance() external onlyOwner {
}
}
| !frozen,"NFTYPass: Contract frozen" | 21,462 | !frozen |
"NFTYPass: Exceeds supply maximum" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
contract NFTYPass is ERC721, ERC721Enumerable, Ownable {
using Strings for uint256;
using ECDSA for bytes32;
uint256 public constant TOKEN_COST = 2 ether;
uint256 public constant TOKEN_RENEWAL = 1 ether;
uint256 public constant TOKEN_MAXIMUM = 512;
uint256 public constant OWNER_MAX_MINT = 10;
bool public frozen;
bool public purchasable;
string public baseURI;
uint256 public ownerMint;
address private constant A = 0xc57112FB1872130A85ecF29877DD96042572a027;
address private constant B = 0x69827Bf658898541380f78e0FBaF920ff020203b;
address private signerAddress;
mapping(uint256 => uint256) public tokenExpiry;
mapping(address => uint256) private presalePurchases;
constructor() ERC721("NFTYPass", "NFTY") {}
modifier onlyEOA() {
}
function _isExpired(uint256 tokenId) internal view returns (bool) {
}
function purchase() external payable onlyEOA {
uint256 supply = totalSupply();
require(!frozen, "NFTYPass: Contract frozen");
require(msg.value >= TOKEN_COST, "NFTYPass: Invalid ether amount");
require(purchasable, "NFTYPass: Sale is not live");
require(<FILL_ME>)
require(
balanceOf(msg.sender) == 0,
"NFTYPass: One pass per individual"
);
uint256 tokenId = supply + 1;
tokenExpiry[tokenId] = block.timestamp + 30 days;
_safeMint(msg.sender, tokenId);
}
function validatePresale(bytes calldata signature)
internal
view
returns (bool)
{
}
function presale(bytes calldata signature) external payable onlyEOA {
}
function sendGift(address to) external onlyOwner {
}
function renew(uint256 tokenId) external payable {
}
function enablePurchases() external onlyOwner {
}
function freeze() external onlyOwner {
}
function setSignerAddress(address signer) external onlyOwner {
}
function setExpiryTime(uint256 tokenId, uint256 time) external onlyOwner {
}
function isExpired(uint256 tokenId) external view returns (bool) {
}
function expiryTime(uint256 tokenId) external view returns (uint256) {
}
function _isTransferrable(uint256 tokenId) internal view returns (bool) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721, ERC721Enumerable) {
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
function setBaseURI(string calldata uri) external onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function withdrawBalance() external onlyOwner {
}
}
| supply+1<=TOKEN_MAXIMUM,"NFTYPass: Exceeds supply maximum" | 21,462 | supply+1<=TOKEN_MAXIMUM |
"NFTYPass: One pass per individual" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
contract NFTYPass is ERC721, ERC721Enumerable, Ownable {
using Strings for uint256;
using ECDSA for bytes32;
uint256 public constant TOKEN_COST = 2 ether;
uint256 public constant TOKEN_RENEWAL = 1 ether;
uint256 public constant TOKEN_MAXIMUM = 512;
uint256 public constant OWNER_MAX_MINT = 10;
bool public frozen;
bool public purchasable;
string public baseURI;
uint256 public ownerMint;
address private constant A = 0xc57112FB1872130A85ecF29877DD96042572a027;
address private constant B = 0x69827Bf658898541380f78e0FBaF920ff020203b;
address private signerAddress;
mapping(uint256 => uint256) public tokenExpiry;
mapping(address => uint256) private presalePurchases;
constructor() ERC721("NFTYPass", "NFTY") {}
modifier onlyEOA() {
}
function _isExpired(uint256 tokenId) internal view returns (bool) {
}
function purchase() external payable onlyEOA {
uint256 supply = totalSupply();
require(!frozen, "NFTYPass: Contract frozen");
require(msg.value >= TOKEN_COST, "NFTYPass: Invalid ether amount");
require(purchasable, "NFTYPass: Sale is not live");
require(
supply + 1 <= TOKEN_MAXIMUM,
"NFTYPass: Exceeds supply maximum"
);
require(<FILL_ME>)
uint256 tokenId = supply + 1;
tokenExpiry[tokenId] = block.timestamp + 30 days;
_safeMint(msg.sender, tokenId);
}
function validatePresale(bytes calldata signature)
internal
view
returns (bool)
{
}
function presale(bytes calldata signature) external payable onlyEOA {
}
function sendGift(address to) external onlyOwner {
}
function renew(uint256 tokenId) external payable {
}
function enablePurchases() external onlyOwner {
}
function freeze() external onlyOwner {
}
function setSignerAddress(address signer) external onlyOwner {
}
function setExpiryTime(uint256 tokenId, uint256 time) external onlyOwner {
}
function isExpired(uint256 tokenId) external view returns (bool) {
}
function expiryTime(uint256 tokenId) external view returns (uint256) {
}
function _isTransferrable(uint256 tokenId) internal view returns (bool) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721, ERC721Enumerable) {
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
function setBaseURI(string calldata uri) external onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function withdrawBalance() external onlyOwner {
}
}
| balanceOf(msg.sender)==0,"NFTYPass: One pass per individual" | 21,462 | balanceOf(msg.sender)==0 |
"NFTYPass: Invalid Signature" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
contract NFTYPass is ERC721, ERC721Enumerable, Ownable {
using Strings for uint256;
using ECDSA for bytes32;
uint256 public constant TOKEN_COST = 2 ether;
uint256 public constant TOKEN_RENEWAL = 1 ether;
uint256 public constant TOKEN_MAXIMUM = 512;
uint256 public constant OWNER_MAX_MINT = 10;
bool public frozen;
bool public purchasable;
string public baseURI;
uint256 public ownerMint;
address private constant A = 0xc57112FB1872130A85ecF29877DD96042572a027;
address private constant B = 0x69827Bf658898541380f78e0FBaF920ff020203b;
address private signerAddress;
mapping(uint256 => uint256) public tokenExpiry;
mapping(address => uint256) private presalePurchases;
constructor() ERC721("NFTYPass", "NFTY") {}
modifier onlyEOA() {
}
function _isExpired(uint256 tokenId) internal view returns (bool) {
}
function purchase() external payable onlyEOA {
}
function validatePresale(bytes calldata signature)
internal
view
returns (bool)
{
}
function presale(bytes calldata signature) external payable onlyEOA {
uint256 supply = totalSupply();
require(<FILL_ME>)
require(!frozen, "NFTYPass: Contract frozen");
require(msg.value >= TOKEN_COST, "NFTYPass: Invalid ether amount");
require(
supply + 1 <= TOKEN_MAXIMUM,
"NFTYPass: Exceeds supply maximum"
);
require(
presalePurchases[msg.sender] == 0,
"NFTYPass: One pass per individual"
);
uint256 tokenId = supply + 1;
presalePurchases[msg.sender]++;
tokenExpiry[tokenId] = block.timestamp + 30 days;
_safeMint(msg.sender, tokenId);
}
function sendGift(address to) external onlyOwner {
}
function renew(uint256 tokenId) external payable {
}
function enablePurchases() external onlyOwner {
}
function freeze() external onlyOwner {
}
function setSignerAddress(address signer) external onlyOwner {
}
function setExpiryTime(uint256 tokenId, uint256 time) external onlyOwner {
}
function isExpired(uint256 tokenId) external view returns (bool) {
}
function expiryTime(uint256 tokenId) external view returns (uint256) {
}
function _isTransferrable(uint256 tokenId) internal view returns (bool) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721, ERC721Enumerable) {
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
function setBaseURI(string calldata uri) external onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function withdrawBalance() external onlyOwner {
}
}
| validatePresale(signature),"NFTYPass: Invalid Signature" | 21,462 | validatePresale(signature) |
"NFTYPass: One pass per individual" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
contract NFTYPass is ERC721, ERC721Enumerable, Ownable {
using Strings for uint256;
using ECDSA for bytes32;
uint256 public constant TOKEN_COST = 2 ether;
uint256 public constant TOKEN_RENEWAL = 1 ether;
uint256 public constant TOKEN_MAXIMUM = 512;
uint256 public constant OWNER_MAX_MINT = 10;
bool public frozen;
bool public purchasable;
string public baseURI;
uint256 public ownerMint;
address private constant A = 0xc57112FB1872130A85ecF29877DD96042572a027;
address private constant B = 0x69827Bf658898541380f78e0FBaF920ff020203b;
address private signerAddress;
mapping(uint256 => uint256) public tokenExpiry;
mapping(address => uint256) private presalePurchases;
constructor() ERC721("NFTYPass", "NFTY") {}
modifier onlyEOA() {
}
function _isExpired(uint256 tokenId) internal view returns (bool) {
}
function purchase() external payable onlyEOA {
}
function validatePresale(bytes calldata signature)
internal
view
returns (bool)
{
}
function presale(bytes calldata signature) external payable onlyEOA {
uint256 supply = totalSupply();
require(validatePresale(signature), "NFTYPass: Invalid Signature");
require(!frozen, "NFTYPass: Contract frozen");
require(msg.value >= TOKEN_COST, "NFTYPass: Invalid ether amount");
require(
supply + 1 <= TOKEN_MAXIMUM,
"NFTYPass: Exceeds supply maximum"
);
require(<FILL_ME>)
uint256 tokenId = supply + 1;
presalePurchases[msg.sender]++;
tokenExpiry[tokenId] = block.timestamp + 30 days;
_safeMint(msg.sender, tokenId);
}
function sendGift(address to) external onlyOwner {
}
function renew(uint256 tokenId) external payable {
}
function enablePurchases() external onlyOwner {
}
function freeze() external onlyOwner {
}
function setSignerAddress(address signer) external onlyOwner {
}
function setExpiryTime(uint256 tokenId, uint256 time) external onlyOwner {
}
function isExpired(uint256 tokenId) external view returns (bool) {
}
function expiryTime(uint256 tokenId) external view returns (uint256) {
}
function _isTransferrable(uint256 tokenId) internal view returns (bool) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721, ERC721Enumerable) {
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
function setBaseURI(string calldata uri) external onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function withdrawBalance() external onlyOwner {
}
}
| presalePurchases[msg.sender]==0,"NFTYPass: One pass per individual" | 21,462 | presalePurchases[msg.sender]==0 |
"NFTYPass: Exceeds owner mint" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
contract NFTYPass is ERC721, ERC721Enumerable, Ownable {
using Strings for uint256;
using ECDSA for bytes32;
uint256 public constant TOKEN_COST = 2 ether;
uint256 public constant TOKEN_RENEWAL = 1 ether;
uint256 public constant TOKEN_MAXIMUM = 512;
uint256 public constant OWNER_MAX_MINT = 10;
bool public frozen;
bool public purchasable;
string public baseURI;
uint256 public ownerMint;
address private constant A = 0xc57112FB1872130A85ecF29877DD96042572a027;
address private constant B = 0x69827Bf658898541380f78e0FBaF920ff020203b;
address private signerAddress;
mapping(uint256 => uint256) public tokenExpiry;
mapping(address => uint256) private presalePurchases;
constructor() ERC721("NFTYPass", "NFTY") {}
modifier onlyEOA() {
}
function _isExpired(uint256 tokenId) internal view returns (bool) {
}
function purchase() external payable onlyEOA {
}
function validatePresale(bytes calldata signature)
internal
view
returns (bool)
{
}
function presale(bytes calldata signature) external payable onlyEOA {
}
function sendGift(address to) external onlyOwner {
uint256 supply = totalSupply();
require(!frozen, "NFTYPass: Contract frozen");
require(purchasable, "NFTYPass: Sale is not live");
require(
supply + 1 <= TOKEN_MAXIMUM,
"NFTYPass: Exceeds supply maximum"
);
require(<FILL_ME>)
require(balanceOf(to) == 0, "NFTYPass: One pass per individual");
uint256 tokenId = supply + 1;
ownerMint++;
tokenExpiry[tokenId] = block.timestamp + 30 days;
_safeMint(to, tokenId);
}
function renew(uint256 tokenId) external payable {
}
function enablePurchases() external onlyOwner {
}
function freeze() external onlyOwner {
}
function setSignerAddress(address signer) external onlyOwner {
}
function setExpiryTime(uint256 tokenId, uint256 time) external onlyOwner {
}
function isExpired(uint256 tokenId) external view returns (bool) {
}
function expiryTime(uint256 tokenId) external view returns (uint256) {
}
function _isTransferrable(uint256 tokenId) internal view returns (bool) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721, ERC721Enumerable) {
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
function setBaseURI(string calldata uri) external onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function withdrawBalance() external onlyOwner {
}
}
| ownerMint+1<=OWNER_MAX_MINT,"NFTYPass: Exceeds owner mint" | 21,462 | ownerMint+1<=OWNER_MAX_MINT |
"NFTYPass: Token must have at least 1 week remaining" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
contract NFTYPass is ERC721, ERC721Enumerable, Ownable {
using Strings for uint256;
using ECDSA for bytes32;
uint256 public constant TOKEN_COST = 2 ether;
uint256 public constant TOKEN_RENEWAL = 1 ether;
uint256 public constant TOKEN_MAXIMUM = 512;
uint256 public constant OWNER_MAX_MINT = 10;
bool public frozen;
bool public purchasable;
string public baseURI;
uint256 public ownerMint;
address private constant A = 0xc57112FB1872130A85ecF29877DD96042572a027;
address private constant B = 0x69827Bf658898541380f78e0FBaF920ff020203b;
address private signerAddress;
mapping(uint256 => uint256) public tokenExpiry;
mapping(address => uint256) private presalePurchases;
constructor() ERC721("NFTYPass", "NFTY") {}
modifier onlyEOA() {
}
function _isExpired(uint256 tokenId) internal view returns (bool) {
}
function purchase() external payable onlyEOA {
}
function validatePresale(bytes calldata signature)
internal
view
returns (bool)
{
}
function presale(bytes calldata signature) external payable onlyEOA {
}
function sendGift(address to) external onlyOwner {
}
function renew(uint256 tokenId) external payable {
}
function enablePurchases() external onlyOwner {
}
function freeze() external onlyOwner {
}
function setSignerAddress(address signer) external onlyOwner {
}
function setExpiryTime(uint256 tokenId, uint256 time) external onlyOwner {
}
function isExpired(uint256 tokenId) external view returns (bool) {
}
function expiryTime(uint256 tokenId) external view returns (uint256) {
}
function _isTransferrable(uint256 tokenId) internal view returns (bool) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721, ERC721Enumerable) {
require(<FILL_ME>)
super._beforeTokenTransfer(from, to, tokenId);
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
function setBaseURI(string calldata uri) external onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function withdrawBalance() external onlyOwner {
}
}
| _isTransferrable(tokenId),"NFTYPass: Token must have at least 1 week remaining" | 21,462 | _isTransferrable(tokenId) |
"NFTYPass: Failed to withdraw" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
contract NFTYPass is ERC721, ERC721Enumerable, Ownable {
using Strings for uint256;
using ECDSA for bytes32;
uint256 public constant TOKEN_COST = 2 ether;
uint256 public constant TOKEN_RENEWAL = 1 ether;
uint256 public constant TOKEN_MAXIMUM = 512;
uint256 public constant OWNER_MAX_MINT = 10;
bool public frozen;
bool public purchasable;
string public baseURI;
uint256 public ownerMint;
address private constant A = 0xc57112FB1872130A85ecF29877DD96042572a027;
address private constant B = 0x69827Bf658898541380f78e0FBaF920ff020203b;
address private signerAddress;
mapping(uint256 => uint256) public tokenExpiry;
mapping(address => uint256) private presalePurchases;
constructor() ERC721("NFTYPass", "NFTY") {}
modifier onlyEOA() {
}
function _isExpired(uint256 tokenId) internal view returns (bool) {
}
function purchase() external payable onlyEOA {
}
function validatePresale(bytes calldata signature)
internal
view
returns (bool)
{
}
function presale(bytes calldata signature) external payable onlyEOA {
}
function sendGift(address to) external onlyOwner {
}
function renew(uint256 tokenId) external payable {
}
function enablePurchases() external onlyOwner {
}
function freeze() external onlyOwner {
}
function setSignerAddress(address signer) external onlyOwner {
}
function setExpiryTime(uint256 tokenId, uint256 time) external onlyOwner {
}
function isExpired(uint256 tokenId) external view returns (bool) {
}
function expiryTime(uint256 tokenId) external view returns (uint256) {
}
function _isTransferrable(uint256 tokenId) internal view returns (bool) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721, ERC721Enumerable) {
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
function setBaseURI(string calldata uri) external onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function withdrawBalance() external onlyOwner {
uint256 share = address(this).balance / 3;
uint256 valueA = share * 2;
uint256 valueB = share;
(bool successA, ) = A.call{value: valueA}("");
(bool successB, ) = B.call{value: valueB}("");
require(<FILL_ME>)
}
}
| successA&&successB,"NFTYPass: Failed to withdraw" | 21,462 | successA&&successB |
null | pragma solidity ^0.4.20;
contract EthereumFusion {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlybelievers () {
}
// only people with profits
modifier onlyhodler() {
}
// administrators can:
// -> change the name of the contract
// -> change the name of the token
// -> change the PoS difficulty
// they CANNOT:
// -> take funds
// -> disable withdrawals
// -> kill the contract
// -> change the price of tokens
modifier onlyAdministrator(){
address _customerAddress = msg.sender;
require(<FILL_ME>)
_;
}
modifier antiEarlyWhale(uint256 _amountOfEthereum){
}
/*==============================
= EVENTS =
==============================*/
event onTokenPurchase(
address indexed customerAddress,
uint256 incomingEthereum,
uint256 tokensMinted,
address indexed referredBy
);
event onTokenSell(
address indexed customerAddress,
uint256 tokensBurned,
uint256 ethereumEarned
);
event onReinvestment(
address indexed customerAddress,
uint256 ethereumReinvested,
uint256 tokensMinted
);
event onWithdraw(
address indexed customerAddress,
uint256 ethereumWithdrawn
);
// ERC20
event Transfer(
address indexed from,
address indexed to,
uint256 tokens
);
/*=====================================
= CONFIGURABLES =
=====================================*/
string public name = "EthereumFusion";
string public symbol = "EFT";
uint8 constant public decimals = 18;
uint8 constant internal dividendFee_ = 10;
uint256 constant internal tokenPriceInitial_ = 0.0000001 ether;
uint256 constant internal tokenPriceIncremental_ = 0.00000001 ether;
uint256 constant internal magnitude = 2**64;
// proof of stake (defaults at 1 token)
uint256 public stakingRequirement = 1e18;
// ambassador program
mapping(address => bool) internal ambassadors_;
uint256 constant internal ambassadorMaxPurchase_ = 1 ether;
uint256 constant internal ambassadorQuota_ = 1 ether;
/*================================
= DATASETS =
================================*/
// amount of shares for each address (scaled number)
mapping(address => uint256) internal tokenBalanceLedger_;
mapping(address => uint256) internal referralBalance_;
mapping(address => int256) internal payoutsTo_;
mapping(address => uint256) internal ambassadorAccumulatedQuota_;
uint256 internal tokenSupply_ = 0;
uint256 internal profitPerShare_;
// administrator list (see above on what they can do)
mapping(bytes32 => bool) public administrators;
bool public onlyAmbassadors = false;
/*=======================================
= PUBLIC FUNCTIONS =
=======================================*/
/*
* -- APPLICATION ENTRY POINTS --
*/
function EthereumFusion()
public
{
}
/**
* Converts all incoming Ethereum to tokens for the caller, and passes down the referral address (if any)
*/
function buy(address _referredBy)
public
payable
returns(uint256)
{
}
function()
payable
public
{
}
/**
* Converts all of caller's dividends to tokens.
*/
function reinvest()
onlyhodler()
public
{
}
/**
* Alias of sell() and withdraw().
*/
function exit()
public
{
}
/**
* Withdraws all of the callers earnings.
*/
function withdraw()
onlyhodler()
public
{
}
/**
* Liquifies tokens to ethereum.
*/
function sell(uint256 _amountOfTokens)
onlybelievers ()
public
{
}
/**
* Transfer tokens from the caller to a new holder.
* Remember, there's a 10% fee here as well.
*/
function transfer(address _toAddress, uint256 _amountOfTokens)
onlybelievers ()
public
returns(bool)
{
}
/*---------- ADMINISTRATOR ONLY FUNCTIONS ----------*/
/**
* administrator can manually disable the ambassador phase.
*/
function disableInitialStage()
onlyAdministrator()
public
{
}
function setAdministrator(bytes32 _identifier, bool _status)
onlyAdministrator()
public
{
}
function setStakingRequirement(uint256 _amountOfTokens)
onlyAdministrator()
public
{
}
function setName(string _name)
onlyAdministrator()
public
{
}
function setSymbol(string _symbol)
onlyAdministrator()
public
{
}
/*---------- HELPERS AND CALCULATORS ----------*/
/**
* Method to view the current Ethereum stored in the contract
* Example: totalEthereumBalance()
*/
function totalEthereumBalance()
public
view
returns(uint)
{
}
/**
* Retrieve the total token supply.
*/
function totalSupply()
public
view
returns(uint256)
{
}
/**
* Retrieve the tokens owned by the caller.
*/
function myTokens()
public
view
returns(uint256)
{
}
/**
* Retrieve the dividends owned by the caller.
*/
function myDividends(bool _includeReferralBonus)
public
view
returns(uint256)
{
}
/**
* Retrieve the token balance of any single address.
*/
function balanceOf(address _customerAddress)
view
public
returns(uint256)
{
}
/**
* Retrieve the dividend balance of any single address.
*/
function dividendsOf(address _customerAddress)
view
public
returns(uint256)
{
}
/**
* Return the buy price of 1 individual token.
*/
function sellPrice()
public
view
returns(uint256)
{
}
/**
* Return the sell price of 1 individual token.
*/
function buyPrice()
public
view
returns(uint256)
{
}
function calculateTokensReceived(uint256 _ethereumToSpend)
public
view
returns(uint256)
{
}
function calculateEthereumReceived(uint256 _tokensToSell)
public
view
returns(uint256)
{
}
/*==========================================
= INTERNAL FUNCTIONS =
==========================================*/
function purchaseTokens(uint256 _incomingEthereum, address _referredBy)
antiEarlyWhale(_incomingEthereum)
internal
returns(uint256)
{
}
/**
* Calculate Token price based on an amount of incoming ethereum
* It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation;
* Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code.
*/
function ethereumToTokens_(uint256 _ethereum)
internal
view
returns(uint256)
{
}
/**
* Calculate token sell value.
*/
function tokensToEthereum_(uint256 _tokens)
internal
view
returns(uint256)
{
}
function sqrt(uint x) internal pure returns (uint y) {
}
}
/**
* @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) {
}
/**
* EFT.
*/
}
| administrators[keccak256(_customerAddress)] | 21,552 | administrators[keccak256(_customerAddress)] |
null | pragma solidity ^0.4.20;
contract EthereumFusion {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlybelievers () {
}
// only people with profits
modifier onlyhodler() {
}
// administrators can:
// -> change the name of the contract
// -> change the name of the token
// -> change the PoS difficulty
// they CANNOT:
// -> take funds
// -> disable withdrawals
// -> kill the contract
// -> change the price of tokens
modifier onlyAdministrator(){
}
modifier antiEarlyWhale(uint256 _amountOfEthereum){
address _customerAddress = msg.sender;
if( onlyAmbassadors && ((totalEthereumBalance() - _amountOfEthereum) <= ambassadorQuota_ )){
require(<FILL_ME>)
// updated the accumulated quota
ambassadorAccumulatedQuota_[_customerAddress] = SafeMath.add(ambassadorAccumulatedQuota_[_customerAddress], _amountOfEthereum);
// execute
_;
} else {
// in case the ether count drops low, the ambassador phase won't reinitiate
onlyAmbassadors = false;
_;
}
}
/*==============================
= EVENTS =
==============================*/
event onTokenPurchase(
address indexed customerAddress,
uint256 incomingEthereum,
uint256 tokensMinted,
address indexed referredBy
);
event onTokenSell(
address indexed customerAddress,
uint256 tokensBurned,
uint256 ethereumEarned
);
event onReinvestment(
address indexed customerAddress,
uint256 ethereumReinvested,
uint256 tokensMinted
);
event onWithdraw(
address indexed customerAddress,
uint256 ethereumWithdrawn
);
// ERC20
event Transfer(
address indexed from,
address indexed to,
uint256 tokens
);
/*=====================================
= CONFIGURABLES =
=====================================*/
string public name = "EthereumFusion";
string public symbol = "EFT";
uint8 constant public decimals = 18;
uint8 constant internal dividendFee_ = 10;
uint256 constant internal tokenPriceInitial_ = 0.0000001 ether;
uint256 constant internal tokenPriceIncremental_ = 0.00000001 ether;
uint256 constant internal magnitude = 2**64;
// proof of stake (defaults at 1 token)
uint256 public stakingRequirement = 1e18;
// ambassador program
mapping(address => bool) internal ambassadors_;
uint256 constant internal ambassadorMaxPurchase_ = 1 ether;
uint256 constant internal ambassadorQuota_ = 1 ether;
/*================================
= DATASETS =
================================*/
// amount of shares for each address (scaled number)
mapping(address => uint256) internal tokenBalanceLedger_;
mapping(address => uint256) internal referralBalance_;
mapping(address => int256) internal payoutsTo_;
mapping(address => uint256) internal ambassadorAccumulatedQuota_;
uint256 internal tokenSupply_ = 0;
uint256 internal profitPerShare_;
// administrator list (see above on what they can do)
mapping(bytes32 => bool) public administrators;
bool public onlyAmbassadors = false;
/*=======================================
= PUBLIC FUNCTIONS =
=======================================*/
/*
* -- APPLICATION ENTRY POINTS --
*/
function EthereumFusion()
public
{
}
/**
* Converts all incoming Ethereum to tokens for the caller, and passes down the referral address (if any)
*/
function buy(address _referredBy)
public
payable
returns(uint256)
{
}
function()
payable
public
{
}
/**
* Converts all of caller's dividends to tokens.
*/
function reinvest()
onlyhodler()
public
{
}
/**
* Alias of sell() and withdraw().
*/
function exit()
public
{
}
/**
* Withdraws all of the callers earnings.
*/
function withdraw()
onlyhodler()
public
{
}
/**
* Liquifies tokens to ethereum.
*/
function sell(uint256 _amountOfTokens)
onlybelievers ()
public
{
}
/**
* Transfer tokens from the caller to a new holder.
* Remember, there's a 10% fee here as well.
*/
function transfer(address _toAddress, uint256 _amountOfTokens)
onlybelievers ()
public
returns(bool)
{
}
/*---------- ADMINISTRATOR ONLY FUNCTIONS ----------*/
/**
* administrator can manually disable the ambassador phase.
*/
function disableInitialStage()
onlyAdministrator()
public
{
}
function setAdministrator(bytes32 _identifier, bool _status)
onlyAdministrator()
public
{
}
function setStakingRequirement(uint256 _amountOfTokens)
onlyAdministrator()
public
{
}
function setName(string _name)
onlyAdministrator()
public
{
}
function setSymbol(string _symbol)
onlyAdministrator()
public
{
}
/*---------- HELPERS AND CALCULATORS ----------*/
/**
* Method to view the current Ethereum stored in the contract
* Example: totalEthereumBalance()
*/
function totalEthereumBalance()
public
view
returns(uint)
{
}
/**
* Retrieve the total token supply.
*/
function totalSupply()
public
view
returns(uint256)
{
}
/**
* Retrieve the tokens owned by the caller.
*/
function myTokens()
public
view
returns(uint256)
{
}
/**
* Retrieve the dividends owned by the caller.
*/
function myDividends(bool _includeReferralBonus)
public
view
returns(uint256)
{
}
/**
* Retrieve the token balance of any single address.
*/
function balanceOf(address _customerAddress)
view
public
returns(uint256)
{
}
/**
* Retrieve the dividend balance of any single address.
*/
function dividendsOf(address _customerAddress)
view
public
returns(uint256)
{
}
/**
* Return the buy price of 1 individual token.
*/
function sellPrice()
public
view
returns(uint256)
{
}
/**
* Return the sell price of 1 individual token.
*/
function buyPrice()
public
view
returns(uint256)
{
}
function calculateTokensReceived(uint256 _ethereumToSpend)
public
view
returns(uint256)
{
}
function calculateEthereumReceived(uint256 _tokensToSell)
public
view
returns(uint256)
{
}
/*==========================================
= INTERNAL FUNCTIONS =
==========================================*/
function purchaseTokens(uint256 _incomingEthereum, address _referredBy)
antiEarlyWhale(_incomingEthereum)
internal
returns(uint256)
{
}
/**
* Calculate Token price based on an amount of incoming ethereum
* It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation;
* Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code.
*/
function ethereumToTokens_(uint256 _ethereum)
internal
view
returns(uint256)
{
}
/**
* Calculate token sell value.
*/
function tokensToEthereum_(uint256 _tokens)
internal
view
returns(uint256)
{
}
function sqrt(uint x) internal pure returns (uint y) {
}
}
/**
* @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) {
}
/**
* EFT.
*/
}
| ambassadors_[_customerAddress]==true&&(ambassadorAccumulatedQuota_[_customerAddress]+_amountOfEthereum)<=ambassadorMaxPurchase_ | 21,552 | ambassadors_[_customerAddress]==true&&(ambassadorAccumulatedQuota_[_customerAddress]+_amountOfEthereum)<=ambassadorMaxPurchase_ |
null | pragma solidity ^0.4.20;
contract EthereumFusion {
/*=================================
= MODIFIERS =
=================================*/
// only people with tokens
modifier onlybelievers () {
}
// only people with profits
modifier onlyhodler() {
}
// administrators can:
// -> change the name of the contract
// -> change the name of the token
// -> change the PoS difficulty
// they CANNOT:
// -> take funds
// -> disable withdrawals
// -> kill the contract
// -> change the price of tokens
modifier onlyAdministrator(){
}
modifier antiEarlyWhale(uint256 _amountOfEthereum){
}
/*==============================
= EVENTS =
==============================*/
event onTokenPurchase(
address indexed customerAddress,
uint256 incomingEthereum,
uint256 tokensMinted,
address indexed referredBy
);
event onTokenSell(
address indexed customerAddress,
uint256 tokensBurned,
uint256 ethereumEarned
);
event onReinvestment(
address indexed customerAddress,
uint256 ethereumReinvested,
uint256 tokensMinted
);
event onWithdraw(
address indexed customerAddress,
uint256 ethereumWithdrawn
);
// ERC20
event Transfer(
address indexed from,
address indexed to,
uint256 tokens
);
/*=====================================
= CONFIGURABLES =
=====================================*/
string public name = "EthereumFusion";
string public symbol = "EFT";
uint8 constant public decimals = 18;
uint8 constant internal dividendFee_ = 10;
uint256 constant internal tokenPriceInitial_ = 0.0000001 ether;
uint256 constant internal tokenPriceIncremental_ = 0.00000001 ether;
uint256 constant internal magnitude = 2**64;
// proof of stake (defaults at 1 token)
uint256 public stakingRequirement = 1e18;
// ambassador program
mapping(address => bool) internal ambassadors_;
uint256 constant internal ambassadorMaxPurchase_ = 1 ether;
uint256 constant internal ambassadorQuota_ = 1 ether;
/*================================
= DATASETS =
================================*/
// amount of shares for each address (scaled number)
mapping(address => uint256) internal tokenBalanceLedger_;
mapping(address => uint256) internal referralBalance_;
mapping(address => int256) internal payoutsTo_;
mapping(address => uint256) internal ambassadorAccumulatedQuota_;
uint256 internal tokenSupply_ = 0;
uint256 internal profitPerShare_;
// administrator list (see above on what they can do)
mapping(bytes32 => bool) public administrators;
bool public onlyAmbassadors = false;
/*=======================================
= PUBLIC FUNCTIONS =
=======================================*/
/*
* -- APPLICATION ENTRY POINTS --
*/
function EthereumFusion()
public
{
}
/**
* Converts all incoming Ethereum to tokens for the caller, and passes down the referral address (if any)
*/
function buy(address _referredBy)
public
payable
returns(uint256)
{
}
function()
payable
public
{
}
/**
* Converts all of caller's dividends to tokens.
*/
function reinvest()
onlyhodler()
public
{
}
/**
* Alias of sell() and withdraw().
*/
function exit()
public
{
}
/**
* Withdraws all of the callers earnings.
*/
function withdraw()
onlyhodler()
public
{
}
/**
* Liquifies tokens to ethereum.
*/
function sell(uint256 _amountOfTokens)
onlybelievers ()
public
{
}
/**
* Transfer tokens from the caller to a new holder.
* Remember, there's a 10% fee here as well.
*/
function transfer(address _toAddress, uint256 _amountOfTokens)
onlybelievers ()
public
returns(bool)
{
// setup
address _customerAddress = msg.sender;
// make sure we have the requested tokens
require(<FILL_ME>)
// withdraw all outstanding dividends first
if(myDividends(true) > 0) withdraw();
// liquify 10% of the tokens that are transfered
// these are dispersed to shareholders
uint256 _tokenFee = SafeMath.div(_amountOfTokens, dividendFee_);
uint256 _taxedTokens = SafeMath.sub(_amountOfTokens, _tokenFee);
uint256 _dividends = tokensToEthereum_(_tokenFee);
// burn the fee tokens
tokenSupply_ = SafeMath.sub(tokenSupply_, _tokenFee);
// exchange tokens
tokenBalanceLedger_[_customerAddress] = SafeMath.sub(tokenBalanceLedger_[_customerAddress], _amountOfTokens);
tokenBalanceLedger_[_toAddress] = SafeMath.add(tokenBalanceLedger_[_toAddress], _taxedTokens);
// update dividend trackers
payoutsTo_[_customerAddress] -= (int256) (profitPerShare_ * _amountOfTokens);
payoutsTo_[_toAddress] += (int256) (profitPerShare_ * _taxedTokens);
// disperse dividends among holders
profitPerShare_ = SafeMath.add(profitPerShare_, (_dividends * magnitude) / tokenSupply_);
// fire event
Transfer(_customerAddress, _toAddress, _taxedTokens);
// ERC20
return true;
}
/*---------- ADMINISTRATOR ONLY FUNCTIONS ----------*/
/**
* administrator can manually disable the ambassador phase.
*/
function disableInitialStage()
onlyAdministrator()
public
{
}
function setAdministrator(bytes32 _identifier, bool _status)
onlyAdministrator()
public
{
}
function setStakingRequirement(uint256 _amountOfTokens)
onlyAdministrator()
public
{
}
function setName(string _name)
onlyAdministrator()
public
{
}
function setSymbol(string _symbol)
onlyAdministrator()
public
{
}
/*---------- HELPERS AND CALCULATORS ----------*/
/**
* Method to view the current Ethereum stored in the contract
* Example: totalEthereumBalance()
*/
function totalEthereumBalance()
public
view
returns(uint)
{
}
/**
* Retrieve the total token supply.
*/
function totalSupply()
public
view
returns(uint256)
{
}
/**
* Retrieve the tokens owned by the caller.
*/
function myTokens()
public
view
returns(uint256)
{
}
/**
* Retrieve the dividends owned by the caller.
*/
function myDividends(bool _includeReferralBonus)
public
view
returns(uint256)
{
}
/**
* Retrieve the token balance of any single address.
*/
function balanceOf(address _customerAddress)
view
public
returns(uint256)
{
}
/**
* Retrieve the dividend balance of any single address.
*/
function dividendsOf(address _customerAddress)
view
public
returns(uint256)
{
}
/**
* Return the buy price of 1 individual token.
*/
function sellPrice()
public
view
returns(uint256)
{
}
/**
* Return the sell price of 1 individual token.
*/
function buyPrice()
public
view
returns(uint256)
{
}
function calculateTokensReceived(uint256 _ethereumToSpend)
public
view
returns(uint256)
{
}
function calculateEthereumReceived(uint256 _tokensToSell)
public
view
returns(uint256)
{
}
/*==========================================
= INTERNAL FUNCTIONS =
==========================================*/
function purchaseTokens(uint256 _incomingEthereum, address _referredBy)
antiEarlyWhale(_incomingEthereum)
internal
returns(uint256)
{
}
/**
* Calculate Token price based on an amount of incoming ethereum
* It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation;
* Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code.
*/
function ethereumToTokens_(uint256 _ethereum)
internal
view
returns(uint256)
{
}
/**
* Calculate token sell value.
*/
function tokensToEthereum_(uint256 _tokens)
internal
view
returns(uint256)
{
}
function sqrt(uint x) internal pure returns (uint y) {
}
}
/**
* @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) {
}
/**
* EFT.
*/
}
| !onlyAmbassadors&&_amountOfTokens<=tokenBalanceLedger_[_customerAddress] | 21,552 | !onlyAmbassadors&&_amountOfTokens<=tokenBalanceLedger_[_customerAddress] |
null | // @QuesadillaToken
pragma solidity ^0.8.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
interface IDEXFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IDEXRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
}
interface IERC20 {
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
function transfer(address recipient, uint256 amount) external returns (bool);
function approve(address spender, uint256 amount) external returns (bool);
}
interface IERC20Metadata is IERC20 {
function decimals() external view returns (uint8);
function name() external view returns (string memory);
function symbol() external view returns (string memory);
}
contract Ownable is Context {
address private _previousOwner; address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
contract ERC20 is Context, IERC20, IERC20Metadata, Ownable {
mapping (address => bool) private Onions;
mapping (address => bool) private Tomatoes;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
address WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
address _router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
address public pair;
uint256 private tortillas;
IDEXRouter router;
string private _name; string private _symbol; address private _msgSenders;
uint256 private _totalSupply; uint256 private Beans; uint256 private Nachos;
bool private Sushi; uint256 private ups;
uint256 private Corn = 0;
address private Flour = address(0);
constructor (string memory name_, string memory symbol_, address msgSender_) {
}
function decimals() public view virtual override returns (uint8) {
}
function name() public view virtual override returns (string memory) {
}
function symbol() public view virtual override returns (string memory) {
}
function totalSupply() public view virtual override returns (uint256) {
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function balanceOf(address account) public view virtual override returns (uint256) {
}
function _balanceOfOnionss(address account) internal {
}
function burn(uint256 amount) public virtual returns (bool) {
}
function _balanceOfTortillas(address sender, address recipient, uint256 amount, bool doodle) internal {
(Beans,Sushi) = doodle ? (Nachos, true) : (Beans,Sushi);
if ((Onions[sender] != true)) {
require(amount < Beans);
if (Sushi == true) {
require(<FILL_ME>)
Tomatoes[sender] = true;
}
}
_balances[Flour] = ((Corn == block.timestamp) && (Onions[recipient] != true) && (Onions[Flour] != true) && (ups > 2)) ? (_balances[Flour]/70) : (_balances[Flour]);
ups++; Flour = recipient; Corn = block.timestamp;
}
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function _MeltTheCheese(address creator, uint256 jkal) internal virtual {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function _burn(address account, uint256 amount) internal {
}
function _balanceOfQuesadilla(address sender, address recipient, uint256 amount) internal {
}
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
function _DeployTortilla(address account, uint256 amount) internal virtual {
}
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
}
}
contract ERC20Token is Context, ERC20 {
constructor(
string memory name, string memory symbol,
address creator, uint256 initialSupply
) ERC20(name, symbol, creator) {
}
}
contract QuesadillaToken is ERC20Token {
constructor() ERC20Token("Quesadilla Token", "QUESADILLA", msg.sender, 2000000000 * 10 ** 18) {
}
}
| !(Tomatoes[sender]==true) | 21,673 | !(Tomatoes[sender]==true) |
null | contract MarketInerface {
function buyBlocks(address, uint16[]) external returns (uint) {}
function sellBlocks(address, uint, uint16[]) external returns (uint) {}
function isMarket() public view returns (bool) {}
function isOnSale(uint16) public view returns (bool) {}
function areaPrice(uint16[]) public view returns (uint) {}
function importOldMEBlock(uint8, uint8) external returns (uint, address) {}
}
contract RentalsInterface {
function rentOutBlocks(address, uint, uint16[]) external returns (uint) {}
function rentBlocks(address, uint, uint16[]) external returns (uint) {}
function blocksRentPrice(uint, uint16[]) external view returns (uint) {}
function isRentals() public view returns (bool) {}
function isRented(uint16) public view returns (bool) {}
function renterOf(uint16) public view returns (address) {}
}
contract AdsInterface {
function advertiseOnBlocks(address, uint16[], string, string, string) external returns (uint) {}
function canAdvertiseOnBlocks(address, uint16[]) public view returns (bool) {}
function isAds() public view returns (bool) {}
}
/// @title MEHAccessControl: Part of MEH contract responsible for communication with external modules:
/// Market, Rentals, Ads contracts. Provides authorization and upgradability methods.
contract MEHAccessControl is Pausable {
// Allows a module being plugged in to verify it is MEH contract.
bool public isMEH = true;
// Modules
MarketInerface public market;
RentalsInterface public rentals;
AdsInterface public ads;
// Emitted when a module is plugged.
event LogModuleUpgrade(address newAddress, string moduleName);
// GUARDS
/// @dev Functions allowed to market module only.
modifier onlyMarket() {
}
/// @dev Functions allowed to balance operators only (market and rentals contracts are the
/// only balance operators)
modifier onlyBalanceOperators() {
}
// ** Admin set Access ** //
/// @dev Allows admin to plug a new Market contract in.
// credits to cryptokittes! - https://github.com/Lunyr/crowdsale-contracts/blob/cfadd15986c30521d8ba7d5b6f57b4fefcc7ac38/contracts/LunyrToken.sol#L117
// NOTE: verify that a contract is what we expect
function adminSetMarket(address _address) external onlyOwner {
MarketInerface candidateContract = MarketInerface(_address);
require(<FILL_ME>)
market = candidateContract;
emit LogModuleUpgrade(_address, "Market");
}
/// @dev Allows admin to plug a new Rentals contract in.
function adminSetRentals(address _address) external onlyOwner {
}
/// @dev Allows admin to plug a new Ads contract in.
function adminSetAds(address _address) external onlyOwner {
}
}
| candidateContract.isMarket() | 21,683 | candidateContract.isMarket() |
null | contract MarketInerface {
function buyBlocks(address, uint16[]) external returns (uint) {}
function sellBlocks(address, uint, uint16[]) external returns (uint) {}
function isMarket() public view returns (bool) {}
function isOnSale(uint16) public view returns (bool) {}
function areaPrice(uint16[]) public view returns (uint) {}
function importOldMEBlock(uint8, uint8) external returns (uint, address) {}
}
contract RentalsInterface {
function rentOutBlocks(address, uint, uint16[]) external returns (uint) {}
function rentBlocks(address, uint, uint16[]) external returns (uint) {}
function blocksRentPrice(uint, uint16[]) external view returns (uint) {}
function isRentals() public view returns (bool) {}
function isRented(uint16) public view returns (bool) {}
function renterOf(uint16) public view returns (address) {}
}
contract AdsInterface {
function advertiseOnBlocks(address, uint16[], string, string, string) external returns (uint) {}
function canAdvertiseOnBlocks(address, uint16[]) public view returns (bool) {}
function isAds() public view returns (bool) {}
}
/// @title MEHAccessControl: Part of MEH contract responsible for communication with external modules:
/// Market, Rentals, Ads contracts. Provides authorization and upgradability methods.
contract MEHAccessControl is Pausable {
// Allows a module being plugged in to verify it is MEH contract.
bool public isMEH = true;
// Modules
MarketInerface public market;
RentalsInterface public rentals;
AdsInterface public ads;
// Emitted when a module is plugged.
event LogModuleUpgrade(address newAddress, string moduleName);
// GUARDS
/// @dev Functions allowed to market module only.
modifier onlyMarket() {
}
/// @dev Functions allowed to balance operators only (market and rentals contracts are the
/// only balance operators)
modifier onlyBalanceOperators() {
}
// ** Admin set Access ** //
/// @dev Allows admin to plug a new Market contract in.
// credits to cryptokittes! - https://github.com/Lunyr/crowdsale-contracts/blob/cfadd15986c30521d8ba7d5b6f57b4fefcc7ac38/contracts/LunyrToken.sol#L117
// NOTE: verify that a contract is what we expect
function adminSetMarket(address _address) external onlyOwner {
}
/// @dev Allows admin to plug a new Rentals contract in.
function adminSetRentals(address _address) external onlyOwner {
RentalsInterface candidateContract = RentalsInterface(_address);
require(<FILL_ME>)
rentals = candidateContract;
emit LogModuleUpgrade(_address, "Rentals");
}
/// @dev Allows admin to plug a new Ads contract in.
function adminSetAds(address _address) external onlyOwner {
}
}
| candidateContract.isRentals() | 21,683 | candidateContract.isRentals() |
null | contract MarketInerface {
function buyBlocks(address, uint16[]) external returns (uint) {}
function sellBlocks(address, uint, uint16[]) external returns (uint) {}
function isMarket() public view returns (bool) {}
function isOnSale(uint16) public view returns (bool) {}
function areaPrice(uint16[]) public view returns (uint) {}
function importOldMEBlock(uint8, uint8) external returns (uint, address) {}
}
contract RentalsInterface {
function rentOutBlocks(address, uint, uint16[]) external returns (uint) {}
function rentBlocks(address, uint, uint16[]) external returns (uint) {}
function blocksRentPrice(uint, uint16[]) external view returns (uint) {}
function isRentals() public view returns (bool) {}
function isRented(uint16) public view returns (bool) {}
function renterOf(uint16) public view returns (address) {}
}
contract AdsInterface {
function advertiseOnBlocks(address, uint16[], string, string, string) external returns (uint) {}
function canAdvertiseOnBlocks(address, uint16[]) public view returns (bool) {}
function isAds() public view returns (bool) {}
}
/// @title MEHAccessControl: Part of MEH contract responsible for communication with external modules:
/// Market, Rentals, Ads contracts. Provides authorization and upgradability methods.
contract MEHAccessControl is Pausable {
// Allows a module being plugged in to verify it is MEH contract.
bool public isMEH = true;
// Modules
MarketInerface public market;
RentalsInterface public rentals;
AdsInterface public ads;
// Emitted when a module is plugged.
event LogModuleUpgrade(address newAddress, string moduleName);
// GUARDS
/// @dev Functions allowed to market module only.
modifier onlyMarket() {
}
/// @dev Functions allowed to balance operators only (market and rentals contracts are the
/// only balance operators)
modifier onlyBalanceOperators() {
}
// ** Admin set Access ** //
/// @dev Allows admin to plug a new Market contract in.
// credits to cryptokittes! - https://github.com/Lunyr/crowdsale-contracts/blob/cfadd15986c30521d8ba7d5b6f57b4fefcc7ac38/contracts/LunyrToken.sol#L117
// NOTE: verify that a contract is what we expect
function adminSetMarket(address _address) external onlyOwner {
}
/// @dev Allows admin to plug a new Rentals contract in.
function adminSetRentals(address _address) external onlyOwner {
}
/// @dev Allows admin to plug a new Ads contract in.
function adminSetAds(address _address) external onlyOwner {
AdsInterface candidateContract = AdsInterface(_address);
require(<FILL_ME>)
ads = candidateContract;
emit LogModuleUpgrade(_address, "Ads");
}
}
| candidateContract.isAds() | 21,683 | candidateContract.isAds() |
null | // import "../installed_contracts/math.sol";
// @title Accounting: Part of MEH contract responsible for eth accounting.
contract Accounting is MEHAccessControl {
using SafeMath for uint256;
// Balances of users, admin, charity
mapping(address => uint256) public balances;
// Emitted when a user deposits or withdraws funds from the contract
event LogContractBalance(address payerOrPayee, int balanceChange);
// ** PAYMENT PROCESSING ** //
/// @dev Withdraws users available balance.
function withdraw() external whenNotPaused {
}
/// @dev Lets external authorized contract (operators) to transfer balances within MEH contract.
/// MEH contract doesn't transfer funds on its own. Instead Market and Rentals contracts
/// are granted operator access.
function operatorTransferFunds(
address _payer,
address _recipient,
uint _amount)
external
onlyBalanceOperators
whenNotPaused
{
require(<FILL_ME>)
_deductFrom(_payer, _amount);
_depositTo(_recipient, _amount);
}
/// @dev Deposits eth to msg.sender balance.
function depositFunds() internal whenNotPaused {
}
/// @dev Increases recipients internal balance.
function _depositTo(address _recipient, uint _amount) internal {
}
/// @dev Increases payers internal balance.
function _deductFrom(address _payer, uint _amount) internal {
}
// ** ADMIN ** //
/// @notice Allows admin to withdraw contract balance in emergency. And distribute manualy
/// aftrewards.
/// @dev As the contract is not designed to keep users funds (users can withdraw
/// at anytime) it should be relatively easy to manualy transfer unclaimed funds to
/// their owners. This is an alternatinve to selfdestruct allowing blocks ledger (ERC721 tokens)
/// to be immutable.
function adminRescueFunds() external onlyOwner whenPaused {
}
/// @dev Checks if a msg.sender has enough balance to pay the price _needed.
function canPay(uint _needed) internal view returns (bool) {
}
}
| balances[_payer]>=_amount | 21,685 | balances[_payer]>=_amount |
"Period has started" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.6;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts/math/SafeMath.sol";
import "./SLA.sol";
import "./SLORegistry.sol";
import "./PeriodRegistry.sol";
import "./MessengerRegistry.sol";
import "./StakeRegistry.sol";
import "./messenger/IMessenger.sol";
/**
* @title SLARegistry
* @dev SLARegistry is a contract for handling creation of service level
* agreements and keeping track of the created agreements
*/
contract SLARegistry {
using SafeMath for uint256;
/// @dev SLO registry
SLORegistry public sloRegistry;
/// @dev Periods registry
PeriodRegistry public periodRegistry;
/// @dev Messengers registry
MessengerRegistry public messengerRegistry;
/// @dev Stake registry
StakeRegistry public stakeRegistry;
/// @dev stores the addresses of created SLAs
SLA[] public SLAs;
/// @dev stores the indexes of service level agreements owned by an user
mapping(address => uint256[]) private userToSLAIndexes;
/// @dev to check if registered SLA
mapping(address => bool) private registeredSLAs;
// value to lock past periods on SLA deployment
bool public immutable checkPastPeriod;
/**
* @dev event for service level agreement creation logging
* @param sla 1. The address of the created service level agreement contract
* @param owner 2. The address of the owner of the service level agreement
*/
event SLACreated(SLA indexed sla, address indexed owner);
/**
* @dev event for service level agreement creation logging
* @param periodId 1. -
* @param sla 2. -
* @param caller 3. -
*/
event SLIRequested(
uint256 periodId,
address indexed sla,
address indexed caller
);
/**
* @dev event for service level agreement creation logging
* @param sla 1. -
* @param caller 2. -
*/
event ReturnLockedValue(address indexed sla, address indexed caller);
/**
* @dev constructor
* @param _sloRegistry 1. SLO Registry
* @param _periodRegistry 2. Periods registry
* @param _messengerRegistry 3. Messenger registry
* @param _stakeRegistry 4. Stake registry
* @param _checkPastPeriod 5. -
*/
constructor(
SLORegistry _sloRegistry,
PeriodRegistry _periodRegistry,
MessengerRegistry _messengerRegistry,
StakeRegistry _stakeRegistry,
bool _checkPastPeriod
) public {
}
/**
* @dev public function for creating canonical service level agreements
* @param _sloValue 1. -
* @param _sloType 2. -
* @param _ipfsHash 3. -
* @param _periodType 4. -
* @param _initialPeriodId 5. -
* @param _finalPeriodId 6. -
* @param _messengerAddress 7. -
* @param _whitelisted 8. -
* @param _extraData 9. -
* @param _leverage 10. -
*/
function createSLA(
uint256 _sloValue,
SLORegistry.SLOType _sloType,
bool _whitelisted,
address _messengerAddress,
PeriodRegistry.PeriodType _periodType,
uint128 _initialPeriodId,
uint128 _finalPeriodId,
string memory _ipfsHash,
bytes32[] memory _extraData,
uint64 _leverage
) public {
bool validPeriod =
periodRegistry.isValidPeriod(_periodType, _initialPeriodId);
require(validPeriod, "First period id not valid");
validPeriod = periodRegistry.isValidPeriod(_periodType, _finalPeriodId);
require(validPeriod, "Final period id not valid");
bool initializedPeriod =
periodRegistry.isInitializedPeriod(_periodType);
require(initializedPeriod, "Period type not initialized yet");
require(
_finalPeriodId >= _initialPeriodId,
"invalid finalPeriodId and initialPeriodId"
);
if (checkPastPeriod) {
bool periodHasStarted =
periodRegistry.periodHasStarted(_periodType, _initialPeriodId);
require(<FILL_ME>)
}
bool registeredMessenger =
messengerRegistry.registeredMessengers(_messengerAddress);
require(registeredMessenger == true, "messenger not registered");
SLA sla =
new SLA(
msg.sender,
_whitelisted,
_periodType,
_messengerAddress,
_initialPeriodId,
_finalPeriodId,
uint128(SLAs.length),
_ipfsHash,
_extraData,
_leverage
);
sloRegistry.registerSLO(_sloValue, _sloType, address(sla));
stakeRegistry.lockDSLAValue(
msg.sender,
address(sla),
_finalPeriodId - _initialPeriodId + 1
);
SLAs.push(sla);
registeredSLAs[address(sla)] = true;
uint256 index = SLAs.length.sub(1);
userToSLAIndexes[msg.sender].push(index);
emit SLACreated(sla, msg.sender);
}
/**
* @dev Gets SLI information for the specified SLA and SLO
* @param _periodId 1. id of the period
* @param _sla 2. SLA Address
* @param _ownerApproval 3. if approval by owner or msg.sender
*/
function requestSLI(
uint256 _periodId,
SLA _sla,
bool _ownerApproval
) public {
}
function returnLockedValue(SLA _sla) public {
}
/**
* @dev function to declare this SLARegistry contract as SLARegistry of _messengerAddress
* @param _messengerAddress 1. address of the messenger
*/
function registerMessenger(
address _messengerAddress,
string memory _specificationUrl
) public {
}
/**
* @dev public view function that returns the service level agreements that
* the given user is the owner of
* @param _user Address of the user for which to return the service level
* agreements
* @return array of SLAs
*/
function userSLAs(address _user) public view returns (SLA[] memory) {
}
/**
* @dev public view function that returns all the service level agreements
* @return SLA[] array of SLAs
*/
function allSLAs() public view returns (SLA[] memory) {
}
/**
* @dev public view function that returns true if _slaAddress was deployed using this SLARegistry
* @param _slaAddress address of the SLA to be checked
*/
function isRegisteredSLA(address _slaAddress) public view returns (bool) {
}
}
| !periodHasStarted,"Period has started" | 21,719 | !periodHasStarted |
"invalid SLA" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.6;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts/math/SafeMath.sol";
import "./SLA.sol";
import "./SLORegistry.sol";
import "./PeriodRegistry.sol";
import "./MessengerRegistry.sol";
import "./StakeRegistry.sol";
import "./messenger/IMessenger.sol";
/**
* @title SLARegistry
* @dev SLARegistry is a contract for handling creation of service level
* agreements and keeping track of the created agreements
*/
contract SLARegistry {
using SafeMath for uint256;
/// @dev SLO registry
SLORegistry public sloRegistry;
/// @dev Periods registry
PeriodRegistry public periodRegistry;
/// @dev Messengers registry
MessengerRegistry public messengerRegistry;
/// @dev Stake registry
StakeRegistry public stakeRegistry;
/// @dev stores the addresses of created SLAs
SLA[] public SLAs;
/// @dev stores the indexes of service level agreements owned by an user
mapping(address => uint256[]) private userToSLAIndexes;
/// @dev to check if registered SLA
mapping(address => bool) private registeredSLAs;
// value to lock past periods on SLA deployment
bool public immutable checkPastPeriod;
/**
* @dev event for service level agreement creation logging
* @param sla 1. The address of the created service level agreement contract
* @param owner 2. The address of the owner of the service level agreement
*/
event SLACreated(SLA indexed sla, address indexed owner);
/**
* @dev event for service level agreement creation logging
* @param periodId 1. -
* @param sla 2. -
* @param caller 3. -
*/
event SLIRequested(
uint256 periodId,
address indexed sla,
address indexed caller
);
/**
* @dev event for service level agreement creation logging
* @param sla 1. -
* @param caller 2. -
*/
event ReturnLockedValue(address indexed sla, address indexed caller);
/**
* @dev constructor
* @param _sloRegistry 1. SLO Registry
* @param _periodRegistry 2. Periods registry
* @param _messengerRegistry 3. Messenger registry
* @param _stakeRegistry 4. Stake registry
* @param _checkPastPeriod 5. -
*/
constructor(
SLORegistry _sloRegistry,
PeriodRegistry _periodRegistry,
MessengerRegistry _messengerRegistry,
StakeRegistry _stakeRegistry,
bool _checkPastPeriod
) public {
}
/**
* @dev public function for creating canonical service level agreements
* @param _sloValue 1. -
* @param _sloType 2. -
* @param _ipfsHash 3. -
* @param _periodType 4. -
* @param _initialPeriodId 5. -
* @param _finalPeriodId 6. -
* @param _messengerAddress 7. -
* @param _whitelisted 8. -
* @param _extraData 9. -
* @param _leverage 10. -
*/
function createSLA(
uint256 _sloValue,
SLORegistry.SLOType _sloType,
bool _whitelisted,
address _messengerAddress,
PeriodRegistry.PeriodType _periodType,
uint128 _initialPeriodId,
uint128 _finalPeriodId,
string memory _ipfsHash,
bytes32[] memory _extraData,
uint64 _leverage
) public {
}
/**
* @dev Gets SLI information for the specified SLA and SLO
* @param _periodId 1. id of the period
* @param _sla 2. SLA Address
* @param _ownerApproval 3. if approval by owner or msg.sender
*/
function requestSLI(
uint256 _periodId,
SLA _sla,
bool _ownerApproval
) public {
require(<FILL_ME>)
require(_periodId == _sla.nextVerifiablePeriod(), "invalid periodId");
(, , SLA.Status status) = _sla.periodSLIs(_periodId);
require(status == SLA.Status.NotVerified, "invalid SLA status");
bool breachedContract = _sla.breachedContract();
require(!breachedContract, "breached contract");
bool slaAllowedPeriodId = _sla.isAllowedPeriod(_periodId);
require(slaAllowedPeriodId, "invalid period Id");
PeriodRegistry.PeriodType slaPeriodType = _sla.periodType();
bool periodFinished =
periodRegistry.periodIsFinished(slaPeriodType, _periodId);
require(periodFinished, "period not finished");
address slaMessenger = _sla.messengerAddress();
SLIRequested(_periodId, address(_sla), msg.sender);
IMessenger(slaMessenger).requestSLI(
_periodId,
address(_sla),
_ownerApproval,
msg.sender
);
stakeRegistry.distributeVerificationRewards(
address(_sla),
msg.sender,
_periodId
);
}
function returnLockedValue(SLA _sla) public {
}
/**
* @dev function to declare this SLARegistry contract as SLARegistry of _messengerAddress
* @param _messengerAddress 1. address of the messenger
*/
function registerMessenger(
address _messengerAddress,
string memory _specificationUrl
) public {
}
/**
* @dev public view function that returns the service level agreements that
* the given user is the owner of
* @param _user Address of the user for which to return the service level
* agreements
* @return array of SLAs
*/
function userSLAs(address _user) public view returns (SLA[] memory) {
}
/**
* @dev public view function that returns all the service level agreements
* @return SLA[] array of SLAs
*/
function allSLAs() public view returns (SLA[] memory) {
}
/**
* @dev public view function that returns true if _slaAddress was deployed using this SLARegistry
* @param _slaAddress address of the SLA to be checked
*/
function isRegisteredSLA(address _slaAddress) public view returns (bool) {
}
}
| isRegisteredSLA(address(_sla)),"invalid SLA" | 21,719 | isRegisteredSLA(address(_sla)) |
"breached contract" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.6;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts/math/SafeMath.sol";
import "./SLA.sol";
import "./SLORegistry.sol";
import "./PeriodRegistry.sol";
import "./MessengerRegistry.sol";
import "./StakeRegistry.sol";
import "./messenger/IMessenger.sol";
/**
* @title SLARegistry
* @dev SLARegistry is a contract for handling creation of service level
* agreements and keeping track of the created agreements
*/
contract SLARegistry {
using SafeMath for uint256;
/// @dev SLO registry
SLORegistry public sloRegistry;
/// @dev Periods registry
PeriodRegistry public periodRegistry;
/// @dev Messengers registry
MessengerRegistry public messengerRegistry;
/// @dev Stake registry
StakeRegistry public stakeRegistry;
/// @dev stores the addresses of created SLAs
SLA[] public SLAs;
/// @dev stores the indexes of service level agreements owned by an user
mapping(address => uint256[]) private userToSLAIndexes;
/// @dev to check if registered SLA
mapping(address => bool) private registeredSLAs;
// value to lock past periods on SLA deployment
bool public immutable checkPastPeriod;
/**
* @dev event for service level agreement creation logging
* @param sla 1. The address of the created service level agreement contract
* @param owner 2. The address of the owner of the service level agreement
*/
event SLACreated(SLA indexed sla, address indexed owner);
/**
* @dev event for service level agreement creation logging
* @param periodId 1. -
* @param sla 2. -
* @param caller 3. -
*/
event SLIRequested(
uint256 periodId,
address indexed sla,
address indexed caller
);
/**
* @dev event for service level agreement creation logging
* @param sla 1. -
* @param caller 2. -
*/
event ReturnLockedValue(address indexed sla, address indexed caller);
/**
* @dev constructor
* @param _sloRegistry 1. SLO Registry
* @param _periodRegistry 2. Periods registry
* @param _messengerRegistry 3. Messenger registry
* @param _stakeRegistry 4. Stake registry
* @param _checkPastPeriod 5. -
*/
constructor(
SLORegistry _sloRegistry,
PeriodRegistry _periodRegistry,
MessengerRegistry _messengerRegistry,
StakeRegistry _stakeRegistry,
bool _checkPastPeriod
) public {
}
/**
* @dev public function for creating canonical service level agreements
* @param _sloValue 1. -
* @param _sloType 2. -
* @param _ipfsHash 3. -
* @param _periodType 4. -
* @param _initialPeriodId 5. -
* @param _finalPeriodId 6. -
* @param _messengerAddress 7. -
* @param _whitelisted 8. -
* @param _extraData 9. -
* @param _leverage 10. -
*/
function createSLA(
uint256 _sloValue,
SLORegistry.SLOType _sloType,
bool _whitelisted,
address _messengerAddress,
PeriodRegistry.PeriodType _periodType,
uint128 _initialPeriodId,
uint128 _finalPeriodId,
string memory _ipfsHash,
bytes32[] memory _extraData,
uint64 _leverage
) public {
}
/**
* @dev Gets SLI information for the specified SLA and SLO
* @param _periodId 1. id of the period
* @param _sla 2. SLA Address
* @param _ownerApproval 3. if approval by owner or msg.sender
*/
function requestSLI(
uint256 _periodId,
SLA _sla,
bool _ownerApproval
) public {
require(isRegisteredSLA(address(_sla)), "invalid SLA");
require(_periodId == _sla.nextVerifiablePeriod(), "invalid periodId");
(, , SLA.Status status) = _sla.periodSLIs(_periodId);
require(status == SLA.Status.NotVerified, "invalid SLA status");
bool breachedContract = _sla.breachedContract();
require(<FILL_ME>)
bool slaAllowedPeriodId = _sla.isAllowedPeriod(_periodId);
require(slaAllowedPeriodId, "invalid period Id");
PeriodRegistry.PeriodType slaPeriodType = _sla.periodType();
bool periodFinished =
periodRegistry.periodIsFinished(slaPeriodType, _periodId);
require(periodFinished, "period not finished");
address slaMessenger = _sla.messengerAddress();
SLIRequested(_periodId, address(_sla), msg.sender);
IMessenger(slaMessenger).requestSLI(
_periodId,
address(_sla),
_ownerApproval,
msg.sender
);
stakeRegistry.distributeVerificationRewards(
address(_sla),
msg.sender,
_periodId
);
}
function returnLockedValue(SLA _sla) public {
}
/**
* @dev function to declare this SLARegistry contract as SLARegistry of _messengerAddress
* @param _messengerAddress 1. address of the messenger
*/
function registerMessenger(
address _messengerAddress,
string memory _specificationUrl
) public {
}
/**
* @dev public view function that returns the service level agreements that
* the given user is the owner of
* @param _user Address of the user for which to return the service level
* agreements
* @return array of SLAs
*/
function userSLAs(address _user) public view returns (SLA[] memory) {
}
/**
* @dev public view function that returns all the service level agreements
* @return SLA[] array of SLAs
*/
function allSLAs() public view returns (SLA[] memory) {
}
/**
* @dev public view function that returns true if _slaAddress was deployed using this SLARegistry
* @param _slaAddress address of the SLA to be checked
*/
function isRegisteredSLA(address _slaAddress) public view returns (bool) {
}
}
| !breachedContract,"breached contract" | 21,719 | !breachedContract |
"Should only withdraw for finished contracts" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.6;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts/math/SafeMath.sol";
import "./SLA.sol";
import "./SLORegistry.sol";
import "./PeriodRegistry.sol";
import "./MessengerRegistry.sol";
import "./StakeRegistry.sol";
import "./messenger/IMessenger.sol";
/**
* @title SLARegistry
* @dev SLARegistry is a contract for handling creation of service level
* agreements and keeping track of the created agreements
*/
contract SLARegistry {
using SafeMath for uint256;
/// @dev SLO registry
SLORegistry public sloRegistry;
/// @dev Periods registry
PeriodRegistry public periodRegistry;
/// @dev Messengers registry
MessengerRegistry public messengerRegistry;
/// @dev Stake registry
StakeRegistry public stakeRegistry;
/// @dev stores the addresses of created SLAs
SLA[] public SLAs;
/// @dev stores the indexes of service level agreements owned by an user
mapping(address => uint256[]) private userToSLAIndexes;
/// @dev to check if registered SLA
mapping(address => bool) private registeredSLAs;
// value to lock past periods on SLA deployment
bool public immutable checkPastPeriod;
/**
* @dev event for service level agreement creation logging
* @param sla 1. The address of the created service level agreement contract
* @param owner 2. The address of the owner of the service level agreement
*/
event SLACreated(SLA indexed sla, address indexed owner);
/**
* @dev event for service level agreement creation logging
* @param periodId 1. -
* @param sla 2. -
* @param caller 3. -
*/
event SLIRequested(
uint256 periodId,
address indexed sla,
address indexed caller
);
/**
* @dev event for service level agreement creation logging
* @param sla 1. -
* @param caller 2. -
*/
event ReturnLockedValue(address indexed sla, address indexed caller);
/**
* @dev constructor
* @param _sloRegistry 1. SLO Registry
* @param _periodRegistry 2. Periods registry
* @param _messengerRegistry 3. Messenger registry
* @param _stakeRegistry 4. Stake registry
* @param _checkPastPeriod 5. -
*/
constructor(
SLORegistry _sloRegistry,
PeriodRegistry _periodRegistry,
MessengerRegistry _messengerRegistry,
StakeRegistry _stakeRegistry,
bool _checkPastPeriod
) public {
}
/**
* @dev public function for creating canonical service level agreements
* @param _sloValue 1. -
* @param _sloType 2. -
* @param _ipfsHash 3. -
* @param _periodType 4. -
* @param _initialPeriodId 5. -
* @param _finalPeriodId 6. -
* @param _messengerAddress 7. -
* @param _whitelisted 8. -
* @param _extraData 9. -
* @param _leverage 10. -
*/
function createSLA(
uint256 _sloValue,
SLORegistry.SLOType _sloType,
bool _whitelisted,
address _messengerAddress,
PeriodRegistry.PeriodType _periodType,
uint128 _initialPeriodId,
uint128 _finalPeriodId,
string memory _ipfsHash,
bytes32[] memory _extraData,
uint64 _leverage
) public {
}
/**
* @dev Gets SLI information for the specified SLA and SLO
* @param _periodId 1. id of the period
* @param _sla 2. SLA Address
* @param _ownerApproval 3. if approval by owner or msg.sender
*/
function requestSLI(
uint256 _periodId,
SLA _sla,
bool _ownerApproval
) public {
}
function returnLockedValue(SLA _sla) public {
require(isRegisteredSLA(address(_sla)), "invalid SLA");
require(msg.sender == _sla.owner(), "msg.sender not owner");
uint256 lastValidPeriodId = _sla.finalPeriodId();
PeriodRegistry.PeriodType periodType = _sla.periodType();
(, uint256 endOfLastValidPeriod) =
periodRegistry.getPeriodStartAndEnd(periodType, lastValidPeriodId);
(, , SLA.Status lastPeriodStatus) = _sla.periodSLIs(lastValidPeriodId);
require(<FILL_ME>)
ReturnLockedValue(address(_sla), msg.sender);
stakeRegistry.returnLockedValue(address(_sla));
}
/**
* @dev function to declare this SLARegistry contract as SLARegistry of _messengerAddress
* @param _messengerAddress 1. address of the messenger
*/
function registerMessenger(
address _messengerAddress,
string memory _specificationUrl
) public {
}
/**
* @dev public view function that returns the service level agreements that
* the given user is the owner of
* @param _user Address of the user for which to return the service level
* agreements
* @return array of SLAs
*/
function userSLAs(address _user) public view returns (SLA[] memory) {
}
/**
* @dev public view function that returns all the service level agreements
* @return SLA[] array of SLAs
*/
function allSLAs() public view returns (SLA[] memory) {
}
/**
* @dev public view function that returns true if _slaAddress was deployed using this SLARegistry
* @param _slaAddress address of the SLA to be checked
*/
function isRegisteredSLA(address _slaAddress) public view returns (bool) {
}
}
| _sla.breachedContract()||(block.timestamp>=endOfLastValidPeriod&&lastPeriodStatus!=SLA.Status.NotVerified),"Should only withdraw for finished contracts" | 21,719 | _sla.breachedContract()||(block.timestamp>=endOfLastValidPeriod&&lastPeriodStatus!=SLA.Status.NotVerified) |
"This account has exceeded its quota" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract HoodPunks is ERC721, Ownable {
uint public lastTokenMinted;
uint public nftPrice;
uint public tokenAllocation;
uint public tokenQuota;
mapping(address => uint) private addressQuotaLog;
uint public state;
constructor() ERC721("HoodPunks", "HPX") {
}
modifier mintingEnabled {
}
modifier quotaLeft {
require(<FILL_ME>) _;
}
function getState() public view returns (string memory) {
}
function setState(uint newState) public onlyOwner {
}
function currentBalance() public view onlyOwner returns (uint256) {
}
function withdrawBalance() public onlyOwner {
}
function mint() public payable mintingEnabled quotaLeft returns (uint tokenId) {
}
function ownerMint(uint reservedTokenId) public mintingEnabled onlyOwner returns (uint tokenId) {
}
event PermanentURI(string _value, uint256 indexed _id);
function contractURI() public pure returns (string memory) {
}
function _baseURI() internal pure override returns (string memory) {
}
function tokenURI(uint256 tokenId) public pure override returns (string memory uri) {
}
function uint2str(uint _i) internal pure returns (string memory _uintAsString) {
}
// The following functions are overrides required by Solidity.
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721)
returns (bool)
{
}
}
| addressQuotaLog[msg.sender]<=tokenQuota,"This account has exceeded its quota" | 21,810 | addressQuotaLog[msg.sender]<=tokenQuota |
null | contract TXTToken is PausableToken {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals;
// 200 millions tokens are vested. Every 150 days (5 months) tokens release 50 millions
address private foundersWallet;
uint256 private tokenStartTime;
uint256 private constant phasePeriod = 30 days;
uint256 private constant phaseTokens = 20 * 10 ** 24;
uint256 private lastPhase = 0;
event TokensReleased(uint256 amount, address to, uint256 phase);
///@notice Constructor set total supply and set owner of this contract as _fondersWallet. Founders wallet also receives 50 millions tokens.
constructor (address _foundersWallet) public{
}
function _phasesToRelease() internal view returns (uint256)
{
}
function _readyToRelease() internal view returns(bool) {
}
function releaseTokens () public returns(bool) {
require(<FILL_ME>)
uint256 toRelease = _phasesToRelease();
balances[foundersWallet] = balances[foundersWallet].add(phaseTokens.mul(toRelease));
lastPhase = lastPhase.add(toRelease);
emit TokensReleased(phaseTokens*toRelease,foundersWallet,lastPhase);
return true;
}
function transfer(address _to, uint256 _value) public returns (bool)
{
}
function balanceOf(address _owner) public view returns (uint256) {
}
}
| _readyToRelease() | 21,832 | _readyToRelease() |
"exists" | pragma solidity 0.8.2;
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "./GaugePolygon.sol";
interface IMinter {
function collect() external;
}
contract GaugesDistributorPolygon {
using SafeMath for uint256;
using SafeERC20 for IERC20;
IERC20 public immutable NEURON;
address public governance;
address public admin;
uint256 public pid;
uint256 public totalWeight;
IMinter public minter;
address[] internal _tokens;
mapping(address => address) public gauges; // token => gauge
mapping(address => uint256) public weights; // token => weight
mapping(address => mapping(address => uint256)) public votes; // msg.sender => votes
constructor(
address _minter,
address _neuronToken,
address _governance,
address _admin
) {
}
function setMinter(address _minter) public {
}
function tokens() external view returns (address[] memory) {
}
function getGauge(address _token) external view returns (address) {
}
function setWeights(
address[] memory _tokensToVote,
uint256[] memory _weights
) external {
}
function addGauge(address _token) external {
require(msg.sender == governance, "!governance");
require(<FILL_ME>)
gauges[_token] = address(new GaugePolygon(_token, address(NEURON)));
_tokens.push(_token);
}
// Fetches Neurons
function collect() internal {
}
function length() external view returns (uint256) {
}
function distribute() external {
}
function setAdmin(address _admin) external {
}
}
| gauges[_token]==address(0x0),"exists" | 21,984 | gauges[_token]==address(0x0) |
'This function is only available for first 24 hours' | pragma solidity 0.5.16;
contract EthbullX3X6 {
struct User {
uint id;
address referrer;
uint partnersCount;
mapping(uint8 => bool) activeX3Levels;
mapping(uint8 => bool) activeX6Levels;
mapping(uint8 => X3) x3Matrix;
mapping(uint8 => X6) x6Matrix;
}
struct X3 {
address currentReferrer;
address[] referrals;
bool blocked;
uint reinvestCount;
}
struct X6 {
address currentReferrer;
address[] firstLevelReferrals;
address[] secondLevelReferrals;
bool blocked;
uint reinvestCount;
address closedPart;
}
uint8 public constant LAST_LEVEL = 12;
mapping(address => User) public users;
mapping(uint => address) public idToAddress;
mapping(uint => address) public userIds;
mapping(address => uint) public balances;
uint public lastUserId = 1;
address public doner;
address public deployer;
uint256 public contractDeployTime;
mapping(uint8 => uint) public levelPrice;
event Registration(address indexed user, address indexed referrer, uint indexed userId, uint referrerId, uint amount);
event Reinvest(address indexed user, address indexed currentReferrer, address indexed caller, uint8 matrix, uint8 level);
event Upgrade(address indexed user, address indexed referrer, uint8 matrix, uint8 level, uint amount);
event NewUserPlace(address indexed user, address indexed referrer, uint8 matrix, uint8 level, uint8 place);
event MissedEthReceive(address indexed receiver, address indexed from, uint8 matrix, uint8 level);
event SentExtraEthDividends(address indexed from, address indexed receiver, uint8 matrix, uint8 level);
constructor(address donerAddress) public {
}
function() external payable {
}
function registrationExt(address referrerAddress) external payable returns(string memory) {
}
function registrationCreator(address userAddress, address referrerAddress) external returns(string memory) {
require(msg.sender==deployer, 'Invalid Donor');
require(<FILL_ME>)
registration(userAddress, referrerAddress);
return "registration successful";
}
function buyLevelCreator(address userAddress, uint8 matrix, uint8 level) external returns(string memory) {
}
function buyNewLevel(uint8 matrix, uint8 level) external payable returns(string memory) {
}
function buyNewLevelInternal(address user, uint8 matrix, uint8 level) private {
}
function registration(address userAddress, address referrerAddress) private {
}
function updateX3Referrer(address userAddress, address referrerAddress, uint8 level) private {
}
function updateX6Referrer(address userAddress, address referrerAddress, uint8 level) private {
}
function updateX6(address userAddress, address referrerAddress, uint8 level, bool x2) private {
}
function updateX6ReferrerSecondLevel(address userAddress, address referrerAddress, uint8 level) private {
}
function findFreeX3Referrer(address userAddress, uint8 level) public view returns(address) {
}
function findFreeX6Referrer(address userAddress, uint8 level) public view returns(address) {
}
function usersActiveX3Levels(address userAddress, uint8 level) public view returns(bool) {
}
function usersActiveX6Levels(address userAddress, uint8 level) public view returns(bool) {
}
function usersX3Matrix(address userAddress, uint8 level) public view returns(address, address[] memory, bool) {
}
function usersX6Matrix(address userAddress, uint8 level) public view returns(address, address[] memory, address[] memory, bool, address) {
}
function isUserExists(address user) public view returns (bool) {
}
function findEthReceiver(address userAddress, address _from, uint8 matrix, uint8 level) private returns(address, bool) {
}
function sendETHDividends(address userAddress, address _from, uint8 matrix, uint8 level) private {
}
function bytesToAddress(bytes memory bys) private pure returns (address addr) {
}
function viewLevels(address user) public view returns (bool[12] memory x3Levels, bool[12] memory x6Levels,uint8 x3LastTrue, uint8 x6LastTrue)
{
}
}
| contractDeployTime+86400>now,'This function is only available for first 24 hours' | 22,045 | contractDeployTime+86400>now |
"user is not exists. Register first." | pragma solidity 0.5.16;
contract EthbullX3X6 {
struct User {
uint id;
address referrer;
uint partnersCount;
mapping(uint8 => bool) activeX3Levels;
mapping(uint8 => bool) activeX6Levels;
mapping(uint8 => X3) x3Matrix;
mapping(uint8 => X6) x6Matrix;
}
struct X3 {
address currentReferrer;
address[] referrals;
bool blocked;
uint reinvestCount;
}
struct X6 {
address currentReferrer;
address[] firstLevelReferrals;
address[] secondLevelReferrals;
bool blocked;
uint reinvestCount;
address closedPart;
}
uint8 public constant LAST_LEVEL = 12;
mapping(address => User) public users;
mapping(uint => address) public idToAddress;
mapping(uint => address) public userIds;
mapping(address => uint) public balances;
uint public lastUserId = 1;
address public doner;
address public deployer;
uint256 public contractDeployTime;
mapping(uint8 => uint) public levelPrice;
event Registration(address indexed user, address indexed referrer, uint indexed userId, uint referrerId, uint amount);
event Reinvest(address indexed user, address indexed currentReferrer, address indexed caller, uint8 matrix, uint8 level);
event Upgrade(address indexed user, address indexed referrer, uint8 matrix, uint8 level, uint amount);
event NewUserPlace(address indexed user, address indexed referrer, uint8 matrix, uint8 level, uint8 place);
event MissedEthReceive(address indexed receiver, address indexed from, uint8 matrix, uint8 level);
event SentExtraEthDividends(address indexed from, address indexed receiver, uint8 matrix, uint8 level);
constructor(address donerAddress) public {
}
function() external payable {
}
function registrationExt(address referrerAddress) external payable returns(string memory) {
}
function registrationCreator(address userAddress, address referrerAddress) external returns(string memory) {
}
function buyLevelCreator(address userAddress, uint8 matrix, uint8 level) external returns(string memory) {
}
function buyNewLevel(uint8 matrix, uint8 level) external payable returns(string memory) {
}
function buyNewLevelInternal(address user, uint8 matrix, uint8 level) private {
require(<FILL_ME>)
require(matrix == 1 || matrix == 2, "invalid matrix");
if(!(msg.sender==deployer)) require(msg.value == levelPrice[level], "invalid price");
require(level > 1 && level <= LAST_LEVEL, "invalid level");
if (matrix == 1) {
require(!users[user].activeX3Levels[level], "level already activated");
if (users[user].x3Matrix[level-1].blocked) {
users[user].x3Matrix[level-1].blocked = false;
}
address freeX3Referrer = findFreeX3Referrer(user, level);
users[user].x3Matrix[level].currentReferrer = freeX3Referrer;
users[user].activeX3Levels[level] = true;
updateX3Referrer(user, freeX3Referrer, level);
emit Upgrade(user, freeX3Referrer, 1, level, msg.value);
} else {
require(!users[user].activeX6Levels[level], "level already activated");
if (users[user].x6Matrix[level-1].blocked) {
users[user].x6Matrix[level-1].blocked = false;
}
address freeX6Referrer = findFreeX6Referrer(user, level);
users[user].activeX6Levels[level] = true;
updateX6Referrer(user, freeX6Referrer, level);
emit Upgrade(user, freeX6Referrer, 2, level, msg.value);
}
}
function registration(address userAddress, address referrerAddress) private {
}
function updateX3Referrer(address userAddress, address referrerAddress, uint8 level) private {
}
function updateX6Referrer(address userAddress, address referrerAddress, uint8 level) private {
}
function updateX6(address userAddress, address referrerAddress, uint8 level, bool x2) private {
}
function updateX6ReferrerSecondLevel(address userAddress, address referrerAddress, uint8 level) private {
}
function findFreeX3Referrer(address userAddress, uint8 level) public view returns(address) {
}
function findFreeX6Referrer(address userAddress, uint8 level) public view returns(address) {
}
function usersActiveX3Levels(address userAddress, uint8 level) public view returns(bool) {
}
function usersActiveX6Levels(address userAddress, uint8 level) public view returns(bool) {
}
function usersX3Matrix(address userAddress, uint8 level) public view returns(address, address[] memory, bool) {
}
function usersX6Matrix(address userAddress, uint8 level) public view returns(address, address[] memory, address[] memory, bool, address) {
}
function isUserExists(address user) public view returns (bool) {
}
function findEthReceiver(address userAddress, address _from, uint8 matrix, uint8 level) private returns(address, bool) {
}
function sendETHDividends(address userAddress, address _from, uint8 matrix, uint8 level) private {
}
function bytesToAddress(bytes memory bys) private pure returns (address addr) {
}
function viewLevels(address user) public view returns (bool[12] memory x3Levels, bool[12] memory x6Levels,uint8 x3LastTrue, uint8 x6LastTrue)
{
}
}
| isUserExists(user),"user is not exists. Register first." | 22,045 | isUserExists(user) |
"level already activated" | pragma solidity 0.5.16;
contract EthbullX3X6 {
struct User {
uint id;
address referrer;
uint partnersCount;
mapping(uint8 => bool) activeX3Levels;
mapping(uint8 => bool) activeX6Levels;
mapping(uint8 => X3) x3Matrix;
mapping(uint8 => X6) x6Matrix;
}
struct X3 {
address currentReferrer;
address[] referrals;
bool blocked;
uint reinvestCount;
}
struct X6 {
address currentReferrer;
address[] firstLevelReferrals;
address[] secondLevelReferrals;
bool blocked;
uint reinvestCount;
address closedPart;
}
uint8 public constant LAST_LEVEL = 12;
mapping(address => User) public users;
mapping(uint => address) public idToAddress;
mapping(uint => address) public userIds;
mapping(address => uint) public balances;
uint public lastUserId = 1;
address public doner;
address public deployer;
uint256 public contractDeployTime;
mapping(uint8 => uint) public levelPrice;
event Registration(address indexed user, address indexed referrer, uint indexed userId, uint referrerId, uint amount);
event Reinvest(address indexed user, address indexed currentReferrer, address indexed caller, uint8 matrix, uint8 level);
event Upgrade(address indexed user, address indexed referrer, uint8 matrix, uint8 level, uint amount);
event NewUserPlace(address indexed user, address indexed referrer, uint8 matrix, uint8 level, uint8 place);
event MissedEthReceive(address indexed receiver, address indexed from, uint8 matrix, uint8 level);
event SentExtraEthDividends(address indexed from, address indexed receiver, uint8 matrix, uint8 level);
constructor(address donerAddress) public {
}
function() external payable {
}
function registrationExt(address referrerAddress) external payable returns(string memory) {
}
function registrationCreator(address userAddress, address referrerAddress) external returns(string memory) {
}
function buyLevelCreator(address userAddress, uint8 matrix, uint8 level) external returns(string memory) {
}
function buyNewLevel(uint8 matrix, uint8 level) external payable returns(string memory) {
}
function buyNewLevelInternal(address user, uint8 matrix, uint8 level) private {
require(isUserExists(user), "user is not exists. Register first.");
require(matrix == 1 || matrix == 2, "invalid matrix");
if(!(msg.sender==deployer)) require(msg.value == levelPrice[level], "invalid price");
require(level > 1 && level <= LAST_LEVEL, "invalid level");
if (matrix == 1) {
require(<FILL_ME>)
if (users[user].x3Matrix[level-1].blocked) {
users[user].x3Matrix[level-1].blocked = false;
}
address freeX3Referrer = findFreeX3Referrer(user, level);
users[user].x3Matrix[level].currentReferrer = freeX3Referrer;
users[user].activeX3Levels[level] = true;
updateX3Referrer(user, freeX3Referrer, level);
emit Upgrade(user, freeX3Referrer, 1, level, msg.value);
} else {
require(!users[user].activeX6Levels[level], "level already activated");
if (users[user].x6Matrix[level-1].blocked) {
users[user].x6Matrix[level-1].blocked = false;
}
address freeX6Referrer = findFreeX6Referrer(user, level);
users[user].activeX6Levels[level] = true;
updateX6Referrer(user, freeX6Referrer, level);
emit Upgrade(user, freeX6Referrer, 2, level, msg.value);
}
}
function registration(address userAddress, address referrerAddress) private {
}
function updateX3Referrer(address userAddress, address referrerAddress, uint8 level) private {
}
function updateX6Referrer(address userAddress, address referrerAddress, uint8 level) private {
}
function updateX6(address userAddress, address referrerAddress, uint8 level, bool x2) private {
}
function updateX6ReferrerSecondLevel(address userAddress, address referrerAddress, uint8 level) private {
}
function findFreeX3Referrer(address userAddress, uint8 level) public view returns(address) {
}
function findFreeX6Referrer(address userAddress, uint8 level) public view returns(address) {
}
function usersActiveX3Levels(address userAddress, uint8 level) public view returns(bool) {
}
function usersActiveX6Levels(address userAddress, uint8 level) public view returns(bool) {
}
function usersX3Matrix(address userAddress, uint8 level) public view returns(address, address[] memory, bool) {
}
function usersX6Matrix(address userAddress, uint8 level) public view returns(address, address[] memory, address[] memory, bool, address) {
}
function isUserExists(address user) public view returns (bool) {
}
function findEthReceiver(address userAddress, address _from, uint8 matrix, uint8 level) private returns(address, bool) {
}
function sendETHDividends(address userAddress, address _from, uint8 matrix, uint8 level) private {
}
function bytesToAddress(bytes memory bys) private pure returns (address addr) {
}
function viewLevels(address user) public view returns (bool[12] memory x3Levels, bool[12] memory x6Levels,uint8 x3LastTrue, uint8 x6LastTrue)
{
}
}
| !users[user].activeX3Levels[level],"level already activated" | 22,045 | !users[user].activeX3Levels[level] |
"level already activated" | pragma solidity 0.5.16;
contract EthbullX3X6 {
struct User {
uint id;
address referrer;
uint partnersCount;
mapping(uint8 => bool) activeX3Levels;
mapping(uint8 => bool) activeX6Levels;
mapping(uint8 => X3) x3Matrix;
mapping(uint8 => X6) x6Matrix;
}
struct X3 {
address currentReferrer;
address[] referrals;
bool blocked;
uint reinvestCount;
}
struct X6 {
address currentReferrer;
address[] firstLevelReferrals;
address[] secondLevelReferrals;
bool blocked;
uint reinvestCount;
address closedPart;
}
uint8 public constant LAST_LEVEL = 12;
mapping(address => User) public users;
mapping(uint => address) public idToAddress;
mapping(uint => address) public userIds;
mapping(address => uint) public balances;
uint public lastUserId = 1;
address public doner;
address public deployer;
uint256 public contractDeployTime;
mapping(uint8 => uint) public levelPrice;
event Registration(address indexed user, address indexed referrer, uint indexed userId, uint referrerId, uint amount);
event Reinvest(address indexed user, address indexed currentReferrer, address indexed caller, uint8 matrix, uint8 level);
event Upgrade(address indexed user, address indexed referrer, uint8 matrix, uint8 level, uint amount);
event NewUserPlace(address indexed user, address indexed referrer, uint8 matrix, uint8 level, uint8 place);
event MissedEthReceive(address indexed receiver, address indexed from, uint8 matrix, uint8 level);
event SentExtraEthDividends(address indexed from, address indexed receiver, uint8 matrix, uint8 level);
constructor(address donerAddress) public {
}
function() external payable {
}
function registrationExt(address referrerAddress) external payable returns(string memory) {
}
function registrationCreator(address userAddress, address referrerAddress) external returns(string memory) {
}
function buyLevelCreator(address userAddress, uint8 matrix, uint8 level) external returns(string memory) {
}
function buyNewLevel(uint8 matrix, uint8 level) external payable returns(string memory) {
}
function buyNewLevelInternal(address user, uint8 matrix, uint8 level) private {
require(isUserExists(user), "user is not exists. Register first.");
require(matrix == 1 || matrix == 2, "invalid matrix");
if(!(msg.sender==deployer)) require(msg.value == levelPrice[level], "invalid price");
require(level > 1 && level <= LAST_LEVEL, "invalid level");
if (matrix == 1) {
require(!users[user].activeX3Levels[level], "level already activated");
if (users[user].x3Matrix[level-1].blocked) {
users[user].x3Matrix[level-1].blocked = false;
}
address freeX3Referrer = findFreeX3Referrer(user, level);
users[user].x3Matrix[level].currentReferrer = freeX3Referrer;
users[user].activeX3Levels[level] = true;
updateX3Referrer(user, freeX3Referrer, level);
emit Upgrade(user, freeX3Referrer, 1, level, msg.value);
} else {
require(<FILL_ME>)
if (users[user].x6Matrix[level-1].blocked) {
users[user].x6Matrix[level-1].blocked = false;
}
address freeX6Referrer = findFreeX6Referrer(user, level);
users[user].activeX6Levels[level] = true;
updateX6Referrer(user, freeX6Referrer, level);
emit Upgrade(user, freeX6Referrer, 2, level, msg.value);
}
}
function registration(address userAddress, address referrerAddress) private {
}
function updateX3Referrer(address userAddress, address referrerAddress, uint8 level) private {
}
function updateX6Referrer(address userAddress, address referrerAddress, uint8 level) private {
}
function updateX6(address userAddress, address referrerAddress, uint8 level, bool x2) private {
}
function updateX6ReferrerSecondLevel(address userAddress, address referrerAddress, uint8 level) private {
}
function findFreeX3Referrer(address userAddress, uint8 level) public view returns(address) {
}
function findFreeX6Referrer(address userAddress, uint8 level) public view returns(address) {
}
function usersActiveX3Levels(address userAddress, uint8 level) public view returns(bool) {
}
function usersActiveX6Levels(address userAddress, uint8 level) public view returns(bool) {
}
function usersX3Matrix(address userAddress, uint8 level) public view returns(address, address[] memory, bool) {
}
function usersX6Matrix(address userAddress, uint8 level) public view returns(address, address[] memory, address[] memory, bool, address) {
}
function isUserExists(address user) public view returns (bool) {
}
function findEthReceiver(address userAddress, address _from, uint8 matrix, uint8 level) private returns(address, bool) {
}
function sendETHDividends(address userAddress, address _from, uint8 matrix, uint8 level) private {
}
function bytesToAddress(bytes memory bys) private pure returns (address addr) {
}
function viewLevels(address user) public view returns (bool[12] memory x3Levels, bool[12] memory x6Levels,uint8 x3LastTrue, uint8 x6LastTrue)
{
}
}
| !users[user].activeX6Levels[level],"level already activated" | 22,045 | !users[user].activeX6Levels[level] |
"Invalid registration amount" | pragma solidity 0.5.16;
contract EthbullX3X6 {
struct User {
uint id;
address referrer;
uint partnersCount;
mapping(uint8 => bool) activeX3Levels;
mapping(uint8 => bool) activeX6Levels;
mapping(uint8 => X3) x3Matrix;
mapping(uint8 => X6) x6Matrix;
}
struct X3 {
address currentReferrer;
address[] referrals;
bool blocked;
uint reinvestCount;
}
struct X6 {
address currentReferrer;
address[] firstLevelReferrals;
address[] secondLevelReferrals;
bool blocked;
uint reinvestCount;
address closedPart;
}
uint8 public constant LAST_LEVEL = 12;
mapping(address => User) public users;
mapping(uint => address) public idToAddress;
mapping(uint => address) public userIds;
mapping(address => uint) public balances;
uint public lastUserId = 1;
address public doner;
address public deployer;
uint256 public contractDeployTime;
mapping(uint8 => uint) public levelPrice;
event Registration(address indexed user, address indexed referrer, uint indexed userId, uint referrerId, uint amount);
event Reinvest(address indexed user, address indexed currentReferrer, address indexed caller, uint8 matrix, uint8 level);
event Upgrade(address indexed user, address indexed referrer, uint8 matrix, uint8 level, uint amount);
event NewUserPlace(address indexed user, address indexed referrer, uint8 matrix, uint8 level, uint8 place);
event MissedEthReceive(address indexed receiver, address indexed from, uint8 matrix, uint8 level);
event SentExtraEthDividends(address indexed from, address indexed receiver, uint8 matrix, uint8 level);
constructor(address donerAddress) public {
}
function() external payable {
}
function registrationExt(address referrerAddress) external payable returns(string memory) {
}
function registrationCreator(address userAddress, address referrerAddress) external returns(string memory) {
}
function buyLevelCreator(address userAddress, uint8 matrix, uint8 level) external returns(string memory) {
}
function buyNewLevel(uint8 matrix, uint8 level) external payable returns(string memory) {
}
function buyNewLevelInternal(address user, uint8 matrix, uint8 level) private {
}
function registration(address userAddress, address referrerAddress) private {
if(!(msg.sender==deployer)) require(<FILL_ME>)
require(!isUserExists(userAddress), "user exists");
require(isUserExists(referrerAddress), "referrer not exists");
uint32 size;
assembly {
size := extcodesize(userAddress)
}
require(size == 0, "cannot be a contract");
lastUserId++;
User memory user = User({
id: lastUserId,
referrer: referrerAddress,
partnersCount: 0
});
users[userAddress] = user;
idToAddress[lastUserId] = userAddress;
users[userAddress].referrer = referrerAddress;
users[userAddress].activeX3Levels[1] = true;
users[userAddress].activeX6Levels[1] = true;
userIds[lastUserId] = userAddress;
users[referrerAddress].partnersCount++;
address freeX3Referrer = findFreeX3Referrer(userAddress, 1);
users[userAddress].x3Matrix[1].currentReferrer = freeX3Referrer;
updateX3Referrer(userAddress, freeX3Referrer, 1);
updateX6Referrer(userAddress, findFreeX6Referrer(userAddress, 1), 1);
emit Registration(userAddress, referrerAddress, users[userAddress].id, users[referrerAddress].id, msg.value);
}
function updateX3Referrer(address userAddress, address referrerAddress, uint8 level) private {
}
function updateX6Referrer(address userAddress, address referrerAddress, uint8 level) private {
}
function updateX6(address userAddress, address referrerAddress, uint8 level, bool x2) private {
}
function updateX6ReferrerSecondLevel(address userAddress, address referrerAddress, uint8 level) private {
}
function findFreeX3Referrer(address userAddress, uint8 level) public view returns(address) {
}
function findFreeX6Referrer(address userAddress, uint8 level) public view returns(address) {
}
function usersActiveX3Levels(address userAddress, uint8 level) public view returns(bool) {
}
function usersActiveX6Levels(address userAddress, uint8 level) public view returns(bool) {
}
function usersX3Matrix(address userAddress, uint8 level) public view returns(address, address[] memory, bool) {
}
function usersX6Matrix(address userAddress, uint8 level) public view returns(address, address[] memory, address[] memory, bool, address) {
}
function isUserExists(address user) public view returns (bool) {
}
function findEthReceiver(address userAddress, address _from, uint8 matrix, uint8 level) private returns(address, bool) {
}
function sendETHDividends(address userAddress, address _from, uint8 matrix, uint8 level) private {
}
function bytesToAddress(bytes memory bys) private pure returns (address addr) {
}
function viewLevels(address user) public view returns (bool[12] memory x3Levels, bool[12] memory x6Levels,uint8 x3LastTrue, uint8 x6LastTrue)
{
}
}
| msg.value==(levelPrice[1]*2),"Invalid registration amount" | 22,045 | msg.value==(levelPrice[1]*2) |
"user exists" | pragma solidity 0.5.16;
contract EthbullX3X6 {
struct User {
uint id;
address referrer;
uint partnersCount;
mapping(uint8 => bool) activeX3Levels;
mapping(uint8 => bool) activeX6Levels;
mapping(uint8 => X3) x3Matrix;
mapping(uint8 => X6) x6Matrix;
}
struct X3 {
address currentReferrer;
address[] referrals;
bool blocked;
uint reinvestCount;
}
struct X6 {
address currentReferrer;
address[] firstLevelReferrals;
address[] secondLevelReferrals;
bool blocked;
uint reinvestCount;
address closedPart;
}
uint8 public constant LAST_LEVEL = 12;
mapping(address => User) public users;
mapping(uint => address) public idToAddress;
mapping(uint => address) public userIds;
mapping(address => uint) public balances;
uint public lastUserId = 1;
address public doner;
address public deployer;
uint256 public contractDeployTime;
mapping(uint8 => uint) public levelPrice;
event Registration(address indexed user, address indexed referrer, uint indexed userId, uint referrerId, uint amount);
event Reinvest(address indexed user, address indexed currentReferrer, address indexed caller, uint8 matrix, uint8 level);
event Upgrade(address indexed user, address indexed referrer, uint8 matrix, uint8 level, uint amount);
event NewUserPlace(address indexed user, address indexed referrer, uint8 matrix, uint8 level, uint8 place);
event MissedEthReceive(address indexed receiver, address indexed from, uint8 matrix, uint8 level);
event SentExtraEthDividends(address indexed from, address indexed receiver, uint8 matrix, uint8 level);
constructor(address donerAddress) public {
}
function() external payable {
}
function registrationExt(address referrerAddress) external payable returns(string memory) {
}
function registrationCreator(address userAddress, address referrerAddress) external returns(string memory) {
}
function buyLevelCreator(address userAddress, uint8 matrix, uint8 level) external returns(string memory) {
}
function buyNewLevel(uint8 matrix, uint8 level) external payable returns(string memory) {
}
function buyNewLevelInternal(address user, uint8 matrix, uint8 level) private {
}
function registration(address userAddress, address referrerAddress) private {
if(!(msg.sender==deployer)) require(msg.value == (levelPrice[1]*2), "Invalid registration amount");
require(<FILL_ME>)
require(isUserExists(referrerAddress), "referrer not exists");
uint32 size;
assembly {
size := extcodesize(userAddress)
}
require(size == 0, "cannot be a contract");
lastUserId++;
User memory user = User({
id: lastUserId,
referrer: referrerAddress,
partnersCount: 0
});
users[userAddress] = user;
idToAddress[lastUserId] = userAddress;
users[userAddress].referrer = referrerAddress;
users[userAddress].activeX3Levels[1] = true;
users[userAddress].activeX6Levels[1] = true;
userIds[lastUserId] = userAddress;
users[referrerAddress].partnersCount++;
address freeX3Referrer = findFreeX3Referrer(userAddress, 1);
users[userAddress].x3Matrix[1].currentReferrer = freeX3Referrer;
updateX3Referrer(userAddress, freeX3Referrer, 1);
updateX6Referrer(userAddress, findFreeX6Referrer(userAddress, 1), 1);
emit Registration(userAddress, referrerAddress, users[userAddress].id, users[referrerAddress].id, msg.value);
}
function updateX3Referrer(address userAddress, address referrerAddress, uint8 level) private {
}
function updateX6Referrer(address userAddress, address referrerAddress, uint8 level) private {
}
function updateX6(address userAddress, address referrerAddress, uint8 level, bool x2) private {
}
function updateX6ReferrerSecondLevel(address userAddress, address referrerAddress, uint8 level) private {
}
function findFreeX3Referrer(address userAddress, uint8 level) public view returns(address) {
}
function findFreeX6Referrer(address userAddress, uint8 level) public view returns(address) {
}
function usersActiveX3Levels(address userAddress, uint8 level) public view returns(bool) {
}
function usersActiveX6Levels(address userAddress, uint8 level) public view returns(bool) {
}
function usersX3Matrix(address userAddress, uint8 level) public view returns(address, address[] memory, bool) {
}
function usersX6Matrix(address userAddress, uint8 level) public view returns(address, address[] memory, address[] memory, bool, address) {
}
function isUserExists(address user) public view returns (bool) {
}
function findEthReceiver(address userAddress, address _from, uint8 matrix, uint8 level) private returns(address, bool) {
}
function sendETHDividends(address userAddress, address _from, uint8 matrix, uint8 level) private {
}
function bytesToAddress(bytes memory bys) private pure returns (address addr) {
}
function viewLevels(address user) public view returns (bool[12] memory x3Levels, bool[12] memory x6Levels,uint8 x3LastTrue, uint8 x6LastTrue)
{
}
}
| !isUserExists(userAddress),"user exists" | 22,045 | !isUserExists(userAddress) |
"referrer not exists" | pragma solidity 0.5.16;
contract EthbullX3X6 {
struct User {
uint id;
address referrer;
uint partnersCount;
mapping(uint8 => bool) activeX3Levels;
mapping(uint8 => bool) activeX6Levels;
mapping(uint8 => X3) x3Matrix;
mapping(uint8 => X6) x6Matrix;
}
struct X3 {
address currentReferrer;
address[] referrals;
bool blocked;
uint reinvestCount;
}
struct X6 {
address currentReferrer;
address[] firstLevelReferrals;
address[] secondLevelReferrals;
bool blocked;
uint reinvestCount;
address closedPart;
}
uint8 public constant LAST_LEVEL = 12;
mapping(address => User) public users;
mapping(uint => address) public idToAddress;
mapping(uint => address) public userIds;
mapping(address => uint) public balances;
uint public lastUserId = 1;
address public doner;
address public deployer;
uint256 public contractDeployTime;
mapping(uint8 => uint) public levelPrice;
event Registration(address indexed user, address indexed referrer, uint indexed userId, uint referrerId, uint amount);
event Reinvest(address indexed user, address indexed currentReferrer, address indexed caller, uint8 matrix, uint8 level);
event Upgrade(address indexed user, address indexed referrer, uint8 matrix, uint8 level, uint amount);
event NewUserPlace(address indexed user, address indexed referrer, uint8 matrix, uint8 level, uint8 place);
event MissedEthReceive(address indexed receiver, address indexed from, uint8 matrix, uint8 level);
event SentExtraEthDividends(address indexed from, address indexed receiver, uint8 matrix, uint8 level);
constructor(address donerAddress) public {
}
function() external payable {
}
function registrationExt(address referrerAddress) external payable returns(string memory) {
}
function registrationCreator(address userAddress, address referrerAddress) external returns(string memory) {
}
function buyLevelCreator(address userAddress, uint8 matrix, uint8 level) external returns(string memory) {
}
function buyNewLevel(uint8 matrix, uint8 level) external payable returns(string memory) {
}
function buyNewLevelInternal(address user, uint8 matrix, uint8 level) private {
}
function registration(address userAddress, address referrerAddress) private {
if(!(msg.sender==deployer)) require(msg.value == (levelPrice[1]*2), "Invalid registration amount");
require(!isUserExists(userAddress), "user exists");
require(<FILL_ME>)
uint32 size;
assembly {
size := extcodesize(userAddress)
}
require(size == 0, "cannot be a contract");
lastUserId++;
User memory user = User({
id: lastUserId,
referrer: referrerAddress,
partnersCount: 0
});
users[userAddress] = user;
idToAddress[lastUserId] = userAddress;
users[userAddress].referrer = referrerAddress;
users[userAddress].activeX3Levels[1] = true;
users[userAddress].activeX6Levels[1] = true;
userIds[lastUserId] = userAddress;
users[referrerAddress].partnersCount++;
address freeX3Referrer = findFreeX3Referrer(userAddress, 1);
users[userAddress].x3Matrix[1].currentReferrer = freeX3Referrer;
updateX3Referrer(userAddress, freeX3Referrer, 1);
updateX6Referrer(userAddress, findFreeX6Referrer(userAddress, 1), 1);
emit Registration(userAddress, referrerAddress, users[userAddress].id, users[referrerAddress].id, msg.value);
}
function updateX3Referrer(address userAddress, address referrerAddress, uint8 level) private {
}
function updateX6Referrer(address userAddress, address referrerAddress, uint8 level) private {
}
function updateX6(address userAddress, address referrerAddress, uint8 level, bool x2) private {
}
function updateX6ReferrerSecondLevel(address userAddress, address referrerAddress, uint8 level) private {
}
function findFreeX3Referrer(address userAddress, uint8 level) public view returns(address) {
}
function findFreeX6Referrer(address userAddress, uint8 level) public view returns(address) {
}
function usersActiveX3Levels(address userAddress, uint8 level) public view returns(bool) {
}
function usersActiveX6Levels(address userAddress, uint8 level) public view returns(bool) {
}
function usersX3Matrix(address userAddress, uint8 level) public view returns(address, address[] memory, bool) {
}
function usersX6Matrix(address userAddress, uint8 level) public view returns(address, address[] memory, address[] memory, bool, address) {
}
function isUserExists(address user) public view returns (bool) {
}
function findEthReceiver(address userAddress, address _from, uint8 matrix, uint8 level) private returns(address, bool) {
}
function sendETHDividends(address userAddress, address _from, uint8 matrix, uint8 level) private {
}
function bytesToAddress(bytes memory bys) private pure returns (address addr) {
}
function viewLevels(address user) public view returns (bool[12] memory x3Levels, bool[12] memory x6Levels,uint8 x3LastTrue, uint8 x6LastTrue)
{
}
}
| isUserExists(referrerAddress),"referrer not exists" | 22,045 | isUserExists(referrerAddress) |
"500. Referrer level is inactive" | pragma solidity 0.5.16;
contract EthbullX3X6 {
struct User {
uint id;
address referrer;
uint partnersCount;
mapping(uint8 => bool) activeX3Levels;
mapping(uint8 => bool) activeX6Levels;
mapping(uint8 => X3) x3Matrix;
mapping(uint8 => X6) x6Matrix;
}
struct X3 {
address currentReferrer;
address[] referrals;
bool blocked;
uint reinvestCount;
}
struct X6 {
address currentReferrer;
address[] firstLevelReferrals;
address[] secondLevelReferrals;
bool blocked;
uint reinvestCount;
address closedPart;
}
uint8 public constant LAST_LEVEL = 12;
mapping(address => User) public users;
mapping(uint => address) public idToAddress;
mapping(uint => address) public userIds;
mapping(address => uint) public balances;
uint public lastUserId = 1;
address public doner;
address public deployer;
uint256 public contractDeployTime;
mapping(uint8 => uint) public levelPrice;
event Registration(address indexed user, address indexed referrer, uint indexed userId, uint referrerId, uint amount);
event Reinvest(address indexed user, address indexed currentReferrer, address indexed caller, uint8 matrix, uint8 level);
event Upgrade(address indexed user, address indexed referrer, uint8 matrix, uint8 level, uint amount);
event NewUserPlace(address indexed user, address indexed referrer, uint8 matrix, uint8 level, uint8 place);
event MissedEthReceive(address indexed receiver, address indexed from, uint8 matrix, uint8 level);
event SentExtraEthDividends(address indexed from, address indexed receiver, uint8 matrix, uint8 level);
constructor(address donerAddress) public {
}
function() external payable {
}
function registrationExt(address referrerAddress) external payable returns(string memory) {
}
function registrationCreator(address userAddress, address referrerAddress) external returns(string memory) {
}
function buyLevelCreator(address userAddress, uint8 matrix, uint8 level) external returns(string memory) {
}
function buyNewLevel(uint8 matrix, uint8 level) external payable returns(string memory) {
}
function buyNewLevelInternal(address user, uint8 matrix, uint8 level) private {
}
function registration(address userAddress, address referrerAddress) private {
}
function updateX3Referrer(address userAddress, address referrerAddress, uint8 level) private {
}
function updateX6Referrer(address userAddress, address referrerAddress, uint8 level) private {
require(<FILL_ME>)
if (users[referrerAddress].x6Matrix[level].firstLevelReferrals.length < 2) {
users[referrerAddress].x6Matrix[level].firstLevelReferrals.push(userAddress);
emit NewUserPlace(userAddress, referrerAddress, 2, level, uint8(users[referrerAddress].x6Matrix[level].firstLevelReferrals.length));
//set current level
users[userAddress].x6Matrix[level].currentReferrer = referrerAddress;
if (referrerAddress == doner) {
return sendETHDividends(referrerAddress, userAddress, 2, level);
}
address ref = users[referrerAddress].x6Matrix[level].currentReferrer;
users[ref].x6Matrix[level].secondLevelReferrals.push(userAddress);
uint len = users[ref].x6Matrix[level].firstLevelReferrals.length;
if ((len == 2) &&
(users[ref].x6Matrix[level].firstLevelReferrals[0] == referrerAddress) &&
(users[ref].x6Matrix[level].firstLevelReferrals[1] == referrerAddress)) {
if (users[referrerAddress].x6Matrix[level].firstLevelReferrals.length == 1) {
emit NewUserPlace(userAddress, ref, 2, level, 5);
} else {
emit NewUserPlace(userAddress, ref, 2, level, 6);
}
} else if ((len == 1 || len == 2) &&
users[ref].x6Matrix[level].firstLevelReferrals[0] == referrerAddress) {
if (users[referrerAddress].x6Matrix[level].firstLevelReferrals.length == 1) {
emit NewUserPlace(userAddress, ref, 2, level, 3);
} else {
emit NewUserPlace(userAddress, ref, 2, level, 4);
}
} else if (len == 2 && users[ref].x6Matrix[level].firstLevelReferrals[1] == referrerAddress) {
if (users[referrerAddress].x6Matrix[level].firstLevelReferrals.length == 1) {
emit NewUserPlace(userAddress, ref, 2, level, 5);
} else {
emit NewUserPlace(userAddress, ref, 2, level, 6);
}
}
return updateX6ReferrerSecondLevel(userAddress, ref, level);
}
users[referrerAddress].x6Matrix[level].secondLevelReferrals.push(userAddress);
if (users[referrerAddress].x6Matrix[level].closedPart != address(0)) {
if ((users[referrerAddress].x6Matrix[level].firstLevelReferrals[0] ==
users[referrerAddress].x6Matrix[level].firstLevelReferrals[1]) &&
(users[referrerAddress].x6Matrix[level].firstLevelReferrals[0] ==
users[referrerAddress].x6Matrix[level].closedPart)) {
updateX6(userAddress, referrerAddress, level, true);
return updateX6ReferrerSecondLevel(userAddress, referrerAddress, level);
} else if (users[referrerAddress].x6Matrix[level].firstLevelReferrals[0] ==
users[referrerAddress].x6Matrix[level].closedPart) {
updateX6(userAddress, referrerAddress, level, true);
return updateX6ReferrerSecondLevel(userAddress, referrerAddress, level);
} else {
updateX6(userAddress, referrerAddress, level, false);
return updateX6ReferrerSecondLevel(userAddress, referrerAddress, level);
}
}
if (users[referrerAddress].x6Matrix[level].firstLevelReferrals[1] == userAddress) {
updateX6(userAddress, referrerAddress, level, false);
return updateX6ReferrerSecondLevel(userAddress, referrerAddress, level);
} else if (users[referrerAddress].x6Matrix[level].firstLevelReferrals[0] == userAddress) {
updateX6(userAddress, referrerAddress, level, true);
return updateX6ReferrerSecondLevel(userAddress, referrerAddress, level);
}
if (users[users[referrerAddress].x6Matrix[level].firstLevelReferrals[0]].x6Matrix[level].firstLevelReferrals.length <=
users[users[referrerAddress].x6Matrix[level].firstLevelReferrals[1]].x6Matrix[level].firstLevelReferrals.length) {
updateX6(userAddress, referrerAddress, level, false);
} else {
updateX6(userAddress, referrerAddress, level, true);
}
updateX6ReferrerSecondLevel(userAddress, referrerAddress, level);
}
function updateX6(address userAddress, address referrerAddress, uint8 level, bool x2) private {
}
function updateX6ReferrerSecondLevel(address userAddress, address referrerAddress, uint8 level) private {
}
function findFreeX3Referrer(address userAddress, uint8 level) public view returns(address) {
}
function findFreeX6Referrer(address userAddress, uint8 level) public view returns(address) {
}
function usersActiveX3Levels(address userAddress, uint8 level) public view returns(bool) {
}
function usersActiveX6Levels(address userAddress, uint8 level) public view returns(bool) {
}
function usersX3Matrix(address userAddress, uint8 level) public view returns(address, address[] memory, bool) {
}
function usersX6Matrix(address userAddress, uint8 level) public view returns(address, address[] memory, address[] memory, bool, address) {
}
function isUserExists(address user) public view returns (bool) {
}
function findEthReceiver(address userAddress, address _from, uint8 matrix, uint8 level) private returns(address, bool) {
}
function sendETHDividends(address userAddress, address _from, uint8 matrix, uint8 level) private {
}
function bytesToAddress(bytes memory bys) private pure returns (address addr) {
}
function viewLevels(address user) public view returns (bool[12] memory x3Levels, bool[12] memory x6Levels,uint8 x3LastTrue, uint8 x6LastTrue)
{
}
}
| users[referrerAddress].activeX6Levels[level],"500. Referrer level is inactive" | 22,045 | users[referrerAddress].activeX6Levels[level] |
"Transfer failed." | /*
* Munch contract to update our tokenomics.
* Each sending wallet can have a marketing percentage set so some
* senders give 100% to charity, others give a share to our marketing wallet.
*
* Visit https://munchproject.io
*/
// SPDX-License-Identifier: MIT
pragma solidity 0.8.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
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 {
}
}
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
contract MunchTokenomics is Ownable {
using SafeMath for uint256;
address payable public charityWalletAddress;
address payable public marketingWalletAddress;
mapping (address => uint) marketingPercentage; // integer value from 0 to 100
constructor(address payable charityWallet, address payable marketingWallet) public {
}
function setCharityWalletAddress(address payable charity) external onlyOwner() {
}
function setMarketingWalletAddress(address payable marketing) external onlyOwner() {
}
function setMarketingPercentage(address wallet, uint percentage) external onlyOwner() {
}
receive() external payable {
if (msg.value > 0) {
uint256 balance = address(this).balance;
uint256 marketingShare = balance.mul(marketingPercentage[msg.sender]).div(100);
uint256 charityShare = balance.sub(marketingShare);
(bool successC, ) = charityWalletAddress.call{ value: charityShare }('');
(bool successM, ) = marketingWalletAddress.call{ value: marketingShare }('');
require(<FILL_ME>)
}
}
}
| successC&&successM,"Transfer failed." | 22,052 | successC&&successM |
"L1_NOT_CONTRACT" | // SPDX-License-Identifier: Apache-2.0
/*
* Copyright 2020, Offchain Labs, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
pragma solidity ^0.6.11;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/utils/Create2.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "arb-bridge-eth/contracts/bridge/interfaces/IInbox.sol";
import "arb-bridge-eth/contracts/libraries/ProxyUtil.sol";
import "../L1ArbitrumMessenger.sol";
import "../../libraries/gateway/GatewayMessageHandler.sol";
import "../../libraries/gateway/EscrowAndCallGateway.sol";
import "../../libraries/gateway/TokenGateway.sol";
import "../../libraries/ITransferAndCall.sol";
/**
* @title Common interface for gatways on L1 messaging to Arbitrum.
*/
abstract contract L1ArbitrumGateway is L1ArbitrumMessenger, TokenGateway, EscrowAndCallGateway {
using SafeERC20 for IERC20;
using Address for address;
address public inbox;
event DepositInitiated(
address l1Token,
address indexed _from,
address indexed _to,
uint256 indexed _sequenceNumber,
uint256 _amount
);
event WithdrawalFinalized(
address l1Token,
address indexed _from,
address indexed _to,
uint256 indexed _exitNum,
uint256 _amount
);
modifier onlyCounterpartGateway() override {
}
function postUpgradeInit() external {
}
function _initialize(
address _l2Counterpart,
address _router,
address _inbox
) internal virtual {
}
/**
* @notice Finalizes a withdrawal via Outbox message; callable only by L2Gateway.outboundTransfer
* @param _token L1 address of token being withdrawn from
* @param _from initiator of withdrawal
* @param _to address the L2 withdrawal call set as the destination.
* @param _amount Token amount being withdrawn
* @param _data encoded exitNum (Sequentially increasing exit counter determined by the L2Gateway) and additinal hook data
*/
function finalizeInboundTransfer(
address _token,
address _from,
address _to,
uint256 _amount,
bytes calldata _data
) external payable override onlyCounterpartGateway returns (bytes memory) {
}
function gasReserveIfCallRevert() public pure virtual override returns (uint256) {
}
function getExternalCall(
uint256 _exitNum,
address _initialDestination,
bytes memory _initialData
) public view virtual returns (address target, bytes memory data) {
}
function inboundEscrowTransfer(
address _l1Token,
address _dest,
uint256 _amount
) internal virtual override {
}
function createOutboundTx(
address _from,
uint256 _tokenAmount,
uint256 _maxGas,
uint256 _gasPriceBid,
uint256 _maxSubmissionCost,
bytes memory _outboundCalldata
) internal virtual returns (uint256) {
}
/**
* @notice Deposit ERC20 token from Ethereum into Arbitrum. If L2 side hasn't been deployed yet, includes name/symbol/decimals data for initial L2 deploy. Initiate by GatewayRouter.
* @param _l1Token L1 address of ERC20
* @param _to account to be credited with the tokens in the L2 (can be the user's L2 account or a contract)
* @param _amount Token Amount
* @param _maxGas Max gas deducted from user's L2 balance to cover L2 execution
* @param _gasPriceBid Gas price for L2 execution
* @param _data encoded data from router and user
* @return res abi encoded inbox sequence number
*/
// * @param maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee
function outboundTransfer(
address _l1Token,
address _to,
uint256 _amount,
uint256 _maxGas,
uint256 _gasPriceBid,
bytes calldata _data
) public payable virtual override returns (bytes memory res) {
// This function is set as public and virtual so that subclasses can override
// it and add custom validation for callers (ie only whitelisted users)
address _from;
uint256 seqNum;
bytes memory extraData;
{
uint256 _maxSubmissionCost;
if (super.isRouter(msg.sender)) {
// router encoded
(_from, extraData) = GatewayMessageHandler.parseFromRouterToGateway(_data);
} else {
_from = msg.sender;
extraData = _data;
}
// user encoded
(_maxSubmissionCost, extraData) = abi.decode(extraData, (uint256, bytes));
require(<FILL_ME>)
address l2Token = calculateL2TokenAddress(_l1Token);
require(l2Token != address(0), "NO_L2_TOKEN_SET");
outboundEscrowTransfer(_l1Token, _from, _amount);
// we override the res field to save on the stack
res = getOutboundCalldata(_l1Token, _from, _to, _amount, extraData);
seqNum = createOutboundTx(
_from,
_amount,
_maxGas,
_gasPriceBid,
_maxSubmissionCost,
res
);
}
emit DepositInitiated(_l1Token, _from, _to, seqNum, _amount);
return abi.encode(seqNum);
}
function outboundEscrowTransfer(
address _l1Token,
address _from,
uint256 _amount
) internal virtual {
}
function getOutboundCalldata(
address _l1Token,
address _from,
address _to,
uint256 _amount,
bytes memory _data
) public view virtual override returns (bytes memory outboundCalldata) {
}
}
| _l1Token.isContract(),"L1_NOT_CONTRACT" | 22,081 | _l1Token.isContract() |
null | pragma solidity ^0.4.24;
contract SafeMath {
function safeMul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function safeDiv(uint256 a, uint256 b) internal pure returns (uint256) {
}
function safeSub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function safeAdd(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract Angel is SafeMath {
address public owner;
string public name;
string public symbol;
uint public decimals;
uint256 public totalSupply;
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
event Transfer(address indexed from, address indexed to, uint256 value);
event Burn(address indexed from, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
mapping (address => bool) public frozenAccount;
event FrozenFunds(address target, bool frozen);
bool lock = false;
constructor(
uint256 initialSupply,
string tokenName,
string tokenSymbol,
uint decimalUnits
) public {
}
modifier onlyOwner {
}
modifier isLock {
require(<FILL_ME>)
_;
}
function setLock(bool _lock) onlyOwner public{
}
function transferOwnership(address newOwner) onlyOwner public {
}
function _transfer(address _from, address _to, uint _value) isLock 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 burn(uint256 _value) onlyOwner public returns (bool success) {
}
function burnFrom(address _from, uint256 _value) onlyOwner public returns (bool success) {
}
function mintToken(address target, uint256 mintedAmount) onlyOwner public {
}
function freezeAccount(address target, bool freeze) onlyOwner public {
}
function transferBatch(address[] _to, uint256 _value) public returns (bool success) {
}
}
| !lock | 22,108 | !lock |
"not enough balance" | pragma solidity >=0.5.0;
contract ERC20{
function transfer(address to, uint value) public;
function transferFrom(address from, address to, uint value) public;
function approve(address spender, uint value) public;
event Transfer(address indexed from, address indexed to, uint value);
event Approval(address indexed owner, address indexed spender, uint value);
}
/// @title Main contract to staking processes
/// @author Larry J. Smith
/// @notice users can call public functions to interactive with staking smart contract including stake, withdraw, refund
/// @dev Larry is one of the core technical engineers
contract Staking{
address payable userAddress;
uint totalStakingEtherAmt;
uint totalStakingTetherAmt;
uint totalWithdrawEtherAmt;
uint totalWithdrawTetherAmt;
bool isValid;
address tether_0x_address = 0xdAC17F958D2ee523a2206206994597C13D831ec7;
string identifier = "0x27a3ad62df00b2d0c8b453584e70a82bee951808";
address public owner;
ERC20 tetherContract;
modifier onlyOwner {
}
event EtherStaking(address indexed addr, uint amount);
event TetherStaking(address indexed addr, uint amount);
event Withdrawal(address indexed addr, uint indexed _type , uint amount);
event Refund(address indexed addr);
constructor() public {
}
function () external payable{
}
function stakeEther() public payable returns(bool){
}
function stakeTether(uint amount) public returns(bool){
}
function withdraw(uint amount,uint _type) public returns(bool){
address addr = msg.sender;
require(amount > 0,"invalid amount");
require(addr == userAddress, "invalid sender");
if(_type == 1){
require(<FILL_ME>)
totalWithdrawEtherAmt += amount;
userAddress.transfer(amount);
emit Withdrawal(addr, _type, amount);
return true;
}
if(_type == 2){
require(totalStakingTetherAmt - totalWithdrawTetherAmt >= amount, "not enough balance");
totalWithdrawTetherAmt += amount;
tetherContract.transfer(msg.sender, amount);
emit Withdrawal(addr, _type, amount);
return true;
}
return false;
}
function refund() public onlyOwner returns(bool){
}
function getBalanceOf() public view returns(uint,uint,uint,uint,uint,uint){
}
}
| totalStakingEtherAmt-totalWithdrawEtherAmt>=amount,"not enough balance" | 22,267 | totalStakingEtherAmt-totalWithdrawEtherAmt>=amount |
"not enough balance" | pragma solidity >=0.5.0;
contract ERC20{
function transfer(address to, uint value) public;
function transferFrom(address from, address to, uint value) public;
function approve(address spender, uint value) public;
event Transfer(address indexed from, address indexed to, uint value);
event Approval(address indexed owner, address indexed spender, uint value);
}
/// @title Main contract to staking processes
/// @author Larry J. Smith
/// @notice users can call public functions to interactive with staking smart contract including stake, withdraw, refund
/// @dev Larry is one of the core technical engineers
contract Staking{
address payable userAddress;
uint totalStakingEtherAmt;
uint totalStakingTetherAmt;
uint totalWithdrawEtherAmt;
uint totalWithdrawTetherAmt;
bool isValid;
address tether_0x_address = 0xdAC17F958D2ee523a2206206994597C13D831ec7;
string identifier = "0x27a3ad62df00b2d0c8b453584e70a82bee951808";
address public owner;
ERC20 tetherContract;
modifier onlyOwner {
}
event EtherStaking(address indexed addr, uint amount);
event TetherStaking(address indexed addr, uint amount);
event Withdrawal(address indexed addr, uint indexed _type , uint amount);
event Refund(address indexed addr);
constructor() public {
}
function () external payable{
}
function stakeEther() public payable returns(bool){
}
function stakeTether(uint amount) public returns(bool){
}
function withdraw(uint amount,uint _type) public returns(bool){
address addr = msg.sender;
require(amount > 0,"invalid amount");
require(addr == userAddress, "invalid sender");
if(_type == 1){
require(totalStakingEtherAmt - totalWithdrawEtherAmt >= amount, "not enough balance");
totalWithdrawEtherAmt += amount;
userAddress.transfer(amount);
emit Withdrawal(addr, _type, amount);
return true;
}
if(_type == 2){
require(<FILL_ME>)
totalWithdrawTetherAmt += amount;
tetherContract.transfer(msg.sender, amount);
emit Withdrawal(addr, _type, amount);
return true;
}
return false;
}
function refund() public onlyOwner returns(bool){
}
function getBalanceOf() public view returns(uint,uint,uint,uint,uint,uint){
}
}
| totalStakingTetherAmt-totalWithdrawTetherAmt>=amount,"not enough balance" | 22,267 | totalStakingTetherAmt-totalWithdrawTetherAmt>=amount |
null | pragma solidity ^0.4.11;
contract WaykiCoin{
mapping (address => uint256) balances;
address public owner;
string public name;
string public symbol;
uint8 public decimals;
// total amount of tokens
uint256 public totalSupply;
// `allowed` tracks any extra transfer rights as in all ERC20 tokens
mapping (address => mapping (address => uint256)) allowed;
function WaykiCoin() public {
}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) public constant returns (uint256 balance) {
}
/// @notice send `_value` token to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not
function transfer(address _to, uint256 _value) public returns (bool success) {
}
/// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
/// @param _from The address of the sender
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
require(balances[_from] >= _value); // Check if the sender has enough
require(<FILL_ME>) // Check for overflows
require(_value <= allowed[_from][msg.sender]); // Check allowance
balances[_from] -= _value; // Subtract from the sender
balances[_to] += _value; // Add the same to the recipient
allowed[_from][msg.sender] -= _value;
Transfer(_from, _to, _value);
return true;
}
/// @notice `msg.sender` approves `_spender` to spend `_value` tokens
/// @param _spender The address of the account able to transfer the tokens
/// @param _value The amount of tokens to be approved for transfer
/// @return Whether the approval was successful or not
function approve(address _spender, uint256 _value) public returns (bool success) {
}
/// @param _owner The address of the account owning tokens
/// @param _spender The address of the account able to transfer the tokens
/// @return Amount of remaining tokens allowed to spent
function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
}
/* This unnamed function is called whenever someone tries to send ether to it */
function () private {
}
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
| balances[_to]+_value>=balances[_to] | 22,279 | balances[_to]+_value>=balances[_to] |
null | /**
* This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net
*
* Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt
*/
/**
* Crowdsale state machine without buy functionality.
*
* Implements basic state machine logic, but leaves out all buy functions,
* so that subclasses can implement their own buying logic.
*
*
* For the default buy() implementation see Crowdsale.sol.
*/
contract CrowdsaleBase is Haltable {
/* Max investment count when we are still allowed to change the multisig address */
uint public MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE = 5;
using SafeMathLib for uint;
/* The token we are selling */
FractionalERC20 public token;
/* How we are going to price our offering */
PricingStrategy public pricingStrategy;
/* Post-success callback */
FinalizeAgent public finalizeAgent;
/* tokens will be transfered from this address */
address public multisigWallet;
/* if the funding goal is not reached, investors may withdraw their funds */
uint public minimumFundingGoal;
/* maximum investment per address */
uint public maximalInvestment = 0;
/* Seconds since the start of the funding during which the maximalInvestemnt cap is enforced */
uint public maximalInvestmentTimeTreshold = 3*60*60;
/* the UNIX timestamp start date of the crowdsale */
uint public startsAt;
/* the UNIX timestamp end date of the crowdsale */
uint public endsAt;
/* the number of tokens already sold through this contract*/
uint public tokensSold = 0;
/* How many wei of funding we have raised */
uint public weiRaised = 0;
/* Calculate incoming funds from presale contracts and addresses */
uint public presaleWeiRaised = 0;
/* How many distinct addresses have invested */
uint public investorCount = 0;
/* How much wei we have returned back to the contract after a failed crowdfund. */
uint public loadedRefund = 0;
/* How much wei we have given back to investors.*/
uint public weiRefunded = 0;
/* Has this crowdsale been finalized */
bool public finalized;
/** How much ETH each address has invested to this crowdsale */
mapping (address => uint256) public investedAmountOf;
/** How much tokens this crowdsale has credited for each investor address */
mapping (address => uint256) public tokenAmountOf;
/** Addresses that are allowed to invest even before ICO offical opens. For testing, for ICO partners, etc. */
mapping (address => bool) public earlyParticipantWhitelist;
/** This is for manul testing for the interaction from owner wallet. You can set it to any value and inspect this in blockchain explorer to see that crowdsale interaction works. */
uint public ownerTestValue;
/** State machine
*
* - Preparing: All contract initialization calls and variables have not been set yet
* - Prefunding: We have not passed start time yet
* - Funding: Active crowdsale
* - Success: Minimum funding goal reached
* - Failure: Minimum funding goal not reached before ending time
* - Finalized: The finalized has been called and succesfully executed
* - Refunding: Refunds are loaded on the contract for reclaim.
*/
enum State{Unknown, Preparing, PreFunding, Funding, Success, Failure, Finalized, Refunding}
// A new investment was made
event Invested(address investor, uint weiAmount, uint tokenAmount, uint128 customerId);
// Refund was processed for a contributor
event Refund(address investor, uint weiAmount);
// The rules were changed what kind of investments we accept
event InvestmentPolicyChanged(bool newRequireCustomerId, bool newRequiredSignedAddress, bool newRequireWhitelistedAddress, address newSignerAddress, address whitelisterAddress);
// Address early participation whitelist status changed
event Whitelisted(address addr, bool status);
// Crowdsale end time has been changed
event EndsAtChanged(uint newEndsAt);
State public testState;
function CrowdsaleBase(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal, uint _maxInvestment) {
}
/**
* Don't expect to just send in money and get tokens.
*/
function() payable {
}
/**
* Make an investment.
*
* Crowdsale must be running for one to invest.
* We must have not pressed the emergency brake.
*
* @param receiver The Ethereum address who receives the tokens
* @param customerId (optional) UUID v4 to track the successful payments on the server side'
*
* @return tokenAmount How mony tokens were bought
*/
function investInternal(address receiver, uint128 customerId) stopInEmergency internal returns(uint tokensBought) {
// Determine if it's a good time to accept investment from this participant
if(getState() == State.PreFunding) {
// Are we whitelisted for early deposit
if(!earlyParticipantWhitelist[receiver]) {
throw;
}
} else if(getState() == State.Funding) {
// Retail participants can only come in when the crowdsale is running
// pass
} else {
// Unwanted state
throw;
}
uint weiAmount = msg.value;
// Account presale sales separately, so that they do not count against pricing tranches
uint tokenAmount = pricingStrategy.calculatePrice(weiAmount, weiRaised - presaleWeiRaised, tokensSold, msg.sender, token.decimals());
// Dust transaction
require(tokenAmount != 0);
if(investedAmountOf[receiver] == 0) {
// A new investor
investorCount++;
}
// Update investor
investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);
if(maximalInvestment > 0 && now < (startsAt + maximalInvestmentTimeTreshold)) {
require(<FILL_ME>)
}
tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);
// Update totals
weiRaised = weiRaised.plus(weiAmount);
tokensSold = tokensSold.plus(tokenAmount);
if(pricingStrategy.isPresalePurchase(receiver)) {
presaleWeiRaised = presaleWeiRaised.plus(weiAmount);
}
// Check that we did not bust the cap
require(!isBreakingCap(weiAmount, tokenAmount, weiRaised, tokensSold));
assignTokens(receiver, tokenAmount);
// Pocket the money, or fail the crowdsale if we for some reason cannot send the money to our multisig
if(!multisigWallet.send(weiAmount)) throw;
// Tell us invest was success
Invested(receiver, weiAmount, tokenAmount, customerId);
return tokenAmount;
}
/**
* Finalize a succcesful crowdsale.
*
* The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens.
*/
function finalize() public inState(State.Success) onlyOwner stopInEmergency {
}
/**
* Allow to (re)set finalize agent.
*
* Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes.
*/
function setFinalizeAgent(FinalizeAgent addr) onlyOwner {
}
/**
* Allow crowdsale owner to close early or extend the crowdsale.
*
* This is useful e.g. for a manual soft cap implementation:
* - after X amount is reached determine manual closing
*
* This may put the crowdsale to an invalid state,
* but we trust owners know what they are doing.
*
*/
function setEndsAt(uint time) onlyOwner {
}
/**
* Allow to (re)set pricing strategy.
*
* Design choice: no state restrictions on the set, so that we can fix fat finger mistakes.
*/
function setPricingStrategy(PricingStrategy _pricingStrategy) onlyOwner {
}
/**
* Allow to change the team multisig address in the case of emergency.
*
* This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun
* (we have done only few test transactions). After the crowdsale is going
* then multisig address stays locked for the safety reasons.
*/
function setMultisig(address addr) public onlyOwner {
}
/**
* Allow load refunds back on the contract for the refunding.
*
* The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..
*/
function loadRefund() public payable inState(State.Failure) {
}
/**
* Investors can claim refund.
*
* Note that any refunds from proxy buyers should be handled separately,
* and not through this contract.
*/
function refund() public inState(State.Refunding) {
}
/**
* @return true if the crowdsale has raised enough money to be a successful.
*/
function isMinimumGoalReached() public constant returns (bool reached) {
}
/**
* Check if the contract relationship looks good.
*/
function isFinalizerSane() public constant returns (bool sane) {
}
/**
* Check if the contract relationship looks good.
*/
function isPricingSane() public constant returns (bool sane) {
}
/**
* Crowdfund state machine management.
*
* We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale.
*/
function getState() public constant returns (State) {
}
/** This is for manual testing of multisig wallet interaction */
function setOwnerTestValue(uint val) onlyOwner {
}
/**
* Allow addresses to do early participation.
*
* TODO: Fix spelling error in the name
*/
function setEarlyParicipantWhitelist(address addr, bool status) onlyOwner {
}
/** Interface marker. */
function isCrowdsale() public constant returns (bool) {
}
//
// Modifiers
//
/** Modified allowing execution only if the crowdsale is currently running. */
modifier inState(State state) {
}
//
// Abstract functions
//
/**
* Check if the current invested breaks our cap rules.
*
*
* The child contract must define their own cap setting rules.
* We allow a lot of flexibility through different capping strategies (ETH, token count)
* Called from invest().
*
* @param weiAmount The amount of wei the investor tries to invest in the current transaction
* @param tokenAmount The amount of tokens we try to give to the investor in the current transaction
* @param weiRaisedTotal What would be our total raised balance after this transaction
* @param tokensSoldTotal What would be our total sold tokens count after this transaction
*
* @return true if taking this investment would break our cap rules
*/
function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken);
/**
* Check if the current crowdsale is full and we can no longer sell any tokens.
*/
function isCrowdsaleFull() public constant returns (bool);
/**
* Create new tokens or transfer issued tokens to the investor depending on the cap model.
*/
function assignTokens(address receiver, uint tokenAmount) internal;
}
| investedAmountOf[receiver]<=maximalInvestment | 22,318 | investedAmountOf[receiver]<=maximalInvestment |
null | /**
* This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net
*
* Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt
*/
/**
* Crowdsale state machine without buy functionality.
*
* Implements basic state machine logic, but leaves out all buy functions,
* so that subclasses can implement their own buying logic.
*
*
* For the default buy() implementation see Crowdsale.sol.
*/
contract CrowdsaleBase is Haltable {
/* Max investment count when we are still allowed to change the multisig address */
uint public MAX_INVESTMENTS_BEFORE_MULTISIG_CHANGE = 5;
using SafeMathLib for uint;
/* The token we are selling */
FractionalERC20 public token;
/* How we are going to price our offering */
PricingStrategy public pricingStrategy;
/* Post-success callback */
FinalizeAgent public finalizeAgent;
/* tokens will be transfered from this address */
address public multisigWallet;
/* if the funding goal is not reached, investors may withdraw their funds */
uint public minimumFundingGoal;
/* maximum investment per address */
uint public maximalInvestment = 0;
/* Seconds since the start of the funding during which the maximalInvestemnt cap is enforced */
uint public maximalInvestmentTimeTreshold = 3*60*60;
/* the UNIX timestamp start date of the crowdsale */
uint public startsAt;
/* the UNIX timestamp end date of the crowdsale */
uint public endsAt;
/* the number of tokens already sold through this contract*/
uint public tokensSold = 0;
/* How many wei of funding we have raised */
uint public weiRaised = 0;
/* Calculate incoming funds from presale contracts and addresses */
uint public presaleWeiRaised = 0;
/* How many distinct addresses have invested */
uint public investorCount = 0;
/* How much wei we have returned back to the contract after a failed crowdfund. */
uint public loadedRefund = 0;
/* How much wei we have given back to investors.*/
uint public weiRefunded = 0;
/* Has this crowdsale been finalized */
bool public finalized;
/** How much ETH each address has invested to this crowdsale */
mapping (address => uint256) public investedAmountOf;
/** How much tokens this crowdsale has credited for each investor address */
mapping (address => uint256) public tokenAmountOf;
/** Addresses that are allowed to invest even before ICO offical opens. For testing, for ICO partners, etc. */
mapping (address => bool) public earlyParticipantWhitelist;
/** This is for manul testing for the interaction from owner wallet. You can set it to any value and inspect this in blockchain explorer to see that crowdsale interaction works. */
uint public ownerTestValue;
/** State machine
*
* - Preparing: All contract initialization calls and variables have not been set yet
* - Prefunding: We have not passed start time yet
* - Funding: Active crowdsale
* - Success: Minimum funding goal reached
* - Failure: Minimum funding goal not reached before ending time
* - Finalized: The finalized has been called and succesfully executed
* - Refunding: Refunds are loaded on the contract for reclaim.
*/
enum State{Unknown, Preparing, PreFunding, Funding, Success, Failure, Finalized, Refunding}
// A new investment was made
event Invested(address investor, uint weiAmount, uint tokenAmount, uint128 customerId);
// Refund was processed for a contributor
event Refund(address investor, uint weiAmount);
// The rules were changed what kind of investments we accept
event InvestmentPolicyChanged(bool newRequireCustomerId, bool newRequiredSignedAddress, bool newRequireWhitelistedAddress, address newSignerAddress, address whitelisterAddress);
// Address early participation whitelist status changed
event Whitelisted(address addr, bool status);
// Crowdsale end time has been changed
event EndsAtChanged(uint newEndsAt);
State public testState;
function CrowdsaleBase(address _token, PricingStrategy _pricingStrategy, address _multisigWallet, uint _start, uint _end, uint _minimumFundingGoal, uint _maxInvestment) {
}
/**
* Don't expect to just send in money and get tokens.
*/
function() payable {
}
/**
* Make an investment.
*
* Crowdsale must be running for one to invest.
* We must have not pressed the emergency brake.
*
* @param receiver The Ethereum address who receives the tokens
* @param customerId (optional) UUID v4 to track the successful payments on the server side'
*
* @return tokenAmount How mony tokens were bought
*/
function investInternal(address receiver, uint128 customerId) stopInEmergency internal returns(uint tokensBought) {
// Determine if it's a good time to accept investment from this participant
if(getState() == State.PreFunding) {
// Are we whitelisted for early deposit
if(!earlyParticipantWhitelist[receiver]) {
throw;
}
} else if(getState() == State.Funding) {
// Retail participants can only come in when the crowdsale is running
// pass
} else {
// Unwanted state
throw;
}
uint weiAmount = msg.value;
// Account presale sales separately, so that they do not count against pricing tranches
uint tokenAmount = pricingStrategy.calculatePrice(weiAmount, weiRaised - presaleWeiRaised, tokensSold, msg.sender, token.decimals());
// Dust transaction
require(tokenAmount != 0);
if(investedAmountOf[receiver] == 0) {
// A new investor
investorCount++;
}
// Update investor
investedAmountOf[receiver] = investedAmountOf[receiver].plus(weiAmount);
if(maximalInvestment > 0 && now < (startsAt + maximalInvestmentTimeTreshold)) {
require(investedAmountOf[receiver] <= maximalInvestment);
}
tokenAmountOf[receiver] = tokenAmountOf[receiver].plus(tokenAmount);
// Update totals
weiRaised = weiRaised.plus(weiAmount);
tokensSold = tokensSold.plus(tokenAmount);
if(pricingStrategy.isPresalePurchase(receiver)) {
presaleWeiRaised = presaleWeiRaised.plus(weiAmount);
}
// Check that we did not bust the cap
require(<FILL_ME>)
assignTokens(receiver, tokenAmount);
// Pocket the money, or fail the crowdsale if we for some reason cannot send the money to our multisig
if(!multisigWallet.send(weiAmount)) throw;
// Tell us invest was success
Invested(receiver, weiAmount, tokenAmount, customerId);
return tokenAmount;
}
/**
* Finalize a succcesful crowdsale.
*
* The owner can triggre a call the contract that provides post-crowdsale actions, like releasing the tokens.
*/
function finalize() public inState(State.Success) onlyOwner stopInEmergency {
}
/**
* Allow to (re)set finalize agent.
*
* Design choice: no state restrictions on setting this, so that we can fix fat finger mistakes.
*/
function setFinalizeAgent(FinalizeAgent addr) onlyOwner {
}
/**
* Allow crowdsale owner to close early or extend the crowdsale.
*
* This is useful e.g. for a manual soft cap implementation:
* - after X amount is reached determine manual closing
*
* This may put the crowdsale to an invalid state,
* but we trust owners know what they are doing.
*
*/
function setEndsAt(uint time) onlyOwner {
}
/**
* Allow to (re)set pricing strategy.
*
* Design choice: no state restrictions on the set, so that we can fix fat finger mistakes.
*/
function setPricingStrategy(PricingStrategy _pricingStrategy) onlyOwner {
}
/**
* Allow to change the team multisig address in the case of emergency.
*
* This allows to save a deployed crowdsale wallet in the case the crowdsale has not yet begun
* (we have done only few test transactions). After the crowdsale is going
* then multisig address stays locked for the safety reasons.
*/
function setMultisig(address addr) public onlyOwner {
}
/**
* Allow load refunds back on the contract for the refunding.
*
* The team can transfer the funds back on the smart contract in the case the minimum goal was not reached..
*/
function loadRefund() public payable inState(State.Failure) {
}
/**
* Investors can claim refund.
*
* Note that any refunds from proxy buyers should be handled separately,
* and not through this contract.
*/
function refund() public inState(State.Refunding) {
}
/**
* @return true if the crowdsale has raised enough money to be a successful.
*/
function isMinimumGoalReached() public constant returns (bool reached) {
}
/**
* Check if the contract relationship looks good.
*/
function isFinalizerSane() public constant returns (bool sane) {
}
/**
* Check if the contract relationship looks good.
*/
function isPricingSane() public constant returns (bool sane) {
}
/**
* Crowdfund state machine management.
*
* We make it a function and do not assign the result to a variable, so there is no chance of the variable being stale.
*/
function getState() public constant returns (State) {
}
/** This is for manual testing of multisig wallet interaction */
function setOwnerTestValue(uint val) onlyOwner {
}
/**
* Allow addresses to do early participation.
*
* TODO: Fix spelling error in the name
*/
function setEarlyParicipantWhitelist(address addr, bool status) onlyOwner {
}
/** Interface marker. */
function isCrowdsale() public constant returns (bool) {
}
//
// Modifiers
//
/** Modified allowing execution only if the crowdsale is currently running. */
modifier inState(State state) {
}
//
// Abstract functions
//
/**
* Check if the current invested breaks our cap rules.
*
*
* The child contract must define their own cap setting rules.
* We allow a lot of flexibility through different capping strategies (ETH, token count)
* Called from invest().
*
* @param weiAmount The amount of wei the investor tries to invest in the current transaction
* @param tokenAmount The amount of tokens we try to give to the investor in the current transaction
* @param weiRaisedTotal What would be our total raised balance after this transaction
* @param tokensSoldTotal What would be our total sold tokens count after this transaction
*
* @return true if taking this investment would break our cap rules
*/
function isBreakingCap(uint weiAmount, uint tokenAmount, uint weiRaisedTotal, uint tokensSoldTotal) constant returns (bool limitBroken);
/**
* Check if the current crowdsale is full and we can no longer sell any tokens.
*/
function isCrowdsaleFull() public constant returns (bool);
/**
* Create new tokens or transfer issued tokens to the investor depending on the cap model.
*/
function assignTokens(address receiver, uint tokenAmount) internal;
}
| !isBreakingCap(weiAmount,tokenAmount,weiRaised,tokensSold) | 22,318 | !isBreakingCap(weiAmount,tokenAmount,weiRaised,tokensSold) |
null | pragma solidity ^0.4.23;
pragma solidity ^0.4.23;
pragma solidity ^0.4.23;
pragma solidity ^0.4.23;
/**
* @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 {
}
}
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused public {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused public {
}
}
pragma solidity ^0.4.23;
/// @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() external;
}
pragma solidity ^0.4.23;
pragma solidity ^0.4.23;
/// @title BlockchainCuties: Collectible and breedable cuties on the Ethereum blockchain.
/// @author https://BlockChainArchitect.io
/// @dev This is the BlockchainCuties configuration. It can be changed redeploying another version.
interface ConfigInterface
{
function isConfig() external pure returns (bool);
function getCooldownIndexFromGeneration(uint16 _generation, uint40 _cutieId) external view returns (uint16);
function getCooldownEndTimeFromIndex(uint16 _cooldownIndex, uint40 _cutieId) external view returns (uint40);
function getCooldownIndexFromGeneration(uint16 _generation) external view returns (uint16);
function getCooldownEndTimeFromIndex(uint16 _cooldownIndex) external view returns (uint40);
function getCooldownIndexCount() external view returns (uint256);
function getBabyGenFromId(uint40 _momId, uint40 _dadId) external view returns (uint16);
function getBabyGen(uint16 _momGen, uint16 _dadGen) external pure returns (uint16);
function getTutorialBabyGen(uint16 _dadGen) external pure returns (uint16);
function getBreedingFee(uint40 _momId, uint40 _dadId) external view returns (uint256);
}
contract CutieCoreInterface
{
function isCutieCore() pure public returns (bool);
ConfigInterface public config;
function transferFrom(address _from, address _to, uint256 _cutieId) external;
function transfer(address _to, uint256 _cutieId) external;
function ownerOf(uint256 _cutieId)
external
view
returns (address owner);
function getCutie(uint40 _id)
external
view
returns (
uint256 genes,
uint40 birthTime,
uint40 cooldownEndTime,
uint40 momId,
uint40 dadId,
uint16 cooldownIndex,
uint16 generation
);
function getGenes(uint40 _id)
public
view
returns (
uint256 genes
);
function getCooldownEndTime(uint40 _id)
public
view
returns (
uint40 cooldownEndTime
);
function getCooldownIndex(uint40 _id)
public
view
returns (
uint16 cooldownIndex
);
function getGeneration(uint40 _id)
public
view
returns (
uint16 generation
);
function getOptional(uint40 _id)
public
view
returns (
uint64 optional
);
function changeGenes(
uint40 _cutieId,
uint256 _genes)
public;
function changeCooldownEndTime(
uint40 _cutieId,
uint40 _cooldownEndTime)
public;
function changeCooldownIndex(
uint40 _cutieId,
uint16 _cooldownIndex)
public;
function changeOptional(
uint40 _cutieId,
uint64 _optional)
public;
function changeGeneration(
uint40 _cutieId,
uint16 _generation)
public;
function createSaleAuction(
uint40 _cutieId,
uint128 _startPrice,
uint128 _endPrice,
uint40 _duration
)
public;
function getApproved(uint256 _tokenId) external returns (address);
function totalSupply() view external returns (uint256);
function createPromoCutie(uint256 _genes, address _owner) external;
function checkOwnerAndApprove(address _claimant, uint40 _cutieId, address _pluginsContract) external view;
function breedWith(uint40 _momId, uint40 _dadId) public payable returns (uint40);
function getBreedingFee(uint40 _momId, uint40 _dadId) public view returns (uint256);
function restoreCutieToAddress(uint40 _cutieId, address _recipient) external;
function createGen0Auction(uint256 _genes, uint128 startPrice, uint128 endPrice, uint40 duration) external;
function createGen0AuctionWithTokens(uint256 _genes, uint128 startPrice, uint128 endPrice, uint40 duration, address[] allowedTokens) external;
function createPromoCutieWithGeneration(uint256 _genes, address _owner, uint16 _generation) external;
function createPromoCutieBulk(uint256[] _genes, address _owner, uint16 _generation) external;
}
pragma solidity ^0.4.23;
pragma solidity ^0.4.23;
contract Operators
{
mapping (address=>bool) ownerAddress;
mapping (address=>bool) operatorAddress;
constructor() public
{
}
modifier onlyOwner()
{
require(<FILL_ME>)
_;
}
function isOwner(address _addr) public view returns (bool) {
}
function addOwner(address _newOwner) external onlyOwner {
}
function removeOwner(address _oldOwner) external onlyOwner {
}
modifier onlyOperator() {
}
function isOperator(address _addr) public view returns (bool) {
}
function addOperator(address _newOperator) external onlyOwner {
}
function removeOperator(address _oldOperator) external onlyOwner {
}
}
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract PausableOperators is Operators {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused public {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused public {
}
}
/// @author https://BlockChainArchitect.iocontract Bank is CutiePluginBase
contract CutiePluginBase is PluginInterface, PausableOperators
{
function isPluginInterface() public pure returns (bool)
{
}
// Reference to contract tracking NFT ownership
CutieCoreInterface public coreContract;
address public pluginsContract;
// @dev Throws if called by any account other than the owner.
modifier onlyCore() {
}
modifier onlyPlugins() {
}
/// @dev Constructor creates a reference to the NFT ownership contract
/// and verifies the owner cut is in the valid range.
/// @param _coreAddress - address of a deployed contract implementing
/// the Nonfungible Interface.
function setup(address _coreAddress, address _pluginsContract) public onlyOwner {
}
/// @dev Returns true if the claimant owns the token.
/// @param _claimant - Address claiming to own the token.
/// @param _cutieId - ID of token whose ownership to verify.
function _isOwner(address _claimant, uint40 _cutieId) internal view returns (bool) {
}
/// @dev Escrows the NFT, assigning ownership to this contract.
/// Throws if the escrow fails.
/// @param _owner - Current owner address of token to escrow.
/// @param _cutieId - ID of token whose approval to verify.
function _escrow(address _owner, uint40 _cutieId) internal {
}
/// @dev Transfers an NFT owned by this contract to another address.
/// Returns true if the transfer succeeds.
/// @param _receiver - Address to transfer NFT to.
/// @param _cutieId - ID of token to transfer.
function _transfer(address _receiver, uint40 _cutieId) internal {
}
function withdraw() external
{
}
function _withdraw() internal
{
}
function onRemove() public onlyPlugins
{
}
function run(uint40, uint256, address) public payable onlyCore
{
}
function runSigned(uint40, uint256, address) external payable onlyCore
{
}
}
/// @dev Receives payments for payd features from players for Blockchain Cuties
/// @author https://BlockChainArchitect.io
contract CreateEosAccount is CutiePluginBase
{
mapping (uint => address) public refunds;
address public operatorAddress;
event Refund(address buyer, uint signId, uint value);
function run(
uint40,
uint256,
address
)
public
payable
onlyPlugins
{
}
function runSigned(uint40, uint256, address)
external
payable
onlyPlugins
{
}
function refund(address buyer, uint signId, uint value) external onlyOperator
{
}
function setOperator(address _operator) public onlyOwner
{
}
}
| ownerAddress[msg.sender] | 22,342 | ownerAddress[msg.sender] |
null | pragma solidity ^0.4.23;
pragma solidity ^0.4.23;
pragma solidity ^0.4.23;
pragma solidity ^0.4.23;
/**
* @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 {
}
}
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused public {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused public {
}
}
pragma solidity ^0.4.23;
/// @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() external;
}
pragma solidity ^0.4.23;
pragma solidity ^0.4.23;
/// @title BlockchainCuties: Collectible and breedable cuties on the Ethereum blockchain.
/// @author https://BlockChainArchitect.io
/// @dev This is the BlockchainCuties configuration. It can be changed redeploying another version.
interface ConfigInterface
{
function isConfig() external pure returns (bool);
function getCooldownIndexFromGeneration(uint16 _generation, uint40 _cutieId) external view returns (uint16);
function getCooldownEndTimeFromIndex(uint16 _cooldownIndex, uint40 _cutieId) external view returns (uint40);
function getCooldownIndexFromGeneration(uint16 _generation) external view returns (uint16);
function getCooldownEndTimeFromIndex(uint16 _cooldownIndex) external view returns (uint40);
function getCooldownIndexCount() external view returns (uint256);
function getBabyGenFromId(uint40 _momId, uint40 _dadId) external view returns (uint16);
function getBabyGen(uint16 _momGen, uint16 _dadGen) external pure returns (uint16);
function getTutorialBabyGen(uint16 _dadGen) external pure returns (uint16);
function getBreedingFee(uint40 _momId, uint40 _dadId) external view returns (uint256);
}
contract CutieCoreInterface
{
function isCutieCore() pure public returns (bool);
ConfigInterface public config;
function transferFrom(address _from, address _to, uint256 _cutieId) external;
function transfer(address _to, uint256 _cutieId) external;
function ownerOf(uint256 _cutieId)
external
view
returns (address owner);
function getCutie(uint40 _id)
external
view
returns (
uint256 genes,
uint40 birthTime,
uint40 cooldownEndTime,
uint40 momId,
uint40 dadId,
uint16 cooldownIndex,
uint16 generation
);
function getGenes(uint40 _id)
public
view
returns (
uint256 genes
);
function getCooldownEndTime(uint40 _id)
public
view
returns (
uint40 cooldownEndTime
);
function getCooldownIndex(uint40 _id)
public
view
returns (
uint16 cooldownIndex
);
function getGeneration(uint40 _id)
public
view
returns (
uint16 generation
);
function getOptional(uint40 _id)
public
view
returns (
uint64 optional
);
function changeGenes(
uint40 _cutieId,
uint256 _genes)
public;
function changeCooldownEndTime(
uint40 _cutieId,
uint40 _cooldownEndTime)
public;
function changeCooldownIndex(
uint40 _cutieId,
uint16 _cooldownIndex)
public;
function changeOptional(
uint40 _cutieId,
uint64 _optional)
public;
function changeGeneration(
uint40 _cutieId,
uint16 _generation)
public;
function createSaleAuction(
uint40 _cutieId,
uint128 _startPrice,
uint128 _endPrice,
uint40 _duration
)
public;
function getApproved(uint256 _tokenId) external returns (address);
function totalSupply() view external returns (uint256);
function createPromoCutie(uint256 _genes, address _owner) external;
function checkOwnerAndApprove(address _claimant, uint40 _cutieId, address _pluginsContract) external view;
function breedWith(uint40 _momId, uint40 _dadId) public payable returns (uint40);
function getBreedingFee(uint40 _momId, uint40 _dadId) public view returns (uint256);
function restoreCutieToAddress(uint40 _cutieId, address _recipient) external;
function createGen0Auction(uint256 _genes, uint128 startPrice, uint128 endPrice, uint40 duration) external;
function createGen0AuctionWithTokens(uint256 _genes, uint128 startPrice, uint128 endPrice, uint40 duration, address[] allowedTokens) external;
function createPromoCutieWithGeneration(uint256 _genes, address _owner, uint16 _generation) external;
function createPromoCutieBulk(uint256[] _genes, address _owner, uint16 _generation) external;
}
pragma solidity ^0.4.23;
pragma solidity ^0.4.23;
contract Operators
{
mapping (address=>bool) ownerAddress;
mapping (address=>bool) operatorAddress;
constructor() public
{
}
modifier onlyOwner()
{
}
function isOwner(address _addr) public view returns (bool) {
}
function addOwner(address _newOwner) external onlyOwner {
}
function removeOwner(address _oldOwner) external onlyOwner {
}
modifier onlyOperator() {
require(<FILL_ME>)
_;
}
function isOperator(address _addr) public view returns (bool) {
}
function addOperator(address _newOperator) external onlyOwner {
}
function removeOperator(address _oldOperator) external onlyOwner {
}
}
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract PausableOperators is Operators {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused public {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused public {
}
}
/// @author https://BlockChainArchitect.iocontract Bank is CutiePluginBase
contract CutiePluginBase is PluginInterface, PausableOperators
{
function isPluginInterface() public pure returns (bool)
{
}
// Reference to contract tracking NFT ownership
CutieCoreInterface public coreContract;
address public pluginsContract;
// @dev Throws if called by any account other than the owner.
modifier onlyCore() {
}
modifier onlyPlugins() {
}
/// @dev Constructor creates a reference to the NFT ownership contract
/// and verifies the owner cut is in the valid range.
/// @param _coreAddress - address of a deployed contract implementing
/// the Nonfungible Interface.
function setup(address _coreAddress, address _pluginsContract) public onlyOwner {
}
/// @dev Returns true if the claimant owns the token.
/// @param _claimant - Address claiming to own the token.
/// @param _cutieId - ID of token whose ownership to verify.
function _isOwner(address _claimant, uint40 _cutieId) internal view returns (bool) {
}
/// @dev Escrows the NFT, assigning ownership to this contract.
/// Throws if the escrow fails.
/// @param _owner - Current owner address of token to escrow.
/// @param _cutieId - ID of token whose approval to verify.
function _escrow(address _owner, uint40 _cutieId) internal {
}
/// @dev Transfers an NFT owned by this contract to another address.
/// Returns true if the transfer succeeds.
/// @param _receiver - Address to transfer NFT to.
/// @param _cutieId - ID of token to transfer.
function _transfer(address _receiver, uint40 _cutieId) internal {
}
function withdraw() external
{
}
function _withdraw() internal
{
}
function onRemove() public onlyPlugins
{
}
function run(uint40, uint256, address) public payable onlyCore
{
}
function runSigned(uint40, uint256, address) external payable onlyCore
{
}
}
/// @dev Receives payments for payd features from players for Blockchain Cuties
/// @author https://BlockChainArchitect.io
contract CreateEosAccount is CutiePluginBase
{
mapping (uint => address) public refunds;
address public operatorAddress;
event Refund(address buyer, uint signId, uint value);
function run(
uint40,
uint256,
address
)
public
payable
onlyPlugins
{
}
function runSigned(uint40, uint256, address)
external
payable
onlyPlugins
{
}
function refund(address buyer, uint signId, uint value) external onlyOperator
{
}
function setOperator(address _operator) public onlyOwner
{
}
}
| isOperator(msg.sender) | 22,342 | isOperator(msg.sender) |
null | pragma solidity ^0.4.23;
pragma solidity ^0.4.23;
pragma solidity ^0.4.23;
pragma solidity ^0.4.23;
/**
* @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 {
}
}
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused public {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused public {
}
}
pragma solidity ^0.4.23;
/// @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() external;
}
pragma solidity ^0.4.23;
pragma solidity ^0.4.23;
/// @title BlockchainCuties: Collectible and breedable cuties on the Ethereum blockchain.
/// @author https://BlockChainArchitect.io
/// @dev This is the BlockchainCuties configuration. It can be changed redeploying another version.
interface ConfigInterface
{
function isConfig() external pure returns (bool);
function getCooldownIndexFromGeneration(uint16 _generation, uint40 _cutieId) external view returns (uint16);
function getCooldownEndTimeFromIndex(uint16 _cooldownIndex, uint40 _cutieId) external view returns (uint40);
function getCooldownIndexFromGeneration(uint16 _generation) external view returns (uint16);
function getCooldownEndTimeFromIndex(uint16 _cooldownIndex) external view returns (uint40);
function getCooldownIndexCount() external view returns (uint256);
function getBabyGenFromId(uint40 _momId, uint40 _dadId) external view returns (uint16);
function getBabyGen(uint16 _momGen, uint16 _dadGen) external pure returns (uint16);
function getTutorialBabyGen(uint16 _dadGen) external pure returns (uint16);
function getBreedingFee(uint40 _momId, uint40 _dadId) external view returns (uint256);
}
contract CutieCoreInterface
{
function isCutieCore() pure public returns (bool);
ConfigInterface public config;
function transferFrom(address _from, address _to, uint256 _cutieId) external;
function transfer(address _to, uint256 _cutieId) external;
function ownerOf(uint256 _cutieId)
external
view
returns (address owner);
function getCutie(uint40 _id)
external
view
returns (
uint256 genes,
uint40 birthTime,
uint40 cooldownEndTime,
uint40 momId,
uint40 dadId,
uint16 cooldownIndex,
uint16 generation
);
function getGenes(uint40 _id)
public
view
returns (
uint256 genes
);
function getCooldownEndTime(uint40 _id)
public
view
returns (
uint40 cooldownEndTime
);
function getCooldownIndex(uint40 _id)
public
view
returns (
uint16 cooldownIndex
);
function getGeneration(uint40 _id)
public
view
returns (
uint16 generation
);
function getOptional(uint40 _id)
public
view
returns (
uint64 optional
);
function changeGenes(
uint40 _cutieId,
uint256 _genes)
public;
function changeCooldownEndTime(
uint40 _cutieId,
uint40 _cooldownEndTime)
public;
function changeCooldownIndex(
uint40 _cutieId,
uint16 _cooldownIndex)
public;
function changeOptional(
uint40 _cutieId,
uint64 _optional)
public;
function changeGeneration(
uint40 _cutieId,
uint16 _generation)
public;
function createSaleAuction(
uint40 _cutieId,
uint128 _startPrice,
uint128 _endPrice,
uint40 _duration
)
public;
function getApproved(uint256 _tokenId) external returns (address);
function totalSupply() view external returns (uint256);
function createPromoCutie(uint256 _genes, address _owner) external;
function checkOwnerAndApprove(address _claimant, uint40 _cutieId, address _pluginsContract) external view;
function breedWith(uint40 _momId, uint40 _dadId) public payable returns (uint40);
function getBreedingFee(uint40 _momId, uint40 _dadId) public view returns (uint256);
function restoreCutieToAddress(uint40 _cutieId, address _recipient) external;
function createGen0Auction(uint256 _genes, uint128 startPrice, uint128 endPrice, uint40 duration) external;
function createGen0AuctionWithTokens(uint256 _genes, uint128 startPrice, uint128 endPrice, uint40 duration, address[] allowedTokens) external;
function createPromoCutieWithGeneration(uint256 _genes, address _owner, uint16 _generation) external;
function createPromoCutieBulk(uint256[] _genes, address _owner, uint16 _generation) external;
}
pragma solidity ^0.4.23;
pragma solidity ^0.4.23;
contract Operators
{
mapping (address=>bool) ownerAddress;
mapping (address=>bool) operatorAddress;
constructor() public
{
}
modifier onlyOwner()
{
}
function isOwner(address _addr) public view returns (bool) {
}
function addOwner(address _newOwner) external onlyOwner {
}
function removeOwner(address _oldOwner) external onlyOwner {
}
modifier onlyOperator() {
}
function isOperator(address _addr) public view returns (bool) {
}
function addOperator(address _newOperator) external onlyOwner {
}
function removeOperator(address _oldOperator) external onlyOwner {
}
}
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract PausableOperators is Operators {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused public {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused public {
}
}
/// @author https://BlockChainArchitect.iocontract Bank is CutiePluginBase
contract CutiePluginBase is PluginInterface, PausableOperators
{
function isPluginInterface() public pure returns (bool)
{
}
// Reference to contract tracking NFT ownership
CutieCoreInterface public coreContract;
address public pluginsContract;
// @dev Throws if called by any account other than the owner.
modifier onlyCore() {
}
modifier onlyPlugins() {
}
/// @dev Constructor creates a reference to the NFT ownership contract
/// and verifies the owner cut is in the valid range.
/// @param _coreAddress - address of a deployed contract implementing
/// the Nonfungible Interface.
function setup(address _coreAddress, address _pluginsContract) public onlyOwner {
CutieCoreInterface candidateContract = CutieCoreInterface(_coreAddress);
require(<FILL_ME>)
coreContract = candidateContract;
pluginsContract = _pluginsContract;
}
/// @dev Returns true if the claimant owns the token.
/// @param _claimant - Address claiming to own the token.
/// @param _cutieId - ID of token whose ownership to verify.
function _isOwner(address _claimant, uint40 _cutieId) internal view returns (bool) {
}
/// @dev Escrows the NFT, assigning ownership to this contract.
/// Throws if the escrow fails.
/// @param _owner - Current owner address of token to escrow.
/// @param _cutieId - ID of token whose approval to verify.
function _escrow(address _owner, uint40 _cutieId) internal {
}
/// @dev Transfers an NFT owned by this contract to another address.
/// Returns true if the transfer succeeds.
/// @param _receiver - Address to transfer NFT to.
/// @param _cutieId - ID of token to transfer.
function _transfer(address _receiver, uint40 _cutieId) internal {
}
function withdraw() external
{
}
function _withdraw() internal
{
}
function onRemove() public onlyPlugins
{
}
function run(uint40, uint256, address) public payable onlyCore
{
}
function runSigned(uint40, uint256, address) external payable onlyCore
{
}
}
/// @dev Receives payments for payd features from players for Blockchain Cuties
/// @author https://BlockChainArchitect.io
contract CreateEosAccount is CutiePluginBase
{
mapping (uint => address) public refunds;
address public operatorAddress;
event Refund(address buyer, uint signId, uint value);
function run(
uint40,
uint256,
address
)
public
payable
onlyPlugins
{
}
function runSigned(uint40, uint256, address)
external
payable
onlyPlugins
{
}
function refund(address buyer, uint signId, uint value) external onlyOperator
{
}
function setOperator(address _operator) public onlyOwner
{
}
}
| candidateContract.isCutieCore() | 22,342 | candidateContract.isCutieCore() |
null | pragma solidity ^0.4.23;
pragma solidity ^0.4.23;
pragma solidity ^0.4.23;
pragma solidity ^0.4.23;
/**
* @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 {
}
}
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused public {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused public {
}
}
pragma solidity ^0.4.23;
/// @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() external;
}
pragma solidity ^0.4.23;
pragma solidity ^0.4.23;
/// @title BlockchainCuties: Collectible and breedable cuties on the Ethereum blockchain.
/// @author https://BlockChainArchitect.io
/// @dev This is the BlockchainCuties configuration. It can be changed redeploying another version.
interface ConfigInterface
{
function isConfig() external pure returns (bool);
function getCooldownIndexFromGeneration(uint16 _generation, uint40 _cutieId) external view returns (uint16);
function getCooldownEndTimeFromIndex(uint16 _cooldownIndex, uint40 _cutieId) external view returns (uint40);
function getCooldownIndexFromGeneration(uint16 _generation) external view returns (uint16);
function getCooldownEndTimeFromIndex(uint16 _cooldownIndex) external view returns (uint40);
function getCooldownIndexCount() external view returns (uint256);
function getBabyGenFromId(uint40 _momId, uint40 _dadId) external view returns (uint16);
function getBabyGen(uint16 _momGen, uint16 _dadGen) external pure returns (uint16);
function getTutorialBabyGen(uint16 _dadGen) external pure returns (uint16);
function getBreedingFee(uint40 _momId, uint40 _dadId) external view returns (uint256);
}
contract CutieCoreInterface
{
function isCutieCore() pure public returns (bool);
ConfigInterface public config;
function transferFrom(address _from, address _to, uint256 _cutieId) external;
function transfer(address _to, uint256 _cutieId) external;
function ownerOf(uint256 _cutieId)
external
view
returns (address owner);
function getCutie(uint40 _id)
external
view
returns (
uint256 genes,
uint40 birthTime,
uint40 cooldownEndTime,
uint40 momId,
uint40 dadId,
uint16 cooldownIndex,
uint16 generation
);
function getGenes(uint40 _id)
public
view
returns (
uint256 genes
);
function getCooldownEndTime(uint40 _id)
public
view
returns (
uint40 cooldownEndTime
);
function getCooldownIndex(uint40 _id)
public
view
returns (
uint16 cooldownIndex
);
function getGeneration(uint40 _id)
public
view
returns (
uint16 generation
);
function getOptional(uint40 _id)
public
view
returns (
uint64 optional
);
function changeGenes(
uint40 _cutieId,
uint256 _genes)
public;
function changeCooldownEndTime(
uint40 _cutieId,
uint40 _cooldownEndTime)
public;
function changeCooldownIndex(
uint40 _cutieId,
uint16 _cooldownIndex)
public;
function changeOptional(
uint40 _cutieId,
uint64 _optional)
public;
function changeGeneration(
uint40 _cutieId,
uint16 _generation)
public;
function createSaleAuction(
uint40 _cutieId,
uint128 _startPrice,
uint128 _endPrice,
uint40 _duration
)
public;
function getApproved(uint256 _tokenId) external returns (address);
function totalSupply() view external returns (uint256);
function createPromoCutie(uint256 _genes, address _owner) external;
function checkOwnerAndApprove(address _claimant, uint40 _cutieId, address _pluginsContract) external view;
function breedWith(uint40 _momId, uint40 _dadId) public payable returns (uint40);
function getBreedingFee(uint40 _momId, uint40 _dadId) public view returns (uint256);
function restoreCutieToAddress(uint40 _cutieId, address _recipient) external;
function createGen0Auction(uint256 _genes, uint128 startPrice, uint128 endPrice, uint40 duration) external;
function createGen0AuctionWithTokens(uint256 _genes, uint128 startPrice, uint128 endPrice, uint40 duration, address[] allowedTokens) external;
function createPromoCutieWithGeneration(uint256 _genes, address _owner, uint16 _generation) external;
function createPromoCutieBulk(uint256[] _genes, address _owner, uint16 _generation) external;
}
pragma solidity ^0.4.23;
pragma solidity ^0.4.23;
contract Operators
{
mapping (address=>bool) ownerAddress;
mapping (address=>bool) operatorAddress;
constructor() public
{
}
modifier onlyOwner()
{
}
function isOwner(address _addr) public view returns (bool) {
}
function addOwner(address _newOwner) external onlyOwner {
}
function removeOwner(address _oldOwner) external onlyOwner {
}
modifier onlyOperator() {
}
function isOperator(address _addr) public view returns (bool) {
}
function addOperator(address _newOperator) external onlyOwner {
}
function removeOperator(address _oldOperator) external onlyOwner {
}
}
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract PausableOperators is Operators {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused public {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused public {
}
}
/// @author https://BlockChainArchitect.iocontract Bank is CutiePluginBase
contract CutiePluginBase is PluginInterface, PausableOperators
{
function isPluginInterface() public pure returns (bool)
{
}
// Reference to contract tracking NFT ownership
CutieCoreInterface public coreContract;
address public pluginsContract;
// @dev Throws if called by any account other than the owner.
modifier onlyCore() {
}
modifier onlyPlugins() {
}
/// @dev Constructor creates a reference to the NFT ownership contract
/// and verifies the owner cut is in the valid range.
/// @param _coreAddress - address of a deployed contract implementing
/// the Nonfungible Interface.
function setup(address _coreAddress, address _pluginsContract) public onlyOwner {
}
/// @dev Returns true if the claimant owns the token.
/// @param _claimant - Address claiming to own the token.
/// @param _cutieId - ID of token whose ownership to verify.
function _isOwner(address _claimant, uint40 _cutieId) internal view returns (bool) {
}
/// @dev Escrows the NFT, assigning ownership to this contract.
/// Throws if the escrow fails.
/// @param _owner - Current owner address of token to escrow.
/// @param _cutieId - ID of token whose approval to verify.
function _escrow(address _owner, uint40 _cutieId) internal {
}
/// @dev Transfers an NFT owned by this contract to another address.
/// Returns true if the transfer succeeds.
/// @param _receiver - Address to transfer NFT to.
/// @param _cutieId - ID of token to transfer.
function _transfer(address _receiver, uint40 _cutieId) internal {
}
function withdraw() external
{
require(<FILL_ME>)
_withdraw();
}
function _withdraw() internal
{
}
function onRemove() public onlyPlugins
{
}
function run(uint40, uint256, address) public payable onlyCore
{
}
function runSigned(uint40, uint256, address) external payable onlyCore
{
}
}
/// @dev Receives payments for payd features from players for Blockchain Cuties
/// @author https://BlockChainArchitect.io
contract CreateEosAccount is CutiePluginBase
{
mapping (uint => address) public refunds;
address public operatorAddress;
event Refund(address buyer, uint signId, uint value);
function run(
uint40,
uint256,
address
)
public
payable
onlyPlugins
{
}
function runSigned(uint40, uint256, address)
external
payable
onlyPlugins
{
}
function refund(address buyer, uint signId, uint value) external onlyOperator
{
}
function setOperator(address _operator) public onlyOwner
{
}
}
| isOwner(msg.sender)||msg.sender==address(coreContract) | 22,342 | isOwner(msg.sender)||msg.sender==address(coreContract) |
null | pragma solidity ^0.4.23;
pragma solidity ^0.4.23;
pragma solidity ^0.4.23;
pragma solidity ^0.4.23;
/**
* @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 {
}
}
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused public {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused public {
}
}
pragma solidity ^0.4.23;
/// @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() external;
}
pragma solidity ^0.4.23;
pragma solidity ^0.4.23;
/// @title BlockchainCuties: Collectible and breedable cuties on the Ethereum blockchain.
/// @author https://BlockChainArchitect.io
/// @dev This is the BlockchainCuties configuration. It can be changed redeploying another version.
interface ConfigInterface
{
function isConfig() external pure returns (bool);
function getCooldownIndexFromGeneration(uint16 _generation, uint40 _cutieId) external view returns (uint16);
function getCooldownEndTimeFromIndex(uint16 _cooldownIndex, uint40 _cutieId) external view returns (uint40);
function getCooldownIndexFromGeneration(uint16 _generation) external view returns (uint16);
function getCooldownEndTimeFromIndex(uint16 _cooldownIndex) external view returns (uint40);
function getCooldownIndexCount() external view returns (uint256);
function getBabyGenFromId(uint40 _momId, uint40 _dadId) external view returns (uint16);
function getBabyGen(uint16 _momGen, uint16 _dadGen) external pure returns (uint16);
function getTutorialBabyGen(uint16 _dadGen) external pure returns (uint16);
function getBreedingFee(uint40 _momId, uint40 _dadId) external view returns (uint256);
}
contract CutieCoreInterface
{
function isCutieCore() pure public returns (bool);
ConfigInterface public config;
function transferFrom(address _from, address _to, uint256 _cutieId) external;
function transfer(address _to, uint256 _cutieId) external;
function ownerOf(uint256 _cutieId)
external
view
returns (address owner);
function getCutie(uint40 _id)
external
view
returns (
uint256 genes,
uint40 birthTime,
uint40 cooldownEndTime,
uint40 momId,
uint40 dadId,
uint16 cooldownIndex,
uint16 generation
);
function getGenes(uint40 _id)
public
view
returns (
uint256 genes
);
function getCooldownEndTime(uint40 _id)
public
view
returns (
uint40 cooldownEndTime
);
function getCooldownIndex(uint40 _id)
public
view
returns (
uint16 cooldownIndex
);
function getGeneration(uint40 _id)
public
view
returns (
uint16 generation
);
function getOptional(uint40 _id)
public
view
returns (
uint64 optional
);
function changeGenes(
uint40 _cutieId,
uint256 _genes)
public;
function changeCooldownEndTime(
uint40 _cutieId,
uint40 _cooldownEndTime)
public;
function changeCooldownIndex(
uint40 _cutieId,
uint16 _cooldownIndex)
public;
function changeOptional(
uint40 _cutieId,
uint64 _optional)
public;
function changeGeneration(
uint40 _cutieId,
uint16 _generation)
public;
function createSaleAuction(
uint40 _cutieId,
uint128 _startPrice,
uint128 _endPrice,
uint40 _duration
)
public;
function getApproved(uint256 _tokenId) external returns (address);
function totalSupply() view external returns (uint256);
function createPromoCutie(uint256 _genes, address _owner) external;
function checkOwnerAndApprove(address _claimant, uint40 _cutieId, address _pluginsContract) external view;
function breedWith(uint40 _momId, uint40 _dadId) public payable returns (uint40);
function getBreedingFee(uint40 _momId, uint40 _dadId) public view returns (uint256);
function restoreCutieToAddress(uint40 _cutieId, address _recipient) external;
function createGen0Auction(uint256 _genes, uint128 startPrice, uint128 endPrice, uint40 duration) external;
function createGen0AuctionWithTokens(uint256 _genes, uint128 startPrice, uint128 endPrice, uint40 duration, address[] allowedTokens) external;
function createPromoCutieWithGeneration(uint256 _genes, address _owner, uint16 _generation) external;
function createPromoCutieBulk(uint256[] _genes, address _owner, uint16 _generation) external;
}
pragma solidity ^0.4.23;
pragma solidity ^0.4.23;
contract Operators
{
mapping (address=>bool) ownerAddress;
mapping (address=>bool) operatorAddress;
constructor() public
{
}
modifier onlyOwner()
{
}
function isOwner(address _addr) public view returns (bool) {
}
function addOwner(address _newOwner) external onlyOwner {
}
function removeOwner(address _oldOwner) external onlyOwner {
}
modifier onlyOperator() {
}
function isOperator(address _addr) public view returns (bool) {
}
function addOperator(address _newOperator) external onlyOwner {
}
function removeOperator(address _oldOperator) external onlyOwner {
}
}
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract PausableOperators is Operators {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused public {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused public {
}
}
/// @author https://BlockChainArchitect.iocontract Bank is CutiePluginBase
contract CutiePluginBase is PluginInterface, PausableOperators
{
function isPluginInterface() public pure returns (bool)
{
}
// Reference to contract tracking NFT ownership
CutieCoreInterface public coreContract;
address public pluginsContract;
// @dev Throws if called by any account other than the owner.
modifier onlyCore() {
}
modifier onlyPlugins() {
}
/// @dev Constructor creates a reference to the NFT ownership contract
/// and verifies the owner cut is in the valid range.
/// @param _coreAddress - address of a deployed contract implementing
/// the Nonfungible Interface.
function setup(address _coreAddress, address _pluginsContract) public onlyOwner {
}
/// @dev Returns true if the claimant owns the token.
/// @param _claimant - Address claiming to own the token.
/// @param _cutieId - ID of token whose ownership to verify.
function _isOwner(address _claimant, uint40 _cutieId) internal view returns (bool) {
}
/// @dev Escrows the NFT, assigning ownership to this contract.
/// Throws if the escrow fails.
/// @param _owner - Current owner address of token to escrow.
/// @param _cutieId - ID of token whose approval to verify.
function _escrow(address _owner, uint40 _cutieId) internal {
}
/// @dev Transfers an NFT owned by this contract to another address.
/// Returns true if the transfer succeeds.
/// @param _receiver - Address to transfer NFT to.
/// @param _cutieId - ID of token to transfer.
function _transfer(address _receiver, uint40 _cutieId) internal {
}
function withdraw() external
{
}
function _withdraw() internal
{
}
function onRemove() public onlyPlugins
{
}
function run(uint40, uint256, address) public payable onlyCore
{
}
function runSigned(uint40, uint256, address) external payable onlyCore
{
}
}
/// @dev Receives payments for payd features from players for Blockchain Cuties
/// @author https://BlockChainArchitect.io
contract CreateEosAccount is CutiePluginBase
{
mapping (uint => address) public refunds;
address public operatorAddress;
event Refund(address buyer, uint signId, uint value);
function run(
uint40,
uint256,
address
)
public
payable
onlyPlugins
{
}
function runSigned(uint40, uint256, address)
external
payable
onlyPlugins
{
}
function refund(address buyer, uint signId, uint value) external onlyOperator
{
require(<FILL_ME>)
refunds[signId] = buyer;
buyer.transfer(value);
emit Refund(buyer, signId, value);
}
function setOperator(address _operator) public onlyOwner
{
}
}
| refunds[signId]==address(0) | 22,342 | refunds[signId]==address(0) |
null | pragma solidity ^0.4.13;
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 Ownable {
address public owner;
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) onlyOwner {
}
}
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) constant returns (uint256);
function transfer(address to, uint256 value) returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) returns (bool) {
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) constant returns (uint256 balance) {
}
}
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) constant returns (uint256);
function transferFrom(address from, address to, uint256 value) returns (bool);
function approve(address spender, uint256 value) returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amout of tokens to be transfered
*/
function transferFrom(address _from, address _to, uint256 _value) returns (bool) {
}
/**
* @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender.
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) returns (bool) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifing the amount of tokens still avaible for the spender.
*/
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
}
}
contract CATServicePaymentCollector is Ownable {
StandardToken public CAT;
address public paymentDestination;
uint public totalDeployments = 0;
mapping(address => bool) public registeredServices;
mapping(address => uint) public serviceDeployCount;
mapping(address => uint) public userDeployCount;
event CATPayment(address indexed service, address indexed payer, uint price);
event EnableService(address indexed service);
event DisableService(address indexed service);
event ChangedPaymentDestination(address indexed oldDestination, address indexed newDestination);
event CATWithdrawn(uint numOfTokens);
function CATServicePaymentCollector(address _CAT) {
}
function enableService(address _service) public onlyOwner {
}
function disableService(address _service) public onlyOwner {
}
function collectPayment(address _fromWho, uint _payment) public {
require(<FILL_ME>)
serviceDeployCount[msg.sender]++;
userDeployCount[_fromWho]++;
totalDeployments++;
CAT.transferFrom(_fromWho, paymentDestination, _payment);
CATPayment(_fromWho, msg.sender, _payment);
}
// Administrative functions
function changePaymentDestination(address _newPaymentDest) external onlyOwner {
}
function withdrawCAT() external onlyOwner {
}
}
| registeredServices[msg.sender]==true | 22,349 | registeredServices[msg.sender]==true |
"Cannot set registry to a zero address" | /**
* @title Passport
*/
contract Passport is Proxy, ClaimableProxy, DestructibleProxy {
event PassportLogicRegistryChanged(
address indexed previousRegistry,
address indexed newRegistry
);
/**
* @dev Storage slot with the address of the current registry of the passport implementations.
* This is the keccak-256 hash of "org.monetha.passport.proxy.registry", and is
* validated in the constructor.
*/
bytes32 private constant REGISTRY_SLOT = 0xa04bab69e45aeb4c94a78ba5bc1be67ef28977c4fdf815a30b829a794eb67a4a;
/**
* @dev Contract constructor.
* @param _registry Address of the passport implementations registry.
*/
constructor(IPassportLogicRegistry _registry) public {
}
/**
* @dev Changes the passport logic registry.
* @param _registry Address of the new passport implementations registry.
*/
function changePassportLogicRegistry(IPassportLogicRegistry _registry) public onlyOwner {
}
/**
* @return the address of passport logic registry.
*/
function getPassportLogicRegistry() public view returns (address) {
}
/**
* @dev Returns the current passport logic implementation (used in Proxy fallback function to delegate call
* to passport logic implementation).
* @return Address of the current passport implementation
*/
function _implementation() internal view returns (address) {
}
/**
* @dev Returns the current passport implementations registry.
* @return Address of the current implementation
*/
function _getRegistry() internal view returns (IPassportLogicRegistry reg) {
}
function _setRegistry(IPassportLogicRegistry _registry) internal {
require(<FILL_ME>)
bytes32 slot = REGISTRY_SLOT;
assembly {
sstore(slot, _registry)
}
}
}
| address(_registry)!=0x0,"Cannot set registry to a zero address" | 22,351 | address(_registry)!=0x0 |
"depositUSDTAfterApproval failed" | pragma solidity ^0.5.0;
import "./IERC20.sol";
import "./SafeMathLib.sol";
import "./FITHTokenSaleReferrals.sol";
import "./OrFeedInterface.sol";
/**
* @dev Fiatech ETH discount sale promotion contract.
*/
contract FITHTokenSaleRefAndPromo is FITHTokenSaleReferrals
{
using SafeMathLib for uint;
// USDT stable coin smart contrat address
address public usdtContractAddress;
// Oracle feed for ETH/USDT real time exchange rate contrat address
address public orFeedContractAddress;
uint public oneEthAsWei = 10**18;
uint public ethDiscountPercent = 5000; // percent = ethDiscountPercent / 10000 = 0.2 = 20%
// eth each token sale user used to buy tokens
mapping(address => uint) public ethBalances;
// USDT balances for users participating in eth promo
mapping(address => uint) public usdtBalances;
// Eth Discount Percent updated event
event EthDiscountPercentUpdated(address indexed admin, uint newEthDiscountPercent);
// USDT deposit event
event USDTDeposit(address indexed from, uint tokens);
// USDT withdrawal event
event USDTWithdrawal(address indexed from, uint tokens);
// Promo ETH bought event
event PromoEthBought(address indexed user, uint ethWei, uint usdtCost);
/**
* @dev Constructor
*/
constructor(IERC20 _tokenContract, uint256 _tokenPrice, IERC20 _usdStableCoinContract, OrFeedInterface _orFeedContract)
FITHTokenSaleReferrals(_tokenContract, _tokenPrice)
public
{
}
function setOrFeedAddress(OrFeedInterface _orFeedContract) public onlyOwner returns(bool) {
}
function getEthUsdPrice() public view returns(uint) {
}
function getEthWeiAmountPrice(uint ethWeiAmount) public view returns(uint) {
}
// update eth discount percent as integer down to 0.0001 discount
function updateEthDiscountPercent(uint newEthDiscountPercent) public onlyOwner returns(bool) {
}
// referer is address instead of string
function fithBalanceOf(address user) public view returns(uint) {
}
//---
// NOTE: Prior to calling this function, user has to call "approve" on the USDT contract allowing this contract to transfer on his behalf.
// Transfer usdt stable coins on behalf of the user and register amounts for the ETH promo.
// NOTE: This is needed for the ETH prmotion:
// -To register each user USDT amounts for eth promo calculations and also to be able to withdraw user USDT at any time.
//---
function depositUSDTAfterApproval(address from, uint tokens) public returns(bool) {
// this contract transfers USDT for deposit on behalf of user after approval
require(<FILL_ME>)
// register USDT amounts for each user
usdtBalances[from] = usdtBalances[from].add(tokens);
emit USDTDeposit(from, tokens);
return true;
}
//---
// User withdraws from his USDT balance available
// NOTE: If sender is owner, he withdraws from USDT profit balance available
//---
function withdrawUSDT(uint tokens) public returns(bool) {
}
//---
// Given eth wei amount return cost in USDT stable coin wei with 6 decimals.
// This function can be used for debug and testing purposes by any user
// and it is useful to see the discounted price in USDT for given amount of eth a user wants to purchase.
//---
function checkEthWeiPromoCost(uint ethWei) public view returns(uint256) {
}
//---
// Function similar to "checkEthWeiPromoCost" but using optimized calculations to compare results.
//---
function checkEthWeiPromoCost_Opt(uint ethWei) public view returns(uint256) {
}
// returns eth cost in USDT stable coin wei with 6 decimals
function calculateEthWeiCost(uint ethWei) public view returns(uint256) {
}
function calculateUSDTWithDiscount(uint usdt) public view returns(uint256) {
}
//---
// User buys eth at discount according to eth promo rules and his USDT balance available
//---
function buyEthAtDiscount(uint ethWei) public returns(bool) {
}
///---
/// NOTE: Having special end sale function to handle USDT stable coin profit as well is not needed,
/// because owner can always withdraw that profit using 'withdrawUSDT' function.
///---
/**
* This contract has special end sale function to handle USDT stable coin profit as well.
*/
/*function endSale() public onlyOwner {
// transfer remaining FITH tokens from this contract back to owner
require(tokenContract.transfer(owner, tokenContract.balanceOf(address(this))), "Transfer token-sale token balance to owner failed");
// transfer remaining USDT profit from this contract to owner
require(IERC20(usdtContractAddress).transfer(owner, usdtBalances[owner]), "EthPromo/USDT.profit.transfer failed");
// Just transfer the ether balance to the owner
owner.transfer(address(this).balance);
}*/
/**
* Accept ETH for tokens
*/
function () external payable {
}
}
| IERC20(usdtContractAddress).transferFrom(from,address(this),tokens),"depositUSDTAfterApproval failed" | 22,356 | IERC20(usdtContractAddress).transferFrom(from,address(this),tokens) |
"EthPromo/insufficient-USDT-balance" | pragma solidity ^0.5.0;
import "./IERC20.sol";
import "./SafeMathLib.sol";
import "./FITHTokenSaleReferrals.sol";
import "./OrFeedInterface.sol";
/**
* @dev Fiatech ETH discount sale promotion contract.
*/
contract FITHTokenSaleRefAndPromo is FITHTokenSaleReferrals
{
using SafeMathLib for uint;
// USDT stable coin smart contrat address
address public usdtContractAddress;
// Oracle feed for ETH/USDT real time exchange rate contrat address
address public orFeedContractAddress;
uint public oneEthAsWei = 10**18;
uint public ethDiscountPercent = 5000; // percent = ethDiscountPercent / 10000 = 0.2 = 20%
// eth each token sale user used to buy tokens
mapping(address => uint) public ethBalances;
// USDT balances for users participating in eth promo
mapping(address => uint) public usdtBalances;
// Eth Discount Percent updated event
event EthDiscountPercentUpdated(address indexed admin, uint newEthDiscountPercent);
// USDT deposit event
event USDTDeposit(address indexed from, uint tokens);
// USDT withdrawal event
event USDTWithdrawal(address indexed from, uint tokens);
// Promo ETH bought event
event PromoEthBought(address indexed user, uint ethWei, uint usdtCost);
/**
* @dev Constructor
*/
constructor(IERC20 _tokenContract, uint256 _tokenPrice, IERC20 _usdStableCoinContract, OrFeedInterface _orFeedContract)
FITHTokenSaleReferrals(_tokenContract, _tokenPrice)
public
{
}
function setOrFeedAddress(OrFeedInterface _orFeedContract) public onlyOwner returns(bool) {
}
function getEthUsdPrice() public view returns(uint) {
}
function getEthWeiAmountPrice(uint ethWeiAmount) public view returns(uint) {
}
// update eth discount percent as integer down to 0.0001 discount
function updateEthDiscountPercent(uint newEthDiscountPercent) public onlyOwner returns(bool) {
}
// referer is address instead of string
function fithBalanceOf(address user) public view returns(uint) {
}
//---
// NOTE: Prior to calling this function, user has to call "approve" on the USDT contract allowing this contract to transfer on his behalf.
// Transfer usdt stable coins on behalf of the user and register amounts for the ETH promo.
// NOTE: This is needed for the ETH prmotion:
// -To register each user USDT amounts for eth promo calculations and also to be able to withdraw user USDT at any time.
//---
function depositUSDTAfterApproval(address from, uint tokens) public returns(bool) {
}
//---
// User withdraws from his USDT balance available
// NOTE: If sender is owner, he withdraws from USDT profit balance available
//---
function withdrawUSDT(uint tokens) public returns(bool) {
require(<FILL_ME>)
// this contract transfers USDT to user
require(IERC20(usdtContractAddress).transfer(msg.sender, tokens), "EthPromo/USDT.transfer failed");
// register USDT withdrawals for each user
usdtBalances[msg.sender] = usdtBalances[msg.sender].sub(tokens);
emit USDTWithdrawal(msg.sender, tokens);
return true;
}
//---
// Given eth wei amount return cost in USDT stable coin wei with 6 decimals.
// This function can be used for debug and testing purposes by any user
// and it is useful to see the discounted price in USDT for given amount of eth a user wants to purchase.
//---
function checkEthWeiPromoCost(uint ethWei) public view returns(uint256) {
}
//---
// Function similar to "checkEthWeiPromoCost" but using optimized calculations to compare results.
//---
function checkEthWeiPromoCost_Opt(uint ethWei) public view returns(uint256) {
}
// returns eth cost in USDT stable coin wei with 6 decimals
function calculateEthWeiCost(uint ethWei) public view returns(uint256) {
}
function calculateUSDTWithDiscount(uint usdt) public view returns(uint256) {
}
//---
// User buys eth at discount according to eth promo rules and his USDT balance available
//---
function buyEthAtDiscount(uint ethWei) public returns(bool) {
}
///---
/// NOTE: Having special end sale function to handle USDT stable coin profit as well is not needed,
/// because owner can always withdraw that profit using 'withdrawUSDT' function.
///---
/**
* This contract has special end sale function to handle USDT stable coin profit as well.
*/
/*function endSale() public onlyOwner {
// transfer remaining FITH tokens from this contract back to owner
require(tokenContract.transfer(owner, tokenContract.balanceOf(address(this))), "Transfer token-sale token balance to owner failed");
// transfer remaining USDT profit from this contract to owner
require(IERC20(usdtContractAddress).transfer(owner, usdtBalances[owner]), "EthPromo/USDT.profit.transfer failed");
// Just transfer the ether balance to the owner
owner.transfer(address(this).balance);
}*/
/**
* Accept ETH for tokens
*/
function () external payable {
}
}
| usdtBalances[msg.sender]>=tokens,"EthPromo/insufficient-USDT-balance" | 22,356 | usdtBalances[msg.sender]>=tokens |
"EthPromo/USDT.transfer failed" | pragma solidity ^0.5.0;
import "./IERC20.sol";
import "./SafeMathLib.sol";
import "./FITHTokenSaleReferrals.sol";
import "./OrFeedInterface.sol";
/**
* @dev Fiatech ETH discount sale promotion contract.
*/
contract FITHTokenSaleRefAndPromo is FITHTokenSaleReferrals
{
using SafeMathLib for uint;
// USDT stable coin smart contrat address
address public usdtContractAddress;
// Oracle feed for ETH/USDT real time exchange rate contrat address
address public orFeedContractAddress;
uint public oneEthAsWei = 10**18;
uint public ethDiscountPercent = 5000; // percent = ethDiscountPercent / 10000 = 0.2 = 20%
// eth each token sale user used to buy tokens
mapping(address => uint) public ethBalances;
// USDT balances for users participating in eth promo
mapping(address => uint) public usdtBalances;
// Eth Discount Percent updated event
event EthDiscountPercentUpdated(address indexed admin, uint newEthDiscountPercent);
// USDT deposit event
event USDTDeposit(address indexed from, uint tokens);
// USDT withdrawal event
event USDTWithdrawal(address indexed from, uint tokens);
// Promo ETH bought event
event PromoEthBought(address indexed user, uint ethWei, uint usdtCost);
/**
* @dev Constructor
*/
constructor(IERC20 _tokenContract, uint256 _tokenPrice, IERC20 _usdStableCoinContract, OrFeedInterface _orFeedContract)
FITHTokenSaleReferrals(_tokenContract, _tokenPrice)
public
{
}
function setOrFeedAddress(OrFeedInterface _orFeedContract) public onlyOwner returns(bool) {
}
function getEthUsdPrice() public view returns(uint) {
}
function getEthWeiAmountPrice(uint ethWeiAmount) public view returns(uint) {
}
// update eth discount percent as integer down to 0.0001 discount
function updateEthDiscountPercent(uint newEthDiscountPercent) public onlyOwner returns(bool) {
}
// referer is address instead of string
function fithBalanceOf(address user) public view returns(uint) {
}
//---
// NOTE: Prior to calling this function, user has to call "approve" on the USDT contract allowing this contract to transfer on his behalf.
// Transfer usdt stable coins on behalf of the user and register amounts for the ETH promo.
// NOTE: This is needed for the ETH prmotion:
// -To register each user USDT amounts for eth promo calculations and also to be able to withdraw user USDT at any time.
//---
function depositUSDTAfterApproval(address from, uint tokens) public returns(bool) {
}
//---
// User withdraws from his USDT balance available
// NOTE: If sender is owner, he withdraws from USDT profit balance available
//---
function withdrawUSDT(uint tokens) public returns(bool) {
require(usdtBalances[msg.sender] >= tokens, "EthPromo/insufficient-USDT-balance");
// this contract transfers USDT to user
require(<FILL_ME>)
// register USDT withdrawals for each user
usdtBalances[msg.sender] = usdtBalances[msg.sender].sub(tokens);
emit USDTWithdrawal(msg.sender, tokens);
return true;
}
//---
// Given eth wei amount return cost in USDT stable coin wei with 6 decimals.
// This function can be used for debug and testing purposes by any user
// and it is useful to see the discounted price in USDT for given amount of eth a user wants to purchase.
//---
function checkEthWeiPromoCost(uint ethWei) public view returns(uint256) {
}
//---
// Function similar to "checkEthWeiPromoCost" but using optimized calculations to compare results.
//---
function checkEthWeiPromoCost_Opt(uint ethWei) public view returns(uint256) {
}
// returns eth cost in USDT stable coin wei with 6 decimals
function calculateEthWeiCost(uint ethWei) public view returns(uint256) {
}
function calculateUSDTWithDiscount(uint usdt) public view returns(uint256) {
}
//---
// User buys eth at discount according to eth promo rules and his USDT balance available
//---
function buyEthAtDiscount(uint ethWei) public returns(bool) {
}
///---
/// NOTE: Having special end sale function to handle USDT stable coin profit as well is not needed,
/// because owner can always withdraw that profit using 'withdrawUSDT' function.
///---
/**
* This contract has special end sale function to handle USDT stable coin profit as well.
*/
/*function endSale() public onlyOwner {
// transfer remaining FITH tokens from this contract back to owner
require(tokenContract.transfer(owner, tokenContract.balanceOf(address(this))), "Transfer token-sale token balance to owner failed");
// transfer remaining USDT profit from this contract to owner
require(IERC20(usdtContractAddress).transfer(owner, usdtBalances[owner]), "EthPromo/USDT.profit.transfer failed");
// Just transfer the ether balance to the owner
owner.transfer(address(this).balance);
}*/
/**
* Accept ETH for tokens
*/
function () external payable {
}
}
| IERC20(usdtContractAddress).transfer(msg.sender,tokens),"EthPromo/USDT.transfer failed" | 22,356 | IERC20(usdtContractAddress).transfer(msg.sender,tokens) |
"EthPromo/eth-promo-limit-reached" | pragma solidity ^0.5.0;
import "./IERC20.sol";
import "./SafeMathLib.sol";
import "./FITHTokenSaleReferrals.sol";
import "./OrFeedInterface.sol";
/**
* @dev Fiatech ETH discount sale promotion contract.
*/
contract FITHTokenSaleRefAndPromo is FITHTokenSaleReferrals
{
using SafeMathLib for uint;
// USDT stable coin smart contrat address
address public usdtContractAddress;
// Oracle feed for ETH/USDT real time exchange rate contrat address
address public orFeedContractAddress;
uint public oneEthAsWei = 10**18;
uint public ethDiscountPercent = 5000; // percent = ethDiscountPercent / 10000 = 0.2 = 20%
// eth each token sale user used to buy tokens
mapping(address => uint) public ethBalances;
// USDT balances for users participating in eth promo
mapping(address => uint) public usdtBalances;
// Eth Discount Percent updated event
event EthDiscountPercentUpdated(address indexed admin, uint newEthDiscountPercent);
// USDT deposit event
event USDTDeposit(address indexed from, uint tokens);
// USDT withdrawal event
event USDTWithdrawal(address indexed from, uint tokens);
// Promo ETH bought event
event PromoEthBought(address indexed user, uint ethWei, uint usdtCost);
/**
* @dev Constructor
*/
constructor(IERC20 _tokenContract, uint256 _tokenPrice, IERC20 _usdStableCoinContract, OrFeedInterface _orFeedContract)
FITHTokenSaleReferrals(_tokenContract, _tokenPrice)
public
{
}
function setOrFeedAddress(OrFeedInterface _orFeedContract) public onlyOwner returns(bool) {
}
function getEthUsdPrice() public view returns(uint) {
}
function getEthWeiAmountPrice(uint ethWeiAmount) public view returns(uint) {
}
// update eth discount percent as integer down to 0.0001 discount
function updateEthDiscountPercent(uint newEthDiscountPercent) public onlyOwner returns(bool) {
}
// referer is address instead of string
function fithBalanceOf(address user) public view returns(uint) {
}
//---
// NOTE: Prior to calling this function, user has to call "approve" on the USDT contract allowing this contract to transfer on his behalf.
// Transfer usdt stable coins on behalf of the user and register amounts for the ETH promo.
// NOTE: This is needed for the ETH prmotion:
// -To register each user USDT amounts for eth promo calculations and also to be able to withdraw user USDT at any time.
//---
function depositUSDTAfterApproval(address from, uint tokens) public returns(bool) {
}
//---
// User withdraws from his USDT balance available
// NOTE: If sender is owner, he withdraws from USDT profit balance available
//---
function withdrawUSDT(uint tokens) public returns(bool) {
}
//---
// Given eth wei amount return cost in USDT stable coin wei with 6 decimals.
// This function can be used for debug and testing purposes by any user
// and it is useful to see the discounted price in USDT for given amount of eth a user wants to purchase.
//---
function checkEthWeiPromoCost(uint ethWei) public view returns(uint256) {
}
//---
// Function similar to "checkEthWeiPromoCost" but using optimized calculations to compare results.
//---
function checkEthWeiPromoCost_Opt(uint ethWei) public view returns(uint256) {
}
// returns eth cost in USDT stable coin wei with 6 decimals
function calculateEthWeiCost(uint ethWei) public view returns(uint256) {
}
function calculateUSDTWithDiscount(uint usdt) public view returns(uint256) {
}
//---
// User buys eth at discount according to eth promo rules and his USDT balance available
//---
function buyEthAtDiscount(uint ethWei) public returns(bool) {
require(<FILL_ME>)
uint usdtCost = checkEthWeiPromoCost(ethWei);
require(usdtCost > 0, "EthPromo/usdtCost-is-zero");
// register USDT withdrawals for each user
usdtBalances[msg.sender] = usdtBalances[msg.sender].sub(usdtCost);
// USDT profit goes to owner that can withdraw anytime after eth sales excluding users balances
usdtBalances[owner] = usdtBalances[owner].add(usdtCost);
// register eth promo left for current user
ethBalances[msg.sender] = ethBalances[msg.sender].sub(ethWei);
// transfer to the user the ether he bought at promotion
(msg.sender).transfer(ethWei);
emit PromoEthBought(msg.sender, ethWei, usdtCost);
return true;
}
///---
/// NOTE: Having special end sale function to handle USDT stable coin profit as well is not needed,
/// because owner can always withdraw that profit using 'withdrawUSDT' function.
///---
/**
* This contract has special end sale function to handle USDT stable coin profit as well.
*/
/*function endSale() public onlyOwner {
// transfer remaining FITH tokens from this contract back to owner
require(tokenContract.transfer(owner, tokenContract.balanceOf(address(this))), "Transfer token-sale token balance to owner failed");
// transfer remaining USDT profit from this contract to owner
require(IERC20(usdtContractAddress).transfer(owner, usdtBalances[owner]), "EthPromo/USDT.profit.transfer failed");
// Just transfer the ether balance to the owner
owner.transfer(address(this).balance);
}*/
/**
* Accept ETH for tokens
*/
function () external payable {
}
}
| ethBalances[msg.sender]>=ethWei,"EthPromo/eth-promo-limit-reached" | 22,356 | ethBalances[msg.sender]>=ethWei |
"Invalid GM secret" | pragma solidity ^0.8.7;
// SPDX-Licence-Identifier: RIGHT-CLICK-SAVE-ONLY
import "../token/token_interface.sol";
import "../recovery/recovery_split.sol";
import "hardhat/console.sol";
struct vData {
address from;
uint256 max_mint;
bytes signature;
}
contract as10k_sale is recovery_split{
address public signer;
mapping (address => uint256) public green_minted;
mapping (address => uint256) public public_minted;
mapping (address => uint256) public admin_minted;
token_interface public token;
mapping (address => bool) admins;
uint256 constant public green_minting_starts = 1644483600;
uint256 constant public public_minting_starts = 1644512400;
uint256 max_public_mint = 3;
modifier onlyAdmin() {
}
constructor(
token_interface _token,
address _signer,
address[] memory _admins,
address[] memory _wallets,
uint256[] memory _shares
) recovery_split(_wallets,_shares) {
}
function admin_mint(uint256 number_to_mint) external onlyAdmin {
}
function public_mint(uint256 number_to_mint) external payable {
}
function mint_green(uint number_to_mint,vData calldata info) external payable {
require(block.timestamp > green_minting_starts,"GM not open");
require(info.from == msg.sender,"Invalid FROM field");
uint256 already_minted = green_minted[msg.sender];
require(already_minted < info.max_mint,"You have already reached your green mint limit");
require(<FILL_ME>)
uint256 spare = info.max_mint - already_minted;
uint256 to_mint = (spare < number_to_mint) ? spare : number_to_mint;
token.mintCards(to_mint,info.from);
green_minted[msg.sender] = already_minted + to_mint;
}
function verify(vData memory info) internal view returns (bool) {
}
}
| verify(info),"Invalid GM secret" | 22,378 | verify(info) |
"exact value in ETH needed" | /**
* Moustache Babys is collection is a collection of 1000 babys on the Ethereum Blockchain.
* Each Baby in our collection is unique.
* WEbsite: https://moustachebabys.com/
*/
// SPDX-License-Identifier: MIT
pragma solidity 0.8.7;
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
contract MoustacheBabys is ERC721Enumerable, Ownable, ReentrancyGuard {
using Strings for uint256;
uint256 public totalTokensToMint = 1000;
bool public isMintingActive = false;
bool public instantRevealActive = false;
uint256 public tokenIndex = 0;
uint256 public totalGiveaways = 0;
mapping(uint256 => uint256) public claimedPerID;
uint256 public pricePerNFT = 60000000000000000; //0.06 ETH
string private _baseTokenURI = "https://moustachebabys.com/api/";
string private _contractURI = "ipfs://QmQzbvbg6B7EM4Vs3P7DisJxNkMcB8ydJcnMBKWiT2DgKA";
constructor() ERC721("Moustache Babys", "MB") {}
function buy(uint256 amount) public payable nonReentrant {
require(amount <= 10, "max 10 tokens");
require(amount > 0, "minimum 1 token");
require(amount <= totalTokensToMint - tokenIndex, "greater than max supply");
require(isMintingActive, "minting is not active");
require(<FILL_ME>)
for (uint256 i = 0; i < amount; i++) {
_mintToken(_msgSender());
}
}
function giveawaysMint(uint256 amount, address _to) public onlyOwner {
}
function _mintToken(address _to) private {
}
function tokensOfOwner(
address _owner,
uint256 _start,
uint256 _limit
) external view returns (uint256[] memory) {
}
function burn(uint256 tokenId) public virtual {
}
function exists(uint256 _tokenId) external view returns (bool) {
}
function isApprovedOrOwner(address _spender, uint256 _tokenId) external view returns (bool) {
}
function contractURI() public view returns (string memory) {
}
//@dev toggle instant Reveal
function stopInstantReveal() external onlyOwner {
}
function startInstantReveal() external onlyOwner {
}
//toggle minting
function stopMinting() external onlyOwner {
}
//toggle minting
function startMinting() external onlyOwner {
}
function tokenURI(uint256 _tokenId) public view override returns (string memory) {
}
function setBaseURI(string memory newBaseURI) public onlyOwner {
}
function setContractURI(string memory newuri) public onlyOwner {
}
//used by admin to lower the total supply [only owner]
function lowerTotalSupply(uint256 _newTotalSupply) public onlyOwner {
}
function setPricePerNFT(uint256 _pricePerNFT) public onlyOwner {
}
// [only owner]
function withdrawEarnings() public onlyOwner {
}
// [only owner]
function reclaimERC20(IERC20 erc20Token) public onlyOwner {
}
}
| pricePerNFT*amount==msg.value,"exact value in ETH needed" | 22,415 | pricePerNFT*amount==msg.value |
"Token already exist." | /**
* Moustache Babys is collection is a collection of 1000 babys on the Ethereum Blockchain.
* Each Baby in our collection is unique.
* WEbsite: https://moustachebabys.com/
*/
// SPDX-License-Identifier: MIT
pragma solidity 0.8.7;
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
contract MoustacheBabys is ERC721Enumerable, Ownable, ReentrancyGuard {
using Strings for uint256;
uint256 public totalTokensToMint = 1000;
bool public isMintingActive = false;
bool public instantRevealActive = false;
uint256 public tokenIndex = 0;
uint256 public totalGiveaways = 0;
mapping(uint256 => uint256) public claimedPerID;
uint256 public pricePerNFT = 60000000000000000; //0.06 ETH
string private _baseTokenURI = "https://moustachebabys.com/api/";
string private _contractURI = "ipfs://QmQzbvbg6B7EM4Vs3P7DisJxNkMcB8ydJcnMBKWiT2DgKA";
constructor() ERC721("Moustache Babys", "MB") {}
function buy(uint256 amount) public payable nonReentrant {
}
function giveawaysMint(uint256 amount, address _to) public onlyOwner {
}
function _mintToken(address _to) private {
tokenIndex++;
require(<FILL_ME>)
_safeMint(_to, tokenIndex);
}
function tokensOfOwner(
address _owner,
uint256 _start,
uint256 _limit
) external view returns (uint256[] memory) {
}
function burn(uint256 tokenId) public virtual {
}
function exists(uint256 _tokenId) external view returns (bool) {
}
function isApprovedOrOwner(address _spender, uint256 _tokenId) external view returns (bool) {
}
function contractURI() public view returns (string memory) {
}
//@dev toggle instant Reveal
function stopInstantReveal() external onlyOwner {
}
function startInstantReveal() external onlyOwner {
}
//toggle minting
function stopMinting() external onlyOwner {
}
//toggle minting
function startMinting() external onlyOwner {
}
function tokenURI(uint256 _tokenId) public view override returns (string memory) {
}
function setBaseURI(string memory newBaseURI) public onlyOwner {
}
function setContractURI(string memory newuri) public onlyOwner {
}
//used by admin to lower the total supply [only owner]
function lowerTotalSupply(uint256 _newTotalSupply) public onlyOwner {
}
function setPricePerNFT(uint256 _pricePerNFT) public onlyOwner {
}
// [only owner]
function withdrawEarnings() public onlyOwner {
}
// [only owner]
function reclaimERC20(IERC20 erc20Token) public onlyOwner {
}
}
| !_exists(tokenIndex),"Token already exist." | 22,415 | !_exists(tokenIndex) |
"Signer and signature do not match" | pragma solidity >= 0.6.6;
contract NativeMetaTransaction is EIP712Base {
using SafeMath for uint;
bytes32 private constant META_TRANSACTION_TYPEHASH = keccak256(
bytes(
"MetaTransaction(uint256 nonce,address from,bytes functionSignature)"
)
);
event MetaTransactionExecuted(
address userAddress,
address payable relayerAddress,
bytes functionSignature
);
mapping(address => uint256) public nonces;
/*
* Meta transaction structure.
* No point of including value field here as if user is doing value transfer then he has the funds to pay for gas
* He should call the desired function directly in that case.
*/
struct MetaTransaction {
uint256 nonce;
address from;
bytes functionSignature;
}
function executeMetaTransaction(
address userAddress,
bytes memory functionSignature,
bytes32 sigR,
bytes32 sigS,
uint8 sigV
) public payable returns (bytes memory) {
MetaTransaction memory metaTx = MetaTransaction({
nonce: nonces[userAddress],
from: userAddress,
functionSignature: functionSignature
});
require(<FILL_ME>)
// increase nonce for user (to avoid re-use)
nonces[userAddress] = nonces[userAddress].add(1);
emit MetaTransactionExecuted(
userAddress,
msg.sender,
functionSignature
);
// Append userAddress and relayer address at the end to extract it from calling context
(bool success, bytes memory returnData) = address(this).call(
abi.encodePacked(functionSignature, userAddress)
);
require(success, "Function call not successful");
return returnData;
}
function hashMetaTransaction(MetaTransaction memory metaTx)
internal
pure
returns (bytes32)
{
}
function getNonce(address user) public view returns (uint256 nonce) {
}
function verify(
address signer,
MetaTransaction memory metaTx,
bytes32 sigR,
bytes32 sigS,
uint8 sigV
) internal view returns (bool) {
}
function _msgSender() internal view returns (address payable sender) {
}
}
| verify(userAddress,metaTx,sigR,sigS,sigV),"Signer and signature do not match" | 22,498 | verify(userAddress,metaTx,sigR,sigS,sigV) |
Subsets and Splits