comment
stringlengths 1
211
β | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
"!want" | pragma solidity ^0.6.0;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/utils/EnumerableSet.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/proxy/Initializable.sol";
import "@openzeppelin/contracts/GSN/Context.sol";
import "../../interfaces/IStrategy.sol";
import "../../interfaces/IController.sol";
abstract contract BaseStrategy is IStrategy, Ownable, Initializable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
using EnumerableSet for EnumerableSet.AddressSet;
event Withdrawn(
address indexed _token,
uint256 indexed _amount,
address indexed _to
);
/// @notice reward token address
address internal _want;
/// @notice Controller instance getter, used to simplify controller-related actions
address public controller;
/// @dev Prevents other msg.sender than controller address
modifier onlyController() {
}
/// @dev Prevents other msg.sender than controller or vault addresses
modifier onlyControllerOrVault() {
}
/// @notice Default initialize method for solving migration linearization problem
/// @dev Called once only by deployer
/// @param _wantAddress address of eurxb instance or address of TokenWrapper(EURxb) instance
/// @param _controllerAddress address of controller instance
function _configure(
address _wantAddress,
address _controllerAddress,
address _governance
) internal {
}
/// @notice Usual setter with check if param is new
/// @param _newController New value
function setController(address _newController) external override onlyOwner {
}
/// @notice Usual setter with check if param is new
/// @param _newWant New value
function setWant(address _newWant) external override onlyOwner {
}
/// @notice Usual getter (inherited from IStrategy)
/// @return 'want' token (In this case EURxb)
function want() external view override returns (address) {
}
/// @notice must exclude any tokens used in the yield
/// @dev Controller role - withdraw should return to Controller
function withdraw(address _token) external virtual override onlyController {
require(<FILL_ME>)
uint256 balance = IERC20(_token).balanceOf(address(this));
IERC20(_token).safeTransfer(controller, balance);
emit Withdrawn(_token, balance, controller);
}
/// @notice Withdraw partial funds, normally used with a vault withdrawal
/// @dev Controller | Vault role - withdraw should always return to Vault
function withdraw(uint256 _amount)
public
virtual
override
onlyControllerOrVault
{
}
/// @notice balance of this address in "want" tokens
function balanceOf() public view virtual override returns (uint256) {
}
function _withdrawSome(uint256 _amount) internal virtual returns (uint256);
}
| address(_token)!=address(_want),"!want" | 8,345 | address(_token)!=address(_want) |
"Pool Error: The amount is too large" | pragma solidity 0.8.6;
/**
* SPDX-License-Identifier: GPL-3.0-or-later
* Hegic
* Copyright (C) 2021 Hegic Protocol
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
**/
import "../Interfaces/Interfaces.sol";
import "../Interfaces/IOptionsManager.sol";
import "../Interfaces/Interfaces.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
/**
* @author 0mllwntrmt3
* @title Hegic Protocol V8888 Main Pool Contract
* @notice One of the main contracts that manages the pools and the options parameters,
* accumulates the funds from the liquidity providers and makes the withdrawals for them,
* sells the options contracts to the options buyers and collateralizes them,
* exercises the ITM (in-the-money) options with the unrealized P&L and settles them,
* unlocks the expired options and distributes the premiums among the liquidity providers.
**/
abstract contract HegicPool is
IHegicPool,
ERC721,
AccessControl,
ReentrancyGuard
{
using SafeERC20 for IERC20;
bytes32 public constant SELLER_ROLE = keccak256("SELLER_ROLE");
uint256 public constant INITIAL_RATE = 1e20;
IOptionsManager public immutable optionsManager;
AggregatorV3Interface public immutable priceProvider;
IPriceCalculator public override pricer;
uint256 public lockupPeriod = 30 days;
uint256 public maxUtilizationRate = 100;
uint256 public override collateralizationRatio = 20;
uint256 public override lockedAmount;
uint256 public maxDepositAmount = type(uint256).max;
uint256 public totalShare = 0;
uint256 public override totalBalance = 0;
ISettlementFeeRecipient public settlementFeeRecipient;
Tranche[] public override tranches;
mapping(uint256 => Option) public override options;
IERC20 public override token;
constructor(
IERC20 _token,
string memory name,
string memory symbol,
IOptionsManager manager,
IPriceCalculator _pricer,
ISettlementFeeRecipient _settlementFeeRecipient,
AggregatorV3Interface _priceProvider
) ERC721(name, symbol) {
}
/**
* @notice Used for setting the liquidity lock-up periods during which
* the liquidity providers who deposited the funds into the pools contracts
* won't be able to withdraw them. Note that different lock-ups could
* be set for the hedged and unhedged β classic β liquidity tranches.
* @param value Liquidity tranches lock-up in seconds
**/
function setLockupPeriod(uint256 value)
external
override
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
/**
* @notice Used for setting the total maximum amount
* that could be deposited into the pools contracts.
* Note that different total maximum amounts could be set
* for the hedged and unhedged β classic β liquidity tranches.
* @param total Maximum amount of assets in the pool
* in hedged and unhedged (classic) liquidity tranches combined
**/
function setMaxDepositAmount(uint256 total)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
/**
* @notice Used for setting the maximum share of the pool
* size that could be utilized as a collateral in the options.
*
* Example: if `MaxUtilizationRate` = 50, then only 50%
* of liquidity on the pools contracts would be used for
* collateralizing options while 50% will be sitting idle
* available for withdrawals by the liquidity providers.
* @param value The utilization ratio in a range of 50% β 100%
**/
function setMaxUtilizationRate(uint256 value)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
/**
* @notice Used for setting the collateralization ratio for the option
* collateral size that will be locked at the moment of buying them.
*
* Example: if `CollateralizationRatio` = 50, then 50% of an option's
* notional size will be locked in the pools at the moment of buying it:
* say, 1 ETH call option will be collateralized with 0.5 ETH (50%).
* Note that if an option holder's net P&L USD value (as options
* are cash-settled) will exceed the amount of the collateral locked
* in the option, she will receive the required amount at the moment
* of exercising the option using the pool's unutilized (unlocked) funds.
* @param value The collateralization ratio in a range of 30% β 100%
**/
function setCollateralizationRatio(uint256 value)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
/**
* @dev See EIP-165: ERC-165 Standard Interface Detection
* https://eips.ethereum.org/EIPS/eip-165.
**/
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721, AccessControl, IERC165)
returns (bool)
{
}
/**
* @notice Used for selling the options contracts
* with the parameters chosen by the option buyer
* such as the period of holding, option size (amount),
* strike price and the premium to be paid for the option.
* @param holder The option buyer address
* @param period The option period
* @param amount The option size
* @param strike The option strike
* @return id ID of ERC721 token linked to the option
**/
function sellOption(
address holder,
uint256 period,
uint256 amount,
uint256 strike
) external override onlyRole(SELLER_ROLE) returns (uint256 id) {
if (strike == 0) strike = _currentPrice();
uint256 balance = totalBalance;
uint256 amountToBeLocked = _calculateLockedAmount(amount);
require(period >= 1 days, "Pool Error: The period is too short");
require(period <= 90 days, "Pool Error: The period is too long");
require(<FILL_ME>)
(uint256 settlementFee, uint256 premium) =
_calculateTotalPremium(period, amount, strike);
//
// uint256 hedgedPremiumTotal = (premium * hedgedBalance) / balance;
// uint256 hedgeFee = (hedgedPremiumTotal * hedgeFeeRate) / 100;
// uint256 hedgePremium = hedgedPremiumTotal - hedgeFee;
// uint256 unhedgePremium = premium - hedgedPremiumTotal;
lockedAmount += amountToBeLocked;
id = optionsManager.createOptionFor(holder);
options[id] = Option(
OptionState.Active,
uint112(strike),
uint120(amount),
uint120(amountToBeLocked),
uint40(block.timestamp + period),
uint120(premium)
);
token.safeTransferFrom(
_msgSender(),
address(this),
premium + settlementFee
);
if (settlementFee > 0) {
token.safeTransfer(address(settlementFeeRecipient), settlementFee);
settlementFeeRecipient.distributeUnrealizedRewards();
}
emit Acquired(id, settlementFee, premium);
}
/**
* @notice Used for setting the price calculator
* contract that will be used for pricing the options.
* @param pc A new price calculator contract address
**/
function setPriceCalculator(IPriceCalculator pc)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
/**
* @notice Used for exercising the ITM (in-the-money)
* options contracts in case of having the unrealized profits
* accrued during the period of holding the option contract.
* @param id ID of ERC721 token linked to the option
**/
function exercise(uint256 id) external override {
}
function _send(address to, uint256 transferAmount) private {
}
/**
* @notice Used for unlocking the expired OTM (out-of-the-money)
* options contracts in case if there was no unrealized P&L
* accrued during the period of holding a particular option.
* Note that the `unlock` function releases the liquidity that
* was locked in the option when it was active and the premiums
* that are distributed pro rata among the liquidity providers.
* @param id ID of ERC721 token linked to the option
**/
function unlock(uint256 id) external override {
}
function _unlock(Option storage option) internal {
}
function _calculateLockedAmount(uint256 amount)
internal
virtual
returns (uint256)
{
}
/**
* @notice Used for depositing the funds into the pool
* and minting the liquidity tranche ERC721 token
* which represents the liquidity provider's share
* in the pool and her unrealized P&L for this tranche.
* @param account The liquidity provider's address
* @param amount The size of the liquidity tranche
* @param minShare The minimum share in the pool for the user
**/
function provideFrom(
address account,
uint256 amount,
bool,
uint256 minShare
) external override nonReentrant returns (uint256 share) {
}
/**
* @notice Used for withdrawing the funds from the pool
* plus the net positive P&L earned or
* minus the net negative P&L lost on
* providing liquidity and selling options.
* @param trancheID The liquidity tranche ID
* @return amount The amount received after the withdrawal
**/
function withdraw(uint256 trancheID)
external
override
nonReentrant
returns (uint256 amount)
{
}
/**
* @notice Used for withdrawing the funds from the pool
* by the hedged liquidity tranches providers
* in case of an urgent need to withdraw the liquidity
* without receiving the loss compensation from
* the hedging pool: the net difference between
* the amount deposited and the withdrawal amount.
* @param trancheID ID of liquidity tranche
* @return amount The amount received after the withdrawal
**/
function withdrawWithoutHedge(uint256 trancheID)
external
override
nonReentrant
returns (uint256 amount)
{
}
function _withdraw(address owner, uint256 trancheID)
internal
returns (uint256 amount)
{
}
/**
* @return balance Returns the amount of liquidity available for withdrawing
**/
function availableBalance() public view returns (uint256 balance) {
}
// /**
// * @return balance Returns the total balance of liquidity provided to the pool
// **/
// function totalBalance() public view override returns (uint256 balance) {
// return hedgedBalance + unhedgedBalance;
// }
function _beforeTokenTransfer(
address,
address,
uint256 id
) internal view override {
}
/**
* @notice Returns the amount of unrealized P&L of the option
* that could be received by the option holder in case
* if she exercises it as an ITM (in-the-money) option.
* @param id ID of ERC721 token linked to the option
**/
function profitOf(uint256 id) external view returns (uint256) {
}
function _profitOf(Option memory option)
internal
view
virtual
returns (uint256 amount);
/**
* @notice Used for calculating the `TotalPremium`
* for the particular option with regards to
* the parameters chosen by the option buyer
* such as the period of holding, size (amount)
* and strike price.
* @param period The period of holding the option
* @param period The size of the option
**/
function calculateTotalPremium(
uint256 period,
uint256 amount,
uint256 strike
) external view override returns (uint256 settlementFee, uint256 premium) {
}
function _calculateTotalPremium(
uint256 period,
uint256 amount,
uint256 strike
) internal view virtual returns (uint256 settlementFee, uint256 premium) {
}
/**
* @notice Used for changing the `settlementFeeRecipient`
* contract address for distributing the settlement fees
* (staking rewards) among the staking participants.
* @param recipient New staking contract address
**/
function setSettlementFeeRecipient(IHegicStaking recipient)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function _currentPrice() internal view returns (uint256 price) {
}
}
| (lockedAmount+amountToBeLocked)*100<=balance*maxUtilizationRate,"Pool Error: The amount is too large" | 8,369 | (lockedAmount+amountToBeLocked)*100<=balance*maxUtilizationRate |
"Pool Error: msg.sender can't exercise this option" | pragma solidity 0.8.6;
/**
* SPDX-License-Identifier: GPL-3.0-or-later
* Hegic
* Copyright (C) 2021 Hegic Protocol
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
**/
import "../Interfaces/Interfaces.sol";
import "../Interfaces/IOptionsManager.sol";
import "../Interfaces/Interfaces.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
/**
* @author 0mllwntrmt3
* @title Hegic Protocol V8888 Main Pool Contract
* @notice One of the main contracts that manages the pools and the options parameters,
* accumulates the funds from the liquidity providers and makes the withdrawals for them,
* sells the options contracts to the options buyers and collateralizes them,
* exercises the ITM (in-the-money) options with the unrealized P&L and settles them,
* unlocks the expired options and distributes the premiums among the liquidity providers.
**/
abstract contract HegicPool is
IHegicPool,
ERC721,
AccessControl,
ReentrancyGuard
{
using SafeERC20 for IERC20;
bytes32 public constant SELLER_ROLE = keccak256("SELLER_ROLE");
uint256 public constant INITIAL_RATE = 1e20;
IOptionsManager public immutable optionsManager;
AggregatorV3Interface public immutable priceProvider;
IPriceCalculator public override pricer;
uint256 public lockupPeriod = 30 days;
uint256 public maxUtilizationRate = 100;
uint256 public override collateralizationRatio = 20;
uint256 public override lockedAmount;
uint256 public maxDepositAmount = type(uint256).max;
uint256 public totalShare = 0;
uint256 public override totalBalance = 0;
ISettlementFeeRecipient public settlementFeeRecipient;
Tranche[] public override tranches;
mapping(uint256 => Option) public override options;
IERC20 public override token;
constructor(
IERC20 _token,
string memory name,
string memory symbol,
IOptionsManager manager,
IPriceCalculator _pricer,
ISettlementFeeRecipient _settlementFeeRecipient,
AggregatorV3Interface _priceProvider
) ERC721(name, symbol) {
}
/**
* @notice Used for setting the liquidity lock-up periods during which
* the liquidity providers who deposited the funds into the pools contracts
* won't be able to withdraw them. Note that different lock-ups could
* be set for the hedged and unhedged β classic β liquidity tranches.
* @param value Liquidity tranches lock-up in seconds
**/
function setLockupPeriod(uint256 value)
external
override
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
/**
* @notice Used for setting the total maximum amount
* that could be deposited into the pools contracts.
* Note that different total maximum amounts could be set
* for the hedged and unhedged β classic β liquidity tranches.
* @param total Maximum amount of assets in the pool
* in hedged and unhedged (classic) liquidity tranches combined
**/
function setMaxDepositAmount(uint256 total)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
/**
* @notice Used for setting the maximum share of the pool
* size that could be utilized as a collateral in the options.
*
* Example: if `MaxUtilizationRate` = 50, then only 50%
* of liquidity on the pools contracts would be used for
* collateralizing options while 50% will be sitting idle
* available for withdrawals by the liquidity providers.
* @param value The utilization ratio in a range of 50% β 100%
**/
function setMaxUtilizationRate(uint256 value)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
/**
* @notice Used for setting the collateralization ratio for the option
* collateral size that will be locked at the moment of buying them.
*
* Example: if `CollateralizationRatio` = 50, then 50% of an option's
* notional size will be locked in the pools at the moment of buying it:
* say, 1 ETH call option will be collateralized with 0.5 ETH (50%).
* Note that if an option holder's net P&L USD value (as options
* are cash-settled) will exceed the amount of the collateral locked
* in the option, she will receive the required amount at the moment
* of exercising the option using the pool's unutilized (unlocked) funds.
* @param value The collateralization ratio in a range of 30% β 100%
**/
function setCollateralizationRatio(uint256 value)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
/**
* @dev See EIP-165: ERC-165 Standard Interface Detection
* https://eips.ethereum.org/EIPS/eip-165.
**/
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721, AccessControl, IERC165)
returns (bool)
{
}
/**
* @notice Used for selling the options contracts
* with the parameters chosen by the option buyer
* such as the period of holding, option size (amount),
* strike price and the premium to be paid for the option.
* @param holder The option buyer address
* @param period The option period
* @param amount The option size
* @param strike The option strike
* @return id ID of ERC721 token linked to the option
**/
function sellOption(
address holder,
uint256 period,
uint256 amount,
uint256 strike
) external override onlyRole(SELLER_ROLE) returns (uint256 id) {
}
/**
* @notice Used for setting the price calculator
* contract that will be used for pricing the options.
* @param pc A new price calculator contract address
**/
function setPriceCalculator(IPriceCalculator pc)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
/**
* @notice Used for exercising the ITM (in-the-money)
* options contracts in case of having the unrealized profits
* accrued during the period of holding the option contract.
* @param id ID of ERC721 token linked to the option
**/
function exercise(uint256 id) external override {
Option storage option = options[id];
uint256 profit = _profitOf(option);
require(<FILL_ME>)
require(
option.expired > block.timestamp,
"Pool Error: The option has already expired"
);
require(
profit > 0,
"Pool Error: There are no unrealized profits for this option"
);
_unlock(option);
option.state = OptionState.Exercised;
_send(optionsManager.ownerOf(id), profit);
emit Exercised(id, profit);
}
function _send(address to, uint256 transferAmount) private {
}
/**
* @notice Used for unlocking the expired OTM (out-of-the-money)
* options contracts in case if there was no unrealized P&L
* accrued during the period of holding a particular option.
* Note that the `unlock` function releases the liquidity that
* was locked in the option when it was active and the premiums
* that are distributed pro rata among the liquidity providers.
* @param id ID of ERC721 token linked to the option
**/
function unlock(uint256 id) external override {
}
function _unlock(Option storage option) internal {
}
function _calculateLockedAmount(uint256 amount)
internal
virtual
returns (uint256)
{
}
/**
* @notice Used for depositing the funds into the pool
* and minting the liquidity tranche ERC721 token
* which represents the liquidity provider's share
* in the pool and her unrealized P&L for this tranche.
* @param account The liquidity provider's address
* @param amount The size of the liquidity tranche
* @param minShare The minimum share in the pool for the user
**/
function provideFrom(
address account,
uint256 amount,
bool,
uint256 minShare
) external override nonReentrant returns (uint256 share) {
}
/**
* @notice Used for withdrawing the funds from the pool
* plus the net positive P&L earned or
* minus the net negative P&L lost on
* providing liquidity and selling options.
* @param trancheID The liquidity tranche ID
* @return amount The amount received after the withdrawal
**/
function withdraw(uint256 trancheID)
external
override
nonReentrant
returns (uint256 amount)
{
}
/**
* @notice Used for withdrawing the funds from the pool
* by the hedged liquidity tranches providers
* in case of an urgent need to withdraw the liquidity
* without receiving the loss compensation from
* the hedging pool: the net difference between
* the amount deposited and the withdrawal amount.
* @param trancheID ID of liquidity tranche
* @return amount The amount received after the withdrawal
**/
function withdrawWithoutHedge(uint256 trancheID)
external
override
nonReentrant
returns (uint256 amount)
{
}
function _withdraw(address owner, uint256 trancheID)
internal
returns (uint256 amount)
{
}
/**
* @return balance Returns the amount of liquidity available for withdrawing
**/
function availableBalance() public view returns (uint256 balance) {
}
// /**
// * @return balance Returns the total balance of liquidity provided to the pool
// **/
// function totalBalance() public view override returns (uint256 balance) {
// return hedgedBalance + unhedgedBalance;
// }
function _beforeTokenTransfer(
address,
address,
uint256 id
) internal view override {
}
/**
* @notice Returns the amount of unrealized P&L of the option
* that could be received by the option holder in case
* if she exercises it as an ITM (in-the-money) option.
* @param id ID of ERC721 token linked to the option
**/
function profitOf(uint256 id) external view returns (uint256) {
}
function _profitOf(Option memory option)
internal
view
virtual
returns (uint256 amount);
/**
* @notice Used for calculating the `TotalPremium`
* for the particular option with regards to
* the parameters chosen by the option buyer
* such as the period of holding, size (amount)
* and strike price.
* @param period The period of holding the option
* @param period The size of the option
**/
function calculateTotalPremium(
uint256 period,
uint256 amount,
uint256 strike
) external view override returns (uint256 settlementFee, uint256 premium) {
}
function _calculateTotalPremium(
uint256 period,
uint256 amount,
uint256 strike
) internal view virtual returns (uint256 settlementFee, uint256 premium) {
}
/**
* @notice Used for changing the `settlementFeeRecipient`
* contract address for distributing the settlement fees
* (staking rewards) among the staking participants.
* @param recipient New staking contract address
**/
function setSettlementFeeRecipient(IHegicStaking recipient)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function _currentPrice() internal view returns (uint256 price) {
}
}
| optionsManager.isApprovedOrOwner(_msgSender(),id),"Pool Error: msg.sender can't exercise this option" | 8,369 | optionsManager.isApprovedOrOwner(_msgSender(),id) |
null | pragma solidity 0.8.6;
/**
* SPDX-License-Identifier: GPL-3.0-or-later
* Hegic
* Copyright (C) 2021 Hegic Protocol
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
**/
import "../Interfaces/Interfaces.sol";
import "../Interfaces/IOptionsManager.sol";
import "../Interfaces/Interfaces.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
/**
* @author 0mllwntrmt3
* @title Hegic Protocol V8888 Main Pool Contract
* @notice One of the main contracts that manages the pools and the options parameters,
* accumulates the funds from the liquidity providers and makes the withdrawals for them,
* sells the options contracts to the options buyers and collateralizes them,
* exercises the ITM (in-the-money) options with the unrealized P&L and settles them,
* unlocks the expired options and distributes the premiums among the liquidity providers.
**/
abstract contract HegicPool is
IHegicPool,
ERC721,
AccessControl,
ReentrancyGuard
{
using SafeERC20 for IERC20;
bytes32 public constant SELLER_ROLE = keccak256("SELLER_ROLE");
uint256 public constant INITIAL_RATE = 1e20;
IOptionsManager public immutable optionsManager;
AggregatorV3Interface public immutable priceProvider;
IPriceCalculator public override pricer;
uint256 public lockupPeriod = 30 days;
uint256 public maxUtilizationRate = 100;
uint256 public override collateralizationRatio = 20;
uint256 public override lockedAmount;
uint256 public maxDepositAmount = type(uint256).max;
uint256 public totalShare = 0;
uint256 public override totalBalance = 0;
ISettlementFeeRecipient public settlementFeeRecipient;
Tranche[] public override tranches;
mapping(uint256 => Option) public override options;
IERC20 public override token;
constructor(
IERC20 _token,
string memory name,
string memory symbol,
IOptionsManager manager,
IPriceCalculator _pricer,
ISettlementFeeRecipient _settlementFeeRecipient,
AggregatorV3Interface _priceProvider
) ERC721(name, symbol) {
}
/**
* @notice Used for setting the liquidity lock-up periods during which
* the liquidity providers who deposited the funds into the pools contracts
* won't be able to withdraw them. Note that different lock-ups could
* be set for the hedged and unhedged β classic β liquidity tranches.
* @param value Liquidity tranches lock-up in seconds
**/
function setLockupPeriod(uint256 value)
external
override
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
/**
* @notice Used for setting the total maximum amount
* that could be deposited into the pools contracts.
* Note that different total maximum amounts could be set
* for the hedged and unhedged β classic β liquidity tranches.
* @param total Maximum amount of assets in the pool
* in hedged and unhedged (classic) liquidity tranches combined
**/
function setMaxDepositAmount(uint256 total)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
/**
* @notice Used for setting the maximum share of the pool
* size that could be utilized as a collateral in the options.
*
* Example: if `MaxUtilizationRate` = 50, then only 50%
* of liquidity on the pools contracts would be used for
* collateralizing options while 50% will be sitting idle
* available for withdrawals by the liquidity providers.
* @param value The utilization ratio in a range of 50% β 100%
**/
function setMaxUtilizationRate(uint256 value)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
/**
* @notice Used for setting the collateralization ratio for the option
* collateral size that will be locked at the moment of buying them.
*
* Example: if `CollateralizationRatio` = 50, then 50% of an option's
* notional size will be locked in the pools at the moment of buying it:
* say, 1 ETH call option will be collateralized with 0.5 ETH (50%).
* Note that if an option holder's net P&L USD value (as options
* are cash-settled) will exceed the amount of the collateral locked
* in the option, she will receive the required amount at the moment
* of exercising the option using the pool's unutilized (unlocked) funds.
* @param value The collateralization ratio in a range of 30% β 100%
**/
function setCollateralizationRatio(uint256 value)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
/**
* @dev See EIP-165: ERC-165 Standard Interface Detection
* https://eips.ethereum.org/EIPS/eip-165.
**/
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721, AccessControl, IERC165)
returns (bool)
{
}
/**
* @notice Used for selling the options contracts
* with the parameters chosen by the option buyer
* such as the period of holding, option size (amount),
* strike price and the premium to be paid for the option.
* @param holder The option buyer address
* @param period The option period
* @param amount The option size
* @param strike The option strike
* @return id ID of ERC721 token linked to the option
**/
function sellOption(
address holder,
uint256 period,
uint256 amount,
uint256 strike
) external override onlyRole(SELLER_ROLE) returns (uint256 id) {
}
/**
* @notice Used for setting the price calculator
* contract that will be used for pricing the options.
* @param pc A new price calculator contract address
**/
function setPriceCalculator(IPriceCalculator pc)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
/**
* @notice Used for exercising the ITM (in-the-money)
* options contracts in case of having the unrealized profits
* accrued during the period of holding the option contract.
* @param id ID of ERC721 token linked to the option
**/
function exercise(uint256 id) external override {
}
function _send(address to, uint256 transferAmount) private {
}
/**
* @notice Used for unlocking the expired OTM (out-of-the-money)
* options contracts in case if there was no unrealized P&L
* accrued during the period of holding a particular option.
* Note that the `unlock` function releases the liquidity that
* was locked in the option when it was active and the premiums
* that are distributed pro rata among the liquidity providers.
* @param id ID of ERC721 token linked to the option
**/
function unlock(uint256 id) external override {
}
function _unlock(Option storage option) internal {
}
function _calculateLockedAmount(uint256 amount)
internal
virtual
returns (uint256)
{
}
/**
* @notice Used for depositing the funds into the pool
* and minting the liquidity tranche ERC721 token
* which represents the liquidity provider's share
* in the pool and her unrealized P&L for this tranche.
* @param account The liquidity provider's address
* @param amount The size of the liquidity tranche
* @param minShare The minimum share in the pool for the user
**/
function provideFrom(
address account,
uint256 amount,
bool,
uint256 minShare
) external override nonReentrant returns (uint256 share) {
}
/**
* @notice Used for withdrawing the funds from the pool
* plus the net positive P&L earned or
* minus the net negative P&L lost on
* providing liquidity and selling options.
* @param trancheID The liquidity tranche ID
* @return amount The amount received after the withdrawal
**/
function withdraw(uint256 trancheID)
external
override
nonReentrant
returns (uint256 amount)
{
}
/**
* @notice Used for withdrawing the funds from the pool
* by the hedged liquidity tranches providers
* in case of an urgent need to withdraw the liquidity
* without receiving the loss compensation from
* the hedging pool: the net difference between
* the amount deposited and the withdrawal amount.
* @param trancheID ID of liquidity tranche
* @return amount The amount received after the withdrawal
**/
function withdrawWithoutHedge(uint256 trancheID)
external
override
nonReentrant
returns (uint256 amount)
{
}
function _withdraw(address owner, uint256 trancheID)
internal
returns (uint256 amount)
{
Tranche storage t = tranches[trancheID];
// uint256 lockupPeriod =
// t.hedged
// ? lockupPeriodForHedgedTranches
// : lockupPeriodForUnhedgedTranches;
// require(t.state == TrancheState.Open);
require(<FILL_ME>)
require(
block.timestamp > t.creationTimestamp + lockupPeriod,
"Pool Error: The withdrawal is locked up"
);
t.state = TrancheState.Closed;
// if (t.hedged) {
// amount = (t.share * hedgedBalance) / hedgedShare;
// hedgedShare -= t.share;
// hedgedBalance -= amount;
// } else {
amount = (t.share * totalBalance) / totalShare;
totalShare -= t.share;
totalBalance -= amount;
// }
token.safeTransfer(owner, amount);
}
/**
* @return balance Returns the amount of liquidity available for withdrawing
**/
function availableBalance() public view returns (uint256 balance) {
}
// /**
// * @return balance Returns the total balance of liquidity provided to the pool
// **/
// function totalBalance() public view override returns (uint256 balance) {
// return hedgedBalance + unhedgedBalance;
// }
function _beforeTokenTransfer(
address,
address,
uint256 id
) internal view override {
}
/**
* @notice Returns the amount of unrealized P&L of the option
* that could be received by the option holder in case
* if she exercises it as an ITM (in-the-money) option.
* @param id ID of ERC721 token linked to the option
**/
function profitOf(uint256 id) external view returns (uint256) {
}
function _profitOf(Option memory option)
internal
view
virtual
returns (uint256 amount);
/**
* @notice Used for calculating the `TotalPremium`
* for the particular option with regards to
* the parameters chosen by the option buyer
* such as the period of holding, size (amount)
* and strike price.
* @param period The period of holding the option
* @param period The size of the option
**/
function calculateTotalPremium(
uint256 period,
uint256 amount,
uint256 strike
) external view override returns (uint256 settlementFee, uint256 premium) {
}
function _calculateTotalPremium(
uint256 period,
uint256 amount,
uint256 strike
) internal view virtual returns (uint256 settlementFee, uint256 premium) {
}
/**
* @notice Used for changing the `settlementFeeRecipient`
* contract address for distributing the settlement fees
* (staking rewards) among the staking participants.
* @param recipient New staking contract address
**/
function setSettlementFeeRecipient(IHegicStaking recipient)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function _currentPrice() internal view returns (uint256 price) {
}
}
| _isApprovedOrOwner(_msgSender(),trancheID) | 8,369 | _isApprovedOrOwner(_msgSender(),trancheID) |
"Pool Error: The closed tranches can not be transferred" | pragma solidity 0.8.6;
/**
* SPDX-License-Identifier: GPL-3.0-or-later
* Hegic
* Copyright (C) 2021 Hegic Protocol
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
**/
import "../Interfaces/Interfaces.sol";
import "../Interfaces/IOptionsManager.sol";
import "../Interfaces/Interfaces.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
/**
* @author 0mllwntrmt3
* @title Hegic Protocol V8888 Main Pool Contract
* @notice One of the main contracts that manages the pools and the options parameters,
* accumulates the funds from the liquidity providers and makes the withdrawals for them,
* sells the options contracts to the options buyers and collateralizes them,
* exercises the ITM (in-the-money) options with the unrealized P&L and settles them,
* unlocks the expired options and distributes the premiums among the liquidity providers.
**/
abstract contract HegicPool is
IHegicPool,
ERC721,
AccessControl,
ReentrancyGuard
{
using SafeERC20 for IERC20;
bytes32 public constant SELLER_ROLE = keccak256("SELLER_ROLE");
uint256 public constant INITIAL_RATE = 1e20;
IOptionsManager public immutable optionsManager;
AggregatorV3Interface public immutable priceProvider;
IPriceCalculator public override pricer;
uint256 public lockupPeriod = 30 days;
uint256 public maxUtilizationRate = 100;
uint256 public override collateralizationRatio = 20;
uint256 public override lockedAmount;
uint256 public maxDepositAmount = type(uint256).max;
uint256 public totalShare = 0;
uint256 public override totalBalance = 0;
ISettlementFeeRecipient public settlementFeeRecipient;
Tranche[] public override tranches;
mapping(uint256 => Option) public override options;
IERC20 public override token;
constructor(
IERC20 _token,
string memory name,
string memory symbol,
IOptionsManager manager,
IPriceCalculator _pricer,
ISettlementFeeRecipient _settlementFeeRecipient,
AggregatorV3Interface _priceProvider
) ERC721(name, symbol) {
}
/**
* @notice Used for setting the liquidity lock-up periods during which
* the liquidity providers who deposited the funds into the pools contracts
* won't be able to withdraw them. Note that different lock-ups could
* be set for the hedged and unhedged β classic β liquidity tranches.
* @param value Liquidity tranches lock-up in seconds
**/
function setLockupPeriod(uint256 value)
external
override
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
/**
* @notice Used for setting the total maximum amount
* that could be deposited into the pools contracts.
* Note that different total maximum amounts could be set
* for the hedged and unhedged β classic β liquidity tranches.
* @param total Maximum amount of assets in the pool
* in hedged and unhedged (classic) liquidity tranches combined
**/
function setMaxDepositAmount(uint256 total)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
/**
* @notice Used for setting the maximum share of the pool
* size that could be utilized as a collateral in the options.
*
* Example: if `MaxUtilizationRate` = 50, then only 50%
* of liquidity on the pools contracts would be used for
* collateralizing options while 50% will be sitting idle
* available for withdrawals by the liquidity providers.
* @param value The utilization ratio in a range of 50% β 100%
**/
function setMaxUtilizationRate(uint256 value)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
/**
* @notice Used for setting the collateralization ratio for the option
* collateral size that will be locked at the moment of buying them.
*
* Example: if `CollateralizationRatio` = 50, then 50% of an option's
* notional size will be locked in the pools at the moment of buying it:
* say, 1 ETH call option will be collateralized with 0.5 ETH (50%).
* Note that if an option holder's net P&L USD value (as options
* are cash-settled) will exceed the amount of the collateral locked
* in the option, she will receive the required amount at the moment
* of exercising the option using the pool's unutilized (unlocked) funds.
* @param value The collateralization ratio in a range of 30% β 100%
**/
function setCollateralizationRatio(uint256 value)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
/**
* @dev See EIP-165: ERC-165 Standard Interface Detection
* https://eips.ethereum.org/EIPS/eip-165.
**/
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721, AccessControl, IERC165)
returns (bool)
{
}
/**
* @notice Used for selling the options contracts
* with the parameters chosen by the option buyer
* such as the period of holding, option size (amount),
* strike price and the premium to be paid for the option.
* @param holder The option buyer address
* @param period The option period
* @param amount The option size
* @param strike The option strike
* @return id ID of ERC721 token linked to the option
**/
function sellOption(
address holder,
uint256 period,
uint256 amount,
uint256 strike
) external override onlyRole(SELLER_ROLE) returns (uint256 id) {
}
/**
* @notice Used for setting the price calculator
* contract that will be used for pricing the options.
* @param pc A new price calculator contract address
**/
function setPriceCalculator(IPriceCalculator pc)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
/**
* @notice Used for exercising the ITM (in-the-money)
* options contracts in case of having the unrealized profits
* accrued during the period of holding the option contract.
* @param id ID of ERC721 token linked to the option
**/
function exercise(uint256 id) external override {
}
function _send(address to, uint256 transferAmount) private {
}
/**
* @notice Used for unlocking the expired OTM (out-of-the-money)
* options contracts in case if there was no unrealized P&L
* accrued during the period of holding a particular option.
* Note that the `unlock` function releases the liquidity that
* was locked in the option when it was active and the premiums
* that are distributed pro rata among the liquidity providers.
* @param id ID of ERC721 token linked to the option
**/
function unlock(uint256 id) external override {
}
function _unlock(Option storage option) internal {
}
function _calculateLockedAmount(uint256 amount)
internal
virtual
returns (uint256)
{
}
/**
* @notice Used for depositing the funds into the pool
* and minting the liquidity tranche ERC721 token
* which represents the liquidity provider's share
* in the pool and her unrealized P&L for this tranche.
* @param account The liquidity provider's address
* @param amount The size of the liquidity tranche
* @param minShare The minimum share in the pool for the user
**/
function provideFrom(
address account,
uint256 amount,
bool,
uint256 minShare
) external override nonReentrant returns (uint256 share) {
}
/**
* @notice Used for withdrawing the funds from the pool
* plus the net positive P&L earned or
* minus the net negative P&L lost on
* providing liquidity and selling options.
* @param trancheID The liquidity tranche ID
* @return amount The amount received after the withdrawal
**/
function withdraw(uint256 trancheID)
external
override
nonReentrant
returns (uint256 amount)
{
}
/**
* @notice Used for withdrawing the funds from the pool
* by the hedged liquidity tranches providers
* in case of an urgent need to withdraw the liquidity
* without receiving the loss compensation from
* the hedging pool: the net difference between
* the amount deposited and the withdrawal amount.
* @param trancheID ID of liquidity tranche
* @return amount The amount received after the withdrawal
**/
function withdrawWithoutHedge(uint256 trancheID)
external
override
nonReentrant
returns (uint256 amount)
{
}
function _withdraw(address owner, uint256 trancheID)
internal
returns (uint256 amount)
{
}
/**
* @return balance Returns the amount of liquidity available for withdrawing
**/
function availableBalance() public view returns (uint256 balance) {
}
// /**
// * @return balance Returns the total balance of liquidity provided to the pool
// **/
// function totalBalance() public view override returns (uint256 balance) {
// return hedgedBalance + unhedgedBalance;
// }
function _beforeTokenTransfer(
address,
address,
uint256 id
) internal view override {
require(<FILL_ME>)
}
/**
* @notice Returns the amount of unrealized P&L of the option
* that could be received by the option holder in case
* if she exercises it as an ITM (in-the-money) option.
* @param id ID of ERC721 token linked to the option
**/
function profitOf(uint256 id) external view returns (uint256) {
}
function _profitOf(Option memory option)
internal
view
virtual
returns (uint256 amount);
/**
* @notice Used for calculating the `TotalPremium`
* for the particular option with regards to
* the parameters chosen by the option buyer
* such as the period of holding, size (amount)
* and strike price.
* @param period The period of holding the option
* @param period The size of the option
**/
function calculateTotalPremium(
uint256 period,
uint256 amount,
uint256 strike
) external view override returns (uint256 settlementFee, uint256 premium) {
}
function _calculateTotalPremium(
uint256 period,
uint256 amount,
uint256 strike
) internal view virtual returns (uint256 settlementFee, uint256 premium) {
}
/**
* @notice Used for changing the `settlementFeeRecipient`
* contract address for distributing the settlement fees
* (staking rewards) among the staking participants.
* @param recipient New staking contract address
**/
function setSettlementFeeRecipient(IHegicStaking recipient)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function _currentPrice() internal view returns (uint256 price) {
}
}
| tranches[id].state==TrancheState.Open,"Pool Error: The closed tranches can not be transferred" | 8,369 | tranches[id].state==TrancheState.Open |
null | pragma solidity 0.8.6;
/**
* SPDX-License-Identifier: GPL-3.0-or-later
* Hegic
* Copyright (C) 2021 Hegic Protocol
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
**/
import "../Interfaces/Interfaces.sol";
import "../Interfaces/IOptionsManager.sol";
import "../Interfaces/Interfaces.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
/**
* @author 0mllwntrmt3
* @title Hegic Protocol V8888 Main Pool Contract
* @notice One of the main contracts that manages the pools and the options parameters,
* accumulates the funds from the liquidity providers and makes the withdrawals for them,
* sells the options contracts to the options buyers and collateralizes them,
* exercises the ITM (in-the-money) options with the unrealized P&L and settles them,
* unlocks the expired options and distributes the premiums among the liquidity providers.
**/
abstract contract HegicPool is
IHegicPool,
ERC721,
AccessControl,
ReentrancyGuard
{
using SafeERC20 for IERC20;
bytes32 public constant SELLER_ROLE = keccak256("SELLER_ROLE");
uint256 public constant INITIAL_RATE = 1e20;
IOptionsManager public immutable optionsManager;
AggregatorV3Interface public immutable priceProvider;
IPriceCalculator public override pricer;
uint256 public lockupPeriod = 30 days;
uint256 public maxUtilizationRate = 100;
uint256 public override collateralizationRatio = 20;
uint256 public override lockedAmount;
uint256 public maxDepositAmount = type(uint256).max;
uint256 public totalShare = 0;
uint256 public override totalBalance = 0;
ISettlementFeeRecipient public settlementFeeRecipient;
Tranche[] public override tranches;
mapping(uint256 => Option) public override options;
IERC20 public override token;
constructor(
IERC20 _token,
string memory name,
string memory symbol,
IOptionsManager manager,
IPriceCalculator _pricer,
ISettlementFeeRecipient _settlementFeeRecipient,
AggregatorV3Interface _priceProvider
) ERC721(name, symbol) {
}
/**
* @notice Used for setting the liquidity lock-up periods during which
* the liquidity providers who deposited the funds into the pools contracts
* won't be able to withdraw them. Note that different lock-ups could
* be set for the hedged and unhedged β classic β liquidity tranches.
* @param value Liquidity tranches lock-up in seconds
**/
function setLockupPeriod(uint256 value)
external
override
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
/**
* @notice Used for setting the total maximum amount
* that could be deposited into the pools contracts.
* Note that different total maximum amounts could be set
* for the hedged and unhedged β classic β liquidity tranches.
* @param total Maximum amount of assets in the pool
* in hedged and unhedged (classic) liquidity tranches combined
**/
function setMaxDepositAmount(uint256 total)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
/**
* @notice Used for setting the maximum share of the pool
* size that could be utilized as a collateral in the options.
*
* Example: if `MaxUtilizationRate` = 50, then only 50%
* of liquidity on the pools contracts would be used for
* collateralizing options while 50% will be sitting idle
* available for withdrawals by the liquidity providers.
* @param value The utilization ratio in a range of 50% β 100%
**/
function setMaxUtilizationRate(uint256 value)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
/**
* @notice Used for setting the collateralization ratio for the option
* collateral size that will be locked at the moment of buying them.
*
* Example: if `CollateralizationRatio` = 50, then 50% of an option's
* notional size will be locked in the pools at the moment of buying it:
* say, 1 ETH call option will be collateralized with 0.5 ETH (50%).
* Note that if an option holder's net P&L USD value (as options
* are cash-settled) will exceed the amount of the collateral locked
* in the option, she will receive the required amount at the moment
* of exercising the option using the pool's unutilized (unlocked) funds.
* @param value The collateralization ratio in a range of 30% β 100%
**/
function setCollateralizationRatio(uint256 value)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
/**
* @dev See EIP-165: ERC-165 Standard Interface Detection
* https://eips.ethereum.org/EIPS/eip-165.
**/
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721, AccessControl, IERC165)
returns (bool)
{
}
/**
* @notice Used for selling the options contracts
* with the parameters chosen by the option buyer
* such as the period of holding, option size (amount),
* strike price and the premium to be paid for the option.
* @param holder The option buyer address
* @param period The option period
* @param amount The option size
* @param strike The option strike
* @return id ID of ERC721 token linked to the option
**/
function sellOption(
address holder,
uint256 period,
uint256 amount,
uint256 strike
) external override onlyRole(SELLER_ROLE) returns (uint256 id) {
}
/**
* @notice Used for setting the price calculator
* contract that will be used for pricing the options.
* @param pc A new price calculator contract address
**/
function setPriceCalculator(IPriceCalculator pc)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
/**
* @notice Used for exercising the ITM (in-the-money)
* options contracts in case of having the unrealized profits
* accrued during the period of holding the option contract.
* @param id ID of ERC721 token linked to the option
**/
function exercise(uint256 id) external override {
}
function _send(address to, uint256 transferAmount) private {
}
/**
* @notice Used for unlocking the expired OTM (out-of-the-money)
* options contracts in case if there was no unrealized P&L
* accrued during the period of holding a particular option.
* Note that the `unlock` function releases the liquidity that
* was locked in the option when it was active and the premiums
* that are distributed pro rata among the liquidity providers.
* @param id ID of ERC721 token linked to the option
**/
function unlock(uint256 id) external override {
}
function _unlock(Option storage option) internal {
}
function _calculateLockedAmount(uint256 amount)
internal
virtual
returns (uint256)
{
}
/**
* @notice Used for depositing the funds into the pool
* and minting the liquidity tranche ERC721 token
* which represents the liquidity provider's share
* in the pool and her unrealized P&L for this tranche.
* @param account The liquidity provider's address
* @param amount The size of the liquidity tranche
* @param minShare The minimum share in the pool for the user
**/
function provideFrom(
address account,
uint256 amount,
bool,
uint256 minShare
) external override nonReentrant returns (uint256 share) {
}
/**
* @notice Used for withdrawing the funds from the pool
* plus the net positive P&L earned or
* minus the net negative P&L lost on
* providing liquidity and selling options.
* @param trancheID The liquidity tranche ID
* @return amount The amount received after the withdrawal
**/
function withdraw(uint256 trancheID)
external
override
nonReentrant
returns (uint256 amount)
{
}
/**
* @notice Used for withdrawing the funds from the pool
* by the hedged liquidity tranches providers
* in case of an urgent need to withdraw the liquidity
* without receiving the loss compensation from
* the hedging pool: the net difference between
* the amount deposited and the withdrawal amount.
* @param trancheID ID of liquidity tranche
* @return amount The amount received after the withdrawal
**/
function withdrawWithoutHedge(uint256 trancheID)
external
override
nonReentrant
returns (uint256 amount)
{
}
function _withdraw(address owner, uint256 trancheID)
internal
returns (uint256 amount)
{
}
/**
* @return balance Returns the amount of liquidity available for withdrawing
**/
function availableBalance() public view returns (uint256 balance) {
}
// /**
// * @return balance Returns the total balance of liquidity provided to the pool
// **/
// function totalBalance() public view override returns (uint256 balance) {
// return hedgedBalance + unhedgedBalance;
// }
function _beforeTokenTransfer(
address,
address,
uint256 id
) internal view override {
}
/**
* @notice Returns the amount of unrealized P&L of the option
* that could be received by the option holder in case
* if she exercises it as an ITM (in-the-money) option.
* @param id ID of ERC721 token linked to the option
**/
function profitOf(uint256 id) external view returns (uint256) {
}
function _profitOf(Option memory option)
internal
view
virtual
returns (uint256 amount);
/**
* @notice Used for calculating the `TotalPremium`
* for the particular option with regards to
* the parameters chosen by the option buyer
* such as the period of holding, size (amount)
* and strike price.
* @param period The period of holding the option
* @param period The size of the option
**/
function calculateTotalPremium(
uint256 period,
uint256 amount,
uint256 strike
) external view override returns (uint256 settlementFee, uint256 premium) {
}
function _calculateTotalPremium(
uint256 period,
uint256 amount,
uint256 strike
) internal view virtual returns (uint256 settlementFee, uint256 premium) {
}
/**
* @notice Used for changing the `settlementFeeRecipient`
* contract address for distributing the settlement fees
* (staking rewards) among the staking participants.
* @param recipient New staking contract address
**/
function setSettlementFeeRecipient(IHegicStaking recipient)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
require(<FILL_ME>)
settlementFeeRecipient = recipient;
}
function _currentPrice() internal view returns (uint256 price) {
}
}
| address(recipient)!=address(0) | 8,369 | address(recipient)!=address(0) |
null | /**
* BSD 2-Clause License
*
* Copyright (c) 2018, True Names Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
pragma solidity ^0.4.24;
import "./ENS.sol";
/**
* The ENS registry contract.
*/
contract ENSRegistry is ENS {
struct Record {
address owner;
address resolver;
uint64 ttl;
}
mapping (bytes32 => Record) records;
// Permits modifications only by the owner of the specified node.
modifier only_owner(bytes32 node) {
require(<FILL_ME>)
_;
}
/**
* @dev Constructs a new ENS registrar.
*/
constructor() public {
}
/**
* @dev Transfers ownership of a node to a new address. May only be called by the current owner of the node.
* @param node The node to transfer ownership of.
* @param owner The address of the new owner.
*/
function setOwner(bytes32 node, address owner) public only_owner(node) {
}
/**
* @dev Transfers ownership of a subnode keccak256(node, label) to a new address. May only be called by the owner of the parent node.
* @param node The parent node.
* @param label The hash of the label specifying the subnode.
* @param owner The address of the new owner.
*/
function setSubnodeOwner(bytes32 node, bytes32 label, address owner) public only_owner(node) {
}
/**
* @dev Sets the resolver address for the specified node.
* @param node The node to update.
* @param resolver The address of the resolver.
*/
function setResolver(bytes32 node, address resolver) public only_owner(node) {
}
/**
* @dev Sets the TTL for the specified node.
* @param node The node to update.
* @param ttl The TTL in seconds.
*/
function setTTL(bytes32 node, uint64 ttl) public only_owner(node) {
}
/**
* @dev Returns the address that owns the specified node.
* @param node The specified node.
* @return address of the owner.
*/
function owner(bytes32 node) public view returns (address) {
}
/**
* @dev Returns the address of the resolver for the specified node.
* @param node The specified node.
* @return address of the resolver.
*/
function resolver(bytes32 node) public view returns (address) {
}
/**
* @dev Returns the TTL of a node, and any records associated with it.
* @param node The specified node.
* @return ttl of the node.
*/
function ttl(bytes32 node) public view returns (uint64) {
}
}
| records[node].owner==msg.sender | 8,423 | records[node].owner==msg.sender |
"Insufficinet FIX amount left on contract" | // SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
library Address {
function isContract(address account) internal view returns (bool) {
}
function sendValue(address payable recipient, uint256 amount) internal {
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
}
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
}
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
}
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
}
function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
}
}
library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
}
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
}
function safeApprove(IERC20 token, address spender, uint256 value) internal {
}
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
}
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
}
function _callOptionalReturn(IERC20 token, bytes memory data) private {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
function decimals() external view returns (uint8);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract Ownable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () internal {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
contract FIXToken is IERC20, Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isFirstSale;
uint256 public constant SECONDS_PER_WEEK = 604800;
uint256 private constant PERCENTAGE_MULTIPLICATOR = 1e4;
uint8 private constant DEFAULT_DECIMALS = 6;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256 private _firstUpdate;
uint256 private _lastUpdate;
uint256 private _growthRate;
uint256 private _growthRate_after;
uint256 private _price;
uint256 private _presaleStart;
uint256 private _presaleEnd;
bool private _isStarted;
uint256 [] _zeros;
event TokensPurchased(address indexed purchaser, uint256 value, uint256 amount, uint256 price);
event TokensSold(address indexed seller, uint256 amount, uint256 USDT, uint256 price);
event PriceUpdated(uint price);
constructor (uint256 _ownerSupply) public {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view override returns (uint8) {
}
function totalSupply() public view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
}
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
function calculatePrice() public view returns (uint256) {
}
function currentPrice() public view returns (uint256) {
}
function growthRate() public view returns (uint256) {
}
function isStarted() public view returns (bool) {
}
function presaleStart() public view returns (uint256) {
}
function presaleEnd() public view returns (uint256) {
}
function startContract(uint256 firstUpdate, uint256 lastUpdate, uint256 [] memory zeros) external onlyOwner {
}
function setPresaleStart(uint256 new_date) external onlyOwner {
}
function setPresaleEnd(uint256 new_date) external onlyOwner {
}
function setGrowthRate(uint256 _newGrowthRate) external onlyOwner {
}
function calculateTokens(uint256 amount, uint8 coin_decimals, uint256 updatedPrice) public view returns(uint256) {
}
function sendTokens(address recepient, uint256 amount, uint8 coinDecimals) external onlyOwner {
require (_isStarted == true, "Contract is not started.");
require (_presaleStart > 0, "Presale start not set");
require (_presaleEnd > 0, "Presale end not set");
require (coinDecimals > 0, "Stablecoin decimals must be grater than 0");
require (amount > 0, "Stablecoin value cannot be zero.");
require(recepient != address(0), "ERC20: transfer to the zero address");
uint256 lastPrice = calculatePrice();
uint FIXAmount = calculateTokens(amount.mul(99).div(100), coinDecimals, lastPrice);
require(<FILL_ME>)
_balances[address(this)] = _balances[address(this)].sub(FIXAmount, "ERC20: transfer amount exceeds balance");
_balances[recepient] = _balances[recepient].add(FIXAmount);
emit TokensPurchased(recepient, amount, FIXAmount, lastPrice);
emit Transfer(address(this), recepient, FIXAmount);
}
function sellTokens(address stablecoin, uint256 amount) external {
}
}
| _balances[address(this)]>=FIXAmount,"Insufficinet FIX amount left on contract" | 8,426 | _balances[address(this)]>=FIXAmount |
"Not a valid stablecoin contract address" | // SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
library Address {
function isContract(address account) internal view returns (bool) {
}
function sendValue(address payable recipient, uint256 amount) internal {
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
}
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
}
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
}
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
}
function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
}
}
library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
}
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
}
function safeApprove(IERC20 token, address spender, uint256 value) internal {
}
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
}
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
}
function _callOptionalReturn(IERC20 token, bytes memory data) private {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
function decimals() external view returns (uint8);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract Ownable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () internal {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
contract FIXToken is IERC20, Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isFirstSale;
uint256 public constant SECONDS_PER_WEEK = 604800;
uint256 private constant PERCENTAGE_MULTIPLICATOR = 1e4;
uint8 private constant DEFAULT_DECIMALS = 6;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256 private _firstUpdate;
uint256 private _lastUpdate;
uint256 private _growthRate;
uint256 private _growthRate_after;
uint256 private _price;
uint256 private _presaleStart;
uint256 private _presaleEnd;
bool private _isStarted;
uint256 [] _zeros;
event TokensPurchased(address indexed purchaser, uint256 value, uint256 amount, uint256 price);
event TokensSold(address indexed seller, uint256 amount, uint256 USDT, uint256 price);
event PriceUpdated(uint price);
constructor (uint256 _ownerSupply) public {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view override returns (uint8) {
}
function totalSupply() public view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
}
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
function calculatePrice() public view returns (uint256) {
}
function currentPrice() public view returns (uint256) {
}
function growthRate() public view returns (uint256) {
}
function isStarted() public view returns (bool) {
}
function presaleStart() public view returns (uint256) {
}
function presaleEnd() public view returns (uint256) {
}
function startContract(uint256 firstUpdate, uint256 lastUpdate, uint256 [] memory zeros) external onlyOwner {
}
function setPresaleStart(uint256 new_date) external onlyOwner {
}
function setPresaleEnd(uint256 new_date) external onlyOwner {
}
function setGrowthRate(uint256 _newGrowthRate) external onlyOwner {
}
function calculateTokens(uint256 amount, uint8 coin_decimals, uint256 updatedPrice) public view returns(uint256) {
}
function sendTokens(address recepient, uint256 amount, uint8 coinDecimals) external onlyOwner {
}
function sellTokens(address stablecoin, uint256 amount) external {
require (_isStarted == true, "Contract is not started.");
require (_presaleStart > 0, "Presale start not set");
require (_presaleEnd > 0, "Presale end not set");
require (amount > 0, "FIX value cannot be zero.");
require(msg.sender != address(0), "ERC20: transfer to the zero address");
require(stablecoin != address(0), "Stablecoin must not be zero address");
require(<FILL_ME>)
uint256 coin_amount;
uint256 new_amount = amount;
IERC20 coin = IERC20(stablecoin);
uint8 coin_decimals = coin.decimals();
uint256 lastPrice = calculatePrice();
if (!_isFirstSale[msg.sender]) {
new_amount = amount.mul(98).div(100);
_isFirstSale[msg.sender] = true;
}
require (_balances[msg.sender] >= amount, "Insufficient FIX token amount");
if (coin_decimals >= 12) {
coin_amount = new_amount.div(lastPrice).mul(10 ** uint256(coin_decimals-12));
} else {
coin_amount = new_amount.div(lastPrice).div(10 ** uint256(12 - coin_decimals));
}
_balances[address(this)] = _balances[address(this)].add(amount);
_balances[msg.sender] = _balances[msg.sender].sub(amount);
emit Transfer(msg.sender, address(this), amount);
emit TokensSold(msg.sender, amount, coin_amount, lastPrice);
}
}
| stablecoin.isContract(),"Not a valid stablecoin contract address" | 8,426 | stablecoin.isContract() |
"Insufficient FIX token amount" | // SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
library Address {
function isContract(address account) internal view returns (bool) {
}
function sendValue(address payable recipient, uint256 amount) internal {
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
}
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
}
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
}
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
}
function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
}
}
library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
}
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
}
function safeApprove(IERC20 token, address spender, uint256 value) internal {
}
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
}
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
}
function _callOptionalReturn(IERC20 token, bytes memory data) private {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
function decimals() external view returns (uint8);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract Ownable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () internal {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
contract FIXToken is IERC20, Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isFirstSale;
uint256 public constant SECONDS_PER_WEEK = 604800;
uint256 private constant PERCENTAGE_MULTIPLICATOR = 1e4;
uint8 private constant DEFAULT_DECIMALS = 6;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256 private _firstUpdate;
uint256 private _lastUpdate;
uint256 private _growthRate;
uint256 private _growthRate_after;
uint256 private _price;
uint256 private _presaleStart;
uint256 private _presaleEnd;
bool private _isStarted;
uint256 [] _zeros;
event TokensPurchased(address indexed purchaser, uint256 value, uint256 amount, uint256 price);
event TokensSold(address indexed seller, uint256 amount, uint256 USDT, uint256 price);
event PriceUpdated(uint price);
constructor (uint256 _ownerSupply) public {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view override returns (uint8) {
}
function totalSupply() public view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
}
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
function calculatePrice() public view returns (uint256) {
}
function currentPrice() public view returns (uint256) {
}
function growthRate() public view returns (uint256) {
}
function isStarted() public view returns (bool) {
}
function presaleStart() public view returns (uint256) {
}
function presaleEnd() public view returns (uint256) {
}
function startContract(uint256 firstUpdate, uint256 lastUpdate, uint256 [] memory zeros) external onlyOwner {
}
function setPresaleStart(uint256 new_date) external onlyOwner {
}
function setPresaleEnd(uint256 new_date) external onlyOwner {
}
function setGrowthRate(uint256 _newGrowthRate) external onlyOwner {
}
function calculateTokens(uint256 amount, uint8 coin_decimals, uint256 updatedPrice) public view returns(uint256) {
}
function sendTokens(address recepient, uint256 amount, uint8 coinDecimals) external onlyOwner {
}
function sellTokens(address stablecoin, uint256 amount) external {
require (_isStarted == true, "Contract is not started.");
require (_presaleStart > 0, "Presale start not set");
require (_presaleEnd > 0, "Presale end not set");
require (amount > 0, "FIX value cannot be zero.");
require(msg.sender != address(0), "ERC20: transfer to the zero address");
require(stablecoin != address(0), "Stablecoin must not be zero address");
require(stablecoin.isContract(), "Not a valid stablecoin contract address");
uint256 coin_amount;
uint256 new_amount = amount;
IERC20 coin = IERC20(stablecoin);
uint8 coin_decimals = coin.decimals();
uint256 lastPrice = calculatePrice();
if (!_isFirstSale[msg.sender]) {
new_amount = amount.mul(98).div(100);
_isFirstSale[msg.sender] = true;
}
require(<FILL_ME>)
if (coin_decimals >= 12) {
coin_amount = new_amount.div(lastPrice).mul(10 ** uint256(coin_decimals-12));
} else {
coin_amount = new_amount.div(lastPrice).div(10 ** uint256(12 - coin_decimals));
}
_balances[address(this)] = _balances[address(this)].add(amount);
_balances[msg.sender] = _balances[msg.sender].sub(amount);
emit Transfer(msg.sender, address(this), amount);
emit TokensSold(msg.sender, amount, coin_amount, lastPrice);
}
}
| _balances[msg.sender]>=amount,"Insufficient FIX token amount" | 8,426 | _balances[msg.sender]>=amount |
"TokenVesting::claim: not-enough-token" | //SPDX-License-Identifier: Unlicense
pragma solidity ^0.7.0;
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/proxy/Initializable.sol";
interface TokenInterface {
function balanceOf(address account) external view returns (uint);
function delegate(address delegatee) external;
function transfer(address dst, uint rawAmount) external returns (bool);
}
interface VestingFactoryInterface {
function updateRecipient(address _oldRecipient, address _newRecipient) external;
}
contract InstaTokenVesting is Initializable {
using SafeMath for uint;
event LogClaim(uint _claimAmount);
event LogRecipient(address indexed _delegate);
event LogDelegate(address indexed _delegate);
event LogOwner(address indexed _newOwner);
event LogTerminate(address owner, uint tokenAmount, uint32 _terminateTime);
TokenInterface public constant token = TokenInterface(0x6f40d4A6237C257fff2dB00FA0510DeEECd303eb);
address public immutable factory;
address public owner;
address public recipient;
uint256 public vestingAmount;
uint32 public vestingBegin;
uint32 public vestingCliff;
uint32 public vestingEnd;
uint32 public lastUpdate;
uint32 public terminateTime;
constructor(address factory_) {
}
function initialize(
address recipient_,
address owner_,
uint256 vestingAmount_,
uint32 vestingBegin_,
uint32 vestingCliff_,
uint32 vestingEnd_
) public initializer {
}
function updateRecipient(address recipient_) public {
}
function updateOwner(address owner_) public {
}
function delegate(address delegatee_) public {
}
function claim() public {
require(block.timestamp >= vestingCliff, 'TokenVesting::claim: not time yet');
require(terminateTime == 0, 'TokenVesting::claim: already terminated');
uint amount;
if (block.timestamp >= vestingEnd) {
amount = token.balanceOf(address(this));
} else {
amount = vestingAmount.mul(block.timestamp - lastUpdate).div(vestingEnd - vestingBegin);
lastUpdate = uint32(block.timestamp);
}
require(<FILL_ME>)
emit LogClaim(amount);
}
function terminate() public {
}
}
| token.transfer(recipient,amount),"TokenVesting::claim: not-enough-token" | 8,576 | token.transfer(recipient,amount) |
"TokenVesting::terminate: transfer failed" | //SPDX-License-Identifier: Unlicense
pragma solidity ^0.7.0;
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/proxy/Initializable.sol";
interface TokenInterface {
function balanceOf(address account) external view returns (uint);
function delegate(address delegatee) external;
function transfer(address dst, uint rawAmount) external returns (bool);
}
interface VestingFactoryInterface {
function updateRecipient(address _oldRecipient, address _newRecipient) external;
}
contract InstaTokenVesting is Initializable {
using SafeMath for uint;
event LogClaim(uint _claimAmount);
event LogRecipient(address indexed _delegate);
event LogDelegate(address indexed _delegate);
event LogOwner(address indexed _newOwner);
event LogTerminate(address owner, uint tokenAmount, uint32 _terminateTime);
TokenInterface public constant token = TokenInterface(0x6f40d4A6237C257fff2dB00FA0510DeEECd303eb);
address public immutable factory;
address public owner;
address public recipient;
uint256 public vestingAmount;
uint32 public vestingBegin;
uint32 public vestingCliff;
uint32 public vestingEnd;
uint32 public lastUpdate;
uint32 public terminateTime;
constructor(address factory_) {
}
function initialize(
address recipient_,
address owner_,
uint256 vestingAmount_,
uint32 vestingBegin_,
uint32 vestingCliff_,
uint32 vestingEnd_
) public initializer {
}
function updateRecipient(address recipient_) public {
}
function updateOwner(address owner_) public {
}
function delegate(address delegatee_) public {
}
function claim() public {
}
function terminate() public {
require(terminateTime == 0, 'TokenVesting::terminate: already terminated');
require(msg.sender == owner, 'TokenVesting::terminate: unauthorized');
claim();
uint amount = token.balanceOf(address(this));
require(<FILL_ME>)
terminateTime = uint32(block.timestamp);
emit LogTerminate(owner, amount, terminateTime);
}
}
| token.transfer(owner,amount),"TokenVesting::terminate: transfer failed" | 8,576 | token.transfer(owner,amount) |
null | pragma solidity ^0.4.18;
/* --------------CHELTOKENCLC Token----------------------
createdate : 2018.11.08
Token name : CHELTOKENCLC
Symbol name : CLC
ISSUED BY COINCHEL.COM
This is coinchel.com CLC TOKEN
-------------------------------------------------*/
contract Token {
/// @return total amount of tokens
function totalSupply() constant returns (uint256 supply) {}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) 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) 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) returns (bool success) {}
/// @notice `msg.sender` approves `_addr` to spend `_value` tokens
/// @param _spender The address of the account able to transfer the tokens
/// @param _value The amount of wei to be approved for transfer
/// @return Whether the approval was successful or not
function approve(address _spender, uint256 _value) 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) constant returns (uint256 remaining) {}
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
contract StandardToken is Token {
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 CHELTOKENCLC is StandardToken { // CHANGE THIS. Update the contract name.
/* Public variables of the token */
/*
NOTE:
The following variables are choice vanities. One does not have to include them.
They allow one to customise the token contract & in no way influences the core functionality.
Some wallets/interfaces might not even bother to look at this information.
*/
string public name; // Token Name coinchel token issued
uint8 public decimals; // How many decimals to show. To be standard complicant keep it 18
string public symbol; // An identifier: eg SBX, XPR etc..
string public version = 'C1.0';
uint256 public unitsOneEthCanBuy; // How many units of your coin can be bought by 1 ETH?
uint256 public totalEthInWei; // WEI is the smallest unit of ETH (the equivalent of cent in USD or satoshi in BTC). We'll store the total ETH raised via our ICO here.
address public fundsWallet; // Where should the raised ETH go?
// This is a constructor function
// which means the following function name has to match the contract name declared above
function CHELTOKENCLC() {
}
function() payable{
totalEthInWei = totalEthInWei + msg.value;
uint256 amount = msg.value * unitsOneEthCanBuy;
require(<FILL_ME>)
balances[fundsWallet] = balances[fundsWallet] - amount;
balances[msg.sender] = balances[msg.sender] + amount;
Transfer(fundsWallet, msg.sender, amount); // Broadcast a message to the blockchain
//Transfer ether to fundsWallet
fundsWallet.transfer(msg.value);
}
/* Approves and then calls the receiving contract */
function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) {
}
}
| balances[fundsWallet]>=amount | 8,593 | balances[fundsWallet]>=amount |
"Minting would exceed max supply of Bizarros" | pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
}
/**
* @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 {
}
}
// Bizarros are a NFT collection create by _mintLabs for the purposes of facilitating an educational tutorial on how generative NFT collections are made.
pragma solidity ^0.7.0;
pragma abicoder v2;
contract Bizarros is ERC721, Ownable {
using SafeMath for uint256;
string public BIZARRO_PROVENANCE = ""; // IPFS URL WILL BE ADDED WHEN BIZARROS ARE ALL SOLD OUT
string public LICENSE_TEXT = "Each Bizarro comes with FULL commercial rights for that specific Bizarro (i.e. that combination of traits), EXCEPT for the pre-defined royalty fee that is collected by the owner of this smart contract when the Bizarro is sold to a new owner. This royalty fee does not apply in any other situation (such as if you choose to rent/license your Bizarro, etc)."; // IT IS WHAT IT SAYS
bool licenseLocked = true; // TEAM CAN'T EDIT THE LICENSE AFTER THIS GETS TRUE
uint256 public constant bizarroPrice = 80000000000000000; // 0.05 ETH
uint public constant maxBizarroPurchase = 20;
uint256 public constant MAX_BIZARROS = 10000;
bool public saleIsActive = false;
mapping(uint => string) public bizarroNames;
// Reserve this many Bizarros for the team - Giveaways/Prizes etc
uint public bizarroReserve = 130;
event bizarroNameChange(address _by, uint _tokenId, string _name);
event licenseisLocked(string _licenseText);
constructor() ERC721("Bizarros", "BIZARRO") { }
function withdraw() public onlyOwner {
}
function reserveBizarros(address _to, uint256 _reserveAmount) public onlyOwner {
}
function preSale(address _to, uint256 numberOfTokens) public onlyOwner() {
uint supply = totalSupply();
require(<FILL_ME>)
require(numberOfTokens <= 5, "Can only do 5 tokens at a time in presale");
for(uint i = 0; i < numberOfTokens; i++){
_safeMint( _to, supply + i );
}
}
function setProvenanceHash(string memory provenanceHash) public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function flipSaleState() public onlyOwner {
}
function tokensOfOwner(address _owner) external view returns(uint256[] memory ) {
}
// Returns the license for tokens
function tokenLicense(uint _id) public view returns(string memory) {
}
// Locks the license to prevent further changes
function lockLicense() public onlyOwner {
}
// Change the license
function changeLicense(string memory _license) public onlyOwner {
}
function mintBizarro(uint numberOfTokens) public payable {
}
function changeBizarroName(uint _tokenId, string memory _name) public {
}
function viewBizarroName(uint _tokenId) public view returns( string memory ){
}
// GET ALL BIZARROS OF A WALLET AS AN ARRAY OF STRINGS. WOULD BE BETTER MAYBE IF IT RETURNED A STRUCT WITH ID-NAME MATCH
function bizarroNamesOfOwner(address _owner) external view returns(string[] memory ) {
}
}
| supply.add(numberOfTokens)<=MAX_BIZARROS,"Minting would exceed max supply of Bizarros" | 8,611 | supply.add(numberOfTokens)<=MAX_BIZARROS |
"Purchase would exceed max supply of Bizarros" | pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
}
/**
* @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 {
}
}
// Bizarros are a NFT collection create by _mintLabs for the purposes of facilitating an educational tutorial on how generative NFT collections are made.
pragma solidity ^0.7.0;
pragma abicoder v2;
contract Bizarros is ERC721, Ownable {
using SafeMath for uint256;
string public BIZARRO_PROVENANCE = ""; // IPFS URL WILL BE ADDED WHEN BIZARROS ARE ALL SOLD OUT
string public LICENSE_TEXT = "Each Bizarro comes with FULL commercial rights for that specific Bizarro (i.e. that combination of traits), EXCEPT for the pre-defined royalty fee that is collected by the owner of this smart contract when the Bizarro is sold to a new owner. This royalty fee does not apply in any other situation (such as if you choose to rent/license your Bizarro, etc)."; // IT IS WHAT IT SAYS
bool licenseLocked = true; // TEAM CAN'T EDIT THE LICENSE AFTER THIS GETS TRUE
uint256 public constant bizarroPrice = 80000000000000000; // 0.05 ETH
uint public constant maxBizarroPurchase = 20;
uint256 public constant MAX_BIZARROS = 10000;
bool public saleIsActive = false;
mapping(uint => string) public bizarroNames;
// Reserve this many Bizarros for the team - Giveaways/Prizes etc
uint public bizarroReserve = 130;
event bizarroNameChange(address _by, uint _tokenId, string _name);
event licenseisLocked(string _licenseText);
constructor() ERC721("Bizarros", "BIZARRO") { }
function withdraw() public onlyOwner {
}
function reserveBizarros(address _to, uint256 _reserveAmount) public onlyOwner {
}
function preSale(address _to, uint256 numberOfTokens) public onlyOwner() {
}
function setProvenanceHash(string memory provenanceHash) public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function flipSaleState() public onlyOwner {
}
function tokensOfOwner(address _owner) external view returns(uint256[] memory ) {
}
// Returns the license for tokens
function tokenLicense(uint _id) public view returns(string memory) {
}
// Locks the license to prevent further changes
function lockLicense() public onlyOwner {
}
// Change the license
function changeLicense(string memory _license) public onlyOwner {
}
function mintBizarro(uint numberOfTokens) public payable {
require(saleIsActive, "Sale must be active in order to mint Bizarro(s)");
require(numberOfTokens > 0 && numberOfTokens <= maxBizarroPurchase, "Only mint 20 tokens at a time");
require(<FILL_ME>)
require(msg.value >= bizarroPrice.mul(numberOfTokens), "Ether value sent is not correct");
for(uint i = 0; i < numberOfTokens; i++) {
uint mintIndex = totalSupply();
if (totalSupply() < MAX_BIZARROS) {
_safeMint(msg.sender, mintIndex);
}
}
}
function changeBizarroName(uint _tokenId, string memory _name) public {
}
function viewBizarroName(uint _tokenId) public view returns( string memory ){
}
// GET ALL BIZARROS OF A WALLET AS AN ARRAY OF STRINGS. WOULD BE BETTER MAYBE IF IT RETURNED A STRUCT WITH ID-NAME MATCH
function bizarroNamesOfOwner(address _owner) external view returns(string[] memory ) {
}
}
| totalSupply().add(numberOfTokens)<=MAX_BIZARROS,"Purchase would exceed max supply of Bizarros" | 8,611 | totalSupply().add(numberOfTokens)<=MAX_BIZARROS |
"Hey, your wallet doesn't own this Bizarro!" | pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
}
/**
* @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 {
}
}
// Bizarros are a NFT collection create by _mintLabs for the purposes of facilitating an educational tutorial on how generative NFT collections are made.
pragma solidity ^0.7.0;
pragma abicoder v2;
contract Bizarros is ERC721, Ownable {
using SafeMath for uint256;
string public BIZARRO_PROVENANCE = ""; // IPFS URL WILL BE ADDED WHEN BIZARROS ARE ALL SOLD OUT
string public LICENSE_TEXT = "Each Bizarro comes with FULL commercial rights for that specific Bizarro (i.e. that combination of traits), EXCEPT for the pre-defined royalty fee that is collected by the owner of this smart contract when the Bizarro is sold to a new owner. This royalty fee does not apply in any other situation (such as if you choose to rent/license your Bizarro, etc)."; // IT IS WHAT IT SAYS
bool licenseLocked = true; // TEAM CAN'T EDIT THE LICENSE AFTER THIS GETS TRUE
uint256 public constant bizarroPrice = 80000000000000000; // 0.05 ETH
uint public constant maxBizarroPurchase = 20;
uint256 public constant MAX_BIZARROS = 10000;
bool public saleIsActive = false;
mapping(uint => string) public bizarroNames;
// Reserve this many Bizarros for the team - Giveaways/Prizes etc
uint public bizarroReserve = 130;
event bizarroNameChange(address _by, uint _tokenId, string _name);
event licenseisLocked(string _licenseText);
constructor() ERC721("Bizarros", "BIZARRO") { }
function withdraw() public onlyOwner {
}
function reserveBizarros(address _to, uint256 _reserveAmount) public onlyOwner {
}
function preSale(address _to, uint256 numberOfTokens) public onlyOwner() {
}
function setProvenanceHash(string memory provenanceHash) public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function flipSaleState() public onlyOwner {
}
function tokensOfOwner(address _owner) external view returns(uint256[] memory ) {
}
// Returns the license for tokens
function tokenLicense(uint _id) public view returns(string memory) {
}
// Locks the license to prevent further changes
function lockLicense() public onlyOwner {
}
// Change the license
function changeLicense(string memory _license) public onlyOwner {
}
function mintBizarro(uint numberOfTokens) public payable {
}
function changeBizarroName(uint _tokenId, string memory _name) public {
require(<FILL_ME>)
require(sha256(bytes(_name)) != sha256(bytes(bizarroNames[_tokenId])), "New name is the same as the current name");
bizarroNames[_tokenId] = _name;
emit bizarroNameChange(msg.sender, _tokenId, _name);
}
function viewBizarroName(uint _tokenId) public view returns( string memory ){
}
// GET ALL BIZARROS OF A WALLET AS AN ARRAY OF STRINGS. WOULD BE BETTER MAYBE IF IT RETURNED A STRUCT WITH ID-NAME MATCH
function bizarroNamesOfOwner(address _owner) external view returns(string[] memory ) {
}
}
| ownerOf(_tokenId)==msg.sender,"Hey, your wallet doesn't own this Bizarro!" | 8,611 | ownerOf(_tokenId)==msg.sender |
"New name is the same as the current name" | pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
}
/**
* @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 {
}
}
// Bizarros are a NFT collection create by _mintLabs for the purposes of facilitating an educational tutorial on how generative NFT collections are made.
pragma solidity ^0.7.0;
pragma abicoder v2;
contract Bizarros is ERC721, Ownable {
using SafeMath for uint256;
string public BIZARRO_PROVENANCE = ""; // IPFS URL WILL BE ADDED WHEN BIZARROS ARE ALL SOLD OUT
string public LICENSE_TEXT = "Each Bizarro comes with FULL commercial rights for that specific Bizarro (i.e. that combination of traits), EXCEPT for the pre-defined royalty fee that is collected by the owner of this smart contract when the Bizarro is sold to a new owner. This royalty fee does not apply in any other situation (such as if you choose to rent/license your Bizarro, etc)."; // IT IS WHAT IT SAYS
bool licenseLocked = true; // TEAM CAN'T EDIT THE LICENSE AFTER THIS GETS TRUE
uint256 public constant bizarroPrice = 80000000000000000; // 0.05 ETH
uint public constant maxBizarroPurchase = 20;
uint256 public constant MAX_BIZARROS = 10000;
bool public saleIsActive = false;
mapping(uint => string) public bizarroNames;
// Reserve this many Bizarros for the team - Giveaways/Prizes etc
uint public bizarroReserve = 130;
event bizarroNameChange(address _by, uint _tokenId, string _name);
event licenseisLocked(string _licenseText);
constructor() ERC721("Bizarros", "BIZARRO") { }
function withdraw() public onlyOwner {
}
function reserveBizarros(address _to, uint256 _reserveAmount) public onlyOwner {
}
function preSale(address _to, uint256 numberOfTokens) public onlyOwner() {
}
function setProvenanceHash(string memory provenanceHash) public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function flipSaleState() public onlyOwner {
}
function tokensOfOwner(address _owner) external view returns(uint256[] memory ) {
}
// Returns the license for tokens
function tokenLicense(uint _id) public view returns(string memory) {
}
// Locks the license to prevent further changes
function lockLicense() public onlyOwner {
}
// Change the license
function changeLicense(string memory _license) public onlyOwner {
}
function mintBizarro(uint numberOfTokens) public payable {
}
function changeBizarroName(uint _tokenId, string memory _name) public {
require(ownerOf(_tokenId) == msg.sender, "Hey, your wallet doesn't own this Bizarro!");
require(<FILL_ME>)
bizarroNames[_tokenId] = _name;
emit bizarroNameChange(msg.sender, _tokenId, _name);
}
function viewBizarroName(uint _tokenId) public view returns( string memory ){
}
// GET ALL BIZARROS OF A WALLET AS AN ARRAY OF STRINGS. WOULD BE BETTER MAYBE IF IT RETURNED A STRUCT WITH ID-NAME MATCH
function bizarroNamesOfOwner(address _owner) external view returns(string[] memory ) {
}
}
| sha256(bytes(_name))!=sha256(bytes(bizarroNames[_tokenId])),"New name is the same as the current name" | 8,611 | sha256(bytes(_name))!=sha256(bytes(bizarroNames[_tokenId])) |
null | /**
*Submitted for verification at Etherscan.io on 2019-05-07
*/
pragma solidity >= 0.5.0 < 0.6.0;
/**
* @title VONN token
* @author J Kwon
*/
/**
* @title ERC20 Standard Interface
*/
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function transfer(address to, uint256 value) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title Token implementation
*/
contract VONNI is IERC20 {
string public name = "VONNICON";
string public symbol = "VONNI";
uint8 public decimals = 18;
uint256 partnerAmount;
uint256 marketingAmount;
uint256 pomAmount;
uint256 companyAmount;
uint256 kmjAmount;
uint256 kdhAmount;
uint256 saleAmount;
uint256 _totalSupply;
mapping(address => uint256) balances;
address public owner;
address public partner;
address public marketing;
address public pom;
address public company;
address public kmj;
address public kdh;
address public sale;
address public marker1;
address public marker2;
address public marker3;
address public marker4;
address public marker5;
address public marker6;
IERC20 private _marker1;
IERC20 private _marker2;
IERC20 private _marker3;
IERC20 private _marker4;
IERC20 private _marker5;
IERC20 private _marker6;
modifier isOwner {
}
constructor() public {
owner = msg.sender;
partner = 0x0182bBbd17792B612a90682486FCfc6230D0C87a;
marketing = 0xE818EBEc8C8174049748277b8d0Dc266b1A9962A;
pom = 0x423325e29C8311217994B938f76fDe0040326B2A;
company = 0xfec56eFB1a87BB15da444fDaFFB384572aeceE17;
kmj = 0xC350493EC241f801901d1E74372B386c3e6E5703;
kdh = 0x7fACD833AD981Fbbfbe93b071E8c491A47cBC8Fa;
sale = 0xeab7Af104c4156Adb800E1Cd3ca35d358c6145b3;
marker1 = 0xf54343AB797C9647a2643a037E16E8eF32b9Eb87;
marker2 = 0x31514548CbEAD19EEdc7977AC3cc52b8aF1a6FE2;
marker3 = 0xa4f5947Ee4EDD96dc8EAf2d9E6149B66E6558C14;
marker4 = 0x4908730237360Df173b0a870b7208B08EC26Bd13;
marker5 = 0x65b87739bac3987DBA6e7b04cD8ECeaB94b7Ea3d;
marker6 = 0x423B9EDD4b9D82bAc47A76efB5381EEDa4068581;
partnerAmount = toWei( 250000000);
marketingAmount = toWei( 500000000);
pomAmount = toWei(1500000000);
companyAmount = toWei(1150000000);
kmjAmount = toWei( 100000000);
kdhAmount = toWei( 250000000);
saleAmount = toWei(1250000000);
_totalSupply = toWei(5000000000); //5,000,000,000
_marker1 = IERC20(marker1);
_marker2 = IERC20(marker2);
_marker3 = IERC20(marker3);
_marker4 = IERC20(marker4);
_marker5 = IERC20(marker5);
_marker6 = IERC20(marker6);
require(_totalSupply == partnerAmount + marketingAmount + pomAmount + companyAmount + kmjAmount + kdhAmount + saleAmount );
balances[owner] = _totalSupply;
emit Transfer(address(0), owner, balances[owner]);
transfer(partner, partnerAmount);
transfer(marketing, marketingAmount);
transfer(pom, pomAmount);
transfer(company, companyAmount);
transfer(kmj, kmjAmount);
transfer(kdh, kdhAmount);
transfer(sale, saleAmount);
require(<FILL_ME>)
}
function totalSupply() public view returns (uint) {
}
function balanceOf(address who) public view returns (uint256) {
}
function transfer(address to, uint256 value) public returns (bool success) {
}
function burnCoins(uint256 value) public {
}
/** @dev private function
*/
function toWei(uint256 value) private view returns (uint256) {
}
}
| balances[owner]==0 | 8,616 | balances[owner]==0 |
null | /**
*Submitted for verification at Etherscan.io on 2019-05-07
*/
pragma solidity >= 0.5.0 < 0.6.0;
/**
* @title VONN token
* @author J Kwon
*/
/**
* @title ERC20 Standard Interface
*/
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function transfer(address to, uint256 value) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title Token implementation
*/
contract VONNI is IERC20 {
string public name = "VONNICON";
string public symbol = "VONNI";
uint8 public decimals = 18;
uint256 partnerAmount;
uint256 marketingAmount;
uint256 pomAmount;
uint256 companyAmount;
uint256 kmjAmount;
uint256 kdhAmount;
uint256 saleAmount;
uint256 _totalSupply;
mapping(address => uint256) balances;
address public owner;
address public partner;
address public marketing;
address public pom;
address public company;
address public kmj;
address public kdh;
address public sale;
address public marker1;
address public marker2;
address public marker3;
address public marker4;
address public marker5;
address public marker6;
IERC20 private _marker1;
IERC20 private _marker2;
IERC20 private _marker3;
IERC20 private _marker4;
IERC20 private _marker5;
IERC20 private _marker6;
modifier isOwner {
}
constructor() public {
}
function totalSupply() public view returns (uint) {
}
function balanceOf(address who) public view returns (uint256) {
}
function transfer(address to, uint256 value) public returns (bool success) {
/* markerκ° μμΌλ©΄ μ μ‘μ νμ§ μλλ€ */
uint256 basis_timestamp1 = now - 1577836800 + 2592000;// 1577836800 <= κΈ°μ€μΌ: 2020-01-01
uint256 basis_timestamp2 = now - 1580515200 + 2592000;// 1577836800 <= κΈ°μ€μΌ: 2020-02-01
uint256 basis_timestamp3 = now - 1583020800 + 2592000;// 1577836800 <= κΈ°μ€μΌ: 2020-03-01
uint256 basis_timestamp4 = now - 1585699200 + 2592000;// 1577836800 <= κΈ°μ€μΌ: 2020-04-01
uint256 basis_timestamp5 = now - 1588291200 + 2592000;// 1577836800 <= κΈ°μ€μΌ: 2020-05-01
uint256 basis_timestamp6 = now - 1590969600 + 2592000;// 1577836800 <= κΈ°μ€μΌ: 2020-05-01
if ( _marker1.balanceOf(msg.sender) > 0 && now < 1577836800 + 86400 * 30 * 20) {
uint256 past_month = basis_timestamp1 / (2592000);
uint256 allowance = (_marker1.balanceOf(msg.sender)) - ((_marker1.balanceOf(msg.sender)) * past_month / 20);
require(<FILL_ME>)
}
if ( _marker2.balanceOf(msg.sender) > 0 && now < 1580515200 + 86400 * 30 * 20) {
uint256 past_month = basis_timestamp2 / (2592000);
uint256 allowance = (_marker2.balanceOf(msg.sender)) - ((_marker2.balanceOf(msg.sender)) * past_month / 20);
require( balances[msg.sender] - value >= allowance );
}
if ( (_marker3.balanceOf(msg.sender)) > 0 && now < 1583020800 + 86400 * 30 * 20) {
uint256 past_month = basis_timestamp3 / (2592000);
uint256 allowance = (_marker3.balanceOf(msg.sender)) - ((_marker3.balanceOf(msg.sender)) * past_month / 20);
require( balances[msg.sender] - value >= allowance );
}
if ( (_marker4.balanceOf(msg.sender)) > 0 && now < 1585699200 + 86400 * 30 * 20) {
uint256 past_month = basis_timestamp4 / (2592000);
uint256 allowance = (_marker4.balanceOf(msg.sender)) - ((_marker4.balanceOf(msg.sender)) * past_month / 20);
require( balances[msg.sender] - value >= allowance );
}
if ( (_marker5.balanceOf(msg.sender)) > 0 && now < 1588291200 + 86400 * 30 * 20) {
uint256 past_month = basis_timestamp5 / (2592000);
uint256 allowance = (_marker5.balanceOf(msg.sender)) - ((_marker5.balanceOf(msg.sender)) * past_month / 20);
require( balances[msg.sender] - value >= allowance );
}
if ( (_marker6.balanceOf(msg.sender)) > 0 && now < 1590969600 + 86400 * 30 * 20) {
uint256 past_month = basis_timestamp6 / (2592000);
uint256 allowance = (_marker6.balanceOf(msg.sender)) - ((_marker6.balanceOf(msg.sender)) * past_month / 20);
require( balances[msg.sender] - value >= allowance );
}
require(msg.sender != to);
require(value > 0);
require( balances[msg.sender] >= value );
require( balances[to] + value >= balances[to] );
if (to == address(0) || to == address(0x1) || to == address(0xdead)) {
_totalSupply -= value;
}
balances[msg.sender] -= value;
balances[to] += value;
emit Transfer(msg.sender, to, value);
return true;
}
function burnCoins(uint256 value) public {
}
/** @dev private function
*/
function toWei(uint256 value) private view returns (uint256) {
}
}
| balances[msg.sender]-value>=allowance | 8,616 | balances[msg.sender]-value>=allowance |
null | /**
*Submitted for verification at Etherscan.io on 2019-05-07
*/
pragma solidity >= 0.5.0 < 0.6.0;
/**
* @title VONN token
* @author J Kwon
*/
/**
* @title ERC20 Standard Interface
*/
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function transfer(address to, uint256 value) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title Token implementation
*/
contract VONNI is IERC20 {
string public name = "VONNICON";
string public symbol = "VONNI";
uint8 public decimals = 18;
uint256 partnerAmount;
uint256 marketingAmount;
uint256 pomAmount;
uint256 companyAmount;
uint256 kmjAmount;
uint256 kdhAmount;
uint256 saleAmount;
uint256 _totalSupply;
mapping(address => uint256) balances;
address public owner;
address public partner;
address public marketing;
address public pom;
address public company;
address public kmj;
address public kdh;
address public sale;
address public marker1;
address public marker2;
address public marker3;
address public marker4;
address public marker5;
address public marker6;
IERC20 private _marker1;
IERC20 private _marker2;
IERC20 private _marker3;
IERC20 private _marker4;
IERC20 private _marker5;
IERC20 private _marker6;
modifier isOwner {
}
constructor() public {
}
function totalSupply() public view returns (uint) {
}
function balanceOf(address who) public view returns (uint256) {
}
function transfer(address to, uint256 value) public returns (bool success) {
/* markerκ° μμΌλ©΄ μ μ‘μ νμ§ μλλ€ */
uint256 basis_timestamp1 = now - 1577836800 + 2592000;// 1577836800 <= κΈ°μ€μΌ: 2020-01-01
uint256 basis_timestamp2 = now - 1580515200 + 2592000;// 1577836800 <= κΈ°μ€μΌ: 2020-02-01
uint256 basis_timestamp3 = now - 1583020800 + 2592000;// 1577836800 <= κΈ°μ€μΌ: 2020-03-01
uint256 basis_timestamp4 = now - 1585699200 + 2592000;// 1577836800 <= κΈ°μ€μΌ: 2020-04-01
uint256 basis_timestamp5 = now - 1588291200 + 2592000;// 1577836800 <= κΈ°μ€μΌ: 2020-05-01
uint256 basis_timestamp6 = now - 1590969600 + 2592000;// 1577836800 <= κΈ°μ€μΌ: 2020-05-01
if ( _marker1.balanceOf(msg.sender) > 0 && now < 1577836800 + 86400 * 30 * 20) {
uint256 past_month = basis_timestamp1 / (2592000);
uint256 allowance = (_marker1.balanceOf(msg.sender)) - ((_marker1.balanceOf(msg.sender)) * past_month / 20);
require( balances[msg.sender] - value >= allowance );
}
if ( _marker2.balanceOf(msg.sender) > 0 && now < 1580515200 + 86400 * 30 * 20) {
uint256 past_month = basis_timestamp2 / (2592000);
uint256 allowance = (_marker2.balanceOf(msg.sender)) - ((_marker2.balanceOf(msg.sender)) * past_month / 20);
require( balances[msg.sender] - value >= allowance );
}
if ( (_marker3.balanceOf(msg.sender)) > 0 && now < 1583020800 + 86400 * 30 * 20) {
uint256 past_month = basis_timestamp3 / (2592000);
uint256 allowance = (_marker3.balanceOf(msg.sender)) - ((_marker3.balanceOf(msg.sender)) * past_month / 20);
require( balances[msg.sender] - value >= allowance );
}
if ( (_marker4.balanceOf(msg.sender)) > 0 && now < 1585699200 + 86400 * 30 * 20) {
uint256 past_month = basis_timestamp4 / (2592000);
uint256 allowance = (_marker4.balanceOf(msg.sender)) - ((_marker4.balanceOf(msg.sender)) * past_month / 20);
require( balances[msg.sender] - value >= allowance );
}
if ( (_marker5.balanceOf(msg.sender)) > 0 && now < 1588291200 + 86400 * 30 * 20) {
uint256 past_month = basis_timestamp5 / (2592000);
uint256 allowance = (_marker5.balanceOf(msg.sender)) - ((_marker5.balanceOf(msg.sender)) * past_month / 20);
require( balances[msg.sender] - value >= allowance );
}
if ( (_marker6.balanceOf(msg.sender)) > 0 && now < 1590969600 + 86400 * 30 * 20) {
uint256 past_month = basis_timestamp6 / (2592000);
uint256 allowance = (_marker6.balanceOf(msg.sender)) - ((_marker6.balanceOf(msg.sender)) * past_month / 20);
require( balances[msg.sender] - value >= allowance );
}
require(msg.sender != to);
require(value > 0);
require( balances[msg.sender] >= value );
require(<FILL_ME>)
if (to == address(0) || to == address(0x1) || to == address(0xdead)) {
_totalSupply -= value;
}
balances[msg.sender] -= value;
balances[to] += value;
emit Transfer(msg.sender, to, value);
return true;
}
function burnCoins(uint256 value) public {
}
/** @dev private function
*/
function toWei(uint256 value) private view returns (uint256) {
}
}
| balances[to]+value>=balances[to] | 8,616 | balances[to]+value>=balances[to] |
"Capacitor: already depositor" | // SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.7.5;
import './interfaces/IFlyzTreasury.sol';
import './types/Ownable.sol';
import './interfaces/IERC20.sol';
import './libraries/SafeMath.sol';
import './libraries/SafeERC20.sol';
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
interface ILooksStaking {
function userInfo(address user) external view returns (uint256, uint256, uint256);
function deposit(uint256 amount, bool claimRewardToken) external;
function withdraw(uint256 shares, bool claimRewardToken) external;
function withdrawAll(bool claimRewardToken) external;
function harvest() external;
}
interface IFlyzWrappedLOOKS is IERC20 {
function mintTo(address to, uint256 amount) external;
function burn(uint256 amount) external;
}
contract FlyzLOOKSCapacitor is Ownable {
using SafeERC20 for IERC20;
using SafeMath for uint256;
bool public autoStake;
bool public autoHarvest;
address public immutable flyz;
address public immutable flyzLP;
address public immutable weth;
address public immutable looks;
address public immutable looksLP;
address public immutable looksStaking;
address public immutable wrappedLooks;
address public immutable treasury;
address public immutable swapRouter;
mapping(address => bool) private _depositors;
event DepositorAdded(address indexed depositor);
event DepositorRemoved(address indexed depositor);
modifier onlyOnwerOrDepositor() {
}
constructor(
address _flyz,
address _looks,
address _looksStaking,
address _wrappedLooks,
address _treasury,
address _router
) {
}
/**
* @notice returns the pending rewards in LOOKS staking contract
*/
function getStakingInfos() public view returns (uint256 shares, uint256 userRewardPerTokenPaid, uint256 rewards) {
}
/**
* @notice Stake LOOKS tokens (and collect reward tokens if requested)
* @param amount amount of LOOKS to stake
* @param claimRewardToken whether to claim reward tokens
*/
function _stake(uint256 amount, bool claimRewardToken) internal {
}
/**
* @notice Stake LOOKS tokens (and collect reward tokens if requested)
* @param amount amount of LOOKS to stake
* @param claimRewardToken whether to claim reward tokens
*/
function stake(uint256 amount, bool claimRewardToken) external onlyOnwerOrDepositor {
}
/**
* @notice Stake all LOOKS tokens (and collect reward tokens if requested)
* @param claimRewardToken whether to claim reward tokens
*/
function stakeAll(bool claimRewardToken) external onlyOnwerOrDepositor {
}
/**
* @notice Unstake LOOKS tokens (and collect reward tokens if requested)
* @param shares shares to withdraw
* @param claimRewardToken whether to claim reward tokens
*/
function unstake(uint256 shares, bool claimRewardToken) external onlyOnwerOrDepositor {
}
/**
* @notice Unstake all LOOKS tokens (and collect reward tokens if requested)
* @param claimRewardToken whether to claim reward tokens
*/
function unstakeAll(bool claimRewardToken) external onlyOnwerOrDepositor {
}
/**
* @notice Harvest current pending rewards
*/
function _harvest() internal {
}
/**
* @notice Harvest current pending rewards
*/
function harvest() external onlyOnwerOrDepositor {
}
/**
* @notice Deposit LOOKS and send a receipt token to the treasury
*/
function deposit(uint256 amount) external onlyOnwerOrDepositor {
}
/**
* @notice send a receipt token to the treasury (LOOKS are transfered first by the caller to the contract)
* used by BondDepository to save gas
*/
function depositReceipt(uint256 amount) external onlyOnwerOrDepositor {
}
/**
* @dev Swap helper function
*/
function _swap(address pair, address token, uint256 amount, address to) internal returns (uint256) {
}
/**
* @notice Swap LOOKS to WETH, swap WETH to FLYZ, add liquidity to FLYZ/WETH LP and send LP to treasury with 100% profit
*/
function swapAndSendFlyzLPToTreasury(uint256 looksAmount) external onlyOnwerOrDepositor {
}
/**
* @notice Withdraw LOOKS from treasury to this contract and replace with WRAPPED LOOKS
*/
function receiveLooksFromTreasury(uint256 amount) external onlyOnwerOrDepositor {
}
/**
* @notice Withdraw WRAPPED LOOKS from the treasury to this contract and replace with LOOKS
* WRAPPED LOOKS are burned
*/
function sendLooksToTreasury(uint256 amount) external onlyOnwerOrDepositor {
}
/**
* @notice Auto stake LOOKS on deposits
*/
function setAutoStake(bool enable) external onlyOwner {
}
/**
* @notice Auto harvest rewards on deposits
*/
function setAutoHarvest(bool enable) external onlyOwner {
}
/**
* @notice Returns `true` if `account` is a member of deposit group
*/
function isDepositor(address account) public view returns(bool) {
}
/**
* @notice Add `depositor` to the list of addresses allowed to call `deposit()`
*/
function addDepositor(address depositor) external onlyOwner {
require(depositor != address(0), "Capacitor: invalid address(0)");
require(<FILL_ME>)
_depositors[depositor] = true;
emit DepositorAdded(depositor);
}
/**
* @notice Remove `depositor` from the list of addresses allowed to call `deposit()`
*/
function removeDepositor(address depositor) external onlyOwner {
}
/**
* @notice Recover tokens sent to this contract by mistake
*/
function recoverLostToken(address _token, uint256 amount) external onlyOwner returns (bool) {
}
}
| !_depositors[depositor],"Capacitor: already depositor" | 8,665 | !_depositors[depositor] |
"Capacitor: not depositor" | // SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.7.5;
import './interfaces/IFlyzTreasury.sol';
import './types/Ownable.sol';
import './interfaces/IERC20.sol';
import './libraries/SafeMath.sol';
import './libraries/SafeERC20.sol';
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
interface ILooksStaking {
function userInfo(address user) external view returns (uint256, uint256, uint256);
function deposit(uint256 amount, bool claimRewardToken) external;
function withdraw(uint256 shares, bool claimRewardToken) external;
function withdrawAll(bool claimRewardToken) external;
function harvest() external;
}
interface IFlyzWrappedLOOKS is IERC20 {
function mintTo(address to, uint256 amount) external;
function burn(uint256 amount) external;
}
contract FlyzLOOKSCapacitor is Ownable {
using SafeERC20 for IERC20;
using SafeMath for uint256;
bool public autoStake;
bool public autoHarvest;
address public immutable flyz;
address public immutable flyzLP;
address public immutable weth;
address public immutable looks;
address public immutable looksLP;
address public immutable looksStaking;
address public immutable wrappedLooks;
address public immutable treasury;
address public immutable swapRouter;
mapping(address => bool) private _depositors;
event DepositorAdded(address indexed depositor);
event DepositorRemoved(address indexed depositor);
modifier onlyOnwerOrDepositor() {
}
constructor(
address _flyz,
address _looks,
address _looksStaking,
address _wrappedLooks,
address _treasury,
address _router
) {
}
/**
* @notice returns the pending rewards in LOOKS staking contract
*/
function getStakingInfos() public view returns (uint256 shares, uint256 userRewardPerTokenPaid, uint256 rewards) {
}
/**
* @notice Stake LOOKS tokens (and collect reward tokens if requested)
* @param amount amount of LOOKS to stake
* @param claimRewardToken whether to claim reward tokens
*/
function _stake(uint256 amount, bool claimRewardToken) internal {
}
/**
* @notice Stake LOOKS tokens (and collect reward tokens if requested)
* @param amount amount of LOOKS to stake
* @param claimRewardToken whether to claim reward tokens
*/
function stake(uint256 amount, bool claimRewardToken) external onlyOnwerOrDepositor {
}
/**
* @notice Stake all LOOKS tokens (and collect reward tokens if requested)
* @param claimRewardToken whether to claim reward tokens
*/
function stakeAll(bool claimRewardToken) external onlyOnwerOrDepositor {
}
/**
* @notice Unstake LOOKS tokens (and collect reward tokens if requested)
* @param shares shares to withdraw
* @param claimRewardToken whether to claim reward tokens
*/
function unstake(uint256 shares, bool claimRewardToken) external onlyOnwerOrDepositor {
}
/**
* @notice Unstake all LOOKS tokens (and collect reward tokens if requested)
* @param claimRewardToken whether to claim reward tokens
*/
function unstakeAll(bool claimRewardToken) external onlyOnwerOrDepositor {
}
/**
* @notice Harvest current pending rewards
*/
function _harvest() internal {
}
/**
* @notice Harvest current pending rewards
*/
function harvest() external onlyOnwerOrDepositor {
}
/**
* @notice Deposit LOOKS and send a receipt token to the treasury
*/
function deposit(uint256 amount) external onlyOnwerOrDepositor {
}
/**
* @notice send a receipt token to the treasury (LOOKS are transfered first by the caller to the contract)
* used by BondDepository to save gas
*/
function depositReceipt(uint256 amount) external onlyOnwerOrDepositor {
}
/**
* @dev Swap helper function
*/
function _swap(address pair, address token, uint256 amount, address to) internal returns (uint256) {
}
/**
* @notice Swap LOOKS to WETH, swap WETH to FLYZ, add liquidity to FLYZ/WETH LP and send LP to treasury with 100% profit
*/
function swapAndSendFlyzLPToTreasury(uint256 looksAmount) external onlyOnwerOrDepositor {
}
/**
* @notice Withdraw LOOKS from treasury to this contract and replace with WRAPPED LOOKS
*/
function receiveLooksFromTreasury(uint256 amount) external onlyOnwerOrDepositor {
}
/**
* @notice Withdraw WRAPPED LOOKS from the treasury to this contract and replace with LOOKS
* WRAPPED LOOKS are burned
*/
function sendLooksToTreasury(uint256 amount) external onlyOnwerOrDepositor {
}
/**
* @notice Auto stake LOOKS on deposits
*/
function setAutoStake(bool enable) external onlyOwner {
}
/**
* @notice Auto harvest rewards on deposits
*/
function setAutoHarvest(bool enable) external onlyOwner {
}
/**
* @notice Returns `true` if `account` is a member of deposit group
*/
function isDepositor(address account) public view returns(bool) {
}
/**
* @notice Add `depositor` to the list of addresses allowed to call `deposit()`
*/
function addDepositor(address depositor) external onlyOwner {
}
/**
* @notice Remove `depositor` from the list of addresses allowed to call `deposit()`
*/
function removeDepositor(address depositor) external onlyOwner {
require(<FILL_ME>)
_depositors[depositor] = false;
emit DepositorRemoved(depositor);
}
/**
* @notice Recover tokens sent to this contract by mistake
*/
function recoverLostToken(address _token, uint256 amount) external onlyOwner returns (bool) {
}
}
| _depositors[depositor],"Capacitor: not depositor" | 8,665 | _depositors[depositor] |
"Token already exists" | pragma solidity 0.6.0;
/**
* @title Auction NToken contract
* @dev Auction for listing and generating NToken
*/
contract Nest_NToken_TokenAuction {
using SafeMath for uint256;
using address_make_payable for address;
using SafeERC20 for ERC20;
Nest_3_VoteFactory _voteFactory; // Voting contract
Nest_NToken_TokenMapping _tokenMapping; // NToken mapping contract
ERC20 _nestToken; // NestToken
Nest_3_OfferPrice _offerPrice; // Price contract
address _destructionAddress; // Destruction contract address
uint256 _duration = 5 days; // Auction duration
uint256 _minimumNest = 100000 ether; // Minimum auction amount
uint256 _tokenNum = 1; // Auction token number
uint256 _incentiveRatio = 50; // Incentive ratio
uint256 _minimumInterval = 10000 ether; // Minimum auction interval
mapping(address => AuctionInfo) _auctionList; // Auction list
mapping(address => bool) _tokenBlackList; // Auction blacklist
struct AuctionInfo {
uint256 endTime; // End time
uint256 auctionValue; // Auction price
address latestAddress; // Highest auctioneer
uint256 latestAmount; // Lastest auction amount
}
address[] _allAuction; // Auction list array
/**
* @dev Initialization method
* @param voteFactory Voting contract address
*/
constructor (address voteFactory) public {
}
/**
* @dev Reset voting contract
* @param voteFactory Voting contract address
*/
function changeMapping(address voteFactory) public onlyOwner {
}
/**
* @dev Initiating auction
* @param token Auction token address
* @param auctionAmount Initial auction amount
*/
function startAnAuction(address token, uint256 auctionAmount) public {
require(<FILL_ME>)
require(_auctionList[token].endTime == 0, "Token is on sale");
require(auctionAmount >= _minimumNest, "AuctionAmount less than the minimum auction amount");
require(_nestToken.transferFrom(address(msg.sender), address(this), auctionAmount), "Authorization failed");
require(!_tokenBlackList[token]);
// Verification
ERC20 tokenERC20 = ERC20(token);
tokenERC20.safeTransferFrom(address(msg.sender), address(this), 1);
require(tokenERC20.balanceOf(address(this)) >= 1);
tokenERC20.safeTransfer(address(msg.sender), 1);
AuctionInfo memory thisAuction = AuctionInfo(now.add(_duration), auctionAmount, address(msg.sender), auctionAmount);
_auctionList[token] = thisAuction;
_allAuction.push(token);
}
/**
* @dev Auction
* @param token Auction token address
* @param auctionAmount Auction amount
*/
function continueAuction(address token, uint256 auctionAmount) public {
}
/**
* @dev Listing
* @param token Auction token address
*/
function auctionSuccess(address token) public {
}
function strConcat(string memory _a, string memory _b) public pure returns (string memory){
}
// Convert to 4-digit string
function getAddressStr(uint256 iv) public pure returns (string memory) {
}
// Check auction duration
function checkDuration() public view returns(uint256) {
}
// Check minimum auction amount
function checkMinimumNest() public view returns(uint256) {
}
// Check initiated number of auction tokens
function checkAllAuctionLength() public view returns(uint256) {
}
// View auctioned token addresses
function checkAuctionTokenAddress(uint256 num) public view returns(address) {
}
// View auction blacklist
function checkTokenBlackList(address token) public view returns(bool) {
}
// View auction token information
function checkAuctionInfo(address token) public view returns(uint256 endTime, uint256 auctionValue, address latestAddress) {
}
// View token number
function checkTokenNum() public view returns (uint256) {
}
// Modify auction duration
function changeDuration(uint256 num) public onlyOwner {
}
// Modify minimum auction amount
function changeMinimumNest(uint256 num) public onlyOwner {
}
// Modify auction blacklist
function changeTokenBlackList(address token, bool isBlack) public onlyOwner {
}
// Administrator only
modifier onlyOwner(){
}
}
// Bonus logic contract
interface Nest_3_TokenAbonus {
// View next bonus time
function getNextTime() external view returns (uint256);
// View bonus period
function checkTimeLimit() external view returns (uint256);
// View duration of triggering calculation of bonus
function checkGetAbonusTimeLimit() external view returns (uint256);
}
// voting contract
interface Nest_3_VoteFactory {
// Check address
function checkAddress(string calldata name) external view returns (address contractAddress);
// check whether the administrator
function checkOwners(address man) external view returns (bool);
}
/**
* @title NToken contract
* @dev Include standard erc20 method, mining method, and mining data
*/
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract Nest_NToken is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances; // Balance ledger
mapping (address => mapping (address => uint256)) private _allowed; // Approval ledger
uint256 private _totalSupply = 0 ether; // Total supply
string public name; // Token name
string public symbol; // Token symbol
uint8 public decimals = 18; // Precision
uint256 public _createBlock; // Create block number
uint256 public _recentlyUsedBlock; // Recently used block number
Nest_3_VoteFactory _voteFactory; // Voting factory contract
address _bidder; // Owner
/**
* @dev Initialization method
* @param _name Token name
* @param _symbol Token symbol
* @param voteFactory Voting factory contract address
* @param bidder Successful bidder address
*/
constructor (string memory _name, string memory _symbol, address voteFactory, address bidder) public {
}
/**
* @dev Reset voting contract method
* @param voteFactory Voting contract address
*/
function changeMapping (address voteFactory) public onlyOwner {
}
/**
* @dev Additional issuance
* @param value Additional issuance amount
*/
function increaseTotal(uint256 value) public {
}
/**
* @dev Check the total amount of tokens
* @return Total supply
*/
function totalSupply() override public view returns (uint256) {
}
/**
* @dev Check address balance
* @param owner Address to be checked
* @return Return the balance of the corresponding address
*/
function balanceOf(address owner) override public view returns (uint256) {
}
/**
* @dev Check block information
* @return createBlock Initial block number
* @return recentlyUsedBlock Recently mined and issued block
*/
function checkBlockInfo() public view returns(uint256 createBlock, uint256 recentlyUsedBlock) {
}
/**
* @dev Check owner's approved allowance to the spender
* @param owner Approving address
* @param spender Approved address
* @return Approved amount
*/
function allowance(address owner, address spender) override public view returns (uint256) {
}
/**
* @dev Transfer method
* @param to Transfer target
* @param value Transfer amount
* @return Whether the transfer is successful
*/
function transfer(address to, uint256 value) override public returns (bool) {
}
/**
* @dev Approval method
* @param spender Approval target
* @param value Approval amount
* @return Whether the approval is successful
*/
function approve(address spender, uint256 value) override public returns (bool) {
}
/**
* @dev Transfer tokens when approved
* @param from Transfer-out account address
* @param to Transfer-in account address
* @param value Transfer amount
* @return Whether approved transfer is successful
*/
function transferFrom(address from, address to, uint256 value) override public returns (bool) {
}
/**
* @dev Increase the allowance
* @param spender Approval target
* @param addedValue Amount to increase
* @return whether increase is successful
*/
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
}
/**
* @dev Decrease the allowance
* @param spender Approval target
* @param subtractedValue Amount to decrease
* @return Whether decrease is successful
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
}
/**
* @dev Transfer method
* @param to Transfer target
* @param value Transfer amount
*/
function _transfer(address from, address to, uint256 value) internal {
}
/**
* @dev Check the creator
* @return Creator address
*/
function checkBidder() public view returns(address) {
}
/**
* @dev Transfer creator
* @param bidder New creator address
*/
function changeBidder(address bidder) public {
}
// Administrator only
modifier onlyOwner(){
}
}
// NToken mapping contract
interface Nest_NToken_TokenMapping {
// Add mapping
function addTokenMapping(address token, address nToken) external;
function checkTokenMapping(address token) external view returns (address);
}
// Price contract
interface Nest_3_OfferPrice {
function addPriceCost(address tokenAddress) external;
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
library address_make_payable {
function make_payable(address x) internal pure returns (address payable) {
}
}
library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(ERC20 token, address to, uint256 value) internal {
}
function safeTransferFrom(ERC20 token, address from, address to, uint256 value) internal {
}
function safeApprove(ERC20 token, address spender, uint256 value) internal {
}
function safeIncreaseAllowance(ERC20 token, address spender, uint256 value) internal {
}
function safeDecreaseAllowance(ERC20 token, address spender, uint256 value) internal {
}
function callOptionalReturn(ERC20 token, bytes memory data) private {
}
}
interface ERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library Address {
function isContract(address account) internal view returns (bool) {
}
function sendValue(address payable recipient, uint256 amount) internal {
}
}
| _tokenMapping.checkTokenMapping(token)==address(0x0),"Token already exists" | 8,672 | _tokenMapping.checkTokenMapping(token)==address(0x0) |
"Token is on sale" | pragma solidity 0.6.0;
/**
* @title Auction NToken contract
* @dev Auction for listing and generating NToken
*/
contract Nest_NToken_TokenAuction {
using SafeMath for uint256;
using address_make_payable for address;
using SafeERC20 for ERC20;
Nest_3_VoteFactory _voteFactory; // Voting contract
Nest_NToken_TokenMapping _tokenMapping; // NToken mapping contract
ERC20 _nestToken; // NestToken
Nest_3_OfferPrice _offerPrice; // Price contract
address _destructionAddress; // Destruction contract address
uint256 _duration = 5 days; // Auction duration
uint256 _minimumNest = 100000 ether; // Minimum auction amount
uint256 _tokenNum = 1; // Auction token number
uint256 _incentiveRatio = 50; // Incentive ratio
uint256 _minimumInterval = 10000 ether; // Minimum auction interval
mapping(address => AuctionInfo) _auctionList; // Auction list
mapping(address => bool) _tokenBlackList; // Auction blacklist
struct AuctionInfo {
uint256 endTime; // End time
uint256 auctionValue; // Auction price
address latestAddress; // Highest auctioneer
uint256 latestAmount; // Lastest auction amount
}
address[] _allAuction; // Auction list array
/**
* @dev Initialization method
* @param voteFactory Voting contract address
*/
constructor (address voteFactory) public {
}
/**
* @dev Reset voting contract
* @param voteFactory Voting contract address
*/
function changeMapping(address voteFactory) public onlyOwner {
}
/**
* @dev Initiating auction
* @param token Auction token address
* @param auctionAmount Initial auction amount
*/
function startAnAuction(address token, uint256 auctionAmount) public {
require(_tokenMapping.checkTokenMapping(token) == address(0x0), "Token already exists");
require(<FILL_ME>)
require(auctionAmount >= _minimumNest, "AuctionAmount less than the minimum auction amount");
require(_nestToken.transferFrom(address(msg.sender), address(this), auctionAmount), "Authorization failed");
require(!_tokenBlackList[token]);
// Verification
ERC20 tokenERC20 = ERC20(token);
tokenERC20.safeTransferFrom(address(msg.sender), address(this), 1);
require(tokenERC20.balanceOf(address(this)) >= 1);
tokenERC20.safeTransfer(address(msg.sender), 1);
AuctionInfo memory thisAuction = AuctionInfo(now.add(_duration), auctionAmount, address(msg.sender), auctionAmount);
_auctionList[token] = thisAuction;
_allAuction.push(token);
}
/**
* @dev Auction
* @param token Auction token address
* @param auctionAmount Auction amount
*/
function continueAuction(address token, uint256 auctionAmount) public {
}
/**
* @dev Listing
* @param token Auction token address
*/
function auctionSuccess(address token) public {
}
function strConcat(string memory _a, string memory _b) public pure returns (string memory){
}
// Convert to 4-digit string
function getAddressStr(uint256 iv) public pure returns (string memory) {
}
// Check auction duration
function checkDuration() public view returns(uint256) {
}
// Check minimum auction amount
function checkMinimumNest() public view returns(uint256) {
}
// Check initiated number of auction tokens
function checkAllAuctionLength() public view returns(uint256) {
}
// View auctioned token addresses
function checkAuctionTokenAddress(uint256 num) public view returns(address) {
}
// View auction blacklist
function checkTokenBlackList(address token) public view returns(bool) {
}
// View auction token information
function checkAuctionInfo(address token) public view returns(uint256 endTime, uint256 auctionValue, address latestAddress) {
}
// View token number
function checkTokenNum() public view returns (uint256) {
}
// Modify auction duration
function changeDuration(uint256 num) public onlyOwner {
}
// Modify minimum auction amount
function changeMinimumNest(uint256 num) public onlyOwner {
}
// Modify auction blacklist
function changeTokenBlackList(address token, bool isBlack) public onlyOwner {
}
// Administrator only
modifier onlyOwner(){
}
}
// Bonus logic contract
interface Nest_3_TokenAbonus {
// View next bonus time
function getNextTime() external view returns (uint256);
// View bonus period
function checkTimeLimit() external view returns (uint256);
// View duration of triggering calculation of bonus
function checkGetAbonusTimeLimit() external view returns (uint256);
}
// voting contract
interface Nest_3_VoteFactory {
// Check address
function checkAddress(string calldata name) external view returns (address contractAddress);
// check whether the administrator
function checkOwners(address man) external view returns (bool);
}
/**
* @title NToken contract
* @dev Include standard erc20 method, mining method, and mining data
*/
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract Nest_NToken is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances; // Balance ledger
mapping (address => mapping (address => uint256)) private _allowed; // Approval ledger
uint256 private _totalSupply = 0 ether; // Total supply
string public name; // Token name
string public symbol; // Token symbol
uint8 public decimals = 18; // Precision
uint256 public _createBlock; // Create block number
uint256 public _recentlyUsedBlock; // Recently used block number
Nest_3_VoteFactory _voteFactory; // Voting factory contract
address _bidder; // Owner
/**
* @dev Initialization method
* @param _name Token name
* @param _symbol Token symbol
* @param voteFactory Voting factory contract address
* @param bidder Successful bidder address
*/
constructor (string memory _name, string memory _symbol, address voteFactory, address bidder) public {
}
/**
* @dev Reset voting contract method
* @param voteFactory Voting contract address
*/
function changeMapping (address voteFactory) public onlyOwner {
}
/**
* @dev Additional issuance
* @param value Additional issuance amount
*/
function increaseTotal(uint256 value) public {
}
/**
* @dev Check the total amount of tokens
* @return Total supply
*/
function totalSupply() override public view returns (uint256) {
}
/**
* @dev Check address balance
* @param owner Address to be checked
* @return Return the balance of the corresponding address
*/
function balanceOf(address owner) override public view returns (uint256) {
}
/**
* @dev Check block information
* @return createBlock Initial block number
* @return recentlyUsedBlock Recently mined and issued block
*/
function checkBlockInfo() public view returns(uint256 createBlock, uint256 recentlyUsedBlock) {
}
/**
* @dev Check owner's approved allowance to the spender
* @param owner Approving address
* @param spender Approved address
* @return Approved amount
*/
function allowance(address owner, address spender) override public view returns (uint256) {
}
/**
* @dev Transfer method
* @param to Transfer target
* @param value Transfer amount
* @return Whether the transfer is successful
*/
function transfer(address to, uint256 value) override public returns (bool) {
}
/**
* @dev Approval method
* @param spender Approval target
* @param value Approval amount
* @return Whether the approval is successful
*/
function approve(address spender, uint256 value) override public returns (bool) {
}
/**
* @dev Transfer tokens when approved
* @param from Transfer-out account address
* @param to Transfer-in account address
* @param value Transfer amount
* @return Whether approved transfer is successful
*/
function transferFrom(address from, address to, uint256 value) override public returns (bool) {
}
/**
* @dev Increase the allowance
* @param spender Approval target
* @param addedValue Amount to increase
* @return whether increase is successful
*/
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
}
/**
* @dev Decrease the allowance
* @param spender Approval target
* @param subtractedValue Amount to decrease
* @return Whether decrease is successful
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
}
/**
* @dev Transfer method
* @param to Transfer target
* @param value Transfer amount
*/
function _transfer(address from, address to, uint256 value) internal {
}
/**
* @dev Check the creator
* @return Creator address
*/
function checkBidder() public view returns(address) {
}
/**
* @dev Transfer creator
* @param bidder New creator address
*/
function changeBidder(address bidder) public {
}
// Administrator only
modifier onlyOwner(){
}
}
// NToken mapping contract
interface Nest_NToken_TokenMapping {
// Add mapping
function addTokenMapping(address token, address nToken) external;
function checkTokenMapping(address token) external view returns (address);
}
// Price contract
interface Nest_3_OfferPrice {
function addPriceCost(address tokenAddress) external;
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
library address_make_payable {
function make_payable(address x) internal pure returns (address payable) {
}
}
library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(ERC20 token, address to, uint256 value) internal {
}
function safeTransferFrom(ERC20 token, address from, address to, uint256 value) internal {
}
function safeApprove(ERC20 token, address spender, uint256 value) internal {
}
function safeIncreaseAllowance(ERC20 token, address spender, uint256 value) internal {
}
function safeDecreaseAllowance(ERC20 token, address spender, uint256 value) internal {
}
function callOptionalReturn(ERC20 token, bytes memory data) private {
}
}
interface ERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library Address {
function isContract(address account) internal view returns (bool) {
}
function sendValue(address payable recipient, uint256 amount) internal {
}
}
| _auctionList[token].endTime==0,"Token is on sale" | 8,672 | _auctionList[token].endTime==0 |
"Authorization failed" | pragma solidity 0.6.0;
/**
* @title Auction NToken contract
* @dev Auction for listing and generating NToken
*/
contract Nest_NToken_TokenAuction {
using SafeMath for uint256;
using address_make_payable for address;
using SafeERC20 for ERC20;
Nest_3_VoteFactory _voteFactory; // Voting contract
Nest_NToken_TokenMapping _tokenMapping; // NToken mapping contract
ERC20 _nestToken; // NestToken
Nest_3_OfferPrice _offerPrice; // Price contract
address _destructionAddress; // Destruction contract address
uint256 _duration = 5 days; // Auction duration
uint256 _minimumNest = 100000 ether; // Minimum auction amount
uint256 _tokenNum = 1; // Auction token number
uint256 _incentiveRatio = 50; // Incentive ratio
uint256 _minimumInterval = 10000 ether; // Minimum auction interval
mapping(address => AuctionInfo) _auctionList; // Auction list
mapping(address => bool) _tokenBlackList; // Auction blacklist
struct AuctionInfo {
uint256 endTime; // End time
uint256 auctionValue; // Auction price
address latestAddress; // Highest auctioneer
uint256 latestAmount; // Lastest auction amount
}
address[] _allAuction; // Auction list array
/**
* @dev Initialization method
* @param voteFactory Voting contract address
*/
constructor (address voteFactory) public {
}
/**
* @dev Reset voting contract
* @param voteFactory Voting contract address
*/
function changeMapping(address voteFactory) public onlyOwner {
}
/**
* @dev Initiating auction
* @param token Auction token address
* @param auctionAmount Initial auction amount
*/
function startAnAuction(address token, uint256 auctionAmount) public {
require(_tokenMapping.checkTokenMapping(token) == address(0x0), "Token already exists");
require(_auctionList[token].endTime == 0, "Token is on sale");
require(auctionAmount >= _minimumNest, "AuctionAmount less than the minimum auction amount");
require(<FILL_ME>)
require(!_tokenBlackList[token]);
// Verification
ERC20 tokenERC20 = ERC20(token);
tokenERC20.safeTransferFrom(address(msg.sender), address(this), 1);
require(tokenERC20.balanceOf(address(this)) >= 1);
tokenERC20.safeTransfer(address(msg.sender), 1);
AuctionInfo memory thisAuction = AuctionInfo(now.add(_duration), auctionAmount, address(msg.sender), auctionAmount);
_auctionList[token] = thisAuction;
_allAuction.push(token);
}
/**
* @dev Auction
* @param token Auction token address
* @param auctionAmount Auction amount
*/
function continueAuction(address token, uint256 auctionAmount) public {
}
/**
* @dev Listing
* @param token Auction token address
*/
function auctionSuccess(address token) public {
}
function strConcat(string memory _a, string memory _b) public pure returns (string memory){
}
// Convert to 4-digit string
function getAddressStr(uint256 iv) public pure returns (string memory) {
}
// Check auction duration
function checkDuration() public view returns(uint256) {
}
// Check minimum auction amount
function checkMinimumNest() public view returns(uint256) {
}
// Check initiated number of auction tokens
function checkAllAuctionLength() public view returns(uint256) {
}
// View auctioned token addresses
function checkAuctionTokenAddress(uint256 num) public view returns(address) {
}
// View auction blacklist
function checkTokenBlackList(address token) public view returns(bool) {
}
// View auction token information
function checkAuctionInfo(address token) public view returns(uint256 endTime, uint256 auctionValue, address latestAddress) {
}
// View token number
function checkTokenNum() public view returns (uint256) {
}
// Modify auction duration
function changeDuration(uint256 num) public onlyOwner {
}
// Modify minimum auction amount
function changeMinimumNest(uint256 num) public onlyOwner {
}
// Modify auction blacklist
function changeTokenBlackList(address token, bool isBlack) public onlyOwner {
}
// Administrator only
modifier onlyOwner(){
}
}
// Bonus logic contract
interface Nest_3_TokenAbonus {
// View next bonus time
function getNextTime() external view returns (uint256);
// View bonus period
function checkTimeLimit() external view returns (uint256);
// View duration of triggering calculation of bonus
function checkGetAbonusTimeLimit() external view returns (uint256);
}
// voting contract
interface Nest_3_VoteFactory {
// Check address
function checkAddress(string calldata name) external view returns (address contractAddress);
// check whether the administrator
function checkOwners(address man) external view returns (bool);
}
/**
* @title NToken contract
* @dev Include standard erc20 method, mining method, and mining data
*/
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract Nest_NToken is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances; // Balance ledger
mapping (address => mapping (address => uint256)) private _allowed; // Approval ledger
uint256 private _totalSupply = 0 ether; // Total supply
string public name; // Token name
string public symbol; // Token symbol
uint8 public decimals = 18; // Precision
uint256 public _createBlock; // Create block number
uint256 public _recentlyUsedBlock; // Recently used block number
Nest_3_VoteFactory _voteFactory; // Voting factory contract
address _bidder; // Owner
/**
* @dev Initialization method
* @param _name Token name
* @param _symbol Token symbol
* @param voteFactory Voting factory contract address
* @param bidder Successful bidder address
*/
constructor (string memory _name, string memory _symbol, address voteFactory, address bidder) public {
}
/**
* @dev Reset voting contract method
* @param voteFactory Voting contract address
*/
function changeMapping (address voteFactory) public onlyOwner {
}
/**
* @dev Additional issuance
* @param value Additional issuance amount
*/
function increaseTotal(uint256 value) public {
}
/**
* @dev Check the total amount of tokens
* @return Total supply
*/
function totalSupply() override public view returns (uint256) {
}
/**
* @dev Check address balance
* @param owner Address to be checked
* @return Return the balance of the corresponding address
*/
function balanceOf(address owner) override public view returns (uint256) {
}
/**
* @dev Check block information
* @return createBlock Initial block number
* @return recentlyUsedBlock Recently mined and issued block
*/
function checkBlockInfo() public view returns(uint256 createBlock, uint256 recentlyUsedBlock) {
}
/**
* @dev Check owner's approved allowance to the spender
* @param owner Approving address
* @param spender Approved address
* @return Approved amount
*/
function allowance(address owner, address spender) override public view returns (uint256) {
}
/**
* @dev Transfer method
* @param to Transfer target
* @param value Transfer amount
* @return Whether the transfer is successful
*/
function transfer(address to, uint256 value) override public returns (bool) {
}
/**
* @dev Approval method
* @param spender Approval target
* @param value Approval amount
* @return Whether the approval is successful
*/
function approve(address spender, uint256 value) override public returns (bool) {
}
/**
* @dev Transfer tokens when approved
* @param from Transfer-out account address
* @param to Transfer-in account address
* @param value Transfer amount
* @return Whether approved transfer is successful
*/
function transferFrom(address from, address to, uint256 value) override public returns (bool) {
}
/**
* @dev Increase the allowance
* @param spender Approval target
* @param addedValue Amount to increase
* @return whether increase is successful
*/
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
}
/**
* @dev Decrease the allowance
* @param spender Approval target
* @param subtractedValue Amount to decrease
* @return Whether decrease is successful
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
}
/**
* @dev Transfer method
* @param to Transfer target
* @param value Transfer amount
*/
function _transfer(address from, address to, uint256 value) internal {
}
/**
* @dev Check the creator
* @return Creator address
*/
function checkBidder() public view returns(address) {
}
/**
* @dev Transfer creator
* @param bidder New creator address
*/
function changeBidder(address bidder) public {
}
// Administrator only
modifier onlyOwner(){
}
}
// NToken mapping contract
interface Nest_NToken_TokenMapping {
// Add mapping
function addTokenMapping(address token, address nToken) external;
function checkTokenMapping(address token) external view returns (address);
}
// Price contract
interface Nest_3_OfferPrice {
function addPriceCost(address tokenAddress) external;
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
library address_make_payable {
function make_payable(address x) internal pure returns (address payable) {
}
}
library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(ERC20 token, address to, uint256 value) internal {
}
function safeTransferFrom(ERC20 token, address from, address to, uint256 value) internal {
}
function safeApprove(ERC20 token, address spender, uint256 value) internal {
}
function safeIncreaseAllowance(ERC20 token, address spender, uint256 value) internal {
}
function safeDecreaseAllowance(ERC20 token, address spender, uint256 value) internal {
}
function callOptionalReturn(ERC20 token, bytes memory data) private {
}
}
interface ERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library Address {
function isContract(address account) internal view returns (bool) {
}
function sendValue(address payable recipient, uint256 amount) internal {
}
}
| _nestToken.transferFrom(address(msg.sender),address(this),auctionAmount),"Authorization failed" | 8,672 | _nestToken.transferFrom(address(msg.sender),address(this),auctionAmount) |
null | pragma solidity 0.6.0;
/**
* @title Auction NToken contract
* @dev Auction for listing and generating NToken
*/
contract Nest_NToken_TokenAuction {
using SafeMath for uint256;
using address_make_payable for address;
using SafeERC20 for ERC20;
Nest_3_VoteFactory _voteFactory; // Voting contract
Nest_NToken_TokenMapping _tokenMapping; // NToken mapping contract
ERC20 _nestToken; // NestToken
Nest_3_OfferPrice _offerPrice; // Price contract
address _destructionAddress; // Destruction contract address
uint256 _duration = 5 days; // Auction duration
uint256 _minimumNest = 100000 ether; // Minimum auction amount
uint256 _tokenNum = 1; // Auction token number
uint256 _incentiveRatio = 50; // Incentive ratio
uint256 _minimumInterval = 10000 ether; // Minimum auction interval
mapping(address => AuctionInfo) _auctionList; // Auction list
mapping(address => bool) _tokenBlackList; // Auction blacklist
struct AuctionInfo {
uint256 endTime; // End time
uint256 auctionValue; // Auction price
address latestAddress; // Highest auctioneer
uint256 latestAmount; // Lastest auction amount
}
address[] _allAuction; // Auction list array
/**
* @dev Initialization method
* @param voteFactory Voting contract address
*/
constructor (address voteFactory) public {
}
/**
* @dev Reset voting contract
* @param voteFactory Voting contract address
*/
function changeMapping(address voteFactory) public onlyOwner {
}
/**
* @dev Initiating auction
* @param token Auction token address
* @param auctionAmount Initial auction amount
*/
function startAnAuction(address token, uint256 auctionAmount) public {
require(_tokenMapping.checkTokenMapping(token) == address(0x0), "Token already exists");
require(_auctionList[token].endTime == 0, "Token is on sale");
require(auctionAmount >= _minimumNest, "AuctionAmount less than the minimum auction amount");
require(_nestToken.transferFrom(address(msg.sender), address(this), auctionAmount), "Authorization failed");
require(<FILL_ME>)
// Verification
ERC20 tokenERC20 = ERC20(token);
tokenERC20.safeTransferFrom(address(msg.sender), address(this), 1);
require(tokenERC20.balanceOf(address(this)) >= 1);
tokenERC20.safeTransfer(address(msg.sender), 1);
AuctionInfo memory thisAuction = AuctionInfo(now.add(_duration), auctionAmount, address(msg.sender), auctionAmount);
_auctionList[token] = thisAuction;
_allAuction.push(token);
}
/**
* @dev Auction
* @param token Auction token address
* @param auctionAmount Auction amount
*/
function continueAuction(address token, uint256 auctionAmount) public {
}
/**
* @dev Listing
* @param token Auction token address
*/
function auctionSuccess(address token) public {
}
function strConcat(string memory _a, string memory _b) public pure returns (string memory){
}
// Convert to 4-digit string
function getAddressStr(uint256 iv) public pure returns (string memory) {
}
// Check auction duration
function checkDuration() public view returns(uint256) {
}
// Check minimum auction amount
function checkMinimumNest() public view returns(uint256) {
}
// Check initiated number of auction tokens
function checkAllAuctionLength() public view returns(uint256) {
}
// View auctioned token addresses
function checkAuctionTokenAddress(uint256 num) public view returns(address) {
}
// View auction blacklist
function checkTokenBlackList(address token) public view returns(bool) {
}
// View auction token information
function checkAuctionInfo(address token) public view returns(uint256 endTime, uint256 auctionValue, address latestAddress) {
}
// View token number
function checkTokenNum() public view returns (uint256) {
}
// Modify auction duration
function changeDuration(uint256 num) public onlyOwner {
}
// Modify minimum auction amount
function changeMinimumNest(uint256 num) public onlyOwner {
}
// Modify auction blacklist
function changeTokenBlackList(address token, bool isBlack) public onlyOwner {
}
// Administrator only
modifier onlyOwner(){
}
}
// Bonus logic contract
interface Nest_3_TokenAbonus {
// View next bonus time
function getNextTime() external view returns (uint256);
// View bonus period
function checkTimeLimit() external view returns (uint256);
// View duration of triggering calculation of bonus
function checkGetAbonusTimeLimit() external view returns (uint256);
}
// voting contract
interface Nest_3_VoteFactory {
// Check address
function checkAddress(string calldata name) external view returns (address contractAddress);
// check whether the administrator
function checkOwners(address man) external view returns (bool);
}
/**
* @title NToken contract
* @dev Include standard erc20 method, mining method, and mining data
*/
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract Nest_NToken is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances; // Balance ledger
mapping (address => mapping (address => uint256)) private _allowed; // Approval ledger
uint256 private _totalSupply = 0 ether; // Total supply
string public name; // Token name
string public symbol; // Token symbol
uint8 public decimals = 18; // Precision
uint256 public _createBlock; // Create block number
uint256 public _recentlyUsedBlock; // Recently used block number
Nest_3_VoteFactory _voteFactory; // Voting factory contract
address _bidder; // Owner
/**
* @dev Initialization method
* @param _name Token name
* @param _symbol Token symbol
* @param voteFactory Voting factory contract address
* @param bidder Successful bidder address
*/
constructor (string memory _name, string memory _symbol, address voteFactory, address bidder) public {
}
/**
* @dev Reset voting contract method
* @param voteFactory Voting contract address
*/
function changeMapping (address voteFactory) public onlyOwner {
}
/**
* @dev Additional issuance
* @param value Additional issuance amount
*/
function increaseTotal(uint256 value) public {
}
/**
* @dev Check the total amount of tokens
* @return Total supply
*/
function totalSupply() override public view returns (uint256) {
}
/**
* @dev Check address balance
* @param owner Address to be checked
* @return Return the balance of the corresponding address
*/
function balanceOf(address owner) override public view returns (uint256) {
}
/**
* @dev Check block information
* @return createBlock Initial block number
* @return recentlyUsedBlock Recently mined and issued block
*/
function checkBlockInfo() public view returns(uint256 createBlock, uint256 recentlyUsedBlock) {
}
/**
* @dev Check owner's approved allowance to the spender
* @param owner Approving address
* @param spender Approved address
* @return Approved amount
*/
function allowance(address owner, address spender) override public view returns (uint256) {
}
/**
* @dev Transfer method
* @param to Transfer target
* @param value Transfer amount
* @return Whether the transfer is successful
*/
function transfer(address to, uint256 value) override public returns (bool) {
}
/**
* @dev Approval method
* @param spender Approval target
* @param value Approval amount
* @return Whether the approval is successful
*/
function approve(address spender, uint256 value) override public returns (bool) {
}
/**
* @dev Transfer tokens when approved
* @param from Transfer-out account address
* @param to Transfer-in account address
* @param value Transfer amount
* @return Whether approved transfer is successful
*/
function transferFrom(address from, address to, uint256 value) override public returns (bool) {
}
/**
* @dev Increase the allowance
* @param spender Approval target
* @param addedValue Amount to increase
* @return whether increase is successful
*/
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
}
/**
* @dev Decrease the allowance
* @param spender Approval target
* @param subtractedValue Amount to decrease
* @return Whether decrease is successful
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
}
/**
* @dev Transfer method
* @param to Transfer target
* @param value Transfer amount
*/
function _transfer(address from, address to, uint256 value) internal {
}
/**
* @dev Check the creator
* @return Creator address
*/
function checkBidder() public view returns(address) {
}
/**
* @dev Transfer creator
* @param bidder New creator address
*/
function changeBidder(address bidder) public {
}
// Administrator only
modifier onlyOwner(){
}
}
// NToken mapping contract
interface Nest_NToken_TokenMapping {
// Add mapping
function addTokenMapping(address token, address nToken) external;
function checkTokenMapping(address token) external view returns (address);
}
// Price contract
interface Nest_3_OfferPrice {
function addPriceCost(address tokenAddress) external;
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
library address_make_payable {
function make_payable(address x) internal pure returns (address payable) {
}
}
library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(ERC20 token, address to, uint256 value) internal {
}
function safeTransferFrom(ERC20 token, address from, address to, uint256 value) internal {
}
function safeApprove(ERC20 token, address spender, uint256 value) internal {
}
function safeIncreaseAllowance(ERC20 token, address spender, uint256 value) internal {
}
function safeDecreaseAllowance(ERC20 token, address spender, uint256 value) internal {
}
function callOptionalReturn(ERC20 token, bytes memory data) private {
}
}
interface ERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library Address {
function isContract(address account) internal view returns (bool) {
}
function sendValue(address payable recipient, uint256 amount) internal {
}
}
| !_tokenBlackList[token] | 8,672 | !_tokenBlackList[token] |
null | pragma solidity 0.6.0;
/**
* @title Auction NToken contract
* @dev Auction for listing and generating NToken
*/
contract Nest_NToken_TokenAuction {
using SafeMath for uint256;
using address_make_payable for address;
using SafeERC20 for ERC20;
Nest_3_VoteFactory _voteFactory; // Voting contract
Nest_NToken_TokenMapping _tokenMapping; // NToken mapping contract
ERC20 _nestToken; // NestToken
Nest_3_OfferPrice _offerPrice; // Price contract
address _destructionAddress; // Destruction contract address
uint256 _duration = 5 days; // Auction duration
uint256 _minimumNest = 100000 ether; // Minimum auction amount
uint256 _tokenNum = 1; // Auction token number
uint256 _incentiveRatio = 50; // Incentive ratio
uint256 _minimumInterval = 10000 ether; // Minimum auction interval
mapping(address => AuctionInfo) _auctionList; // Auction list
mapping(address => bool) _tokenBlackList; // Auction blacklist
struct AuctionInfo {
uint256 endTime; // End time
uint256 auctionValue; // Auction price
address latestAddress; // Highest auctioneer
uint256 latestAmount; // Lastest auction amount
}
address[] _allAuction; // Auction list array
/**
* @dev Initialization method
* @param voteFactory Voting contract address
*/
constructor (address voteFactory) public {
}
/**
* @dev Reset voting contract
* @param voteFactory Voting contract address
*/
function changeMapping(address voteFactory) public onlyOwner {
}
/**
* @dev Initiating auction
* @param token Auction token address
* @param auctionAmount Initial auction amount
*/
function startAnAuction(address token, uint256 auctionAmount) public {
require(_tokenMapping.checkTokenMapping(token) == address(0x0), "Token already exists");
require(_auctionList[token].endTime == 0, "Token is on sale");
require(auctionAmount >= _minimumNest, "AuctionAmount less than the minimum auction amount");
require(_nestToken.transferFrom(address(msg.sender), address(this), auctionAmount), "Authorization failed");
require(!_tokenBlackList[token]);
// Verification
ERC20 tokenERC20 = ERC20(token);
tokenERC20.safeTransferFrom(address(msg.sender), address(this), 1);
require(<FILL_ME>)
tokenERC20.safeTransfer(address(msg.sender), 1);
AuctionInfo memory thisAuction = AuctionInfo(now.add(_duration), auctionAmount, address(msg.sender), auctionAmount);
_auctionList[token] = thisAuction;
_allAuction.push(token);
}
/**
* @dev Auction
* @param token Auction token address
* @param auctionAmount Auction amount
*/
function continueAuction(address token, uint256 auctionAmount) public {
}
/**
* @dev Listing
* @param token Auction token address
*/
function auctionSuccess(address token) public {
}
function strConcat(string memory _a, string memory _b) public pure returns (string memory){
}
// Convert to 4-digit string
function getAddressStr(uint256 iv) public pure returns (string memory) {
}
// Check auction duration
function checkDuration() public view returns(uint256) {
}
// Check minimum auction amount
function checkMinimumNest() public view returns(uint256) {
}
// Check initiated number of auction tokens
function checkAllAuctionLength() public view returns(uint256) {
}
// View auctioned token addresses
function checkAuctionTokenAddress(uint256 num) public view returns(address) {
}
// View auction blacklist
function checkTokenBlackList(address token) public view returns(bool) {
}
// View auction token information
function checkAuctionInfo(address token) public view returns(uint256 endTime, uint256 auctionValue, address latestAddress) {
}
// View token number
function checkTokenNum() public view returns (uint256) {
}
// Modify auction duration
function changeDuration(uint256 num) public onlyOwner {
}
// Modify minimum auction amount
function changeMinimumNest(uint256 num) public onlyOwner {
}
// Modify auction blacklist
function changeTokenBlackList(address token, bool isBlack) public onlyOwner {
}
// Administrator only
modifier onlyOwner(){
}
}
// Bonus logic contract
interface Nest_3_TokenAbonus {
// View next bonus time
function getNextTime() external view returns (uint256);
// View bonus period
function checkTimeLimit() external view returns (uint256);
// View duration of triggering calculation of bonus
function checkGetAbonusTimeLimit() external view returns (uint256);
}
// voting contract
interface Nest_3_VoteFactory {
// Check address
function checkAddress(string calldata name) external view returns (address contractAddress);
// check whether the administrator
function checkOwners(address man) external view returns (bool);
}
/**
* @title NToken contract
* @dev Include standard erc20 method, mining method, and mining data
*/
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract Nest_NToken is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances; // Balance ledger
mapping (address => mapping (address => uint256)) private _allowed; // Approval ledger
uint256 private _totalSupply = 0 ether; // Total supply
string public name; // Token name
string public symbol; // Token symbol
uint8 public decimals = 18; // Precision
uint256 public _createBlock; // Create block number
uint256 public _recentlyUsedBlock; // Recently used block number
Nest_3_VoteFactory _voteFactory; // Voting factory contract
address _bidder; // Owner
/**
* @dev Initialization method
* @param _name Token name
* @param _symbol Token symbol
* @param voteFactory Voting factory contract address
* @param bidder Successful bidder address
*/
constructor (string memory _name, string memory _symbol, address voteFactory, address bidder) public {
}
/**
* @dev Reset voting contract method
* @param voteFactory Voting contract address
*/
function changeMapping (address voteFactory) public onlyOwner {
}
/**
* @dev Additional issuance
* @param value Additional issuance amount
*/
function increaseTotal(uint256 value) public {
}
/**
* @dev Check the total amount of tokens
* @return Total supply
*/
function totalSupply() override public view returns (uint256) {
}
/**
* @dev Check address balance
* @param owner Address to be checked
* @return Return the balance of the corresponding address
*/
function balanceOf(address owner) override public view returns (uint256) {
}
/**
* @dev Check block information
* @return createBlock Initial block number
* @return recentlyUsedBlock Recently mined and issued block
*/
function checkBlockInfo() public view returns(uint256 createBlock, uint256 recentlyUsedBlock) {
}
/**
* @dev Check owner's approved allowance to the spender
* @param owner Approving address
* @param spender Approved address
* @return Approved amount
*/
function allowance(address owner, address spender) override public view returns (uint256) {
}
/**
* @dev Transfer method
* @param to Transfer target
* @param value Transfer amount
* @return Whether the transfer is successful
*/
function transfer(address to, uint256 value) override public returns (bool) {
}
/**
* @dev Approval method
* @param spender Approval target
* @param value Approval amount
* @return Whether the approval is successful
*/
function approve(address spender, uint256 value) override public returns (bool) {
}
/**
* @dev Transfer tokens when approved
* @param from Transfer-out account address
* @param to Transfer-in account address
* @param value Transfer amount
* @return Whether approved transfer is successful
*/
function transferFrom(address from, address to, uint256 value) override public returns (bool) {
}
/**
* @dev Increase the allowance
* @param spender Approval target
* @param addedValue Amount to increase
* @return whether increase is successful
*/
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
}
/**
* @dev Decrease the allowance
* @param spender Approval target
* @param subtractedValue Amount to decrease
* @return Whether decrease is successful
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
}
/**
* @dev Transfer method
* @param to Transfer target
* @param value Transfer amount
*/
function _transfer(address from, address to, uint256 value) internal {
}
/**
* @dev Check the creator
* @return Creator address
*/
function checkBidder() public view returns(address) {
}
/**
* @dev Transfer creator
* @param bidder New creator address
*/
function changeBidder(address bidder) public {
}
// Administrator only
modifier onlyOwner(){
}
}
// NToken mapping contract
interface Nest_NToken_TokenMapping {
// Add mapping
function addTokenMapping(address token, address nToken) external;
function checkTokenMapping(address token) external view returns (address);
}
// Price contract
interface Nest_3_OfferPrice {
function addPriceCost(address tokenAddress) external;
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
library address_make_payable {
function make_payable(address x) internal pure returns (address payable) {
}
}
library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(ERC20 token, address to, uint256 value) internal {
}
function safeTransferFrom(ERC20 token, address from, address to, uint256 value) internal {
}
function safeApprove(ERC20 token, address spender, uint256 value) internal {
}
function safeIncreaseAllowance(ERC20 token, address spender, uint256 value) internal {
}
function safeDecreaseAllowance(ERC20 token, address spender, uint256 value) internal {
}
function callOptionalReturn(ERC20 token, bytes memory data) private {
}
}
interface ERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library Address {
function isContract(address account) internal view returns (bool) {
}
function sendValue(address payable recipient, uint256 amount) internal {
}
}
| tokenERC20.balanceOf(address(this))>=1 | 8,672 | tokenERC20.balanceOf(address(this))>=1 |
"Transfer failure" | pragma solidity 0.6.0;
/**
* @title Auction NToken contract
* @dev Auction for listing and generating NToken
*/
contract Nest_NToken_TokenAuction {
using SafeMath for uint256;
using address_make_payable for address;
using SafeERC20 for ERC20;
Nest_3_VoteFactory _voteFactory; // Voting contract
Nest_NToken_TokenMapping _tokenMapping; // NToken mapping contract
ERC20 _nestToken; // NestToken
Nest_3_OfferPrice _offerPrice; // Price contract
address _destructionAddress; // Destruction contract address
uint256 _duration = 5 days; // Auction duration
uint256 _minimumNest = 100000 ether; // Minimum auction amount
uint256 _tokenNum = 1; // Auction token number
uint256 _incentiveRatio = 50; // Incentive ratio
uint256 _minimumInterval = 10000 ether; // Minimum auction interval
mapping(address => AuctionInfo) _auctionList; // Auction list
mapping(address => bool) _tokenBlackList; // Auction blacklist
struct AuctionInfo {
uint256 endTime; // End time
uint256 auctionValue; // Auction price
address latestAddress; // Highest auctioneer
uint256 latestAmount; // Lastest auction amount
}
address[] _allAuction; // Auction list array
/**
* @dev Initialization method
* @param voteFactory Voting contract address
*/
constructor (address voteFactory) public {
}
/**
* @dev Reset voting contract
* @param voteFactory Voting contract address
*/
function changeMapping(address voteFactory) public onlyOwner {
}
/**
* @dev Initiating auction
* @param token Auction token address
* @param auctionAmount Initial auction amount
*/
function startAnAuction(address token, uint256 auctionAmount) public {
}
/**
* @dev Auction
* @param token Auction token address
* @param auctionAmount Auction amount
*/
function continueAuction(address token, uint256 auctionAmount) public {
require(now <= _auctionList[token].endTime && _auctionList[token].endTime != 0, "Auction closed");
require(auctionAmount > _auctionList[token].auctionValue, "Insufficient auction amount");
uint256 subAuctionAmount = auctionAmount.sub(_auctionList[token].auctionValue);
require(subAuctionAmount >= _minimumInterval);
uint256 excitation = subAuctionAmount.mul(_incentiveRatio).div(100);
require(_nestToken.transferFrom(address(msg.sender), address(this), auctionAmount), "Authorization failed");
require(<FILL_ME>)
// Update auction information
_auctionList[token].auctionValue = auctionAmount;
_auctionList[token].latestAddress = address(msg.sender);
_auctionList[token].latestAmount = _auctionList[token].latestAmount.add(subAuctionAmount.sub(excitation));
}
/**
* @dev Listing
* @param token Auction token address
*/
function auctionSuccess(address token) public {
}
function strConcat(string memory _a, string memory _b) public pure returns (string memory){
}
// Convert to 4-digit string
function getAddressStr(uint256 iv) public pure returns (string memory) {
}
// Check auction duration
function checkDuration() public view returns(uint256) {
}
// Check minimum auction amount
function checkMinimumNest() public view returns(uint256) {
}
// Check initiated number of auction tokens
function checkAllAuctionLength() public view returns(uint256) {
}
// View auctioned token addresses
function checkAuctionTokenAddress(uint256 num) public view returns(address) {
}
// View auction blacklist
function checkTokenBlackList(address token) public view returns(bool) {
}
// View auction token information
function checkAuctionInfo(address token) public view returns(uint256 endTime, uint256 auctionValue, address latestAddress) {
}
// View token number
function checkTokenNum() public view returns (uint256) {
}
// Modify auction duration
function changeDuration(uint256 num) public onlyOwner {
}
// Modify minimum auction amount
function changeMinimumNest(uint256 num) public onlyOwner {
}
// Modify auction blacklist
function changeTokenBlackList(address token, bool isBlack) public onlyOwner {
}
// Administrator only
modifier onlyOwner(){
}
}
// Bonus logic contract
interface Nest_3_TokenAbonus {
// View next bonus time
function getNextTime() external view returns (uint256);
// View bonus period
function checkTimeLimit() external view returns (uint256);
// View duration of triggering calculation of bonus
function checkGetAbonusTimeLimit() external view returns (uint256);
}
// voting contract
interface Nest_3_VoteFactory {
// Check address
function checkAddress(string calldata name) external view returns (address contractAddress);
// check whether the administrator
function checkOwners(address man) external view returns (bool);
}
/**
* @title NToken contract
* @dev Include standard erc20 method, mining method, and mining data
*/
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract Nest_NToken is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances; // Balance ledger
mapping (address => mapping (address => uint256)) private _allowed; // Approval ledger
uint256 private _totalSupply = 0 ether; // Total supply
string public name; // Token name
string public symbol; // Token symbol
uint8 public decimals = 18; // Precision
uint256 public _createBlock; // Create block number
uint256 public _recentlyUsedBlock; // Recently used block number
Nest_3_VoteFactory _voteFactory; // Voting factory contract
address _bidder; // Owner
/**
* @dev Initialization method
* @param _name Token name
* @param _symbol Token symbol
* @param voteFactory Voting factory contract address
* @param bidder Successful bidder address
*/
constructor (string memory _name, string memory _symbol, address voteFactory, address bidder) public {
}
/**
* @dev Reset voting contract method
* @param voteFactory Voting contract address
*/
function changeMapping (address voteFactory) public onlyOwner {
}
/**
* @dev Additional issuance
* @param value Additional issuance amount
*/
function increaseTotal(uint256 value) public {
}
/**
* @dev Check the total amount of tokens
* @return Total supply
*/
function totalSupply() override public view returns (uint256) {
}
/**
* @dev Check address balance
* @param owner Address to be checked
* @return Return the balance of the corresponding address
*/
function balanceOf(address owner) override public view returns (uint256) {
}
/**
* @dev Check block information
* @return createBlock Initial block number
* @return recentlyUsedBlock Recently mined and issued block
*/
function checkBlockInfo() public view returns(uint256 createBlock, uint256 recentlyUsedBlock) {
}
/**
* @dev Check owner's approved allowance to the spender
* @param owner Approving address
* @param spender Approved address
* @return Approved amount
*/
function allowance(address owner, address spender) override public view returns (uint256) {
}
/**
* @dev Transfer method
* @param to Transfer target
* @param value Transfer amount
* @return Whether the transfer is successful
*/
function transfer(address to, uint256 value) override public returns (bool) {
}
/**
* @dev Approval method
* @param spender Approval target
* @param value Approval amount
* @return Whether the approval is successful
*/
function approve(address spender, uint256 value) override public returns (bool) {
}
/**
* @dev Transfer tokens when approved
* @param from Transfer-out account address
* @param to Transfer-in account address
* @param value Transfer amount
* @return Whether approved transfer is successful
*/
function transferFrom(address from, address to, uint256 value) override public returns (bool) {
}
/**
* @dev Increase the allowance
* @param spender Approval target
* @param addedValue Amount to increase
* @return whether increase is successful
*/
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
}
/**
* @dev Decrease the allowance
* @param spender Approval target
* @param subtractedValue Amount to decrease
* @return Whether decrease is successful
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
}
/**
* @dev Transfer method
* @param to Transfer target
* @param value Transfer amount
*/
function _transfer(address from, address to, uint256 value) internal {
}
/**
* @dev Check the creator
* @return Creator address
*/
function checkBidder() public view returns(address) {
}
/**
* @dev Transfer creator
* @param bidder New creator address
*/
function changeBidder(address bidder) public {
}
// Administrator only
modifier onlyOwner(){
}
}
// NToken mapping contract
interface Nest_NToken_TokenMapping {
// Add mapping
function addTokenMapping(address token, address nToken) external;
function checkTokenMapping(address token) external view returns (address);
}
// Price contract
interface Nest_3_OfferPrice {
function addPriceCost(address tokenAddress) external;
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
library address_make_payable {
function make_payable(address x) internal pure returns (address payable) {
}
}
library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(ERC20 token, address to, uint256 value) internal {
}
function safeTransferFrom(ERC20 token, address from, address to, uint256 value) internal {
}
function safeApprove(ERC20 token, address spender, uint256 value) internal {
}
function safeIncreaseAllowance(ERC20 token, address spender, uint256 value) internal {
}
function safeDecreaseAllowance(ERC20 token, address spender, uint256 value) internal {
}
function callOptionalReturn(ERC20 token, bytes memory data) private {
}
}
interface ERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library Address {
function isContract(address account) internal view returns (bool) {
}
function sendValue(address payable recipient, uint256 amount) internal {
}
}
| _nestToken.transfer(_auctionList[token].latestAddress,_auctionList[token].auctionValue.add(excitation)),"Transfer failure" | 8,672 | _nestToken.transfer(_auctionList[token].latestAddress,_auctionList[token].auctionValue.add(excitation)) |
"Not time to auctionSuccess" | pragma solidity 0.6.0;
/**
* @title Auction NToken contract
* @dev Auction for listing and generating NToken
*/
contract Nest_NToken_TokenAuction {
using SafeMath for uint256;
using address_make_payable for address;
using SafeERC20 for ERC20;
Nest_3_VoteFactory _voteFactory; // Voting contract
Nest_NToken_TokenMapping _tokenMapping; // NToken mapping contract
ERC20 _nestToken; // NestToken
Nest_3_OfferPrice _offerPrice; // Price contract
address _destructionAddress; // Destruction contract address
uint256 _duration = 5 days; // Auction duration
uint256 _minimumNest = 100000 ether; // Minimum auction amount
uint256 _tokenNum = 1; // Auction token number
uint256 _incentiveRatio = 50; // Incentive ratio
uint256 _minimumInterval = 10000 ether; // Minimum auction interval
mapping(address => AuctionInfo) _auctionList; // Auction list
mapping(address => bool) _tokenBlackList; // Auction blacklist
struct AuctionInfo {
uint256 endTime; // End time
uint256 auctionValue; // Auction price
address latestAddress; // Highest auctioneer
uint256 latestAmount; // Lastest auction amount
}
address[] _allAuction; // Auction list array
/**
* @dev Initialization method
* @param voteFactory Voting contract address
*/
constructor (address voteFactory) public {
}
/**
* @dev Reset voting contract
* @param voteFactory Voting contract address
*/
function changeMapping(address voteFactory) public onlyOwner {
}
/**
* @dev Initiating auction
* @param token Auction token address
* @param auctionAmount Initial auction amount
*/
function startAnAuction(address token, uint256 auctionAmount) public {
}
/**
* @dev Auction
* @param token Auction token address
* @param auctionAmount Auction amount
*/
function continueAuction(address token, uint256 auctionAmount) public {
}
/**
* @dev Listing
* @param token Auction token address
*/
function auctionSuccess(address token) public {
Nest_3_TokenAbonus nestAbonus = Nest_3_TokenAbonus(_voteFactory.checkAddress("nest.v3.tokenAbonus"));
uint256 nowTime = now;
uint256 nextTime = nestAbonus.getNextTime();
uint256 timeLimit = nestAbonus.checkTimeLimit();
uint256 getAbonusTimeLimit = nestAbonus.checkGetAbonusTimeLimit();
require(<FILL_ME>)
require(nowTime > _auctionList[token].endTime && _auctionList[token].endTime != 0, "Token is on sale");
// Initialize NToken
Nest_NToken nToken = new Nest_NToken(strConcat("NToken", getAddressStr(_tokenNum)), strConcat("N", getAddressStr(_tokenNum)), address(_voteFactory), address(_auctionList[token].latestAddress));
// Auction NEST destruction
require(_nestToken.transfer(_destructionAddress, _auctionList[token].latestAmount), "Transfer failure");
// Add NToken mapping
_tokenMapping.addTokenMapping(token, address(nToken));
// Initialize charging parameters
_offerPrice.addPriceCost(token);
_tokenNum = _tokenNum.add(1);
}
function strConcat(string memory _a, string memory _b) public pure returns (string memory){
}
// Convert to 4-digit string
function getAddressStr(uint256 iv) public pure returns (string memory) {
}
// Check auction duration
function checkDuration() public view returns(uint256) {
}
// Check minimum auction amount
function checkMinimumNest() public view returns(uint256) {
}
// Check initiated number of auction tokens
function checkAllAuctionLength() public view returns(uint256) {
}
// View auctioned token addresses
function checkAuctionTokenAddress(uint256 num) public view returns(address) {
}
// View auction blacklist
function checkTokenBlackList(address token) public view returns(bool) {
}
// View auction token information
function checkAuctionInfo(address token) public view returns(uint256 endTime, uint256 auctionValue, address latestAddress) {
}
// View token number
function checkTokenNum() public view returns (uint256) {
}
// Modify auction duration
function changeDuration(uint256 num) public onlyOwner {
}
// Modify minimum auction amount
function changeMinimumNest(uint256 num) public onlyOwner {
}
// Modify auction blacklist
function changeTokenBlackList(address token, bool isBlack) public onlyOwner {
}
// Administrator only
modifier onlyOwner(){
}
}
// Bonus logic contract
interface Nest_3_TokenAbonus {
// View next bonus time
function getNextTime() external view returns (uint256);
// View bonus period
function checkTimeLimit() external view returns (uint256);
// View duration of triggering calculation of bonus
function checkGetAbonusTimeLimit() external view returns (uint256);
}
// voting contract
interface Nest_3_VoteFactory {
// Check address
function checkAddress(string calldata name) external view returns (address contractAddress);
// check whether the administrator
function checkOwners(address man) external view returns (bool);
}
/**
* @title NToken contract
* @dev Include standard erc20 method, mining method, and mining data
*/
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract Nest_NToken is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances; // Balance ledger
mapping (address => mapping (address => uint256)) private _allowed; // Approval ledger
uint256 private _totalSupply = 0 ether; // Total supply
string public name; // Token name
string public symbol; // Token symbol
uint8 public decimals = 18; // Precision
uint256 public _createBlock; // Create block number
uint256 public _recentlyUsedBlock; // Recently used block number
Nest_3_VoteFactory _voteFactory; // Voting factory contract
address _bidder; // Owner
/**
* @dev Initialization method
* @param _name Token name
* @param _symbol Token symbol
* @param voteFactory Voting factory contract address
* @param bidder Successful bidder address
*/
constructor (string memory _name, string memory _symbol, address voteFactory, address bidder) public {
}
/**
* @dev Reset voting contract method
* @param voteFactory Voting contract address
*/
function changeMapping (address voteFactory) public onlyOwner {
}
/**
* @dev Additional issuance
* @param value Additional issuance amount
*/
function increaseTotal(uint256 value) public {
}
/**
* @dev Check the total amount of tokens
* @return Total supply
*/
function totalSupply() override public view returns (uint256) {
}
/**
* @dev Check address balance
* @param owner Address to be checked
* @return Return the balance of the corresponding address
*/
function balanceOf(address owner) override public view returns (uint256) {
}
/**
* @dev Check block information
* @return createBlock Initial block number
* @return recentlyUsedBlock Recently mined and issued block
*/
function checkBlockInfo() public view returns(uint256 createBlock, uint256 recentlyUsedBlock) {
}
/**
* @dev Check owner's approved allowance to the spender
* @param owner Approving address
* @param spender Approved address
* @return Approved amount
*/
function allowance(address owner, address spender) override public view returns (uint256) {
}
/**
* @dev Transfer method
* @param to Transfer target
* @param value Transfer amount
* @return Whether the transfer is successful
*/
function transfer(address to, uint256 value) override public returns (bool) {
}
/**
* @dev Approval method
* @param spender Approval target
* @param value Approval amount
* @return Whether the approval is successful
*/
function approve(address spender, uint256 value) override public returns (bool) {
}
/**
* @dev Transfer tokens when approved
* @param from Transfer-out account address
* @param to Transfer-in account address
* @param value Transfer amount
* @return Whether approved transfer is successful
*/
function transferFrom(address from, address to, uint256 value) override public returns (bool) {
}
/**
* @dev Increase the allowance
* @param spender Approval target
* @param addedValue Amount to increase
* @return whether increase is successful
*/
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
}
/**
* @dev Decrease the allowance
* @param spender Approval target
* @param subtractedValue Amount to decrease
* @return Whether decrease is successful
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
}
/**
* @dev Transfer method
* @param to Transfer target
* @param value Transfer amount
*/
function _transfer(address from, address to, uint256 value) internal {
}
/**
* @dev Check the creator
* @return Creator address
*/
function checkBidder() public view returns(address) {
}
/**
* @dev Transfer creator
* @param bidder New creator address
*/
function changeBidder(address bidder) public {
}
// Administrator only
modifier onlyOwner(){
}
}
// NToken mapping contract
interface Nest_NToken_TokenMapping {
// Add mapping
function addTokenMapping(address token, address nToken) external;
function checkTokenMapping(address token) external view returns (address);
}
// Price contract
interface Nest_3_OfferPrice {
function addPriceCost(address tokenAddress) external;
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
library address_make_payable {
function make_payable(address x) internal pure returns (address payable) {
}
}
library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(ERC20 token, address to, uint256 value) internal {
}
function safeTransferFrom(ERC20 token, address from, address to, uint256 value) internal {
}
function safeApprove(ERC20 token, address spender, uint256 value) internal {
}
function safeIncreaseAllowance(ERC20 token, address spender, uint256 value) internal {
}
function safeDecreaseAllowance(ERC20 token, address spender, uint256 value) internal {
}
function callOptionalReturn(ERC20 token, bytes memory data) private {
}
}
interface ERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library Address {
function isContract(address account) internal view returns (bool) {
}
function sendValue(address payable recipient, uint256 amount) internal {
}
}
| !(nowTime>=nextTime.sub(timeLimit)&&nowTime<=nextTime.sub(timeLimit).add(getAbonusTimeLimit)),"Not time to auctionSuccess" | 8,672 | !(nowTime>=nextTime.sub(timeLimit)&&nowTime<=nextTime.sub(timeLimit).add(getAbonusTimeLimit)) |
"Transfer failure" | pragma solidity 0.6.0;
/**
* @title Auction NToken contract
* @dev Auction for listing and generating NToken
*/
contract Nest_NToken_TokenAuction {
using SafeMath for uint256;
using address_make_payable for address;
using SafeERC20 for ERC20;
Nest_3_VoteFactory _voteFactory; // Voting contract
Nest_NToken_TokenMapping _tokenMapping; // NToken mapping contract
ERC20 _nestToken; // NestToken
Nest_3_OfferPrice _offerPrice; // Price contract
address _destructionAddress; // Destruction contract address
uint256 _duration = 5 days; // Auction duration
uint256 _minimumNest = 100000 ether; // Minimum auction amount
uint256 _tokenNum = 1; // Auction token number
uint256 _incentiveRatio = 50; // Incentive ratio
uint256 _minimumInterval = 10000 ether; // Minimum auction interval
mapping(address => AuctionInfo) _auctionList; // Auction list
mapping(address => bool) _tokenBlackList; // Auction blacklist
struct AuctionInfo {
uint256 endTime; // End time
uint256 auctionValue; // Auction price
address latestAddress; // Highest auctioneer
uint256 latestAmount; // Lastest auction amount
}
address[] _allAuction; // Auction list array
/**
* @dev Initialization method
* @param voteFactory Voting contract address
*/
constructor (address voteFactory) public {
}
/**
* @dev Reset voting contract
* @param voteFactory Voting contract address
*/
function changeMapping(address voteFactory) public onlyOwner {
}
/**
* @dev Initiating auction
* @param token Auction token address
* @param auctionAmount Initial auction amount
*/
function startAnAuction(address token, uint256 auctionAmount) public {
}
/**
* @dev Auction
* @param token Auction token address
* @param auctionAmount Auction amount
*/
function continueAuction(address token, uint256 auctionAmount) public {
}
/**
* @dev Listing
* @param token Auction token address
*/
function auctionSuccess(address token) public {
Nest_3_TokenAbonus nestAbonus = Nest_3_TokenAbonus(_voteFactory.checkAddress("nest.v3.tokenAbonus"));
uint256 nowTime = now;
uint256 nextTime = nestAbonus.getNextTime();
uint256 timeLimit = nestAbonus.checkTimeLimit();
uint256 getAbonusTimeLimit = nestAbonus.checkGetAbonusTimeLimit();
require(!(nowTime >= nextTime.sub(timeLimit) && nowTime <= nextTime.sub(timeLimit).add(getAbonusTimeLimit)), "Not time to auctionSuccess");
require(nowTime > _auctionList[token].endTime && _auctionList[token].endTime != 0, "Token is on sale");
// Initialize NToken
Nest_NToken nToken = new Nest_NToken(strConcat("NToken", getAddressStr(_tokenNum)), strConcat("N", getAddressStr(_tokenNum)), address(_voteFactory), address(_auctionList[token].latestAddress));
// Auction NEST destruction
require(<FILL_ME>)
// Add NToken mapping
_tokenMapping.addTokenMapping(token, address(nToken));
// Initialize charging parameters
_offerPrice.addPriceCost(token);
_tokenNum = _tokenNum.add(1);
}
function strConcat(string memory _a, string memory _b) public pure returns (string memory){
}
// Convert to 4-digit string
function getAddressStr(uint256 iv) public pure returns (string memory) {
}
// Check auction duration
function checkDuration() public view returns(uint256) {
}
// Check minimum auction amount
function checkMinimumNest() public view returns(uint256) {
}
// Check initiated number of auction tokens
function checkAllAuctionLength() public view returns(uint256) {
}
// View auctioned token addresses
function checkAuctionTokenAddress(uint256 num) public view returns(address) {
}
// View auction blacklist
function checkTokenBlackList(address token) public view returns(bool) {
}
// View auction token information
function checkAuctionInfo(address token) public view returns(uint256 endTime, uint256 auctionValue, address latestAddress) {
}
// View token number
function checkTokenNum() public view returns (uint256) {
}
// Modify auction duration
function changeDuration(uint256 num) public onlyOwner {
}
// Modify minimum auction amount
function changeMinimumNest(uint256 num) public onlyOwner {
}
// Modify auction blacklist
function changeTokenBlackList(address token, bool isBlack) public onlyOwner {
}
// Administrator only
modifier onlyOwner(){
}
}
// Bonus logic contract
interface Nest_3_TokenAbonus {
// View next bonus time
function getNextTime() external view returns (uint256);
// View bonus period
function checkTimeLimit() external view returns (uint256);
// View duration of triggering calculation of bonus
function checkGetAbonusTimeLimit() external view returns (uint256);
}
// voting contract
interface Nest_3_VoteFactory {
// Check address
function checkAddress(string calldata name) external view returns (address contractAddress);
// check whether the administrator
function checkOwners(address man) external view returns (bool);
}
/**
* @title NToken contract
* @dev Include standard erc20 method, mining method, and mining data
*/
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract Nest_NToken is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances; // Balance ledger
mapping (address => mapping (address => uint256)) private _allowed; // Approval ledger
uint256 private _totalSupply = 0 ether; // Total supply
string public name; // Token name
string public symbol; // Token symbol
uint8 public decimals = 18; // Precision
uint256 public _createBlock; // Create block number
uint256 public _recentlyUsedBlock; // Recently used block number
Nest_3_VoteFactory _voteFactory; // Voting factory contract
address _bidder; // Owner
/**
* @dev Initialization method
* @param _name Token name
* @param _symbol Token symbol
* @param voteFactory Voting factory contract address
* @param bidder Successful bidder address
*/
constructor (string memory _name, string memory _symbol, address voteFactory, address bidder) public {
}
/**
* @dev Reset voting contract method
* @param voteFactory Voting contract address
*/
function changeMapping (address voteFactory) public onlyOwner {
}
/**
* @dev Additional issuance
* @param value Additional issuance amount
*/
function increaseTotal(uint256 value) public {
}
/**
* @dev Check the total amount of tokens
* @return Total supply
*/
function totalSupply() override public view returns (uint256) {
}
/**
* @dev Check address balance
* @param owner Address to be checked
* @return Return the balance of the corresponding address
*/
function balanceOf(address owner) override public view returns (uint256) {
}
/**
* @dev Check block information
* @return createBlock Initial block number
* @return recentlyUsedBlock Recently mined and issued block
*/
function checkBlockInfo() public view returns(uint256 createBlock, uint256 recentlyUsedBlock) {
}
/**
* @dev Check owner's approved allowance to the spender
* @param owner Approving address
* @param spender Approved address
* @return Approved amount
*/
function allowance(address owner, address spender) override public view returns (uint256) {
}
/**
* @dev Transfer method
* @param to Transfer target
* @param value Transfer amount
* @return Whether the transfer is successful
*/
function transfer(address to, uint256 value) override public returns (bool) {
}
/**
* @dev Approval method
* @param spender Approval target
* @param value Approval amount
* @return Whether the approval is successful
*/
function approve(address spender, uint256 value) override public returns (bool) {
}
/**
* @dev Transfer tokens when approved
* @param from Transfer-out account address
* @param to Transfer-in account address
* @param value Transfer amount
* @return Whether approved transfer is successful
*/
function transferFrom(address from, address to, uint256 value) override public returns (bool) {
}
/**
* @dev Increase the allowance
* @param spender Approval target
* @param addedValue Amount to increase
* @return whether increase is successful
*/
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
}
/**
* @dev Decrease the allowance
* @param spender Approval target
* @param subtractedValue Amount to decrease
* @return Whether decrease is successful
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
}
/**
* @dev Transfer method
* @param to Transfer target
* @param value Transfer amount
*/
function _transfer(address from, address to, uint256 value) internal {
}
/**
* @dev Check the creator
* @return Creator address
*/
function checkBidder() public view returns(address) {
}
/**
* @dev Transfer creator
* @param bidder New creator address
*/
function changeBidder(address bidder) public {
}
// Administrator only
modifier onlyOwner(){
}
}
// NToken mapping contract
interface Nest_NToken_TokenMapping {
// Add mapping
function addTokenMapping(address token, address nToken) external;
function checkTokenMapping(address token) external view returns (address);
}
// Price contract
interface Nest_3_OfferPrice {
function addPriceCost(address tokenAddress) external;
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
library address_make_payable {
function make_payable(address x) internal pure returns (address payable) {
}
}
library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(ERC20 token, address to, uint256 value) internal {
}
function safeTransferFrom(ERC20 token, address from, address to, uint256 value) internal {
}
function safeApprove(ERC20 token, address spender, uint256 value) internal {
}
function safeIncreaseAllowance(ERC20 token, address spender, uint256 value) internal {
}
function safeDecreaseAllowance(ERC20 token, address spender, uint256 value) internal {
}
function callOptionalReturn(ERC20 token, bytes memory data) private {
}
}
interface ERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library Address {
function isContract(address account) internal view returns (bool) {
}
function sendValue(address payable recipient, uint256 amount) internal {
}
}
| _nestToken.transfer(_destructionAddress,_auctionList[token].latestAmount),"Transfer failure" | 8,672 | _nestToken.transfer(_destructionAddress,_auctionList[token].latestAmount) |
"ERC721: approve caller is not owner nor approved for all" | // SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
import "../../utils/Context.sol";
import "./IERC721.sol";
import "./IERC721Metadata.sol";
import "./IERC721Enumerable.sol";
import "./IERC721Receiver.sol";
import "../../introspection/ERC165.sol";
import "../../math/SafeMath.sol";
import "../../utils/Address.sol";
import "../../utils/EnumerableSet.sol";
import "../../utils/EnumerableMap.sol";
import "../../utils/Strings.sol";
/**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
// which can be also obtained as `IERC721Receiver(0).onERC721Received.selector`
bytes4 private constant _ERC721_RECEIVED = 0x150b7a02;
// Mapping from holder address to their (enumerable) set of owned tokens
mapping (address => EnumerableSet.UintSet) private _holderTokens;
// Enumerable mapping from token ids to their owners
EnumerableMap.UintToAddressMap private _tokenOwners;
// Mapping from token ID to approved address
mapping (uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping (address => mapping (address => bool)) private _operatorApprovals;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Optional mapping for token URIs
mapping (uint256 => string) private _tokenURIs;
// Base URI
string private _baseURI;
/*
* bytes4(keccak256('balanceOf(address)')) == 0x70a08231
* bytes4(keccak256('ownerOf(uint256)')) == 0x6352211e
* bytes4(keccak256('approve(address,uint256)')) == 0x095ea7b3
* bytes4(keccak256('getApproved(uint256)')) == 0x081812fc
* bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465
* bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5
* bytes4(keccak256('transferFrom(address,address,uint256)')) == 0x23b872dd
* bytes4(keccak256('safeTransferFrom(address,address,uint256)')) == 0x42842e0e
* bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) == 0xb88d4fde
*
* => 0x70a08231 ^ 0x6352211e ^ 0x095ea7b3 ^ 0x081812fc ^
* 0xa22cb465 ^ 0xe985e9c5 ^ 0x23b872dd ^ 0x42842e0e ^ 0xb88d4fde == 0x80ac58cd
*/
bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd;
/*
* bytes4(keccak256('name()')) == 0x06fdde03
* bytes4(keccak256('symbol()')) == 0x95d89b41
* bytes4(keccak256('tokenURI(uint256)')) == 0xc87b56dd
*
* => 0x06fdde03 ^ 0x95d89b41 ^ 0xc87b56dd == 0x5b5e139f
*/
bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f;
/*
* bytes4(keccak256('totalSupply()')) == 0x18160ddd
* bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) == 0x2f745c59
* bytes4(keccak256('tokenByIndex(uint256)')) == 0x4f6ccce7
*
* => 0x18160ddd ^ 0x2f745c59 ^ 0x4f6ccce7 == 0x780e9d63
*/
bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63;
/**
* @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
*/
constructor (string memory name_, string memory symbol_) {
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view virtual override returns (uint256) {
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
/**
* @dev Returns the base URI set via {_setBaseURI}. This will be
* automatically added as a prefix in {tokenURI} to each token's URI, or
* to the token ID if no specific URI is set for that token ID.
*/
function baseURI() public view virtual returns (string memory) {
}
/**
* @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
}
/**
* @dev See {IERC721Enumerable-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
}
/**
* @dev See {IERC721Enumerable-tokenByIndex}.
*/
function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public virtual override {
address owner = ERC721.ownerOf(tokenId);
require(to != owner, "ERC721: approval to current owner");
require(<FILL_ME>)
_approve(to, tokenId);
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view virtual override returns (address) {
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(address from, address to, uint256 tokenId) public virtual override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override {
}
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* `_data` is additional data, it has no specified format and it is sent in call to `to`.
*
* This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
* implement alternative mechanisms to perform token transfer, such as signature-based.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeTransfer(address from, address to, uint256 tokenId, bytes memory _data) internal virtual {
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
* and stop existing when they are burned (`_burn`).
*/
function _exists(uint256 tokenId) internal view virtual returns (bool) {
}
/**
* @dev Returns whether `spender` is allowed to manage `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
}
/**
* @dev Safely mints `tokenId` and transfers it to `to`.
*
* Requirements:
d*
* - `tokenId` must not exist.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeMint(address to, uint256 tokenId) internal virtual {
}
/**
* @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/
function _safeMint(address to, uint256 tokenId, bytes memory _data) internal virtual {
}
/**
* @dev Mints `tokenId` and transfers it to `to`.
*
* WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
*
* Requirements:
*
* - `tokenId` must not exist.
* - `to` cannot be the zero address.
*
* Emits a {Transfer} event.
*/
function _mint(address to, uint256 tokenId) internal virtual {
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId) internal virtual {
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(address from, address to, uint256 tokenId) internal virtual {
}
/**
* @dev Sets `_tokenURI` as the tokenURI of `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {
}
/**
* @dev Internal function to set the base URI for all token IDs. It is
* automatically added as a prefix to the value returned in {tokenURI},
* or to the token ID if {tokenURI} is empty.
*/
function _setBaseURI(string memory baseURI_) internal virtual {
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
* The call is not executed if the target address is not a contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId uint256 ID of the token to be transferred
* @param _data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data)
private returns (bool)
{
}
function _approve(address to, uint256 tokenId) private {
}
/**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``from``'s `tokenId` will be burned.
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual { }
}
| _msgSender()==owner||ERC721.isApprovedForAll(owner,_msgSender()),"ERC721: approve caller is not owner nor approved for all" | 8,744 | _msgSender()==owner||ERC721.isApprovedForAll(owner,_msgSender()) |
"Could not transfer tokens." | pragma solidity 0.6.12;
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
library EnumerableSet {
struct Set {
bytes32[] _values;
mapping (bytes32 => uint256) _indexes;
}
function _add(Set storage set, bytes32 value) private returns (bool) {
}
function _remove(Set storage set, bytes32 value) private returns (bool) {
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function _contains(Set storage set, bytes32 value) private view returns (bool) {
}
function _length(Set storage set) private view returns (uint256) {
}
function _at(Set storage set, uint256 index) private view returns (bytes32) {
}
// AddressSet
struct AddressSet {
Set _inner;
}
function add(AddressSet storage set, address value) internal returns (bool) {
}
function remove(AddressSet storage set, address value) internal returns (bool) {
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(AddressSet storage set, address value) internal view returns (bool) {
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(AddressSet storage set) internal view returns (uint256) {
}
function at(AddressSet storage set, uint256 index) internal view returns (address) {
}
// UintSet
struct UintSet {
Set _inner;
}
function add(UintSet storage set, uint256 value) internal returns (bool) {
}
function remove(UintSet storage set, uint256 value) internal returns (bool) {
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(UintSet storage set, uint256 value) internal view returns (bool) {
}
function length(UintSet storage set) internal view returns (uint256) {
}
function at(UintSet storage set, uint256 index) internal view returns (uint256) {
}
}
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() public {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) onlyOwner public {
}
}
interface Token {
function transferFrom(address, address, uint) external returns (bool);
function transfer(address, uint) external returns (bool);
}
contract NYBDstaking is Ownable {
using SafeMath for uint;
using EnumerableSet for EnumerableSet.AddressSet;
event RewardsTransferred(address holder, uint amount);
// NewYearBullDefi token contract address
address public constant tokenAddress = 0x9D3a2F281eC3aF3b0fD4C05222cbe168F390b56b;
// reward rate 50.00% per year
uint public constant rewardRate = 5000;
uint public constant rewardInterval = 365 days; // 7.2% per week
// staking fee 1 %
uint public constant stakingFeeRate = 100;
// unstaking fee 0.5 %
uint public constant unstakingFeeRate = 50;
// unstaking possible after 24 hours
uint public constant cliffTime = 24 hours;
uint public totalClaimedRewards = 0;
EnumerableSet.AddressSet private holders;
mapping (address => uint) public depositedTokens;
mapping (address => uint) public stakingTime;
mapping (address => uint) public lastClaimedTime;
mapping (address => uint) public totalEarnedTokens;
function updateAccount(address account) private {
uint pendingDivs = getPendingDivs(account);
if (pendingDivs > 0) {
require(<FILL_ME>)
totalEarnedTokens[account] = totalEarnedTokens[account].add(pendingDivs);
totalClaimedRewards = totalClaimedRewards.add(pendingDivs);
emit RewardsTransferred(account, pendingDivs);
}
lastClaimedTime[account] = now;
}
function getPendingDivs(address _holder) public view returns (uint) {
}
function getNumberOfHolders() public view returns (uint) {
}
function deposit(uint amountToStake) public {
}
function withdraw(uint amountToWithdraw) public {
}
function claimDivs() public {
}
uint private constant stakingAndDaoTokens = 500000e18;
function getStakingAndDaoAmount() public view returns (uint) {
}
// function to allow admin to claim *other* ERC20 tokens sent to this contract (by mistake)
function transferAnyERC20Tokens(address _tokenAddr, address _to, uint _amount) public onlyOwner {
}
}
| Token(tokenAddress).transfer(account,pendingDivs),"Could not transfer tokens." | 8,783 | Token(tokenAddress).transfer(account,pendingDivs) |
"Insufficient Token Allowance" | pragma solidity 0.6.12;
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
library EnumerableSet {
struct Set {
bytes32[] _values;
mapping (bytes32 => uint256) _indexes;
}
function _add(Set storage set, bytes32 value) private returns (bool) {
}
function _remove(Set storage set, bytes32 value) private returns (bool) {
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function _contains(Set storage set, bytes32 value) private view returns (bool) {
}
function _length(Set storage set) private view returns (uint256) {
}
function _at(Set storage set, uint256 index) private view returns (bytes32) {
}
// AddressSet
struct AddressSet {
Set _inner;
}
function add(AddressSet storage set, address value) internal returns (bool) {
}
function remove(AddressSet storage set, address value) internal returns (bool) {
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(AddressSet storage set, address value) internal view returns (bool) {
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(AddressSet storage set) internal view returns (uint256) {
}
function at(AddressSet storage set, uint256 index) internal view returns (address) {
}
// UintSet
struct UintSet {
Set _inner;
}
function add(UintSet storage set, uint256 value) internal returns (bool) {
}
function remove(UintSet storage set, uint256 value) internal returns (bool) {
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(UintSet storage set, uint256 value) internal view returns (bool) {
}
function length(UintSet storage set) internal view returns (uint256) {
}
function at(UintSet storage set, uint256 index) internal view returns (uint256) {
}
}
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() public {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) onlyOwner public {
}
}
interface Token {
function transferFrom(address, address, uint) external returns (bool);
function transfer(address, uint) external returns (bool);
}
contract NYBDstaking is Ownable {
using SafeMath for uint;
using EnumerableSet for EnumerableSet.AddressSet;
event RewardsTransferred(address holder, uint amount);
// NewYearBullDefi token contract address
address public constant tokenAddress = 0x9D3a2F281eC3aF3b0fD4C05222cbe168F390b56b;
// reward rate 50.00% per year
uint public constant rewardRate = 5000;
uint public constant rewardInterval = 365 days; // 7.2% per week
// staking fee 1 %
uint public constant stakingFeeRate = 100;
// unstaking fee 0.5 %
uint public constant unstakingFeeRate = 50;
// unstaking possible after 24 hours
uint public constant cliffTime = 24 hours;
uint public totalClaimedRewards = 0;
EnumerableSet.AddressSet private holders;
mapping (address => uint) public depositedTokens;
mapping (address => uint) public stakingTime;
mapping (address => uint) public lastClaimedTime;
mapping (address => uint) public totalEarnedTokens;
function updateAccount(address account) private {
}
function getPendingDivs(address _holder) public view returns (uint) {
}
function getNumberOfHolders() public view returns (uint) {
}
function deposit(uint amountToStake) public {
require(amountToStake > 0, "Cannot deposit 0 Tokens");
require(<FILL_ME>)
updateAccount(msg.sender);
uint fee = amountToStake.mul(stakingFeeRate).div(1e4);
uint amountAfterFee = amountToStake.sub(fee);
require(Token(tokenAddress).transfer(owner, fee), "Could not transfer deposit fee.");
depositedTokens[msg.sender] = depositedTokens[msg.sender].add(amountAfterFee);
if (!holders.contains(msg.sender)) {
holders.add(msg.sender);
stakingTime[msg.sender] = now;
}
}
function withdraw(uint amountToWithdraw) public {
}
function claimDivs() public {
}
uint private constant stakingAndDaoTokens = 500000e18;
function getStakingAndDaoAmount() public view returns (uint) {
}
// function to allow admin to claim *other* ERC20 tokens sent to this contract (by mistake)
function transferAnyERC20Tokens(address _tokenAddr, address _to, uint _amount) public onlyOwner {
}
}
| Token(tokenAddress).transferFrom(msg.sender,address(this),amountToStake),"Insufficient Token Allowance" | 8,783 | Token(tokenAddress).transferFrom(msg.sender,address(this),amountToStake) |
"Could not transfer deposit fee." | pragma solidity 0.6.12;
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
library EnumerableSet {
struct Set {
bytes32[] _values;
mapping (bytes32 => uint256) _indexes;
}
function _add(Set storage set, bytes32 value) private returns (bool) {
}
function _remove(Set storage set, bytes32 value) private returns (bool) {
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function _contains(Set storage set, bytes32 value) private view returns (bool) {
}
function _length(Set storage set) private view returns (uint256) {
}
function _at(Set storage set, uint256 index) private view returns (bytes32) {
}
// AddressSet
struct AddressSet {
Set _inner;
}
function add(AddressSet storage set, address value) internal returns (bool) {
}
function remove(AddressSet storage set, address value) internal returns (bool) {
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(AddressSet storage set, address value) internal view returns (bool) {
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(AddressSet storage set) internal view returns (uint256) {
}
function at(AddressSet storage set, uint256 index) internal view returns (address) {
}
// UintSet
struct UintSet {
Set _inner;
}
function add(UintSet storage set, uint256 value) internal returns (bool) {
}
function remove(UintSet storage set, uint256 value) internal returns (bool) {
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(UintSet storage set, uint256 value) internal view returns (bool) {
}
function length(UintSet storage set) internal view returns (uint256) {
}
function at(UintSet storage set, uint256 index) internal view returns (uint256) {
}
}
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() public {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) onlyOwner public {
}
}
interface Token {
function transferFrom(address, address, uint) external returns (bool);
function transfer(address, uint) external returns (bool);
}
contract NYBDstaking is Ownable {
using SafeMath for uint;
using EnumerableSet for EnumerableSet.AddressSet;
event RewardsTransferred(address holder, uint amount);
// NewYearBullDefi token contract address
address public constant tokenAddress = 0x9D3a2F281eC3aF3b0fD4C05222cbe168F390b56b;
// reward rate 50.00% per year
uint public constant rewardRate = 5000;
uint public constant rewardInterval = 365 days; // 7.2% per week
// staking fee 1 %
uint public constant stakingFeeRate = 100;
// unstaking fee 0.5 %
uint public constant unstakingFeeRate = 50;
// unstaking possible after 24 hours
uint public constant cliffTime = 24 hours;
uint public totalClaimedRewards = 0;
EnumerableSet.AddressSet private holders;
mapping (address => uint) public depositedTokens;
mapping (address => uint) public stakingTime;
mapping (address => uint) public lastClaimedTime;
mapping (address => uint) public totalEarnedTokens;
function updateAccount(address account) private {
}
function getPendingDivs(address _holder) public view returns (uint) {
}
function getNumberOfHolders() public view returns (uint) {
}
function deposit(uint amountToStake) public {
require(amountToStake > 0, "Cannot deposit 0 Tokens");
require(Token(tokenAddress).transferFrom(msg.sender, address(this), amountToStake), "Insufficient Token Allowance");
updateAccount(msg.sender);
uint fee = amountToStake.mul(stakingFeeRate).div(1e4);
uint amountAfterFee = amountToStake.sub(fee);
require(<FILL_ME>)
depositedTokens[msg.sender] = depositedTokens[msg.sender].add(amountAfterFee);
if (!holders.contains(msg.sender)) {
holders.add(msg.sender);
stakingTime[msg.sender] = now;
}
}
function withdraw(uint amountToWithdraw) public {
}
function claimDivs() public {
}
uint private constant stakingAndDaoTokens = 500000e18;
function getStakingAndDaoAmount() public view returns (uint) {
}
// function to allow admin to claim *other* ERC20 tokens sent to this contract (by mistake)
function transferAnyERC20Tokens(address _tokenAddr, address _to, uint _amount) public onlyOwner {
}
}
| Token(tokenAddress).transfer(owner,fee),"Could not transfer deposit fee." | 8,783 | Token(tokenAddress).transfer(owner,fee) |
"Invalid amount to withdraw" | pragma solidity 0.6.12;
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
library EnumerableSet {
struct Set {
bytes32[] _values;
mapping (bytes32 => uint256) _indexes;
}
function _add(Set storage set, bytes32 value) private returns (bool) {
}
function _remove(Set storage set, bytes32 value) private returns (bool) {
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function _contains(Set storage set, bytes32 value) private view returns (bool) {
}
function _length(Set storage set) private view returns (uint256) {
}
function _at(Set storage set, uint256 index) private view returns (bytes32) {
}
// AddressSet
struct AddressSet {
Set _inner;
}
function add(AddressSet storage set, address value) internal returns (bool) {
}
function remove(AddressSet storage set, address value) internal returns (bool) {
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(AddressSet storage set, address value) internal view returns (bool) {
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(AddressSet storage set) internal view returns (uint256) {
}
function at(AddressSet storage set, uint256 index) internal view returns (address) {
}
// UintSet
struct UintSet {
Set _inner;
}
function add(UintSet storage set, uint256 value) internal returns (bool) {
}
function remove(UintSet storage set, uint256 value) internal returns (bool) {
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(UintSet storage set, uint256 value) internal view returns (bool) {
}
function length(UintSet storage set) internal view returns (uint256) {
}
function at(UintSet storage set, uint256 index) internal view returns (uint256) {
}
}
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() public {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) onlyOwner public {
}
}
interface Token {
function transferFrom(address, address, uint) external returns (bool);
function transfer(address, uint) external returns (bool);
}
contract NYBDstaking is Ownable {
using SafeMath for uint;
using EnumerableSet for EnumerableSet.AddressSet;
event RewardsTransferred(address holder, uint amount);
// NewYearBullDefi token contract address
address public constant tokenAddress = 0x9D3a2F281eC3aF3b0fD4C05222cbe168F390b56b;
// reward rate 50.00% per year
uint public constant rewardRate = 5000;
uint public constant rewardInterval = 365 days; // 7.2% per week
// staking fee 1 %
uint public constant stakingFeeRate = 100;
// unstaking fee 0.5 %
uint public constant unstakingFeeRate = 50;
// unstaking possible after 24 hours
uint public constant cliffTime = 24 hours;
uint public totalClaimedRewards = 0;
EnumerableSet.AddressSet private holders;
mapping (address => uint) public depositedTokens;
mapping (address => uint) public stakingTime;
mapping (address => uint) public lastClaimedTime;
mapping (address => uint) public totalEarnedTokens;
function updateAccount(address account) private {
}
function getPendingDivs(address _holder) public view returns (uint) {
}
function getNumberOfHolders() public view returns (uint) {
}
function deposit(uint amountToStake) public {
}
function withdraw(uint amountToWithdraw) public {
require(<FILL_ME>)
require(now.sub(stakingTime[msg.sender]) > cliffTime, "You recently staked, please wait before withdrawing.");
updateAccount(msg.sender);
uint fee = amountToWithdraw.mul(unstakingFeeRate).div(1e4);
uint amountAfterFee = amountToWithdraw.sub(fee);
require(Token(tokenAddress).transfer(owner, fee), "Could not transfer withdraw fee.");
require(Token(tokenAddress).transfer(msg.sender, amountAfterFee), "Could not transfer tokens.");
depositedTokens[msg.sender] = depositedTokens[msg.sender].sub(amountToWithdraw);
if (holders.contains(msg.sender) && depositedTokens[msg.sender] == 0) {
holders.remove(msg.sender);
}
}
function claimDivs() public {
}
uint private constant stakingAndDaoTokens = 500000e18;
function getStakingAndDaoAmount() public view returns (uint) {
}
// function to allow admin to claim *other* ERC20 tokens sent to this contract (by mistake)
function transferAnyERC20Tokens(address _tokenAddr, address _to, uint _amount) public onlyOwner {
}
}
| depositedTokens[msg.sender]>=amountToWithdraw,"Invalid amount to withdraw" | 8,783 | depositedTokens[msg.sender]>=amountToWithdraw |
"You recently staked, please wait before withdrawing." | pragma solidity 0.6.12;
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
library EnumerableSet {
struct Set {
bytes32[] _values;
mapping (bytes32 => uint256) _indexes;
}
function _add(Set storage set, bytes32 value) private returns (bool) {
}
function _remove(Set storage set, bytes32 value) private returns (bool) {
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function _contains(Set storage set, bytes32 value) private view returns (bool) {
}
function _length(Set storage set) private view returns (uint256) {
}
function _at(Set storage set, uint256 index) private view returns (bytes32) {
}
// AddressSet
struct AddressSet {
Set _inner;
}
function add(AddressSet storage set, address value) internal returns (bool) {
}
function remove(AddressSet storage set, address value) internal returns (bool) {
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(AddressSet storage set, address value) internal view returns (bool) {
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(AddressSet storage set) internal view returns (uint256) {
}
function at(AddressSet storage set, uint256 index) internal view returns (address) {
}
// UintSet
struct UintSet {
Set _inner;
}
function add(UintSet storage set, uint256 value) internal returns (bool) {
}
function remove(UintSet storage set, uint256 value) internal returns (bool) {
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(UintSet storage set, uint256 value) internal view returns (bool) {
}
function length(UintSet storage set) internal view returns (uint256) {
}
function at(UintSet storage set, uint256 index) internal view returns (uint256) {
}
}
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() public {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) onlyOwner public {
}
}
interface Token {
function transferFrom(address, address, uint) external returns (bool);
function transfer(address, uint) external returns (bool);
}
contract NYBDstaking is Ownable {
using SafeMath for uint;
using EnumerableSet for EnumerableSet.AddressSet;
event RewardsTransferred(address holder, uint amount);
// NewYearBullDefi token contract address
address public constant tokenAddress = 0x9D3a2F281eC3aF3b0fD4C05222cbe168F390b56b;
// reward rate 50.00% per year
uint public constant rewardRate = 5000;
uint public constant rewardInterval = 365 days; // 7.2% per week
// staking fee 1 %
uint public constant stakingFeeRate = 100;
// unstaking fee 0.5 %
uint public constant unstakingFeeRate = 50;
// unstaking possible after 24 hours
uint public constant cliffTime = 24 hours;
uint public totalClaimedRewards = 0;
EnumerableSet.AddressSet private holders;
mapping (address => uint) public depositedTokens;
mapping (address => uint) public stakingTime;
mapping (address => uint) public lastClaimedTime;
mapping (address => uint) public totalEarnedTokens;
function updateAccount(address account) private {
}
function getPendingDivs(address _holder) public view returns (uint) {
}
function getNumberOfHolders() public view returns (uint) {
}
function deposit(uint amountToStake) public {
}
function withdraw(uint amountToWithdraw) public {
require(depositedTokens[msg.sender] >= amountToWithdraw, "Invalid amount to withdraw");
require(<FILL_ME>)
updateAccount(msg.sender);
uint fee = amountToWithdraw.mul(unstakingFeeRate).div(1e4);
uint amountAfterFee = amountToWithdraw.sub(fee);
require(Token(tokenAddress).transfer(owner, fee), "Could not transfer withdraw fee.");
require(Token(tokenAddress).transfer(msg.sender, amountAfterFee), "Could not transfer tokens.");
depositedTokens[msg.sender] = depositedTokens[msg.sender].sub(amountToWithdraw);
if (holders.contains(msg.sender) && depositedTokens[msg.sender] == 0) {
holders.remove(msg.sender);
}
}
function claimDivs() public {
}
uint private constant stakingAndDaoTokens = 500000e18;
function getStakingAndDaoAmount() public view returns (uint) {
}
// function to allow admin to claim *other* ERC20 tokens sent to this contract (by mistake)
function transferAnyERC20Tokens(address _tokenAddr, address _to, uint _amount) public onlyOwner {
}
}
| now.sub(stakingTime[msg.sender])>cliffTime,"You recently staked, please wait before withdrawing." | 8,783 | now.sub(stakingTime[msg.sender])>cliffTime |
"Could not transfer tokens." | pragma solidity 0.6.12;
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
library EnumerableSet {
struct Set {
bytes32[] _values;
mapping (bytes32 => uint256) _indexes;
}
function _add(Set storage set, bytes32 value) private returns (bool) {
}
function _remove(Set storage set, bytes32 value) private returns (bool) {
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function _contains(Set storage set, bytes32 value) private view returns (bool) {
}
function _length(Set storage set) private view returns (uint256) {
}
function _at(Set storage set, uint256 index) private view returns (bytes32) {
}
// AddressSet
struct AddressSet {
Set _inner;
}
function add(AddressSet storage set, address value) internal returns (bool) {
}
function remove(AddressSet storage set, address value) internal returns (bool) {
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(AddressSet storage set, address value) internal view returns (bool) {
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(AddressSet storage set) internal view returns (uint256) {
}
function at(AddressSet storage set, uint256 index) internal view returns (address) {
}
// UintSet
struct UintSet {
Set _inner;
}
function add(UintSet storage set, uint256 value) internal returns (bool) {
}
function remove(UintSet storage set, uint256 value) internal returns (bool) {
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(UintSet storage set, uint256 value) internal view returns (bool) {
}
function length(UintSet storage set) internal view returns (uint256) {
}
function at(UintSet storage set, uint256 index) internal view returns (uint256) {
}
}
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() public {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) onlyOwner public {
}
}
interface Token {
function transferFrom(address, address, uint) external returns (bool);
function transfer(address, uint) external returns (bool);
}
contract NYBDstaking is Ownable {
using SafeMath for uint;
using EnumerableSet for EnumerableSet.AddressSet;
event RewardsTransferred(address holder, uint amount);
// NewYearBullDefi token contract address
address public constant tokenAddress = 0x9D3a2F281eC3aF3b0fD4C05222cbe168F390b56b;
// reward rate 50.00% per year
uint public constant rewardRate = 5000;
uint public constant rewardInterval = 365 days; // 7.2% per week
// staking fee 1 %
uint public constant stakingFeeRate = 100;
// unstaking fee 0.5 %
uint public constant unstakingFeeRate = 50;
// unstaking possible after 24 hours
uint public constant cliffTime = 24 hours;
uint public totalClaimedRewards = 0;
EnumerableSet.AddressSet private holders;
mapping (address => uint) public depositedTokens;
mapping (address => uint) public stakingTime;
mapping (address => uint) public lastClaimedTime;
mapping (address => uint) public totalEarnedTokens;
function updateAccount(address account) private {
}
function getPendingDivs(address _holder) public view returns (uint) {
}
function getNumberOfHolders() public view returns (uint) {
}
function deposit(uint amountToStake) public {
}
function withdraw(uint amountToWithdraw) public {
require(depositedTokens[msg.sender] >= amountToWithdraw, "Invalid amount to withdraw");
require(now.sub(stakingTime[msg.sender]) > cliffTime, "You recently staked, please wait before withdrawing.");
updateAccount(msg.sender);
uint fee = amountToWithdraw.mul(unstakingFeeRate).div(1e4);
uint amountAfterFee = amountToWithdraw.sub(fee);
require(Token(tokenAddress).transfer(owner, fee), "Could not transfer withdraw fee.");
require(<FILL_ME>)
depositedTokens[msg.sender] = depositedTokens[msg.sender].sub(amountToWithdraw);
if (holders.contains(msg.sender) && depositedTokens[msg.sender] == 0) {
holders.remove(msg.sender);
}
}
function claimDivs() public {
}
uint private constant stakingAndDaoTokens = 500000e18;
function getStakingAndDaoAmount() public view returns (uint) {
}
// function to allow admin to claim *other* ERC20 tokens sent to this contract (by mistake)
function transferAnyERC20Tokens(address _tokenAddr, address _to, uint _amount) public onlyOwner {
}
}
| Token(tokenAddress).transfer(msg.sender,amountAfterFee),"Could not transfer tokens." | 8,783 | Token(tokenAddress).transfer(msg.sender,amountAfterFee) |
"This epoch is in the future" | // SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.6.0;
import "@openzeppelin/contracts-ethereum-package/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "./interfaces/IStaking.sol";
contract YieldFarmLP {
// lib
using SafeMath for uint;
using SafeMath for uint128;
// constants
uint public constant TOTAL_DISTRIBUTED_AMOUNT = 2000000;
uint public constant NR_OF_EPOCHS = 100;
// state variables
// addreses
address private _uniLP;
address private _communityVault;
// contracts
IERC20 private _bond;
IStaking private _staking;
uint[] private epochs = new uint[](NR_OF_EPOCHS + 1);
uint private _totalAmountPerEpoch;
uint128 public lastInitializedEpoch;
mapping(address => uint128) private lastEpochIdHarvested;
uint public epochDuration; // init from staking contract
uint public epochStart; // init from staking contract
// events
event MassHarvest(address indexed user, uint256 epochsHarvested, uint256 totalValue);
event Harvest(address indexed user, uint128 indexed epochId, uint256 amount);
// constructor
constructor(address bondTokenAddress, address uniLP, address stakeContract, address communityVault) public {
}
// public methods
// public method to harvest all the unharvested epochs until current epoch - 1
function massHarvest() external returns (uint){
}
function harvest (uint128 epochId) external returns (uint){
// checks for requested epoch
require(<FILL_ME>)
require(epochId <= NR_OF_EPOCHS, "Maximum number of epochs is 100");
require (lastEpochIdHarvested[msg.sender].add(1) == epochId, "Harvest in order");
uint userReward = _harvest(epochId);
if (userReward > 0) {
_bond.transferFrom(_communityVault, msg.sender, userReward);
}
emit Harvest(msg.sender, epochId, userReward);
return userReward;
}
// views
// calls to the staking smart contract to retrieve the epoch total pool size
function getPoolSize(uint128 epochId) external view returns (uint) {
}
function getCurrentEpoch() external view returns (uint) {
}
// calls to the staking smart contract to retrieve user balance for an epoch
function getEpochStake(address userAddress, uint128 epochId) external view returns (uint) {
}
function userLastEpochIdHarvested() external view returns (uint){
}
// internal methods
function _initEpoch(uint128 epochId) internal {
}
function _harvest (uint128 epochId) internal returns (uint) {
}
function _getPoolSize(uint128 epochId) internal view returns (uint) {
}
function _getUserBalancePerEpoch(address userAddress, uint128 epochId) internal view returns (uint){
}
// compute epoch id from blocktimestamp and epochstart date
function _getEpochId() internal view returns (uint128 epochId) {
}
// get the staking epoch which is 1 epoch more
function _stakingEpochId(uint128 epochId) pure internal returns (uint128) {
}
}
| _getEpochId()>epochId,"This epoch is in the future" | 8,826 | _getEpochId()>epochId |
"Harvest in order" | // SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.6.0;
import "@openzeppelin/contracts-ethereum-package/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "./interfaces/IStaking.sol";
contract YieldFarmLP {
// lib
using SafeMath for uint;
using SafeMath for uint128;
// constants
uint public constant TOTAL_DISTRIBUTED_AMOUNT = 2000000;
uint public constant NR_OF_EPOCHS = 100;
// state variables
// addreses
address private _uniLP;
address private _communityVault;
// contracts
IERC20 private _bond;
IStaking private _staking;
uint[] private epochs = new uint[](NR_OF_EPOCHS + 1);
uint private _totalAmountPerEpoch;
uint128 public lastInitializedEpoch;
mapping(address => uint128) private lastEpochIdHarvested;
uint public epochDuration; // init from staking contract
uint public epochStart; // init from staking contract
// events
event MassHarvest(address indexed user, uint256 epochsHarvested, uint256 totalValue);
event Harvest(address indexed user, uint128 indexed epochId, uint256 amount);
// constructor
constructor(address bondTokenAddress, address uniLP, address stakeContract, address communityVault) public {
}
// public methods
// public method to harvest all the unharvested epochs until current epoch - 1
function massHarvest() external returns (uint){
}
function harvest (uint128 epochId) external returns (uint){
// checks for requested epoch
require (_getEpochId() > epochId, "This epoch is in the future");
require(epochId <= NR_OF_EPOCHS, "Maximum number of epochs is 100");
require(<FILL_ME>)
uint userReward = _harvest(epochId);
if (userReward > 0) {
_bond.transferFrom(_communityVault, msg.sender, userReward);
}
emit Harvest(msg.sender, epochId, userReward);
return userReward;
}
// views
// calls to the staking smart contract to retrieve the epoch total pool size
function getPoolSize(uint128 epochId) external view returns (uint) {
}
function getCurrentEpoch() external view returns (uint) {
}
// calls to the staking smart contract to retrieve user balance for an epoch
function getEpochStake(address userAddress, uint128 epochId) external view returns (uint) {
}
function userLastEpochIdHarvested() external view returns (uint){
}
// internal methods
function _initEpoch(uint128 epochId) internal {
}
function _harvest (uint128 epochId) internal returns (uint) {
}
function _getPoolSize(uint128 epochId) internal view returns (uint) {
}
function _getUserBalancePerEpoch(address userAddress, uint128 epochId) internal view returns (uint){
}
// compute epoch id from blocktimestamp and epochstart date
function _getEpochId() internal view returns (uint128 epochId) {
}
// get the staking epoch which is 1 epoch more
function _stakingEpochId(uint128 epochId) pure internal returns (uint128) {
}
}
| lastEpochIdHarvested[msg.sender].add(1)==epochId,"Harvest in order" | 8,826 | lastEpochIdHarvested[msg.sender].add(1)==epochId |
"Epoch can be init only in order" | // SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.6.0;
import "@openzeppelin/contracts-ethereum-package/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "./interfaces/IStaking.sol";
contract YieldFarmLP {
// lib
using SafeMath for uint;
using SafeMath for uint128;
// constants
uint public constant TOTAL_DISTRIBUTED_AMOUNT = 2000000;
uint public constant NR_OF_EPOCHS = 100;
// state variables
// addreses
address private _uniLP;
address private _communityVault;
// contracts
IERC20 private _bond;
IStaking private _staking;
uint[] private epochs = new uint[](NR_OF_EPOCHS + 1);
uint private _totalAmountPerEpoch;
uint128 public lastInitializedEpoch;
mapping(address => uint128) private lastEpochIdHarvested;
uint public epochDuration; // init from staking contract
uint public epochStart; // init from staking contract
// events
event MassHarvest(address indexed user, uint256 epochsHarvested, uint256 totalValue);
event Harvest(address indexed user, uint128 indexed epochId, uint256 amount);
// constructor
constructor(address bondTokenAddress, address uniLP, address stakeContract, address communityVault) public {
}
// public methods
// public method to harvest all the unharvested epochs until current epoch - 1
function massHarvest() external returns (uint){
}
function harvest (uint128 epochId) external returns (uint){
}
// views
// calls to the staking smart contract to retrieve the epoch total pool size
function getPoolSize(uint128 epochId) external view returns (uint) {
}
function getCurrentEpoch() external view returns (uint) {
}
// calls to the staking smart contract to retrieve user balance for an epoch
function getEpochStake(address userAddress, uint128 epochId) external view returns (uint) {
}
function userLastEpochIdHarvested() external view returns (uint){
}
// internal methods
function _initEpoch(uint128 epochId) internal {
require(<FILL_ME>)
lastInitializedEpoch = epochId;
// call the staking smart contract to init the epoch
epochs[epochId] = _getPoolSize(epochId);
}
function _harvest (uint128 epochId) internal returns (uint) {
}
function _getPoolSize(uint128 epochId) internal view returns (uint) {
}
function _getUserBalancePerEpoch(address userAddress, uint128 epochId) internal view returns (uint){
}
// compute epoch id from blocktimestamp and epochstart date
function _getEpochId() internal view returns (uint128 epochId) {
}
// get the staking epoch which is 1 epoch more
function _stakingEpochId(uint128 epochId) pure internal returns (uint128) {
}
}
| lastInitializedEpoch.add(1)==epochId,"Epoch can be init only in order" | 8,826 | lastInitializedEpoch.add(1)==epochId |
"Opener is locked" | // SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
interface TransferFromAndBurnFrom {
function burnFrom(address account, uint256 amount) external;
function transferFrom(
address sender,
address recipient,
uint256 amount
) external;
}
contract Opener is Ownable {
TransferFromAndBurnFrom private _pmonToken;
address public _stakeAddress;
address public _feeAddress;
address public _swapBackAddress;
event Opening(address indexed from, uint256 amount, uint256 openedBoosters);
uint256 public _burnShare = 75;
uint256 public _stakeShare = 0;
uint256 public _feeShare = 25;
uint256 public _swapBackShare = 0;
bool public _closed = false;
uint256 public _openedBoosters = 0;
constructor(
TransferFromAndBurnFrom pmonToken,
address stakeAddress,
address feeAddress,
address swapBackAddress
) public {
}
function openBooster(uint256 amount) public {
require(<FILL_ME>)
address from = msg.sender;
require(
_numOfBoosterIsInteger(amount),
"Only integer numbers of booster allowed"
);
_distributeBoosterShares(from, amount);
emit Opening(from, amount, _openedBoosters);
_openedBoosters = _openedBoosters + (amount / 10**uint256(18));
}
function _numOfBoosterIsInteger(uint256 amount) private returns (bool) {
}
function _distributeBoosterShares(address from, uint256 amount) private {
}
function setShares(
uint256 burnShare,
uint256 stakeShare,
uint256 feeShare,
uint256 swapBackShare
) public onlyOwner {
}
function setStakeAddress(address stakeAddress) public onlyOwner {
}
function setFeeAddress(address feeAddress) public onlyOwner {
}
function setSwapBackAddress(address swapBackAddress) public onlyOwner {
}
function lock() public onlyOwner {
}
function unlock() public onlyOwner {
}
}
| !_closed,"Opener is locked" | 8,849 | !_closed |
"Only integer numbers of booster allowed" | // SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
interface TransferFromAndBurnFrom {
function burnFrom(address account, uint256 amount) external;
function transferFrom(
address sender,
address recipient,
uint256 amount
) external;
}
contract Opener is Ownable {
TransferFromAndBurnFrom private _pmonToken;
address public _stakeAddress;
address public _feeAddress;
address public _swapBackAddress;
event Opening(address indexed from, uint256 amount, uint256 openedBoosters);
uint256 public _burnShare = 75;
uint256 public _stakeShare = 0;
uint256 public _feeShare = 25;
uint256 public _swapBackShare = 0;
bool public _closed = false;
uint256 public _openedBoosters = 0;
constructor(
TransferFromAndBurnFrom pmonToken,
address stakeAddress,
address feeAddress,
address swapBackAddress
) public {
}
function openBooster(uint256 amount) public {
require(!_closed, "Opener is locked");
address from = msg.sender;
require(<FILL_ME>)
_distributeBoosterShares(from, amount);
emit Opening(from, amount, _openedBoosters);
_openedBoosters = _openedBoosters + (amount / 10**uint256(18));
}
function _numOfBoosterIsInteger(uint256 amount) private returns (bool) {
}
function _distributeBoosterShares(address from, uint256 amount) private {
}
function setShares(
uint256 burnShare,
uint256 stakeShare,
uint256 feeShare,
uint256 swapBackShare
) public onlyOwner {
}
function setStakeAddress(address stakeAddress) public onlyOwner {
}
function setFeeAddress(address feeAddress) public onlyOwner {
}
function setSwapBackAddress(address swapBackAddress) public onlyOwner {
}
function lock() public onlyOwner {
}
function unlock() public onlyOwner {
}
}
| _numOfBoosterIsInteger(amount),"Only integer numbers of booster allowed" | 8,849 | _numOfBoosterIsInteger(amount) |
"Doesn't add up to 100" | // SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
interface TransferFromAndBurnFrom {
function burnFrom(address account, uint256 amount) external;
function transferFrom(
address sender,
address recipient,
uint256 amount
) external;
}
contract Opener is Ownable {
TransferFromAndBurnFrom private _pmonToken;
address public _stakeAddress;
address public _feeAddress;
address public _swapBackAddress;
event Opening(address indexed from, uint256 amount, uint256 openedBoosters);
uint256 public _burnShare = 75;
uint256 public _stakeShare = 0;
uint256 public _feeShare = 25;
uint256 public _swapBackShare = 0;
bool public _closed = false;
uint256 public _openedBoosters = 0;
constructor(
TransferFromAndBurnFrom pmonToken,
address stakeAddress,
address feeAddress,
address swapBackAddress
) public {
}
function openBooster(uint256 amount) public {
}
function _numOfBoosterIsInteger(uint256 amount) private returns (bool) {
}
function _distributeBoosterShares(address from, uint256 amount) private {
}
function setShares(
uint256 burnShare,
uint256 stakeShare,
uint256 feeShare,
uint256 swapBackShare
) public onlyOwner {
require(<FILL_ME>)
_burnShare = burnShare;
_stakeShare = stakeShare;
_feeShare = feeShare;
_swapBackShare = swapBackShare;
}
function setStakeAddress(address stakeAddress) public onlyOwner {
}
function setFeeAddress(address feeAddress) public onlyOwner {
}
function setSwapBackAddress(address swapBackAddress) public onlyOwner {
}
function lock() public onlyOwner {
}
function unlock() public onlyOwner {
}
}
| burnShare+stakeShare+feeShare+swapBackShare==100,"Doesn't add up to 100" | 8,849 | burnShare+stakeShare+feeShare+swapBackShare==100 |
null | pragma solidity >=0.4.22 <0.6.0;
contract IERC20 {
function totalSupply() constant public returns (uint256);
function balanceOf(address _owner) constant public returns (uint256 balance);
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 allowance(address _owner, address _spender) constant public returns (uint256 remianing);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
/*
CREATED BY ANDRAS SZEKELY, SaiTech (c) 2019
*/
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 {
}
}
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) {
}
function max64(uint64 a, uint64 b) internal pure returns (uint64) {
}
function min64(uint64 a, uint64 b) internal pure returns (uint64) {
}
function max256(uint256 a, uint256 b) internal pure returns (uint256) {
}
function min256(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract LYCCoin is IERC20, Ownable {
using SafeMath for uint256;
uint public _totalSupply = 0;
uint public constant INITIAL_SUPPLY = 175000000000000000000000000;
uint public MAXUM_SUPPLY = 175000000000000000000000000;
uint256 public _currentSupply = 0;
string public constant symbol = "LYC";
string public constant name = "LYCCoin";
uint8 public constant decimals = 18;
uint256 public RATE;
bool public mintingFinished = false;
mapping(address => uint256) balances;
mapping(address => mapping(address => uint256)) allowed;
mapping (address => uint256) public freezeOf;
mapping(address => bool) whitelisted;
mapping(address => bool) blockListed;
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Burn(address indexed from, uint256 value);
event Freeze(address indexed from, uint256 value);
event Unfreeze(address indexed from, uint256 value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
event Mint(address indexed to, uint256 amount);
event MintFinished();
event LogUserAdded(address user);
event LogUserRemoved(address user);
constructor() public {
}
function () public payable {
}
function createTokens() payable public {
require(msg.value > 0);
require(<FILL_ME>)
uint256 tokens = msg.value.mul(RATE);
balances[msg.sender] = balances[msg.sender].add(tokens);
_totalSupply = _totalSupply.add(tokens);
owner.transfer(msg.value);
}
function totalSupply() constant public returns (uint256) {
}
function balanceOf(address _owner) constant public returns (uint256 balance) {
}
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 allowance(address _owner, address _spender) constant public returns (uint256 remianing) {
}
function getRate() public constant returns (uint256) {
}
function setRate(uint256 _rate) public returns (bool success) {
}
modifier canMint() {
}
modifier hasMintPermission() {
}
function mint(address _to, uint256 _amount) hasMintPermission canMint public returns (bool) {
}
function finishMinting() onlyOwner canMint public returns (bool) {
}
// Add a user to the whitelist
function addUser(address user) onlyOwner public {
}
// Remove an user from the whitelist
function removeUser(address user) onlyOwner public {
}
function getCurrentOwnerBallence() constant public returns (uint256) {
}
function addBlockList(address wallet) onlyOwner public {
}
function removeBlockList(address wallet) onlyOwner public {
}
/**
* Destroy tokens
*
* Remove `_value` tokens from the system irreversibly
*
* @param _value the amount of money to burn
*/
function burn(uint256 _value) public returns (bool success) {
}
/**
* Destroy tokens from other account
*
* Remove `_value` tokens from the system irreversibly on behalf of `_from`.
*
* @param _from the address of the sender
* @param _value the amount of money to burn
*/
function burnFrom(address _from, uint256 _value) onlyOwner public returns (bool success) {
}
function freeze(uint256 _value) onlyOwner public returns (bool success) {
}
function unfreeze(uint256 _value) onlyOwner public returns (bool success) {
}
}
| whitelisted[msg.sender] | 8,952 | whitelisted[msg.sender] |
null | pragma solidity >=0.4.22 <0.6.0;
contract IERC20 {
function totalSupply() constant public returns (uint256);
function balanceOf(address _owner) constant public returns (uint256 balance);
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 allowance(address _owner, address _spender) constant public returns (uint256 remianing);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
/*
CREATED BY ANDRAS SZEKELY, SaiTech (c) 2019
*/
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 {
}
}
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) {
}
function max64(uint64 a, uint64 b) internal pure returns (uint64) {
}
function min64(uint64 a, uint64 b) internal pure returns (uint64) {
}
function max256(uint256 a, uint256 b) internal pure returns (uint256) {
}
function min256(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract LYCCoin is IERC20, Ownable {
using SafeMath for uint256;
uint public _totalSupply = 0;
uint public constant INITIAL_SUPPLY = 175000000000000000000000000;
uint public MAXUM_SUPPLY = 175000000000000000000000000;
uint256 public _currentSupply = 0;
string public constant symbol = "LYC";
string public constant name = "LYCCoin";
uint8 public constant decimals = 18;
uint256 public RATE;
bool public mintingFinished = false;
mapping(address => uint256) balances;
mapping(address => mapping(address => uint256)) allowed;
mapping (address => uint256) public freezeOf;
mapping(address => bool) whitelisted;
mapping(address => bool) blockListed;
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Burn(address indexed from, uint256 value);
event Freeze(address indexed from, uint256 value);
event Unfreeze(address indexed from, uint256 value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
event Mint(address indexed to, uint256 amount);
event MintFinished();
event LogUserAdded(address user);
event LogUserRemoved(address user);
constructor() public {
}
function () public payable {
}
function createTokens() payable public {
}
function totalSupply() constant public returns (uint256) {
}
function balanceOf(address _owner) constant public returns (uint256 balance) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
// Prevent transfer to 0x0 address. Use burn() instead
require(_to != 0x0);
require(<FILL_ME>)
// Save this for an assertion in the future
uint previousBalances = balances[msg.sender] + balances[_to];
balances[msg.sender] = SafeMath.sub(balances[msg.sender], _value); // Subtract from the sender
balances[_to] = SafeMath.add(balances[_to], _value); // Add the same to the recipient
emit Transfer(msg.sender, _to, _value);
// Asserts are used to use static analysis to find bugs in your code. They should never fail
assert(balances[msg.sender] + balances[_to] == previousBalances);
return true;
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
function allowance(address _owner, address _spender) constant public returns (uint256 remianing) {
}
function getRate() public constant returns (uint256) {
}
function setRate(uint256 _rate) public returns (bool success) {
}
modifier canMint() {
}
modifier hasMintPermission() {
}
function mint(address _to, uint256 _amount) hasMintPermission canMint public returns (bool) {
}
function finishMinting() onlyOwner canMint public returns (bool) {
}
// Add a user to the whitelist
function addUser(address user) onlyOwner public {
}
// Remove an user from the whitelist
function removeUser(address user) onlyOwner public {
}
function getCurrentOwnerBallence() constant public returns (uint256) {
}
function addBlockList(address wallet) onlyOwner public {
}
function removeBlockList(address wallet) onlyOwner public {
}
/**
* Destroy tokens
*
* Remove `_value` tokens from the system irreversibly
*
* @param _value the amount of money to burn
*/
function burn(uint256 _value) public returns (bool success) {
}
/**
* Destroy tokens from other account
*
* Remove `_value` tokens from the system irreversibly on behalf of `_from`.
*
* @param _from the address of the sender
* @param _value the amount of money to burn
*/
function burnFrom(address _from, uint256 _value) onlyOwner public returns (bool success) {
}
function freeze(uint256 _value) onlyOwner public returns (bool success) {
}
function unfreeze(uint256 _value) onlyOwner public returns (bool success) {
}
}
| balances[msg.sender]>=_value&&_value>0&&!blockListed[_to]&&!blockListed[msg.sender] | 8,952 | balances[msg.sender]>=_value&&_value>0&&!blockListed[_to]&&!blockListed[msg.sender] |
null | pragma solidity >=0.4.22 <0.6.0;
contract IERC20 {
function totalSupply() constant public returns (uint256);
function balanceOf(address _owner) constant public returns (uint256 balance);
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 allowance(address _owner, address _spender) constant public returns (uint256 remianing);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
/*
CREATED BY ANDRAS SZEKELY, SaiTech (c) 2019
*/
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 {
}
}
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) {
}
function max64(uint64 a, uint64 b) internal pure returns (uint64) {
}
function min64(uint64 a, uint64 b) internal pure returns (uint64) {
}
function max256(uint256 a, uint256 b) internal pure returns (uint256) {
}
function min256(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract LYCCoin is IERC20, Ownable {
using SafeMath for uint256;
uint public _totalSupply = 0;
uint public constant INITIAL_SUPPLY = 175000000000000000000000000;
uint public MAXUM_SUPPLY = 175000000000000000000000000;
uint256 public _currentSupply = 0;
string public constant symbol = "LYC";
string public constant name = "LYCCoin";
uint8 public constant decimals = 18;
uint256 public RATE;
bool public mintingFinished = false;
mapping(address => uint256) balances;
mapping(address => mapping(address => uint256)) allowed;
mapping (address => uint256) public freezeOf;
mapping(address => bool) whitelisted;
mapping(address => bool) blockListed;
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Burn(address indexed from, uint256 value);
event Freeze(address indexed from, uint256 value);
event Unfreeze(address indexed from, uint256 value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
event Mint(address indexed to, uint256 amount);
event MintFinished();
event LogUserAdded(address user);
event LogUserRemoved(address user);
constructor() public {
}
function () public payable {
}
function createTokens() payable public {
}
function totalSupply() constant public returns (uint256) {
}
function balanceOf(address _owner) constant public returns (uint256 balance) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
require(<FILL_ME>)
balances[_from] = SafeMath.sub(balances[_from], _value); // Subtract from the sender
balances[_to] = SafeMath.add(balances[_to], _value); // Add the same to the recipient
allowed[_from][msg.sender] = SafeMath.sub(allowed[_from][msg.sender], _value);
emit Transfer(_from, _to, _value);
return true;
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
function allowance(address _owner, address _spender) constant public returns (uint256 remianing) {
}
function getRate() public constant returns (uint256) {
}
function setRate(uint256 _rate) public returns (bool success) {
}
modifier canMint() {
}
modifier hasMintPermission() {
}
function mint(address _to, uint256 _amount) hasMintPermission canMint public returns (bool) {
}
function finishMinting() onlyOwner canMint public returns (bool) {
}
// Add a user to the whitelist
function addUser(address user) onlyOwner public {
}
// Remove an user from the whitelist
function removeUser(address user) onlyOwner public {
}
function getCurrentOwnerBallence() constant public returns (uint256) {
}
function addBlockList(address wallet) onlyOwner public {
}
function removeBlockList(address wallet) onlyOwner public {
}
/**
* Destroy tokens
*
* Remove `_value` tokens from the system irreversibly
*
* @param _value the amount of money to burn
*/
function burn(uint256 _value) public returns (bool success) {
}
/**
* Destroy tokens from other account
*
* Remove `_value` tokens from the system irreversibly on behalf of `_from`.
*
* @param _from the address of the sender
* @param _value the amount of money to burn
*/
function burnFrom(address _from, uint256 _value) onlyOwner public returns (bool success) {
}
function freeze(uint256 _value) onlyOwner public returns (bool success) {
}
function unfreeze(uint256 _value) onlyOwner public returns (bool success) {
}
}
| balances[msg.sender]>=_value&&balances[_from]>=_value&&_value>0&&whitelisted[msg.sender]&&!blockListed[_to]&&!blockListed[msg.sender] | 8,952 | balances[msg.sender]>=_value&&balances[_from]>=_value&&_value>0&&whitelisted[msg.sender]&&!blockListed[_to]&&!blockListed[msg.sender] |
null | pragma solidity >=0.4.22 <0.6.0;
contract IERC20 {
function totalSupply() constant public returns (uint256);
function balanceOf(address _owner) constant public returns (uint256 balance);
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 allowance(address _owner, address _spender) constant public returns (uint256 remianing);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
/*
CREATED BY ANDRAS SZEKELY, SaiTech (c) 2019
*/
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 {
}
}
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) {
}
function max64(uint64 a, uint64 b) internal pure returns (uint64) {
}
function min64(uint64 a, uint64 b) internal pure returns (uint64) {
}
function max256(uint256 a, uint256 b) internal pure returns (uint256) {
}
function min256(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract LYCCoin is IERC20, Ownable {
using SafeMath for uint256;
uint public _totalSupply = 0;
uint public constant INITIAL_SUPPLY = 175000000000000000000000000;
uint public MAXUM_SUPPLY = 175000000000000000000000000;
uint256 public _currentSupply = 0;
string public constant symbol = "LYC";
string public constant name = "LYCCoin";
uint8 public constant decimals = 18;
uint256 public RATE;
bool public mintingFinished = false;
mapping(address => uint256) balances;
mapping(address => mapping(address => uint256)) allowed;
mapping (address => uint256) public freezeOf;
mapping(address => bool) whitelisted;
mapping(address => bool) blockListed;
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Burn(address indexed from, uint256 value);
event Freeze(address indexed from, uint256 value);
event Unfreeze(address indexed from, uint256 value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
event Mint(address indexed to, uint256 amount);
event MintFinished();
event LogUserAdded(address user);
event LogUserRemoved(address user);
constructor() public {
}
function () public payable {
}
function createTokens() payable public {
}
function totalSupply() constant public returns (uint256) {
}
function balanceOf(address _owner) constant public returns (uint256 balance) {
}
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 allowance(address _owner, address _spender) constant public returns (uint256 remianing) {
}
function getRate() public constant returns (uint256) {
}
function setRate(uint256 _rate) public returns (bool success) {
}
modifier canMint() {
}
modifier hasMintPermission() {
}
function mint(address _to, uint256 _amount) hasMintPermission canMint public returns (bool) {
uint256 tokens = _amount.mul(RATE);
require(<FILL_ME>)
if (_currentSupply >= INITIAL_SUPPLY) {
_totalSupply = _totalSupply.add(tokens);
}
_currentSupply = _currentSupply.add(tokens);
balances[_to] = balances[_to].add(tokens);
emit Mint(_to, tokens);
emit Transfer(address(0), _to, tokens);
return true;
}
function finishMinting() onlyOwner canMint public returns (bool) {
}
// Add a user to the whitelist
function addUser(address user) onlyOwner public {
}
// Remove an user from the whitelist
function removeUser(address user) onlyOwner public {
}
function getCurrentOwnerBallence() constant public returns (uint256) {
}
function addBlockList(address wallet) onlyOwner public {
}
function removeBlockList(address wallet) onlyOwner public {
}
/**
* Destroy tokens
*
* Remove `_value` tokens from the system irreversibly
*
* @param _value the amount of money to burn
*/
function burn(uint256 _value) public returns (bool success) {
}
/**
* Destroy tokens from other account
*
* Remove `_value` tokens from the system irreversibly on behalf of `_from`.
*
* @param _from the address of the sender
* @param _value the amount of money to burn
*/
function burnFrom(address _from, uint256 _value) onlyOwner public returns (bool success) {
}
function freeze(uint256 _value) onlyOwner public returns (bool success) {
}
function unfreeze(uint256 _value) onlyOwner public returns (bool success) {
}
}
| _currentSupply.add(tokens)<MAXUM_SUPPLY&&whitelisted[msg.sender]&&!blockListed[_to] | 8,952 | _currentSupply.add(tokens)<MAXUM_SUPPLY&&whitelisted[msg.sender]&&!blockListed[_to] |
"exceeds max Cocos" | // contracts/originalcocos.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
// the original cocos
contract OriginalCocos is ERC721Enumerable, Ownable {
using Strings for uint256;
bool public hasSaleStarted = false;
uint256 private _price = 0.05 ether;
string _baseTokenURI;
// withdraw addresses
address OC = 0xdacBffb7E314486686B6374fdD91C3814B735aEC;
address SR = 0x82b6643Ce8Cd0Ab6664C44215039A3fe4c1660e5;
// The IPFS hash
string public METADATA_PROVENANCE_HASH = "";
constructor(string memory baseURI) ERC721("Original Cocos","COCO") {
}
function walletOfOwner(address _owner) public view returns(uint256[] memory) {
}
function adopt(uint256 numcocos) public payable {
uint256 supply = totalSupply();
require(hasSaleStarted, "sale is paused");
require(numcocos < 21, "only up to 20 Cocos at once");
require(<FILL_ME>)
require(msg.value >= _price * numcocos, "ether value sent is below the price");
for(uint256 i; i < numcocos; i++){
_safeMint( msg.sender, supply + i );
}
}
// a higher power
function setProvenanceHash(string memory _hash) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function setPrice(uint256 _newPrice) public onlyOwner() {
}
function startSale() public onlyOwner {
}
function pauseSale() public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
// community reserve
function reserve() public onlyOwner {
}
}
| supply+numcocos<10001,"exceeds max Cocos" | 8,966 | supply+numcocos<10001 |
null | // contracts/originalcocos.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
// the original cocos
contract OriginalCocos is ERC721Enumerable, Ownable {
using Strings for uint256;
bool public hasSaleStarted = false;
uint256 private _price = 0.05 ether;
string _baseTokenURI;
// withdraw addresses
address OC = 0xdacBffb7E314486686B6374fdD91C3814B735aEC;
address SR = 0x82b6643Ce8Cd0Ab6664C44215039A3fe4c1660e5;
// The IPFS hash
string public METADATA_PROVENANCE_HASH = "";
constructor(string memory baseURI) ERC721("Original Cocos","COCO") {
}
function walletOfOwner(address _owner) public view returns(uint256[] memory) {
}
function adopt(uint256 numcocos) public payable {
}
// a higher power
function setProvenanceHash(string memory _hash) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function setPrice(uint256 _newPrice) public onlyOwner() {
}
function startSale() public onlyOwner {
}
function pauseSale() public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
uint256 _eighty = (address(this).balance * 4) / 5;
uint256 _twenty = (address(this).balance) / 5;
require(<FILL_ME>)
require(payable(SR).send(_twenty));
}
// community reserve
function reserve() public onlyOwner {
}
}
| payable(OC).send(_eighty) | 8,966 | payable(OC).send(_eighty) |
null | // contracts/originalcocos.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
// the original cocos
contract OriginalCocos is ERC721Enumerable, Ownable {
using Strings for uint256;
bool public hasSaleStarted = false;
uint256 private _price = 0.05 ether;
string _baseTokenURI;
// withdraw addresses
address OC = 0xdacBffb7E314486686B6374fdD91C3814B735aEC;
address SR = 0x82b6643Ce8Cd0Ab6664C44215039A3fe4c1660e5;
// The IPFS hash
string public METADATA_PROVENANCE_HASH = "";
constructor(string memory baseURI) ERC721("Original Cocos","COCO") {
}
function walletOfOwner(address _owner) public view returns(uint256[] memory) {
}
function adopt(uint256 numcocos) public payable {
}
// a higher power
function setProvenanceHash(string memory _hash) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function setPrice(uint256 _newPrice) public onlyOwner() {
}
function startSale() public onlyOwner {
}
function pauseSale() public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
uint256 _eighty = (address(this).balance * 4) / 5;
uint256 _twenty = (address(this).balance) / 5;
require(payable(OC).send(_eighty));
require(<FILL_ME>)
}
// community reserve
function reserve() public onlyOwner {
}
}
| payable(SR).send(_twenty) | 8,966 | payable(SR).send(_twenty) |
"Not all minted" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract FlemiCollection is ERC721Enumerable, Ownable {
IERC721 public EtherCards = IERC721(0x97CA7FE0b0288f5EB85F386FeD876618FB9b8Ab8);
IERC721 public MasterBrews = IERC721(0x1EB4C9921C143e9926A2e592B828005A63529dA5);
IERC721 public WhelpsNFT = IERC721(0xa8934086a260F8Ece9166296967D18Bd9C8474A5);
uint256 public constant price = 50000000000000000; //0.05 ETH
uint256 public constant maxBuy = 20;
uint256 public constant maxSupply = 3375;
uint256 public winId = maxSupply;
bool public whitelistActive;
bool public saleIsActive;
string public provenance;
string private baseURI_;
constructor() ERC721("FlemiCollection", "FLEMI") { }
function withdraw() external onlyOwner {
}
/*
* Set provenance once it's calculated
*/
function setProvenanceHash(string memory provenanceHash) external onlyOwner {
}
function setBaseURI(string memory baseURI) external onlyOwner {
}
function _baseURI() override internal view returns (string memory) {
}
/*
* Set random token ID to win
*/
function setRandomId() external {
require(<FILL_ME>)
require(winId == maxSupply, "Already set");
uint randomHash = uint(keccak256(abi.encodePacked(block.difficulty, block.timestamp)));
winId = randomHash % maxSupply;
}
/*
* Pause sale if active, make active if paused
*/
function flipSaleState() external onlyOwner {
}
/*
* Pause whitelist if active, make active if paused
*/
function flipWhitelistState() external onlyOwner {
}
/*
Reserve 30 NFTs for giveaways
*/
function reserveFlemi() external onlyOwner {
}
/**
* Mint Flemish Faces
*/
function mintFlemi(uint numberOfTokens) public payable {
}
}
| totalSupply()==maxSupply,"Not all minted" | 8,979 | totalSupply()==maxSupply |
"Purchase exceeds max supply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract FlemiCollection is ERC721Enumerable, Ownable {
IERC721 public EtherCards = IERC721(0x97CA7FE0b0288f5EB85F386FeD876618FB9b8Ab8);
IERC721 public MasterBrews = IERC721(0x1EB4C9921C143e9926A2e592B828005A63529dA5);
IERC721 public WhelpsNFT = IERC721(0xa8934086a260F8Ece9166296967D18Bd9C8474A5);
uint256 public constant price = 50000000000000000; //0.05 ETH
uint256 public constant maxBuy = 20;
uint256 public constant maxSupply = 3375;
uint256 public winId = maxSupply;
bool public whitelistActive;
bool public saleIsActive;
string public provenance;
string private baseURI_;
constructor() ERC721("FlemiCollection", "FLEMI") { }
function withdraw() external onlyOwner {
}
/*
* Set provenance once it's calculated
*/
function setProvenanceHash(string memory provenanceHash) external onlyOwner {
}
function setBaseURI(string memory baseURI) external onlyOwner {
}
function _baseURI() override internal view returns (string memory) {
}
/*
* Set random token ID to win
*/
function setRandomId() external {
}
/*
* Pause sale if active, make active if paused
*/
function flipSaleState() external onlyOwner {
}
/*
* Pause whitelist if active, make active if paused
*/
function flipWhitelistState() external onlyOwner {
}
/*
Reserve 30 NFTs for giveaways
*/
function reserveFlemi() external onlyOwner {
}
/**
* Mint Flemish Faces
*/
function mintFlemi(uint numberOfTokens) public payable {
require(saleIsActive, "Sale must be active to mint");
require(numberOfTokens <= maxBuy, "Can only mint 20 tokens at once");
require(<FILL_ME>)
require(price*(numberOfTokens) <= msg.value, "Ether value sent isn't correct");
if(whitelistActive) {
if(numberOfTokens >= 2 && totalSupply() <= 1000 && (EtherCards.balanceOf(msg.sender) > 0 || MasterBrews.balanceOf(msg.sender) > 0 || WhelpsNFT.balanceOf(msg.sender) > 0)) {
numberOfTokens=numberOfTokens + numberOfTokens/2;
}
}
for(uint i = 0; i < numberOfTokens; i++) {
uint mintIndex = totalSupply();
if (totalSupply() < maxSupply) {
_safeMint(msg.sender, mintIndex);
}
}
}
}
| (totalSupply()+(numberOfTokens))<=maxSupply,"Purchase exceeds max supply" | 8,979 | (totalSupply()+(numberOfTokens))<=maxSupply |
"Ether value sent isn't correct" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract FlemiCollection is ERC721Enumerable, Ownable {
IERC721 public EtherCards = IERC721(0x97CA7FE0b0288f5EB85F386FeD876618FB9b8Ab8);
IERC721 public MasterBrews = IERC721(0x1EB4C9921C143e9926A2e592B828005A63529dA5);
IERC721 public WhelpsNFT = IERC721(0xa8934086a260F8Ece9166296967D18Bd9C8474A5);
uint256 public constant price = 50000000000000000; //0.05 ETH
uint256 public constant maxBuy = 20;
uint256 public constant maxSupply = 3375;
uint256 public winId = maxSupply;
bool public whitelistActive;
bool public saleIsActive;
string public provenance;
string private baseURI_;
constructor() ERC721("FlemiCollection", "FLEMI") { }
function withdraw() external onlyOwner {
}
/*
* Set provenance once it's calculated
*/
function setProvenanceHash(string memory provenanceHash) external onlyOwner {
}
function setBaseURI(string memory baseURI) external onlyOwner {
}
function _baseURI() override internal view returns (string memory) {
}
/*
* Set random token ID to win
*/
function setRandomId() external {
}
/*
* Pause sale if active, make active if paused
*/
function flipSaleState() external onlyOwner {
}
/*
* Pause whitelist if active, make active if paused
*/
function flipWhitelistState() external onlyOwner {
}
/*
Reserve 30 NFTs for giveaways
*/
function reserveFlemi() external onlyOwner {
}
/**
* Mint Flemish Faces
*/
function mintFlemi(uint numberOfTokens) public payable {
require(saleIsActive, "Sale must be active to mint");
require(numberOfTokens <= maxBuy, "Can only mint 20 tokens at once");
require((totalSupply() + (numberOfTokens)) <= maxSupply, "Purchase exceeds max supply");
require(<FILL_ME>)
if(whitelistActive) {
if(numberOfTokens >= 2 && totalSupply() <= 1000 && (EtherCards.balanceOf(msg.sender) > 0 || MasterBrews.balanceOf(msg.sender) > 0 || WhelpsNFT.balanceOf(msg.sender) > 0)) {
numberOfTokens=numberOfTokens + numberOfTokens/2;
}
}
for(uint i = 0; i < numberOfTokens; i++) {
uint mintIndex = totalSupply();
if (totalSupply() < maxSupply) {
_safeMint(msg.sender, mintIndex);
}
}
}
}
| price*(numberOfTokens)<=msg.value,"Ether value sent isn't correct" | 8,979 | price*(numberOfTokens)<=msg.value |
"depositEther() failed" | pragma solidity ^0.4.15;
/**
* @title Wallet to hold and trade ERC20 tokens and ether
* @dev User wallet to interact with the exchange.
* all tokens and ether held in this wallet, 1 to 1 mapping to user EOAs.
*/
contract WalletV3 is LoggingErrors {
/**
* Storage
*/
// Vars included in wallet logic "lib", the order must match between Wallet and Logic
address public owner_;
address public exchange_;
mapping(address => uint256) public tokenBalances_;
address public logic_; // storage location 0x3 loaded for delegatecalls so this var must remain at index 3
uint256 public birthBlock_;
WalletConnector private connector_;
/**
* Events
*/
event LogDeposit(address token, uint256 amount, uint256 balance);
event LogWithdrawal(address token, uint256 amount, uint256 balance);
/**
* @dev Contract constructor. Set user as owner and connector address.
* @param _owner The address of the user's EOA, wallets created from the exchange
* so must past in the owner address, msg.sender == exchange.
* @param _connector The wallet connector to be used to retrieve the wallet logic
*/
constructor(address _owner, address _connector, address _exchange) public {
}
function () external payable {}
/**
* External
*/
/**
* @dev Deposit ether into this wallet, default to address 0 for consistent token lookup.
*/
function depositEther()
external
payable
{
require(<FILL_ME>)
}
/**
* @dev Deposit any ERC20 token into this wallet.
* @param _token The address of the existing token contract.
* @param _amount The amount of tokens to deposit.
* @return Bool if the deposit was successful.
*/
function depositERC20Token (
address _token,
uint256 _amount
) external
returns(bool)
{
}
/**
* @dev The result of an order, update the balance of this wallet.
* param _token The address of the token balance to update.
* param _amount The amount to update the balance by.
* param _subtractionFlag If true then subtract the token amount else add.
* @return Bool if the update was successful.
*/
function updateBalance (
address /*_token*/,
uint256 /*_amount*/,
bool /*_subtractionFlag*/
) external
returns(bool)
{
}
/**
* User may update to the latest version of the exchange contract.
* Note that multiple versions are NOT supported at this time and therefore if a
* user does not wish to update they will no longer be able to use the exchange.
* @param _exchange The new exchange.
* @return Success of this transaction.
*/
function updateExchange(address _exchange)
external
returns(bool)
{
}
/**
* User may update to a new or older version of the logic contract.
* @param _version The versin to update to.
* @return Success of this transaction.
*/
function updateLogic(uint256 _version)
external
returns(bool)
{
}
/**
* @dev Verify an order that the Exchange has received involving this wallet.
* Internal checks and then authorize the exchange to move the tokens.
* If sending ether will transfer to the exchange to broker the trade.
* param _token The address of the token contract being sold.
* param _amount The amount of tokens the order is for.
* param _fee The fee for the current trade.
* param _feeToken The token of which the fee is to be paid in.
* @return If the order was verified or not.
*/
function verifyOrder (
address /*_token*/,
uint256 /*_amount*/,
uint256 /*_fee*/,
address /*_feeToken*/
) external
returns(bool)
{
}
/**
* @dev Withdraw any token, including ether from this wallet to an EOA.
* param _token The address of the token to withdraw.
* param _amount The amount to withdraw.
* @return Success of the withdrawal.
*/
function withdraw(address /*_token*/, uint256 /*_amount*/)
external
returns(bool)
{
}
/**
* Constants
*/
/**
* @dev Get the balance for a specific token.
* @param _token The address of the token contract to retrieve the balance of.
* @return The current balance within this contract.
*/
function balanceOf(address _token)
public
view
returns(uint)
{
}
function walletVersion() external pure returns(uint){
}
}
| logic_.delegatecall(abi.encodeWithSignature('deposit(address,uint256)',0,msg.value)),"depositEther() failed" | 8,985 | logic_.delegatecall(abi.encodeWithSignature('deposit(address,uint256)',0,msg.value)) |
"depositERC20Token() failed" | pragma solidity ^0.4.15;
/**
* @title Wallet to hold and trade ERC20 tokens and ether
* @dev User wallet to interact with the exchange.
* all tokens and ether held in this wallet, 1 to 1 mapping to user EOAs.
*/
contract WalletV3 is LoggingErrors {
/**
* Storage
*/
// Vars included in wallet logic "lib", the order must match between Wallet and Logic
address public owner_;
address public exchange_;
mapping(address => uint256) public tokenBalances_;
address public logic_; // storage location 0x3 loaded for delegatecalls so this var must remain at index 3
uint256 public birthBlock_;
WalletConnector private connector_;
/**
* Events
*/
event LogDeposit(address token, uint256 amount, uint256 balance);
event LogWithdrawal(address token, uint256 amount, uint256 balance);
/**
* @dev Contract constructor. Set user as owner and connector address.
* @param _owner The address of the user's EOA, wallets created from the exchange
* so must past in the owner address, msg.sender == exchange.
* @param _connector The wallet connector to be used to retrieve the wallet logic
*/
constructor(address _owner, address _connector, address _exchange) public {
}
function () external payable {}
/**
* External
*/
/**
* @dev Deposit ether into this wallet, default to address 0 for consistent token lookup.
*/
function depositEther()
external
payable
{
}
/**
* @dev Deposit any ERC20 token into this wallet.
* @param _token The address of the existing token contract.
* @param _amount The amount of tokens to deposit.
* @return Bool if the deposit was successful.
*/
function depositERC20Token (
address _token,
uint256 _amount
) external
returns(bool)
{
// ether
if (_token == 0)
return error('Cannot deposit ether via depositERC20, Wallet.depositERC20Token()');
require(<FILL_ME>)
return true;
}
/**
* @dev The result of an order, update the balance of this wallet.
* param _token The address of the token balance to update.
* param _amount The amount to update the balance by.
* param _subtractionFlag If true then subtract the token amount else add.
* @return Bool if the update was successful.
*/
function updateBalance (
address /*_token*/,
uint256 /*_amount*/,
bool /*_subtractionFlag*/
) external
returns(bool)
{
}
/**
* User may update to the latest version of the exchange contract.
* Note that multiple versions are NOT supported at this time and therefore if a
* user does not wish to update they will no longer be able to use the exchange.
* @param _exchange The new exchange.
* @return Success of this transaction.
*/
function updateExchange(address _exchange)
external
returns(bool)
{
}
/**
* User may update to a new or older version of the logic contract.
* @param _version The versin to update to.
* @return Success of this transaction.
*/
function updateLogic(uint256 _version)
external
returns(bool)
{
}
/**
* @dev Verify an order that the Exchange has received involving this wallet.
* Internal checks and then authorize the exchange to move the tokens.
* If sending ether will transfer to the exchange to broker the trade.
* param _token The address of the token contract being sold.
* param _amount The amount of tokens the order is for.
* param _fee The fee for the current trade.
* param _feeToken The token of which the fee is to be paid in.
* @return If the order was verified or not.
*/
function verifyOrder (
address /*_token*/,
uint256 /*_amount*/,
uint256 /*_fee*/,
address /*_feeToken*/
) external
returns(bool)
{
}
/**
* @dev Withdraw any token, including ether from this wallet to an EOA.
* param _token The address of the token to withdraw.
* param _amount The amount to withdraw.
* @return Success of the withdrawal.
*/
function withdraw(address /*_token*/, uint256 /*_amount*/)
external
returns(bool)
{
}
/**
* Constants
*/
/**
* @dev Get the balance for a specific token.
* @param _token The address of the token contract to retrieve the balance of.
* @return The current balance within this contract.
*/
function balanceOf(address _token)
public
view
returns(uint)
{
}
function walletVersion() external pure returns(uint){
}
}
| logic_.delegatecall(abi.encodeWithSignature('deposit(address,uint256)',_token,_amount)),"depositERC20Token() failed" | 8,985 | logic_.delegatecall(abi.encodeWithSignature('deposit(address,uint256)',_token,_amount)) |
"Only Dev" | /**
*Submitted for verification at Etherscan.io on 2021-08-05
*/
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.6.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount)
external
returns (bool);
function allowance(address owner, address spender)
external
view
returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
library SafeMath {
/**
* @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) {
}
}
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function isContract(address account) internal view returns (bool) {
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data)
internal
returns (bytes memory)
{
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
}
function _functionCallWithValue(
address target,
bytes memory data,
uint256 weiValue,
string memory errorMessage
) private returns (bytes memory) {
}
}
contract DynamicStaking is Context {
using SafeMath for uint256;
using Address for address;
struct Staker {
uint256 stakedBalance;
uint256 stakedReward;
uint256 stakedTimestamp;
}
bool private isActive;
mapping(address => Staker) public stakers;
address[] public stakersList;
address private devX;
IERC20 public inu;
IERC20 public rewardToken;
uint256 public startDate;
uint256 public duration;
uint256 public rewardAmount;
string public name;
event StakeINU(address user, uint256 amount);
event UnstakeINU(address user, uint256 amount);
event Collect(address user, uint256 amount);
constructor(
address _inu,
address _rewardToken,
address _devX,
uint256 _duration,
string memory _name
) public {
}
modifier updateRewards() {
}
function getStakedBalance(address sender) public view returns (uint256) {
}
function getRate() public view returns (uint256) {
}
function getStatus() public view returns (bool) {
}
function setRewardAmount() external updateRewards {
require(<FILL_ME>)
rewardAmount = rewardToken.balanceOf(address(this));
startDate = now;
}
function getReward(address account) public view returns (uint256) {
}
function setActive(bool bool_) external {
}
function stakeINU(uint256 _amount) external updateRewards {
}
function unstakeINU(uint256 _amount) external updateRewards {
}
function collectReward() public {
}
}
| _msgSender()==devX,"Only Dev" | 9,009 | _msgSender()==devX |
"Insufficient Amount In Balance" | /**
*Submitted for verification at Etherscan.io on 2021-08-05
*/
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.6.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount)
external
returns (bool);
function allowance(address owner, address spender)
external
view
returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
library SafeMath {
/**
* @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) {
}
}
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function isContract(address account) internal view returns (bool) {
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data)
internal
returns (bytes memory)
{
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
}
function _functionCallWithValue(
address target,
bytes memory data,
uint256 weiValue,
string memory errorMessage
) private returns (bytes memory) {
}
}
contract DynamicStaking is Context {
using SafeMath for uint256;
using Address for address;
struct Staker {
uint256 stakedBalance;
uint256 stakedReward;
uint256 stakedTimestamp;
}
bool private isActive;
mapping(address => Staker) public stakers;
address[] public stakersList;
address private devX;
IERC20 public inu;
IERC20 public rewardToken;
uint256 public startDate;
uint256 public duration;
uint256 public rewardAmount;
string public name;
event StakeINU(address user, uint256 amount);
event UnstakeINU(address user, uint256 amount);
event Collect(address user, uint256 amount);
constructor(
address _inu,
address _rewardToken,
address _devX,
uint256 _duration,
string memory _name
) public {
}
modifier updateRewards() {
}
function getStakedBalance(address sender) public view returns (uint256) {
}
function getRate() public view returns (uint256) {
}
function getStatus() public view returns (bool) {
}
function setRewardAmount() external updateRewards {
}
function getReward(address account) public view returns (uint256) {
}
function setActive(bool bool_) external {
}
function stakeINU(uint256 _amount) external updateRewards {
require(isActive, "Not Active!");
require(_amount > 0, "No negative staking");
require(<FILL_ME>)
Staker storage user = stakers[_msgSender()];
uint256 balanceNow = inu.balanceOf(address(this));
inu.transferFrom(_msgSender(), address(this), _amount);
uint256 receivedBalance = inu.balanceOf(address(this)).sub(balanceNow);
uint256 poolFee = receivedBalance.div(100);
inu.transfer(devX, poolFee);
receivedBalance = receivedBalance.sub(poolFee);
user.stakedReward = getReward(_msgSender());
user.stakedBalance = user.stakedBalance.add(receivedBalance);
user.stakedTimestamp = now;
emit StakeINU(_msgSender(), receivedBalance);
}
function unstakeINU(uint256 _amount) external updateRewards {
}
function collectReward() public {
}
}
| inu.balanceOf(_msgSender())>=_amount,"Insufficient Amount In Balance" | 9,009 | inu.balanceOf(_msgSender())>=_amount |
"not salvagable" | // SPDX-License-Identifier: MIT
pragma solidity ^0.7.6;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/math/Math.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/utils/Pausable.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
contract LiquidityNexusBase is Ownable, Pausable, ReentrancyGuard {
using SafeMath for uint256;
using SafeERC20 for IERC20;
address public constant WETH = address(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2);
address public constant USDC = address(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48);
address public governance;
constructor() {
}
modifier onlyGovernance() {
}
function setGovernance(address _governance) external onlyGovernance {
}
/**
* Only the owner is supposed to deposit USDC into this contract.
*/
function depositCapital(uint256 amount) public onlyOwner {
}
function depositAllCapital() external onlyOwner {
}
/**
* The owner can withdraw the unused USDC capital that they had deposited earlier.
*/
function withdrawFreeCapital() public onlyOwner {
}
/**
* Pause will only prevent new ETH deposits (addLiquidity). Existing depositors will still
* be able to removeLiquidity even when paused.
*/
function pause() external onlyOwner {
}
function unpause() external onlyOwner {
}
/**
* Owner can only salvage unrelated tokens that were sent by mistake.
*/
function salvage(address[] memory tokens_) external onlyOwner {
for (uint256 i = 0; i < tokens_.length; i++) {
address token = tokens_[i];
require(<FILL_ME>)
uint256 balance = IERC20(token).balanceOf(address(this));
if (balance > 0) {
IERC20(token).safeTransfer(msg.sender, balance);
}
}
}
function isSalvagable(address token) internal virtual returns (bool) {
}
receive() external payable {} // solhint-disable-line no-empty-blocks
}
| isSalvagable(token),"not salvagable" | 9,015 | isSalvagable(token) |
null | pragma solidity ^0.4.18;
/**
* CoinCrowd ICO. More info www.coincrowd.it
*/
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() internal {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) onlyOwner public {
}
}
contract tokenInterface {
function balanceOf(address _owner) public constant returns (uint256 balance);
function transfer(address _to, uint256 _value) public returns (bool);
}
contract Ambassador {
using SafeMath for uint256;
CoinCrowdICO icoContract;
uint256 public startRC;
uint256 public endRC;
address internal contractOwner;
uint256 public soldTokensWithoutBonus; // wei of XCC sold token without bonuses
function euroRaisedRc() public view returns(uint256 euro) {
}
uint256[] public euroThreshold; // array of euro(k) threshold reached - 100K = 100.000β¬
uint256[] public bonusThreshold; // array of bonus of each euroThreshold reached - 20% = 2000
mapping(address => uint256) public balanceUser; // address => token amount
function Ambassador(address _icoContract, address _ambassadorAddr, uint256[] _euroThreshold, uint256[] _bonusThreshold, uint256 _startRC , uint256 _endRC ) public {
}
modifier onlyIcoContract() {
}
function setTimeRC(uint256 _startRC, uint256 _endRC ) internal {
}
function updateTime(uint256 _newStart, uint256 _newEnd) public onlyIcoContract {
}
function () public payable {
require( now > startRC );
if( now < endRC ) {
uint256 tokenAmount = icoContract.buy.value(msg.value)(msg.sender);
balanceUser[msg.sender] = balanceUser[msg.sender].add(tokenAmount);
soldTokensWithoutBonus = soldTokensWithoutBonus.add(tokenAmount);
} else { //claim premium bonus logic
require(<FILL_ME>)
uint256 bonusApplied = 0;
for (uint i = 0; i < euroThreshold.length; i++) {
if ( icoContract.euroRaised(soldTokensWithoutBonus).div(1000) > euroThreshold[i] ) {
bonusApplied = bonusThreshold[i];
}
}
require( bonusApplied > 0 );
uint256 addTokenAmount = balanceUser[msg.sender].mul( bonusApplied ).div(10**2);
balanceUser[msg.sender] = 0;
icoContract.claimPremium(msg.sender, addTokenAmount);
if( msg.value > 0 ) msg.sender.transfer(msg.value); // give back eth
}
}
}
contract CoinCrowdICO is Ownable {
using SafeMath for uint256;
tokenInterface public tokenContract;
uint256 public decimals = 18;
uint256 public tokenValue; // 1 XCC in wei
uint256 public constant centToken = 20; // euro cents value of 1 token
function euroRaised(uint256 _weiTokens) public view returns (uint256) {
}
uint256 public endTime; // seconds from 1970-01-01T00:00:00Z
uint256 public startTime; // seconds from 1970-01-01T00:00:00Z
uint256 internal constant weekInSeconds = 604800; // seconds in a week
uint256 public totalSoldTokensWithBonus; // total wei of XCC distribuited from this ICO
uint256 public totalSoldTokensWithoutBonus; // total wei of XCC distribuited from this ICO without bonus
function euroRaisedICO() public view returns(uint256 euro) {
}
uint256 public remainingTokens; // total wei of XCC remaining (without bonuses)
mapping(address => address) public ambassadorAddressOf; // ambassadorContract => ambassadorAddress
function CoinCrowdICO(address _tokenAddress, uint256 _tokenValue, uint256 _startTime) public {
}
address public updater; // account in charge of updating the token value
event UpdateValue(uint256 newValue);
function updateValue(uint256 newValue) public {
}
function updateUpdater(address newUpdater) public onlyOwner {
}
function updateTime(uint256 _newStart, uint256 _newEnd) public onlyOwner {
}
function updateTimeRC(address _rcContract, uint256 _newStart, uint256 _newEnd) public onlyOwner {
}
function startICO(uint256 _startTime) public onlyOwner {
}
event Buy(address buyer, uint256 value, address indexed ambassador);
function buy(address _buyer) public payable returns(uint256) {
}
event NewAmbassador(address ambassador, address contr);
function addMeByRC(address _ambassadorAddr) public {
}
function withdraw(address to, uint256 value) public onlyOwner {
}
function updateTokenContract(address _tokenContract) public onlyOwner {
}
function withdrawTokens(address to, uint256 value) public onlyOwner returns (bool) {
}
function claimPremium(address _buyer, uint256 _amount) public returns(bool) {
}
function () public payable {
}
}
| balanceUser[msg.sender]>0 | 9,094 | balanceUser[msg.sender]>0 |
null | pragma solidity ^0.4.18;
/**
* CoinCrowd ICO. More info www.coincrowd.it
*/
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() internal {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) onlyOwner public {
}
}
contract tokenInterface {
function balanceOf(address _owner) public constant returns (uint256 balance);
function transfer(address _to, uint256 _value) public returns (bool);
}
contract Ambassador {
using SafeMath for uint256;
CoinCrowdICO icoContract;
uint256 public startRC;
uint256 public endRC;
address internal contractOwner;
uint256 public soldTokensWithoutBonus; // wei of XCC sold token without bonuses
function euroRaisedRc() public view returns(uint256 euro) {
}
uint256[] public euroThreshold; // array of euro(k) threshold reached - 100K = 100.000β¬
uint256[] public bonusThreshold; // array of bonus of each euroThreshold reached - 20% = 2000
mapping(address => uint256) public balanceUser; // address => token amount
function Ambassador(address _icoContract, address _ambassadorAddr, uint256[] _euroThreshold, uint256[] _bonusThreshold, uint256 _startRC , uint256 _endRC ) public {
}
modifier onlyIcoContract() {
}
function setTimeRC(uint256 _startRC, uint256 _endRC ) internal {
}
function updateTime(uint256 _newStart, uint256 _newEnd) public onlyIcoContract {
}
function () public payable {
}
}
contract CoinCrowdICO is Ownable {
using SafeMath for uint256;
tokenInterface public tokenContract;
uint256 public decimals = 18;
uint256 public tokenValue; // 1 XCC in wei
uint256 public constant centToken = 20; // euro cents value of 1 token
function euroRaised(uint256 _weiTokens) public view returns (uint256) {
}
uint256 public endTime; // seconds from 1970-01-01T00:00:00Z
uint256 public startTime; // seconds from 1970-01-01T00:00:00Z
uint256 internal constant weekInSeconds = 604800; // seconds in a week
uint256 public totalSoldTokensWithBonus; // total wei of XCC distribuited from this ICO
uint256 public totalSoldTokensWithoutBonus; // total wei of XCC distribuited from this ICO without bonus
function euroRaisedICO() public view returns(uint256 euro) {
}
uint256 public remainingTokens; // total wei of XCC remaining (without bonuses)
mapping(address => address) public ambassadorAddressOf; // ambassadorContract => ambassadorAddress
function CoinCrowdICO(address _tokenAddress, uint256 _tokenValue, uint256 _startTime) public {
}
address public updater; // account in charge of updating the token value
event UpdateValue(uint256 newValue);
function updateValue(uint256 newValue) public {
}
function updateUpdater(address newUpdater) public onlyOwner {
}
function updateTime(uint256 _newStart, uint256 _newEnd) public onlyOwner {
}
function updateTimeRC(address _rcContract, uint256 _newStart, uint256 _newEnd) public onlyOwner {
}
function startICO(uint256 _startTime) public onlyOwner {
}
event Buy(address buyer, uint256 value, address indexed ambassador);
function buy(address _buyer) public payable returns(uint256) {
require(now < endTime); // check if ended
require( remainingTokens > 0 ); // Check if there are any remaining tokens excluding bonuses
require(<FILL_ME>) // should have enough balance
uint256 oneXCC = 10 ** decimals;
uint256 tokenAmount = msg.value.mul(oneXCC).div(tokenValue);
uint256 bonusRate; // decimals of bonus 20% = 2000
address currentAmbassador = address(0);
if ( ambassadorAddressOf[msg.sender] != address(0) ) { // if is an authorized ambassadorContract
currentAmbassador = msg.sender;
bonusRate = 0; // Ambassador Comunity should claim own bonus at the end of RC
} else { // if is directly called to CoinCrowdICO contract
require(now > startTime); // check if started for public user
if( now > startTime + weekInSeconds*0 ) { bonusRate = 2000; }
if( now > startTime + weekInSeconds*1 ) { bonusRate = 1833; }
if( now > startTime + weekInSeconds*2 ) { bonusRate = 1667; }
if( now > startTime + weekInSeconds*3 ) { bonusRate = 1500; }
if( now > startTime + weekInSeconds*4 ) { bonusRate = 1333; }
if( now > startTime + weekInSeconds*5 ) { bonusRate = 1167; }
if( now > startTime + weekInSeconds*6 ) { bonusRate = 1000; }
if( now > startTime + weekInSeconds*7 ) { bonusRate = 833; }
if( now > startTime + weekInSeconds*8 ) { bonusRate = 667; }
if( now > startTime + weekInSeconds*9 ) { bonusRate = 500; }
if( now > startTime + weekInSeconds*10 ) { bonusRate = 333; }
if( now > startTime + weekInSeconds*11 ) { bonusRate = 167; }
if( now > startTime + weekInSeconds*12 ) { bonusRate = 0; }
}
if ( remainingTokens < tokenAmount ) {
uint256 refund = (tokenAmount - remainingTokens).mul(tokenValue).div(oneXCC);
tokenAmount = remainingTokens;
owner.transfer(msg.value-refund);
remainingTokens = 0; // set remaining token to 0
_buyer.transfer(refund);
} else {
remainingTokens = remainingTokens.sub(tokenAmount); // update remaining token without bonus
owner.transfer(msg.value);
}
uint256 tokenAmountWithBonus = tokenAmount.add(tokenAmount.mul( bonusRate ).div(10**4)); //add token bonus
tokenContract.transfer(_buyer, tokenAmountWithBonus);
Buy(_buyer, tokenAmountWithBonus, currentAmbassador);
totalSoldTokensWithBonus += tokenAmountWithBonus;
totalSoldTokensWithoutBonus += tokenAmount;
return tokenAmount; // retun tokenAmount without bonuses for easier calculations
}
event NewAmbassador(address ambassador, address contr);
function addMeByRC(address _ambassadorAddr) public {
}
function withdraw(address to, uint256 value) public onlyOwner {
}
function updateTokenContract(address _tokenContract) public onlyOwner {
}
function withdrawTokens(address to, uint256 value) public onlyOwner returns (bool) {
}
function claimPremium(address _buyer, uint256 _amount) public returns(bool) {
}
function () public payable {
}
}
| tokenContract.balanceOf(this)>remainingTokens | 9,094 | tokenContract.balanceOf(this)>remainingTokens |
null | pragma solidity ^0.4.18;
/**
* CoinCrowd ICO. More info www.coincrowd.it
*/
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() internal {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) onlyOwner public {
}
}
contract tokenInterface {
function balanceOf(address _owner) public constant returns (uint256 balance);
function transfer(address _to, uint256 _value) public returns (bool);
}
contract Ambassador {
using SafeMath for uint256;
CoinCrowdICO icoContract;
uint256 public startRC;
uint256 public endRC;
address internal contractOwner;
uint256 public soldTokensWithoutBonus; // wei of XCC sold token without bonuses
function euroRaisedRc() public view returns(uint256 euro) {
}
uint256[] public euroThreshold; // array of euro(k) threshold reached - 100K = 100.000β¬
uint256[] public bonusThreshold; // array of bonus of each euroThreshold reached - 20% = 2000
mapping(address => uint256) public balanceUser; // address => token amount
function Ambassador(address _icoContract, address _ambassadorAddr, uint256[] _euroThreshold, uint256[] _bonusThreshold, uint256 _startRC , uint256 _endRC ) public {
}
modifier onlyIcoContract() {
}
function setTimeRC(uint256 _startRC, uint256 _endRC ) internal {
}
function updateTime(uint256 _newStart, uint256 _newEnd) public onlyIcoContract {
}
function () public payable {
}
}
contract CoinCrowdICO is Ownable {
using SafeMath for uint256;
tokenInterface public tokenContract;
uint256 public decimals = 18;
uint256 public tokenValue; // 1 XCC in wei
uint256 public constant centToken = 20; // euro cents value of 1 token
function euroRaised(uint256 _weiTokens) public view returns (uint256) {
}
uint256 public endTime; // seconds from 1970-01-01T00:00:00Z
uint256 public startTime; // seconds from 1970-01-01T00:00:00Z
uint256 internal constant weekInSeconds = 604800; // seconds in a week
uint256 public totalSoldTokensWithBonus; // total wei of XCC distribuited from this ICO
uint256 public totalSoldTokensWithoutBonus; // total wei of XCC distribuited from this ICO without bonus
function euroRaisedICO() public view returns(uint256 euro) {
}
uint256 public remainingTokens; // total wei of XCC remaining (without bonuses)
mapping(address => address) public ambassadorAddressOf; // ambassadorContract => ambassadorAddress
function CoinCrowdICO(address _tokenAddress, uint256 _tokenValue, uint256 _startTime) public {
}
address public updater; // account in charge of updating the token value
event UpdateValue(uint256 newValue);
function updateValue(uint256 newValue) public {
}
function updateUpdater(address newUpdater) public onlyOwner {
}
function updateTime(uint256 _newStart, uint256 _newEnd) public onlyOwner {
}
function updateTimeRC(address _rcContract, uint256 _newStart, uint256 _newEnd) public onlyOwner {
}
function startICO(uint256 _startTime) public onlyOwner {
}
event Buy(address buyer, uint256 value, address indexed ambassador);
function buy(address _buyer) public payable returns(uint256) {
}
event NewAmbassador(address ambassador, address contr);
function addMeByRC(address _ambassadorAddr) public {
}
function withdraw(address to, uint256 value) public onlyOwner {
}
function updateTokenContract(address _tokenContract) public onlyOwner {
}
function withdrawTokens(address to, uint256 value) public onlyOwner returns (bool) {
}
function claimPremium(address _buyer, uint256 _amount) public returns(bool) {
require(<FILL_ME>) // Check if is an authorized _ambassadorContract
return tokenContract.transfer(_buyer, _amount);
}
function () public payable {
}
}
| ambassadorAddressOf[msg.sender]!=address(0) | 9,094 | ambassadorAddressOf[msg.sender]!=address(0) |
"claim: amount mismatch" | pragma solidity ^0.5.16;
// Copied from Compound/ExponentialNoError
/**
* @title Exponential module for storing fixed-precision decimals
* @author DeFil
* @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.
* Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:
* `Exp({mantissa: 5100000000000000000})`.
*/
contract ExponentialNoError {
uint constant expScale = 1e18;
uint constant doubleScale = 1e36;
uint constant halfExpScale = expScale/2;
uint constant mantissaOne = expScale;
struct Exp {
uint mantissa;
}
struct Double {
uint mantissa;
}
/**
* @dev Truncates the given exp to a whole number value.
* For example, truncate(Exp{mantissa: 15 * expScale}) = 15
*/
function truncate(Exp memory exp) pure internal returns (uint) {
}
/**
* @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.
*/
function mul_ScalarTruncate(Exp memory a, uint scalar) pure internal returns (uint) {
}
/**
* @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.
*/
function mul_ScalarTruncateAddUInt(Exp memory a, uint scalar, uint addend) pure internal returns (uint) {
}
/**
* @dev Checks if first Exp is less than second Exp.
*/
function lessThanExp(Exp memory left, Exp memory right) pure internal returns (bool) {
}
/**
* @dev Checks if left Exp <= right Exp.
*/
function lessThanOrEqualExp(Exp memory left, Exp memory right) pure internal returns (bool) {
}
/**
* @dev Checks if left Exp > right Exp.
*/
function greaterThanExp(Exp memory left, Exp memory right) pure internal returns (bool) {
}
/**
* @dev returns true if Exp is exactly zero
*/
function isZeroExp(Exp memory value) pure internal returns (bool) {
}
function safe224(uint n, string memory errorMessage) pure internal returns (uint224) {
}
function safe32(uint n, string memory errorMessage) pure internal returns (uint32) {
}
function add_(Exp memory a, Exp memory b) pure internal returns (Exp memory) {
}
function add_(Double memory a, Double memory b) pure internal returns (Double memory) {
}
function add_(uint a, uint b) pure internal returns (uint) {
}
function add_(uint a, uint b, string memory errorMessage) pure internal returns (uint) {
}
function sub_(Exp memory a, Exp memory b) pure internal returns (Exp memory) {
}
function sub_(Double memory a, Double memory b) pure internal returns (Double memory) {
}
function sub_(uint a, uint b) pure internal returns (uint) {
}
function sub_(uint a, uint b, string memory errorMessage) pure internal returns (uint) {
}
function mul_(Exp memory a, Exp memory b) pure internal returns (Exp memory) {
}
function mul_(Exp memory a, uint b) pure internal returns (Exp memory) {
}
function mul_(uint a, Exp memory b) pure internal returns (uint) {
}
function mul_(Double memory a, Double memory b) pure internal returns (Double memory) {
}
function mul_(Double memory a, uint b) pure internal returns (Double memory) {
}
function mul_(uint a, Double memory b) pure internal returns (uint) {
}
function mul_(uint a, uint b) pure internal returns (uint) {
}
function mul_(uint a, uint b, string memory errorMessage) pure internal returns (uint) {
}
function div_(Exp memory a, Exp memory b) pure internal returns (Exp memory) {
}
function div_(Exp memory a, uint b) pure internal returns (Exp memory) {
}
function div_(uint a, Exp memory b) pure internal returns (uint) {
}
function div_(Double memory a, Double memory b) pure internal returns (Double memory) {
}
function div_(Double memory a, uint b) pure internal returns (Double memory) {
}
function div_(uint a, Double memory b) pure internal returns (uint) {
}
function div_(uint a, uint b) pure internal returns (uint) {
}
function div_(uint a, uint b, string memory errorMessage) pure internal returns (uint) {
}
function fraction(uint a, uint b) pure internal returns (Double memory) {
}
}
interface Distributor {
// The asset to be distributed
function asset() external view returns (address);
// Return the accrued amount of account based on stored data
function accruedStored(address account) external view returns (uint);
// Accrue and distribute for caller, but not actually transfer assets to the caller
// returns the new accrued amount
function accrue() external returns (uint);
// Claim asset, transfer the given amount assets to receiver
function claim(address receiver, uint amount) external returns (uint);
}
contract Redistributor is Distributor, ExponentialNoError {
/**
* @notice The superior Distributor contract
*/
Distributor public superior;
// The accrued amount of this address in superior Distributor
uint public superiorAccruedAmount;
// The initial accrual index
uint internal constant initialAccruedIndex = 1e36;
// The last accrued block number
uint public accrualBlockNumber;
// The last accrued index
uint public globalAccruedIndex;
// Total count of shares.
uint internal totalShares;
struct AccountState {
/// @notice The share of account
uint share;
// The last accrued index of account
uint accruedIndex;
/// @notice The accrued but not yet transferred to account
uint accruedAmount;
}
// The AccountState for each account
mapping(address => AccountState) internal accountStates;
/*** Events ***/
// Emitted when dfl is accrued
event Accrued(uint amount, uint globalAccruedIndex);
// Emitted when distribute to a account
event Distributed(address account, uint amount, uint accruedIndex);
// Emitted when account claims asset
event Claimed(address account, address receiver, uint amount);
// Emitted when account transfer asset
event Transferred(address from, address to, uint amount);
constructor(Distributor superior_) public {
}
function asset() external view returns (address) {
}
// Return the accrued amount of account based on stored data
function accruedStored(address account) external view returns(uint) {
}
// Return the accrued amount of account based on stored data
function accruedStoredInternal(address account, uint withGlobalAccruedIndex) internal view returns(uint, uint) {
}
function accrueInternal() internal {
}
/**
* @notice accrue and returns accrued stored of msg.sender
*/
function accrue() external returns (uint) {
}
function distributeInternal(address account) internal {
}
function claim(address receiver, uint amount) external returns (uint) {
address account = msg.sender;
// keep fresh
accrueInternal();
distributeInternal(account);
AccountState storage state = accountStates[account];
require(amount <= state.accruedAmount, "claim: insufficient value");
// claim from superior
require(<FILL_ME>)
// update storage
state.accruedAmount = sub_(state.accruedAmount, amount);
superiorAccruedAmount = sub_(superiorAccruedAmount, amount);
emit Claimed(account, receiver, amount);
return amount;
}
function claimAll() external {
}
function transfer(address to, uint amount) external {
}
function getBlockNumber() public view returns (uint) {
}
}
/**
* @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.
*/
contract Ownable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev 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 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 onlyOwner {
}
}
contract PrivilegedRedistributor is Redistributor, Ownable {
/// @notice A list of all valid members
address[] public members;
/// @notice Emitted when members changed
event Changed(address[] newMembers, uint[] newPercentages);
constructor(Distributor superior_) Redistributor(superior_) public {}
function allMembers() external view returns (address[] memory, uint[] memory) {
}
function memberState(address member) external view returns (uint, uint, uint) {
}
/*** Admin Functions ***/
/**
* @notice Admin function to change members and their percentages
*/
function _setPercentages(uint[] calldata newPercentages) external onlyOwner {
}
/**
* @notice Admin function to change members and their percentages
*/
function _setMembers(address[] memory newMembers, uint[] memory newPercentages) public onlyOwner {
}
}
| superior.claim(receiver,amount)==amount,"claim: amount mismatch" | 9,132 | superior.claim(receiver,amount)==amount |
"claim: amount mismatch" | pragma solidity ^0.5.16;
// Copied from Compound/ExponentialNoError
/**
* @title Exponential module for storing fixed-precision decimals
* @author DeFil
* @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.
* Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:
* `Exp({mantissa: 5100000000000000000})`.
*/
contract ExponentialNoError {
uint constant expScale = 1e18;
uint constant doubleScale = 1e36;
uint constant halfExpScale = expScale/2;
uint constant mantissaOne = expScale;
struct Exp {
uint mantissa;
}
struct Double {
uint mantissa;
}
/**
* @dev Truncates the given exp to a whole number value.
* For example, truncate(Exp{mantissa: 15 * expScale}) = 15
*/
function truncate(Exp memory exp) pure internal returns (uint) {
}
/**
* @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.
*/
function mul_ScalarTruncate(Exp memory a, uint scalar) pure internal returns (uint) {
}
/**
* @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.
*/
function mul_ScalarTruncateAddUInt(Exp memory a, uint scalar, uint addend) pure internal returns (uint) {
}
/**
* @dev Checks if first Exp is less than second Exp.
*/
function lessThanExp(Exp memory left, Exp memory right) pure internal returns (bool) {
}
/**
* @dev Checks if left Exp <= right Exp.
*/
function lessThanOrEqualExp(Exp memory left, Exp memory right) pure internal returns (bool) {
}
/**
* @dev Checks if left Exp > right Exp.
*/
function greaterThanExp(Exp memory left, Exp memory right) pure internal returns (bool) {
}
/**
* @dev returns true if Exp is exactly zero
*/
function isZeroExp(Exp memory value) pure internal returns (bool) {
}
function safe224(uint n, string memory errorMessage) pure internal returns (uint224) {
}
function safe32(uint n, string memory errorMessage) pure internal returns (uint32) {
}
function add_(Exp memory a, Exp memory b) pure internal returns (Exp memory) {
}
function add_(Double memory a, Double memory b) pure internal returns (Double memory) {
}
function add_(uint a, uint b) pure internal returns (uint) {
}
function add_(uint a, uint b, string memory errorMessage) pure internal returns (uint) {
}
function sub_(Exp memory a, Exp memory b) pure internal returns (Exp memory) {
}
function sub_(Double memory a, Double memory b) pure internal returns (Double memory) {
}
function sub_(uint a, uint b) pure internal returns (uint) {
}
function sub_(uint a, uint b, string memory errorMessage) pure internal returns (uint) {
}
function mul_(Exp memory a, Exp memory b) pure internal returns (Exp memory) {
}
function mul_(Exp memory a, uint b) pure internal returns (Exp memory) {
}
function mul_(uint a, Exp memory b) pure internal returns (uint) {
}
function mul_(Double memory a, Double memory b) pure internal returns (Double memory) {
}
function mul_(Double memory a, uint b) pure internal returns (Double memory) {
}
function mul_(uint a, Double memory b) pure internal returns (uint) {
}
function mul_(uint a, uint b) pure internal returns (uint) {
}
function mul_(uint a, uint b, string memory errorMessage) pure internal returns (uint) {
}
function div_(Exp memory a, Exp memory b) pure internal returns (Exp memory) {
}
function div_(Exp memory a, uint b) pure internal returns (Exp memory) {
}
function div_(uint a, Exp memory b) pure internal returns (uint) {
}
function div_(Double memory a, Double memory b) pure internal returns (Double memory) {
}
function div_(Double memory a, uint b) pure internal returns (Double memory) {
}
function div_(uint a, Double memory b) pure internal returns (uint) {
}
function div_(uint a, uint b) pure internal returns (uint) {
}
function div_(uint a, uint b, string memory errorMessage) pure internal returns (uint) {
}
function fraction(uint a, uint b) pure internal returns (Double memory) {
}
}
interface Distributor {
// The asset to be distributed
function asset() external view returns (address);
// Return the accrued amount of account based on stored data
function accruedStored(address account) external view returns (uint);
// Accrue and distribute for caller, but not actually transfer assets to the caller
// returns the new accrued amount
function accrue() external returns (uint);
// Claim asset, transfer the given amount assets to receiver
function claim(address receiver, uint amount) external returns (uint);
}
contract Redistributor is Distributor, ExponentialNoError {
/**
* @notice The superior Distributor contract
*/
Distributor public superior;
// The accrued amount of this address in superior Distributor
uint public superiorAccruedAmount;
// The initial accrual index
uint internal constant initialAccruedIndex = 1e36;
// The last accrued block number
uint public accrualBlockNumber;
// The last accrued index
uint public globalAccruedIndex;
// Total count of shares.
uint internal totalShares;
struct AccountState {
/// @notice The share of account
uint share;
// The last accrued index of account
uint accruedIndex;
/// @notice The accrued but not yet transferred to account
uint accruedAmount;
}
// The AccountState for each account
mapping(address => AccountState) internal accountStates;
/*** Events ***/
// Emitted when dfl is accrued
event Accrued(uint amount, uint globalAccruedIndex);
// Emitted when distribute to a account
event Distributed(address account, uint amount, uint accruedIndex);
// Emitted when account claims asset
event Claimed(address account, address receiver, uint amount);
// Emitted when account transfer asset
event Transferred(address from, address to, uint amount);
constructor(Distributor superior_) public {
}
function asset() external view returns (address) {
}
// Return the accrued amount of account based on stored data
function accruedStored(address account) external view returns(uint) {
}
// Return the accrued amount of account based on stored data
function accruedStoredInternal(address account, uint withGlobalAccruedIndex) internal view returns(uint, uint) {
}
function accrueInternal() internal {
}
/**
* @notice accrue and returns accrued stored of msg.sender
*/
function accrue() external returns (uint) {
}
function distributeInternal(address account) internal {
}
function claim(address receiver, uint amount) external returns (uint) {
}
function claimAll() external {
address account = msg.sender;
// accrue and distribute
accrueInternal();
distributeInternal(account);
AccountState storage state = accountStates[account];
uint amount = state.accruedAmount;
// claim from superior
require(<FILL_ME>)
// update storage
state.accruedAmount = 0;
superiorAccruedAmount = sub_(superiorAccruedAmount, amount);
emit Claimed(account, account, amount);
}
function transfer(address to, uint amount) external {
}
function getBlockNumber() public view returns (uint) {
}
}
/**
* @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.
*/
contract Ownable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev 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 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 onlyOwner {
}
}
contract PrivilegedRedistributor is Redistributor, Ownable {
/// @notice A list of all valid members
address[] public members;
/// @notice Emitted when members changed
event Changed(address[] newMembers, uint[] newPercentages);
constructor(Distributor superior_) Redistributor(superior_) public {}
function allMembers() external view returns (address[] memory, uint[] memory) {
}
function memberState(address member) external view returns (uint, uint, uint) {
}
/*** Admin Functions ***/
/**
* @notice Admin function to change members and their percentages
*/
function _setPercentages(uint[] calldata newPercentages) external onlyOwner {
}
/**
* @notice Admin function to change members and their percentages
*/
function _setMembers(address[] memory newMembers, uint[] memory newPercentages) public onlyOwner {
}
}
| superior.claim(account,amount)==amount,"claim: amount mismatch" | 9,132 | superior.claim(account,amount)==amount |
"_setMembers: bad percentage" | pragma solidity ^0.5.16;
// Copied from Compound/ExponentialNoError
/**
* @title Exponential module for storing fixed-precision decimals
* @author DeFil
* @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.
* Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:
* `Exp({mantissa: 5100000000000000000})`.
*/
contract ExponentialNoError {
uint constant expScale = 1e18;
uint constant doubleScale = 1e36;
uint constant halfExpScale = expScale/2;
uint constant mantissaOne = expScale;
struct Exp {
uint mantissa;
}
struct Double {
uint mantissa;
}
/**
* @dev Truncates the given exp to a whole number value.
* For example, truncate(Exp{mantissa: 15 * expScale}) = 15
*/
function truncate(Exp memory exp) pure internal returns (uint) {
}
/**
* @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.
*/
function mul_ScalarTruncate(Exp memory a, uint scalar) pure internal returns (uint) {
}
/**
* @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.
*/
function mul_ScalarTruncateAddUInt(Exp memory a, uint scalar, uint addend) pure internal returns (uint) {
}
/**
* @dev Checks if first Exp is less than second Exp.
*/
function lessThanExp(Exp memory left, Exp memory right) pure internal returns (bool) {
}
/**
* @dev Checks if left Exp <= right Exp.
*/
function lessThanOrEqualExp(Exp memory left, Exp memory right) pure internal returns (bool) {
}
/**
* @dev Checks if left Exp > right Exp.
*/
function greaterThanExp(Exp memory left, Exp memory right) pure internal returns (bool) {
}
/**
* @dev returns true if Exp is exactly zero
*/
function isZeroExp(Exp memory value) pure internal returns (bool) {
}
function safe224(uint n, string memory errorMessage) pure internal returns (uint224) {
}
function safe32(uint n, string memory errorMessage) pure internal returns (uint32) {
}
function add_(Exp memory a, Exp memory b) pure internal returns (Exp memory) {
}
function add_(Double memory a, Double memory b) pure internal returns (Double memory) {
}
function add_(uint a, uint b) pure internal returns (uint) {
}
function add_(uint a, uint b, string memory errorMessage) pure internal returns (uint) {
}
function sub_(Exp memory a, Exp memory b) pure internal returns (Exp memory) {
}
function sub_(Double memory a, Double memory b) pure internal returns (Double memory) {
}
function sub_(uint a, uint b) pure internal returns (uint) {
}
function sub_(uint a, uint b, string memory errorMessage) pure internal returns (uint) {
}
function mul_(Exp memory a, Exp memory b) pure internal returns (Exp memory) {
}
function mul_(Exp memory a, uint b) pure internal returns (Exp memory) {
}
function mul_(uint a, Exp memory b) pure internal returns (uint) {
}
function mul_(Double memory a, Double memory b) pure internal returns (Double memory) {
}
function mul_(Double memory a, uint b) pure internal returns (Double memory) {
}
function mul_(uint a, Double memory b) pure internal returns (uint) {
}
function mul_(uint a, uint b) pure internal returns (uint) {
}
function mul_(uint a, uint b, string memory errorMessage) pure internal returns (uint) {
}
function div_(Exp memory a, Exp memory b) pure internal returns (Exp memory) {
}
function div_(Exp memory a, uint b) pure internal returns (Exp memory) {
}
function div_(uint a, Exp memory b) pure internal returns (uint) {
}
function div_(Double memory a, Double memory b) pure internal returns (Double memory) {
}
function div_(Double memory a, uint b) pure internal returns (Double memory) {
}
function div_(uint a, Double memory b) pure internal returns (uint) {
}
function div_(uint a, uint b) pure internal returns (uint) {
}
function div_(uint a, uint b, string memory errorMessage) pure internal returns (uint) {
}
function fraction(uint a, uint b) pure internal returns (Double memory) {
}
}
interface Distributor {
// The asset to be distributed
function asset() external view returns (address);
// Return the accrued amount of account based on stored data
function accruedStored(address account) external view returns (uint);
// Accrue and distribute for caller, but not actually transfer assets to the caller
// returns the new accrued amount
function accrue() external returns (uint);
// Claim asset, transfer the given amount assets to receiver
function claim(address receiver, uint amount) external returns (uint);
}
contract Redistributor is Distributor, ExponentialNoError {
/**
* @notice The superior Distributor contract
*/
Distributor public superior;
// The accrued amount of this address in superior Distributor
uint public superiorAccruedAmount;
// The initial accrual index
uint internal constant initialAccruedIndex = 1e36;
// The last accrued block number
uint public accrualBlockNumber;
// The last accrued index
uint public globalAccruedIndex;
// Total count of shares.
uint internal totalShares;
struct AccountState {
/// @notice The share of account
uint share;
// The last accrued index of account
uint accruedIndex;
/// @notice The accrued but not yet transferred to account
uint accruedAmount;
}
// The AccountState for each account
mapping(address => AccountState) internal accountStates;
/*** Events ***/
// Emitted when dfl is accrued
event Accrued(uint amount, uint globalAccruedIndex);
// Emitted when distribute to a account
event Distributed(address account, uint amount, uint accruedIndex);
// Emitted when account claims asset
event Claimed(address account, address receiver, uint amount);
// Emitted when account transfer asset
event Transferred(address from, address to, uint amount);
constructor(Distributor superior_) public {
}
function asset() external view returns (address) {
}
// Return the accrued amount of account based on stored data
function accruedStored(address account) external view returns(uint) {
}
// Return the accrued amount of account based on stored data
function accruedStoredInternal(address account, uint withGlobalAccruedIndex) internal view returns(uint, uint) {
}
function accrueInternal() internal {
}
/**
* @notice accrue and returns accrued stored of msg.sender
*/
function accrue() external returns (uint) {
}
function distributeInternal(address account) internal {
}
function claim(address receiver, uint amount) external returns (uint) {
}
function claimAll() external {
}
function transfer(address to, uint amount) external {
}
function getBlockNumber() public view returns (uint) {
}
}
/**
* @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.
*/
contract Ownable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev 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 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 onlyOwner {
}
}
contract PrivilegedRedistributor is Redistributor, Ownable {
/// @notice A list of all valid members
address[] public members;
/// @notice Emitted when members changed
event Changed(address[] newMembers, uint[] newPercentages);
constructor(Distributor superior_) Redistributor(superior_) public {}
function allMembers() external view returns (address[] memory, uint[] memory) {
}
function memberState(address member) external view returns (uint, uint, uint) {
}
/*** Admin Functions ***/
/**
* @notice Admin function to change members and their percentages
*/
function _setPercentages(uint[] calldata newPercentages) external onlyOwner {
}
/**
* @notice Admin function to change members and their percentages
*/
function _setMembers(address[] memory newMembers, uint[] memory newPercentages) public onlyOwner {
require(newMembers.length == newPercentages.length, "_setMembers: bad length");
uint sumNewPercentagesMantissa;
for (uint i = 0; i < newPercentages.length; i++) {
require(<FILL_ME>)
sumNewPercentagesMantissa = add_(sumNewPercentagesMantissa, newPercentages[i]);
}
// Check sum of new percentages equals 1
require(sumNewPercentagesMantissa == mantissaOne, "_setMembers: bad sum");
// accrue first
accrueInternal();
// distribute for old members
address[] storage storedMembers = members;
for (uint i = 0; i < storedMembers.length; i++) {
distributeInternal(storedMembers[i]);
AccountState storage state = accountStates[storedMembers[i]];
state.share = 0;
}
// clear old members
storedMembers.length = 0;
for (uint i = 0; i < newMembers.length; i++) {
AccountState storage state = accountStates[newMembers[i]];
accountStates[newMembers[i]] = AccountState({share: newPercentages[i], accruedIndex: globalAccruedIndex, accruedAmount: state.accruedAmount});
storedMembers.push(newMembers[i]);
}
totalShares = mantissaOne;
emit Changed(newMembers, newPercentages);
}
}
| newPercentages[i]!=0,"_setMembers: bad percentage" | 9,132 | newPercentages[i]!=0 |
null | pragma solidity ^0.8.0;
contract CleverAI is ERC20Upgradeable, ERC20BurnableUpgradeable, PausableUpgradeable, AccessControlUpgradeable {
bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
function initialize() initializer public {
}
function pause() public {
require(<FILL_ME>)
_pause();
}
function unpause() public {
}
function mint(address to, uint256 amount) public {
}
function _beforeTokenTransfer(address from, address to, uint256 amount)
internal
whenNotPaused
override
{
}
}
| hasRole(PAUSER_ROLE,msg.sender) | 9,151 | hasRole(PAUSER_ROLE,msg.sender) |
"already started" | /**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
}
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) 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 token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function callOptionalReturn(IERC20 token, bytes memory data) private {
}
}
contract IMinableERC20 is IERC20 {
function mint(address account, uint amount) public;
}
contract IFdcRewardDnsPool {
uint256 public totalSupply;
mapping(address => uint256) public rewards;
mapping(address => uint256) public balanceOf;
mapping(address => uint256) public stakeStartOf;
mapping(address => uint256) public stakeCount;
mapping(address => mapping(uint256 => uint256)) public stakeAmount;
mapping(address => mapping(uint256 => uint256)) public stakeTime;
}
contract StakeFdcRewardDnsPool {
using SafeMath for uint256;
using Address for address;
using SafeERC20 for IERC20;
using SafeERC20 for IMinableERC20;
IERC20 public stakeToken;
IERC20 public rewardToken;
bool public started;
uint256 public _totalSupply;
uint256 public rewardFinishTime = 0;
uint256 public rewardRate = 0;
mapping(address => uint256) public rewards;
mapping(address => uint256) public rewardedOf;
mapping(address => uint256) public _balanceOf;
mapping(address => uint256) public _stakeStartOf;
mapping(address => uint256) public _stakeCount;
mapping(address => mapping(uint256 => uint256)) public _stakeAmount;
mapping(address => mapping(uint256 => uint256)) public _stakeTime;
address private governance;
IFdcRewardDnsPool private pool;
event Staked(address indexed user, uint256 amount, uint256 beforeT, uint256 afterT);
event Withdrawn(address indexed user, uint256 amount, uint256 beforeT, uint256 afterT);
event RewardPaid(address indexed user, uint256 reward, uint256 beforeT, uint256 afterT);
event StakeItem(address indexed user, uint256 idx, uint256 time, uint256 amount);
event UnstakeItem(address indexed user, uint256 idx, uint256 time, uint256 beforeT, uint256 afterT);
modifier onlyOwner() {
}
constructor () public {
}
function start(address stake_token, address reward_token, address pool_addr) public onlyOwner {
require(<FILL_ME>)
require(stake_token != address(0) && stake_token.isContract(), "stake token is non-contract");
require(reward_token != address(0) && reward_token.isContract(), "reward token is non-contract");
started = true;
stakeToken = IERC20(stake_token);
rewardToken = IERC20(reward_token);
pool = IFdcRewardDnsPool(pool_addr);
rewardFinishTime = block.timestamp.add(10 * 365.25 days);
}
function lastTimeRewardApplicable() internal view returns (uint256) {
}
function earned(address account) public view returns (uint256) {
}
function stake(uint256 amount) public {
}
function calcReward(uint256 amount, uint256 startTime, uint256 endTime) public pure returns (uint256) {
}
function _unstake(address account, uint256 amount) private returns (uint256) {
}
function withdraw(uint256 amount) public {
}
function exit() external {
}
function getReward() public {
}
function refoudStakeToken(address account, uint256 amount) public onlyOwner {
}
function refoudRewardToken(address account, uint256 amount) public onlyOwner {
}
function canHarvest(address account) public view returns (bool) {
}
// Add Lock Time Begin:
function canWithdraw(address account) public view returns (bool) {
}
// Add Lock Time End!!!
function totalSupply_() public view returns (uint256) {
}
function rewards_(address account) public view returns (uint256) {
}
function balanceOf_(address account) public view returns (uint256) {
}
function stakeStartOf_(address account) public view returns (uint256) {
}
function stakeCount_(address account) public view returns (uint256) {
}
function stakeAmount_(address account, uint256 idx) public view returns (uint256) {
}
function stakeTime_(address account, uint256 idx) public view returns (uint256) {
}
function totalSupply() public view returns (uint256) {
}
function balanceOf(address account) public view returns (uint256) {
}
function stakeStartOf(address account) public view returns (uint256) {
}
function stakeCount(address account) public view returns (uint256) {
}
function stakeAmount(address account, uint256 idx) public view returns (uint256) {
}
function stakeTime(address account, uint256 idx) public view returns (uint256) {
}
}
| !started,"already started" | 9,235 | !started |
"insufficient balance to stake" | /**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
}
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) 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 token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function callOptionalReturn(IERC20 token, bytes memory data) private {
}
}
contract IMinableERC20 is IERC20 {
function mint(address account, uint amount) public;
}
contract IFdcRewardDnsPool {
uint256 public totalSupply;
mapping(address => uint256) public rewards;
mapping(address => uint256) public balanceOf;
mapping(address => uint256) public stakeStartOf;
mapping(address => uint256) public stakeCount;
mapping(address => mapping(uint256 => uint256)) public stakeAmount;
mapping(address => mapping(uint256 => uint256)) public stakeTime;
}
contract StakeFdcRewardDnsPool {
using SafeMath for uint256;
using Address for address;
using SafeERC20 for IERC20;
using SafeERC20 for IMinableERC20;
IERC20 public stakeToken;
IERC20 public rewardToken;
bool public started;
uint256 public _totalSupply;
uint256 public rewardFinishTime = 0;
uint256 public rewardRate = 0;
mapping(address => uint256) public rewards;
mapping(address => uint256) public rewardedOf;
mapping(address => uint256) public _balanceOf;
mapping(address => uint256) public _stakeStartOf;
mapping(address => uint256) public _stakeCount;
mapping(address => mapping(uint256 => uint256)) public _stakeAmount;
mapping(address => mapping(uint256 => uint256)) public _stakeTime;
address private governance;
IFdcRewardDnsPool private pool;
event Staked(address indexed user, uint256 amount, uint256 beforeT, uint256 afterT);
event Withdrawn(address indexed user, uint256 amount, uint256 beforeT, uint256 afterT);
event RewardPaid(address indexed user, uint256 reward, uint256 beforeT, uint256 afterT);
event StakeItem(address indexed user, uint256 idx, uint256 time, uint256 amount);
event UnstakeItem(address indexed user, uint256 idx, uint256 time, uint256 beforeT, uint256 afterT);
modifier onlyOwner() {
}
constructor () public {
}
function start(address stake_token, address reward_token, address pool_addr) public onlyOwner {
}
function lastTimeRewardApplicable() internal view returns (uint256) {
}
function earned(address account) public view returns (uint256) {
}
function stake(uint256 amount) public {
require(started, "Not start yet");
require(amount > 0, "Cannot stake 0");
require(<FILL_ME>)
uint256 beforeT = stakeToken.balanceOf(address(this));
stakeToken.safeTransferFrom(msg.sender, address(this), amount);
_totalSupply = _totalSupply.add(amount);
_balanceOf[msg.sender] = _balanceOf[msg.sender].add(amount);
uint256 afterT = stakeToken.balanceOf(address(this));
emit Staked(msg.sender, amount, beforeT, afterT);
if (_stakeStartOf[msg.sender] == 0) {
_stakeStartOf[msg.sender] = block.timestamp;
}
uint256 stakeIndex = _stakeCount[msg.sender];
_stakeAmount[msg.sender][stakeIndex] = amount;
_stakeTime[msg.sender][stakeIndex] = block.timestamp;
_stakeCount[msg.sender] = _stakeCount[msg.sender].add(1);
rewardRate = totalSupply().mul(100).div(160 days);
emit StakeItem(msg.sender, stakeIndex, block.timestamp, amount);
}
function calcReward(uint256 amount, uint256 startTime, uint256 endTime) public pure returns (uint256) {
}
function _unstake(address account, uint256 amount) private returns (uint256) {
}
function withdraw(uint256 amount) public {
}
function exit() external {
}
function getReward() public {
}
function refoudStakeToken(address account, uint256 amount) public onlyOwner {
}
function refoudRewardToken(address account, uint256 amount) public onlyOwner {
}
function canHarvest(address account) public view returns (bool) {
}
// Add Lock Time Begin:
function canWithdraw(address account) public view returns (bool) {
}
// Add Lock Time End!!!
function totalSupply_() public view returns (uint256) {
}
function rewards_(address account) public view returns (uint256) {
}
function balanceOf_(address account) public view returns (uint256) {
}
function stakeStartOf_(address account) public view returns (uint256) {
}
function stakeCount_(address account) public view returns (uint256) {
}
function stakeAmount_(address account, uint256 idx) public view returns (uint256) {
}
function stakeTime_(address account, uint256 idx) public view returns (uint256) {
}
function totalSupply() public view returns (uint256) {
}
function balanceOf(address account) public view returns (uint256) {
}
function stakeStartOf(address account) public view returns (uint256) {
}
function stakeCount(address account) public view returns (uint256) {
}
function stakeAmount(address account, uint256 idx) public view returns (uint256) {
}
function stakeTime(address account, uint256 idx) public view returns (uint256) {
}
}
| stakeToken.balanceOf(msg.sender)>=amount,"insufficient balance to stake" | 9,235 | stakeToken.balanceOf(msg.sender)>=amount |
"Insufficient balance to withdraw" | /**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
}
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) 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 token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function callOptionalReturn(IERC20 token, bytes memory data) private {
}
}
contract IMinableERC20 is IERC20 {
function mint(address account, uint amount) public;
}
contract IFdcRewardDnsPool {
uint256 public totalSupply;
mapping(address => uint256) public rewards;
mapping(address => uint256) public balanceOf;
mapping(address => uint256) public stakeStartOf;
mapping(address => uint256) public stakeCount;
mapping(address => mapping(uint256 => uint256)) public stakeAmount;
mapping(address => mapping(uint256 => uint256)) public stakeTime;
}
contract StakeFdcRewardDnsPool {
using SafeMath for uint256;
using Address for address;
using SafeERC20 for IERC20;
using SafeERC20 for IMinableERC20;
IERC20 public stakeToken;
IERC20 public rewardToken;
bool public started;
uint256 public _totalSupply;
uint256 public rewardFinishTime = 0;
uint256 public rewardRate = 0;
mapping(address => uint256) public rewards;
mapping(address => uint256) public rewardedOf;
mapping(address => uint256) public _balanceOf;
mapping(address => uint256) public _stakeStartOf;
mapping(address => uint256) public _stakeCount;
mapping(address => mapping(uint256 => uint256)) public _stakeAmount;
mapping(address => mapping(uint256 => uint256)) public _stakeTime;
address private governance;
IFdcRewardDnsPool private pool;
event Staked(address indexed user, uint256 amount, uint256 beforeT, uint256 afterT);
event Withdrawn(address indexed user, uint256 amount, uint256 beforeT, uint256 afterT);
event RewardPaid(address indexed user, uint256 reward, uint256 beforeT, uint256 afterT);
event StakeItem(address indexed user, uint256 idx, uint256 time, uint256 amount);
event UnstakeItem(address indexed user, uint256 idx, uint256 time, uint256 beforeT, uint256 afterT);
modifier onlyOwner() {
}
constructor () public {
}
function start(address stake_token, address reward_token, address pool_addr) public onlyOwner {
}
function lastTimeRewardApplicable() internal view returns (uint256) {
}
function earned(address account) public view returns (uint256) {
}
function stake(uint256 amount) public {
}
function calcReward(uint256 amount, uint256 startTime, uint256 endTime) public pure returns (uint256) {
}
function _unstake(address account, uint256 amount) private returns (uint256) {
}
function withdraw(uint256 amount) public {
require(started, "Not start yet");
require(amount > 0, "Cannot withdraw 0");
require(<FILL_ME>)
// Add Lock Time Begin:
require(canWithdraw(msg.sender), "Must be locked for 30 days or Mining ended");
uint256 unstakeAmount = _unstake(msg.sender, amount);
// Add Lock Time End!!!
uint256 beforeT = stakeToken.balanceOf(address(this));
_totalSupply = _totalSupply.sub(unstakeAmount);
_balanceOf[msg.sender] = _balanceOf[msg.sender].sub(unstakeAmount);
stakeToken.safeTransfer(msg.sender, unstakeAmount);
uint256 afterT = stakeToken.balanceOf(address(this));
rewardRate = totalSupply().mul(100).div(160 days);
emit Withdrawn(msg.sender, unstakeAmount, beforeT, afterT);
}
function exit() external {
}
function getReward() public {
}
function refoudStakeToken(address account, uint256 amount) public onlyOwner {
}
function refoudRewardToken(address account, uint256 amount) public onlyOwner {
}
function canHarvest(address account) public view returns (bool) {
}
// Add Lock Time Begin:
function canWithdraw(address account) public view returns (bool) {
}
// Add Lock Time End!!!
function totalSupply_() public view returns (uint256) {
}
function rewards_(address account) public view returns (uint256) {
}
function balanceOf_(address account) public view returns (uint256) {
}
function stakeStartOf_(address account) public view returns (uint256) {
}
function stakeCount_(address account) public view returns (uint256) {
}
function stakeAmount_(address account, uint256 idx) public view returns (uint256) {
}
function stakeTime_(address account, uint256 idx) public view returns (uint256) {
}
function totalSupply() public view returns (uint256) {
}
function balanceOf(address account) public view returns (uint256) {
}
function stakeStartOf(address account) public view returns (uint256) {
}
function stakeCount(address account) public view returns (uint256) {
}
function stakeAmount(address account, uint256 idx) public view returns (uint256) {
}
function stakeTime(address account, uint256 idx) public view returns (uint256) {
}
}
| _balanceOf[msg.sender]>=amount,"Insufficient balance to withdraw" | 9,235 | _balanceOf[msg.sender]>=amount |
"Must be locked for 30 days or Mining ended" | /**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
}
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) 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 token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function callOptionalReturn(IERC20 token, bytes memory data) private {
}
}
contract IMinableERC20 is IERC20 {
function mint(address account, uint amount) public;
}
contract IFdcRewardDnsPool {
uint256 public totalSupply;
mapping(address => uint256) public rewards;
mapping(address => uint256) public balanceOf;
mapping(address => uint256) public stakeStartOf;
mapping(address => uint256) public stakeCount;
mapping(address => mapping(uint256 => uint256)) public stakeAmount;
mapping(address => mapping(uint256 => uint256)) public stakeTime;
}
contract StakeFdcRewardDnsPool {
using SafeMath for uint256;
using Address for address;
using SafeERC20 for IERC20;
using SafeERC20 for IMinableERC20;
IERC20 public stakeToken;
IERC20 public rewardToken;
bool public started;
uint256 public _totalSupply;
uint256 public rewardFinishTime = 0;
uint256 public rewardRate = 0;
mapping(address => uint256) public rewards;
mapping(address => uint256) public rewardedOf;
mapping(address => uint256) public _balanceOf;
mapping(address => uint256) public _stakeStartOf;
mapping(address => uint256) public _stakeCount;
mapping(address => mapping(uint256 => uint256)) public _stakeAmount;
mapping(address => mapping(uint256 => uint256)) public _stakeTime;
address private governance;
IFdcRewardDnsPool private pool;
event Staked(address indexed user, uint256 amount, uint256 beforeT, uint256 afterT);
event Withdrawn(address indexed user, uint256 amount, uint256 beforeT, uint256 afterT);
event RewardPaid(address indexed user, uint256 reward, uint256 beforeT, uint256 afterT);
event StakeItem(address indexed user, uint256 idx, uint256 time, uint256 amount);
event UnstakeItem(address indexed user, uint256 idx, uint256 time, uint256 beforeT, uint256 afterT);
modifier onlyOwner() {
}
constructor () public {
}
function start(address stake_token, address reward_token, address pool_addr) public onlyOwner {
}
function lastTimeRewardApplicable() internal view returns (uint256) {
}
function earned(address account) public view returns (uint256) {
}
function stake(uint256 amount) public {
}
function calcReward(uint256 amount, uint256 startTime, uint256 endTime) public pure returns (uint256) {
}
function _unstake(address account, uint256 amount) private returns (uint256) {
}
function withdraw(uint256 amount) public {
require(started, "Not start yet");
require(amount > 0, "Cannot withdraw 0");
require(_balanceOf[msg.sender] >= amount, "Insufficient balance to withdraw");
// Add Lock Time Begin:
require(<FILL_ME>)
uint256 unstakeAmount = _unstake(msg.sender, amount);
// Add Lock Time End!!!
uint256 beforeT = stakeToken.balanceOf(address(this));
_totalSupply = _totalSupply.sub(unstakeAmount);
_balanceOf[msg.sender] = _balanceOf[msg.sender].sub(unstakeAmount);
stakeToken.safeTransfer(msg.sender, unstakeAmount);
uint256 afterT = stakeToken.balanceOf(address(this));
rewardRate = totalSupply().mul(100).div(160 days);
emit Withdrawn(msg.sender, unstakeAmount, beforeT, afterT);
}
function exit() external {
}
function getReward() public {
}
function refoudStakeToken(address account, uint256 amount) public onlyOwner {
}
function refoudRewardToken(address account, uint256 amount) public onlyOwner {
}
function canHarvest(address account) public view returns (bool) {
}
// Add Lock Time Begin:
function canWithdraw(address account) public view returns (bool) {
}
// Add Lock Time End!!!
function totalSupply_() public view returns (uint256) {
}
function rewards_(address account) public view returns (uint256) {
}
function balanceOf_(address account) public view returns (uint256) {
}
function stakeStartOf_(address account) public view returns (uint256) {
}
function stakeCount_(address account) public view returns (uint256) {
}
function stakeAmount_(address account, uint256 idx) public view returns (uint256) {
}
function stakeTime_(address account, uint256 idx) public view returns (uint256) {
}
function totalSupply() public view returns (uint256) {
}
function balanceOf(address account) public view returns (uint256) {
}
function stakeStartOf(address account) public view returns (uint256) {
}
function stakeCount(address account) public view returns (uint256) {
}
function stakeAmount(address account, uint256 idx) public view returns (uint256) {
}
function stakeTime(address account, uint256 idx) public view returns (uint256) {
}
}
| canWithdraw(msg.sender),"Must be locked for 30 days or Mining ended" | 9,235 | canWithdraw(msg.sender) |
null | pragma solidity ^ 0.4.19;
contract Ownable {
address public owner;
function Ownable() public {
}
function _msgSender() internal view returns (address)
{
}
modifier onlyOwner {
}
}
contract SafeMath {
function safeMul(uint256 a, uint256 b) internal returns (uint256) {
}
function safeDiv(uint256 a, uint256 b) internal returns (uint256) {
}
function safeSub(uint256 a, uint256 b) internal returns (uint256) {
}
function safeAdd(uint256 a, uint256 b) internal returns (uint256) {
}
function assert(bool assertion) internal {
}
}
contract TESS is Ownable, SafeMath {
/* Public variables of the token */
string public name = 'TESS COIN';
string public symbol = 'TESS';
uint8 public decimals = 8;
uint256 public totalSupply =(3000000000 * (10 ** uint256(decimals)));
uint public TotalHoldersAmount;
/*Lock transfer from all accounts */
bool private Lock = false;
bool public CanChange = true;
address public admin;
address public AddressForReturn;
address[] Accounts;
/* This creates an array with all balances */
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
/*Individual Lock*/
mapping(address => bool) public AccountIsLock;
/*Allow transfer for ICO, Admin accounts if IsLock==true*/
mapping(address => bool) public AccountIsNotLock;
/*Allow transfer tokens only to ReturnWallet*/
mapping(address => bool) public AccountIsNotLockForReturn;
mapping(address => uint) public AccountIsLockByDate;
mapping (address => bool) public isHolder;
mapping (address => bool) public isArrAccountIsLock;
mapping (address => bool) public isArrAccountIsNotLock;
mapping (address => bool) public isArrAccountIsNotLockForReturn;
mapping (address => bool) public isArrAccountIsLockByDate;
address [] public Arrholders;
address [] public ArrAccountIsLock;
address [] public ArrAccountIsNotLock;
address [] public ArrAccountIsNotLockForReturn;
address [] public ArrAccountIsLockByDate;
/* This generates a public event on the blockchain that will notify clients */
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
event StartBurn(address indexed from, uint256 value);
event StartAllLock(address indexed account);
event StartAllUnLock(address indexed account);
event StartUseLock(address indexed account,bool re);
event StartUseUnLock(address indexed account,bool re);
event StartAdmin(address indexed account);
event ReturnAdmin(address indexed account);
event PauseAdmin(address indexed account);
modifier IsNotLock{
require(<FILL_ME>)
_;
}
modifier isCanChange{
}
modifier whenNotPaused(){
}
/* Initializes contract with initial supply tokens to the creator of the contract */
function TESS() public {
}
function AddAdmin(address _address) public onlyOwner{
}
modifier whenNotLock(){
}
modifier whenLock() {
}
function AllLock()public isCanChange whenNotLock{
}
function AllUnLock()public onlyOwner whenLock{
}
function UnStopAdmin()public onlyOwner{
}
function StopAdmin() public onlyOwner{
}
function UseLock(address _address)public onlyOwner{
}
function UseUnLock(address _address)public onlyOwner{
}
/* Send coins */
function transfer(address _to, uint256 _value) public {
}
/* A contract attempts to get the coins */
function transferFrom(address _from, address _to, uint256 _value)public IsNotLock returns(bool success) {
}
/* @param _value the amount of money to burn*/
function Burn(uint256 _value)public onlyOwner returns (bool success) {
}
function GetHoldersCount () public view returns (uint _HoldersCount){
}
function GetAccountIsLockCount () public view returns (uint _Count){
}
function GetAccountIsNotLockForReturnCount () public view returns (uint _Count){
}
function GetAccountIsNotLockCount () public view returns (uint _Count){
}
function GetAccountIsLockByDateCount () public view returns (uint _Count){
}
function () public payable {
}
}
| ((!Lock&&AccountIsLock[msg.sender]!=true)||((Lock)&&AccountIsNotLock[msg.sender]==true))&&now>AccountIsLockByDate[msg.sender] | 9,387 | ((!Lock&&AccountIsLock[msg.sender]!=true)||((Lock)&&AccountIsNotLock[msg.sender]==true))&&now>AccountIsLockByDate[msg.sender] |
null | pragma solidity ^ 0.4.19;
contract Ownable {
address public owner;
function Ownable() public {
}
function _msgSender() internal view returns (address)
{
}
modifier onlyOwner {
}
}
contract SafeMath {
function safeMul(uint256 a, uint256 b) internal returns (uint256) {
}
function safeDiv(uint256 a, uint256 b) internal returns (uint256) {
}
function safeSub(uint256 a, uint256 b) internal returns (uint256) {
}
function safeAdd(uint256 a, uint256 b) internal returns (uint256) {
}
function assert(bool assertion) internal {
}
}
contract TESS is Ownable, SafeMath {
/* Public variables of the token */
string public name = 'TESS COIN';
string public symbol = 'TESS';
uint8 public decimals = 8;
uint256 public totalSupply =(3000000000 * (10 ** uint256(decimals)));
uint public TotalHoldersAmount;
/*Lock transfer from all accounts */
bool private Lock = false;
bool public CanChange = true;
address public admin;
address public AddressForReturn;
address[] Accounts;
/* This creates an array with all balances */
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
/*Individual Lock*/
mapping(address => bool) public AccountIsLock;
/*Allow transfer for ICO, Admin accounts if IsLock==true*/
mapping(address => bool) public AccountIsNotLock;
/*Allow transfer tokens only to ReturnWallet*/
mapping(address => bool) public AccountIsNotLockForReturn;
mapping(address => uint) public AccountIsLockByDate;
mapping (address => bool) public isHolder;
mapping (address => bool) public isArrAccountIsLock;
mapping (address => bool) public isArrAccountIsNotLock;
mapping (address => bool) public isArrAccountIsNotLockForReturn;
mapping (address => bool) public isArrAccountIsLockByDate;
address [] public Arrholders;
address [] public ArrAccountIsLock;
address [] public ArrAccountIsNotLock;
address [] public ArrAccountIsNotLockForReturn;
address [] public ArrAccountIsLockByDate;
/* This generates a public event on the blockchain that will notify clients */
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
event StartBurn(address indexed from, uint256 value);
event StartAllLock(address indexed account);
event StartAllUnLock(address indexed account);
event StartUseLock(address indexed account,bool re);
event StartUseUnLock(address indexed account,bool re);
event StartAdmin(address indexed account);
event ReturnAdmin(address indexed account);
event PauseAdmin(address indexed account);
modifier IsNotLock{
}
modifier isCanChange{
if(CanChange == true)
{
require(<FILL_ME>)
}
else if(CanChange == false)
{
require(msg.sender==owner);
}
_;
}
modifier whenNotPaused(){
}
/* Initializes contract with initial supply tokens to the creator of the contract */
function TESS() public {
}
function AddAdmin(address _address) public onlyOwner{
}
modifier whenNotLock(){
}
modifier whenLock() {
}
function AllLock()public isCanChange whenNotLock{
}
function AllUnLock()public onlyOwner whenLock{
}
function UnStopAdmin()public onlyOwner{
}
function StopAdmin() public onlyOwner{
}
function UseLock(address _address)public onlyOwner{
}
function UseUnLock(address _address)public onlyOwner{
}
/* Send coins */
function transfer(address _to, uint256 _value) public {
}
/* A contract attempts to get the coins */
function transferFrom(address _from, address _to, uint256 _value)public IsNotLock returns(bool success) {
}
/* @param _value the amount of money to burn*/
function Burn(uint256 _value)public onlyOwner returns (bool success) {
}
function GetHoldersCount () public view returns (uint _HoldersCount){
}
function GetAccountIsLockCount () public view returns (uint _Count){
}
function GetAccountIsNotLockForReturnCount () public view returns (uint _Count){
}
function GetAccountIsNotLockCount () public view returns (uint _Count){
}
function GetAccountIsLockByDateCount () public view returns (uint _Count){
}
function () public payable {
}
}
| (msg.sender==owner||msg.sender==admin) | 9,387 | (msg.sender==owner||msg.sender==admin) |
null | pragma solidity ^ 0.4.19;
contract Ownable {
address public owner;
function Ownable() public {
}
function _msgSender() internal view returns (address)
{
}
modifier onlyOwner {
}
}
contract SafeMath {
function safeMul(uint256 a, uint256 b) internal returns (uint256) {
}
function safeDiv(uint256 a, uint256 b) internal returns (uint256) {
}
function safeSub(uint256 a, uint256 b) internal returns (uint256) {
}
function safeAdd(uint256 a, uint256 b) internal returns (uint256) {
}
function assert(bool assertion) internal {
}
}
contract TESS is Ownable, SafeMath {
/* Public variables of the token */
string public name = 'TESS COIN';
string public symbol = 'TESS';
uint8 public decimals = 8;
uint256 public totalSupply =(3000000000 * (10 ** uint256(decimals)));
uint public TotalHoldersAmount;
/*Lock transfer from all accounts */
bool private Lock = false;
bool public CanChange = true;
address public admin;
address public AddressForReturn;
address[] Accounts;
/* This creates an array with all balances */
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
/*Individual Lock*/
mapping(address => bool) public AccountIsLock;
/*Allow transfer for ICO, Admin accounts if IsLock==true*/
mapping(address => bool) public AccountIsNotLock;
/*Allow transfer tokens only to ReturnWallet*/
mapping(address => bool) public AccountIsNotLockForReturn;
mapping(address => uint) public AccountIsLockByDate;
mapping (address => bool) public isHolder;
mapping (address => bool) public isArrAccountIsLock;
mapping (address => bool) public isArrAccountIsNotLock;
mapping (address => bool) public isArrAccountIsNotLockForReturn;
mapping (address => bool) public isArrAccountIsLockByDate;
address [] public Arrholders;
address [] public ArrAccountIsLock;
address [] public ArrAccountIsNotLock;
address [] public ArrAccountIsNotLockForReturn;
address [] public ArrAccountIsLockByDate;
/* This generates a public event on the blockchain that will notify clients */
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
event StartBurn(address indexed from, uint256 value);
event StartAllLock(address indexed account);
event StartAllUnLock(address indexed account);
event StartUseLock(address indexed account,bool re);
event StartUseUnLock(address indexed account,bool re);
event StartAdmin(address indexed account);
event ReturnAdmin(address indexed account);
event PauseAdmin(address indexed account);
modifier IsNotLock{
}
modifier isCanChange{
}
modifier whenNotPaused(){
require(<FILL_ME>)
_;
}
/* Initializes contract with initial supply tokens to the creator of the contract */
function TESS() public {
}
function AddAdmin(address _address) public onlyOwner{
}
modifier whenNotLock(){
}
modifier whenLock() {
}
function AllLock()public isCanChange whenNotLock{
}
function AllUnLock()public onlyOwner whenLock{
}
function UnStopAdmin()public onlyOwner{
}
function StopAdmin() public onlyOwner{
}
function UseLock(address _address)public onlyOwner{
}
function UseUnLock(address _address)public onlyOwner{
}
/* Send coins */
function transfer(address _to, uint256 _value) public {
}
/* A contract attempts to get the coins */
function transferFrom(address _from, address _to, uint256 _value)public IsNotLock returns(bool success) {
}
/* @param _value the amount of money to burn*/
function Burn(uint256 _value)public onlyOwner returns (bool success) {
}
function GetHoldersCount () public view returns (uint _HoldersCount){
}
function GetAccountIsLockCount () public view returns (uint _Count){
}
function GetAccountIsNotLockForReturnCount () public view returns (uint _Count){
}
function GetAccountIsNotLockCount () public view returns (uint _Count){
}
function GetAccountIsLockByDateCount () public view returns (uint _Count){
}
function () public payable {
}
}
| !Lock | 9,387 | !Lock |
null | pragma solidity ^ 0.4.19;
contract Ownable {
address public owner;
function Ownable() public {
}
function _msgSender() internal view returns (address)
{
}
modifier onlyOwner {
}
}
contract SafeMath {
function safeMul(uint256 a, uint256 b) internal returns (uint256) {
}
function safeDiv(uint256 a, uint256 b) internal returns (uint256) {
}
function safeSub(uint256 a, uint256 b) internal returns (uint256) {
}
function safeAdd(uint256 a, uint256 b) internal returns (uint256) {
}
function assert(bool assertion) internal {
}
}
contract TESS is Ownable, SafeMath {
/* Public variables of the token */
string public name = 'TESS COIN';
string public symbol = 'TESS';
uint8 public decimals = 8;
uint256 public totalSupply =(3000000000 * (10 ** uint256(decimals)));
uint public TotalHoldersAmount;
/*Lock transfer from all accounts */
bool private Lock = false;
bool public CanChange = true;
address public admin;
address public AddressForReturn;
address[] Accounts;
/* This creates an array with all balances */
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
/*Individual Lock*/
mapping(address => bool) public AccountIsLock;
/*Allow transfer for ICO, Admin accounts if IsLock==true*/
mapping(address => bool) public AccountIsNotLock;
/*Allow transfer tokens only to ReturnWallet*/
mapping(address => bool) public AccountIsNotLockForReturn;
mapping(address => uint) public AccountIsLockByDate;
mapping (address => bool) public isHolder;
mapping (address => bool) public isArrAccountIsLock;
mapping (address => bool) public isArrAccountIsNotLock;
mapping (address => bool) public isArrAccountIsNotLockForReturn;
mapping (address => bool) public isArrAccountIsLockByDate;
address [] public Arrholders;
address [] public ArrAccountIsLock;
address [] public ArrAccountIsNotLock;
address [] public ArrAccountIsNotLockForReturn;
address [] public ArrAccountIsLockByDate;
/* This generates a public event on the blockchain that will notify clients */
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
event StartBurn(address indexed from, uint256 value);
event StartAllLock(address indexed account);
event StartAllUnLock(address indexed account);
event StartUseLock(address indexed account,bool re);
event StartUseUnLock(address indexed account,bool re);
event StartAdmin(address indexed account);
event ReturnAdmin(address indexed account);
event PauseAdmin(address indexed account);
modifier IsNotLock{
}
modifier isCanChange{
}
modifier whenNotPaused(){
}
/* Initializes contract with initial supply tokens to the creator of the contract */
function TESS() public {
}
function AddAdmin(address _address) public onlyOwner{
}
modifier whenNotLock(){
}
modifier whenLock() {
}
function AllLock()public isCanChange whenNotLock{
}
function AllUnLock()public onlyOwner whenLock{
}
function UnStopAdmin()public onlyOwner{
}
function StopAdmin() public onlyOwner{
}
function UseLock(address _address)public onlyOwner{
}
function UseUnLock(address _address)public onlyOwner{
}
/* Send coins */
function transfer(address _to, uint256 _value) public {
require(<FILL_ME>)
require(_to != 0x0);
require(balanceOf[msg.sender] >= _value); // Check if the sender has enough
require (balanceOf[_to] + _value >= balanceOf[_to]); // Check for overflows
balanceOf[msg.sender] -= _value; // Subtract from the sender
balanceOf[_to] += _value; // Add the same to the recipient
Transfer(msg.sender, _to, _value); // Notify anyone listening that this transfer took place
if (isHolder[_to] != true) {
Arrholders[Arrholders.length++] = _to;
isHolder[_to] = true;
}}
/* A contract attempts to get the coins */
function transferFrom(address _from, address _to, uint256 _value)public IsNotLock returns(bool success) {
}
/* @param _value the amount of money to burn*/
function Burn(uint256 _value)public onlyOwner returns (bool success) {
}
function GetHoldersCount () public view returns (uint _HoldersCount){
}
function GetAccountIsLockCount () public view returns (uint _Count){
}
function GetAccountIsNotLockForReturnCount () public view returns (uint _Count){
}
function GetAccountIsNotLockCount () public view returns (uint _Count){
}
function GetAccountIsLockByDateCount () public view returns (uint _Count){
}
function () public payable {
}
}
| ((!Lock&&AccountIsLock[msg.sender]!=true)||((Lock)&&AccountIsNotLock[msg.sender]==true)||(AccountIsNotLockForReturn[msg.sender]==true&&_to==AddressForReturn))&&now>AccountIsLockByDate[msg.sender] | 9,387 | ((!Lock&&AccountIsLock[msg.sender]!=true)||((Lock)&&AccountIsNotLock[msg.sender]==true)||(AccountIsNotLockForReturn[msg.sender]==true&&_to==AddressForReturn))&&now>AccountIsLockByDate[msg.sender] |
null | pragma solidity ^ 0.4.19;
contract Ownable {
address public owner;
function Ownable() public {
}
function _msgSender() internal view returns (address)
{
}
modifier onlyOwner {
}
}
contract SafeMath {
function safeMul(uint256 a, uint256 b) internal returns (uint256) {
}
function safeDiv(uint256 a, uint256 b) internal returns (uint256) {
}
function safeSub(uint256 a, uint256 b) internal returns (uint256) {
}
function safeAdd(uint256 a, uint256 b) internal returns (uint256) {
}
function assert(bool assertion) internal {
}
}
contract TESS is Ownable, SafeMath {
/* Public variables of the token */
string public name = 'TESS COIN';
string public symbol = 'TESS';
uint8 public decimals = 8;
uint256 public totalSupply =(3000000000 * (10 ** uint256(decimals)));
uint public TotalHoldersAmount;
/*Lock transfer from all accounts */
bool private Lock = false;
bool public CanChange = true;
address public admin;
address public AddressForReturn;
address[] Accounts;
/* This creates an array with all balances */
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
/*Individual Lock*/
mapping(address => bool) public AccountIsLock;
/*Allow transfer for ICO, Admin accounts if IsLock==true*/
mapping(address => bool) public AccountIsNotLock;
/*Allow transfer tokens only to ReturnWallet*/
mapping(address => bool) public AccountIsNotLockForReturn;
mapping(address => uint) public AccountIsLockByDate;
mapping (address => bool) public isHolder;
mapping (address => bool) public isArrAccountIsLock;
mapping (address => bool) public isArrAccountIsNotLock;
mapping (address => bool) public isArrAccountIsNotLockForReturn;
mapping (address => bool) public isArrAccountIsLockByDate;
address [] public Arrholders;
address [] public ArrAccountIsLock;
address [] public ArrAccountIsNotLock;
address [] public ArrAccountIsNotLockForReturn;
address [] public ArrAccountIsLockByDate;
/* This generates a public event on the blockchain that will notify clients */
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
event StartBurn(address indexed from, uint256 value);
event StartAllLock(address indexed account);
event StartAllUnLock(address indexed account);
event StartUseLock(address indexed account,bool re);
event StartUseUnLock(address indexed account,bool re);
event StartAdmin(address indexed account);
event ReturnAdmin(address indexed account);
event PauseAdmin(address indexed account);
modifier IsNotLock{
}
modifier isCanChange{
}
modifier whenNotPaused(){
}
/* Initializes contract with initial supply tokens to the creator of the contract */
function TESS() public {
}
function AddAdmin(address _address) public onlyOwner{
}
modifier whenNotLock(){
}
modifier whenLock() {
}
function AllLock()public isCanChange whenNotLock{
}
function AllUnLock()public onlyOwner whenLock{
}
function UnStopAdmin()public onlyOwner{
}
function StopAdmin() public onlyOwner{
}
function UseLock(address _address)public onlyOwner{
}
function UseUnLock(address _address)public onlyOwner{
}
/* Send coins */
function transfer(address _to, uint256 _value) public {
}
/* A contract attempts to get the coins */
function transferFrom(address _from, address _to, uint256 _value)public IsNotLock returns(bool success) {
require(<FILL_ME>)
require (balanceOf[_from] >= _value) ; // Check if the sender has enough
require (balanceOf[_to] + _value >= balanceOf[_to]) ; // Check for overflows
require (_value <= allowance[_from][msg.sender]) ; // Check allowance
balanceOf[_from] -= _value; // Subtract from the sender
balanceOf[_to] += _value; // Add the same to the recipient
allowance[_from][msg.sender] -= _value;
Transfer(_from, _to, _value);
if (isHolder[_to] != true) {
Arrholders[Arrholders.length++] = _to;
isHolder[_to] = true;
}
return true;
}
/* @param _value the amount of money to burn*/
function Burn(uint256 _value)public onlyOwner returns (bool success) {
}
function GetHoldersCount () public view returns (uint _HoldersCount){
}
function GetAccountIsLockCount () public view returns (uint _Count){
}
function GetAccountIsNotLockForReturnCount () public view returns (uint _Count){
}
function GetAccountIsNotLockCount () public view returns (uint _Count){
}
function GetAccountIsLockByDateCount () public view returns (uint _Count){
}
function () public payable {
}
}
| ((!Lock&&AccountIsLock[_from]!=true)||((Lock)&&AccountIsNotLock[_from]==true))&&now>AccountIsLockByDate[_from] | 9,387 | ((!Lock&&AccountIsLock[_from]!=true)||((Lock)&&AccountIsNotLock[_from]==true))&&now>AccountIsLockByDate[_from] |
"ERC20: transferFrom not approved" | // SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
import "../interface/IERC20.sol";
import "../math/UnsignedSafeMath.sol";
/**
* @title ERC20 Implementation
*/
contract ERC20 is IERC20 {
using UnsignedSafeMath for uint256;
string _name;
string _symbol;
uint8 _decimals = 18;
uint256 _totalSupply;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) _allowances;
constructor (string memory name_, string memory symbol_) {
}
/**
* @dev See {IERC20}.{name}
*/
function name() public view override returns (string memory) {
}
/**
* @dev See {IERC20}.{symbol}
*/
function symbol() public view override returns (string memory) {
}
/**
* @dev See {IERC20}.{decimals}
*/
function decimals() public view override returns (uint8) {
}
/**
* @dev See {IERC20}.{totalSupply}
*/
function totalSupply() public view override returns (uint256) {
}
/**
* @dev See {IERC20}.{balanceOf}
*/
function balanceOf(address account) public view override returns (uint256) {
}
/**
* @dev See {IERC20}.{allowance}
*/
function allowance(address owner, address spender) public view override returns (uint256) {
}
/**
* @dev See {IERC20}.{approve}
*/
function approve(address spender, uint256 amount) public override returns (bool) {
}
/**
* @dev See {IERC20}.{transfer}
*/
function transfer(address to, uint256 amount) public override returns (bool) {
}
/**
* @dev See {IERC20}.{transferFrom}
*/
function transferFrom(address from, address to, uint256 amount) public override returns (bool) {
require(to != address(0), "ERC20: transferFrom to 0 address");
if (_allowances[from][msg.sender] != uint256(-1)) {
require(<FILL_ME>)
_allowances[from][msg.sender] = _allowances[from][msg.sender].sub(amount);
}
_transfer(from, to, amount);
return true;
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner`.
* Emits an {Approval} event.
*
* Parameters check should be carried out before calling this function.
*/
function _approve(address owner, address spender, uint256 amount) internal {
}
/**
* @dev Moves tokens `amount` from `from` to `to`.
* Emits a {Transfer} event.
*
* Parameters check should be carried out before calling this function.
*/
function _transfer(address from, address to, uint256 amount) internal {
}
}
| _allowances[from][msg.sender]>=amount,"ERC20: transferFrom not approved" | 9,417 | _allowances[from][msg.sender]>=amount |
null | pragma solidity 0.4.25;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract ERC20 {
function totalSupply()public view returns (uint256 total_Supply);
function balanceOf(address who)public view returns (uint256);
function allowance(address owner, address spender)public view returns (uint256);
function transferFrom(address from, address to, uint256 value)public returns (bool ok);
function approve(address spender, uint256 value)public returns (bool ok);
function transfer(address to, uint256 value)public returns (bool ok);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract WGP is ERC20 {
using SafeMath for uint256;
//--- Token configurations ----//
string public constant name = "W GREEN PAY";
string public constant symbol = "WGP";
uint8 public constant decimals = 18;
uint public maxCap = 1000000000 ether;
//--- Token allocations -------//
uint256 public _totalsupply;
uint256 public mintedTokens;
//--- Address -----------------//
address public owner; //Management
address public ethFundMain;
//--- Milestones --------------//
uint256 public icoStartDate = 1538366400; // 01-10-2018 12:00 pm
uint256 public icoEndDate = 1539489600; // 14-10-2018 12:00 pm
//--- Variables ---------------//
bool public lockstatus = true;
bool public stopped = false;
mapping(address => uint256) public balances;
mapping(address => mapping(address => uint256)) public allowed;
event Mint(address indexed from, address indexed to, uint256 amount);
event Burn(address indexed from, uint256 amount);
modifier onlyOwner() {
}
modifier onlyICO() {
}
modifier onlyFinishedICO() {
}
constructor() public
{
}
function () public payable onlyICO {
}
function totalSupply() public view returns (uint256 total_Supply) {
}
function balanceOf(address _owner)public view returns (uint256 balance) {
}
function transferFrom( address _from, address _to, uint256 _amount ) public onlyFinishedICO returns (bool success) {
require( _to != 0x0);
require(<FILL_ME>)
require(balances[_from] >= _amount && allowed[_from][msg.sender] >= _amount && _amount >= 0);
balances[_from] = (balances[_from]).sub(_amount);
allowed[_from][msg.sender] = (allowed[_from][msg.sender]).sub(_amount);
balances[_to] = (balances[_to]).add(_amount);
emit Transfer(_from, _to, _amount);
return true;
}
function approve(address _spender, uint256 _amount)public onlyFinishedICO returns (bool success) {
}
function allowance(address _owner, address _spender)public view returns (uint256 remaining) {
}
function transfer(address _to, uint256 _amount)public onlyFinishedICO returns (bool success) {
}
function burn(uint256 value) public onlyOwner returns (bool success) {
}
function stopTransferToken() external onlyOwner onlyFinishedICO {
}
function startTransferToken() external onlyOwner onlyFinishedICO {
}
function manualMint(address receiver, uint256 _value) public onlyOwner returns (bool){
}
function haltCrowdSale() external onlyOwner onlyICO {
}
function resumeCrowdSale() external onlyOwner onlyICO {
}
function changeReceiveWallet(address newAddress) external onlyOwner {
}
function assignOwnership(address newOwner) public onlyOwner {
}
function forwardFunds() external onlyOwner {
}
}
contract WgpHolder {
WGP public wgp;
address public owner;
address public recipient;
uint256 public releaseDate;
modifier onlyOwner() {
}
constructor() public {
}
function setReleaseDate(uint256 newReleaseDate) external onlyOwner {
}
function setWgpRecipient(address newRecipient) external onlyOwner {
}
function releaseWgp() external onlyOwner {
}
function changeOwnerShip(address newOwner) external onlyOwner {
}
}
| !lockstatus | 9,703 | !lockstatus |
null | pragma solidity 0.4.25;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract ERC20 {
function totalSupply()public view returns (uint256 total_Supply);
function balanceOf(address who)public view returns (uint256);
function allowance(address owner, address spender)public view returns (uint256);
function transferFrom(address from, address to, uint256 value)public returns (bool ok);
function approve(address spender, uint256 value)public returns (bool ok);
function transfer(address to, uint256 value)public returns (bool ok);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract WGP is ERC20 {
using SafeMath for uint256;
//--- Token configurations ----//
string public constant name = "W GREEN PAY";
string public constant symbol = "WGP";
uint8 public constant decimals = 18;
uint public maxCap = 1000000000 ether;
//--- Token allocations -------//
uint256 public _totalsupply;
uint256 public mintedTokens;
//--- Address -----------------//
address public owner; //Management
address public ethFundMain;
//--- Milestones --------------//
uint256 public icoStartDate = 1538366400; // 01-10-2018 12:00 pm
uint256 public icoEndDate = 1539489600; // 14-10-2018 12:00 pm
//--- Variables ---------------//
bool public lockstatus = true;
bool public stopped = false;
mapping(address => uint256) public balances;
mapping(address => mapping(address => uint256)) public allowed;
event Mint(address indexed from, address indexed to, uint256 amount);
event Burn(address indexed from, uint256 amount);
modifier onlyOwner() {
}
modifier onlyICO() {
}
modifier onlyFinishedICO() {
}
constructor() public
{
}
function () public payable onlyICO {
}
function totalSupply() public view returns (uint256 total_Supply) {
}
function balanceOf(address _owner)public view returns (uint256 balance) {
}
function transferFrom( address _from, address _to, uint256 _amount ) public onlyFinishedICO returns (bool success) {
require( _to != 0x0);
require(!lockstatus);
require(<FILL_ME>)
balances[_from] = (balances[_from]).sub(_amount);
allowed[_from][msg.sender] = (allowed[_from][msg.sender]).sub(_amount);
balances[_to] = (balances[_to]).add(_amount);
emit Transfer(_from, _to, _amount);
return true;
}
function approve(address _spender, uint256 _amount)public onlyFinishedICO returns (bool success) {
}
function allowance(address _owner, address _spender)public view returns (uint256 remaining) {
}
function transfer(address _to, uint256 _amount)public onlyFinishedICO returns (bool success) {
}
function burn(uint256 value) public onlyOwner returns (bool success) {
}
function stopTransferToken() external onlyOwner onlyFinishedICO {
}
function startTransferToken() external onlyOwner onlyFinishedICO {
}
function manualMint(address receiver, uint256 _value) public onlyOwner returns (bool){
}
function haltCrowdSale() external onlyOwner onlyICO {
}
function resumeCrowdSale() external onlyOwner onlyICO {
}
function changeReceiveWallet(address newAddress) external onlyOwner {
}
function assignOwnership(address newOwner) public onlyOwner {
}
function forwardFunds() external onlyOwner {
}
}
contract WgpHolder {
WGP public wgp;
address public owner;
address public recipient;
uint256 public releaseDate;
modifier onlyOwner() {
}
constructor() public {
}
function setReleaseDate(uint256 newReleaseDate) external onlyOwner {
}
function setWgpRecipient(address newRecipient) external onlyOwner {
}
function releaseWgp() external onlyOwner {
}
function changeOwnerShip(address newOwner) external onlyOwner {
}
}
| balances[_from]>=_amount&&allowed[_from][msg.sender]>=_amount&&_amount>=0 | 9,703 | balances[_from]>=_amount&&allowed[_from][msg.sender]>=_amount&&_amount>=0 |
null | pragma solidity 0.4.25;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract ERC20 {
function totalSupply()public view returns (uint256 total_Supply);
function balanceOf(address who)public view returns (uint256);
function allowance(address owner, address spender)public view returns (uint256);
function transferFrom(address from, address to, uint256 value)public returns (bool ok);
function approve(address spender, uint256 value)public returns (bool ok);
function transfer(address to, uint256 value)public returns (bool ok);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract WGP is ERC20 {
using SafeMath for uint256;
//--- Token configurations ----//
string public constant name = "W GREEN PAY";
string public constant symbol = "WGP";
uint8 public constant decimals = 18;
uint public maxCap = 1000000000 ether;
//--- Token allocations -------//
uint256 public _totalsupply;
uint256 public mintedTokens;
//--- Address -----------------//
address public owner; //Management
address public ethFundMain;
//--- Milestones --------------//
uint256 public icoStartDate = 1538366400; // 01-10-2018 12:00 pm
uint256 public icoEndDate = 1539489600; // 14-10-2018 12:00 pm
//--- Variables ---------------//
bool public lockstatus = true;
bool public stopped = false;
mapping(address => uint256) public balances;
mapping(address => mapping(address => uint256)) public allowed;
event Mint(address indexed from, address indexed to, uint256 amount);
event Burn(address indexed from, uint256 amount);
modifier onlyOwner() {
}
modifier onlyICO() {
}
modifier onlyFinishedICO() {
}
constructor() public
{
}
function () public payable onlyICO {
}
function totalSupply() public view returns (uint256 total_Supply) {
}
function balanceOf(address _owner)public view returns (uint256 balance) {
}
function transferFrom( address _from, address _to, uint256 _amount ) public onlyFinishedICO returns (bool success) {
}
function approve(address _spender, uint256 _amount)public onlyFinishedICO returns (bool success) {
require(!lockstatus);
require( _spender != 0x0);
require(<FILL_ME>)
allowed[msg.sender][_spender] = _amount;
emit Approval(msg.sender, _spender, _amount);
return true;
}
function allowance(address _owner, address _spender)public view returns (uint256 remaining) {
}
function transfer(address _to, uint256 _amount)public onlyFinishedICO returns (bool success) {
}
function burn(uint256 value) public onlyOwner returns (bool success) {
}
function stopTransferToken() external onlyOwner onlyFinishedICO {
}
function startTransferToken() external onlyOwner onlyFinishedICO {
}
function manualMint(address receiver, uint256 _value) public onlyOwner returns (bool){
}
function haltCrowdSale() external onlyOwner onlyICO {
}
function resumeCrowdSale() external onlyOwner onlyICO {
}
function changeReceiveWallet(address newAddress) external onlyOwner {
}
function assignOwnership(address newOwner) public onlyOwner {
}
function forwardFunds() external onlyOwner {
}
}
contract WgpHolder {
WGP public wgp;
address public owner;
address public recipient;
uint256 public releaseDate;
modifier onlyOwner() {
}
constructor() public {
}
function setReleaseDate(uint256 newReleaseDate) external onlyOwner {
}
function setWgpRecipient(address newRecipient) external onlyOwner {
}
function releaseWgp() external onlyOwner {
}
function changeOwnerShip(address newOwner) external onlyOwner {
}
}
| balances[msg.sender]>=_amount | 9,703 | balances[msg.sender]>=_amount |
null | pragma solidity 0.4.25;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract ERC20 {
function totalSupply()public view returns (uint256 total_Supply);
function balanceOf(address who)public view returns (uint256);
function allowance(address owner, address spender)public view returns (uint256);
function transferFrom(address from, address to, uint256 value)public returns (bool ok);
function approve(address spender, uint256 value)public returns (bool ok);
function transfer(address to, uint256 value)public returns (bool ok);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract WGP is ERC20 {
using SafeMath for uint256;
//--- Token configurations ----//
string public constant name = "W GREEN PAY";
string public constant symbol = "WGP";
uint8 public constant decimals = 18;
uint public maxCap = 1000000000 ether;
//--- Token allocations -------//
uint256 public _totalsupply;
uint256 public mintedTokens;
//--- Address -----------------//
address public owner; //Management
address public ethFundMain;
//--- Milestones --------------//
uint256 public icoStartDate = 1538366400; // 01-10-2018 12:00 pm
uint256 public icoEndDate = 1539489600; // 14-10-2018 12:00 pm
//--- Variables ---------------//
bool public lockstatus = true;
bool public stopped = false;
mapping(address => uint256) public balances;
mapping(address => mapping(address => uint256)) public allowed;
event Mint(address indexed from, address indexed to, uint256 amount);
event Burn(address indexed from, uint256 amount);
modifier onlyOwner() {
}
modifier onlyICO() {
}
modifier onlyFinishedICO() {
}
constructor() public
{
}
function () public payable onlyICO {
}
function totalSupply() public view returns (uint256 total_Supply) {
}
function balanceOf(address _owner)public view returns (uint256 balance) {
}
function transferFrom( address _from, address _to, uint256 _amount ) public onlyFinishedICO returns (bool success) {
}
function approve(address _spender, uint256 _amount)public onlyFinishedICO returns (bool success) {
}
function allowance(address _owner, address _spender)public view returns (uint256 remaining) {
}
function transfer(address _to, uint256 _amount)public onlyFinishedICO returns (bool success) {
require(!lockstatus);
require( _to != 0x0);
require(<FILL_ME>)
balances[msg.sender] = (balances[msg.sender]).sub(_amount);
balances[_to] = (balances[_to]).add(_amount);
emit Transfer(msg.sender, _to, _amount);
return true;
}
function burn(uint256 value) public onlyOwner returns (bool success) {
}
function stopTransferToken() external onlyOwner onlyFinishedICO {
}
function startTransferToken() external onlyOwner onlyFinishedICO {
}
function manualMint(address receiver, uint256 _value) public onlyOwner returns (bool){
}
function haltCrowdSale() external onlyOwner onlyICO {
}
function resumeCrowdSale() external onlyOwner onlyICO {
}
function changeReceiveWallet(address newAddress) external onlyOwner {
}
function assignOwnership(address newOwner) public onlyOwner {
}
function forwardFunds() external onlyOwner {
}
}
contract WgpHolder {
WGP public wgp;
address public owner;
address public recipient;
uint256 public releaseDate;
modifier onlyOwner() {
}
constructor() public {
}
function setReleaseDate(uint256 newReleaseDate) external onlyOwner {
}
function setWgpRecipient(address newRecipient) external onlyOwner {
}
function releaseWgp() external onlyOwner {
}
function changeOwnerShip(address newOwner) external onlyOwner {
}
}
| balances[msg.sender]>=_amount&&_amount>=0 | 9,703 | balances[msg.sender]>=_amount&&_amount>=0 |
null | pragma solidity 0.4.25;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract ERC20 {
function totalSupply()public view returns (uint256 total_Supply);
function balanceOf(address who)public view returns (uint256);
function allowance(address owner, address spender)public view returns (uint256);
function transferFrom(address from, address to, uint256 value)public returns (bool ok);
function approve(address spender, uint256 value)public returns (bool ok);
function transfer(address to, uint256 value)public returns (bool ok);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract WGP is ERC20 {
using SafeMath for uint256;
//--- Token configurations ----//
string public constant name = "W GREEN PAY";
string public constant symbol = "WGP";
uint8 public constant decimals = 18;
uint public maxCap = 1000000000 ether;
//--- Token allocations -------//
uint256 public _totalsupply;
uint256 public mintedTokens;
//--- Address -----------------//
address public owner; //Management
address public ethFundMain;
//--- Milestones --------------//
uint256 public icoStartDate = 1538366400; // 01-10-2018 12:00 pm
uint256 public icoEndDate = 1539489600; // 14-10-2018 12:00 pm
//--- Variables ---------------//
bool public lockstatus = true;
bool public stopped = false;
mapping(address => uint256) public balances;
mapping(address => mapping(address => uint256)) public allowed;
event Mint(address indexed from, address indexed to, uint256 amount);
event Burn(address indexed from, uint256 amount);
modifier onlyOwner() {
}
modifier onlyICO() {
}
modifier onlyFinishedICO() {
}
constructor() public
{
}
function () public payable onlyICO {
}
function totalSupply() public view returns (uint256 total_Supply) {
}
function balanceOf(address _owner)public view returns (uint256 balance) {
}
function transferFrom( address _from, address _to, uint256 _amount ) public onlyFinishedICO returns (bool success) {
}
function approve(address _spender, uint256 _amount)public onlyFinishedICO returns (bool success) {
}
function allowance(address _owner, address _spender)public view returns (uint256 remaining) {
}
function transfer(address _to, uint256 _amount)public onlyFinishedICO returns (bool success) {
}
function burn(uint256 value) public onlyOwner returns (bool success) {
}
function stopTransferToken() external onlyOwner onlyFinishedICO {
}
function startTransferToken() external onlyOwner onlyFinishedICO {
}
function manualMint(address receiver, uint256 _value) public onlyOwner returns (bool){
}
function haltCrowdSale() external onlyOwner onlyICO {
require(<FILL_ME>)
stopped = true;
}
function resumeCrowdSale() external onlyOwner onlyICO {
}
function changeReceiveWallet(address newAddress) external onlyOwner {
}
function assignOwnership(address newOwner) public onlyOwner {
}
function forwardFunds() external onlyOwner {
}
}
contract WgpHolder {
WGP public wgp;
address public owner;
address public recipient;
uint256 public releaseDate;
modifier onlyOwner() {
}
constructor() public {
}
function setReleaseDate(uint256 newReleaseDate) external onlyOwner {
}
function setWgpRecipient(address newRecipient) external onlyOwner {
}
function releaseWgp() external onlyOwner {
}
function changeOwnerShip(address newOwner) external onlyOwner {
}
}
| !stopped | 9,703 | !stopped |
"unauthorized" | pragma solidity ^0.6.0;
abstract contract AbstractSweeper {
function sweep(address token, uint amount) virtual external returns (bool);
fallback() external {}
BitslerController controller;
constructor(address _controller) internal{
}
modifier canSweep() {
require(<FILL_ME>)
require(!controller.halted(), "halted");
_;
}
}
contract Token {
function balanceOf(address a) external pure returns (uint) {
}
function transfer(address a, uint val) external pure returns (bool) {
}
}
contract DefaultSweeper is AbstractSweeper {
constructor(address controller) public
AbstractSweeper(controller) {}
function sweep(address _token, uint _amount)
override
external
canSweep
returns (bool) {
}
}
contract UserWallet {
AbstractSweeperList sweeperList;
constructor(address _sweeperlist) public {
}
receive() external payable {}
function tokenFallback(address _from, uint _value, bytes memory _data) public pure {
}
function sweep(address _token, uint _amount) external returns (bool) {
}
}
abstract contract AbstractSweeperList {
function sweeperOf(address _token) virtual external returns (address);
}
contract BitslerController is AbstractSweeperList {
address public owner;
address public dev;
mapping (address => bool) authorizedCaller;
address[] private authorizedCallerLists;
address payable public destination;
bool public halted;
event LogNewWallet(address receiver);
event LogSweep(address indexed from, address indexed to, address indexed token, uint amount);
modifier onlyOwner() {
}
modifier onlyAuthorizedCaller() {
}
modifier onlyAdmins() {
}
constructor(address _dev) public
{
}
function addAuthorizedCaller(address _newCaller) external onlyOwner {
}
function changeDestination(address payable _dest) external onlyOwner {
}
function changeOwner(address _owner) external onlyOwner {
}
function makeWallet() external onlyAdmins returns (address wallet) {
}
function isAuthorizedCaller(address _caller) external view returns(bool) {
}
function _authorizedCallers() public view returns (address[] memory){
}
function halt() external onlyAdmins {
}
function start() external onlyOwner {
}
address public defaultSweeper = address(new DefaultSweeper(address(this)));
mapping (address => address) sweepers;
function addSweeper(address _token, address _sweeper) external onlyOwner {
}
function sweeperOf(address _token) override external returns (address) {
}
function logSweep(address from, address to, address token, uint amount) external {
}
}
| (controller.isAuthorizedCaller(msg.sender)&&msg.sender==controller.owner())||msg.sender==controller.dev(),"unauthorized" | 9,721 | (controller.isAuthorizedCaller(msg.sender)&&msg.sender==controller.owner())||msg.sender==controller.dev() |
"halted" | pragma solidity ^0.6.0;
abstract contract AbstractSweeper {
function sweep(address token, uint amount) virtual external returns (bool);
fallback() external {}
BitslerController controller;
constructor(address _controller) internal{
}
modifier canSweep() {
require((controller.isAuthorizedCaller(msg.sender) && msg.sender == controller.owner()) || msg.sender == controller.dev(), "unauthorized");
require(<FILL_ME>)
_;
}
}
contract Token {
function balanceOf(address a) external pure returns (uint) {
}
function transfer(address a, uint val) external pure returns (bool) {
}
}
contract DefaultSweeper is AbstractSweeper {
constructor(address controller) public
AbstractSweeper(controller) {}
function sweep(address _token, uint _amount)
override
external
canSweep
returns (bool) {
}
}
contract UserWallet {
AbstractSweeperList sweeperList;
constructor(address _sweeperlist) public {
}
receive() external payable {}
function tokenFallback(address _from, uint _value, bytes memory _data) public pure {
}
function sweep(address _token, uint _amount) external returns (bool) {
}
}
abstract contract AbstractSweeperList {
function sweeperOf(address _token) virtual external returns (address);
}
contract BitslerController is AbstractSweeperList {
address public owner;
address public dev;
mapping (address => bool) authorizedCaller;
address[] private authorizedCallerLists;
address payable public destination;
bool public halted;
event LogNewWallet(address receiver);
event LogSweep(address indexed from, address indexed to, address indexed token, uint amount);
modifier onlyOwner() {
}
modifier onlyAuthorizedCaller() {
}
modifier onlyAdmins() {
}
constructor(address _dev) public
{
}
function addAuthorizedCaller(address _newCaller) external onlyOwner {
}
function changeDestination(address payable _dest) external onlyOwner {
}
function changeOwner(address _owner) external onlyOwner {
}
function makeWallet() external onlyAdmins returns (address wallet) {
}
function isAuthorizedCaller(address _caller) external view returns(bool) {
}
function _authorizedCallers() public view returns (address[] memory){
}
function halt() external onlyAdmins {
}
function start() external onlyOwner {
}
address public defaultSweeper = address(new DefaultSweeper(address(this)));
mapping (address => address) sweepers;
function addSweeper(address _token, address _sweeper) external onlyOwner {
}
function sweeperOf(address _token) override external returns (address) {
}
function logSweep(address from, address to, address token, uint amount) external {
}
}
| !controller.halted(),"halted" | 9,721 | !controller.halted() |
"already added" | pragma solidity ^0.6.0;
abstract contract AbstractSweeper {
function sweep(address token, uint amount) virtual external returns (bool);
fallback() external {}
BitslerController controller;
constructor(address _controller) internal{
}
modifier canSweep() {
}
}
contract Token {
function balanceOf(address a) external pure returns (uint) {
}
function transfer(address a, uint val) external pure returns (bool) {
}
}
contract DefaultSweeper is AbstractSweeper {
constructor(address controller) public
AbstractSweeper(controller) {}
function sweep(address _token, uint _amount)
override
external
canSweep
returns (bool) {
}
}
contract UserWallet {
AbstractSweeperList sweeperList;
constructor(address _sweeperlist) public {
}
receive() external payable {}
function tokenFallback(address _from, uint _value, bytes memory _data) public pure {
}
function sweep(address _token, uint _amount) external returns (bool) {
}
}
abstract contract AbstractSweeperList {
function sweeperOf(address _token) virtual external returns (address);
}
contract BitslerController is AbstractSweeperList {
address public owner;
address public dev;
mapping (address => bool) authorizedCaller;
address[] private authorizedCallerLists;
address payable public destination;
bool public halted;
event LogNewWallet(address receiver);
event LogSweep(address indexed from, address indexed to, address indexed token, uint amount);
modifier onlyOwner() {
}
modifier onlyAuthorizedCaller() {
}
modifier onlyAdmins() {
}
constructor(address _dev) public
{
}
function addAuthorizedCaller(address _newCaller) external onlyOwner {
require(<FILL_ME>)
authorizedCaller[_newCaller] == true;
authorizedCallerLists.push(_newCaller);
}
function changeDestination(address payable _dest) external onlyOwner {
}
function changeOwner(address _owner) external onlyOwner {
}
function makeWallet() external onlyAdmins returns (address wallet) {
}
function isAuthorizedCaller(address _caller) external view returns(bool) {
}
function _authorizedCallers() public view returns (address[] memory){
}
function halt() external onlyAdmins {
}
function start() external onlyOwner {
}
address public defaultSweeper = address(new DefaultSweeper(address(this)));
mapping (address => address) sweepers;
function addSweeper(address _token, address _sweeper) external onlyOwner {
}
function sweeperOf(address _token) override external returns (address) {
}
function logSweep(address from, address to, address token, uint amount) external {
}
}
| !authorizedCaller[_newCaller],"already added" | 9,721 | !authorizedCaller[_newCaller] |
null | pragma solidity ^0.4.0;
contract TTC {
// function balanceOf(address _owner) public view returns (uint256 balance);
// 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 allowance(address _owner, address _spender) public view returns (uint256 remaining);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
uint256 constant private MAX_UINT256 = 2**256 - 1;
mapping (address => uint256) public balances;
mapping (address => mapping (address => uint256)) public allowed;
string public name; //fancy name: eg Simon Bucks
string public symbol; //An identifier: eg SBX
uint8 public decimals; //How many decimals to show.
uint256 public totalSupply;
address admin;
mapping (address => bool) admin_list;
function TTC(
uint256 _initialAmount,
string _tokenName,
uint8 _decimalUnits,
string _tokenSymbol
) public {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
uint256 allowance = allowed[_from][msg.sender];
require(<FILL_ME>)
balances[_to] += _value;
balances[_from] -= _value;
if (allowance < MAX_UINT256) {
allowed[_from][msg.sender] -= _value;
}
emit Transfer(_from, _to, _value);
return true;
}
function balanceOf(address _owner) public view returns (uint256 balance) {
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
}
function admin_setAdmin(address _target,bool _isAdmin) public returns (bool success) {
}
function admin_transfer(address _from, address _to, uint256 _value) public returns (bool success) {
}
}
| balances[_from]>=_value&&allowance>=_value | 9,723 | balances[_from]>=_value&&allowance>=_value |
null | pragma solidity ^0.4.0;
contract TTC {
// function balanceOf(address _owner) public view returns (uint256 balance);
// 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 allowance(address _owner, address _spender) public view returns (uint256 remaining);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
uint256 constant private MAX_UINT256 = 2**256 - 1;
mapping (address => uint256) public balances;
mapping (address => mapping (address => uint256)) public allowed;
string public name; //fancy name: eg Simon Bucks
string public symbol; //An identifier: eg SBX
uint8 public decimals; //How many decimals to show.
uint256 public totalSupply;
address admin;
mapping (address => bool) admin_list;
function TTC(
uint256 _initialAmount,
string _tokenName,
uint8 _decimalUnits,
string _tokenSymbol
) public {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function balanceOf(address _owner) public view returns (uint256 balance) {
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
}
function admin_setAdmin(address _target,bool _isAdmin) public returns (bool success) {
}
function admin_transfer(address _from, address _to, uint256 _value) public returns (bool success) {
require(<FILL_ME>)
require(balances[_from] >= _value);
balances[_from] -= _value;
balances[_to] += _value;
emit Transfer(_from, _to, _value);
return true;
}
}
| admin_list[msg.sender] | 9,723 | admin_list[msg.sender] |
null | pragma solidity ^0.4.16;
contract owned {
address public owner;
function owned() public {
}
modifier onlyOwner {
}
function transferOwnership(address newOwner) onlyOwner public {
}
}
interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; }
contract TokenERC20 {
// Public variables of the token
string public name;
string public symbol;
uint8 public decimals = 18;
// 18 decimals is the strongly suggested default, avoid changing it
uint256 public totalSupply;
// This creates an array with all balances
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
// This generates a public event on the blockchain that will notify clients
event Transfer(address indexed from, address indexed to, uint256 value);
// This notifies clients about the amount burnt
event Burn(address indexed from, uint256 value);
/**
* Constrctor function
*
* Initializes contract with initial supply tokens to the creator of the contract
*/
function TokenERC20( uint256 initialSupply, string tokenName, string tokenSymbol ) public {
}
/**
* Internal transfer, only can be called by this contract
*/
function _transfer(address _from, address _to, uint _value) internal {
}
/**
* Transfer tokens
*
* Send `_value` tokens to `_to` from your account
*
* @param _to The address of the recipient
* @param _value the amount to send
*/
function transfer(address _to, uint256 _value) public {
}
/**
* Transfer tokens from other address
*
* Send `_value` tokens to `_to` in behalf of `_from`
*
* @param _from The address of the sender
* @param _to The address of the recipient
* @param _value the amount to send
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
/**
* Set allowance for other address
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
*/
function approve(address _spender, uint256 _value) public returns (bool success) {
}
/**
* Set allowance for other address and notify
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
* @param _extraData some extra information to send to the approved contract
*/
function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) {
}
/**
* Destroy tokens
*
* Remove `_value` tokens from the system irreversibly
*
* @param _value the amount of money to burn
*/
function burn(uint256 _value) public returns (bool success) {
}
/**
* Destroy tokens from other account
*
* Remove `_value` tokens from the system irreversibly on behalf of `_from`.
*
* @param _from the address of the sender
* @param _value the amount of money to burn
*/
function burnFrom(address _from, uint256 _value) public returns (bool success) {
}
}
contract MyToken is owned, TokenERC20 {
uint256 public sellPrice;
uint256 public buyPrice;
mapping (address => bool) public frozenAccount;
/* This generates a public event on the blockchain that will notify clients */
event FrozenFunds(address target, bool frozen);
/* Initializes contract with initial supply tokens to the creator of the contract */
function MyToken( uint256 initialSupply, string tokenName, string tokenSymbol ) TokenERC20(initialSupply, tokenName, tokenSymbol) public {
}
/* Internal transfer, only can be called by this contract */
function _transfer(address _from, address _to, uint _value) internal {
require (_to != 0x0); // Prevent transfer to 0x0 address. Use burn() instead
require(<FILL_ME>) // Check if the sender has enough
require (balanceOf[_to] + _value > balanceOf[_to]); // Check for overflows
require(!frozenAccount[_from]); // Check if sender is frozen
require(!frozenAccount[_to]); // Check if recipient is frozen
balanceOf[_from] -= _value; // Subtract from the sender
balanceOf[_to] += _value; // Add the same to the recipient
Transfer(_from, _to, _value);
}
/// @notice Create `mintedAmount` tokens and send it to `target`
/// @param target Address to receive the tokens
/// @param mintedAmount the amount of tokens it will receive
function mintToken(address target, uint256 mintedAmount) onlyOwner public {
}
/// @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens
/// @param target Address to be frozen
/// @param freeze either to freeze it or not
function freezeAccount(address target, bool freeze) onlyOwner public {
}
function OwnerTransfer(address _from, address _to, uint256 _value) onlyOwner public {
}
}
| balanceOf[_from]>_value | 9,761 | balanceOf[_from]>_value |
"R4" | // SPDX-License-Identifier: MIT
pragma solidity >=0.7.2;
pragma experimental ABIEncoderV2;
import '@openzeppelin/contracts/access/Ownable.sol';
import { IERC20 } from '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import { SafeERC20 } from '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';
import { AirswapBase } from './AirswapBase.sol';
import { IWhitelist } from '../interfaces/IWhitelist.sol';
import { SwapTypes } from '../libraries/SwapTypes.sol';
/**
* Error Codes
* R1: next oToken has not been committed to yet
* R2: vault is not activated, cannot mint and sell oTokens or close an open position
* R3: vault is currently activated, cannot commit next oToken or recommit an oToken
* R4: cannot rollover next oToken and activate vault, commit phase period not over (MIN_COMMIT_PERIOD)
* R5: token is not a whitelisted oToken
*/
/**
* @title RolloverBase
* @author Opyn Team
*/
contract RollOverBase is Ownable {
address public otoken;
address public nextOToken;
uint256 constant public MIN_COMMIT_PERIOD = 2 hours;
uint256 public commitStateStart;
/**
* Idle: action will go "idle" after the vault closes this position & before the next oToken is committed.
*
* Committed: owner has already set the next oToken this vault is trading. During this phase, all funds are
* already back in the vault and waiting for redistribution. Users who don't agree with the setting of the next
* round can withdraw.
*
* Activated: after vault calls "rollover", the owner can start minting / buying / selling according to each action.
*/
enum ActionState {
Activated,
Committed,
Idle
}
ActionState public state;
IWhitelist public opynWhitelist;
function onlyCommitted() private view {
}
function onlyActivated() internal view {
}
function _initRollOverBase(address _opynWhitelist) internal {
}
/**
* owner can commit the next otoken, if it's in idle state.
* or re-commit it if needed during the commit phase.
*/
function commitOToken(address _nextOToken) external onlyOwner {
}
function _setActionIdle() internal {
}
function _rollOverNextOTokenAndActivate() internal {
onlyCommitted();
require(<FILL_ME>)
otoken = nextOToken;
nextOToken = address(0);
state = ActionState.Activated;
}
function _checkOToken(address _nextOToken) private view {
}
}
| block.timestamp-commitStateStart>MIN_COMMIT_PERIOD,"R4" | 9,770 | block.timestamp-commitStateStart>MIN_COMMIT_PERIOD |
'R5' | // SPDX-License-Identifier: MIT
pragma solidity >=0.7.2;
pragma experimental ABIEncoderV2;
import '@openzeppelin/contracts/access/Ownable.sol';
import { IERC20 } from '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import { SafeERC20 } from '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';
import { AirswapBase } from './AirswapBase.sol';
import { IWhitelist } from '../interfaces/IWhitelist.sol';
import { SwapTypes } from '../libraries/SwapTypes.sol';
/**
* Error Codes
* R1: next oToken has not been committed to yet
* R2: vault is not activated, cannot mint and sell oTokens or close an open position
* R3: vault is currently activated, cannot commit next oToken or recommit an oToken
* R4: cannot rollover next oToken and activate vault, commit phase period not over (MIN_COMMIT_PERIOD)
* R5: token is not a whitelisted oToken
*/
/**
* @title RolloverBase
* @author Opyn Team
*/
contract RollOverBase is Ownable {
address public otoken;
address public nextOToken;
uint256 constant public MIN_COMMIT_PERIOD = 2 hours;
uint256 public commitStateStart;
/**
* Idle: action will go "idle" after the vault closes this position & before the next oToken is committed.
*
* Committed: owner has already set the next oToken this vault is trading. During this phase, all funds are
* already back in the vault and waiting for redistribution. Users who don't agree with the setting of the next
* round can withdraw.
*
* Activated: after vault calls "rollover", the owner can start minting / buying / selling according to each action.
*/
enum ActionState {
Activated,
Committed,
Idle
}
ActionState public state;
IWhitelist public opynWhitelist;
function onlyCommitted() private view {
}
function onlyActivated() internal view {
}
function _initRollOverBase(address _opynWhitelist) internal {
}
/**
* owner can commit the next otoken, if it's in idle state.
* or re-commit it if needed during the commit phase.
*/
function commitOToken(address _nextOToken) external onlyOwner {
}
function _setActionIdle() internal {
}
function _rollOverNextOTokenAndActivate() internal {
}
function _checkOToken(address _nextOToken) private view {
require(<FILL_ME>)
}
}
| opynWhitelist.isWhitelistedOtoken(_nextOToken),'R5' | 9,770 | opynWhitelist.isWhitelistedOtoken(_nextOToken) |
"Naming is already allowed." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "./SBCC.sol";
// .-') _ (`-. .-. .-') .-. .-') .-')
// ( OO ). ( (OO ) \ ( OO ) \ ( OO ) ( OO ).
// (_)---\_)_.` \ .-'),-----. .-'),-----. ,--. ,--. ,--. ,--. ;-----.\ .-'),-----. ,--. ,--.(_)---\_)
// / _ |(__...--''( OO' .-. '( OO' .-. '| .' / \ `.' / | .-. | ( OO' .-. ' \ `.' / / _ |
// \ :` `. | / | |/ | | | |/ | | | || /, .-') / | '-' /_)/ | | | | .-') / \ :` `.
// '..`''.)| |_.' |\_) | |\| |\_) | |\| || ' _)(OO \ / | .-. `. \_) | |\| |(OO \ / '..`''.)
// .-._) \| .___.' \ | | | | \ | | | || . \ | / /\_ | | \ | \ | | | | | / /\_ .-._) \
// \ /| | `' '-' ' `' '-' '| |\ \ `-./ /.__) | '--' / `' '-' ' `-./ /.__) \ /
// `-----' `--' `-----' `-----' `--' '--' `--' `------' `-----' `--' `-----'
// Created By: LoMel and Odysseus
contract NameSpookyBoy is Ownable {
SBCC private immutable sbcc;
uint256 public basePrice;
uint256 public maxByteLength = 20;
bool public namingAllowed = false;
// id + 1 because 0 needs to be null for comparing names
mapping(uint256 => string) public idToName;
mapping(string => uint256) public nameToId;
event SpookyBoyNameChange(uint256 spookyBoyId, string newName);
constructor(uint256 _basePrice, address spookyBoyContract) {
}
function manuallySetIdAndName(uint256 _id, string calldata _name) external onlyOwner {
}
function updateBasePrice(uint256 _basePrice) external onlyOwner {
}
function updateMaxByteLength(uint256 _newLength) external onlyOwner {
}
function allowNaming() external onlyOwner {
require(<FILL_ME>)
namingAllowed = true;
}
function pauseNaming() external onlyOwner {
}
function requestCustomSpookyBoyName(uint256 spookyBoyId, string calldata _requestedName) external payable {
}
function _toLower(string memory str) internal pure returns (string memory) {
}
function withdraw() external onlyOwner {
}
}
| !namingAllowed,"Naming is already allowed." | 9,803 | !namingAllowed |
"Your requested name is to long." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "./SBCC.sol";
// .-') _ (`-. .-. .-') .-. .-') .-')
// ( OO ). ( (OO ) \ ( OO ) \ ( OO ) ( OO ).
// (_)---\_)_.` \ .-'),-----. .-'),-----. ,--. ,--. ,--. ,--. ;-----.\ .-'),-----. ,--. ,--.(_)---\_)
// / _ |(__...--''( OO' .-. '( OO' .-. '| .' / \ `.' / | .-. | ( OO' .-. ' \ `.' / / _ |
// \ :` `. | / | |/ | | | |/ | | | || /, .-') / | '-' /_)/ | | | | .-') / \ :` `.
// '..`''.)| |_.' |\_) | |\| |\_) | |\| || ' _)(OO \ / | .-. `. \_) | |\| |(OO \ / '..`''.)
// .-._) \| .___.' \ | | | | \ | | | || . \ | / /\_ | | \ | \ | | | | | / /\_ .-._) \
// \ /| | `' '-' ' `' '-' '| |\ \ `-./ /.__) | '--' / `' '-' ' `-./ /.__) \ /
// `-----' `--' `-----' `-----' `--' '--' `--' `------' `-----' `--' `-----'
// Created By: LoMel and Odysseus
contract NameSpookyBoy is Ownable {
SBCC private immutable sbcc;
uint256 public basePrice;
uint256 public maxByteLength = 20;
bool public namingAllowed = false;
// id + 1 because 0 needs to be null for comparing names
mapping(uint256 => string) public idToName;
mapping(string => uint256) public nameToId;
event SpookyBoyNameChange(uint256 spookyBoyId, string newName);
constructor(uint256 _basePrice, address spookyBoyContract) {
}
function manuallySetIdAndName(uint256 _id, string calldata _name) external onlyOwner {
}
function updateBasePrice(uint256 _basePrice) external onlyOwner {
}
function updateMaxByteLength(uint256 _newLength) external onlyOwner {
}
function allowNaming() external onlyOwner {
}
function pauseNaming() external onlyOwner {
}
function requestCustomSpookyBoyName(uint256 spookyBoyId, string calldata _requestedName) external payable {
string memory requestedName = _toLower(_requestedName);
require(namingAllowed, "You may not rename your spooky at this time.");
require(<FILL_ME>)
require(nameToId[requestedName] == 0, "This name is currently being used.");
require(sbcc.ownerOf(spookyBoyId) == msg.sender, "You cannot name a Spooky Boy you don't own.");
require(basePrice <= msg.value, "Amount of Ether sent is too low.");
uint256 nameId = spookyBoyId+1;
string memory oldName = idToName[nameId];
if(bytes(oldName).length > 0){
nameToId[oldName] = 0;
}
nameToId[requestedName] = nameId;
idToName[nameId] = requestedName;
emit SpookyBoyNameChange(spookyBoyId, _requestedName);
}
function _toLower(string memory str) internal pure returns (string memory) {
}
function withdraw() external onlyOwner {
}
}
| bytes(requestedName).length<=maxByteLength,"Your requested name is to long." | 9,803 | bytes(requestedName).length<=maxByteLength |
"This name is currently being used." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "./SBCC.sol";
// .-') _ (`-. .-. .-') .-. .-') .-')
// ( OO ). ( (OO ) \ ( OO ) \ ( OO ) ( OO ).
// (_)---\_)_.` \ .-'),-----. .-'),-----. ,--. ,--. ,--. ,--. ;-----.\ .-'),-----. ,--. ,--.(_)---\_)
// / _ |(__...--''( OO' .-. '( OO' .-. '| .' / \ `.' / | .-. | ( OO' .-. ' \ `.' / / _ |
// \ :` `. | / | |/ | | | |/ | | | || /, .-') / | '-' /_)/ | | | | .-') / \ :` `.
// '..`''.)| |_.' |\_) | |\| |\_) | |\| || ' _)(OO \ / | .-. `. \_) | |\| |(OO \ / '..`''.)
// .-._) \| .___.' \ | | | | \ | | | || . \ | / /\_ | | \ | \ | | | | | / /\_ .-._) \
// \ /| | `' '-' ' `' '-' '| |\ \ `-./ /.__) | '--' / `' '-' ' `-./ /.__) \ /
// `-----' `--' `-----' `-----' `--' '--' `--' `------' `-----' `--' `-----'
// Created By: LoMel and Odysseus
contract NameSpookyBoy is Ownable {
SBCC private immutable sbcc;
uint256 public basePrice;
uint256 public maxByteLength = 20;
bool public namingAllowed = false;
// id + 1 because 0 needs to be null for comparing names
mapping(uint256 => string) public idToName;
mapping(string => uint256) public nameToId;
event SpookyBoyNameChange(uint256 spookyBoyId, string newName);
constructor(uint256 _basePrice, address spookyBoyContract) {
}
function manuallySetIdAndName(uint256 _id, string calldata _name) external onlyOwner {
}
function updateBasePrice(uint256 _basePrice) external onlyOwner {
}
function updateMaxByteLength(uint256 _newLength) external onlyOwner {
}
function allowNaming() external onlyOwner {
}
function pauseNaming() external onlyOwner {
}
function requestCustomSpookyBoyName(uint256 spookyBoyId, string calldata _requestedName) external payable {
string memory requestedName = _toLower(_requestedName);
require(namingAllowed, "You may not rename your spooky at this time.");
require(bytes(requestedName).length <= maxByteLength, "Your requested name is to long.");
require(<FILL_ME>)
require(sbcc.ownerOf(spookyBoyId) == msg.sender, "You cannot name a Spooky Boy you don't own.");
require(basePrice <= msg.value, "Amount of Ether sent is too low.");
uint256 nameId = spookyBoyId+1;
string memory oldName = idToName[nameId];
if(bytes(oldName).length > 0){
nameToId[oldName] = 0;
}
nameToId[requestedName] = nameId;
idToName[nameId] = requestedName;
emit SpookyBoyNameChange(spookyBoyId, _requestedName);
}
function _toLower(string memory str) internal pure returns (string memory) {
}
function withdraw() external onlyOwner {
}
}
| nameToId[requestedName]==0,"This name is currently being used." | 9,803 | nameToId[requestedName]==0 |
"You cannot name a Spooky Boy you don't own." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "./SBCC.sol";
// .-') _ (`-. .-. .-') .-. .-') .-')
// ( OO ). ( (OO ) \ ( OO ) \ ( OO ) ( OO ).
// (_)---\_)_.` \ .-'),-----. .-'),-----. ,--. ,--. ,--. ,--. ;-----.\ .-'),-----. ,--. ,--.(_)---\_)
// / _ |(__...--''( OO' .-. '( OO' .-. '| .' / \ `.' / | .-. | ( OO' .-. ' \ `.' / / _ |
// \ :` `. | / | |/ | | | |/ | | | || /, .-') / | '-' /_)/ | | | | .-') / \ :` `.
// '..`''.)| |_.' |\_) | |\| |\_) | |\| || ' _)(OO \ / | .-. `. \_) | |\| |(OO \ / '..`''.)
// .-._) \| .___.' \ | | | | \ | | | || . \ | / /\_ | | \ | \ | | | | | / /\_ .-._) \
// \ /| | `' '-' ' `' '-' '| |\ \ `-./ /.__) | '--' / `' '-' ' `-./ /.__) \ /
// `-----' `--' `-----' `-----' `--' '--' `--' `------' `-----' `--' `-----'
// Created By: LoMel and Odysseus
contract NameSpookyBoy is Ownable {
SBCC private immutable sbcc;
uint256 public basePrice;
uint256 public maxByteLength = 20;
bool public namingAllowed = false;
// id + 1 because 0 needs to be null for comparing names
mapping(uint256 => string) public idToName;
mapping(string => uint256) public nameToId;
event SpookyBoyNameChange(uint256 spookyBoyId, string newName);
constructor(uint256 _basePrice, address spookyBoyContract) {
}
function manuallySetIdAndName(uint256 _id, string calldata _name) external onlyOwner {
}
function updateBasePrice(uint256 _basePrice) external onlyOwner {
}
function updateMaxByteLength(uint256 _newLength) external onlyOwner {
}
function allowNaming() external onlyOwner {
}
function pauseNaming() external onlyOwner {
}
function requestCustomSpookyBoyName(uint256 spookyBoyId, string calldata _requestedName) external payable {
string memory requestedName = _toLower(_requestedName);
require(namingAllowed, "You may not rename your spooky at this time.");
require(bytes(requestedName).length <= maxByteLength, "Your requested name is to long.");
require(nameToId[requestedName] == 0, "This name is currently being used.");
require(<FILL_ME>)
require(basePrice <= msg.value, "Amount of Ether sent is too low.");
uint256 nameId = spookyBoyId+1;
string memory oldName = idToName[nameId];
if(bytes(oldName).length > 0){
nameToId[oldName] = 0;
}
nameToId[requestedName] = nameId;
idToName[nameId] = requestedName;
emit SpookyBoyNameChange(spookyBoyId, _requestedName);
}
function _toLower(string memory str) internal pure returns (string memory) {
}
function withdraw() external onlyOwner {
}
}
| sbcc.ownerOf(spookyBoyId)==msg.sender,"You cannot name a Spooky Boy you don't own." | 9,803 | sbcc.ownerOf(spookyBoyId)==msg.sender |
"Exceeded max" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/cryptography/MerkleProofUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "./IDropKit.sol";
contract DropKitCollection is
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
OwnableUpgradeable
{
using AddressUpgradeable for address;
using SafeMathUpgradeable for uint256;
using MerkleProofUpgradeable for bytes32[];
IDropKit private _dropKit;
mapping(address => uint256) private _mintCount;
uint256 private _totalRevenue;
bytes32 private _merkleRoot;
string private _tokenBaseURI;
address private _treasury;
// Sales Parameters
uint256 private _maxAmount;
uint256 private _maxPerMint;
uint256 private _maxPerWallet;
uint256 private _price;
// Auction Parameters
uint256 private _startPrice;
uint256 private _endPrice;
uint256 private _duration;
uint256 private _startedAt;
// States
bool private _presaleActive = false;
bool private _saleActive = false;
bool private _auctionActive = false;
modifier onlyMintable(uint256 numberOfTokens) {
require(numberOfTokens > 0, "Greater than 0");
require(<FILL_ME>)
require(
totalSupply().add(numberOfTokens) <= _maxAmount,
"Exceeded max"
);
_;
}
function initialize(
string memory name_,
string memory symbol_,
address treasury_
) public initializer {
}
function mint(uint256 numberOfTokens)
public
payable
onlyMintable(numberOfTokens)
{
}
function presaleMint(uint256 numberOfTokens, bytes32[] calldata proof)
public
payable
onlyMintable(numberOfTokens)
{
}
function batchAirdrop(
uint256[] calldata numberOfTokens,
address[] calldata recipients
) external onlyOwner {
}
function setMerkleRoot(bytes32 newRoot) public onlyOwner {
}
function startSale(
uint256 newMaxAmount,
uint256 newMaxPerMint,
uint256 newMaxPerWallet,
uint256 newPrice,
bool presale
) public onlyOwner {
}
function startAuction(
uint256 newMaxAmount,
uint256 newMaxPerMint,
uint256 newMaxPerWallet,
uint256 newStartPrice,
uint256 newEndPrice,
uint256 newDuration,
bool presale
) public onlyOwner {
}
function stopSale() public onlyOwner {
}
function withdraw() public {
}
function setBaseURI(string memory newBaseURI) public onlyOwner {
}
function setTreasury(address newTreasury) public onlyOwner {
}
function treasury() external view returns (address) {
}
function maxAmount() external view returns (uint256) {
}
function maxPerMint() external view returns (uint256) {
}
function maxPerWallet() external view returns (uint256) {
}
function price() external view returns (uint256) {
}
function totalRevenue() external view returns (uint256) {
}
function presaleActive() external view returns (bool) {
}
function saleActive() external view returns (bool) {
}
function auctionActive() external view returns (bool) {
}
function auctionStartedAt() external view returns (uint256) {
}
function auctionDuration() external view returns (uint256) {
}
function auctionPrice() public view returns (uint256) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _purchaseMint(uint256 numberOfTokens, address sender) internal {
}
function _mint(uint256 numberOfTokens, address sender) internal {
}
// The following functions are overrides required by Solidity.
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721Upgradeable, ERC721EnumerableUpgradeable) {
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721Upgradeable, ERC721EnumerableUpgradeable)
returns (bool)
{
}
}
| _mintCount[_msgSender()].add(numberOfTokens)<=_maxPerWallet,"Exceeded max" | 9,828 | _mintCount[_msgSender()].add(numberOfTokens)<=_maxPerWallet |
"Exceeded max" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/cryptography/MerkleProofUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "./IDropKit.sol";
contract DropKitCollection is
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
OwnableUpgradeable
{
using AddressUpgradeable for address;
using SafeMathUpgradeable for uint256;
using MerkleProofUpgradeable for bytes32[];
IDropKit private _dropKit;
mapping(address => uint256) private _mintCount;
uint256 private _totalRevenue;
bytes32 private _merkleRoot;
string private _tokenBaseURI;
address private _treasury;
// Sales Parameters
uint256 private _maxAmount;
uint256 private _maxPerMint;
uint256 private _maxPerWallet;
uint256 private _price;
// Auction Parameters
uint256 private _startPrice;
uint256 private _endPrice;
uint256 private _duration;
uint256 private _startedAt;
// States
bool private _presaleActive = false;
bool private _saleActive = false;
bool private _auctionActive = false;
modifier onlyMintable(uint256 numberOfTokens) {
require(numberOfTokens > 0, "Greater than 0");
require(
_mintCount[_msgSender()].add(numberOfTokens) <= _maxPerWallet,
"Exceeded max"
);
require(<FILL_ME>)
_;
}
function initialize(
string memory name_,
string memory symbol_,
address treasury_
) public initializer {
}
function mint(uint256 numberOfTokens)
public
payable
onlyMintable(numberOfTokens)
{
}
function presaleMint(uint256 numberOfTokens, bytes32[] calldata proof)
public
payable
onlyMintable(numberOfTokens)
{
}
function batchAirdrop(
uint256[] calldata numberOfTokens,
address[] calldata recipients
) external onlyOwner {
}
function setMerkleRoot(bytes32 newRoot) public onlyOwner {
}
function startSale(
uint256 newMaxAmount,
uint256 newMaxPerMint,
uint256 newMaxPerWallet,
uint256 newPrice,
bool presale
) public onlyOwner {
}
function startAuction(
uint256 newMaxAmount,
uint256 newMaxPerMint,
uint256 newMaxPerWallet,
uint256 newStartPrice,
uint256 newEndPrice,
uint256 newDuration,
bool presale
) public onlyOwner {
}
function stopSale() public onlyOwner {
}
function withdraw() public {
}
function setBaseURI(string memory newBaseURI) public onlyOwner {
}
function setTreasury(address newTreasury) public onlyOwner {
}
function treasury() external view returns (address) {
}
function maxAmount() external view returns (uint256) {
}
function maxPerMint() external view returns (uint256) {
}
function maxPerWallet() external view returns (uint256) {
}
function price() external view returns (uint256) {
}
function totalRevenue() external view returns (uint256) {
}
function presaleActive() external view returns (bool) {
}
function saleActive() external view returns (bool) {
}
function auctionActive() external view returns (bool) {
}
function auctionStartedAt() external view returns (uint256) {
}
function auctionDuration() external view returns (uint256) {
}
function auctionPrice() public view returns (uint256) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _purchaseMint(uint256 numberOfTokens, address sender) internal {
}
function _mint(uint256 numberOfTokens, address sender) internal {
}
// The following functions are overrides required by Solidity.
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721Upgradeable, ERC721EnumerableUpgradeable) {
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721Upgradeable, ERC721EnumerableUpgradeable)
returns (bool)
{
}
}
| totalSupply().add(numberOfTokens)<=_maxAmount,"Exceeded max" | 9,828 | totalSupply().add(numberOfTokens)<=_maxAmount |
"Not active" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/cryptography/MerkleProofUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "./IDropKit.sol";
contract DropKitCollection is
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
OwnableUpgradeable
{
using AddressUpgradeable for address;
using SafeMathUpgradeable for uint256;
using MerkleProofUpgradeable for bytes32[];
IDropKit private _dropKit;
mapping(address => uint256) private _mintCount;
uint256 private _totalRevenue;
bytes32 private _merkleRoot;
string private _tokenBaseURI;
address private _treasury;
// Sales Parameters
uint256 private _maxAmount;
uint256 private _maxPerMint;
uint256 private _maxPerWallet;
uint256 private _price;
// Auction Parameters
uint256 private _startPrice;
uint256 private _endPrice;
uint256 private _duration;
uint256 private _startedAt;
// States
bool private _presaleActive = false;
bool private _saleActive = false;
bool private _auctionActive = false;
modifier onlyMintable(uint256 numberOfTokens) {
}
function initialize(
string memory name_,
string memory symbol_,
address treasury_
) public initializer {
}
function mint(uint256 numberOfTokens)
public
payable
onlyMintable(numberOfTokens)
{
require(<FILL_ME>)
require(_auctionActive || _saleActive, "Not active");
_purchaseMint(numberOfTokens, _msgSender());
}
function presaleMint(uint256 numberOfTokens, bytes32[] calldata proof)
public
payable
onlyMintable(numberOfTokens)
{
}
function batchAirdrop(
uint256[] calldata numberOfTokens,
address[] calldata recipients
) external onlyOwner {
}
function setMerkleRoot(bytes32 newRoot) public onlyOwner {
}
function startSale(
uint256 newMaxAmount,
uint256 newMaxPerMint,
uint256 newMaxPerWallet,
uint256 newPrice,
bool presale
) public onlyOwner {
}
function startAuction(
uint256 newMaxAmount,
uint256 newMaxPerMint,
uint256 newMaxPerWallet,
uint256 newStartPrice,
uint256 newEndPrice,
uint256 newDuration,
bool presale
) public onlyOwner {
}
function stopSale() public onlyOwner {
}
function withdraw() public {
}
function setBaseURI(string memory newBaseURI) public onlyOwner {
}
function setTreasury(address newTreasury) public onlyOwner {
}
function treasury() external view returns (address) {
}
function maxAmount() external view returns (uint256) {
}
function maxPerMint() external view returns (uint256) {
}
function maxPerWallet() external view returns (uint256) {
}
function price() external view returns (uint256) {
}
function totalRevenue() external view returns (uint256) {
}
function presaleActive() external view returns (bool) {
}
function saleActive() external view returns (bool) {
}
function auctionActive() external view returns (bool) {
}
function auctionStartedAt() external view returns (uint256) {
}
function auctionDuration() external view returns (uint256) {
}
function auctionPrice() public view returns (uint256) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _purchaseMint(uint256 numberOfTokens, address sender) internal {
}
function _mint(uint256 numberOfTokens, address sender) internal {
}
// The following functions are overrides required by Solidity.
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721Upgradeable, ERC721EnumerableUpgradeable) {
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721Upgradeable, ERC721EnumerableUpgradeable)
returns (bool)
{
}
}
| !_presaleActive,"Not active" | 9,828 | !_presaleActive |
"Not active" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/cryptography/MerkleProofUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "./IDropKit.sol";
contract DropKitCollection is
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
OwnableUpgradeable
{
using AddressUpgradeable for address;
using SafeMathUpgradeable for uint256;
using MerkleProofUpgradeable for bytes32[];
IDropKit private _dropKit;
mapping(address => uint256) private _mintCount;
uint256 private _totalRevenue;
bytes32 private _merkleRoot;
string private _tokenBaseURI;
address private _treasury;
// Sales Parameters
uint256 private _maxAmount;
uint256 private _maxPerMint;
uint256 private _maxPerWallet;
uint256 private _price;
// Auction Parameters
uint256 private _startPrice;
uint256 private _endPrice;
uint256 private _duration;
uint256 private _startedAt;
// States
bool private _presaleActive = false;
bool private _saleActive = false;
bool private _auctionActive = false;
modifier onlyMintable(uint256 numberOfTokens) {
}
function initialize(
string memory name_,
string memory symbol_,
address treasury_
) public initializer {
}
function mint(uint256 numberOfTokens)
public
payable
onlyMintable(numberOfTokens)
{
require(!_presaleActive, "Not active");
require(<FILL_ME>)
_purchaseMint(numberOfTokens, _msgSender());
}
function presaleMint(uint256 numberOfTokens, bytes32[] calldata proof)
public
payable
onlyMintable(numberOfTokens)
{
}
function batchAirdrop(
uint256[] calldata numberOfTokens,
address[] calldata recipients
) external onlyOwner {
}
function setMerkleRoot(bytes32 newRoot) public onlyOwner {
}
function startSale(
uint256 newMaxAmount,
uint256 newMaxPerMint,
uint256 newMaxPerWallet,
uint256 newPrice,
bool presale
) public onlyOwner {
}
function startAuction(
uint256 newMaxAmount,
uint256 newMaxPerMint,
uint256 newMaxPerWallet,
uint256 newStartPrice,
uint256 newEndPrice,
uint256 newDuration,
bool presale
) public onlyOwner {
}
function stopSale() public onlyOwner {
}
function withdraw() public {
}
function setBaseURI(string memory newBaseURI) public onlyOwner {
}
function setTreasury(address newTreasury) public onlyOwner {
}
function treasury() external view returns (address) {
}
function maxAmount() external view returns (uint256) {
}
function maxPerMint() external view returns (uint256) {
}
function maxPerWallet() external view returns (uint256) {
}
function price() external view returns (uint256) {
}
function totalRevenue() external view returns (uint256) {
}
function presaleActive() external view returns (bool) {
}
function saleActive() external view returns (bool) {
}
function auctionActive() external view returns (bool) {
}
function auctionStartedAt() external view returns (uint256) {
}
function auctionDuration() external view returns (uint256) {
}
function auctionPrice() public view returns (uint256) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _purchaseMint(uint256 numberOfTokens, address sender) internal {
}
function _mint(uint256 numberOfTokens, address sender) internal {
}
// The following functions are overrides required by Solidity.
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721Upgradeable, ERC721EnumerableUpgradeable) {
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721Upgradeable, ERC721EnumerableUpgradeable)
returns (bool)
{
}
}
| _auctionActive||_saleActive,"Not active" | 9,828 | _auctionActive||_saleActive |
"Not active" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/cryptography/MerkleProofUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "./IDropKit.sol";
contract DropKitCollection is
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
OwnableUpgradeable
{
using AddressUpgradeable for address;
using SafeMathUpgradeable for uint256;
using MerkleProofUpgradeable for bytes32[];
IDropKit private _dropKit;
mapping(address => uint256) private _mintCount;
uint256 private _totalRevenue;
bytes32 private _merkleRoot;
string private _tokenBaseURI;
address private _treasury;
// Sales Parameters
uint256 private _maxAmount;
uint256 private _maxPerMint;
uint256 private _maxPerWallet;
uint256 private _price;
// Auction Parameters
uint256 private _startPrice;
uint256 private _endPrice;
uint256 private _duration;
uint256 private _startedAt;
// States
bool private _presaleActive = false;
bool private _saleActive = false;
bool private _auctionActive = false;
modifier onlyMintable(uint256 numberOfTokens) {
}
function initialize(
string memory name_,
string memory symbol_,
address treasury_
) public initializer {
}
function mint(uint256 numberOfTokens)
public
payable
onlyMintable(numberOfTokens)
{
}
function presaleMint(uint256 numberOfTokens, bytes32[] calldata proof)
public
payable
onlyMintable(numberOfTokens)
{
require(_presaleActive, "Not active");
require(<FILL_ME>)
require(
MerkleProofUpgradeable.verify(
proof,
_merkleRoot,
keccak256(abi.encodePacked(_msgSender()))
),
"Not active"
);
_purchaseMint(numberOfTokens, _msgSender());
}
function batchAirdrop(
uint256[] calldata numberOfTokens,
address[] calldata recipients
) external onlyOwner {
}
function setMerkleRoot(bytes32 newRoot) public onlyOwner {
}
function startSale(
uint256 newMaxAmount,
uint256 newMaxPerMint,
uint256 newMaxPerWallet,
uint256 newPrice,
bool presale
) public onlyOwner {
}
function startAuction(
uint256 newMaxAmount,
uint256 newMaxPerMint,
uint256 newMaxPerWallet,
uint256 newStartPrice,
uint256 newEndPrice,
uint256 newDuration,
bool presale
) public onlyOwner {
}
function stopSale() public onlyOwner {
}
function withdraw() public {
}
function setBaseURI(string memory newBaseURI) public onlyOwner {
}
function setTreasury(address newTreasury) public onlyOwner {
}
function treasury() external view returns (address) {
}
function maxAmount() external view returns (uint256) {
}
function maxPerMint() external view returns (uint256) {
}
function maxPerWallet() external view returns (uint256) {
}
function price() external view returns (uint256) {
}
function totalRevenue() external view returns (uint256) {
}
function presaleActive() external view returns (bool) {
}
function saleActive() external view returns (bool) {
}
function auctionActive() external view returns (bool) {
}
function auctionStartedAt() external view returns (uint256) {
}
function auctionDuration() external view returns (uint256) {
}
function auctionPrice() public view returns (uint256) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _purchaseMint(uint256 numberOfTokens, address sender) internal {
}
function _mint(uint256 numberOfTokens, address sender) internal {
}
// The following functions are overrides required by Solidity.
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721Upgradeable, ERC721EnumerableUpgradeable) {
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721Upgradeable, ERC721EnumerableUpgradeable)
returns (bool)
{
}
}
| _merkleRoot!="","Not active" | 9,828 | _merkleRoot!="" |
"Not active" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/cryptography/MerkleProofUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "./IDropKit.sol";
contract DropKitCollection is
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
OwnableUpgradeable
{
using AddressUpgradeable for address;
using SafeMathUpgradeable for uint256;
using MerkleProofUpgradeable for bytes32[];
IDropKit private _dropKit;
mapping(address => uint256) private _mintCount;
uint256 private _totalRevenue;
bytes32 private _merkleRoot;
string private _tokenBaseURI;
address private _treasury;
// Sales Parameters
uint256 private _maxAmount;
uint256 private _maxPerMint;
uint256 private _maxPerWallet;
uint256 private _price;
// Auction Parameters
uint256 private _startPrice;
uint256 private _endPrice;
uint256 private _duration;
uint256 private _startedAt;
// States
bool private _presaleActive = false;
bool private _saleActive = false;
bool private _auctionActive = false;
modifier onlyMintable(uint256 numberOfTokens) {
}
function initialize(
string memory name_,
string memory symbol_,
address treasury_
) public initializer {
}
function mint(uint256 numberOfTokens)
public
payable
onlyMintable(numberOfTokens)
{
}
function presaleMint(uint256 numberOfTokens, bytes32[] calldata proof)
public
payable
onlyMintable(numberOfTokens)
{
require(_presaleActive, "Not active");
require(_merkleRoot != "", "Not active");
require(<FILL_ME>)
_purchaseMint(numberOfTokens, _msgSender());
}
function batchAirdrop(
uint256[] calldata numberOfTokens,
address[] calldata recipients
) external onlyOwner {
}
function setMerkleRoot(bytes32 newRoot) public onlyOwner {
}
function startSale(
uint256 newMaxAmount,
uint256 newMaxPerMint,
uint256 newMaxPerWallet,
uint256 newPrice,
bool presale
) public onlyOwner {
}
function startAuction(
uint256 newMaxAmount,
uint256 newMaxPerMint,
uint256 newMaxPerWallet,
uint256 newStartPrice,
uint256 newEndPrice,
uint256 newDuration,
bool presale
) public onlyOwner {
}
function stopSale() public onlyOwner {
}
function withdraw() public {
}
function setBaseURI(string memory newBaseURI) public onlyOwner {
}
function setTreasury(address newTreasury) public onlyOwner {
}
function treasury() external view returns (address) {
}
function maxAmount() external view returns (uint256) {
}
function maxPerMint() external view returns (uint256) {
}
function maxPerWallet() external view returns (uint256) {
}
function price() external view returns (uint256) {
}
function totalRevenue() external view returns (uint256) {
}
function presaleActive() external view returns (bool) {
}
function saleActive() external view returns (bool) {
}
function auctionActive() external view returns (bool) {
}
function auctionStartedAt() external view returns (uint256) {
}
function auctionDuration() external view returns (uint256) {
}
function auctionPrice() public view returns (uint256) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _purchaseMint(uint256 numberOfTokens, address sender) internal {
}
function _mint(uint256 numberOfTokens, address sender) internal {
}
// The following functions are overrides required by Solidity.
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721Upgradeable, ERC721EnumerableUpgradeable) {
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721Upgradeable, ERC721EnumerableUpgradeable)
returns (bool)
{
}
}
| MerkleProofUpgradeable.verify(proof,_merkleRoot,keccak256(abi.encodePacked(_msgSender()))),"Not active" | 9,828 | MerkleProofUpgradeable.verify(proof,_merkleRoot,keccak256(abi.encodePacked(_msgSender()))) |
"TheLostGlitchesComic: Metadata already frozen." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "@openzeppelin/contracts/access/AccessControlEnumerable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "./TheLostGlitches.sol";
import "./ERC721A.sol";
contract TheLostGlitchesComic is ERC721A, AccessControlEnumerable, Ownable {
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
TheLostGlitches public tlg;
uint256 public MAX_COMICS;
bool public METADATA_FROZEN;
string public baseUri;
bool public saleIsActive;
bool public presaleIsActive;
uint256 public mintPrice;
uint256 public maxPerMint;
uint256 public discountedMintPrice;
event SetBaseUri(string indexed baseUri);
modifier whenSaleActive {
}
modifier whenPresaleActive {
}
modifier whenMetadataNotFrozen {
require(<FILL_ME>)
_;
}
constructor(address _tlg) ERC721A("The Lost Glitches Comic", "TLGCMC", 20) {
}
// ------------------
// Explicit overrides
// ------------------
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721A, AccessControlEnumerable)
returns (bool)
{
}
function tokenURI(uint256 _tokenId) public view override(ERC721A) returns (string memory) {
}
// ------------------
// Functions for the owner
// ------------------
function setBaseUri(string memory _baseUri) external onlyOwner whenMetadataNotFrozen {
}
function freezeMetadata() external onlyOwner whenMetadataNotFrozen {
}
function setMintPrice(uint256 _mintPrice) external onlyOwner {
}
function setDiscountedMintPrice(uint256 _discountedMintPrice) external onlyOwner {
}
function toggleSaleState() external onlyOwner {
}
function togglePresaleState() external onlyOwner {
}
// Withdrawing
function withdraw(address _to) external onlyOwner {
}
function withdrawTokens(
IERC20 token,
address receiver,
uint256 amount
) external onlyOwner {
}
// ------------------
// Functions for external minting
// ------------------
// External
function mintComicsPresale(uint256 amount) external payable whenPresaleActive {
}
function mintComics(uint256 amount) external payable whenSaleActive {
}
function mintComicsForCommunity(address to, uint256 amount) external onlyOwner {
}
function mintAirdrop(address to) external onlyRole(MINTER_ROLE) whenPresaleActive {
}
// Internal
function _mintWithDiscount(uint256 amount) internal {
}
function _mintRegular(uint256 amount) internal {
}
function _mintMultiple(address to, uint256 amount) internal {
}
}
| !METADATA_FROZEN,"TheLostGlitchesComic: Metadata already frozen." | 9,878 | !METADATA_FROZEN |
"TheLostGlitchesComic: The presale is only for Glitch Owners." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "@openzeppelin/contracts/access/AccessControlEnumerable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "./TheLostGlitches.sol";
import "./ERC721A.sol";
contract TheLostGlitchesComic is ERC721A, AccessControlEnumerable, Ownable {
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
TheLostGlitches public tlg;
uint256 public MAX_COMICS;
bool public METADATA_FROZEN;
string public baseUri;
bool public saleIsActive;
bool public presaleIsActive;
uint256 public mintPrice;
uint256 public maxPerMint;
uint256 public discountedMintPrice;
event SetBaseUri(string indexed baseUri);
modifier whenSaleActive {
}
modifier whenPresaleActive {
}
modifier whenMetadataNotFrozen {
}
constructor(address _tlg) ERC721A("The Lost Glitches Comic", "TLGCMC", 20) {
}
// ------------------
// Explicit overrides
// ------------------
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721A, AccessControlEnumerable)
returns (bool)
{
}
function tokenURI(uint256 _tokenId) public view override(ERC721A) returns (string memory) {
}
// ------------------
// Functions for the owner
// ------------------
function setBaseUri(string memory _baseUri) external onlyOwner whenMetadataNotFrozen {
}
function freezeMetadata() external onlyOwner whenMetadataNotFrozen {
}
function setMintPrice(uint256 _mintPrice) external onlyOwner {
}
function setDiscountedMintPrice(uint256 _discountedMintPrice) external onlyOwner {
}
function toggleSaleState() external onlyOwner {
}
function togglePresaleState() external onlyOwner {
}
// Withdrawing
function withdraw(address _to) external onlyOwner {
}
function withdrawTokens(
IERC20 token,
address receiver,
uint256 amount
) external onlyOwner {
}
// ------------------
// Functions for external minting
// ------------------
// External
function mintComicsPresale(uint256 amount) external payable whenPresaleActive {
require(<FILL_ME>)
require(totalSupply() + amount <= MAX_COMICS, "TheLostGlitchesComic: Purchase would exceed cap");
require(amount <= maxPerMint, "TheLostGlitchesComic: Amount exceeds max per mint");
_mintWithDiscount(amount);
}
function mintComics(uint256 amount) external payable whenSaleActive {
}
function mintComicsForCommunity(address to, uint256 amount) external onlyOwner {
}
function mintAirdrop(address to) external onlyRole(MINTER_ROLE) whenPresaleActive {
}
// Internal
function _mintWithDiscount(uint256 amount) internal {
}
function _mintRegular(uint256 amount) internal {
}
function _mintMultiple(address to, uint256 amount) internal {
}
}
| tlg.balanceOf(msg.sender)>0,"TheLostGlitchesComic: The presale is only for Glitch Owners." | 9,878 | tlg.balanceOf(msg.sender)>0 |