comment
stringlengths 1
211
⌀ | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
"!strategy" | // SPDX-License-Identifier: MIT
pragma solidity ^0.6.7;
pragma experimental ABIEncoderV2;
import "../lib/safe-math.sol";
import "../lib/erc20.sol";
import "../interfaces/univ3/IUniswapV3PositionsNFT.sol";
import "../interfaces/backscratcher/FraxGauge.sol";
interface IProxy {
function execute(
address to,
uint256 value,
bytes calldata data
) external returns (bool, bytes memory);
function increaseAmount(uint256) external;
}
library SafeProxy {
function safeExecute(
IProxy proxy,
address to,
uint256 value,
bytes memory data
) internal {
}
}
contract StrategyProxy {
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint256;
using SafeProxy for IProxy;
IProxy public proxy;
address public veFxsVault;
// address public constant gaugeFXSRewardsDistributor =
// 0x278dC748edA1d8eFEf1aDFB518542612b49Fcd34;
IUniswapV3PositionsNFT public constant nftManager =
IUniswapV3PositionsNFT(0xC36442b4a4522E871399CD717aBDD847Ab11FE88);
address public constant fxs = address(0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0);
address public constant rewards = address(0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0);
address public gauge = address(0x3669C421b77340B2979d1A00a792CC2ee0FcE737);
address public feeDistribution = 0xc6764e58b36e26b08Fd1d2AeD4538c02171fA872;
// gauge => strategies
mapping(address => address) public strategies;
mapping(address => bool) public voters;
address public governance;
// TODO How much FXS tokens to give to backscratcher?
uint256 public keepFXS = 1000;
uint256 public constant keepFXSMax = 10000;
constructor() public {
}
function setGovernance(address _governance) external {
}
function setKeepFXS(uint256 _keepFXS) external {
}
function setFXSVault(address _vault) external {
}
function setLocker(address _proxy) external {
}
function setGauge(address _gauge) external {
}
function setFeeDistribution(address _feeDistribution) external {
}
function approveStrategy(address _gauge, address _strategy) external {
}
function revokeStrategy(address _gauge) external {
}
function approveVoter(address _voter) external {
}
function revokeVoter(address _voter) external {
}
function lock() external {
}
function vote(address _gauge, uint256 _amount) public {
}
function withdrawV3(
address _gauge,
uint256 _tokenId,
address[] memory _rewardTokens
) public returns (uint256) {
require(<FILL_ME>)
uint256[] memory _balances = new uint256[](_rewardTokens.length);
for (uint256 i = 0; i < _rewardTokens.length; i++) {
_balances[i] = IERC20(_rewardTokens[i]).balanceOf(address(proxy));
}
proxy.safeExecute(_gauge, 0, abi.encodeWithSignature("withdrawLocked(uint256)", _tokenId));
(, , , , , , , uint256 _liquidity, , , , ) = nftManager.positions(_tokenId);
if (_liquidity > 0) {
proxy.safeExecute(
address(nftManager),
0,
abi.encodeWithSignature(
"safeTransferFrom(address,address,uint256)",
address(proxy),
msg.sender,
_tokenId
)
);
}
for (uint256 i = 0; i < _rewardTokens.length; i++) {
_balances[i] = (IERC20(_rewardTokens[i]).balanceOf(address(proxy))).sub(_balances[i]);
if (_balances[i] > 0)
proxy.safeExecute(
_rewardTokens[i],
0,
abi.encodeWithSignature("transfer(address,uint256)", msg.sender, _balances[i])
);
}
return _liquidity;
}
function withdrawV2(
address _gauge,
address _token,
bytes32 _kek_id,
address[] memory _rewardTokens
) public returns (uint256) {
}
function balanceOf(address _gauge) public view returns (uint256) {
}
function lockedNFTsOf(address _gauge) public view returns (LockedNFT[] memory) {
}
function lockedStakesOf(address _gauge) public view returns (LockedStake[] memory) {
}
function withdrawAllV3(address _gauge, address[] calldata _rewardTokens) external returns (uint256 amount) {
}
function withdrawAllV2(
address _gauge,
address _token,
address[] calldata _rewardTokens
) external returns (uint256 amount) {
}
function depositV3(
address _gauge,
uint256 _tokenId,
uint256 _secs
) external {
}
function depositV2(
address _gauge,
address _token,
uint256 _secs
) external {
}
function harvest(address _gauge, address[] calldata _tokens) external {
}
function claim(address recipient) external {
}
function claimRewards(address _gauge, address _token) external {
}
function onERC721Received(
address,
address,
uint256,
bytes memory
) public pure returns (bytes4) {
}
// **** Emergency functions ****
function execute(address _target, bytes memory _data) public payable returns (bytes memory response) {
}
}
| strategies[_gauge]==msg.sender,"!strategy" | 387,440 | strategies[_gauge]==msg.sender |
"hash already used" | pragma solidity 0.4.25;
/// @title The AirDropper contract to send ether to users
/// @author Switcheo Network
contract AirDropper {
using SafeMath for uint256;
// The Switcheo Broker contract
Broker public broker;
// A record of which hashes have been used before
mapping(bytes32 => bool) public usedHashes;
// Emitted when ether is sent
event SendEther(bytes32 indexed id, address indexed receiver, uint256 amount);
/// @notice Initializes the AirDropper contract
/// @dev The broker is initialized to the Switcheo Broker
constructor(address brokerAddress)
public
{
}
modifier onlyCoordinator() {
}
/// @notice The payable method to allow this contract to receive ether
function depositEther() external payable {}
/// @notice Sends ether to a receiving address.
/// @param _id The unique identifier to prevent double spends
/// @param _receiver The address of the receiver
/// @param _amount The amount of ether to send
function sendEther(
bytes32 _id,
address _receiver,
uint256 _amount
)
external
onlyCoordinator
{
}
/// @dev Ensures a hash hasn't been already used.
/// This prevents replay attacks.
function _validateAndAddHash(bytes32 _hash)
private
{
require(<FILL_ME>)
usedHashes[_hash] = true;
}
}
| usedHashes[_hash]!=true,"hash already used" | 387,442 | usedHashes[_hash]!=true |
'Token Is Already Added' | pragma solidity ^0.4.18;
pragma experimental ABIEncoderV2;
// ----------------------------------------------------------------------------------------------
// Sample fixed supply token contract
// Enjoy. (c) BokkyPooBah 2017. The MIT Licence.
// ----------------------------------------------------------------------------------------------
import './FixedSupplyToken.sol';
contract TokenSale {
uint256 fee = 0.01 ether;
uint256 symbolNameIndex;
uint256 historyIndex;
//it will divide on 1000
uint256 siteShareRatio = 1;
address manager;
enum State {Waiting , Selling , Ended , Checkedout}
mapping (uint256 => uint) tokenBalanceForAddress;
mapping (address => uint256) refAccount;
mapping (address => mapping(uint256 => uint)) balanceEthForAddress;
mapping (uint256 => Token) tokens;
struct Token {
address tokenContract;
address owner;
string symbolName;
string symbol;
string link;
uint256 amount;
uint256 leftover;
uint256 priceInWie;
uint256 deadline;
uint decimals;
State state;
uint256 referral;
}
mapping (uint256 => History) histories;
struct History{
address owner;
string title;
uint256 amount;
uint256 decimals;
uint256 time;
string symbol;
}
event TokenAdded(address erc20TokenAddress);
event TokenDeposited(address erc20TokenAddress , uint256 amount);
event DexCheckouted(address erc20TokenAddress , uint256 amount);
event RefCheckouted(address ownerAddress , uint256 amount);
event TokenBuyed(address erc20TokenAddress , uint256 amount , address buyer);
function TokenSale() public{
}
///////////////////////
// TOKEN MANAGEMENT //
//////////////////////
function addToken(address erc20TokenAddress , string symbolName , string symbol , string link , uint256 priceInWie , uint decimals , uint256 referral) public payable {
require(<FILL_ME>)
require(msg.value == fee , 'Add Token Fee Is Invalid');
require(referral >= 0 && referral <= 100);
manager.transfer(msg.value);
symbolNameIndex++;
tokens[symbolNameIndex].symbolName = symbolName;
tokens[symbolNameIndex].tokenContract = erc20TokenAddress;
tokens[symbolNameIndex].symbol = symbol;
tokens[symbolNameIndex].link = link;
tokens[symbolNameIndex].amount = 0;
tokens[symbolNameIndex].deadline = now;
tokens[symbolNameIndex].leftover = 0;
tokens[symbolNameIndex].state = State.Waiting;
tokens[symbolNameIndex].priceInWie = priceInWie;
tokens[symbolNameIndex].decimals = decimals;
tokens[symbolNameIndex].referral = referral;
tokens[symbolNameIndex].owner = msg.sender;
setHistory(msg.sender , fee , 'Fee For Add Token' , 'ETH' , 18);
setHistory(manager , fee , '(Manager) Fee For Add Token' , 'ETH' , 18);
TokenAdded(erc20TokenAddress);
}
function hasToken(address erc20TokenAddress) public constant returns (bool) {
}
function getSymbolIndexByAddress(address erc20TokenAddress) internal returns (uint256) {
}
function getSymbolIndexByAddressOrThrow(address erc20TokenAddress) returns (uint256) {
}
function getAllDex() public view returns(address[] memory , string[] memory , uint256[] memory , uint[] memory , uint256[] memory , string[] memory){
}
////////////////////////////////
// DEPOSIT / WITHDRAWAL TOKEN //
////////////////////////////////
function depositToken(address erc20TokenAddress, uint256 amountTokens , uint256 deadline) public payable {
}
function checkoutDex(address erc20TokenAddress) public payable {
}
function getBalance(address erc20TokenAddress) public constant returns (uint256) {
}
function checkoutRef(uint256 amount) public payable {
}
function getRefBalance(address _ownerAddress) view returns(uint256){
}
///////////////
// Buy Token //
///////////////
function buyToken(address erc20TokenAddress , address refAddress , uint256 _amount) payable returns(bool){
}
function leftover(address erc20TokenAddress , uint256 _amount) public view returns(uint256){
}
function checkDeadLine(Token token) internal returns(bool){
}
function getOwnerTokens(address owner) public view returns(address[] memory , string[] memory , uint256[] memory , uint256[] memory , uint256[] memory , uint256[] memory , uint[] memory ){
}
function getDecimal(address erc20TokenAddress) public view returns(uint256){
}
function getOwnerTokenDetails(address erc20TokenAddress) public view returns(Token){
}
function setHistory(address _owner , uint256 _amount , string _name , string _symbol , uint256 _decimals) public {
}
function getHistory(address _owner) public view returns(string[] , string[] , uint256[] , uint256[] , uint256[]){
}
}
| !hasToken(erc20TokenAddress),'Token Is Already Added' | 387,480 | !hasToken(erc20TokenAddress) |
'Token is Invalid' | pragma solidity ^0.4.18;
pragma experimental ABIEncoderV2;
// ----------------------------------------------------------------------------------------------
// Sample fixed supply token contract
// Enjoy. (c) BokkyPooBah 2017. The MIT Licence.
// ----------------------------------------------------------------------------------------------
import './FixedSupplyToken.sol';
contract TokenSale {
uint256 fee = 0.01 ether;
uint256 symbolNameIndex;
uint256 historyIndex;
//it will divide on 1000
uint256 siteShareRatio = 1;
address manager;
enum State {Waiting , Selling , Ended , Checkedout}
mapping (uint256 => uint) tokenBalanceForAddress;
mapping (address => uint256) refAccount;
mapping (address => mapping(uint256 => uint)) balanceEthForAddress;
mapping (uint256 => Token) tokens;
struct Token {
address tokenContract;
address owner;
string symbolName;
string symbol;
string link;
uint256 amount;
uint256 leftover;
uint256 priceInWie;
uint256 deadline;
uint decimals;
State state;
uint256 referral;
}
mapping (uint256 => History) histories;
struct History{
address owner;
string title;
uint256 amount;
uint256 decimals;
uint256 time;
string symbol;
}
event TokenAdded(address erc20TokenAddress);
event TokenDeposited(address erc20TokenAddress , uint256 amount);
event DexCheckouted(address erc20TokenAddress , uint256 amount);
event RefCheckouted(address ownerAddress , uint256 amount);
event TokenBuyed(address erc20TokenAddress , uint256 amount , address buyer);
function TokenSale() public{
}
///////////////////////
// TOKEN MANAGEMENT //
//////////////////////
function addToken(address erc20TokenAddress , string symbolName , string symbol , string link , uint256 priceInWie , uint decimals , uint256 referral) public payable {
}
function hasToken(address erc20TokenAddress) public constant returns (bool) {
}
function getSymbolIndexByAddress(address erc20TokenAddress) internal returns (uint256) {
}
function getSymbolIndexByAddressOrThrow(address erc20TokenAddress) returns (uint256) {
}
function getAllDex() public view returns(address[] memory , string[] memory , uint256[] memory , uint[] memory , uint256[] memory , string[] memory){
}
////////////////////////////////
// DEPOSIT / WITHDRAWAL TOKEN //
////////////////////////////////
function depositToken(address erc20TokenAddress, uint256 amountTokens , uint256 deadline) public payable {
uint256 symbolNameIndex = getSymbolIndexByAddressOrThrow(erc20TokenAddress);
require(<FILL_ME>)
require(tokens[symbolNameIndex].state == State.Waiting , 'Token Cannot be deposited');
require(tokens[symbolNameIndex].owner == msg.sender , 'You are not owner of this coin');
ERC20Interface token = ERC20Interface(tokens[symbolNameIndex].tokenContract);
require(token.transferFrom(msg.sender, address(this), amountTokens) == true);
tokens[symbolNameIndex].amount = amountTokens;
tokens[symbolNameIndex].leftover = amountTokens;
require(tokenBalanceForAddress[symbolNameIndex] + amountTokens >= tokenBalanceForAddress[symbolNameIndex]);
tokenBalanceForAddress[symbolNameIndex] += amountTokens;
tokens[symbolNameIndex].state = State.Selling;
tokens[symbolNameIndex].deadline = deadline;
Token tokenRes = tokens[symbolNameIndex];
setHistory(msg.sender , amountTokens , 'Deposit Token' , tokenRes.symbol , tokenRes.decimals);
TokenDeposited(erc20TokenAddress , amountTokens);
}
function checkoutDex(address erc20TokenAddress) public payable {
}
function getBalance(address erc20TokenAddress) public constant returns (uint256) {
}
function checkoutRef(uint256 amount) public payable {
}
function getRefBalance(address _ownerAddress) view returns(uint256){
}
///////////////
// Buy Token //
///////////////
function buyToken(address erc20TokenAddress , address refAddress , uint256 _amount) payable returns(bool){
}
function leftover(address erc20TokenAddress , uint256 _amount) public view returns(uint256){
}
function checkDeadLine(Token token) internal returns(bool){
}
function getOwnerTokens(address owner) public view returns(address[] memory , string[] memory , uint256[] memory , uint256[] memory , uint256[] memory , uint256[] memory , uint[] memory ){
}
function getDecimal(address erc20TokenAddress) public view returns(uint256){
}
function getOwnerTokenDetails(address erc20TokenAddress) public view returns(Token){
}
function setHistory(address _owner , uint256 _amount , string _name , string _symbol , uint256 _decimals) public {
}
function getHistory(address _owner) public view returns(string[] , string[] , uint256[] , uint256[] , uint256[]){
}
}
| tokens[symbolNameIndex].tokenContract!=address(0),'Token is Invalid' | 387,480 | tokens[symbolNameIndex].tokenContract!=address(0) |
'Token Cannot be deposited' | pragma solidity ^0.4.18;
pragma experimental ABIEncoderV2;
// ----------------------------------------------------------------------------------------------
// Sample fixed supply token contract
// Enjoy. (c) BokkyPooBah 2017. The MIT Licence.
// ----------------------------------------------------------------------------------------------
import './FixedSupplyToken.sol';
contract TokenSale {
uint256 fee = 0.01 ether;
uint256 symbolNameIndex;
uint256 historyIndex;
//it will divide on 1000
uint256 siteShareRatio = 1;
address manager;
enum State {Waiting , Selling , Ended , Checkedout}
mapping (uint256 => uint) tokenBalanceForAddress;
mapping (address => uint256) refAccount;
mapping (address => mapping(uint256 => uint)) balanceEthForAddress;
mapping (uint256 => Token) tokens;
struct Token {
address tokenContract;
address owner;
string symbolName;
string symbol;
string link;
uint256 amount;
uint256 leftover;
uint256 priceInWie;
uint256 deadline;
uint decimals;
State state;
uint256 referral;
}
mapping (uint256 => History) histories;
struct History{
address owner;
string title;
uint256 amount;
uint256 decimals;
uint256 time;
string symbol;
}
event TokenAdded(address erc20TokenAddress);
event TokenDeposited(address erc20TokenAddress , uint256 amount);
event DexCheckouted(address erc20TokenAddress , uint256 amount);
event RefCheckouted(address ownerAddress , uint256 amount);
event TokenBuyed(address erc20TokenAddress , uint256 amount , address buyer);
function TokenSale() public{
}
///////////////////////
// TOKEN MANAGEMENT //
//////////////////////
function addToken(address erc20TokenAddress , string symbolName , string symbol , string link , uint256 priceInWie , uint decimals , uint256 referral) public payable {
}
function hasToken(address erc20TokenAddress) public constant returns (bool) {
}
function getSymbolIndexByAddress(address erc20TokenAddress) internal returns (uint256) {
}
function getSymbolIndexByAddressOrThrow(address erc20TokenAddress) returns (uint256) {
}
function getAllDex() public view returns(address[] memory , string[] memory , uint256[] memory , uint[] memory , uint256[] memory , string[] memory){
}
////////////////////////////////
// DEPOSIT / WITHDRAWAL TOKEN //
////////////////////////////////
function depositToken(address erc20TokenAddress, uint256 amountTokens , uint256 deadline) public payable {
uint256 symbolNameIndex = getSymbolIndexByAddressOrThrow(erc20TokenAddress);
require(tokens[symbolNameIndex].tokenContract != address(0) , 'Token is Invalid');
require(<FILL_ME>)
require(tokens[symbolNameIndex].owner == msg.sender , 'You are not owner of this coin');
ERC20Interface token = ERC20Interface(tokens[symbolNameIndex].tokenContract);
require(token.transferFrom(msg.sender, address(this), amountTokens) == true);
tokens[symbolNameIndex].amount = amountTokens;
tokens[symbolNameIndex].leftover = amountTokens;
require(tokenBalanceForAddress[symbolNameIndex] + amountTokens >= tokenBalanceForAddress[symbolNameIndex]);
tokenBalanceForAddress[symbolNameIndex] += amountTokens;
tokens[symbolNameIndex].state = State.Selling;
tokens[symbolNameIndex].deadline = deadline;
Token tokenRes = tokens[symbolNameIndex];
setHistory(msg.sender , amountTokens , 'Deposit Token' , tokenRes.symbol , tokenRes.decimals);
TokenDeposited(erc20TokenAddress , amountTokens);
}
function checkoutDex(address erc20TokenAddress) public payable {
}
function getBalance(address erc20TokenAddress) public constant returns (uint256) {
}
function checkoutRef(uint256 amount) public payable {
}
function getRefBalance(address _ownerAddress) view returns(uint256){
}
///////////////
// Buy Token //
///////////////
function buyToken(address erc20TokenAddress , address refAddress , uint256 _amount) payable returns(bool){
}
function leftover(address erc20TokenAddress , uint256 _amount) public view returns(uint256){
}
function checkDeadLine(Token token) internal returns(bool){
}
function getOwnerTokens(address owner) public view returns(address[] memory , string[] memory , uint256[] memory , uint256[] memory , uint256[] memory , uint256[] memory , uint[] memory ){
}
function getDecimal(address erc20TokenAddress) public view returns(uint256){
}
function getOwnerTokenDetails(address erc20TokenAddress) public view returns(Token){
}
function setHistory(address _owner , uint256 _amount , string _name , string _symbol , uint256 _decimals) public {
}
function getHistory(address _owner) public view returns(string[] , string[] , uint256[] , uint256[] , uint256[]){
}
}
| tokens[symbolNameIndex].state==State.Waiting,'Token Cannot be deposited' | 387,480 | tokens[symbolNameIndex].state==State.Waiting |
'You are not owner of this coin' | pragma solidity ^0.4.18;
pragma experimental ABIEncoderV2;
// ----------------------------------------------------------------------------------------------
// Sample fixed supply token contract
// Enjoy. (c) BokkyPooBah 2017. The MIT Licence.
// ----------------------------------------------------------------------------------------------
import './FixedSupplyToken.sol';
contract TokenSale {
uint256 fee = 0.01 ether;
uint256 symbolNameIndex;
uint256 historyIndex;
//it will divide on 1000
uint256 siteShareRatio = 1;
address manager;
enum State {Waiting , Selling , Ended , Checkedout}
mapping (uint256 => uint) tokenBalanceForAddress;
mapping (address => uint256) refAccount;
mapping (address => mapping(uint256 => uint)) balanceEthForAddress;
mapping (uint256 => Token) tokens;
struct Token {
address tokenContract;
address owner;
string symbolName;
string symbol;
string link;
uint256 amount;
uint256 leftover;
uint256 priceInWie;
uint256 deadline;
uint decimals;
State state;
uint256 referral;
}
mapping (uint256 => History) histories;
struct History{
address owner;
string title;
uint256 amount;
uint256 decimals;
uint256 time;
string symbol;
}
event TokenAdded(address erc20TokenAddress);
event TokenDeposited(address erc20TokenAddress , uint256 amount);
event DexCheckouted(address erc20TokenAddress , uint256 amount);
event RefCheckouted(address ownerAddress , uint256 amount);
event TokenBuyed(address erc20TokenAddress , uint256 amount , address buyer);
function TokenSale() public{
}
///////////////////////
// TOKEN MANAGEMENT //
//////////////////////
function addToken(address erc20TokenAddress , string symbolName , string symbol , string link , uint256 priceInWie , uint decimals , uint256 referral) public payable {
}
function hasToken(address erc20TokenAddress) public constant returns (bool) {
}
function getSymbolIndexByAddress(address erc20TokenAddress) internal returns (uint256) {
}
function getSymbolIndexByAddressOrThrow(address erc20TokenAddress) returns (uint256) {
}
function getAllDex() public view returns(address[] memory , string[] memory , uint256[] memory , uint[] memory , uint256[] memory , string[] memory){
}
////////////////////////////////
// DEPOSIT / WITHDRAWAL TOKEN //
////////////////////////////////
function depositToken(address erc20TokenAddress, uint256 amountTokens , uint256 deadline) public payable {
uint256 symbolNameIndex = getSymbolIndexByAddressOrThrow(erc20TokenAddress);
require(tokens[symbolNameIndex].tokenContract != address(0) , 'Token is Invalid');
require(tokens[symbolNameIndex].state == State.Waiting , 'Token Cannot be deposited');
require(<FILL_ME>)
ERC20Interface token = ERC20Interface(tokens[symbolNameIndex].tokenContract);
require(token.transferFrom(msg.sender, address(this), amountTokens) == true);
tokens[symbolNameIndex].amount = amountTokens;
tokens[symbolNameIndex].leftover = amountTokens;
require(tokenBalanceForAddress[symbolNameIndex] + amountTokens >= tokenBalanceForAddress[symbolNameIndex]);
tokenBalanceForAddress[symbolNameIndex] += amountTokens;
tokens[symbolNameIndex].state = State.Selling;
tokens[symbolNameIndex].deadline = deadline;
Token tokenRes = tokens[symbolNameIndex];
setHistory(msg.sender , amountTokens , 'Deposit Token' , tokenRes.symbol , tokenRes.decimals);
TokenDeposited(erc20TokenAddress , amountTokens);
}
function checkoutDex(address erc20TokenAddress) public payable {
}
function getBalance(address erc20TokenAddress) public constant returns (uint256) {
}
function checkoutRef(uint256 amount) public payable {
}
function getRefBalance(address _ownerAddress) view returns(uint256){
}
///////////////
// Buy Token //
///////////////
function buyToken(address erc20TokenAddress , address refAddress , uint256 _amount) payable returns(bool){
}
function leftover(address erc20TokenAddress , uint256 _amount) public view returns(uint256){
}
function checkDeadLine(Token token) internal returns(bool){
}
function getOwnerTokens(address owner) public view returns(address[] memory , string[] memory , uint256[] memory , uint256[] memory , uint256[] memory , uint256[] memory , uint[] memory ){
}
function getDecimal(address erc20TokenAddress) public view returns(uint256){
}
function getOwnerTokenDetails(address erc20TokenAddress) public view returns(Token){
}
function setHistory(address _owner , uint256 _amount , string _name , string _symbol , uint256 _decimals) public {
}
function getHistory(address _owner) public view returns(string[] , string[] , uint256[] , uint256[] , uint256[]){
}
}
| tokens[symbolNameIndex].owner==msg.sender,'You are not owner of this coin' | 387,480 | tokens[symbolNameIndex].owner==msg.sender |
null | pragma solidity ^0.4.18;
pragma experimental ABIEncoderV2;
// ----------------------------------------------------------------------------------------------
// Sample fixed supply token contract
// Enjoy. (c) BokkyPooBah 2017. The MIT Licence.
// ----------------------------------------------------------------------------------------------
import './FixedSupplyToken.sol';
contract TokenSale {
uint256 fee = 0.01 ether;
uint256 symbolNameIndex;
uint256 historyIndex;
//it will divide on 1000
uint256 siteShareRatio = 1;
address manager;
enum State {Waiting , Selling , Ended , Checkedout}
mapping (uint256 => uint) tokenBalanceForAddress;
mapping (address => uint256) refAccount;
mapping (address => mapping(uint256 => uint)) balanceEthForAddress;
mapping (uint256 => Token) tokens;
struct Token {
address tokenContract;
address owner;
string symbolName;
string symbol;
string link;
uint256 amount;
uint256 leftover;
uint256 priceInWie;
uint256 deadline;
uint decimals;
State state;
uint256 referral;
}
mapping (uint256 => History) histories;
struct History{
address owner;
string title;
uint256 amount;
uint256 decimals;
uint256 time;
string symbol;
}
event TokenAdded(address erc20TokenAddress);
event TokenDeposited(address erc20TokenAddress , uint256 amount);
event DexCheckouted(address erc20TokenAddress , uint256 amount);
event RefCheckouted(address ownerAddress , uint256 amount);
event TokenBuyed(address erc20TokenAddress , uint256 amount , address buyer);
function TokenSale() public{
}
///////////////////////
// TOKEN MANAGEMENT //
//////////////////////
function addToken(address erc20TokenAddress , string symbolName , string symbol , string link , uint256 priceInWie , uint decimals , uint256 referral) public payable {
}
function hasToken(address erc20TokenAddress) public constant returns (bool) {
}
function getSymbolIndexByAddress(address erc20TokenAddress) internal returns (uint256) {
}
function getSymbolIndexByAddressOrThrow(address erc20TokenAddress) returns (uint256) {
}
function getAllDex() public view returns(address[] memory , string[] memory , uint256[] memory , uint[] memory , uint256[] memory , string[] memory){
}
////////////////////////////////
// DEPOSIT / WITHDRAWAL TOKEN //
////////////////////////////////
function depositToken(address erc20TokenAddress, uint256 amountTokens , uint256 deadline) public payable {
uint256 symbolNameIndex = getSymbolIndexByAddressOrThrow(erc20TokenAddress);
require(tokens[symbolNameIndex].tokenContract != address(0) , 'Token is Invalid');
require(tokens[symbolNameIndex].state == State.Waiting , 'Token Cannot be deposited');
require(tokens[symbolNameIndex].owner == msg.sender , 'You are not owner of this coin');
ERC20Interface token = ERC20Interface(tokens[symbolNameIndex].tokenContract);
require(<FILL_ME>)
tokens[symbolNameIndex].amount = amountTokens;
tokens[symbolNameIndex].leftover = amountTokens;
require(tokenBalanceForAddress[symbolNameIndex] + amountTokens >= tokenBalanceForAddress[symbolNameIndex]);
tokenBalanceForAddress[symbolNameIndex] += amountTokens;
tokens[symbolNameIndex].state = State.Selling;
tokens[symbolNameIndex].deadline = deadline;
Token tokenRes = tokens[symbolNameIndex];
setHistory(msg.sender , amountTokens , 'Deposit Token' , tokenRes.symbol , tokenRes.decimals);
TokenDeposited(erc20TokenAddress , amountTokens);
}
function checkoutDex(address erc20TokenAddress) public payable {
}
function getBalance(address erc20TokenAddress) public constant returns (uint256) {
}
function checkoutRef(uint256 amount) public payable {
}
function getRefBalance(address _ownerAddress) view returns(uint256){
}
///////////////
// Buy Token //
///////////////
function buyToken(address erc20TokenAddress , address refAddress , uint256 _amount) payable returns(bool){
}
function leftover(address erc20TokenAddress , uint256 _amount) public view returns(uint256){
}
function checkDeadLine(Token token) internal returns(bool){
}
function getOwnerTokens(address owner) public view returns(address[] memory , string[] memory , uint256[] memory , uint256[] memory , uint256[] memory , uint256[] memory , uint[] memory ){
}
function getDecimal(address erc20TokenAddress) public view returns(uint256){
}
function getOwnerTokenDetails(address erc20TokenAddress) public view returns(Token){
}
function setHistory(address _owner , uint256 _amount , string _name , string _symbol , uint256 _decimals) public {
}
function getHistory(address _owner) public view returns(string[] , string[] , uint256[] , uint256[] , uint256[]){
}
}
| token.transferFrom(msg.sender,address(this),amountTokens)==true | 387,480 | token.transferFrom(msg.sender,address(this),amountTokens)==true |
null | pragma solidity ^0.4.18;
pragma experimental ABIEncoderV2;
// ----------------------------------------------------------------------------------------------
// Sample fixed supply token contract
// Enjoy. (c) BokkyPooBah 2017. The MIT Licence.
// ----------------------------------------------------------------------------------------------
import './FixedSupplyToken.sol';
contract TokenSale {
uint256 fee = 0.01 ether;
uint256 symbolNameIndex;
uint256 historyIndex;
//it will divide on 1000
uint256 siteShareRatio = 1;
address manager;
enum State {Waiting , Selling , Ended , Checkedout}
mapping (uint256 => uint) tokenBalanceForAddress;
mapping (address => uint256) refAccount;
mapping (address => mapping(uint256 => uint)) balanceEthForAddress;
mapping (uint256 => Token) tokens;
struct Token {
address tokenContract;
address owner;
string symbolName;
string symbol;
string link;
uint256 amount;
uint256 leftover;
uint256 priceInWie;
uint256 deadline;
uint decimals;
State state;
uint256 referral;
}
mapping (uint256 => History) histories;
struct History{
address owner;
string title;
uint256 amount;
uint256 decimals;
uint256 time;
string symbol;
}
event TokenAdded(address erc20TokenAddress);
event TokenDeposited(address erc20TokenAddress , uint256 amount);
event DexCheckouted(address erc20TokenAddress , uint256 amount);
event RefCheckouted(address ownerAddress , uint256 amount);
event TokenBuyed(address erc20TokenAddress , uint256 amount , address buyer);
function TokenSale() public{
}
///////////////////////
// TOKEN MANAGEMENT //
//////////////////////
function addToken(address erc20TokenAddress , string symbolName , string symbol , string link , uint256 priceInWie , uint decimals , uint256 referral) public payable {
}
function hasToken(address erc20TokenAddress) public constant returns (bool) {
}
function getSymbolIndexByAddress(address erc20TokenAddress) internal returns (uint256) {
}
function getSymbolIndexByAddressOrThrow(address erc20TokenAddress) returns (uint256) {
}
function getAllDex() public view returns(address[] memory , string[] memory , uint256[] memory , uint[] memory , uint256[] memory , string[] memory){
}
////////////////////////////////
// DEPOSIT / WITHDRAWAL TOKEN //
////////////////////////////////
function depositToken(address erc20TokenAddress, uint256 amountTokens , uint256 deadline) public payable {
uint256 symbolNameIndex = getSymbolIndexByAddressOrThrow(erc20TokenAddress);
require(tokens[symbolNameIndex].tokenContract != address(0) , 'Token is Invalid');
require(tokens[symbolNameIndex].state == State.Waiting , 'Token Cannot be deposited');
require(tokens[symbolNameIndex].owner == msg.sender , 'You are not owner of this coin');
ERC20Interface token = ERC20Interface(tokens[symbolNameIndex].tokenContract);
require(token.transferFrom(msg.sender, address(this), amountTokens) == true);
tokens[symbolNameIndex].amount = amountTokens;
tokens[symbolNameIndex].leftover = amountTokens;
require(<FILL_ME>)
tokenBalanceForAddress[symbolNameIndex] += amountTokens;
tokens[symbolNameIndex].state = State.Selling;
tokens[symbolNameIndex].deadline = deadline;
Token tokenRes = tokens[symbolNameIndex];
setHistory(msg.sender , amountTokens , 'Deposit Token' , tokenRes.symbol , tokenRes.decimals);
TokenDeposited(erc20TokenAddress , amountTokens);
}
function checkoutDex(address erc20TokenAddress) public payable {
}
function getBalance(address erc20TokenAddress) public constant returns (uint256) {
}
function checkoutRef(uint256 amount) public payable {
}
function getRefBalance(address _ownerAddress) view returns(uint256){
}
///////////////
// Buy Token //
///////////////
function buyToken(address erc20TokenAddress , address refAddress , uint256 _amount) payable returns(bool){
}
function leftover(address erc20TokenAddress , uint256 _amount) public view returns(uint256){
}
function checkDeadLine(Token token) internal returns(bool){
}
function getOwnerTokens(address owner) public view returns(address[] memory , string[] memory , uint256[] memory , uint256[] memory , uint256[] memory , uint256[] memory , uint[] memory ){
}
function getDecimal(address erc20TokenAddress) public view returns(uint256){
}
function getOwnerTokenDetails(address erc20TokenAddress) public view returns(Token){
}
function setHistory(address _owner , uint256 _amount , string _name , string _symbol , uint256 _decimals) public {
}
function getHistory(address _owner) public view returns(string[] , string[] , uint256[] , uint256[] , uint256[]){
}
}
| tokenBalanceForAddress[symbolNameIndex]+amountTokens>=tokenBalanceForAddress[symbolNameIndex] | 387,480 | tokenBalanceForAddress[symbolNameIndex]+amountTokens>=tokenBalanceForAddress[symbolNameIndex] |
'Token Cannot be withdrawn' | pragma solidity ^0.4.18;
pragma experimental ABIEncoderV2;
// ----------------------------------------------------------------------------------------------
// Sample fixed supply token contract
// Enjoy. (c) BokkyPooBah 2017. The MIT Licence.
// ----------------------------------------------------------------------------------------------
import './FixedSupplyToken.sol';
contract TokenSale {
uint256 fee = 0.01 ether;
uint256 symbolNameIndex;
uint256 historyIndex;
//it will divide on 1000
uint256 siteShareRatio = 1;
address manager;
enum State {Waiting , Selling , Ended , Checkedout}
mapping (uint256 => uint) tokenBalanceForAddress;
mapping (address => uint256) refAccount;
mapping (address => mapping(uint256 => uint)) balanceEthForAddress;
mapping (uint256 => Token) tokens;
struct Token {
address tokenContract;
address owner;
string symbolName;
string symbol;
string link;
uint256 amount;
uint256 leftover;
uint256 priceInWie;
uint256 deadline;
uint decimals;
State state;
uint256 referral;
}
mapping (uint256 => History) histories;
struct History{
address owner;
string title;
uint256 amount;
uint256 decimals;
uint256 time;
string symbol;
}
event TokenAdded(address erc20TokenAddress);
event TokenDeposited(address erc20TokenAddress , uint256 amount);
event DexCheckouted(address erc20TokenAddress , uint256 amount);
event RefCheckouted(address ownerAddress , uint256 amount);
event TokenBuyed(address erc20TokenAddress , uint256 amount , address buyer);
function TokenSale() public{
}
///////////////////////
// TOKEN MANAGEMENT //
//////////////////////
function addToken(address erc20TokenAddress , string symbolName , string symbol , string link , uint256 priceInWie , uint decimals , uint256 referral) public payable {
}
function hasToken(address erc20TokenAddress) public constant returns (bool) {
}
function getSymbolIndexByAddress(address erc20TokenAddress) internal returns (uint256) {
}
function getSymbolIndexByAddressOrThrow(address erc20TokenAddress) returns (uint256) {
}
function getAllDex() public view returns(address[] memory , string[] memory , uint256[] memory , uint[] memory , uint256[] memory , string[] memory){
}
////////////////////////////////
// DEPOSIT / WITHDRAWAL TOKEN //
////////////////////////////////
function depositToken(address erc20TokenAddress, uint256 amountTokens , uint256 deadline) public payable {
}
function checkoutDex(address erc20TokenAddress) public payable {
uint256 symbolNameIndex = getSymbolIndexByAddressOrThrow(erc20TokenAddress);
ERC20Interface token = ERC20Interface(tokens[symbolNameIndex].tokenContract);
uint256 _amountTokens = tokens[symbolNameIndex].leftover;
require(tokens[symbolNameIndex].tokenContract != address(0), 'Token is Invalid');
require(tokens[symbolNameIndex].owner == msg.sender , 'You are not owner of this coin');
require(<FILL_ME>)
require(tokenBalanceForAddress[symbolNameIndex] - _amountTokens >= 0 , "overflow error");
require(tokenBalanceForAddress[symbolNameIndex] - _amountTokens <= tokenBalanceForAddress[symbolNameIndex] , "Insufficient amount of token");
tokenBalanceForAddress[symbolNameIndex] -= _amountTokens;
tokens[symbolNameIndex].leftover = 0;
tokens[symbolNameIndex].state = State.Checkedout;
if(_amountTokens > 0){
require(token.transfer(msg.sender, _amountTokens) == true , "transfer failed");
setHistory(msg.sender , _amountTokens , 'Check Out Token' , tokens[symbolNameIndex].symbol , tokens[symbolNameIndex].decimals);
}
uint256 _siteShare = balanceEthForAddress[msg.sender][symbolNameIndex] * siteShareRatio / 1000;
uint256 _ownerShare = balanceEthForAddress[msg.sender][symbolNameIndex] - _siteShare;
setHistory(msg.sender , _ownerShare , 'Check Out ETH' , 'ETH' , 18 );
setHistory(manager , _siteShare , '(Manager) Site Share For Deposite Token' , 'ETH' , 18);
msg.sender.transfer(_ownerShare);
DexCheckouted(erc20TokenAddress , _ownerShare);
}
function getBalance(address erc20TokenAddress) public constant returns (uint256) {
}
function checkoutRef(uint256 amount) public payable {
}
function getRefBalance(address _ownerAddress) view returns(uint256){
}
///////////////
// Buy Token //
///////////////
function buyToken(address erc20TokenAddress , address refAddress , uint256 _amount) payable returns(bool){
}
function leftover(address erc20TokenAddress , uint256 _amount) public view returns(uint256){
}
function checkDeadLine(Token token) internal returns(bool){
}
function getOwnerTokens(address owner) public view returns(address[] memory , string[] memory , uint256[] memory , uint256[] memory , uint256[] memory , uint256[] memory , uint[] memory ){
}
function getDecimal(address erc20TokenAddress) public view returns(uint256){
}
function getOwnerTokenDetails(address erc20TokenAddress) public view returns(Token){
}
function setHistory(address _owner , uint256 _amount , string _name , string _symbol , uint256 _decimals) public {
}
function getHistory(address _owner) public view returns(string[] , string[] , uint256[] , uint256[] , uint256[]){
}
}
| !checkDeadLine(tokens[symbolNameIndex])||tokens[symbolNameIndex].leftover==0,'Token Cannot be withdrawn' | 387,480 | !checkDeadLine(tokens[symbolNameIndex])||tokens[symbolNameIndex].leftover==0 |
"overflow error" | pragma solidity ^0.4.18;
pragma experimental ABIEncoderV2;
// ----------------------------------------------------------------------------------------------
// Sample fixed supply token contract
// Enjoy. (c) BokkyPooBah 2017. The MIT Licence.
// ----------------------------------------------------------------------------------------------
import './FixedSupplyToken.sol';
contract TokenSale {
uint256 fee = 0.01 ether;
uint256 symbolNameIndex;
uint256 historyIndex;
//it will divide on 1000
uint256 siteShareRatio = 1;
address manager;
enum State {Waiting , Selling , Ended , Checkedout}
mapping (uint256 => uint) tokenBalanceForAddress;
mapping (address => uint256) refAccount;
mapping (address => mapping(uint256 => uint)) balanceEthForAddress;
mapping (uint256 => Token) tokens;
struct Token {
address tokenContract;
address owner;
string symbolName;
string symbol;
string link;
uint256 amount;
uint256 leftover;
uint256 priceInWie;
uint256 deadline;
uint decimals;
State state;
uint256 referral;
}
mapping (uint256 => History) histories;
struct History{
address owner;
string title;
uint256 amount;
uint256 decimals;
uint256 time;
string symbol;
}
event TokenAdded(address erc20TokenAddress);
event TokenDeposited(address erc20TokenAddress , uint256 amount);
event DexCheckouted(address erc20TokenAddress , uint256 amount);
event RefCheckouted(address ownerAddress , uint256 amount);
event TokenBuyed(address erc20TokenAddress , uint256 amount , address buyer);
function TokenSale() public{
}
///////////////////////
// TOKEN MANAGEMENT //
//////////////////////
function addToken(address erc20TokenAddress , string symbolName , string symbol , string link , uint256 priceInWie , uint decimals , uint256 referral) public payable {
}
function hasToken(address erc20TokenAddress) public constant returns (bool) {
}
function getSymbolIndexByAddress(address erc20TokenAddress) internal returns (uint256) {
}
function getSymbolIndexByAddressOrThrow(address erc20TokenAddress) returns (uint256) {
}
function getAllDex() public view returns(address[] memory , string[] memory , uint256[] memory , uint[] memory , uint256[] memory , string[] memory){
}
////////////////////////////////
// DEPOSIT / WITHDRAWAL TOKEN //
////////////////////////////////
function depositToken(address erc20TokenAddress, uint256 amountTokens , uint256 deadline) public payable {
}
function checkoutDex(address erc20TokenAddress) public payable {
uint256 symbolNameIndex = getSymbolIndexByAddressOrThrow(erc20TokenAddress);
ERC20Interface token = ERC20Interface(tokens[symbolNameIndex].tokenContract);
uint256 _amountTokens = tokens[symbolNameIndex].leftover;
require(tokens[symbolNameIndex].tokenContract != address(0), 'Token is Invalid');
require(tokens[symbolNameIndex].owner == msg.sender , 'You are not owner of this coin');
require(!checkDeadLine(tokens[symbolNameIndex]) || tokens[symbolNameIndex].leftover == 0 , 'Token Cannot be withdrawn');
require(<FILL_ME>)
require(tokenBalanceForAddress[symbolNameIndex] - _amountTokens <= tokenBalanceForAddress[symbolNameIndex] , "Insufficient amount of token");
tokenBalanceForAddress[symbolNameIndex] -= _amountTokens;
tokens[symbolNameIndex].leftover = 0;
tokens[symbolNameIndex].state = State.Checkedout;
if(_amountTokens > 0){
require(token.transfer(msg.sender, _amountTokens) == true , "transfer failed");
setHistory(msg.sender , _amountTokens , 'Check Out Token' , tokens[symbolNameIndex].symbol , tokens[symbolNameIndex].decimals);
}
uint256 _siteShare = balanceEthForAddress[msg.sender][symbolNameIndex] * siteShareRatio / 1000;
uint256 _ownerShare = balanceEthForAddress[msg.sender][symbolNameIndex] - _siteShare;
setHistory(msg.sender , _ownerShare , 'Check Out ETH' , 'ETH' , 18 );
setHistory(manager , _siteShare , '(Manager) Site Share For Deposite Token' , 'ETH' , 18);
msg.sender.transfer(_ownerShare);
DexCheckouted(erc20TokenAddress , _ownerShare);
}
function getBalance(address erc20TokenAddress) public constant returns (uint256) {
}
function checkoutRef(uint256 amount) public payable {
}
function getRefBalance(address _ownerAddress) view returns(uint256){
}
///////////////
// Buy Token //
///////////////
function buyToken(address erc20TokenAddress , address refAddress , uint256 _amount) payable returns(bool){
}
function leftover(address erc20TokenAddress , uint256 _amount) public view returns(uint256){
}
function checkDeadLine(Token token) internal returns(bool){
}
function getOwnerTokens(address owner) public view returns(address[] memory , string[] memory , uint256[] memory , uint256[] memory , uint256[] memory , uint256[] memory , uint[] memory ){
}
function getDecimal(address erc20TokenAddress) public view returns(uint256){
}
function getOwnerTokenDetails(address erc20TokenAddress) public view returns(Token){
}
function setHistory(address _owner , uint256 _amount , string _name , string _symbol , uint256 _decimals) public {
}
function getHistory(address _owner) public view returns(string[] , string[] , uint256[] , uint256[] , uint256[]){
}
}
| tokenBalanceForAddress[symbolNameIndex]-_amountTokens>=0,"overflow error" | 387,480 | tokenBalanceForAddress[symbolNameIndex]-_amountTokens>=0 |
"Insufficient amount of token" | pragma solidity ^0.4.18;
pragma experimental ABIEncoderV2;
// ----------------------------------------------------------------------------------------------
// Sample fixed supply token contract
// Enjoy. (c) BokkyPooBah 2017. The MIT Licence.
// ----------------------------------------------------------------------------------------------
import './FixedSupplyToken.sol';
contract TokenSale {
uint256 fee = 0.01 ether;
uint256 symbolNameIndex;
uint256 historyIndex;
//it will divide on 1000
uint256 siteShareRatio = 1;
address manager;
enum State {Waiting , Selling , Ended , Checkedout}
mapping (uint256 => uint) tokenBalanceForAddress;
mapping (address => uint256) refAccount;
mapping (address => mapping(uint256 => uint)) balanceEthForAddress;
mapping (uint256 => Token) tokens;
struct Token {
address tokenContract;
address owner;
string symbolName;
string symbol;
string link;
uint256 amount;
uint256 leftover;
uint256 priceInWie;
uint256 deadline;
uint decimals;
State state;
uint256 referral;
}
mapping (uint256 => History) histories;
struct History{
address owner;
string title;
uint256 amount;
uint256 decimals;
uint256 time;
string symbol;
}
event TokenAdded(address erc20TokenAddress);
event TokenDeposited(address erc20TokenAddress , uint256 amount);
event DexCheckouted(address erc20TokenAddress , uint256 amount);
event RefCheckouted(address ownerAddress , uint256 amount);
event TokenBuyed(address erc20TokenAddress , uint256 amount , address buyer);
function TokenSale() public{
}
///////////////////////
// TOKEN MANAGEMENT //
//////////////////////
function addToken(address erc20TokenAddress , string symbolName , string symbol , string link , uint256 priceInWie , uint decimals , uint256 referral) public payable {
}
function hasToken(address erc20TokenAddress) public constant returns (bool) {
}
function getSymbolIndexByAddress(address erc20TokenAddress) internal returns (uint256) {
}
function getSymbolIndexByAddressOrThrow(address erc20TokenAddress) returns (uint256) {
}
function getAllDex() public view returns(address[] memory , string[] memory , uint256[] memory , uint[] memory , uint256[] memory , string[] memory){
}
////////////////////////////////
// DEPOSIT / WITHDRAWAL TOKEN //
////////////////////////////////
function depositToken(address erc20TokenAddress, uint256 amountTokens , uint256 deadline) public payable {
}
function checkoutDex(address erc20TokenAddress) public payable {
uint256 symbolNameIndex = getSymbolIndexByAddressOrThrow(erc20TokenAddress);
ERC20Interface token = ERC20Interface(tokens[symbolNameIndex].tokenContract);
uint256 _amountTokens = tokens[symbolNameIndex].leftover;
require(tokens[symbolNameIndex].tokenContract != address(0), 'Token is Invalid');
require(tokens[symbolNameIndex].owner == msg.sender , 'You are not owner of this coin');
require(!checkDeadLine(tokens[symbolNameIndex]) || tokens[symbolNameIndex].leftover == 0 , 'Token Cannot be withdrawn');
require(tokenBalanceForAddress[symbolNameIndex] - _amountTokens >= 0 , "overflow error");
require(<FILL_ME>)
tokenBalanceForAddress[symbolNameIndex] -= _amountTokens;
tokens[symbolNameIndex].leftover = 0;
tokens[symbolNameIndex].state = State.Checkedout;
if(_amountTokens > 0){
require(token.transfer(msg.sender, _amountTokens) == true , "transfer failed");
setHistory(msg.sender , _amountTokens , 'Check Out Token' , tokens[symbolNameIndex].symbol , tokens[symbolNameIndex].decimals);
}
uint256 _siteShare = balanceEthForAddress[msg.sender][symbolNameIndex] * siteShareRatio / 1000;
uint256 _ownerShare = balanceEthForAddress[msg.sender][symbolNameIndex] - _siteShare;
setHistory(msg.sender , _ownerShare , 'Check Out ETH' , 'ETH' , 18 );
setHistory(manager , _siteShare , '(Manager) Site Share For Deposite Token' , 'ETH' , 18);
msg.sender.transfer(_ownerShare);
DexCheckouted(erc20TokenAddress , _ownerShare);
}
function getBalance(address erc20TokenAddress) public constant returns (uint256) {
}
function checkoutRef(uint256 amount) public payable {
}
function getRefBalance(address _ownerAddress) view returns(uint256){
}
///////////////
// Buy Token //
///////////////
function buyToken(address erc20TokenAddress , address refAddress , uint256 _amount) payable returns(bool){
}
function leftover(address erc20TokenAddress , uint256 _amount) public view returns(uint256){
}
function checkDeadLine(Token token) internal returns(bool){
}
function getOwnerTokens(address owner) public view returns(address[] memory , string[] memory , uint256[] memory , uint256[] memory , uint256[] memory , uint256[] memory , uint[] memory ){
}
function getDecimal(address erc20TokenAddress) public view returns(uint256){
}
function getOwnerTokenDetails(address erc20TokenAddress) public view returns(Token){
}
function setHistory(address _owner , uint256 _amount , string _name , string _symbol , uint256 _decimals) public {
}
function getHistory(address _owner) public view returns(string[] , string[] , uint256[] , uint256[] , uint256[]){
}
}
| tokenBalanceForAddress[symbolNameIndex]-_amountTokens<=tokenBalanceForAddress[symbolNameIndex],"Insufficient amount of token" | 387,480 | tokenBalanceForAddress[symbolNameIndex]-_amountTokens<=tokenBalanceForAddress[symbolNameIndex] |
"transfer failed" | pragma solidity ^0.4.18;
pragma experimental ABIEncoderV2;
// ----------------------------------------------------------------------------------------------
// Sample fixed supply token contract
// Enjoy. (c) BokkyPooBah 2017. The MIT Licence.
// ----------------------------------------------------------------------------------------------
import './FixedSupplyToken.sol';
contract TokenSale {
uint256 fee = 0.01 ether;
uint256 symbolNameIndex;
uint256 historyIndex;
//it will divide on 1000
uint256 siteShareRatio = 1;
address manager;
enum State {Waiting , Selling , Ended , Checkedout}
mapping (uint256 => uint) tokenBalanceForAddress;
mapping (address => uint256) refAccount;
mapping (address => mapping(uint256 => uint)) balanceEthForAddress;
mapping (uint256 => Token) tokens;
struct Token {
address tokenContract;
address owner;
string symbolName;
string symbol;
string link;
uint256 amount;
uint256 leftover;
uint256 priceInWie;
uint256 deadline;
uint decimals;
State state;
uint256 referral;
}
mapping (uint256 => History) histories;
struct History{
address owner;
string title;
uint256 amount;
uint256 decimals;
uint256 time;
string symbol;
}
event TokenAdded(address erc20TokenAddress);
event TokenDeposited(address erc20TokenAddress , uint256 amount);
event DexCheckouted(address erc20TokenAddress , uint256 amount);
event RefCheckouted(address ownerAddress , uint256 amount);
event TokenBuyed(address erc20TokenAddress , uint256 amount , address buyer);
function TokenSale() public{
}
///////////////////////
// TOKEN MANAGEMENT //
//////////////////////
function addToken(address erc20TokenAddress , string symbolName , string symbol , string link , uint256 priceInWie , uint decimals , uint256 referral) public payable {
}
function hasToken(address erc20TokenAddress) public constant returns (bool) {
}
function getSymbolIndexByAddress(address erc20TokenAddress) internal returns (uint256) {
}
function getSymbolIndexByAddressOrThrow(address erc20TokenAddress) returns (uint256) {
}
function getAllDex() public view returns(address[] memory , string[] memory , uint256[] memory , uint[] memory , uint256[] memory , string[] memory){
}
////////////////////////////////
// DEPOSIT / WITHDRAWAL TOKEN //
////////////////////////////////
function depositToken(address erc20TokenAddress, uint256 amountTokens , uint256 deadline) public payable {
}
function checkoutDex(address erc20TokenAddress) public payable {
uint256 symbolNameIndex = getSymbolIndexByAddressOrThrow(erc20TokenAddress);
ERC20Interface token = ERC20Interface(tokens[symbolNameIndex].tokenContract);
uint256 _amountTokens = tokens[symbolNameIndex].leftover;
require(tokens[symbolNameIndex].tokenContract != address(0), 'Token is Invalid');
require(tokens[symbolNameIndex].owner == msg.sender , 'You are not owner of this coin');
require(!checkDeadLine(tokens[symbolNameIndex]) || tokens[symbolNameIndex].leftover == 0 , 'Token Cannot be withdrawn');
require(tokenBalanceForAddress[symbolNameIndex] - _amountTokens >= 0 , "overflow error");
require(tokenBalanceForAddress[symbolNameIndex] - _amountTokens <= tokenBalanceForAddress[symbolNameIndex] , "Insufficient amount of token");
tokenBalanceForAddress[symbolNameIndex] -= _amountTokens;
tokens[symbolNameIndex].leftover = 0;
tokens[symbolNameIndex].state = State.Checkedout;
if(_amountTokens > 0){
require(<FILL_ME>)
setHistory(msg.sender , _amountTokens , 'Check Out Token' , tokens[symbolNameIndex].symbol , tokens[symbolNameIndex].decimals);
}
uint256 _siteShare = balanceEthForAddress[msg.sender][symbolNameIndex] * siteShareRatio / 1000;
uint256 _ownerShare = balanceEthForAddress[msg.sender][symbolNameIndex] - _siteShare;
setHistory(msg.sender , _ownerShare , 'Check Out ETH' , 'ETH' , 18 );
setHistory(manager , _siteShare , '(Manager) Site Share For Deposite Token' , 'ETH' , 18);
msg.sender.transfer(_ownerShare);
DexCheckouted(erc20TokenAddress , _ownerShare);
}
function getBalance(address erc20TokenAddress) public constant returns (uint256) {
}
function checkoutRef(uint256 amount) public payable {
}
function getRefBalance(address _ownerAddress) view returns(uint256){
}
///////////////
// Buy Token //
///////////////
function buyToken(address erc20TokenAddress , address refAddress , uint256 _amount) payable returns(bool){
}
function leftover(address erc20TokenAddress , uint256 _amount) public view returns(uint256){
}
function checkDeadLine(Token token) internal returns(bool){
}
function getOwnerTokens(address owner) public view returns(address[] memory , string[] memory , uint256[] memory , uint256[] memory , uint256[] memory , uint256[] memory , uint[] memory ){
}
function getDecimal(address erc20TokenAddress) public view returns(uint256){
}
function getOwnerTokenDetails(address erc20TokenAddress) public view returns(Token){
}
function setHistory(address _owner , uint256 _amount , string _name , string _symbol , uint256 _decimals) public {
}
function getHistory(address _owner) public view returns(string[] , string[] , uint256[] , uint256[] , uint256[]){
}
}
| token.transfer(msg.sender,_amountTokens)==true,"transfer failed" | 387,480 | token.transfer(msg.sender,_amountTokens)==true |
'Insufficient amount of ETH' | pragma solidity ^0.4.18;
pragma experimental ABIEncoderV2;
// ----------------------------------------------------------------------------------------------
// Sample fixed supply token contract
// Enjoy. (c) BokkyPooBah 2017. The MIT Licence.
// ----------------------------------------------------------------------------------------------
import './FixedSupplyToken.sol';
contract TokenSale {
uint256 fee = 0.01 ether;
uint256 symbolNameIndex;
uint256 historyIndex;
//it will divide on 1000
uint256 siteShareRatio = 1;
address manager;
enum State {Waiting , Selling , Ended , Checkedout}
mapping (uint256 => uint) tokenBalanceForAddress;
mapping (address => uint256) refAccount;
mapping (address => mapping(uint256 => uint)) balanceEthForAddress;
mapping (uint256 => Token) tokens;
struct Token {
address tokenContract;
address owner;
string symbolName;
string symbol;
string link;
uint256 amount;
uint256 leftover;
uint256 priceInWie;
uint256 deadline;
uint decimals;
State state;
uint256 referral;
}
mapping (uint256 => History) histories;
struct History{
address owner;
string title;
uint256 amount;
uint256 decimals;
uint256 time;
string symbol;
}
event TokenAdded(address erc20TokenAddress);
event TokenDeposited(address erc20TokenAddress , uint256 amount);
event DexCheckouted(address erc20TokenAddress , uint256 amount);
event RefCheckouted(address ownerAddress , uint256 amount);
event TokenBuyed(address erc20TokenAddress , uint256 amount , address buyer);
function TokenSale() public{
}
///////////////////////
// TOKEN MANAGEMENT //
//////////////////////
function addToken(address erc20TokenAddress , string symbolName , string symbol , string link , uint256 priceInWie , uint decimals , uint256 referral) public payable {
}
function hasToken(address erc20TokenAddress) public constant returns (bool) {
}
function getSymbolIndexByAddress(address erc20TokenAddress) internal returns (uint256) {
}
function getSymbolIndexByAddressOrThrow(address erc20TokenAddress) returns (uint256) {
}
function getAllDex() public view returns(address[] memory , string[] memory , uint256[] memory , uint[] memory , uint256[] memory , string[] memory){
}
////////////////////////////////
// DEPOSIT / WITHDRAWAL TOKEN //
////////////////////////////////
function depositToken(address erc20TokenAddress, uint256 amountTokens , uint256 deadline) public payable {
}
function checkoutDex(address erc20TokenAddress) public payable {
}
function getBalance(address erc20TokenAddress) public constant returns (uint256) {
}
function checkoutRef(uint256 amount) public payable {
amount = amount;
require(<FILL_ME>)
refAccount[msg.sender] -= amount;
setHistory(msg.sender , amount , 'Check Out Referral' , 'ETH' , 18 );
msg.sender.transfer(amount);
RefCheckouted(msg.sender , amount);
}
function getRefBalance(address _ownerAddress) view returns(uint256){
}
///////////////
// Buy Token //
///////////////
function buyToken(address erc20TokenAddress , address refAddress , uint256 _amount) payable returns(bool){
}
function leftover(address erc20TokenAddress , uint256 _amount) public view returns(uint256){
}
function checkDeadLine(Token token) internal returns(bool){
}
function getOwnerTokens(address owner) public view returns(address[] memory , string[] memory , uint256[] memory , uint256[] memory , uint256[] memory , uint256[] memory , uint[] memory ){
}
function getDecimal(address erc20TokenAddress) public view returns(uint256){
}
function getOwnerTokenDetails(address erc20TokenAddress) public view returns(Token){
}
function setHistory(address _owner , uint256 _amount , string _name , string _symbol , uint256 _decimals) public {
}
function getHistory(address _owner) public view returns(string[] , string[] , uint256[] , uint256[] , uint256[]){
}
}
| refAccount[msg.sender]>=amount,'Insufficient amount of ETH' | 387,480 | refAccount[msg.sender]>=amount |
"Incorrect Eth Amount" | pragma solidity ^0.4.18;
pragma experimental ABIEncoderV2;
// ----------------------------------------------------------------------------------------------
// Sample fixed supply token contract
// Enjoy. (c) BokkyPooBah 2017. The MIT Licence.
// ----------------------------------------------------------------------------------------------
import './FixedSupplyToken.sol';
contract TokenSale {
uint256 fee = 0.01 ether;
uint256 symbolNameIndex;
uint256 historyIndex;
//it will divide on 1000
uint256 siteShareRatio = 1;
address manager;
enum State {Waiting , Selling , Ended , Checkedout}
mapping (uint256 => uint) tokenBalanceForAddress;
mapping (address => uint256) refAccount;
mapping (address => mapping(uint256 => uint)) balanceEthForAddress;
mapping (uint256 => Token) tokens;
struct Token {
address tokenContract;
address owner;
string symbolName;
string symbol;
string link;
uint256 amount;
uint256 leftover;
uint256 priceInWie;
uint256 deadline;
uint decimals;
State state;
uint256 referral;
}
mapping (uint256 => History) histories;
struct History{
address owner;
string title;
uint256 amount;
uint256 decimals;
uint256 time;
string symbol;
}
event TokenAdded(address erc20TokenAddress);
event TokenDeposited(address erc20TokenAddress , uint256 amount);
event DexCheckouted(address erc20TokenAddress , uint256 amount);
event RefCheckouted(address ownerAddress , uint256 amount);
event TokenBuyed(address erc20TokenAddress , uint256 amount , address buyer);
function TokenSale() public{
}
///////////////////////
// TOKEN MANAGEMENT //
//////////////////////
function addToken(address erc20TokenAddress , string symbolName , string symbol , string link , uint256 priceInWie , uint decimals , uint256 referral) public payable {
}
function hasToken(address erc20TokenAddress) public constant returns (bool) {
}
function getSymbolIndexByAddress(address erc20TokenAddress) internal returns (uint256) {
}
function getSymbolIndexByAddressOrThrow(address erc20TokenAddress) returns (uint256) {
}
function getAllDex() public view returns(address[] memory , string[] memory , uint256[] memory , uint[] memory , uint256[] memory , string[] memory){
}
////////////////////////////////
// DEPOSIT / WITHDRAWAL TOKEN //
////////////////////////////////
function depositToken(address erc20TokenAddress, uint256 amountTokens , uint256 deadline) public payable {
}
function checkoutDex(address erc20TokenAddress) public payable {
}
function getBalance(address erc20TokenAddress) public constant returns (uint256) {
}
function checkoutRef(uint256 amount) public payable {
}
function getRefBalance(address _ownerAddress) view returns(uint256){
}
///////////////
// Buy Token //
///////////////
function buyToken(address erc20TokenAddress , address refAddress , uint256 _amount) payable returns(bool){
uint256 symbolNameIndex = getSymbolIndexByAddressOrThrow(erc20TokenAddress);
Token token = tokens[symbolNameIndex];
require(token.state == State.Selling , 'You Can not Buy This Token');
require(<FILL_ME>)
require(checkDeadLine(token) , 'Deadline Passed');
require(token.leftover >= _amount , 'Insufficient Token Amount');
if(erc20TokenAddress != refAddress){
uint256 ref = msg.value * token.referral / 100;
balanceEthForAddress[token.owner][symbolNameIndex] += msg.value - ref;
refAccount[refAddress] += ref;
}else{
balanceEthForAddress[token.owner][symbolNameIndex] += msg.value;
}
ERC20Interface ERC20token = ERC20Interface(tokens[symbolNameIndex].tokenContract);
ERC20token.approve(address(this) , _amount);
require(ERC20token.transferFrom(address(this) , msg.sender , _amount) == true , 'Insufficient Token Amount');
setHistory(msg.sender , _amount , 'Buy Token' , token.symbol , token.decimals);
token.leftover -= _amount;
tokenBalanceForAddress[symbolNameIndex] -= _amount;
if(token.leftover == 0){
token.state = State.Ended;
}
TokenBuyed(erc20TokenAddress , _amount , msg.sender);
return true;
}
function leftover(address erc20TokenAddress , uint256 _amount) public view returns(uint256){
}
function checkDeadLine(Token token) internal returns(bool){
}
function getOwnerTokens(address owner) public view returns(address[] memory , string[] memory , uint256[] memory , uint256[] memory , uint256[] memory , uint256[] memory , uint[] memory ){
}
function getDecimal(address erc20TokenAddress) public view returns(uint256){
}
function getOwnerTokenDetails(address erc20TokenAddress) public view returns(Token){
}
function setHistory(address _owner , uint256 _amount , string _name , string _symbol , uint256 _decimals) public {
}
function getHistory(address _owner) public view returns(string[] , string[] , uint256[] , uint256[] , uint256[]){
}
}
| (_amount*token.priceInWie)/(10**token.decimals)==msg.value,"Incorrect Eth Amount" | 387,480 | (_amount*token.priceInWie)/(10**token.decimals)==msg.value |
'Deadline Passed' | pragma solidity ^0.4.18;
pragma experimental ABIEncoderV2;
// ----------------------------------------------------------------------------------------------
// Sample fixed supply token contract
// Enjoy. (c) BokkyPooBah 2017. The MIT Licence.
// ----------------------------------------------------------------------------------------------
import './FixedSupplyToken.sol';
contract TokenSale {
uint256 fee = 0.01 ether;
uint256 symbolNameIndex;
uint256 historyIndex;
//it will divide on 1000
uint256 siteShareRatio = 1;
address manager;
enum State {Waiting , Selling , Ended , Checkedout}
mapping (uint256 => uint) tokenBalanceForAddress;
mapping (address => uint256) refAccount;
mapping (address => mapping(uint256 => uint)) balanceEthForAddress;
mapping (uint256 => Token) tokens;
struct Token {
address tokenContract;
address owner;
string symbolName;
string symbol;
string link;
uint256 amount;
uint256 leftover;
uint256 priceInWie;
uint256 deadline;
uint decimals;
State state;
uint256 referral;
}
mapping (uint256 => History) histories;
struct History{
address owner;
string title;
uint256 amount;
uint256 decimals;
uint256 time;
string symbol;
}
event TokenAdded(address erc20TokenAddress);
event TokenDeposited(address erc20TokenAddress , uint256 amount);
event DexCheckouted(address erc20TokenAddress , uint256 amount);
event RefCheckouted(address ownerAddress , uint256 amount);
event TokenBuyed(address erc20TokenAddress , uint256 amount , address buyer);
function TokenSale() public{
}
///////////////////////
// TOKEN MANAGEMENT //
//////////////////////
function addToken(address erc20TokenAddress , string symbolName , string symbol , string link , uint256 priceInWie , uint decimals , uint256 referral) public payable {
}
function hasToken(address erc20TokenAddress) public constant returns (bool) {
}
function getSymbolIndexByAddress(address erc20TokenAddress) internal returns (uint256) {
}
function getSymbolIndexByAddressOrThrow(address erc20TokenAddress) returns (uint256) {
}
function getAllDex() public view returns(address[] memory , string[] memory , uint256[] memory , uint[] memory , uint256[] memory , string[] memory){
}
////////////////////////////////
// DEPOSIT / WITHDRAWAL TOKEN //
////////////////////////////////
function depositToken(address erc20TokenAddress, uint256 amountTokens , uint256 deadline) public payable {
}
function checkoutDex(address erc20TokenAddress) public payable {
}
function getBalance(address erc20TokenAddress) public constant returns (uint256) {
}
function checkoutRef(uint256 amount) public payable {
}
function getRefBalance(address _ownerAddress) view returns(uint256){
}
///////////////
// Buy Token //
///////////////
function buyToken(address erc20TokenAddress , address refAddress , uint256 _amount) payable returns(bool){
uint256 symbolNameIndex = getSymbolIndexByAddressOrThrow(erc20TokenAddress);
Token token = tokens[symbolNameIndex];
require(token.state == State.Selling , 'You Can not Buy This Token');
require((_amount * token.priceInWie) / (10 ** token.decimals) == msg.value , "Incorrect Eth Amount");
require(<FILL_ME>)
require(token.leftover >= _amount , 'Insufficient Token Amount');
if(erc20TokenAddress != refAddress){
uint256 ref = msg.value * token.referral / 100;
balanceEthForAddress[token.owner][symbolNameIndex] += msg.value - ref;
refAccount[refAddress] += ref;
}else{
balanceEthForAddress[token.owner][symbolNameIndex] += msg.value;
}
ERC20Interface ERC20token = ERC20Interface(tokens[symbolNameIndex].tokenContract);
ERC20token.approve(address(this) , _amount);
require(ERC20token.transferFrom(address(this) , msg.sender , _amount) == true , 'Insufficient Token Amount');
setHistory(msg.sender , _amount , 'Buy Token' , token.symbol , token.decimals);
token.leftover -= _amount;
tokenBalanceForAddress[symbolNameIndex] -= _amount;
if(token.leftover == 0){
token.state = State.Ended;
}
TokenBuyed(erc20TokenAddress , _amount , msg.sender);
return true;
}
function leftover(address erc20TokenAddress , uint256 _amount) public view returns(uint256){
}
function checkDeadLine(Token token) internal returns(bool){
}
function getOwnerTokens(address owner) public view returns(address[] memory , string[] memory , uint256[] memory , uint256[] memory , uint256[] memory , uint256[] memory , uint[] memory ){
}
function getDecimal(address erc20TokenAddress) public view returns(uint256){
}
function getOwnerTokenDetails(address erc20TokenAddress) public view returns(Token){
}
function setHistory(address _owner , uint256 _amount , string _name , string _symbol , uint256 _decimals) public {
}
function getHistory(address _owner) public view returns(string[] , string[] , uint256[] , uint256[] , uint256[]){
}
}
| checkDeadLine(token),'Deadline Passed' | 387,480 | checkDeadLine(token) |
'Insufficient Token Amount' | pragma solidity ^0.4.18;
pragma experimental ABIEncoderV2;
// ----------------------------------------------------------------------------------------------
// Sample fixed supply token contract
// Enjoy. (c) BokkyPooBah 2017. The MIT Licence.
// ----------------------------------------------------------------------------------------------
import './FixedSupplyToken.sol';
contract TokenSale {
uint256 fee = 0.01 ether;
uint256 symbolNameIndex;
uint256 historyIndex;
//it will divide on 1000
uint256 siteShareRatio = 1;
address manager;
enum State {Waiting , Selling , Ended , Checkedout}
mapping (uint256 => uint) tokenBalanceForAddress;
mapping (address => uint256) refAccount;
mapping (address => mapping(uint256 => uint)) balanceEthForAddress;
mapping (uint256 => Token) tokens;
struct Token {
address tokenContract;
address owner;
string symbolName;
string symbol;
string link;
uint256 amount;
uint256 leftover;
uint256 priceInWie;
uint256 deadline;
uint decimals;
State state;
uint256 referral;
}
mapping (uint256 => History) histories;
struct History{
address owner;
string title;
uint256 amount;
uint256 decimals;
uint256 time;
string symbol;
}
event TokenAdded(address erc20TokenAddress);
event TokenDeposited(address erc20TokenAddress , uint256 amount);
event DexCheckouted(address erc20TokenAddress , uint256 amount);
event RefCheckouted(address ownerAddress , uint256 amount);
event TokenBuyed(address erc20TokenAddress , uint256 amount , address buyer);
function TokenSale() public{
}
///////////////////////
// TOKEN MANAGEMENT //
//////////////////////
function addToken(address erc20TokenAddress , string symbolName , string symbol , string link , uint256 priceInWie , uint decimals , uint256 referral) public payable {
}
function hasToken(address erc20TokenAddress) public constant returns (bool) {
}
function getSymbolIndexByAddress(address erc20TokenAddress) internal returns (uint256) {
}
function getSymbolIndexByAddressOrThrow(address erc20TokenAddress) returns (uint256) {
}
function getAllDex() public view returns(address[] memory , string[] memory , uint256[] memory , uint[] memory , uint256[] memory , string[] memory){
}
////////////////////////////////
// DEPOSIT / WITHDRAWAL TOKEN //
////////////////////////////////
function depositToken(address erc20TokenAddress, uint256 amountTokens , uint256 deadline) public payable {
}
function checkoutDex(address erc20TokenAddress) public payable {
}
function getBalance(address erc20TokenAddress) public constant returns (uint256) {
}
function checkoutRef(uint256 amount) public payable {
}
function getRefBalance(address _ownerAddress) view returns(uint256){
}
///////////////
// Buy Token //
///////////////
function buyToken(address erc20TokenAddress , address refAddress , uint256 _amount) payable returns(bool){
uint256 symbolNameIndex = getSymbolIndexByAddressOrThrow(erc20TokenAddress);
Token token = tokens[symbolNameIndex];
require(token.state == State.Selling , 'You Can not Buy This Token');
require((_amount * token.priceInWie) / (10 ** token.decimals) == msg.value , "Incorrect Eth Amount");
require(checkDeadLine(token) , 'Deadline Passed');
require(token.leftover >= _amount , 'Insufficient Token Amount');
if(erc20TokenAddress != refAddress){
uint256 ref = msg.value * token.referral / 100;
balanceEthForAddress[token.owner][symbolNameIndex] += msg.value - ref;
refAccount[refAddress] += ref;
}else{
balanceEthForAddress[token.owner][symbolNameIndex] += msg.value;
}
ERC20Interface ERC20token = ERC20Interface(tokens[symbolNameIndex].tokenContract);
ERC20token.approve(address(this) , _amount);
require(<FILL_ME>)
setHistory(msg.sender , _amount , 'Buy Token' , token.symbol , token.decimals);
token.leftover -= _amount;
tokenBalanceForAddress[symbolNameIndex] -= _amount;
if(token.leftover == 0){
token.state = State.Ended;
}
TokenBuyed(erc20TokenAddress , _amount , msg.sender);
return true;
}
function leftover(address erc20TokenAddress , uint256 _amount) public view returns(uint256){
}
function checkDeadLine(Token token) internal returns(bool){
}
function getOwnerTokens(address owner) public view returns(address[] memory , string[] memory , uint256[] memory , uint256[] memory , uint256[] memory , uint256[] memory , uint[] memory ){
}
function getDecimal(address erc20TokenAddress) public view returns(uint256){
}
function getOwnerTokenDetails(address erc20TokenAddress) public view returns(Token){
}
function setHistory(address _owner , uint256 _amount , string _name , string _symbol , uint256 _decimals) public {
}
function getHistory(address _owner) public view returns(string[] , string[] , uint256[] , uint256[] , uint256[]){
}
}
| ERC20token.transferFrom(address(this),msg.sender,_amount)==true,'Insufficient Token Amount' | 387,480 | ERC20token.transferFrom(address(this),msg.sender,_amount)==true |
null | pragma solidity ^0.5.0;
contract Ownable
{
bool private stopped;
address private _owner;
address private _master;
event Stopped();
event Started();
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event MasterRoleTransferred(address indexed previousMaster, address indexed newMaster);
constructor () internal
{
}
function owner() public view returns (address)
{
}
function master() public view returns (address)
{
}
modifier onlyOwner()
{
}
modifier onlyMaster()
{
require(<FILL_ME>)
_;
}
modifier onlyWhenNotStopped()
{
}
function isOwner() public view returns (bool)
{
}
function isMaster() public view returns (bool)
{
}
function transferOwnership(address newOwner) external onlyOwner
{
}
function transferMasterRole(address newMaster) external onlyOwner
{
}
function isStopped() public view returns (bool)
{
}
function stop() public onlyOwner
{
}
function start() public onlyOwner
{
}
function _transferOwnership(address newOwner) internal
{
}
function _transferMasterRole(address newMaster) internal
{
}
function _stop() internal
{
}
function _start() internal
{
}
}
contract ChannelWallet is Ownable
{
mapping(string => address) private addressMap;
mapping(string => address) private ownership;
event SetAddress(string channelId, address _address);
event UpdateAddress(string from, string to);
event DeleteAddress(string account);
constructor (address newMaster) public
{
}
function version() external pure returns(string memory)
{
}
function getAddress(string calldata channelId) external view returns (address)
{
}
function setAddress(string calldata channelId, string calldata ownerId, address _address) external onlyMaster onlyWhenNotStopped
{
}
function updateChannel(string calldata from, string calldata to, address _address) external onlyMaster onlyWhenNotStopped
{
}
function deleteChannel(string calldata channelId) external onlyMaster onlyWhenNotStopped
{
}
function getAddressOfOwner(string calldata ownerId) external onlyMaster view returns (address)
{
}
}
| isMaster()||isOwner() | 387,510 | isMaster()||isOwner() |
null | pragma solidity ^0.5.0;
contract Ownable
{
bool private stopped;
address private _owner;
address private _master;
event Stopped();
event Started();
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event MasterRoleTransferred(address indexed previousMaster, address indexed newMaster);
constructor () internal
{
}
function owner() public view returns (address)
{
}
function master() public view returns (address)
{
}
modifier onlyOwner()
{
}
modifier onlyMaster()
{
}
modifier onlyWhenNotStopped()
{
}
function isOwner() public view returns (bool)
{
}
function isMaster() public view returns (bool)
{
}
function transferOwnership(address newOwner) external onlyOwner
{
}
function transferMasterRole(address newMaster) external onlyOwner
{
}
function isStopped() public view returns (bool)
{
}
function stop() public onlyOwner
{
}
function start() public onlyOwner
{
}
function _transferOwnership(address newOwner) internal
{
}
function _transferMasterRole(address newMaster) internal
{
}
function _stop() internal
{
}
function _start() internal
{
}
}
contract ChannelWallet is Ownable
{
mapping(string => address) private addressMap;
mapping(string => address) private ownership;
event SetAddress(string channelId, address _address);
event UpdateAddress(string from, string to);
event DeleteAddress(string account);
constructor (address newMaster) public
{
}
function version() external pure returns(string memory)
{
}
function getAddress(string calldata channelId) external view returns (address)
{
}
function setAddress(string calldata channelId, string calldata ownerId, address _address) external onlyMaster onlyWhenNotStopped
{
require(<FILL_ME>)
require(bytes(ownerId).length > 0);
ownership[ownerId] = _address;
addressMap[channelId] = _address;
emit SetAddress(channelId, _address);
}
function updateChannel(string calldata from, string calldata to, address _address) external onlyMaster onlyWhenNotStopped
{
}
function deleteChannel(string calldata channelId) external onlyMaster onlyWhenNotStopped
{
}
function getAddressOfOwner(string calldata ownerId) external onlyMaster view returns (address)
{
}
}
| bytes(channelId).length>0 | 387,510 | bytes(channelId).length>0 |
null | pragma solidity ^0.5.0;
contract Ownable
{
bool private stopped;
address private _owner;
address private _master;
event Stopped();
event Started();
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event MasterRoleTransferred(address indexed previousMaster, address indexed newMaster);
constructor () internal
{
}
function owner() public view returns (address)
{
}
function master() public view returns (address)
{
}
modifier onlyOwner()
{
}
modifier onlyMaster()
{
}
modifier onlyWhenNotStopped()
{
}
function isOwner() public view returns (bool)
{
}
function isMaster() public view returns (bool)
{
}
function transferOwnership(address newOwner) external onlyOwner
{
}
function transferMasterRole(address newMaster) external onlyOwner
{
}
function isStopped() public view returns (bool)
{
}
function stop() public onlyOwner
{
}
function start() public onlyOwner
{
}
function _transferOwnership(address newOwner) internal
{
}
function _transferMasterRole(address newMaster) internal
{
}
function _stop() internal
{
}
function _start() internal
{
}
}
contract ChannelWallet is Ownable
{
mapping(string => address) private addressMap;
mapping(string => address) private ownership;
event SetAddress(string channelId, address _address);
event UpdateAddress(string from, string to);
event DeleteAddress(string account);
constructor (address newMaster) public
{
}
function version() external pure returns(string memory)
{
}
function getAddress(string calldata channelId) external view returns (address)
{
}
function setAddress(string calldata channelId, string calldata ownerId, address _address) external onlyMaster onlyWhenNotStopped
{
require(bytes(channelId).length > 0);
require(<FILL_ME>)
ownership[ownerId] = _address;
addressMap[channelId] = _address;
emit SetAddress(channelId, _address);
}
function updateChannel(string calldata from, string calldata to, address _address) external onlyMaster onlyWhenNotStopped
{
}
function deleteChannel(string calldata channelId) external onlyMaster onlyWhenNotStopped
{
}
function getAddressOfOwner(string calldata ownerId) external onlyMaster view returns (address)
{
}
}
| bytes(ownerId).length>0 | 387,510 | bytes(ownerId).length>0 |
null | pragma solidity ^0.5.0;
contract Ownable
{
bool private stopped;
address private _owner;
address private _master;
event Stopped();
event Started();
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event MasterRoleTransferred(address indexed previousMaster, address indexed newMaster);
constructor () internal
{
}
function owner() public view returns (address)
{
}
function master() public view returns (address)
{
}
modifier onlyOwner()
{
}
modifier onlyMaster()
{
}
modifier onlyWhenNotStopped()
{
}
function isOwner() public view returns (bool)
{
}
function isMaster() public view returns (bool)
{
}
function transferOwnership(address newOwner) external onlyOwner
{
}
function transferMasterRole(address newMaster) external onlyOwner
{
}
function isStopped() public view returns (bool)
{
}
function stop() public onlyOwner
{
}
function start() public onlyOwner
{
}
function _transferOwnership(address newOwner) internal
{
}
function _transferMasterRole(address newMaster) internal
{
}
function _stop() internal
{
}
function _start() internal
{
}
}
contract ChannelWallet is Ownable
{
mapping(string => address) private addressMap;
mapping(string => address) private ownership;
event SetAddress(string channelId, address _address);
event UpdateAddress(string from, string to);
event DeleteAddress(string account);
constructor (address newMaster) public
{
}
function version() external pure returns(string memory)
{
}
function getAddress(string calldata channelId) external view returns (address)
{
}
function setAddress(string calldata channelId, string calldata ownerId, address _address) external onlyMaster onlyWhenNotStopped
{
}
function updateChannel(string calldata from, string calldata to, address _address) external onlyMaster onlyWhenNotStopped
{
require(<FILL_ME>)
require(bytes(to).length > 0);
require(addressMap[to] == address(0));
addressMap[to] = _address;
addressMap[from] = address(0);
emit UpdateAddress(from, to);
}
function deleteChannel(string calldata channelId) external onlyMaster onlyWhenNotStopped
{
}
function getAddressOfOwner(string calldata ownerId) external onlyMaster view returns (address)
{
}
}
| bytes(from).length>0 | 387,510 | bytes(from).length>0 |
null | pragma solidity ^0.5.0;
contract Ownable
{
bool private stopped;
address private _owner;
address private _master;
event Stopped();
event Started();
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event MasterRoleTransferred(address indexed previousMaster, address indexed newMaster);
constructor () internal
{
}
function owner() public view returns (address)
{
}
function master() public view returns (address)
{
}
modifier onlyOwner()
{
}
modifier onlyMaster()
{
}
modifier onlyWhenNotStopped()
{
}
function isOwner() public view returns (bool)
{
}
function isMaster() public view returns (bool)
{
}
function transferOwnership(address newOwner) external onlyOwner
{
}
function transferMasterRole(address newMaster) external onlyOwner
{
}
function isStopped() public view returns (bool)
{
}
function stop() public onlyOwner
{
}
function start() public onlyOwner
{
}
function _transferOwnership(address newOwner) internal
{
}
function _transferMasterRole(address newMaster) internal
{
}
function _stop() internal
{
}
function _start() internal
{
}
}
contract ChannelWallet is Ownable
{
mapping(string => address) private addressMap;
mapping(string => address) private ownership;
event SetAddress(string channelId, address _address);
event UpdateAddress(string from, string to);
event DeleteAddress(string account);
constructor (address newMaster) public
{
}
function version() external pure returns(string memory)
{
}
function getAddress(string calldata channelId) external view returns (address)
{
}
function setAddress(string calldata channelId, string calldata ownerId, address _address) external onlyMaster onlyWhenNotStopped
{
}
function updateChannel(string calldata from, string calldata to, address _address) external onlyMaster onlyWhenNotStopped
{
require(bytes(from).length > 0);
require(<FILL_ME>)
require(addressMap[to] == address(0));
addressMap[to] = _address;
addressMap[from] = address(0);
emit UpdateAddress(from, to);
}
function deleteChannel(string calldata channelId) external onlyMaster onlyWhenNotStopped
{
}
function getAddressOfOwner(string calldata ownerId) external onlyMaster view returns (address)
{
}
}
| bytes(to).length>0 | 387,510 | bytes(to).length>0 |
null | pragma solidity ^0.5.0;
contract Ownable
{
bool private stopped;
address private _owner;
address private _master;
event Stopped();
event Started();
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event MasterRoleTransferred(address indexed previousMaster, address indexed newMaster);
constructor () internal
{
}
function owner() public view returns (address)
{
}
function master() public view returns (address)
{
}
modifier onlyOwner()
{
}
modifier onlyMaster()
{
}
modifier onlyWhenNotStopped()
{
}
function isOwner() public view returns (bool)
{
}
function isMaster() public view returns (bool)
{
}
function transferOwnership(address newOwner) external onlyOwner
{
}
function transferMasterRole(address newMaster) external onlyOwner
{
}
function isStopped() public view returns (bool)
{
}
function stop() public onlyOwner
{
}
function start() public onlyOwner
{
}
function _transferOwnership(address newOwner) internal
{
}
function _transferMasterRole(address newMaster) internal
{
}
function _stop() internal
{
}
function _start() internal
{
}
}
contract ChannelWallet is Ownable
{
mapping(string => address) private addressMap;
mapping(string => address) private ownership;
event SetAddress(string channelId, address _address);
event UpdateAddress(string from, string to);
event DeleteAddress(string account);
constructor (address newMaster) public
{
}
function version() external pure returns(string memory)
{
}
function getAddress(string calldata channelId) external view returns (address)
{
}
function setAddress(string calldata channelId, string calldata ownerId, address _address) external onlyMaster onlyWhenNotStopped
{
}
function updateChannel(string calldata from, string calldata to, address _address) external onlyMaster onlyWhenNotStopped
{
require(bytes(from).length > 0);
require(bytes(to).length > 0);
require(<FILL_ME>)
addressMap[to] = _address;
addressMap[from] = address(0);
emit UpdateAddress(from, to);
}
function deleteChannel(string calldata channelId) external onlyMaster onlyWhenNotStopped
{
}
function getAddressOfOwner(string calldata ownerId) external onlyMaster view returns (address)
{
}
}
| addressMap[to]==address(0) | 387,510 | addressMap[to]==address(0) |
'cannot burn' | pragma solidity ^0.5.0;
contract Burner is Withdrawable {
using SafeMath for uint256;
IEDOToken edo;
address public unburnedDestination;
uint256 public percentageToBurn;
bool public paused;
event Burn(uint burnedAmount, uint savedAmount);
constructor(address edoTokenAddress, address unburnedDestination_, uint percentageToBurn_) public {
}
function setPercentageToBurn (uint value) onlyOwner external {
}
function setUnburnedDestination (address value) onlyOwner external {
}
function setPaused (bool value) onlyOwner external {
}
function burn() external {
require(!paused, 'cannot burn when paused');
uint total = edo.balanceOf(address(this));
uint toBurn = total.mul(percentageToBurn).div(100);
require(<FILL_ME>)
uint notBurned = edo.balanceOf(address(this));
require(edo.transfer(unburnedDestination, notBurned), 'cannot transfer unburned tokens');
emit Burn(toBurn, notBurned);
}
}
| edo.burn(toBurn),'cannot burn' | 387,516 | edo.burn(toBurn) |
'cannot transfer unburned tokens' | pragma solidity ^0.5.0;
contract Burner is Withdrawable {
using SafeMath for uint256;
IEDOToken edo;
address public unburnedDestination;
uint256 public percentageToBurn;
bool public paused;
event Burn(uint burnedAmount, uint savedAmount);
constructor(address edoTokenAddress, address unburnedDestination_, uint percentageToBurn_) public {
}
function setPercentageToBurn (uint value) onlyOwner external {
}
function setUnburnedDestination (address value) onlyOwner external {
}
function setPaused (bool value) onlyOwner external {
}
function burn() external {
require(!paused, 'cannot burn when paused');
uint total = edo.balanceOf(address(this));
uint toBurn = total.mul(percentageToBurn).div(100);
require(edo.burn(toBurn), 'cannot burn');
uint notBurned = edo.balanceOf(address(this));
require(<FILL_ME>)
emit Burn(toBurn, notBurned);
}
}
| edo.transfer(unburnedDestination,notBurned),'cannot transfer unburned tokens' | 387,516 | edo.transfer(unburnedDestination,notBurned) |
"only externally accounts" | pragma solidity 0.4.25;
/**
*
* This is s hedge fund based on the cryptocurrencies that helps to all investors in our fund
* to Minimize the risks of investing in cryptocurrencies and
* Maximize your ETH profits from 9.99% per day, 299.7% per month, 3596.4% per year.
*
*
*/
library Math {
function min(uint a, uint b) internal pure returns(uint) {
}
}
library Zero {
function requireNotZero(address addr) internal pure {
}
function requireNotZero(uint val) internal pure {
}
function notZero(address addr) internal pure returns(bool) {
}
function isZero(address addr) internal pure returns(bool) {
}
function isZero(uint a) internal pure returns(bool) {
}
function notZero(uint a) internal pure returns(bool) {
}
}
library Percent {
struct percent {
uint num;
uint den;
}
function mul(percent storage p, uint a) internal view returns (uint) {
}
function div(percent storage p, uint a) internal view returns (uint) {
}
function sub(percent storage p, uint a) internal view returns (uint) {
}
function add(percent storage p, uint a) internal view returns (uint) {
}
function toMemory(percent storage p) internal view returns (Percent.percent memory) {
}
function mmul(percent memory p, uint a) internal pure returns (uint) {
}
function mdiv(percent memory p, uint a) internal pure returns (uint) {
}
function msub(percent memory p, uint a) internal pure returns (uint) {
}
function madd(percent memory p, uint a) internal pure returns (uint) {
}
}
library Address {
function toAddress(bytes source) internal pure returns(address addr) {
}
function isNotContract(address addr) internal view returns(bool) {
}
}
/**
* @title SafeMath
* @dev Math operations with safety checks that revert on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, reverts on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two numbers truncating the quotient, reverts on division by zero.
*/
function div(uint256 _a, uint256 _b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 _a, uint256 _b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, reverts on overflow.
*/
function add(uint256 _a, uint256 _b) internal pure returns (uint256) {
}
/**
* @dev Divides two numbers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract Accessibility {
address private owner;
modifier onlyOwner() {
}
constructor() public {
}
function disown() internal {
}
}
contract Rev1Storage {
function investorShortInfo(address addr) public view returns(uint value, uint refBonus);
}
contract Rev2Storage {
function investorInfo(address addr) public view returns(uint investment, uint paymentTime);
}
library PrivateEntrance {
using PrivateEntrance for privateEntrance;
using Math for uint;
struct privateEntrance {
Rev1Storage rev1Storage;
Rev2Storage rev2Storage;
uint investorMaxInvestment;
uint endTimestamp;
mapping(address=>bool) hasAccess;
}
function isActive(privateEntrance storage pe) internal view returns(bool) {
}
function maxInvestmentFor(privateEntrance storage pe, address investorAddr) internal view returns(uint) {
}
function provideAccessFor(privateEntrance storage pe, address[] addrs) internal {
}
}
contract InvestorsStorage is Accessibility {
struct Investor {
uint investment;
uint paymentTime;
}
uint public size;
mapping (address => Investor) private investors;
function isInvestor(address addr) public view returns (bool) {
}
function investorInfo(address addr) public view returns(uint investment, uint paymentTime) {
}
function newInvestor(address addr, uint investment, uint paymentTime) public onlyOwner returns (bool) {
}
function addInvestment(address addr, uint investment) public onlyOwner returns (bool) {
}
function setPaymentTime(address addr, uint paymentTime) public onlyOwner returns (bool) {
}
function disqalify(address addr) public onlyOwner returns (bool) {
}
}
library RapidGrowthProtection {
using RapidGrowthProtection for rapidGrowthProtection;
struct rapidGrowthProtection {
uint startTimestamp;
uint maxDailyTotalInvestment;
uint8 activityDays;
mapping(uint8 => uint) dailyTotalInvestment;
}
function maxInvestmentAtNow(rapidGrowthProtection storage rgp) internal view returns(uint) {
}
function isActive(rapidGrowthProtection storage rgp) internal view returns(bool) {
}
function saveInvestment(rapidGrowthProtection storage rgp, uint investment) internal returns(bool) {
}
function startAt(rapidGrowthProtection storage rgp, uint timestamp) internal {
}
function currDay(rapidGrowthProtection storage rgp) internal view returns(uint day) {
}
}
contract HedgeFund is Accessibility {
using RapidGrowthProtection for RapidGrowthProtection.rapidGrowthProtection;
using PrivateEntrance for PrivateEntrance.privateEntrance;
using Percent for Percent.percent;
using SafeMath for uint;
using Math for uint;
// easy read for investors
using Address for *;
using Zero for *;
RapidGrowthProtection.rapidGrowthProtection private m_rgp;
PrivateEntrance.privateEntrance private m_privEnter;
mapping(address => bool) private m_referrals;
InvestorsStorage private m_investors;
// automatically generates getters
uint public constant minInvesment = 10 finney;
uint public constant maxBalance = 333e5 ether;
address public advertisingAddress;
address public adminsAddress;
uint public investmentsNumber;
uint public waveStartup;
// percents
Percent.percent private m_5_percent = Percent.percent(999,10000); // 999/10000 *100% = 9.99%
Percent.percent private m_6_percent = Percent.percent(15,100); // 15/100 *100% = 15%
Percent.percent private m_7_percent = Percent.percent(19,100); // 19/100 *100% = 19%
Percent.percent private m_8_percent = Percent.percent(18,100); // 18/100 *100% = 12%
Percent.percent private m_9_percent = Percent.percent(13,100); // 13/100 *100% = 13%
Percent.percent private m_10_percent = Percent.percent(14,100); // 14/100 *100% = 14%
Percent.percent private m_11_percent = Percent.percent(15,100); // 15/100 *100% = 15%
Percent.percent private m_12_percent = Percent.percent(16,100); // 16/100 *100% = 16%
Percent.percent private m_referal_percent = Percent.percent(10,100); // 10/100 *100% = 10%
Percent.percent private m_referrer_percent = Percent.percent(10,100); // 10/100 *100% = 10%
Percent.percent private m_referrer_percentMax = Percent.percent(15,100); // 15/100 *100% = 15%
Percent.percent private m_adminsPercent = Percent.percent(55, 1000); // 55/100 *100% = 5.5%
Percent.percent private m_advertisingPercent = Percent.percent(95, 1000);// 95/1000 *100% = 9.5%
// more events for easy read from blockchain
event LogPEInit(uint when, address rev1Storage, address rev2Storage, uint investorMaxInvestment, uint endTimestamp);
event LogSendExcessOfEther(address indexed addr, uint when, uint value, uint investment, uint excess);
event LogNewReferral(address indexed addr, address indexed referrerAddr, uint when, uint refBonus);
event LogRGPInit(uint when, uint startTimestamp, uint maxDailyTotalInvestment, uint activityDays);
event LogRGPInvestment(address indexed addr, uint when, uint investment, uint indexed day);
event LogNewInvesment(address indexed addr, uint when, uint investment, uint value);
event LogAutomaticReinvest(address indexed addr, uint when, uint investment);
event LogPayDividends(address indexed addr, uint when, uint dividends);
event LogNewInvestor(address indexed addr, uint when);
event LogBalanceChanged(uint when, uint balance);
event LogNextWave(uint when);
event LogDisown(uint when);
modifier balanceChanged {
}
modifier notFromContract() {
require(<FILL_ME>)
_;
}
constructor() public {
}
function() public payable {
}
function disqualifyAddress(address addr) public onlyOwner {
}
function doDisown() public onlyOwner {
}
function init(address rev1StorageAddr, uint timestamp) public onlyOwner {
}
function setAdvertisingAddress(address addr) public onlyOwner {
}
function setAdminsAddress(address addr) public onlyOwner {
}
function privateEntranceProvideAccessFor(address[] addrs) public onlyOwner {
}
function rapidGrowthProtectionmMaxInvestmentAtNow() public view returns(uint investment) {
}
function investorsNumber() public view returns(uint) {
}
function balanceETH() public view returns(uint) {
}
function advertisingPercent() public view returns(uint numerator, uint denominator) {
}
function adminsPercent() public view returns(uint numerator, uint denominator) {
}
function investorInfo(address investorAddr) public view returns(uint investment, uint paymentTime, bool isReferral) {
}
function investorDividendsAtNow(address investorAddr) public view returns(uint dividends) {
}
function dailyPercentAtNow() public view returns(uint numerator, uint denominator) {
}
function getMyDividends() public notFromContract balanceChanged {
}
function doInvest(address referrerAddr) public payable notFromContract balanceChanged {
}
function getMemInvestor(address investorAddr) internal view returns(InvestorsStorage.Investor memory) {
}
function calcDividends(address investorAddr) internal view returns(uint dividends) {
}
function dailyPercent() internal view returns(Percent.percent memory p) {
}
function nextWave() private {
}
}
| msg.sender.isNotContract(),"only externally accounts" | 387,517 | msg.sender.isNotContract() |
null | pragma solidity 0.4.25;
/**
*
* This is s hedge fund based on the cryptocurrencies that helps to all investors in our fund
* to Minimize the risks of investing in cryptocurrencies and
* Maximize your ETH profits from 9.99% per day, 299.7% per month, 3596.4% per year.
*
*
*/
library Math {
function min(uint a, uint b) internal pure returns(uint) {
}
}
library Zero {
function requireNotZero(address addr) internal pure {
}
function requireNotZero(uint val) internal pure {
}
function notZero(address addr) internal pure returns(bool) {
}
function isZero(address addr) internal pure returns(bool) {
}
function isZero(uint a) internal pure returns(bool) {
}
function notZero(uint a) internal pure returns(bool) {
}
}
library Percent {
struct percent {
uint num;
uint den;
}
function mul(percent storage p, uint a) internal view returns (uint) {
}
function div(percent storage p, uint a) internal view returns (uint) {
}
function sub(percent storage p, uint a) internal view returns (uint) {
}
function add(percent storage p, uint a) internal view returns (uint) {
}
function toMemory(percent storage p) internal view returns (Percent.percent memory) {
}
function mmul(percent memory p, uint a) internal pure returns (uint) {
}
function mdiv(percent memory p, uint a) internal pure returns (uint) {
}
function msub(percent memory p, uint a) internal pure returns (uint) {
}
function madd(percent memory p, uint a) internal pure returns (uint) {
}
}
library Address {
function toAddress(bytes source) internal pure returns(address addr) {
}
function isNotContract(address addr) internal view returns(bool) {
}
}
/**
* @title SafeMath
* @dev Math operations with safety checks that revert on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, reverts on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two numbers truncating the quotient, reverts on division by zero.
*/
function div(uint256 _a, uint256 _b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 _a, uint256 _b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, reverts on overflow.
*/
function add(uint256 _a, uint256 _b) internal pure returns (uint256) {
}
/**
* @dev Divides two numbers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract Accessibility {
address private owner;
modifier onlyOwner() {
}
constructor() public {
}
function disown() internal {
}
}
contract Rev1Storage {
function investorShortInfo(address addr) public view returns(uint value, uint refBonus);
}
contract Rev2Storage {
function investorInfo(address addr) public view returns(uint investment, uint paymentTime);
}
library PrivateEntrance {
using PrivateEntrance for privateEntrance;
using Math for uint;
struct privateEntrance {
Rev1Storage rev1Storage;
Rev2Storage rev2Storage;
uint investorMaxInvestment;
uint endTimestamp;
mapping(address=>bool) hasAccess;
}
function isActive(privateEntrance storage pe) internal view returns(bool) {
}
function maxInvestmentFor(privateEntrance storage pe, address investorAddr) internal view returns(uint) {
}
function provideAccessFor(privateEntrance storage pe, address[] addrs) internal {
}
}
contract InvestorsStorage is Accessibility {
struct Investor {
uint investment;
uint paymentTime;
}
uint public size;
mapping (address => Investor) private investors;
function isInvestor(address addr) public view returns (bool) {
}
function investorInfo(address addr) public view returns(uint investment, uint paymentTime) {
}
function newInvestor(address addr, uint investment, uint paymentTime) public onlyOwner returns (bool) {
}
function addInvestment(address addr, uint investment) public onlyOwner returns (bool) {
}
function setPaymentTime(address addr, uint paymentTime) public onlyOwner returns (bool) {
}
function disqalify(address addr) public onlyOwner returns (bool) {
}
}
library RapidGrowthProtection {
using RapidGrowthProtection for rapidGrowthProtection;
struct rapidGrowthProtection {
uint startTimestamp;
uint maxDailyTotalInvestment;
uint8 activityDays;
mapping(uint8 => uint) dailyTotalInvestment;
}
function maxInvestmentAtNow(rapidGrowthProtection storage rgp) internal view returns(uint) {
}
function isActive(rapidGrowthProtection storage rgp) internal view returns(bool) {
}
function saveInvestment(rapidGrowthProtection storage rgp, uint investment) internal returns(bool) {
}
function startAt(rapidGrowthProtection storage rgp, uint timestamp) internal {
}
function currDay(rapidGrowthProtection storage rgp) internal view returns(uint day) {
}
}
contract HedgeFund is Accessibility {
using RapidGrowthProtection for RapidGrowthProtection.rapidGrowthProtection;
using PrivateEntrance for PrivateEntrance.privateEntrance;
using Percent for Percent.percent;
using SafeMath for uint;
using Math for uint;
// easy read for investors
using Address for *;
using Zero for *;
RapidGrowthProtection.rapidGrowthProtection private m_rgp;
PrivateEntrance.privateEntrance private m_privEnter;
mapping(address => bool) private m_referrals;
InvestorsStorage private m_investors;
// automatically generates getters
uint public constant minInvesment = 10 finney;
uint public constant maxBalance = 333e5 ether;
address public advertisingAddress;
address public adminsAddress;
uint public investmentsNumber;
uint public waveStartup;
// percents
Percent.percent private m_5_percent = Percent.percent(999,10000); // 999/10000 *100% = 9.99%
Percent.percent private m_6_percent = Percent.percent(15,100); // 15/100 *100% = 15%
Percent.percent private m_7_percent = Percent.percent(19,100); // 19/100 *100% = 19%
Percent.percent private m_8_percent = Percent.percent(18,100); // 18/100 *100% = 12%
Percent.percent private m_9_percent = Percent.percent(13,100); // 13/100 *100% = 13%
Percent.percent private m_10_percent = Percent.percent(14,100); // 14/100 *100% = 14%
Percent.percent private m_11_percent = Percent.percent(15,100); // 15/100 *100% = 15%
Percent.percent private m_12_percent = Percent.percent(16,100); // 16/100 *100% = 16%
Percent.percent private m_referal_percent = Percent.percent(10,100); // 10/100 *100% = 10%
Percent.percent private m_referrer_percent = Percent.percent(10,100); // 10/100 *100% = 10%
Percent.percent private m_referrer_percentMax = Percent.percent(15,100); // 15/100 *100% = 15%
Percent.percent private m_adminsPercent = Percent.percent(55, 1000); // 55/100 *100% = 5.5%
Percent.percent private m_advertisingPercent = Percent.percent(95, 1000);// 95/1000 *100% = 9.5%
// more events for easy read from blockchain
event LogPEInit(uint when, address rev1Storage, address rev2Storage, uint investorMaxInvestment, uint endTimestamp);
event LogSendExcessOfEther(address indexed addr, uint when, uint value, uint investment, uint excess);
event LogNewReferral(address indexed addr, address indexed referrerAddr, uint when, uint refBonus);
event LogRGPInit(uint when, uint startTimestamp, uint maxDailyTotalInvestment, uint activityDays);
event LogRGPInvestment(address indexed addr, uint when, uint investment, uint indexed day);
event LogNewInvesment(address indexed addr, uint when, uint investment, uint value);
event LogAutomaticReinvest(address indexed addr, uint when, uint investment);
event LogPayDividends(address indexed addr, uint when, uint dividends);
event LogNewInvestor(address indexed addr, uint when);
event LogBalanceChanged(uint when, uint balance);
event LogNextWave(uint when);
event LogDisown(uint when);
modifier balanceChanged {
}
modifier notFromContract() {
}
constructor() public {
}
function() public payable {
}
function disqualifyAddress(address addr) public onlyOwner {
}
function doDisown() public onlyOwner {
}
function init(address rev1StorageAddr, uint timestamp) public onlyOwner {
}
function setAdvertisingAddress(address addr) public onlyOwner {
}
function setAdminsAddress(address addr) public onlyOwner {
}
function privateEntranceProvideAccessFor(address[] addrs) public onlyOwner {
}
function rapidGrowthProtectionmMaxInvestmentAtNow() public view returns(uint investment) {
}
function investorsNumber() public view returns(uint) {
}
function balanceETH() public view returns(uint) {
}
function advertisingPercent() public view returns(uint numerator, uint denominator) {
}
function adminsPercent() public view returns(uint numerator, uint denominator) {
}
function investorInfo(address investorAddr) public view returns(uint investment, uint paymentTime, bool isReferral) {
}
function investorDividendsAtNow(address investorAddr) public view returns(uint dividends) {
}
function dailyPercentAtNow() public view returns(uint numerator, uint denominator) {
}
function getMyDividends() public notFromContract balanceChanged {
// calculate dividends
//check if 1 day passed after last payment
require(<FILL_ME>)
uint dividends = calcDividends(msg.sender);
require (dividends.notZero(), "cannot to pay zero dividends");
// update investor payment timestamp
assert(m_investors.setPaymentTime(msg.sender, now));
// check enough eth - goto next wave if needed
if (address(this).balance <= dividends) {
nextWave();
dividends = address(this).balance;
}
// transfer dividends to investor
msg.sender.transfer(dividends);
emit LogPayDividends(msg.sender, now, dividends);
}
function doInvest(address referrerAddr) public payable notFromContract balanceChanged {
}
function getMemInvestor(address investorAddr) internal view returns(InvestorsStorage.Investor memory) {
}
function calcDividends(address investorAddr) internal view returns(uint dividends) {
}
function dailyPercent() internal view returns(Percent.percent memory p) {
}
function nextWave() private {
}
}
| now.sub(getMemInvestor(msg.sender).paymentTime)>24hours | 387,517 | now.sub(getMemInvestor(msg.sender).paymentTime)>24hours |
"cannot to pay zero dividends" | pragma solidity 0.4.25;
/**
*
* This is s hedge fund based on the cryptocurrencies that helps to all investors in our fund
* to Minimize the risks of investing in cryptocurrencies and
* Maximize your ETH profits from 9.99% per day, 299.7% per month, 3596.4% per year.
*
*
*/
library Math {
function min(uint a, uint b) internal pure returns(uint) {
}
}
library Zero {
function requireNotZero(address addr) internal pure {
}
function requireNotZero(uint val) internal pure {
}
function notZero(address addr) internal pure returns(bool) {
}
function isZero(address addr) internal pure returns(bool) {
}
function isZero(uint a) internal pure returns(bool) {
}
function notZero(uint a) internal pure returns(bool) {
}
}
library Percent {
struct percent {
uint num;
uint den;
}
function mul(percent storage p, uint a) internal view returns (uint) {
}
function div(percent storage p, uint a) internal view returns (uint) {
}
function sub(percent storage p, uint a) internal view returns (uint) {
}
function add(percent storage p, uint a) internal view returns (uint) {
}
function toMemory(percent storage p) internal view returns (Percent.percent memory) {
}
function mmul(percent memory p, uint a) internal pure returns (uint) {
}
function mdiv(percent memory p, uint a) internal pure returns (uint) {
}
function msub(percent memory p, uint a) internal pure returns (uint) {
}
function madd(percent memory p, uint a) internal pure returns (uint) {
}
}
library Address {
function toAddress(bytes source) internal pure returns(address addr) {
}
function isNotContract(address addr) internal view returns(bool) {
}
}
/**
* @title SafeMath
* @dev Math operations with safety checks that revert on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, reverts on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two numbers truncating the quotient, reverts on division by zero.
*/
function div(uint256 _a, uint256 _b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 _a, uint256 _b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, reverts on overflow.
*/
function add(uint256 _a, uint256 _b) internal pure returns (uint256) {
}
/**
* @dev Divides two numbers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract Accessibility {
address private owner;
modifier onlyOwner() {
}
constructor() public {
}
function disown() internal {
}
}
contract Rev1Storage {
function investorShortInfo(address addr) public view returns(uint value, uint refBonus);
}
contract Rev2Storage {
function investorInfo(address addr) public view returns(uint investment, uint paymentTime);
}
library PrivateEntrance {
using PrivateEntrance for privateEntrance;
using Math for uint;
struct privateEntrance {
Rev1Storage rev1Storage;
Rev2Storage rev2Storage;
uint investorMaxInvestment;
uint endTimestamp;
mapping(address=>bool) hasAccess;
}
function isActive(privateEntrance storage pe) internal view returns(bool) {
}
function maxInvestmentFor(privateEntrance storage pe, address investorAddr) internal view returns(uint) {
}
function provideAccessFor(privateEntrance storage pe, address[] addrs) internal {
}
}
contract InvestorsStorage is Accessibility {
struct Investor {
uint investment;
uint paymentTime;
}
uint public size;
mapping (address => Investor) private investors;
function isInvestor(address addr) public view returns (bool) {
}
function investorInfo(address addr) public view returns(uint investment, uint paymentTime) {
}
function newInvestor(address addr, uint investment, uint paymentTime) public onlyOwner returns (bool) {
}
function addInvestment(address addr, uint investment) public onlyOwner returns (bool) {
}
function setPaymentTime(address addr, uint paymentTime) public onlyOwner returns (bool) {
}
function disqalify(address addr) public onlyOwner returns (bool) {
}
}
library RapidGrowthProtection {
using RapidGrowthProtection for rapidGrowthProtection;
struct rapidGrowthProtection {
uint startTimestamp;
uint maxDailyTotalInvestment;
uint8 activityDays;
mapping(uint8 => uint) dailyTotalInvestment;
}
function maxInvestmentAtNow(rapidGrowthProtection storage rgp) internal view returns(uint) {
}
function isActive(rapidGrowthProtection storage rgp) internal view returns(bool) {
}
function saveInvestment(rapidGrowthProtection storage rgp, uint investment) internal returns(bool) {
}
function startAt(rapidGrowthProtection storage rgp, uint timestamp) internal {
}
function currDay(rapidGrowthProtection storage rgp) internal view returns(uint day) {
}
}
contract HedgeFund is Accessibility {
using RapidGrowthProtection for RapidGrowthProtection.rapidGrowthProtection;
using PrivateEntrance for PrivateEntrance.privateEntrance;
using Percent for Percent.percent;
using SafeMath for uint;
using Math for uint;
// easy read for investors
using Address for *;
using Zero for *;
RapidGrowthProtection.rapidGrowthProtection private m_rgp;
PrivateEntrance.privateEntrance private m_privEnter;
mapping(address => bool) private m_referrals;
InvestorsStorage private m_investors;
// automatically generates getters
uint public constant minInvesment = 10 finney;
uint public constant maxBalance = 333e5 ether;
address public advertisingAddress;
address public adminsAddress;
uint public investmentsNumber;
uint public waveStartup;
// percents
Percent.percent private m_5_percent = Percent.percent(999,10000); // 999/10000 *100% = 9.99%
Percent.percent private m_6_percent = Percent.percent(15,100); // 15/100 *100% = 15%
Percent.percent private m_7_percent = Percent.percent(19,100); // 19/100 *100% = 19%
Percent.percent private m_8_percent = Percent.percent(18,100); // 18/100 *100% = 12%
Percent.percent private m_9_percent = Percent.percent(13,100); // 13/100 *100% = 13%
Percent.percent private m_10_percent = Percent.percent(14,100); // 14/100 *100% = 14%
Percent.percent private m_11_percent = Percent.percent(15,100); // 15/100 *100% = 15%
Percent.percent private m_12_percent = Percent.percent(16,100); // 16/100 *100% = 16%
Percent.percent private m_referal_percent = Percent.percent(10,100); // 10/100 *100% = 10%
Percent.percent private m_referrer_percent = Percent.percent(10,100); // 10/100 *100% = 10%
Percent.percent private m_referrer_percentMax = Percent.percent(15,100); // 15/100 *100% = 15%
Percent.percent private m_adminsPercent = Percent.percent(55, 1000); // 55/100 *100% = 5.5%
Percent.percent private m_advertisingPercent = Percent.percent(95, 1000);// 95/1000 *100% = 9.5%
// more events for easy read from blockchain
event LogPEInit(uint when, address rev1Storage, address rev2Storage, uint investorMaxInvestment, uint endTimestamp);
event LogSendExcessOfEther(address indexed addr, uint when, uint value, uint investment, uint excess);
event LogNewReferral(address indexed addr, address indexed referrerAddr, uint when, uint refBonus);
event LogRGPInit(uint when, uint startTimestamp, uint maxDailyTotalInvestment, uint activityDays);
event LogRGPInvestment(address indexed addr, uint when, uint investment, uint indexed day);
event LogNewInvesment(address indexed addr, uint when, uint investment, uint value);
event LogAutomaticReinvest(address indexed addr, uint when, uint investment);
event LogPayDividends(address indexed addr, uint when, uint dividends);
event LogNewInvestor(address indexed addr, uint when);
event LogBalanceChanged(uint when, uint balance);
event LogNextWave(uint when);
event LogDisown(uint when);
modifier balanceChanged {
}
modifier notFromContract() {
}
constructor() public {
}
function() public payable {
}
function disqualifyAddress(address addr) public onlyOwner {
}
function doDisown() public onlyOwner {
}
function init(address rev1StorageAddr, uint timestamp) public onlyOwner {
}
function setAdvertisingAddress(address addr) public onlyOwner {
}
function setAdminsAddress(address addr) public onlyOwner {
}
function privateEntranceProvideAccessFor(address[] addrs) public onlyOwner {
}
function rapidGrowthProtectionmMaxInvestmentAtNow() public view returns(uint investment) {
}
function investorsNumber() public view returns(uint) {
}
function balanceETH() public view returns(uint) {
}
function advertisingPercent() public view returns(uint numerator, uint denominator) {
}
function adminsPercent() public view returns(uint numerator, uint denominator) {
}
function investorInfo(address investorAddr) public view returns(uint investment, uint paymentTime, bool isReferral) {
}
function investorDividendsAtNow(address investorAddr) public view returns(uint dividends) {
}
function dailyPercentAtNow() public view returns(uint numerator, uint denominator) {
}
function getMyDividends() public notFromContract balanceChanged {
// calculate dividends
//check if 1 day passed after last payment
require(now.sub(getMemInvestor(msg.sender).paymentTime) > 24 hours);
uint dividends = calcDividends(msg.sender);
require(<FILL_ME>)
// update investor payment timestamp
assert(m_investors.setPaymentTime(msg.sender, now));
// check enough eth - goto next wave if needed
if (address(this).balance <= dividends) {
nextWave();
dividends = address(this).balance;
}
// transfer dividends to investor
msg.sender.transfer(dividends);
emit LogPayDividends(msg.sender, now, dividends);
}
function doInvest(address referrerAddr) public payable notFromContract balanceChanged {
}
function getMemInvestor(address investorAddr) internal view returns(InvestorsStorage.Investor memory) {
}
function calcDividends(address investorAddr) internal view returns(uint dividends) {
}
function dailyPercent() internal view returns(Percent.percent memory p) {
}
function nextWave() private {
}
}
| dividends.notZero(),"cannot to pay zero dividends" | 387,517 | dividends.notZero() |
"ALREADY_OWNER" | // SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity =0.8.4;
import "./IERC20NoTransfer.sol";
/**
* @dev BrinkVote is a simple balance ledger created for Brink proposal voting on snapshot.org
*
* This is not an ERC20 token! It does not fully implement the ERC20 standard. Balances cannot be transfered. Balances
* can be minted by the owners of the contract. Once a balance is minted it becomes immutable.
*
* This contract was created solely for the purpose of vote signaling. It allows Brink community members to broadcast
* their opinions on Brink protocol development proposals.
*/
contract BrinkVote is IERC20NoTransfer {
string private constant _symbol = "BRINKVOTE";
string private constant _name = "Brink Vote";
uint8 private constant _decimals = 18;
uint256 private constant _cap = 5_000_000_000000000000000000; // 5 Million
mapping (address => uint256) private _balances;
mapping (address => bool) private _owners;
uint256 private _totalSupply;
modifier onlyOwner() {
}
constructor (address initialOwner) {
}
function totalSupply() external view override returns (uint256) {
}
function balanceOf(address account) external view override returns (uint256) {
}
function name() external pure returns (string memory) {
}
function symbol() external pure returns (string memory) {
}
function decimals() external pure returns (uint8) {
}
function cap() external pure returns (uint256) {
}
function isOwner(address owner) external view returns (bool) {
}
function grant(address account, uint256 amount) external onlyOwner {
}
function multigrant(address[] calldata accounts, uint256 amount) external onlyOwner {
}
function addOwner(address owner) external onlyOwner {
require(<FILL_ME>)
_owners[owner] = true;
}
function removeOwner(address owner) external onlyOwner {
}
function _capExceeded() internal view returns (bool) {
}
function _isOwner(address owner) internal view returns (bool) {
}
function _mint(address account, uint256 amount) internal {
}
}
| !_isOwner(owner),"ALREADY_OWNER" | 387,684 | !_isOwner(owner) |
"CANNOT_REMOVE_NON_OWNER" | // SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity =0.8.4;
import "./IERC20NoTransfer.sol";
/**
* @dev BrinkVote is a simple balance ledger created for Brink proposal voting on snapshot.org
*
* This is not an ERC20 token! It does not fully implement the ERC20 standard. Balances cannot be transfered. Balances
* can be minted by the owners of the contract. Once a balance is minted it becomes immutable.
*
* This contract was created solely for the purpose of vote signaling. It allows Brink community members to broadcast
* their opinions on Brink protocol development proposals.
*/
contract BrinkVote is IERC20NoTransfer {
string private constant _symbol = "BRINKVOTE";
string private constant _name = "Brink Vote";
uint8 private constant _decimals = 18;
uint256 private constant _cap = 5_000_000_000000000000000000; // 5 Million
mapping (address => uint256) private _balances;
mapping (address => bool) private _owners;
uint256 private _totalSupply;
modifier onlyOwner() {
}
constructor (address initialOwner) {
}
function totalSupply() external view override returns (uint256) {
}
function balanceOf(address account) external view override returns (uint256) {
}
function name() external pure returns (string memory) {
}
function symbol() external pure returns (string memory) {
}
function decimals() external pure returns (uint8) {
}
function cap() external pure returns (uint256) {
}
function isOwner(address owner) external view returns (bool) {
}
function grant(address account, uint256 amount) external onlyOwner {
}
function multigrant(address[] calldata accounts, uint256 amount) external onlyOwner {
}
function addOwner(address owner) external onlyOwner {
}
function removeOwner(address owner) external onlyOwner {
require(<FILL_ME>)
require(owner != msg.sender, "CANNOT_REMOVE_SELF_OWNER");
_owners[owner] = false;
}
function _capExceeded() internal view returns (bool) {
}
function _isOwner(address owner) internal view returns (bool) {
}
function _mint(address account, uint256 amount) internal {
}
}
| _isOwner(owner),"CANNOT_REMOVE_NON_OWNER" | 387,684 | _isOwner(owner) |
"CAP_EXCEEDED" | // SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity =0.8.4;
import "./IERC20NoTransfer.sol";
/**
* @dev BrinkVote is a simple balance ledger created for Brink proposal voting on snapshot.org
*
* This is not an ERC20 token! It does not fully implement the ERC20 standard. Balances cannot be transfered. Balances
* can be minted by the owners of the contract. Once a balance is minted it becomes immutable.
*
* This contract was created solely for the purpose of vote signaling. It allows Brink community members to broadcast
* their opinions on Brink protocol development proposals.
*/
contract BrinkVote is IERC20NoTransfer {
string private constant _symbol = "BRINKVOTE";
string private constant _name = "Brink Vote";
uint8 private constant _decimals = 18;
uint256 private constant _cap = 5_000_000_000000000000000000; // 5 Million
mapping (address => uint256) private _balances;
mapping (address => bool) private _owners;
uint256 private _totalSupply;
modifier onlyOwner() {
}
constructor (address initialOwner) {
}
function totalSupply() external view override returns (uint256) {
}
function balanceOf(address account) external view override returns (uint256) {
}
function name() external pure returns (string memory) {
}
function symbol() external pure returns (string memory) {
}
function decimals() external pure returns (uint8) {
}
function cap() external pure returns (uint256) {
}
function isOwner(address owner) external view returns (bool) {
}
function grant(address account, uint256 amount) external onlyOwner {
}
function multigrant(address[] calldata accounts, uint256 amount) external onlyOwner {
}
function addOwner(address owner) external onlyOwner {
}
function removeOwner(address owner) external onlyOwner {
}
function _capExceeded() internal view returns (bool) {
}
function _isOwner(address owner) internal view returns (bool) {
}
function _mint(address account, uint256 amount) internal {
_balances[account] = amount;
_totalSupply += amount;
require(<FILL_ME>)
emit Transfer(address(0), account, amount);
}
}
| !_capExceeded(),"CAP_EXCEEDED" | 387,684 | !_capExceeded() |
null | contract ReservationFund is ICrowdsaleReservationFund, Ownable, SafeMath {
bool public crowdsaleFinished = false;
mapping(address => uint256) contributions;
mapping(address => uint256) tokensToIssue;
mapping(address => uint256) bonusTokensToIssue;
ISimpleCrowdsale public crowdsale;
event RefundPayment(address contributor, uint256 etherAmount);
event TransferToFund(address contributor, uint256 etherAmount);
event FinishCrowdsale();
function ReservationFund(address _owner) public Ownable(_owner) {
}
modifier onlyCrowdsale() {
}
function setCrowdsaleAddress(address crowdsaleAddress) public onlyOwner {
}
function onCrowdsaleEnd() external onlyCrowdsale {
}
function canCompleteContribution(address contributor) external returns(bool) {
}
/**
* @dev Function to check contributions by address
*/
function contributionsOf(address contributor) external returns(uint256) {
}
/**
* @dev Process crowdsale contribution without whitelist
*/
function processContribution(
address contributor,
uint256 _tokensToIssue,
uint256 _bonusTokensToIssue
) external payable onlyCrowdsale {
}
/**
* @dev Complete contribution after if user is whitelisted
*/
function completeContribution(address contributor) external {
require(!crowdsaleFinished);
require(<FILL_ME>)
require(contributions[contributor] > 0);
uint256 etherAmount = contributions[contributor];
uint256 tokenAmount = tokensToIssue[contributor];
uint256 tokenBonusAmount = bonusTokensToIssue[contributor];
contributions[contributor] = 0;
tokensToIssue[contributor] = 0;
bonusTokensToIssue[contributor] = 0;
crowdsale.processReservationFundContribution.value(etherAmount)(contributor, tokenAmount, tokenBonusAmount);
TransferToFund(contributor, etherAmount);
}
/**
* @dev Refund payments if crowdsale is finalized
*/
function refundPayment(address contributor) public {
}
}
| crowdsale.isContributorInLists(contributor) | 387,785 | crowdsale.isContributorInLists(contributor) |
null | contract ReservationFund is ICrowdsaleReservationFund, Ownable, SafeMath {
bool public crowdsaleFinished = false;
mapping(address => uint256) contributions;
mapping(address => uint256) tokensToIssue;
mapping(address => uint256) bonusTokensToIssue;
ISimpleCrowdsale public crowdsale;
event RefundPayment(address contributor, uint256 etherAmount);
event TransferToFund(address contributor, uint256 etherAmount);
event FinishCrowdsale();
function ReservationFund(address _owner) public Ownable(_owner) {
}
modifier onlyCrowdsale() {
}
function setCrowdsaleAddress(address crowdsaleAddress) public onlyOwner {
}
function onCrowdsaleEnd() external onlyCrowdsale {
}
function canCompleteContribution(address contributor) external returns(bool) {
}
/**
* @dev Function to check contributions by address
*/
function contributionsOf(address contributor) external returns(uint256) {
}
/**
* @dev Process crowdsale contribution without whitelist
*/
function processContribution(
address contributor,
uint256 _tokensToIssue,
uint256 _bonusTokensToIssue
) external payable onlyCrowdsale {
}
/**
* @dev Complete contribution after if user is whitelisted
*/
function completeContribution(address contributor) external {
require(!crowdsaleFinished);
require(crowdsale.isContributorInLists(contributor));
require(<FILL_ME>)
uint256 etherAmount = contributions[contributor];
uint256 tokenAmount = tokensToIssue[contributor];
uint256 tokenBonusAmount = bonusTokensToIssue[contributor];
contributions[contributor] = 0;
tokensToIssue[contributor] = 0;
bonusTokensToIssue[contributor] = 0;
crowdsale.processReservationFundContribution.value(etherAmount)(contributor, tokenAmount, tokenBonusAmount);
TransferToFund(contributor, etherAmount);
}
/**
* @dev Refund payments if crowdsale is finalized
*/
function refundPayment(address contributor) public {
}
}
| contributions[contributor]>0 | 387,785 | contributions[contributor]>0 |
null | contract ReservationFund is ICrowdsaleReservationFund, Ownable, SafeMath {
bool public crowdsaleFinished = false;
mapping(address => uint256) contributions;
mapping(address => uint256) tokensToIssue;
mapping(address => uint256) bonusTokensToIssue;
ISimpleCrowdsale public crowdsale;
event RefundPayment(address contributor, uint256 etherAmount);
event TransferToFund(address contributor, uint256 etherAmount);
event FinishCrowdsale();
function ReservationFund(address _owner) public Ownable(_owner) {
}
modifier onlyCrowdsale() {
}
function setCrowdsaleAddress(address crowdsaleAddress) public onlyOwner {
}
function onCrowdsaleEnd() external onlyCrowdsale {
}
function canCompleteContribution(address contributor) external returns(bool) {
}
/**
* @dev Function to check contributions by address
*/
function contributionsOf(address contributor) external returns(uint256) {
}
/**
* @dev Process crowdsale contribution without whitelist
*/
function processContribution(
address contributor,
uint256 _tokensToIssue,
uint256 _bonusTokensToIssue
) external payable onlyCrowdsale {
}
/**
* @dev Complete contribution after if user is whitelisted
*/
function completeContribution(address contributor) external {
}
/**
* @dev Refund payments if crowdsale is finalized
*/
function refundPayment(address contributor) public {
require(crowdsaleFinished);
require(<FILL_ME>)
uint256 amountToRefund = contributions[contributor];
contributions[contributor] = 0;
tokensToIssue[contributor] = 0;
bonusTokensToIssue[contributor] = 0;
contributor.transfer(amountToRefund);
RefundPayment(contributor, amountToRefund);
}
}
| contributions[contributor]>0||tokensToIssue[contributor]>0 | 387,785 | contributions[contributor]>0||tokensToIssue[contributor]>0 |
"Not enough Glass remaining to mint" | contract Glass is ERC721, IERC2981, Ownable, ReentrancyGuard {
using Counters for Counters.Counter;
using Strings for uint256;
Counters.Counter private tokenCounter;
string private baseURI = 'https://www.pfp.glass/api/metadata';
uint256 public maxGlass = 500;
bool public isPublicSaleActive = false;
bool public ownerMinted = false;
uint256 public constant PUBLIC_SALE_PRICE = 0.0666 ether;
// ============ ACCESS CONTROL/SANITY MODIFIERS ============
modifier publicSaleActive() {
}
modifier canMintGlass(uint256 numberOfTokens) {
require(<FILL_ME>)
_;
}
modifier isCorrectPayment(uint256 price, uint256 numberOfTokens) {
}
modifier canOwnerMint() {
}
constructor() ERC721("Glass PFP", "GLASS") {
}
// ============ PUBLIC FUNCTIONS FOR MINTING ============
function mint(uint256 numberOfTokens)
external
payable
nonReentrant
isCorrectPayment(PUBLIC_SALE_PRICE, numberOfTokens)
publicSaleActive
canMintGlass(numberOfTokens)
{
}
// three for me
function mintOwner() public onlyOwner canOwnerMint {
}
// ============ PUBLIC READ-ONLY FUNCTIONS ============
function getBaseURI() external view returns (string memory) {
}
function getLastTokenId() external view returns (uint256) {
}
// ============ OWNER-ONLY ADMIN FUNCTIONS ============
function setBaseURI(string memory _baseURI) external onlyOwner {
}
function withdraw() public onlyOwner {
}
function setIsPublicSaleActive(bool _isPublicSaleActive)
external
onlyOwner
{
}
// ============ SUPPORTING FUNCTIONS ============
function nextTokenId() private returns (uint256) {
}
// ============ FUNCTION OVERRIDES ============
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721, IERC165)
returns (bool)
{
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
/**
* @dev See {IERC165-royaltyInfo}.
*/
function royaltyInfo(uint256 tokenId, uint256 salePrice)
external
view
override
returns (address receiver, uint256 royaltyAmount)
{
}
}
| tokenCounter.current()+numberOfTokens<=maxGlass,"Not enough Glass remaining to mint" | 387,810 | tokenCounter.current()+numberOfTokens<=maxGlass |
"Owner already minted theirs" | contract Glass is ERC721, IERC2981, Ownable, ReentrancyGuard {
using Counters for Counters.Counter;
using Strings for uint256;
Counters.Counter private tokenCounter;
string private baseURI = 'https://www.pfp.glass/api/metadata';
uint256 public maxGlass = 500;
bool public isPublicSaleActive = false;
bool public ownerMinted = false;
uint256 public constant PUBLIC_SALE_PRICE = 0.0666 ether;
// ============ ACCESS CONTROL/SANITY MODIFIERS ============
modifier publicSaleActive() {
}
modifier canMintGlass(uint256 numberOfTokens) {
}
modifier isCorrectPayment(uint256 price, uint256 numberOfTokens) {
}
modifier canOwnerMint() {
require(<FILL_ME>)
_;
}
constructor() ERC721("Glass PFP", "GLASS") {
}
// ============ PUBLIC FUNCTIONS FOR MINTING ============
function mint(uint256 numberOfTokens)
external
payable
nonReentrant
isCorrectPayment(PUBLIC_SALE_PRICE, numberOfTokens)
publicSaleActive
canMintGlass(numberOfTokens)
{
}
// three for me
function mintOwner() public onlyOwner canOwnerMint {
}
// ============ PUBLIC READ-ONLY FUNCTIONS ============
function getBaseURI() external view returns (string memory) {
}
function getLastTokenId() external view returns (uint256) {
}
// ============ OWNER-ONLY ADMIN FUNCTIONS ============
function setBaseURI(string memory _baseURI) external onlyOwner {
}
function withdraw() public onlyOwner {
}
function setIsPublicSaleActive(bool _isPublicSaleActive)
external
onlyOwner
{
}
// ============ SUPPORTING FUNCTIONS ============
function nextTokenId() private returns (uint256) {
}
// ============ FUNCTION OVERRIDES ============
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721, IERC165)
returns (bool)
{
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
/**
* @dev See {IERC165-royaltyInfo}.
*/
function royaltyInfo(uint256 tokenId, uint256 salePrice)
external
view
override
returns (address receiver, uint256 royaltyAmount)
{
}
}
| !ownerMinted,"Owner already minted theirs" | 387,810 | !ownerMinted |
"Only artist or whitelisted" | // SPDX-License-Identifier: LGPL-3.0-only
// Creatd By: Art Blocks Inc.
import "../../libs/0.5.x/CustomERC721Metadata.sol";
import "../../libs/0.5.x/SafeMath.sol";
import "../../libs/0.5.x/Strings.sol";
import "../../interfaces/0.5.x/IRandomizer.sol";
import "../../interfaces/0.5.x/IGenArt721CoreV2_PBAB.sol";
pragma solidity ^0.5.0;
contract GenArt721CoreV2_ArtCode is
CustomERC721Metadata,
IGenArt721CoreV2_PBAB
{
using SafeMath for uint256;
event Mint(
address indexed _to,
uint256 indexed _tokenId,
uint256 indexed _projectId
);
IRandomizer public randomizerContract;
struct Project {
string name;
string artist;
string description;
string website;
string license;
string projectBaseURI;
uint256 invocations;
uint256 maxInvocations;
string scriptJSON;
mapping(uint256 => string) scripts;
uint256 scriptCount;
string ipfsHash;
bool active;
bool locked;
bool paused;
}
uint256 constant ONE_MILLION = 1_000_000;
mapping(uint256 => Project) projects;
//All financial functions are stripped from struct for visibility
mapping(uint256 => address) public projectIdToArtistAddress;
mapping(uint256 => string) public projectIdToCurrencySymbol;
mapping(uint256 => address) public projectIdToCurrencyAddress;
mapping(uint256 => uint256) public projectIdToPricePerTokenInWei;
mapping(uint256 => address) public projectIdToAdditionalPayee;
mapping(uint256 => uint256) public projectIdToAdditionalPayeePercentage;
mapping(uint256 => uint256)
public projectIdToSecondaryMarketRoyaltyPercentage;
address public renderProviderAddress;
uint256 public renderProviderPercentage = 10;
mapping(uint256 => uint256) public tokenIdToProjectId;
mapping(uint256 => bytes32) public tokenIdToHash;
mapping(bytes32 => uint256) public hashToTokenId;
address public admin;
mapping(address => bool) public isWhitelisted;
mapping(address => bool) public isMintWhitelisted;
uint256 public nextProjectId = 0;
modifier onlyValidTokenId(uint256 _tokenId) {
}
modifier onlyUnlocked(uint256 _projectId) {
}
modifier onlyArtist(uint256 _projectId) {
}
modifier onlyAdmin() {
}
modifier onlyWhitelisted() {
}
modifier onlyArtistOrWhitelisted(uint256 _projectId) {
require(<FILL_ME>)
_;
}
constructor(
string memory _tokenName,
string memory _tokenSymbol,
address _randomizerContract
) public CustomERC721Metadata(_tokenName, _tokenSymbol) {
}
function mint(
address _to,
uint256 _projectId,
address _by
) external returns (uint256 _tokenId) {
}
function _mintToken(address _to, uint256 _projectId)
internal
returns (uint256 _tokenId)
{
}
function updateAdmin(address _adminAddress) public onlyAdmin {
}
function updateRenderProviderAddress(address _renderProviderAddress)
public
onlyAdmin
{
}
function updateRenderProviderPercentage(uint256 _renderProviderPercentage)
public
onlyAdmin
{
}
function addWhitelisted(address _address) public onlyAdmin {
}
function removeWhitelisted(address _address) public onlyAdmin {
}
function addMintWhitelisted(address _address) public onlyAdmin {
}
function removeMintWhitelisted(address _address) public onlyAdmin {
}
function updateRandomizerAddress(address _randomizerAddress)
public
onlyWhitelisted
{
}
function toggleProjectIsLocked(uint256 _projectId)
public
onlyWhitelisted
onlyUnlocked(_projectId)
{
}
function toggleProjectIsActive(uint256 _projectId) public onlyWhitelisted {
}
function updateProjectArtistAddress(
uint256 _projectId,
address _artistAddress
) public onlyArtistOrWhitelisted(_projectId) {
}
function toggleProjectIsPaused(uint256 _projectId)
public
onlyArtist(_projectId)
{
}
function addProject(
string memory _projectName,
address _artistAddress,
uint256 _pricePerTokenInWei
) public onlyWhitelisted {
}
function updateProjectCurrencyInfo(
uint256 _projectId,
string memory _currencySymbol,
address _currencyAddress
) public onlyArtist(_projectId) {
}
function updateProjectPricePerTokenInWei(
uint256 _projectId,
uint256 _pricePerTokenInWei
) public onlyArtist(_projectId) {
}
function updateProjectName(uint256 _projectId, string memory _projectName)
public
onlyUnlocked(_projectId)
onlyArtistOrWhitelisted(_projectId)
{
}
function updateProjectArtistName(
uint256 _projectId,
string memory _projectArtistName
) public onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) {
}
function updateProjectAdditionalPayeeInfo(
uint256 _projectId,
address _additionalPayee,
uint256 _additionalPayeePercentage
) public onlyArtist(_projectId) {
}
function updateProjectSecondaryMarketRoyaltyPercentage(
uint256 _projectId,
uint256 _secondMarketRoyalty
) public onlyArtist(_projectId) {
}
function updateProjectDescription(
uint256 _projectId,
string memory _projectDescription
) public onlyArtist(_projectId) {
}
function updateProjectWebsite(
uint256 _projectId,
string memory _projectWebsite
) public onlyArtist(_projectId) {
}
function updateProjectLicense(
uint256 _projectId,
string memory _projectLicense
) public onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) {
}
function updateProjectMaxInvocations(
uint256 _projectId,
uint256 _maxInvocations
) public onlyArtist(_projectId) {
}
function addProjectScript(uint256 _projectId, string memory _script)
public
onlyUnlocked(_projectId)
onlyArtistOrWhitelisted(_projectId)
{
}
function updateProjectScript(
uint256 _projectId,
uint256 _scriptId,
string memory _script
) public onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) {
}
function removeProjectLastScript(uint256 _projectId)
public
onlyUnlocked(_projectId)
onlyArtistOrWhitelisted(_projectId)
{
}
function updateProjectScriptJSON(
uint256 _projectId,
string memory _projectScriptJSON
) public onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) {
}
function updateProjectIpfsHash(uint256 _projectId, string memory _ipfsHash)
public
onlyUnlocked(_projectId)
onlyArtistOrWhitelisted(_projectId)
{
}
function updateProjectBaseURI(uint256 _projectId, string memory _newBaseURI)
public
onlyArtist(_projectId)
{
}
function projectDetails(uint256 _projectId)
public
view
returns (
string memory projectName,
string memory artist,
string memory description,
string memory website,
string memory license
)
{
}
function projectTokenInfo(uint256 _projectId)
public
view
returns (
address artistAddress,
uint256 pricePerTokenInWei,
uint256 invocations,
uint256 maxInvocations,
bool active,
address additionalPayee,
uint256 additionalPayeePercentage,
string memory currency,
address currencyAddress
)
{
}
function projectScriptInfo(uint256 _projectId)
public
view
returns (
string memory scriptJSON,
uint256 scriptCount,
string memory ipfsHash,
bool locked,
bool paused
)
{
}
function projectScriptByIndex(uint256 _projectId, uint256 _index)
public
view
returns (string memory)
{
}
function projectURIInfo(uint256 _projectId)
public
view
returns (string memory projectBaseURI)
{
}
function tokensOfOwner(address owner)
external
view
returns (uint256[] memory)
{
}
function getRoyaltyData(uint256 _tokenId)
public
view
returns (
address artistAddress,
address additionalPayee,
uint256 additionalPayeePercentage,
uint256 royaltyFeeByID
)
{
}
function tokenURI(uint256 _tokenId)
external
view
onlyValidTokenId(_tokenId)
returns (string memory)
{
}
}
| isWhitelisted[msg.sender]||msg.sender==projectIdToArtistAddress[_projectId],"Only artist or whitelisted" | 387,859 | isWhitelisted[msg.sender]||msg.sender==projectIdToArtistAddress[_projectId] |
"Must mint from whitelisted minter contract." | // SPDX-License-Identifier: LGPL-3.0-only
// Creatd By: Art Blocks Inc.
import "../../libs/0.5.x/CustomERC721Metadata.sol";
import "../../libs/0.5.x/SafeMath.sol";
import "../../libs/0.5.x/Strings.sol";
import "../../interfaces/0.5.x/IRandomizer.sol";
import "../../interfaces/0.5.x/IGenArt721CoreV2_PBAB.sol";
pragma solidity ^0.5.0;
contract GenArt721CoreV2_ArtCode is
CustomERC721Metadata,
IGenArt721CoreV2_PBAB
{
using SafeMath for uint256;
event Mint(
address indexed _to,
uint256 indexed _tokenId,
uint256 indexed _projectId
);
IRandomizer public randomizerContract;
struct Project {
string name;
string artist;
string description;
string website;
string license;
string projectBaseURI;
uint256 invocations;
uint256 maxInvocations;
string scriptJSON;
mapping(uint256 => string) scripts;
uint256 scriptCount;
string ipfsHash;
bool active;
bool locked;
bool paused;
}
uint256 constant ONE_MILLION = 1_000_000;
mapping(uint256 => Project) projects;
//All financial functions are stripped from struct for visibility
mapping(uint256 => address) public projectIdToArtistAddress;
mapping(uint256 => string) public projectIdToCurrencySymbol;
mapping(uint256 => address) public projectIdToCurrencyAddress;
mapping(uint256 => uint256) public projectIdToPricePerTokenInWei;
mapping(uint256 => address) public projectIdToAdditionalPayee;
mapping(uint256 => uint256) public projectIdToAdditionalPayeePercentage;
mapping(uint256 => uint256)
public projectIdToSecondaryMarketRoyaltyPercentage;
address public renderProviderAddress;
uint256 public renderProviderPercentage = 10;
mapping(uint256 => uint256) public tokenIdToProjectId;
mapping(uint256 => bytes32) public tokenIdToHash;
mapping(bytes32 => uint256) public hashToTokenId;
address public admin;
mapping(address => bool) public isWhitelisted;
mapping(address => bool) public isMintWhitelisted;
uint256 public nextProjectId = 0;
modifier onlyValidTokenId(uint256 _tokenId) {
}
modifier onlyUnlocked(uint256 _projectId) {
}
modifier onlyArtist(uint256 _projectId) {
}
modifier onlyAdmin() {
}
modifier onlyWhitelisted() {
}
modifier onlyArtistOrWhitelisted(uint256 _projectId) {
}
constructor(
string memory _tokenName,
string memory _tokenSymbol,
address _randomizerContract
) public CustomERC721Metadata(_tokenName, _tokenSymbol) {
}
function mint(
address _to,
uint256 _projectId,
address _by
) external returns (uint256 _tokenId) {
require(<FILL_ME>)
require(
projects[_projectId].invocations.add(1) <=
projects[_projectId].maxInvocations,
"Must not exceed max invocations"
);
require(
projects[_projectId].active ||
_by == projectIdToArtistAddress[_projectId],
"Project must exist and be active"
);
require(
!projects[_projectId].paused ||
_by == projectIdToArtistAddress[_projectId],
"Purchases are paused."
);
uint256 tokenId = _mintToken(_to, _projectId);
return tokenId;
}
function _mintToken(address _to, uint256 _projectId)
internal
returns (uint256 _tokenId)
{
}
function updateAdmin(address _adminAddress) public onlyAdmin {
}
function updateRenderProviderAddress(address _renderProviderAddress)
public
onlyAdmin
{
}
function updateRenderProviderPercentage(uint256 _renderProviderPercentage)
public
onlyAdmin
{
}
function addWhitelisted(address _address) public onlyAdmin {
}
function removeWhitelisted(address _address) public onlyAdmin {
}
function addMintWhitelisted(address _address) public onlyAdmin {
}
function removeMintWhitelisted(address _address) public onlyAdmin {
}
function updateRandomizerAddress(address _randomizerAddress)
public
onlyWhitelisted
{
}
function toggleProjectIsLocked(uint256 _projectId)
public
onlyWhitelisted
onlyUnlocked(_projectId)
{
}
function toggleProjectIsActive(uint256 _projectId) public onlyWhitelisted {
}
function updateProjectArtistAddress(
uint256 _projectId,
address _artistAddress
) public onlyArtistOrWhitelisted(_projectId) {
}
function toggleProjectIsPaused(uint256 _projectId)
public
onlyArtist(_projectId)
{
}
function addProject(
string memory _projectName,
address _artistAddress,
uint256 _pricePerTokenInWei
) public onlyWhitelisted {
}
function updateProjectCurrencyInfo(
uint256 _projectId,
string memory _currencySymbol,
address _currencyAddress
) public onlyArtist(_projectId) {
}
function updateProjectPricePerTokenInWei(
uint256 _projectId,
uint256 _pricePerTokenInWei
) public onlyArtist(_projectId) {
}
function updateProjectName(uint256 _projectId, string memory _projectName)
public
onlyUnlocked(_projectId)
onlyArtistOrWhitelisted(_projectId)
{
}
function updateProjectArtistName(
uint256 _projectId,
string memory _projectArtistName
) public onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) {
}
function updateProjectAdditionalPayeeInfo(
uint256 _projectId,
address _additionalPayee,
uint256 _additionalPayeePercentage
) public onlyArtist(_projectId) {
}
function updateProjectSecondaryMarketRoyaltyPercentage(
uint256 _projectId,
uint256 _secondMarketRoyalty
) public onlyArtist(_projectId) {
}
function updateProjectDescription(
uint256 _projectId,
string memory _projectDescription
) public onlyArtist(_projectId) {
}
function updateProjectWebsite(
uint256 _projectId,
string memory _projectWebsite
) public onlyArtist(_projectId) {
}
function updateProjectLicense(
uint256 _projectId,
string memory _projectLicense
) public onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) {
}
function updateProjectMaxInvocations(
uint256 _projectId,
uint256 _maxInvocations
) public onlyArtist(_projectId) {
}
function addProjectScript(uint256 _projectId, string memory _script)
public
onlyUnlocked(_projectId)
onlyArtistOrWhitelisted(_projectId)
{
}
function updateProjectScript(
uint256 _projectId,
uint256 _scriptId,
string memory _script
) public onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) {
}
function removeProjectLastScript(uint256 _projectId)
public
onlyUnlocked(_projectId)
onlyArtistOrWhitelisted(_projectId)
{
}
function updateProjectScriptJSON(
uint256 _projectId,
string memory _projectScriptJSON
) public onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) {
}
function updateProjectIpfsHash(uint256 _projectId, string memory _ipfsHash)
public
onlyUnlocked(_projectId)
onlyArtistOrWhitelisted(_projectId)
{
}
function updateProjectBaseURI(uint256 _projectId, string memory _newBaseURI)
public
onlyArtist(_projectId)
{
}
function projectDetails(uint256 _projectId)
public
view
returns (
string memory projectName,
string memory artist,
string memory description,
string memory website,
string memory license
)
{
}
function projectTokenInfo(uint256 _projectId)
public
view
returns (
address artistAddress,
uint256 pricePerTokenInWei,
uint256 invocations,
uint256 maxInvocations,
bool active,
address additionalPayee,
uint256 additionalPayeePercentage,
string memory currency,
address currencyAddress
)
{
}
function projectScriptInfo(uint256 _projectId)
public
view
returns (
string memory scriptJSON,
uint256 scriptCount,
string memory ipfsHash,
bool locked,
bool paused
)
{
}
function projectScriptByIndex(uint256 _projectId, uint256 _index)
public
view
returns (string memory)
{
}
function projectURIInfo(uint256 _projectId)
public
view
returns (string memory projectBaseURI)
{
}
function tokensOfOwner(address owner)
external
view
returns (uint256[] memory)
{
}
function getRoyaltyData(uint256 _tokenId)
public
view
returns (
address artistAddress,
address additionalPayee,
uint256 additionalPayeePercentage,
uint256 royaltyFeeByID
)
{
}
function tokenURI(uint256 _tokenId)
external
view
onlyValidTokenId(_tokenId)
returns (string memory)
{
}
}
| isMintWhitelisted[msg.sender],"Must mint from whitelisted minter contract." | 387,859 | isMintWhitelisted[msg.sender] |
"Call from non-mega contract" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "../utils/ERC721EnumerableBurnable.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
// /$$$$$$
// /$$__ $$
// | $$ \__/ /$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$$$
// | $$ /$$__ $$ /$$__ $$ /$$__ $$ /$$__ $$|____ /$$/
// | $$ | $$ \__/| $$$$$$$$| $$$$$$$$| $$ \ $$ /$$$$/
// | $$ $$| $$ | $$_____/| $$_____/| $$ | $$ /$$__/
// | $$$$$$/| $$ | $$$$$$$| $$$$$$$| $$$$$$$/ /$$$$$$$$
// \______/ |__/ \_______/ \_______/| $$____/ |________/
// | $$
// | $$
// |__/
// /$$$$$$ /$$
// /$$__ $$| $$
// | $$ \__/| $$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$
// | $$$$$$ | $$__ $$ |____ $$ /$$__ $$ /$$__ $$
// \____ $$| $$ \ $$ /$$$$$$$| $$ \ $$| $$$$$$$$
// /$$ \ $$| $$ | $$ /$$__ $$| $$ | $$| $$_____/
// | $$$$$$/| $$ | $$| $$$$$$$| $$$$$$$/| $$$$$$$
// \______/ |__/ |__/ \_______/| $$____/ \_______/
// | $$
// | $$
// |__/
// /$$$$$$ /$$ /$$ /$$$$$$ /$$
// /$$__ $$| $$ |__/ /$$__ $$ | $$
// | $$ \__/| $$$$$$$ /$$| $$ \__//$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$$
// | $$$$$$ | $$__ $$| $$| $$$$ |_ $$_/ /$$__ $$ /$$__ $$ /$$_____/
// \____ $$| $$ \ $$| $$| $$_/ | $$ | $$$$$$$$| $$ \__/| $$$$$$
// /$$ \ $$| $$ | $$| $$| $$ | $$ /$$| $$_____/| $$ \____ $$
// | $$$$$$/| $$ | $$| $$| $$ | $$$$/| $$$$$$$| $$ /$$$$$$$/
// \______/ |__/ |__/|__/|__/ \___/ \_______/|__/ |_______/
interface ILOOMI {
function spendLoomi(address user, uint256 amount) external;
}
interface ISTAKING {
function ownerOf(address contractAddress, uint256 tokenId) external view returns (address);
}
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/
contract CreepzShapeshifters is Context, ERC721EnumerableBurnable, VRFConsumerBase, Ownable, ReentrancyGuard {
using SafeMath for uint256;
using Strings for uint256;
// currentMintIndex
uint256 private currentIndex;
// Provenance hash
string public PROVENANCE_HASH;
// Base URI
string private _shapesBaseURI;
// Starting Index
uint256 public startingIndex;
// Max number of NFTs
uint256 public constant MAX_SUPPLY = 20000;
uint256 public constant BASE_RATE_TOKENS = 1;
uint256 public _purchaseTimeout;
uint256 public _basePrice;
uint256 public _regularPrice;
uint256 private _maxToMint;
bool public saleIsActive;
bool public creepzRestriction;
bool private metadataFinalised;
bool private startingIndexSet;
// Royalty info
address public royaltyAddress;
uint256 private ROYALTY_SIZE = 750;
uint256 private ROYALTY_DENOMINATOR = 10000;
mapping(uint256 => address) private _royaltyReceivers;
// MEGA Address
address public MEGA;
// Loomi contract
ILOOMI public LOOMI;
ISTAKING public STAKING;
IERC721 public CREEPZ;
// Stores the number of minted tokens by user
mapping(address => uint256) public _mintedByAddress;
mapping(address => uint256) public _lastPurchased;
bytes32 internal keyHash;
uint256 internal fee;
event TokensMinted(
address indexed mintedBy,
uint256 indexed tokensNumber
);
event StartingIndexFinalized(
uint256 indexed startingIndex
);
event BaseUriUpdated(
string oldBaseUri,
string newBaseUri
);
constructor(address _royaltyAddress, address _loomi, address _staking, address _creepz, string memory _baseURI)
ERC721("Creepz Shapeshifters", "SHAPE")
VRFConsumerBase(
0xf0d54349aDdcf704F77AE15b96510dEA15cb7952, // VRF Coordinator
0x514910771AF9Ca656af840dff83E8264EcF986CA // LINK Token
)
{
}
modifier onlyMega() {
require(<FILL_ME>)
_;
}
function shapePurchase(uint256 tokensToMint, uint256 tokenId) public nonReentrant {
}
function validateAndBurn(uint256[] memory tokenIds, address owner) external onlyMega {
}
function _validateCreepzOwner(uint256 tokenId, address user) internal view returns (bool) {
}
function getTokenPrice(address user, uint256 amount) internal view returns (uint256) {
}
function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount) {
}
function addRoyaltyReceiverForTokenId(address receiver, uint256 tokenId) public onlyOwner {
}
function updateSaleStatus(bool status) public onlyOwner {
}
function updateBasePrice(uint256 _newPrice) public onlyOwner {
}
function updateRegularPrice(uint256 _newPrice) public onlyOwner {
}
function setProvenanceHash(string memory provenanceHash) public onlyOwner {
}
function setBaseURI(string memory newBaseURI) public onlyOwner {
}
function finalizeStartingIndex() public onlyOwner returns (bytes32 requestId) {
}
/**
* Callback function used by VRF Coordinator
*/
function fulfillRandomness(bytes32, uint256 randomness) internal override {
}
function tokenURI(uint256 tokenId) external view virtual override returns (string memory) {
}
function finalizeMetadata() public onlyOwner {
}
function updateCreepzRestriction(bool _restrict) public onlyOwner {
}
function updatePurchaseTimeout(uint256 _timeoutInSeconds) public onlyOwner {
}
function updateMaxToMint(uint256 _max) public onlyOwner {
}
function setMegaAddress(address _megaAddress) public onlyOwner {
}
function withdraw() external onlyOwner {
}
}
| _msgSender()==MEGA,"Call from non-mega contract" | 387,895 | _msgSender()==MEGA |
"Mint more tokens than allowed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "../utils/ERC721EnumerableBurnable.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
// /$$$$$$
// /$$__ $$
// | $$ \__/ /$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$$$
// | $$ /$$__ $$ /$$__ $$ /$$__ $$ /$$__ $$|____ /$$/
// | $$ | $$ \__/| $$$$$$$$| $$$$$$$$| $$ \ $$ /$$$$/
// | $$ $$| $$ | $$_____/| $$_____/| $$ | $$ /$$__/
// | $$$$$$/| $$ | $$$$$$$| $$$$$$$| $$$$$$$/ /$$$$$$$$
// \______/ |__/ \_______/ \_______/| $$____/ |________/
// | $$
// | $$
// |__/
// /$$$$$$ /$$
// /$$__ $$| $$
// | $$ \__/| $$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$
// | $$$$$$ | $$__ $$ |____ $$ /$$__ $$ /$$__ $$
// \____ $$| $$ \ $$ /$$$$$$$| $$ \ $$| $$$$$$$$
// /$$ \ $$| $$ | $$ /$$__ $$| $$ | $$| $$_____/
// | $$$$$$/| $$ | $$| $$$$$$$| $$$$$$$/| $$$$$$$
// \______/ |__/ |__/ \_______/| $$____/ \_______/
// | $$
// | $$
// |__/
// /$$$$$$ /$$ /$$ /$$$$$$ /$$
// /$$__ $$| $$ |__/ /$$__ $$ | $$
// | $$ \__/| $$$$$$$ /$$| $$ \__//$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$$
// | $$$$$$ | $$__ $$| $$| $$$$ |_ $$_/ /$$__ $$ /$$__ $$ /$$_____/
// \____ $$| $$ \ $$| $$| $$_/ | $$ | $$$$$$$$| $$ \__/| $$$$$$
// /$$ \ $$| $$ | $$| $$| $$ | $$ /$$| $$_____/| $$ \____ $$
// | $$$$$$/| $$ | $$| $$| $$ | $$$$/| $$$$$$$| $$ /$$$$$$$/
// \______/ |__/ |__/|__/|__/ \___/ \_______/|__/ |_______/
interface ILOOMI {
function spendLoomi(address user, uint256 amount) external;
}
interface ISTAKING {
function ownerOf(address contractAddress, uint256 tokenId) external view returns (address);
}
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/
contract CreepzShapeshifters is Context, ERC721EnumerableBurnable, VRFConsumerBase, Ownable, ReentrancyGuard {
using SafeMath for uint256;
using Strings for uint256;
// currentMintIndex
uint256 private currentIndex;
// Provenance hash
string public PROVENANCE_HASH;
// Base URI
string private _shapesBaseURI;
// Starting Index
uint256 public startingIndex;
// Max number of NFTs
uint256 public constant MAX_SUPPLY = 20000;
uint256 public constant BASE_RATE_TOKENS = 1;
uint256 public _purchaseTimeout;
uint256 public _basePrice;
uint256 public _regularPrice;
uint256 private _maxToMint;
bool public saleIsActive;
bool public creepzRestriction;
bool private metadataFinalised;
bool private startingIndexSet;
// Royalty info
address public royaltyAddress;
uint256 private ROYALTY_SIZE = 750;
uint256 private ROYALTY_DENOMINATOR = 10000;
mapping(uint256 => address) private _royaltyReceivers;
// MEGA Address
address public MEGA;
// Loomi contract
ILOOMI public LOOMI;
ISTAKING public STAKING;
IERC721 public CREEPZ;
// Stores the number of minted tokens by user
mapping(address => uint256) public _mintedByAddress;
mapping(address => uint256) public _lastPurchased;
bytes32 internal keyHash;
uint256 internal fee;
event TokensMinted(
address indexed mintedBy,
uint256 indexed tokensNumber
);
event StartingIndexFinalized(
uint256 indexed startingIndex
);
event BaseUriUpdated(
string oldBaseUri,
string newBaseUri
);
constructor(address _royaltyAddress, address _loomi, address _staking, address _creepz, string memory _baseURI)
ERC721("Creepz Shapeshifters", "SHAPE")
VRFConsumerBase(
0xf0d54349aDdcf704F77AE15b96510dEA15cb7952, // VRF Coordinator
0x514910771AF9Ca656af840dff83E8264EcF986CA // LINK Token
)
{
}
modifier onlyMega() {
}
function shapePurchase(uint256 tokensToMint, uint256 tokenId) public nonReentrant {
if (_msgSender() != owner()) require(saleIsActive, "The mint has not started yet");
require(tokensToMint > 0, "Min mint is 1 token");
require(tokensToMint <= _maxToMint, "You can not mint that many tokens per transaction");
require(<FILL_ME>)
if (_msgSender() != owner()) {
require(_validateCreepzOwner(tokenId, _msgSender()), "!Creepz owner");
require(block.timestamp.sub(_lastPurchased[_msgSender()]) >= _purchaseTimeout, "Time limit restriction");
uint256 batchPrice = getTokenPrice(_msgSender(), tokensToMint);
LOOMI.spendLoomi(_msgSender(), batchPrice);
_mintedByAddress[_msgSender()] += tokensToMint;
}
for(uint256 i = 0; i < tokensToMint; i++) {
_safeMint(_msgSender(), currentIndex++);
}
_lastPurchased[_msgSender()] = block.timestamp;
emit TokensMinted(_msgSender(), tokensToMint);
}
function validateAndBurn(uint256[] memory tokenIds, address owner) external onlyMega {
}
function _validateCreepzOwner(uint256 tokenId, address user) internal view returns (bool) {
}
function getTokenPrice(address user, uint256 amount) internal view returns (uint256) {
}
function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount) {
}
function addRoyaltyReceiverForTokenId(address receiver, uint256 tokenId) public onlyOwner {
}
function updateSaleStatus(bool status) public onlyOwner {
}
function updateBasePrice(uint256 _newPrice) public onlyOwner {
}
function updateRegularPrice(uint256 _newPrice) public onlyOwner {
}
function setProvenanceHash(string memory provenanceHash) public onlyOwner {
}
function setBaseURI(string memory newBaseURI) public onlyOwner {
}
function finalizeStartingIndex() public onlyOwner returns (bytes32 requestId) {
}
/**
* Callback function used by VRF Coordinator
*/
function fulfillRandomness(bytes32, uint256 randomness) internal override {
}
function tokenURI(uint256 tokenId) external view virtual override returns (string memory) {
}
function finalizeMetadata() public onlyOwner {
}
function updateCreepzRestriction(bool _restrict) public onlyOwner {
}
function updatePurchaseTimeout(uint256 _timeoutInSeconds) public onlyOwner {
}
function updateMaxToMint(uint256 _max) public onlyOwner {
}
function setMegaAddress(address _megaAddress) public onlyOwner {
}
function withdraw() external onlyOwner {
}
}
| currentIndex.add(tokensToMint)<=MAX_SUPPLY,"Mint more tokens than allowed" | 387,895 | currentIndex.add(tokensToMint)<=MAX_SUPPLY |
"!Creepz owner" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "../utils/ERC721EnumerableBurnable.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
// /$$$$$$
// /$$__ $$
// | $$ \__/ /$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$$$
// | $$ /$$__ $$ /$$__ $$ /$$__ $$ /$$__ $$|____ /$$/
// | $$ | $$ \__/| $$$$$$$$| $$$$$$$$| $$ \ $$ /$$$$/
// | $$ $$| $$ | $$_____/| $$_____/| $$ | $$ /$$__/
// | $$$$$$/| $$ | $$$$$$$| $$$$$$$| $$$$$$$/ /$$$$$$$$
// \______/ |__/ \_______/ \_______/| $$____/ |________/
// | $$
// | $$
// |__/
// /$$$$$$ /$$
// /$$__ $$| $$
// | $$ \__/| $$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$
// | $$$$$$ | $$__ $$ |____ $$ /$$__ $$ /$$__ $$
// \____ $$| $$ \ $$ /$$$$$$$| $$ \ $$| $$$$$$$$
// /$$ \ $$| $$ | $$ /$$__ $$| $$ | $$| $$_____/
// | $$$$$$/| $$ | $$| $$$$$$$| $$$$$$$/| $$$$$$$
// \______/ |__/ |__/ \_______/| $$____/ \_______/
// | $$
// | $$
// |__/
// /$$$$$$ /$$ /$$ /$$$$$$ /$$
// /$$__ $$| $$ |__/ /$$__ $$ | $$
// | $$ \__/| $$$$$$$ /$$| $$ \__//$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$$
// | $$$$$$ | $$__ $$| $$| $$$$ |_ $$_/ /$$__ $$ /$$__ $$ /$$_____/
// \____ $$| $$ \ $$| $$| $$_/ | $$ | $$$$$$$$| $$ \__/| $$$$$$
// /$$ \ $$| $$ | $$| $$| $$ | $$ /$$| $$_____/| $$ \____ $$
// | $$$$$$/| $$ | $$| $$| $$ | $$$$/| $$$$$$$| $$ /$$$$$$$/
// \______/ |__/ |__/|__/|__/ \___/ \_______/|__/ |_______/
interface ILOOMI {
function spendLoomi(address user, uint256 amount) external;
}
interface ISTAKING {
function ownerOf(address contractAddress, uint256 tokenId) external view returns (address);
}
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/
contract CreepzShapeshifters is Context, ERC721EnumerableBurnable, VRFConsumerBase, Ownable, ReentrancyGuard {
using SafeMath for uint256;
using Strings for uint256;
// currentMintIndex
uint256 private currentIndex;
// Provenance hash
string public PROVENANCE_HASH;
// Base URI
string private _shapesBaseURI;
// Starting Index
uint256 public startingIndex;
// Max number of NFTs
uint256 public constant MAX_SUPPLY = 20000;
uint256 public constant BASE_RATE_TOKENS = 1;
uint256 public _purchaseTimeout;
uint256 public _basePrice;
uint256 public _regularPrice;
uint256 private _maxToMint;
bool public saleIsActive;
bool public creepzRestriction;
bool private metadataFinalised;
bool private startingIndexSet;
// Royalty info
address public royaltyAddress;
uint256 private ROYALTY_SIZE = 750;
uint256 private ROYALTY_DENOMINATOR = 10000;
mapping(uint256 => address) private _royaltyReceivers;
// MEGA Address
address public MEGA;
// Loomi contract
ILOOMI public LOOMI;
ISTAKING public STAKING;
IERC721 public CREEPZ;
// Stores the number of minted tokens by user
mapping(address => uint256) public _mintedByAddress;
mapping(address => uint256) public _lastPurchased;
bytes32 internal keyHash;
uint256 internal fee;
event TokensMinted(
address indexed mintedBy,
uint256 indexed tokensNumber
);
event StartingIndexFinalized(
uint256 indexed startingIndex
);
event BaseUriUpdated(
string oldBaseUri,
string newBaseUri
);
constructor(address _royaltyAddress, address _loomi, address _staking, address _creepz, string memory _baseURI)
ERC721("Creepz Shapeshifters", "SHAPE")
VRFConsumerBase(
0xf0d54349aDdcf704F77AE15b96510dEA15cb7952, // VRF Coordinator
0x514910771AF9Ca656af840dff83E8264EcF986CA // LINK Token
)
{
}
modifier onlyMega() {
}
function shapePurchase(uint256 tokensToMint, uint256 tokenId) public nonReentrant {
if (_msgSender() != owner()) require(saleIsActive, "The mint has not started yet");
require(tokensToMint > 0, "Min mint is 1 token");
require(tokensToMint <= _maxToMint, "You can not mint that many tokens per transaction");
require(currentIndex.add(tokensToMint) <= MAX_SUPPLY, "Mint more tokens than allowed");
if (_msgSender() != owner()) {
require(<FILL_ME>)
require(block.timestamp.sub(_lastPurchased[_msgSender()]) >= _purchaseTimeout, "Time limit restriction");
uint256 batchPrice = getTokenPrice(_msgSender(), tokensToMint);
LOOMI.spendLoomi(_msgSender(), batchPrice);
_mintedByAddress[_msgSender()] += tokensToMint;
}
for(uint256 i = 0; i < tokensToMint; i++) {
_safeMint(_msgSender(), currentIndex++);
}
_lastPurchased[_msgSender()] = block.timestamp;
emit TokensMinted(_msgSender(), tokensToMint);
}
function validateAndBurn(uint256[] memory tokenIds, address owner) external onlyMega {
}
function _validateCreepzOwner(uint256 tokenId, address user) internal view returns (bool) {
}
function getTokenPrice(address user, uint256 amount) internal view returns (uint256) {
}
function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount) {
}
function addRoyaltyReceiverForTokenId(address receiver, uint256 tokenId) public onlyOwner {
}
function updateSaleStatus(bool status) public onlyOwner {
}
function updateBasePrice(uint256 _newPrice) public onlyOwner {
}
function updateRegularPrice(uint256 _newPrice) public onlyOwner {
}
function setProvenanceHash(string memory provenanceHash) public onlyOwner {
}
function setBaseURI(string memory newBaseURI) public onlyOwner {
}
function finalizeStartingIndex() public onlyOwner returns (bytes32 requestId) {
}
/**
* Callback function used by VRF Coordinator
*/
function fulfillRandomness(bytes32, uint256 randomness) internal override {
}
function tokenURI(uint256 tokenId) external view virtual override returns (string memory) {
}
function finalizeMetadata() public onlyOwner {
}
function updateCreepzRestriction(bool _restrict) public onlyOwner {
}
function updatePurchaseTimeout(uint256 _timeoutInSeconds) public onlyOwner {
}
function updateMaxToMint(uint256 _max) public onlyOwner {
}
function setMegaAddress(address _megaAddress) public onlyOwner {
}
function withdraw() external onlyOwner {
}
}
| _validateCreepzOwner(tokenId,_msgSender()),"!Creepz owner" | 387,895 | _validateCreepzOwner(tokenId,_msgSender()) |
"Time limit restriction" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "../utils/ERC721EnumerableBurnable.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
// /$$$$$$
// /$$__ $$
// | $$ \__/ /$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$$$
// | $$ /$$__ $$ /$$__ $$ /$$__ $$ /$$__ $$|____ /$$/
// | $$ | $$ \__/| $$$$$$$$| $$$$$$$$| $$ \ $$ /$$$$/
// | $$ $$| $$ | $$_____/| $$_____/| $$ | $$ /$$__/
// | $$$$$$/| $$ | $$$$$$$| $$$$$$$| $$$$$$$/ /$$$$$$$$
// \______/ |__/ \_______/ \_______/| $$____/ |________/
// | $$
// | $$
// |__/
// /$$$$$$ /$$
// /$$__ $$| $$
// | $$ \__/| $$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$
// | $$$$$$ | $$__ $$ |____ $$ /$$__ $$ /$$__ $$
// \____ $$| $$ \ $$ /$$$$$$$| $$ \ $$| $$$$$$$$
// /$$ \ $$| $$ | $$ /$$__ $$| $$ | $$| $$_____/
// | $$$$$$/| $$ | $$| $$$$$$$| $$$$$$$/| $$$$$$$
// \______/ |__/ |__/ \_______/| $$____/ \_______/
// | $$
// | $$
// |__/
// /$$$$$$ /$$ /$$ /$$$$$$ /$$
// /$$__ $$| $$ |__/ /$$__ $$ | $$
// | $$ \__/| $$$$$$$ /$$| $$ \__//$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$$
// | $$$$$$ | $$__ $$| $$| $$$$ |_ $$_/ /$$__ $$ /$$__ $$ /$$_____/
// \____ $$| $$ \ $$| $$| $$_/ | $$ | $$$$$$$$| $$ \__/| $$$$$$
// /$$ \ $$| $$ | $$| $$| $$ | $$ /$$| $$_____/| $$ \____ $$
// | $$$$$$/| $$ | $$| $$| $$ | $$$$/| $$$$$$$| $$ /$$$$$$$/
// \______/ |__/ |__/|__/|__/ \___/ \_______/|__/ |_______/
interface ILOOMI {
function spendLoomi(address user, uint256 amount) external;
}
interface ISTAKING {
function ownerOf(address contractAddress, uint256 tokenId) external view returns (address);
}
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/
contract CreepzShapeshifters is Context, ERC721EnumerableBurnable, VRFConsumerBase, Ownable, ReentrancyGuard {
using SafeMath for uint256;
using Strings for uint256;
// currentMintIndex
uint256 private currentIndex;
// Provenance hash
string public PROVENANCE_HASH;
// Base URI
string private _shapesBaseURI;
// Starting Index
uint256 public startingIndex;
// Max number of NFTs
uint256 public constant MAX_SUPPLY = 20000;
uint256 public constant BASE_RATE_TOKENS = 1;
uint256 public _purchaseTimeout;
uint256 public _basePrice;
uint256 public _regularPrice;
uint256 private _maxToMint;
bool public saleIsActive;
bool public creepzRestriction;
bool private metadataFinalised;
bool private startingIndexSet;
// Royalty info
address public royaltyAddress;
uint256 private ROYALTY_SIZE = 750;
uint256 private ROYALTY_DENOMINATOR = 10000;
mapping(uint256 => address) private _royaltyReceivers;
// MEGA Address
address public MEGA;
// Loomi contract
ILOOMI public LOOMI;
ISTAKING public STAKING;
IERC721 public CREEPZ;
// Stores the number of minted tokens by user
mapping(address => uint256) public _mintedByAddress;
mapping(address => uint256) public _lastPurchased;
bytes32 internal keyHash;
uint256 internal fee;
event TokensMinted(
address indexed mintedBy,
uint256 indexed tokensNumber
);
event StartingIndexFinalized(
uint256 indexed startingIndex
);
event BaseUriUpdated(
string oldBaseUri,
string newBaseUri
);
constructor(address _royaltyAddress, address _loomi, address _staking, address _creepz, string memory _baseURI)
ERC721("Creepz Shapeshifters", "SHAPE")
VRFConsumerBase(
0xf0d54349aDdcf704F77AE15b96510dEA15cb7952, // VRF Coordinator
0x514910771AF9Ca656af840dff83E8264EcF986CA // LINK Token
)
{
}
modifier onlyMega() {
}
function shapePurchase(uint256 tokensToMint, uint256 tokenId) public nonReentrant {
if (_msgSender() != owner()) require(saleIsActive, "The mint has not started yet");
require(tokensToMint > 0, "Min mint is 1 token");
require(tokensToMint <= _maxToMint, "You can not mint that many tokens per transaction");
require(currentIndex.add(tokensToMint) <= MAX_SUPPLY, "Mint more tokens than allowed");
if (_msgSender() != owner()) {
require(_validateCreepzOwner(tokenId, _msgSender()), "!Creepz owner");
require(<FILL_ME>)
uint256 batchPrice = getTokenPrice(_msgSender(), tokensToMint);
LOOMI.spendLoomi(_msgSender(), batchPrice);
_mintedByAddress[_msgSender()] += tokensToMint;
}
for(uint256 i = 0; i < tokensToMint; i++) {
_safeMint(_msgSender(), currentIndex++);
}
_lastPurchased[_msgSender()] = block.timestamp;
emit TokensMinted(_msgSender(), tokensToMint);
}
function validateAndBurn(uint256[] memory tokenIds, address owner) external onlyMega {
}
function _validateCreepzOwner(uint256 tokenId, address user) internal view returns (bool) {
}
function getTokenPrice(address user, uint256 amount) internal view returns (uint256) {
}
function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount) {
}
function addRoyaltyReceiverForTokenId(address receiver, uint256 tokenId) public onlyOwner {
}
function updateSaleStatus(bool status) public onlyOwner {
}
function updateBasePrice(uint256 _newPrice) public onlyOwner {
}
function updateRegularPrice(uint256 _newPrice) public onlyOwner {
}
function setProvenanceHash(string memory provenanceHash) public onlyOwner {
}
function setBaseURI(string memory newBaseURI) public onlyOwner {
}
function finalizeStartingIndex() public onlyOwner returns (bytes32 requestId) {
}
/**
* Callback function used by VRF Coordinator
*/
function fulfillRandomness(bytes32, uint256 randomness) internal override {
}
function tokenURI(uint256 tokenId) external view virtual override returns (string memory) {
}
function finalizeMetadata() public onlyOwner {
}
function updateCreepzRestriction(bool _restrict) public onlyOwner {
}
function updatePurchaseTimeout(uint256 _timeoutInSeconds) public onlyOwner {
}
function updateMaxToMint(uint256 _max) public onlyOwner {
}
function setMegaAddress(address _megaAddress) public onlyOwner {
}
function withdraw() external onlyOwner {
}
}
| block.timestamp.sub(_lastPurchased[_msgSender()])>=_purchaseTimeout,"Time limit restriction" | 387,895 | block.timestamp.sub(_lastPurchased[_msgSender()])>=_purchaseTimeout |
"Not the owner" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "../utils/ERC721EnumerableBurnable.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
// /$$$$$$
// /$$__ $$
// | $$ \__/ /$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$$$
// | $$ /$$__ $$ /$$__ $$ /$$__ $$ /$$__ $$|____ /$$/
// | $$ | $$ \__/| $$$$$$$$| $$$$$$$$| $$ \ $$ /$$$$/
// | $$ $$| $$ | $$_____/| $$_____/| $$ | $$ /$$__/
// | $$$$$$/| $$ | $$$$$$$| $$$$$$$| $$$$$$$/ /$$$$$$$$
// \______/ |__/ \_______/ \_______/| $$____/ |________/
// | $$
// | $$
// |__/
// /$$$$$$ /$$
// /$$__ $$| $$
// | $$ \__/| $$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$
// | $$$$$$ | $$__ $$ |____ $$ /$$__ $$ /$$__ $$
// \____ $$| $$ \ $$ /$$$$$$$| $$ \ $$| $$$$$$$$
// /$$ \ $$| $$ | $$ /$$__ $$| $$ | $$| $$_____/
// | $$$$$$/| $$ | $$| $$$$$$$| $$$$$$$/| $$$$$$$
// \______/ |__/ |__/ \_______/| $$____/ \_______/
// | $$
// | $$
// |__/
// /$$$$$$ /$$ /$$ /$$$$$$ /$$
// /$$__ $$| $$ |__/ /$$__ $$ | $$
// | $$ \__/| $$$$$$$ /$$| $$ \__//$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$$
// | $$$$$$ | $$__ $$| $$| $$$$ |_ $$_/ /$$__ $$ /$$__ $$ /$$_____/
// \____ $$| $$ \ $$| $$| $$_/ | $$ | $$$$$$$$| $$ \__/| $$$$$$
// /$$ \ $$| $$ | $$| $$| $$ | $$ /$$| $$_____/| $$ \____ $$
// | $$$$$$/| $$ | $$| $$| $$ | $$$$/| $$$$$$$| $$ /$$$$$$$/
// \______/ |__/ |__/|__/|__/ \___/ \_______/|__/ |_______/
interface ILOOMI {
function spendLoomi(address user, uint256 amount) external;
}
interface ISTAKING {
function ownerOf(address contractAddress, uint256 tokenId) external view returns (address);
}
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/
contract CreepzShapeshifters is Context, ERC721EnumerableBurnable, VRFConsumerBase, Ownable, ReentrancyGuard {
using SafeMath for uint256;
using Strings for uint256;
// currentMintIndex
uint256 private currentIndex;
// Provenance hash
string public PROVENANCE_HASH;
// Base URI
string private _shapesBaseURI;
// Starting Index
uint256 public startingIndex;
// Max number of NFTs
uint256 public constant MAX_SUPPLY = 20000;
uint256 public constant BASE_RATE_TOKENS = 1;
uint256 public _purchaseTimeout;
uint256 public _basePrice;
uint256 public _regularPrice;
uint256 private _maxToMint;
bool public saleIsActive;
bool public creepzRestriction;
bool private metadataFinalised;
bool private startingIndexSet;
// Royalty info
address public royaltyAddress;
uint256 private ROYALTY_SIZE = 750;
uint256 private ROYALTY_DENOMINATOR = 10000;
mapping(uint256 => address) private _royaltyReceivers;
// MEGA Address
address public MEGA;
// Loomi contract
ILOOMI public LOOMI;
ISTAKING public STAKING;
IERC721 public CREEPZ;
// Stores the number of minted tokens by user
mapping(address => uint256) public _mintedByAddress;
mapping(address => uint256) public _lastPurchased;
bytes32 internal keyHash;
uint256 internal fee;
event TokensMinted(
address indexed mintedBy,
uint256 indexed tokensNumber
);
event StartingIndexFinalized(
uint256 indexed startingIndex
);
event BaseUriUpdated(
string oldBaseUri,
string newBaseUri
);
constructor(address _royaltyAddress, address _loomi, address _staking, address _creepz, string memory _baseURI)
ERC721("Creepz Shapeshifters", "SHAPE")
VRFConsumerBase(
0xf0d54349aDdcf704F77AE15b96510dEA15cb7952, // VRF Coordinator
0x514910771AF9Ca656af840dff83E8264EcF986CA // LINK Token
)
{
}
modifier onlyMega() {
}
function shapePurchase(uint256 tokensToMint, uint256 tokenId) public nonReentrant {
}
function validateAndBurn(uint256[] memory tokenIds, address owner) external onlyMega {
require(tokenIds.length == 5, "Invalid array passed");
for (uint256 i; i < tokenIds.length; i++) {
require(<FILL_ME>)
_burn(tokenIds[i]);
}
}
function _validateCreepzOwner(uint256 tokenId, address user) internal view returns (bool) {
}
function getTokenPrice(address user, uint256 amount) internal view returns (uint256) {
}
function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount) {
}
function addRoyaltyReceiverForTokenId(address receiver, uint256 tokenId) public onlyOwner {
}
function updateSaleStatus(bool status) public onlyOwner {
}
function updateBasePrice(uint256 _newPrice) public onlyOwner {
}
function updateRegularPrice(uint256 _newPrice) public onlyOwner {
}
function setProvenanceHash(string memory provenanceHash) public onlyOwner {
}
function setBaseURI(string memory newBaseURI) public onlyOwner {
}
function finalizeStartingIndex() public onlyOwner returns (bytes32 requestId) {
}
/**
* Callback function used by VRF Coordinator
*/
function fulfillRandomness(bytes32, uint256 randomness) internal override {
}
function tokenURI(uint256 tokenId) external view virtual override returns (string memory) {
}
function finalizeMetadata() public onlyOwner {
}
function updateCreepzRestriction(bool _restrict) public onlyOwner {
}
function updatePurchaseTimeout(uint256 _timeoutInSeconds) public onlyOwner {
}
function updateMaxToMint(uint256 _max) public onlyOwner {
}
function setMegaAddress(address _megaAddress) public onlyOwner {
}
function withdraw() external onlyOwner {
}
}
| ownerOf(tokenIds[i])==owner,"Not the owner" | 387,895 | ownerOf(tokenIds[i])==owner |
"Provenance hash has already been set" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "../utils/ERC721EnumerableBurnable.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
// /$$$$$$
// /$$__ $$
// | $$ \__/ /$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$$$
// | $$ /$$__ $$ /$$__ $$ /$$__ $$ /$$__ $$|____ /$$/
// | $$ | $$ \__/| $$$$$$$$| $$$$$$$$| $$ \ $$ /$$$$/
// | $$ $$| $$ | $$_____/| $$_____/| $$ | $$ /$$__/
// | $$$$$$/| $$ | $$$$$$$| $$$$$$$| $$$$$$$/ /$$$$$$$$
// \______/ |__/ \_______/ \_______/| $$____/ |________/
// | $$
// | $$
// |__/
// /$$$$$$ /$$
// /$$__ $$| $$
// | $$ \__/| $$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$
// | $$$$$$ | $$__ $$ |____ $$ /$$__ $$ /$$__ $$
// \____ $$| $$ \ $$ /$$$$$$$| $$ \ $$| $$$$$$$$
// /$$ \ $$| $$ | $$ /$$__ $$| $$ | $$| $$_____/
// | $$$$$$/| $$ | $$| $$$$$$$| $$$$$$$/| $$$$$$$
// \______/ |__/ |__/ \_______/| $$____/ \_______/
// | $$
// | $$
// |__/
// /$$$$$$ /$$ /$$ /$$$$$$ /$$
// /$$__ $$| $$ |__/ /$$__ $$ | $$
// | $$ \__/| $$$$$$$ /$$| $$ \__//$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$$
// | $$$$$$ | $$__ $$| $$| $$$$ |_ $$_/ /$$__ $$ /$$__ $$ /$$_____/
// \____ $$| $$ \ $$| $$| $$_/ | $$ | $$$$$$$$| $$ \__/| $$$$$$
// /$$ \ $$| $$ | $$| $$| $$ | $$ /$$| $$_____/| $$ \____ $$
// | $$$$$$/| $$ | $$| $$| $$ | $$$$/| $$$$$$$| $$ /$$$$$$$/
// \______/ |__/ |__/|__/|__/ \___/ \_______/|__/ |_______/
interface ILOOMI {
function spendLoomi(address user, uint256 amount) external;
}
interface ISTAKING {
function ownerOf(address contractAddress, uint256 tokenId) external view returns (address);
}
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/
contract CreepzShapeshifters is Context, ERC721EnumerableBurnable, VRFConsumerBase, Ownable, ReentrancyGuard {
using SafeMath for uint256;
using Strings for uint256;
// currentMintIndex
uint256 private currentIndex;
// Provenance hash
string public PROVENANCE_HASH;
// Base URI
string private _shapesBaseURI;
// Starting Index
uint256 public startingIndex;
// Max number of NFTs
uint256 public constant MAX_SUPPLY = 20000;
uint256 public constant BASE_RATE_TOKENS = 1;
uint256 public _purchaseTimeout;
uint256 public _basePrice;
uint256 public _regularPrice;
uint256 private _maxToMint;
bool public saleIsActive;
bool public creepzRestriction;
bool private metadataFinalised;
bool private startingIndexSet;
// Royalty info
address public royaltyAddress;
uint256 private ROYALTY_SIZE = 750;
uint256 private ROYALTY_DENOMINATOR = 10000;
mapping(uint256 => address) private _royaltyReceivers;
// MEGA Address
address public MEGA;
// Loomi contract
ILOOMI public LOOMI;
ISTAKING public STAKING;
IERC721 public CREEPZ;
// Stores the number of minted tokens by user
mapping(address => uint256) public _mintedByAddress;
mapping(address => uint256) public _lastPurchased;
bytes32 internal keyHash;
uint256 internal fee;
event TokensMinted(
address indexed mintedBy,
uint256 indexed tokensNumber
);
event StartingIndexFinalized(
uint256 indexed startingIndex
);
event BaseUriUpdated(
string oldBaseUri,
string newBaseUri
);
constructor(address _royaltyAddress, address _loomi, address _staking, address _creepz, string memory _baseURI)
ERC721("Creepz Shapeshifters", "SHAPE")
VRFConsumerBase(
0xf0d54349aDdcf704F77AE15b96510dEA15cb7952, // VRF Coordinator
0x514910771AF9Ca656af840dff83E8264EcF986CA // LINK Token
)
{
}
modifier onlyMega() {
}
function shapePurchase(uint256 tokensToMint, uint256 tokenId) public nonReentrant {
}
function validateAndBurn(uint256[] memory tokenIds, address owner) external onlyMega {
}
function _validateCreepzOwner(uint256 tokenId, address user) internal view returns (bool) {
}
function getTokenPrice(address user, uint256 amount) internal view returns (uint256) {
}
function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount) {
}
function addRoyaltyReceiverForTokenId(address receiver, uint256 tokenId) public onlyOwner {
}
function updateSaleStatus(bool status) public onlyOwner {
}
function updateBasePrice(uint256 _newPrice) public onlyOwner {
}
function updateRegularPrice(uint256 _newPrice) public onlyOwner {
}
function setProvenanceHash(string memory provenanceHash) public onlyOwner {
require(<FILL_ME>)
PROVENANCE_HASH = provenanceHash;
}
function setBaseURI(string memory newBaseURI) public onlyOwner {
}
function finalizeStartingIndex() public onlyOwner returns (bytes32 requestId) {
}
/**
* Callback function used by VRF Coordinator
*/
function fulfillRandomness(bytes32, uint256 randomness) internal override {
}
function tokenURI(uint256 tokenId) external view virtual override returns (string memory) {
}
function finalizeMetadata() public onlyOwner {
}
function updateCreepzRestriction(bool _restrict) public onlyOwner {
}
function updatePurchaseTimeout(uint256 _timeoutInSeconds) public onlyOwner {
}
function updateMaxToMint(uint256 _max) public onlyOwner {
}
function setMegaAddress(address _megaAddress) public onlyOwner {
}
function withdraw() external onlyOwner {
}
}
| bytes(PROVENANCE_HASH).length==0,"Provenance hash has already been set" | 387,895 | bytes(PROVENANCE_HASH).length==0 |
"Metadata already finalised" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "../utils/ERC721EnumerableBurnable.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
// /$$$$$$
// /$$__ $$
// | $$ \__/ /$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$$$
// | $$ /$$__ $$ /$$__ $$ /$$__ $$ /$$__ $$|____ /$$/
// | $$ | $$ \__/| $$$$$$$$| $$$$$$$$| $$ \ $$ /$$$$/
// | $$ $$| $$ | $$_____/| $$_____/| $$ | $$ /$$__/
// | $$$$$$/| $$ | $$$$$$$| $$$$$$$| $$$$$$$/ /$$$$$$$$
// \______/ |__/ \_______/ \_______/| $$____/ |________/
// | $$
// | $$
// |__/
// /$$$$$$ /$$
// /$$__ $$| $$
// | $$ \__/| $$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$
// | $$$$$$ | $$__ $$ |____ $$ /$$__ $$ /$$__ $$
// \____ $$| $$ \ $$ /$$$$$$$| $$ \ $$| $$$$$$$$
// /$$ \ $$| $$ | $$ /$$__ $$| $$ | $$| $$_____/
// | $$$$$$/| $$ | $$| $$$$$$$| $$$$$$$/| $$$$$$$
// \______/ |__/ |__/ \_______/| $$____/ \_______/
// | $$
// | $$
// |__/
// /$$$$$$ /$$ /$$ /$$$$$$ /$$
// /$$__ $$| $$ |__/ /$$__ $$ | $$
// | $$ \__/| $$$$$$$ /$$| $$ \__//$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$$
// | $$$$$$ | $$__ $$| $$| $$$$ |_ $$_/ /$$__ $$ /$$__ $$ /$$_____/
// \____ $$| $$ \ $$| $$| $$_/ | $$ | $$$$$$$$| $$ \__/| $$$$$$
// /$$ \ $$| $$ | $$| $$| $$ | $$ /$$| $$_____/| $$ \____ $$
// | $$$$$$/| $$ | $$| $$| $$ | $$$$/| $$$$$$$| $$ /$$$$$$$/
// \______/ |__/ |__/|__/|__/ \___/ \_______/|__/ |_______/
interface ILOOMI {
function spendLoomi(address user, uint256 amount) external;
}
interface ISTAKING {
function ownerOf(address contractAddress, uint256 tokenId) external view returns (address);
}
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/
contract CreepzShapeshifters is Context, ERC721EnumerableBurnable, VRFConsumerBase, Ownable, ReentrancyGuard {
using SafeMath for uint256;
using Strings for uint256;
// currentMintIndex
uint256 private currentIndex;
// Provenance hash
string public PROVENANCE_HASH;
// Base URI
string private _shapesBaseURI;
// Starting Index
uint256 public startingIndex;
// Max number of NFTs
uint256 public constant MAX_SUPPLY = 20000;
uint256 public constant BASE_RATE_TOKENS = 1;
uint256 public _purchaseTimeout;
uint256 public _basePrice;
uint256 public _regularPrice;
uint256 private _maxToMint;
bool public saleIsActive;
bool public creepzRestriction;
bool private metadataFinalised;
bool private startingIndexSet;
// Royalty info
address public royaltyAddress;
uint256 private ROYALTY_SIZE = 750;
uint256 private ROYALTY_DENOMINATOR = 10000;
mapping(uint256 => address) private _royaltyReceivers;
// MEGA Address
address public MEGA;
// Loomi contract
ILOOMI public LOOMI;
ISTAKING public STAKING;
IERC721 public CREEPZ;
// Stores the number of minted tokens by user
mapping(address => uint256) public _mintedByAddress;
mapping(address => uint256) public _lastPurchased;
bytes32 internal keyHash;
uint256 internal fee;
event TokensMinted(
address indexed mintedBy,
uint256 indexed tokensNumber
);
event StartingIndexFinalized(
uint256 indexed startingIndex
);
event BaseUriUpdated(
string oldBaseUri,
string newBaseUri
);
constructor(address _royaltyAddress, address _loomi, address _staking, address _creepz, string memory _baseURI)
ERC721("Creepz Shapeshifters", "SHAPE")
VRFConsumerBase(
0xf0d54349aDdcf704F77AE15b96510dEA15cb7952, // VRF Coordinator
0x514910771AF9Ca656af840dff83E8264EcF986CA // LINK Token
)
{
}
modifier onlyMega() {
}
function shapePurchase(uint256 tokensToMint, uint256 tokenId) public nonReentrant {
}
function validateAndBurn(uint256[] memory tokenIds, address owner) external onlyMega {
}
function _validateCreepzOwner(uint256 tokenId, address user) internal view returns (bool) {
}
function getTokenPrice(address user, uint256 amount) internal view returns (uint256) {
}
function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount) {
}
function addRoyaltyReceiverForTokenId(address receiver, uint256 tokenId) public onlyOwner {
}
function updateSaleStatus(bool status) public onlyOwner {
}
function updateBasePrice(uint256 _newPrice) public onlyOwner {
}
function updateRegularPrice(uint256 _newPrice) public onlyOwner {
}
function setProvenanceHash(string memory provenanceHash) public onlyOwner {
}
function setBaseURI(string memory newBaseURI) public onlyOwner {
require(<FILL_ME>)
string memory currentURI = _shapesBaseURI;
_shapesBaseURI = newBaseURI;
emit BaseUriUpdated(currentURI, newBaseURI);
}
function finalizeStartingIndex() public onlyOwner returns (bytes32 requestId) {
}
/**
* Callback function used by VRF Coordinator
*/
function fulfillRandomness(bytes32, uint256 randomness) internal override {
}
function tokenURI(uint256 tokenId) external view virtual override returns (string memory) {
}
function finalizeMetadata() public onlyOwner {
}
function updateCreepzRestriction(bool _restrict) public onlyOwner {
}
function updatePurchaseTimeout(uint256 _timeoutInSeconds) public onlyOwner {
}
function updateMaxToMint(uint256 _max) public onlyOwner {
}
function setMegaAddress(address _megaAddress) public onlyOwner {
}
function withdraw() external onlyOwner {
}
}
| !metadataFinalised,"Metadata already finalised" | 387,895 | !metadataFinalised |
'startingIndex already set' | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "../utils/ERC721EnumerableBurnable.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
// /$$$$$$
// /$$__ $$
// | $$ \__/ /$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$$$
// | $$ /$$__ $$ /$$__ $$ /$$__ $$ /$$__ $$|____ /$$/
// | $$ | $$ \__/| $$$$$$$$| $$$$$$$$| $$ \ $$ /$$$$/
// | $$ $$| $$ | $$_____/| $$_____/| $$ | $$ /$$__/
// | $$$$$$/| $$ | $$$$$$$| $$$$$$$| $$$$$$$/ /$$$$$$$$
// \______/ |__/ \_______/ \_______/| $$____/ |________/
// | $$
// | $$
// |__/
// /$$$$$$ /$$
// /$$__ $$| $$
// | $$ \__/| $$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$
// | $$$$$$ | $$__ $$ |____ $$ /$$__ $$ /$$__ $$
// \____ $$| $$ \ $$ /$$$$$$$| $$ \ $$| $$$$$$$$
// /$$ \ $$| $$ | $$ /$$__ $$| $$ | $$| $$_____/
// | $$$$$$/| $$ | $$| $$$$$$$| $$$$$$$/| $$$$$$$
// \______/ |__/ |__/ \_______/| $$____/ \_______/
// | $$
// | $$
// |__/
// /$$$$$$ /$$ /$$ /$$$$$$ /$$
// /$$__ $$| $$ |__/ /$$__ $$ | $$
// | $$ \__/| $$$$$$$ /$$| $$ \__//$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$$
// | $$$$$$ | $$__ $$| $$| $$$$ |_ $$_/ /$$__ $$ /$$__ $$ /$$_____/
// \____ $$| $$ \ $$| $$| $$_/ | $$ | $$$$$$$$| $$ \__/| $$$$$$
// /$$ \ $$| $$ | $$| $$| $$ | $$ /$$| $$_____/| $$ \____ $$
// | $$$$$$/| $$ | $$| $$| $$ | $$$$/| $$$$$$$| $$ /$$$$$$$/
// \______/ |__/ |__/|__/|__/ \___/ \_______/|__/ |_______/
interface ILOOMI {
function spendLoomi(address user, uint256 amount) external;
}
interface ISTAKING {
function ownerOf(address contractAddress, uint256 tokenId) external view returns (address);
}
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/
contract CreepzShapeshifters is Context, ERC721EnumerableBurnable, VRFConsumerBase, Ownable, ReentrancyGuard {
using SafeMath for uint256;
using Strings for uint256;
// currentMintIndex
uint256 private currentIndex;
// Provenance hash
string public PROVENANCE_HASH;
// Base URI
string private _shapesBaseURI;
// Starting Index
uint256 public startingIndex;
// Max number of NFTs
uint256 public constant MAX_SUPPLY = 20000;
uint256 public constant BASE_RATE_TOKENS = 1;
uint256 public _purchaseTimeout;
uint256 public _basePrice;
uint256 public _regularPrice;
uint256 private _maxToMint;
bool public saleIsActive;
bool public creepzRestriction;
bool private metadataFinalised;
bool private startingIndexSet;
// Royalty info
address public royaltyAddress;
uint256 private ROYALTY_SIZE = 750;
uint256 private ROYALTY_DENOMINATOR = 10000;
mapping(uint256 => address) private _royaltyReceivers;
// MEGA Address
address public MEGA;
// Loomi contract
ILOOMI public LOOMI;
ISTAKING public STAKING;
IERC721 public CREEPZ;
// Stores the number of minted tokens by user
mapping(address => uint256) public _mintedByAddress;
mapping(address => uint256) public _lastPurchased;
bytes32 internal keyHash;
uint256 internal fee;
event TokensMinted(
address indexed mintedBy,
uint256 indexed tokensNumber
);
event StartingIndexFinalized(
uint256 indexed startingIndex
);
event BaseUriUpdated(
string oldBaseUri,
string newBaseUri
);
constructor(address _royaltyAddress, address _loomi, address _staking, address _creepz, string memory _baseURI)
ERC721("Creepz Shapeshifters", "SHAPE")
VRFConsumerBase(
0xf0d54349aDdcf704F77AE15b96510dEA15cb7952, // VRF Coordinator
0x514910771AF9Ca656af840dff83E8264EcF986CA // LINK Token
)
{
}
modifier onlyMega() {
}
function shapePurchase(uint256 tokensToMint, uint256 tokenId) public nonReentrant {
}
function validateAndBurn(uint256[] memory tokenIds, address owner) external onlyMega {
}
function _validateCreepzOwner(uint256 tokenId, address user) internal view returns (bool) {
}
function getTokenPrice(address user, uint256 amount) internal view returns (uint256) {
}
function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount) {
}
function addRoyaltyReceiverForTokenId(address receiver, uint256 tokenId) public onlyOwner {
}
function updateSaleStatus(bool status) public onlyOwner {
}
function updateBasePrice(uint256 _newPrice) public onlyOwner {
}
function updateRegularPrice(uint256 _newPrice) public onlyOwner {
}
function setProvenanceHash(string memory provenanceHash) public onlyOwner {
}
function setBaseURI(string memory newBaseURI) public onlyOwner {
}
function finalizeStartingIndex() public onlyOwner returns (bytes32 requestId) {
require(<FILL_ME>)
require(LINK.balanceOf(address(this)) >= fee, "Not enough LINK - fill contract with faucet");
return requestRandomness(keyHash, fee);
}
/**
* Callback function used by VRF Coordinator
*/
function fulfillRandomness(bytes32, uint256 randomness) internal override {
}
function tokenURI(uint256 tokenId) external view virtual override returns (string memory) {
}
function finalizeMetadata() public onlyOwner {
}
function updateCreepzRestriction(bool _restrict) public onlyOwner {
}
function updatePurchaseTimeout(uint256 _timeoutInSeconds) public onlyOwner {
}
function updateMaxToMint(uint256 _max) public onlyOwner {
}
function setMegaAddress(address _megaAddress) public onlyOwner {
}
function withdraw() external onlyOwner {
}
}
| !startingIndexSet,'startingIndex already set' | 387,895 | !startingIndexSet |
null | /**
*Submitted for verification at Etherscan.io on 2020-03-30
*/
pragma solidity ^0.4.23;
/**
* @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 {
}
}
/**
*
* @title ERC223
* @dev 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 {
uint public totalSupply;
// ERC223 and ERC20 functions and events
function balanceOf(address who) public view returns (uint);
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 customFallback) public returns (bool ok);
event Transfer(address indexed from, address indexed to, uint value, bytes indexed data);
// ERC223 functions
function name() public view returns (string _name);
function symbol() public view returns (string _symbol);
function decimals() public view returns (uint8 _decimals);
// ERC20 functions and events
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
function allowance(address _owner, address _spender) public view returns (uint256 remaining);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint _value);
}
/**
* @title ContractReceiver
* @dev Contract that is working with ERC223 tokens
*/
contract ContractReceiver {
struct TKN {
address sender;
uint value;
bytes data;
bytes4 sig;
}
function tokenFallback(address _from, uint _value, bytes _data) public pure {
}
}
/*******************************************************************************/
/**
* @title CHE
* @author CHE Members
* @dev CHE is an ERC223 Token with ERC20 functions and events
* Fully backward compatible with ERC20
*/
/*******************************************************************************/
contract CHE is ERC223, Ownable {
using SafeMath for uint256;
/*******************************************************************************/
//
// Definition of CryproCurrency
//
/*******************************************************************************/
string public name = "Cryptoharbor exchange Ver.2.2020";
string public symbol = "CHE";
uint8 public decimals = 8;
uint256 public initialSupply = 350e8 * 1e8;
uint256 public totalSupply;
uint256 public distributeAmount = 0;
bool public mintingFinished = false;
/*******************************************************************************/
//-----------------------------------------------------------------------------
mapping(address => uint256) public balanceOf;
mapping(address => mapping (address => uint256)) public allowance;
mapping (address => bool) public frozenAccount;
mapping (address => uint256) public unlockUnixTime;
event FrozenFunds(address indexed target, bool frozen);
event LockedFunds(address indexed target, uint256 locked);
event Burn(address indexed from, uint256 amount);
event Mint(address indexed to, uint256 amount);
event MintFinished();
/**
* @dev Constructor is called only once and can not be called again
*/
constructor() public {
}
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 _totalSupply) {
}
function balanceOf(address _owner) public view returns (uint256 balance) {
}
/**
* @dev Prevent targets from sending or receiving tokens
* @param targets Addresses to be frozen
* @param isFrozen either to freeze it or not
*/
function freezeAccounts(address[] targets, bool isFrozen) onlyOwner public {
}
/**
* @dev Prevent targets from sending or receiving tokens by setting Unix times
* @param targets Addresses to be locked funds
* @param unixTimes Unix times when locking up will be finished
*/
function lockupAccounts(address[] targets, uint[] unixTimes) onlyOwner public {
}
/**
* @dev 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) public returns (bool success) {
}
function transfer(address _to, uint _value, bytes _data) public returns (bool success) {
}
/**
* @dev Standard function transfer similar to ERC20 transfer with no _data
* Added due to backwards compatibility reasons
*/
function transfer(address _to, uint _value) 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) {
}
/**
* @dev Transfer tokens from one address to another
* Added due to backwards compatibility with ERC20
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
/**
* @dev Allows _spender to spend no more than _value tokens in your behalf
* Added due to backwards compatibility with ERC20
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
*/
function approve(address _spender, uint256 _value) public returns (bool success) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender
* Added due to backwards compatibility with ERC20
* @param _owner address The address which owns the funds
* @param _spender address The address which will spend the funds
*/
function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
}
/**
* @dev Burns a specific amount of tokens.
* @param _from The address that will burn the tokens.
* @param _unitAmount The amount of token to be burned.
*/
function burn(address _from, uint256 _unitAmount) onlyOwner public {
}
modifier canMint() {
}
/**
* @dev Function to mint tokens
* @param _to The address that will receive the minted tokens.
* @param _unitAmount The amount of tokens to mint.
*/
function mint(address _to, uint256 _unitAmount) onlyOwner canMint public returns (bool) {
}
/**
* @dev Function to stop minting new tokens.
*/
function finishMinting() onlyOwner canMint public returns (bool) {
}
/**
* @dev Function to distribute tokens to the list of addresses by the provided amount
*/
function distributeAirdrop(address[] addresses, uint256 amount) public returns (bool) {
require(amount > 0
&& addresses.length > 0
&& frozenAccount[msg.sender] == false
&& block.timestamp > unlockUnixTime[msg.sender]);
amount = amount.mul(1e8);
uint256 totalAmount = amount.mul(addresses.length);
require(balanceOf[msg.sender] >= totalAmount);
for (uint j = 0; j < addresses.length; j++) {
require(<FILL_ME>)
balanceOf[addresses[j]] = balanceOf[addresses[j]].add(amount);
emit Transfer(msg.sender, addresses[j], amount);
}
balanceOf[msg.sender] = balanceOf[msg.sender].sub(totalAmount);
return true;
}
function distributeAirdrop(address[] addresses, uint[] amounts) public returns (bool) {
}
/**
* @dev Function to collect tokens from the list of addresses
*/
function collectTokens(address[] addresses, uint[] amounts) onlyOwner public returns (bool) {
}
function setDistributeAmount(uint256 _unitAmount) onlyOwner public {
}
/**
* @dev Function to distribute tokens to the msg.sender automatically
* If distributeAmount is 0, this function doesn't work
*/
function autoDistribute() payable public {
}
/**
* @dev fallback function
*/
function() payable public {
}
}
| addresses[j]!=0x0&&frozenAccount[addresses[j]]==false&&block.timestamp>unlockUnixTime[addresses[j]] | 387,976 | addresses[j]!=0x0&&frozenAccount[addresses[j]]==false&&block.timestamp>unlockUnixTime[addresses[j]] |
null | /**
*Submitted for verification at Etherscan.io on 2020-03-30
*/
pragma solidity ^0.4.23;
/**
* @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 {
}
}
/**
*
* @title ERC223
* @dev 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 {
uint public totalSupply;
// ERC223 and ERC20 functions and events
function balanceOf(address who) public view returns (uint);
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 customFallback) public returns (bool ok);
event Transfer(address indexed from, address indexed to, uint value, bytes indexed data);
// ERC223 functions
function name() public view returns (string _name);
function symbol() public view returns (string _symbol);
function decimals() public view returns (uint8 _decimals);
// ERC20 functions and events
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
function allowance(address _owner, address _spender) public view returns (uint256 remaining);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint _value);
}
/**
* @title ContractReceiver
* @dev Contract that is working with ERC223 tokens
*/
contract ContractReceiver {
struct TKN {
address sender;
uint value;
bytes data;
bytes4 sig;
}
function tokenFallback(address _from, uint _value, bytes _data) public pure {
}
}
/*******************************************************************************/
/**
* @title CHE
* @author CHE Members
* @dev CHE is an ERC223 Token with ERC20 functions and events
* Fully backward compatible with ERC20
*/
/*******************************************************************************/
contract CHE is ERC223, Ownable {
using SafeMath for uint256;
/*******************************************************************************/
//
// Definition of CryproCurrency
//
/*******************************************************************************/
string public name = "Cryptoharbor exchange Ver.2.2020";
string public symbol = "CHE";
uint8 public decimals = 8;
uint256 public initialSupply = 350e8 * 1e8;
uint256 public totalSupply;
uint256 public distributeAmount = 0;
bool public mintingFinished = false;
/*******************************************************************************/
//-----------------------------------------------------------------------------
mapping(address => uint256) public balanceOf;
mapping(address => mapping (address => uint256)) public allowance;
mapping (address => bool) public frozenAccount;
mapping (address => uint256) public unlockUnixTime;
event FrozenFunds(address indexed target, bool frozen);
event LockedFunds(address indexed target, uint256 locked);
event Burn(address indexed from, uint256 amount);
event Mint(address indexed to, uint256 amount);
event MintFinished();
/**
* @dev Constructor is called only once and can not be called again
*/
constructor() public {
}
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 _totalSupply) {
}
function balanceOf(address _owner) public view returns (uint256 balance) {
}
/**
* @dev Prevent targets from sending or receiving tokens
* @param targets Addresses to be frozen
* @param isFrozen either to freeze it or not
*/
function freezeAccounts(address[] targets, bool isFrozen) onlyOwner public {
}
/**
* @dev Prevent targets from sending or receiving tokens by setting Unix times
* @param targets Addresses to be locked funds
* @param unixTimes Unix times when locking up will be finished
*/
function lockupAccounts(address[] targets, uint[] unixTimes) onlyOwner public {
}
/**
* @dev 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) public returns (bool success) {
}
function transfer(address _to, uint _value, bytes _data) public returns (bool success) {
}
/**
* @dev Standard function transfer similar to ERC20 transfer with no _data
* Added due to backwards compatibility reasons
*/
function transfer(address _to, uint _value) 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) {
}
/**
* @dev Transfer tokens from one address to another
* Added due to backwards compatibility with ERC20
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
/**
* @dev Allows _spender to spend no more than _value tokens in your behalf
* Added due to backwards compatibility with ERC20
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
*/
function approve(address _spender, uint256 _value) public returns (bool success) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender
* Added due to backwards compatibility with ERC20
* @param _owner address The address which owns the funds
* @param _spender address The address which will spend the funds
*/
function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
}
/**
* @dev Burns a specific amount of tokens.
* @param _from The address that will burn the tokens.
* @param _unitAmount The amount of token to be burned.
*/
function burn(address _from, uint256 _unitAmount) onlyOwner public {
}
modifier canMint() {
}
/**
* @dev Function to mint tokens
* @param _to The address that will receive the minted tokens.
* @param _unitAmount The amount of tokens to mint.
*/
function mint(address _to, uint256 _unitAmount) onlyOwner canMint public returns (bool) {
}
/**
* @dev Function to stop minting new tokens.
*/
function finishMinting() onlyOwner canMint public returns (bool) {
}
/**
* @dev Function to distribute tokens to the list of addresses by the provided amount
*/
function distributeAirdrop(address[] addresses, uint256 amount) public returns (bool) {
}
function distributeAirdrop(address[] addresses, uint[] amounts) public returns (bool) {
require(addresses.length > 0
&& addresses.length == amounts.length
&& frozenAccount[msg.sender] == false
&& block.timestamp > unlockUnixTime[msg.sender]);
uint256 totalAmount = 0;
for(uint j = 0; j < addresses.length; j++){
require(<FILL_ME>)
amounts[j] = amounts[j].mul(1e8);
totalAmount = totalAmount.add(amounts[j]);
}
require(balanceOf[msg.sender] >= totalAmount);
for (j = 0; j < addresses.length; j++) {
balanceOf[addresses[j]] = balanceOf[addresses[j]].add(amounts[j]);
emit Transfer(msg.sender, addresses[j], amounts[j]);
}
balanceOf[msg.sender] = balanceOf[msg.sender].sub(totalAmount);
return true;
}
/**
* @dev Function to collect tokens from the list of addresses
*/
function collectTokens(address[] addresses, uint[] amounts) onlyOwner public returns (bool) {
}
function setDistributeAmount(uint256 _unitAmount) onlyOwner public {
}
/**
* @dev Function to distribute tokens to the msg.sender automatically
* If distributeAmount is 0, this function doesn't work
*/
function autoDistribute() payable public {
}
/**
* @dev fallback function
*/
function() payable public {
}
}
| amounts[j]>0&&addresses[j]!=0x0&&frozenAccount[addresses[j]]==false&&block.timestamp>unlockUnixTime[addresses[j]] | 387,976 | amounts[j]>0&&addresses[j]!=0x0&&frozenAccount[addresses[j]]==false&&block.timestamp>unlockUnixTime[addresses[j]] |
"Fusing: invalid minter" | pragma solidity 0.5.11;
contract Context {
constructor () internal { }
function _msgSender() internal view returns (address payable) {
}
function _msgData() internal view returns (bytes memory) {
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () internal {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function isOwner() public view returns (bool) {
}
function renounceOwnership() public onlyOwner {
}
function transferOwnership(address newOwner) public onlyOwner {
}
function _transferOwnership(address newOwner) internal {
}
}
interface IERC165 {
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
contract IERC721 is IERC165 {
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
function balanceOf(address owner) public view returns (uint256 balance);
function ownerOf(uint256 tokenId) public view returns (address owner);
function safeTransferFrom(address from, address to, uint256 tokenId) public;
function transferFrom(address from, address to, uint256 tokenId) public;
function approve(address to, uint256 tokenId) public;
function getApproved(uint256 tokenId) public view returns (address operator);
function setApprovalForAll(address operator, bool _approved) public;
function isApprovedForAll(address owner, address operator) public view returns (bool);
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public;
}
contract ICards is IERC721 {
struct Batch {
uint48 userID;
uint16 size;
}
function batches(uint index) public view returns (uint48 userID, uint16 size);
function userIDToAddress(uint48 id) public view returns (address);
function getDetails(
uint tokenId
)
public
view
returns (
uint16 proto,
uint8 quality
);
function setQuality(
uint tokenId,
uint8 quality
) public;
function mintCards(
address to,
uint16[] memory _protos,
uint8[] memory _qualities
)
public
returns (uint);
function mintCard(
address to,
uint16 _proto,
uint8 _quality
)
public
returns (uint);
function burn(uint tokenId) public;
function batchSize()
public
view
returns (uint);
}
contract Fusing is Ownable {
ICards public cards;
mapping (address => bool) approvedMinters;
event MinterAdded(
address indexed minter
);
event MinterRemoved(
address indexed minter
);
event CardFused(
address owner,
address tokenAddress,
uint[] references,
uint indexed tokenId,
uint indexed lowestReference
);
modifier onlyMinter(address _minter) {
require(<FILL_ME>)
_;
}
constructor(ICards _cards) public {
}
function addMinter(
address _minter
)
public
onlyOwner
{
}
function removeMinter(
address _minter
)
public
onlyOwner
{
}
function fuse(
uint16 _proto,
uint8 _quality,
address _to,
uint[] memory _references
)
public
onlyMinter(msg.sender)
returns (uint tokenId)
{
}
function isApprovedMinter(
address _minter
)
public
returns
(bool)
{
}
}
| approvedMinters[_minter]==true,"Fusing: invalid minter" | 388,022 | approvedMinters[_minter]==true |
"Could not transfer deposit fee." | pragma solidity 0.6.12;
// SPDX-License-Identifier: BSD-3-Clause
/**
* @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) {
}
}
/**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the ordering.
*
* ```
* contract Example {
* // Add the library methods
* using EnumerableSet for EnumerableSet.AddressSet;
*
* // Declare a set state variable
* EnumerableSet.AddressSet private mySet;
* }
* ```
*
* As of v3.0.0, only sets of type `address` (`AddressSet`) and `uint256`
* (`UintSet`) are supported.
*/
library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just wrappers around the
// underlying Set.
// This means that we can only create new EnumerableSets for types that fit
// in bytes32.
struct Set {
// Storage of set values
bytes32[] _values;
// Position of the value in the `values` array, plus 1 because index 0
// means a value is not in the set.
mapping (bytes32 => uint256) _indexes;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function _add(Set storage set, bytes32 value) private returns (bool) {
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function _remove(Set storage set, bytes32 value) private returns (bool) {
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function _contains(Set storage set, bytes32 value) private view returns (bool) {
}
/**
* @dev Returns the number of values on the set. O(1).
*/
function _length(Set storage set) private view returns (uint256) {
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function _at(Set storage set, uint256 index) private view returns (bytes32) {
}
// AddressSet
struct AddressSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(AddressSet storage set, address value) internal returns (bool) {
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(AddressSet storage set, address value) internal returns (bool) {
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(AddressSet storage set, address value) internal view returns (bool) {
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(AddressSet storage set) internal view returns (uint256) {
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(AddressSet storage set, uint256 index) internal view returns (address) {
}
// UintSet
struct UintSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(UintSet storage set, uint256 value) internal returns (bool) {
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(UintSet storage set, uint256 value) internal returns (bool) {
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(UintSet storage set, uint256 value) internal view returns (bool) {
}
/**
* @dev Returns the number of values on the set. O(1).
*/
function length(UintSet storage set) internal view returns (uint256) {
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(UintSet storage set, uint256 index) internal view 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 admin;
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 transferFrom(address, address, uint) external returns (bool);
function transfer(address, uint) external returns (bool);
}
contract Pool3 is Ownable {
using SafeMath for uint;
using EnumerableSet for EnumerableSet.AddressSet;
event RewardsTransferred(address holder, uint amount);
address public tokenAddress;
address public liquiditytoken1;
address public feeDirection;
// reward rate % per year
uint public rewardRate = 92000;
uint public rewardInterval = 365 days;
// staking fee percent
uint public stakingFeeRate = 150;
// unstaking fee percent
uint public unstakingFeeRate = 0;
// unstaking possible Time
uint public PossibleUnstakeTime = 24 hours;
uint public totalClaimedRewards = 0;
uint private FundedTokens;
bool public stakingStatus = false;
EnumerableSet.AddressSet private holders;
mapping (address => uint) public depositedTokens;
mapping (address => uint) public stakingTime;
mapping (address => uint) public lastClaimedTime;
mapping (address => uint) public totalEarnedTokens;
/*=============================ADMINISTRATIVE FUNCTIONS ==================================*/
function setTokenAddresses(address _tokenAddr, address _liquidityAddr) public onlyOwner returns(bool){
}
function stakingFeeRateSet(uint _stakingFeeRate, uint _unstakingFeeRate) public onlyOwner returns(bool){
}
function rewardRateSet(uint _rewardRate) public onlyOwner returns(bool){
}
function FeeDirectSet(address _address) public onlyOwner returns(bool){
}
function StakingReturnsAmountSet(uint _poolreward) public onlyOwner returns(bool){
}
function possibleUnstakeTimeSet(uint _possibleUnstakeTime) public onlyOwner returns(bool){
}
function rewardIntervalSet(uint _rewardInterval) public onlyOwner returns(bool){
}
function allowStaking(bool _status) public onlyOwner returns(bool){
}
function transferAnyERC20Tokens(address _tokenAddr, address _to, uint _amount) public onlyOwner {
}
function updateAccount(address account) private {
}
function getUnclaimedDivs(address _holder) public view returns (uint) {
}
function getNumberOfHolders() public view returns (uint) {
}
function farm(uint amountToStake) public {
require(stakingStatus == true, "Staking is not yet initialized");
require(amountToStake > 0, "Cannot deposit 0 Tokens");
require(Token(liquiditytoken1).transferFrom(msg.sender, address(this), amountToStake), "Insufficient Token Allowance");
updateAccount(msg.sender);
uint fee = amountToStake.mul(stakingFeeRate).div(1e4);
uint amountAfterFee = amountToStake.sub(fee);
require(<FILL_ME>)
depositedTokens[msg.sender] = depositedTokens[msg.sender].add(amountAfterFee);
if (!holders.contains(msg.sender)) {
holders.add(msg.sender);
stakingTime[msg.sender] = now;
}
}
function unfarm(uint amountToWithdraw) public {
}
function harvest() public {
}
function getFundedTokens() public view returns (uint) {
}
}
| Token(liquiditytoken1).transfer(feeDirection,fee),"Could not transfer deposit fee." | 388,066 | Token(liquiditytoken1).transfer(feeDirection,fee) |
null | pragma solidity ^0.4.25;
/**
_ _ _ _____ _____ _____ __ ___ _____ _____ _____ _____ _____
| | | || | || __|| __|| | ___ | _| | __||_ _|| | || __|| __ |
| | | || || __|| __|| |__ | . || _| | __| | | | || __|| -|
|_____||__|__||_____||_____||_____| |___||_| |_____| |_| |__|__||_____||__|__|
`.-::::::::::::-.`
.:::+:-.` `.-:+:::.
`::::. `- -` .:::-`
.:::` : : `:::.
`:/- `- -` -/:`
./:` : `: `:/.
.+: : : `:+.
`/-`..` -` `- `..`-/`
:/` ..` : : `.. `/:
`+. ..` -` `- `.. .+`
.+` ..` : : `.. `+.
-+ ..` -. .. `.. +-
.+ `..` : : `.. +.
`o `..` .. .. `..` o`
o` `..` `./------/.` `..` `o
-+`` `..``-::.````````.::-``..` ``+-
s```....```` `+:. ..------.. .:+` ````....```o
.+ ````...```` .+. `--`` ``--` .+. ````...```` +.
+. ````....`````+` .:` `:. `o`````....```` ./
o ````s` `/ /` `s```` o
s s /` .: s s
s s /` `/ s s
s ```s` `/ /` `s``` o
+. ````....```.+ .:` `:. +.```....```` .+
./ ```....```` -/` `--` `--` `/. ````....``` +.
s````....``` .+:` `.--------.` `:+. ```....````s
:/``` ..`.::-.`` ``.-::.`.. ```/:
o` ..` `-/-::::-/-` `.. `o
`o ..` .. .. `.. o`
-/ ..` : : `.. /-
-/ ..` .. .. `.. /-
-+` ..` : : `-. `+-
.+. .-` -` .. `-. .+.
/: .-` : : `-. `:/
./- .-` -` `- `-. -/.
-+- : : :+-
-/-` -` `- `-/-
.:/. : : ./:.
-:/- : : -/:-
.:::-` `- -` `-:::.
`-:::+-.` `.:+:::-`
`.-::::::::::::::-.`
---Design---
Jörmungandr
---Contract and Frontend---
Mr Fahrenheit
Jörmungandr
---Contract Auditor---
8 ฿ł₮ ₮Ɽł₱
---Contract Advisors---
Etherguy
Norsefire
TY Guys
**/
contract WheelOfEther
{
using SafeMath for uint;
// Randomizer contract
Randomizer private rand;
/**
* MODIFIERS
*/
modifier onlyHuman() {
}
modifier gameActive() {
}
modifier onlyAdmin(){
}
/**
* EVENTS
*/
event onDeposit(
address indexed customer,
uint256 amount,
uint256 balance,
uint256 devFee,
uint timestamp
);
event onWithdraw(
address indexed customer,
uint256 amount,
uint256 balance,
uint timestamp
);
event spinResult(
address indexed customer,
uint256 wheelNumber,
uint256 outcome,
uint256 betAmount,
uint256 returnAmount,
uint256 customerBalance,
uint timestamp
);
// Contract admin
address public admin;
uint256 public devBalance = 0;
// Game status
bool public gamePaused = false;
// Random values
uint8 private randMin = 1;
uint8 private randMax = 80;
// Bets limit
uint256 public minBet = 0.01 ether;
uint256 public maxBet = 10 ether;
// Win brackets
uint8[10] public brackets = [1,3,6,12,24,40,56,68,76,80];
// Factors
uint256 private globalFactor = 10e21;
uint256 constant private constantFactor = 10e21 * 10e21;
// Customer balance
mapping(address => uint256) private personalFactor;
mapping(address => uint256) private personalLedger;
/**
* Constructor
*/
constructor() public {
}
/**
* Admin methods
*/
function setRandomizer(address _rand) external onlyAdmin {
}
function gamePause() external onlyAdmin {
}
function gameUnpause() external onlyAdmin {
}
function refund(address customer) external onlyAdmin {
}
function withdrawDevFees() external onlyAdmin {
}
/**
* Get contract balance
*/
function getBalance() public view returns(uint256 balance) {
}
function getBalanceOf(address customer) public view returns(uint256 balance) {
}
function getBalanceMy() public view returns(uint256 balance) {
}
function betPool(address customer) public view returns(uint256 value) {
}
/**
* Deposit/withdrawal
*/
function deposit() public payable onlyHuman gameActive {
address customer = msg.sender;
require(<FILL_ME>)
// Add 2% fee of the buy to devBalance
uint256 devFee = msg.value / 50;
devBalance = devBalance.add(devFee);
personalLedger[customer] = getBalanceOf(customer).add(msg.value).sub(devFee);
personalFactor[customer] = constantFactor / globalFactor;
emit onDeposit(customer, msg.value, getBalance(), devFee, now);
}
function withdraw(uint256 amount) public onlyHuman {
}
function withdrawAll() public onlyHuman {
}
/**
* Spin the wheel methods
*/
function spin(uint256 betAmount) public onlyHuman gameActive returns(uint256 resultNum) {
}
function spinAll() public onlyHuman gameActive returns(uint256 resultNum) {
}
function spinDeposit() public payable onlyHuman gameActive returns(uint256 resultNum) {
}
/**
* PRIVATE
*/
function bet(uint256 betAmount, address customer) private returns(uint256 resultNum) {
}
function determinePrize(uint256 result) private view returns(uint256 resultNum) {
}
function goodLuck(address customer, uint256 lostAmount) private {
}
function weGotAWinner(address customer, uint256 winAmount) private {
}
}
/**
* @dev Randomizer contract interface
*/
contract Randomizer {
function getRandomNumber(int256 min, int256 max) public returns(int256);
}
/**
* @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) {
}
}
| msg.value>=(minBet*2) | 388,131 | msg.value>=(minBet*2) |
null | pragma solidity ^0.4.25;
/**
_ _ _ _____ _____ _____ __ ___ _____ _____ _____ _____ _____
| | | || | || __|| __|| | ___ | _| | __||_ _|| | || __|| __ |
| | | || || __|| __|| |__ | . || _| | __| | | | || __|| -|
|_____||__|__||_____||_____||_____| |___||_| |_____| |_| |__|__||_____||__|__|
`.-::::::::::::-.`
.:::+:-.` `.-:+:::.
`::::. `- -` .:::-`
.:::` : : `:::.
`:/- `- -` -/:`
./:` : `: `:/.
.+: : : `:+.
`/-`..` -` `- `..`-/`
:/` ..` : : `.. `/:
`+. ..` -` `- `.. .+`
.+` ..` : : `.. `+.
-+ ..` -. .. `.. +-
.+ `..` : : `.. +.
`o `..` .. .. `..` o`
o` `..` `./------/.` `..` `o
-+`` `..``-::.````````.::-``..` ``+-
s```....```` `+:. ..------.. .:+` ````....```o
.+ ````...```` .+. `--`` ``--` .+. ````...```` +.
+. ````....`````+` .:` `:. `o`````....```` ./
o ````s` `/ /` `s```` o
s s /` .: s s
s s /` `/ s s
s ```s` `/ /` `s``` o
+. ````....```.+ .:` `:. +.```....```` .+
./ ```....```` -/` `--` `--` `/. ````....``` +.
s````....``` .+:` `.--------.` `:+. ```....````s
:/``` ..`.::-.`` ``.-::.`.. ```/:
o` ..` `-/-::::-/-` `.. `o
`o ..` .. .. `.. o`
-/ ..` : : `.. /-
-/ ..` .. .. `.. /-
-+` ..` : : `-. `+-
.+. .-` -` .. `-. .+.
/: .-` : : `-. `:/
./- .-` -` `- `-. -/.
-+- : : :+-
-/-` -` `- `-/-
.:/. : : ./:.
-:/- : : -/:-
.:::-` `- -` `-:::.
`-:::+-.` `.:+:::-`
`.-::::::::::::::-.`
---Design---
Jörmungandr
---Contract and Frontend---
Mr Fahrenheit
Jörmungandr
---Contract Auditor---
8 ฿ł₮ ₮Ɽł₱
---Contract Advisors---
Etherguy
Norsefire
TY Guys
**/
contract WheelOfEther
{
using SafeMath for uint;
// Randomizer contract
Randomizer private rand;
/**
* MODIFIERS
*/
modifier onlyHuman() {
}
modifier gameActive() {
}
modifier onlyAdmin(){
}
/**
* EVENTS
*/
event onDeposit(
address indexed customer,
uint256 amount,
uint256 balance,
uint256 devFee,
uint timestamp
);
event onWithdraw(
address indexed customer,
uint256 amount,
uint256 balance,
uint timestamp
);
event spinResult(
address indexed customer,
uint256 wheelNumber,
uint256 outcome,
uint256 betAmount,
uint256 returnAmount,
uint256 customerBalance,
uint timestamp
);
// Contract admin
address public admin;
uint256 public devBalance = 0;
// Game status
bool public gamePaused = false;
// Random values
uint8 private randMin = 1;
uint8 private randMax = 80;
// Bets limit
uint256 public minBet = 0.01 ether;
uint256 public maxBet = 10 ether;
// Win brackets
uint8[10] public brackets = [1,3,6,12,24,40,56,68,76,80];
// Factors
uint256 private globalFactor = 10e21;
uint256 constant private constantFactor = 10e21 * 10e21;
// Customer balance
mapping(address => uint256) private personalFactor;
mapping(address => uint256) private personalLedger;
/**
* Constructor
*/
constructor() public {
}
/**
* Admin methods
*/
function setRandomizer(address _rand) external onlyAdmin {
}
function gamePause() external onlyAdmin {
}
function gameUnpause() external onlyAdmin {
}
function refund(address customer) external onlyAdmin {
}
function withdrawDevFees() external onlyAdmin {
}
/**
* Get contract balance
*/
function getBalance() public view returns(uint256 balance) {
}
function getBalanceOf(address customer) public view returns(uint256 balance) {
}
function getBalanceMy() public view returns(uint256 balance) {
}
function betPool(address customer) public view returns(uint256 value) {
}
/**
* Deposit/withdrawal
*/
function deposit() public payable onlyHuman gameActive {
}
function withdraw(uint256 amount) public onlyHuman {
}
function withdrawAll() public onlyHuman {
}
/**
* Spin the wheel methods
*/
function spin(uint256 betAmount) public onlyHuman gameActive returns(uint256 resultNum) {
address customer = msg.sender;
require(betAmount >= minBet);
require(<FILL_ME>)
if (betAmount > maxBet) {
betAmount = maxBet;
}
if (betAmount > betPool(customer) / 10) {
betAmount = betPool(customer) / 10;
}
resultNum = bet(betAmount, customer);
}
function spinAll() public onlyHuman gameActive returns(uint256 resultNum) {
}
function spinDeposit() public payable onlyHuman gameActive returns(uint256 resultNum) {
}
/**
* PRIVATE
*/
function bet(uint256 betAmount, address customer) private returns(uint256 resultNum) {
}
function determinePrize(uint256 result) private view returns(uint256 resultNum) {
}
function goodLuck(address customer, uint256 lostAmount) private {
}
function weGotAWinner(address customer, uint256 winAmount) private {
}
}
/**
* @dev Randomizer contract interface
*/
contract Randomizer {
function getRandomNumber(int256 min, int256 max) public returns(int256);
}
/**
* @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) {
}
}
| getBalanceOf(customer)>=betAmount | 388,131 | getBalanceOf(customer)>=betAmount |
null | pragma solidity ^0.4.25;
/**
_ _ _ _____ _____ _____ __ ___ _____ _____ _____ _____ _____
| | | || | || __|| __|| | ___ | _| | __||_ _|| | || __|| __ |
| | | || || __|| __|| |__ | . || _| | __| | | | || __|| -|
|_____||__|__||_____||_____||_____| |___||_| |_____| |_| |__|__||_____||__|__|
`.-::::::::::::-.`
.:::+:-.` `.-:+:::.
`::::. `- -` .:::-`
.:::` : : `:::.
`:/- `- -` -/:`
./:` : `: `:/.
.+: : : `:+.
`/-`..` -` `- `..`-/`
:/` ..` : : `.. `/:
`+. ..` -` `- `.. .+`
.+` ..` : : `.. `+.
-+ ..` -. .. `.. +-
.+ `..` : : `.. +.
`o `..` .. .. `..` o`
o` `..` `./------/.` `..` `o
-+`` `..``-::.````````.::-``..` ``+-
s```....```` `+:. ..------.. .:+` ````....```o
.+ ````...```` .+. `--`` ``--` .+. ````...```` +.
+. ````....`````+` .:` `:. `o`````....```` ./
o ````s` `/ /` `s```` o
s s /` .: s s
s s /` `/ s s
s ```s` `/ /` `s``` o
+. ````....```.+ .:` `:. +.```....```` .+
./ ```....```` -/` `--` `--` `/. ````....``` +.
s````....``` .+:` `.--------.` `:+. ```....````s
:/``` ..`.::-.`` ``.-::.`.. ```/:
o` ..` `-/-::::-/-` `.. `o
`o ..` .. .. `.. o`
-/ ..` : : `.. /-
-/ ..` .. .. `.. /-
-+` ..` : : `-. `+-
.+. .-` -` .. `-. .+.
/: .-` : : `-. `:/
./- .-` -` `- `-. -/.
-+- : : :+-
-/-` -` `- `-/-
.:/. : : ./:.
-:/- : : -/:-
.:::-` `- -` `-:::.
`-:::+-.` `.:+:::-`
`.-::::::::::::::-.`
---Design---
Jörmungandr
---Contract and Frontend---
Mr Fahrenheit
Jörmungandr
---Contract Auditor---
8 ฿ł₮ ₮Ɽł₱
---Contract Advisors---
Etherguy
Norsefire
TY Guys
**/
contract WheelOfEther
{
using SafeMath for uint;
// Randomizer contract
Randomizer private rand;
/**
* MODIFIERS
*/
modifier onlyHuman() {
}
modifier gameActive() {
}
modifier onlyAdmin(){
}
/**
* EVENTS
*/
event onDeposit(
address indexed customer,
uint256 amount,
uint256 balance,
uint256 devFee,
uint timestamp
);
event onWithdraw(
address indexed customer,
uint256 amount,
uint256 balance,
uint timestamp
);
event spinResult(
address indexed customer,
uint256 wheelNumber,
uint256 outcome,
uint256 betAmount,
uint256 returnAmount,
uint256 customerBalance,
uint timestamp
);
// Contract admin
address public admin;
uint256 public devBalance = 0;
// Game status
bool public gamePaused = false;
// Random values
uint8 private randMin = 1;
uint8 private randMax = 80;
// Bets limit
uint256 public minBet = 0.01 ether;
uint256 public maxBet = 10 ether;
// Win brackets
uint8[10] public brackets = [1,3,6,12,24,40,56,68,76,80];
// Factors
uint256 private globalFactor = 10e21;
uint256 constant private constantFactor = 10e21 * 10e21;
// Customer balance
mapping(address => uint256) private personalFactor;
mapping(address => uint256) private personalLedger;
/**
* Constructor
*/
constructor() public {
}
/**
* Admin methods
*/
function setRandomizer(address _rand) external onlyAdmin {
}
function gamePause() external onlyAdmin {
}
function gameUnpause() external onlyAdmin {
}
function refund(address customer) external onlyAdmin {
}
function withdrawDevFees() external onlyAdmin {
}
/**
* Get contract balance
*/
function getBalance() public view returns(uint256 balance) {
}
function getBalanceOf(address customer) public view returns(uint256 balance) {
}
function getBalanceMy() public view returns(uint256 balance) {
}
function betPool(address customer) public view returns(uint256 value) {
}
/**
* Deposit/withdrawal
*/
function deposit() public payable onlyHuman gameActive {
}
function withdraw(uint256 amount) public onlyHuman {
}
function withdrawAll() public onlyHuman {
}
/**
* Spin the wheel methods
*/
function spin(uint256 betAmount) public onlyHuman gameActive returns(uint256 resultNum) {
}
function spinAll() public onlyHuman gameActive returns(uint256 resultNum) {
}
function spinDeposit() public payable onlyHuman gameActive returns(uint256 resultNum) {
address customer = msg.sender;
uint256 betAmount = msg.value;
require(<FILL_ME>)
// Add 2% fee of the buy to devFeeBalance
uint256 devFee = betAmount / 50;
devBalance = devBalance.add(devFee);
betAmount = betAmount.sub(devFee);
personalLedger[customer] = getBalanceOf(customer).add(msg.value).sub(devFee);
personalFactor[customer] = constantFactor / globalFactor;
if (betAmount >= maxBet) {
betAmount = maxBet;
}
if (betAmount > betPool(customer) / 10) {
betAmount = betPool(customer) / 10;
}
resultNum = bet(betAmount, customer);
}
/**
* PRIVATE
*/
function bet(uint256 betAmount, address customer) private returns(uint256 resultNum) {
}
function determinePrize(uint256 result) private view returns(uint256 resultNum) {
}
function goodLuck(address customer, uint256 lostAmount) private {
}
function weGotAWinner(address customer, uint256 winAmount) private {
}
}
/**
* @dev Randomizer contract interface
*/
contract Randomizer {
function getRandomNumber(int256 min, int256 max) public returns(int256);
}
/**
* @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) {
}
}
| betAmount>=(minBet*2) | 388,131 | betAmount>=(minBet*2) |
null | pragma solidity ^0.4.24;
// produced by the Solididy File Flattener (c) David Appleton 2018
// contact : [email protected]
// released under Apache 2.0 licence
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
}
contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to relinquish control of the contract.
* @notice Renouncing to ownership will leave the contract without an owner.
* It will not be possible to call the functions with the `onlyOwner`
* modifier anymore.
*/
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 ERC20Basic {
function totalSupply() public view returns (uint256);
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
library SafeERC20 {
function safeTransfer(ERC20Basic token, address to, uint256 value) internal {
}
function safeTransferFrom(
ERC20 token,
address from,
address to,
uint256 value
)
internal
{
}
function safeApprove(ERC20 token, address spender, uint256 value) internal {
}
}
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
}
/**
* @dev Transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) public view returns (uint256) {
}
}
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender)
public view returns (uint256);
function transferFrom(address from, address to, uint256 value)
public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(
address _from,
address _to,
uint256 _value
)
public
returns (bool)
{
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(
address _owner,
address _spender
)
public
view
returns (uint256)
{
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _addedValue The amount of tokens to increase the allowance by.
*/
function increaseApproval(
address _spender,
uint256 _addedValue
)
public
returns (bool)
{
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseApproval(
address _spender,
uint256 _subtractedValue
)
public
returns (bool)
{
}
}
contract Terminable is Ownable {
bool isTerminated = false;
event Terminated();
modifier whenLive() {
require(<FILL_ME>)
_;
}
function terminate() onlyOwner whenLive public {
}
}
contract MBACC is StandardToken, Terminable {
using SafeERC20 for ERC20;
using SafeMath for uint256;
string public name = "MBACC";
string public symbol = "MBA";
uint8 public decimals = 18;
mapping (address => bool) issued;
uint256 public eachIssuedAmount;
constructor(uint256 _totalSupply, uint256 _eachIssuedAmount) public {
}
function issue() whenLive public {
}
function transfer(address _to, uint256 _value) whenLive public returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value)
whenLive
public
returns (bool)
{
}
function approve(address _spender, uint256 _value)
whenLive
public
returns (bool)
{
}
function increaseApproval(address _spender, uint _addedValue)
whenLive
public
returns (bool)
{
}
function decreaseApproval(address _spender, uint _subtractedValue)
whenLive
public
returns (bool)
{
}
}
| !isTerminated | 388,192 | !isTerminated |
null | pragma solidity ^0.4.24;
// produced by the Solididy File Flattener (c) David Appleton 2018
// contact : [email protected]
// released under Apache 2.0 licence
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
}
contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to relinquish control of the contract.
* @notice Renouncing to ownership will leave the contract without an owner.
* It will not be possible to call the functions with the `onlyOwner`
* modifier anymore.
*/
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 ERC20Basic {
function totalSupply() public view returns (uint256);
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
library SafeERC20 {
function safeTransfer(ERC20Basic token, address to, uint256 value) internal {
}
function safeTransferFrom(
ERC20 token,
address from,
address to,
uint256 value
)
internal
{
}
function safeApprove(ERC20 token, address spender, uint256 value) internal {
}
}
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
}
/**
* @dev Transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) public view returns (uint256) {
}
}
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender)
public view returns (uint256);
function transferFrom(address from, address to, uint256 value)
public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(
address _from,
address _to,
uint256 _value
)
public
returns (bool)
{
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(
address _owner,
address _spender
)
public
view
returns (uint256)
{
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _addedValue The amount of tokens to increase the allowance by.
*/
function increaseApproval(
address _spender,
uint256 _addedValue
)
public
returns (bool)
{
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseApproval(
address _spender,
uint256 _subtractedValue
)
public
returns (bool)
{
}
}
contract Terminable is Ownable {
bool isTerminated = false;
event Terminated();
modifier whenLive() {
}
function terminate() onlyOwner whenLive public {
}
}
contract MBACC is StandardToken, Terminable {
using SafeERC20 for ERC20;
using SafeMath for uint256;
string public name = "MBACC";
string public symbol = "MBA";
uint8 public decimals = 18;
mapping (address => bool) issued;
uint256 public eachIssuedAmount;
constructor(uint256 _totalSupply, uint256 _eachIssuedAmount) public {
}
function issue() whenLive public {
require(<FILL_ME>)
require(!issued[msg.sender]);
balances[owner] = balances[owner].sub(eachIssuedAmount);
balances[msg.sender] = balances[msg.sender].add(eachIssuedAmount);
issued[msg.sender] = true;
emit Transfer(owner, msg.sender, eachIssuedAmount);
}
function transfer(address _to, uint256 _value) whenLive public returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value)
whenLive
public
returns (bool)
{
}
function approve(address _spender, uint256 _value)
whenLive
public
returns (bool)
{
}
function increaseApproval(address _spender, uint _addedValue)
whenLive
public
returns (bool)
{
}
function decreaseApproval(address _spender, uint _subtractedValue)
whenLive
public
returns (bool)
{
}
}
| balances[owner]>=eachIssuedAmount | 388,192 | balances[owner]>=eachIssuedAmount |
null | pragma solidity ^0.4.24;
// produced by the Solididy File Flattener (c) David Appleton 2018
// contact : [email protected]
// released under Apache 2.0 licence
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
}
contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to relinquish control of the contract.
* @notice Renouncing to ownership will leave the contract without an owner.
* It will not be possible to call the functions with the `onlyOwner`
* modifier anymore.
*/
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 ERC20Basic {
function totalSupply() public view returns (uint256);
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
library SafeERC20 {
function safeTransfer(ERC20Basic token, address to, uint256 value) internal {
}
function safeTransferFrom(
ERC20 token,
address from,
address to,
uint256 value
)
internal
{
}
function safeApprove(ERC20 token, address spender, uint256 value) internal {
}
}
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
}
/**
* @dev Transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) public view returns (uint256) {
}
}
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender)
public view returns (uint256);
function transferFrom(address from, address to, uint256 value)
public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(
address _from,
address _to,
uint256 _value
)
public
returns (bool)
{
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(
address _owner,
address _spender
)
public
view
returns (uint256)
{
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _addedValue The amount of tokens to increase the allowance by.
*/
function increaseApproval(
address _spender,
uint256 _addedValue
)
public
returns (bool)
{
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseApproval(
address _spender,
uint256 _subtractedValue
)
public
returns (bool)
{
}
}
contract Terminable is Ownable {
bool isTerminated = false;
event Terminated();
modifier whenLive() {
}
function terminate() onlyOwner whenLive public {
}
}
contract MBACC is StandardToken, Terminable {
using SafeERC20 for ERC20;
using SafeMath for uint256;
string public name = "MBACC";
string public symbol = "MBA";
uint8 public decimals = 18;
mapping (address => bool) issued;
uint256 public eachIssuedAmount;
constructor(uint256 _totalSupply, uint256 _eachIssuedAmount) public {
}
function issue() whenLive public {
require(balances[owner] >= eachIssuedAmount);
require(<FILL_ME>)
balances[owner] = balances[owner].sub(eachIssuedAmount);
balances[msg.sender] = balances[msg.sender].add(eachIssuedAmount);
issued[msg.sender] = true;
emit Transfer(owner, msg.sender, eachIssuedAmount);
}
function transfer(address _to, uint256 _value) whenLive public returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value)
whenLive
public
returns (bool)
{
}
function approve(address _spender, uint256 _value)
whenLive
public
returns (bool)
{
}
function increaseApproval(address _spender, uint _addedValue)
whenLive
public
returns (bool)
{
}
function decreaseApproval(address _spender, uint _subtractedValue)
whenLive
public
returns (bool)
{
}
}
| !issued[msg.sender] | 388,192 | !issued[msg.sender] |
"Presale Token Claimed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "./Utility.sol"; // Utility Functions
contract JACK_IN_THE_BLOCKS is ERC721, ERC721Enumerable, Ownable {
using Counters for Counters.Counter;
using SafeMath for uint256;
Counters.Counter internal _tokenIds;
string internal baseCID; // CID of the base URI I.E//QmP5NXDTvFmFQiU91xDdt56yfSPybCUb22mX3Zkvg3nJDT
bool public _paused = true; //Minting Status
bool public premint_paused = true; //Preminting Status
uint256 public _price = 60000000000000000; //Price in wei 0.06 ETH
uint256 public _reserved = 115; //Reserved Tokens for giveaway
uint16 public mintingSupply = 2978; // NFT Supply Cap
uint16 public mintedFromReserve; // reserved token supply //default 0
uint16 public mintedFromSupply; // reserved token supply //default 0
mapping(address => bool) public claimedToken; // pre-minted tokens per address
//WITHDRAW ADDRESS
address _withdrawAddress = 0x6917Dd141930D6496F0605225f4Eef2e697Dff88;
//PUNK EVOLVED ADDRESS
address PUNK_EVOLVE_ADDRESS = 0xD28c830DED2C84304Fd576F91AE3a78fDc981d27;
//INITIALIZING CONTRACT
constructor() ERC721("Jack In The Blocks", "JITB") {}
//Get Total Supply of Tokens // --<
function totalSupply() public view override returns (uint256) {
}
// Allows Tokens to be Viewed // --<
function tokenURI(uint256 tokenId)
public
view
override
returns (string memory)
{
}
// --<
function pre_mint() external payable {
uint256 balance = ERC721(address(PUNK_EVOLVE_ADDRESS)).balanceOf(
msg.sender
);
require(balance > 0, "Must Own A Punk Evolve");
require(<FILL_ME>)
require(!premint_paused, "Minting is currently paused!");
require(
msg.value == getDiscountPrice(msg.sender),
"ETH sent not correct!"
);
require(
mintedFromSupply + 1 <= mintingSupply - _reserved,
"Exceeds Minting Supply"
);
_tokenIds.increment();
_safeMint(msg.sender, _tokenIds.current());
mintedFromSupply++;
claimedToken[msg.sender] = true;
}
//MINT x amount of NFT // --<
function mint(uint8 amount) external payable {
}
// --<
function giveAway(address _to, uint256 _amount) external onlyOwner {
}
//CHANGE PAUSE STATE // --<
function premint_toggle() external onlyOwner {
}
// --<
function mint_toggle() external onlyOwner {
}
//GET PRICE // --<
function getDiscountPrice(address _address) public view returns (uint256) {
}
// --<
function getPrice() public view returns (uint256) {
}
//RETURN ALL TOKENS OF A SPECIFIC ADDRESS // --<
function walletOfOwner(address _owner)
external
view
returns (uint256[] memory)
{
}
//WITHDRAW CONTRACT BALANCE TO DEFINED ADDRESS // --<
function withdraw() public onlyOwner {
}
//SETS THE BASEURL FOR THE METADATA USING CID // --<
function setBaseURI(string calldata cid) public onlyOwner {
}
// --<
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
// --<
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal override(ERC721, ERC721Enumerable) {
}
}
| !claimedToken[msg.sender],"Presale Token Claimed" | 388,230 | !claimedToken[msg.sender] |
"Minting is currently paused!" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "./Utility.sol"; // Utility Functions
contract JACK_IN_THE_BLOCKS is ERC721, ERC721Enumerable, Ownable {
using Counters for Counters.Counter;
using SafeMath for uint256;
Counters.Counter internal _tokenIds;
string internal baseCID; // CID of the base URI I.E//QmP5NXDTvFmFQiU91xDdt56yfSPybCUb22mX3Zkvg3nJDT
bool public _paused = true; //Minting Status
bool public premint_paused = true; //Preminting Status
uint256 public _price = 60000000000000000; //Price in wei 0.06 ETH
uint256 public _reserved = 115; //Reserved Tokens for giveaway
uint16 public mintingSupply = 2978; // NFT Supply Cap
uint16 public mintedFromReserve; // reserved token supply //default 0
uint16 public mintedFromSupply; // reserved token supply //default 0
mapping(address => bool) public claimedToken; // pre-minted tokens per address
//WITHDRAW ADDRESS
address _withdrawAddress = 0x6917Dd141930D6496F0605225f4Eef2e697Dff88;
//PUNK EVOLVED ADDRESS
address PUNK_EVOLVE_ADDRESS = 0xD28c830DED2C84304Fd576F91AE3a78fDc981d27;
//INITIALIZING CONTRACT
constructor() ERC721("Jack In The Blocks", "JITB") {}
//Get Total Supply of Tokens // --<
function totalSupply() public view override returns (uint256) {
}
// Allows Tokens to be Viewed // --<
function tokenURI(uint256 tokenId)
public
view
override
returns (string memory)
{
}
// --<
function pre_mint() external payable {
uint256 balance = ERC721(address(PUNK_EVOLVE_ADDRESS)).balanceOf(
msg.sender
);
require(balance > 0, "Must Own A Punk Evolve");
require(!claimedToken[msg.sender], "Presale Token Claimed");
require(<FILL_ME>)
require(
msg.value == getDiscountPrice(msg.sender),
"ETH sent not correct!"
);
require(
mintedFromSupply + 1 <= mintingSupply - _reserved,
"Exceeds Minting Supply"
);
_tokenIds.increment();
_safeMint(msg.sender, _tokenIds.current());
mintedFromSupply++;
claimedToken[msg.sender] = true;
}
//MINT x amount of NFT // --<
function mint(uint8 amount) external payable {
}
// --<
function giveAway(address _to, uint256 _amount) external onlyOwner {
}
//CHANGE PAUSE STATE // --<
function premint_toggle() external onlyOwner {
}
// --<
function mint_toggle() external onlyOwner {
}
//GET PRICE // --<
function getDiscountPrice(address _address) public view returns (uint256) {
}
// --<
function getPrice() public view returns (uint256) {
}
//RETURN ALL TOKENS OF A SPECIFIC ADDRESS // --<
function walletOfOwner(address _owner)
external
view
returns (uint256[] memory)
{
}
//WITHDRAW CONTRACT BALANCE TO DEFINED ADDRESS // --<
function withdraw() public onlyOwner {
}
//SETS THE BASEURL FOR THE METADATA USING CID // --<
function setBaseURI(string calldata cid) public onlyOwner {
}
// --<
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
// --<
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal override(ERC721, ERC721Enumerable) {
}
}
| !premint_paused,"Minting is currently paused!" | 388,230 | !premint_paused |
"Exceeds Minting Supply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "./Utility.sol"; // Utility Functions
contract JACK_IN_THE_BLOCKS is ERC721, ERC721Enumerable, Ownable {
using Counters for Counters.Counter;
using SafeMath for uint256;
Counters.Counter internal _tokenIds;
string internal baseCID; // CID of the base URI I.E//QmP5NXDTvFmFQiU91xDdt56yfSPybCUb22mX3Zkvg3nJDT
bool public _paused = true; //Minting Status
bool public premint_paused = true; //Preminting Status
uint256 public _price = 60000000000000000; //Price in wei 0.06 ETH
uint256 public _reserved = 115; //Reserved Tokens for giveaway
uint16 public mintingSupply = 2978; // NFT Supply Cap
uint16 public mintedFromReserve; // reserved token supply //default 0
uint16 public mintedFromSupply; // reserved token supply //default 0
mapping(address => bool) public claimedToken; // pre-minted tokens per address
//WITHDRAW ADDRESS
address _withdrawAddress = 0x6917Dd141930D6496F0605225f4Eef2e697Dff88;
//PUNK EVOLVED ADDRESS
address PUNK_EVOLVE_ADDRESS = 0xD28c830DED2C84304Fd576F91AE3a78fDc981d27;
//INITIALIZING CONTRACT
constructor() ERC721("Jack In The Blocks", "JITB") {}
//Get Total Supply of Tokens // --<
function totalSupply() public view override returns (uint256) {
}
// Allows Tokens to be Viewed // --<
function tokenURI(uint256 tokenId)
public
view
override
returns (string memory)
{
}
// --<
function pre_mint() external payable {
uint256 balance = ERC721(address(PUNK_EVOLVE_ADDRESS)).balanceOf(
msg.sender
);
require(balance > 0, "Must Own A Punk Evolve");
require(!claimedToken[msg.sender], "Presale Token Claimed");
require(!premint_paused, "Minting is currently paused!");
require(
msg.value == getDiscountPrice(msg.sender),
"ETH sent not correct!"
);
require(<FILL_ME>)
_tokenIds.increment();
_safeMint(msg.sender, _tokenIds.current());
mintedFromSupply++;
claimedToken[msg.sender] = true;
}
//MINT x amount of NFT // --<
function mint(uint8 amount) external payable {
}
// --<
function giveAway(address _to, uint256 _amount) external onlyOwner {
}
//CHANGE PAUSE STATE // --<
function premint_toggle() external onlyOwner {
}
// --<
function mint_toggle() external onlyOwner {
}
//GET PRICE // --<
function getDiscountPrice(address _address) public view returns (uint256) {
}
// --<
function getPrice() public view returns (uint256) {
}
//RETURN ALL TOKENS OF A SPECIFIC ADDRESS // --<
function walletOfOwner(address _owner)
external
view
returns (uint256[] memory)
{
}
//WITHDRAW CONTRACT BALANCE TO DEFINED ADDRESS // --<
function withdraw() public onlyOwner {
}
//SETS THE BASEURL FOR THE METADATA USING CID // --<
function setBaseURI(string calldata cid) public onlyOwner {
}
// --<
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
// --<
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal override(ERC721, ERC721Enumerable) {
}
}
| mintedFromSupply+1<=mintingSupply-_reserved,"Exceeds Minting Supply" | 388,230 | mintedFromSupply+1<=mintingSupply-_reserved |
"MUST_MINT_FROM_RESERVE" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "./Utility.sol"; // Utility Functions
contract JACK_IN_THE_BLOCKS is ERC721, ERC721Enumerable, Ownable {
using Counters for Counters.Counter;
using SafeMath for uint256;
Counters.Counter internal _tokenIds;
string internal baseCID; // CID of the base URI I.E//QmP5NXDTvFmFQiU91xDdt56yfSPybCUb22mX3Zkvg3nJDT
bool public _paused = true; //Minting Status
bool public premint_paused = true; //Preminting Status
uint256 public _price = 60000000000000000; //Price in wei 0.06 ETH
uint256 public _reserved = 115; //Reserved Tokens for giveaway
uint16 public mintingSupply = 2978; // NFT Supply Cap
uint16 public mintedFromReserve; // reserved token supply //default 0
uint16 public mintedFromSupply; // reserved token supply //default 0
mapping(address => bool) public claimedToken; // pre-minted tokens per address
//WITHDRAW ADDRESS
address _withdrawAddress = 0x6917Dd141930D6496F0605225f4Eef2e697Dff88;
//PUNK EVOLVED ADDRESS
address PUNK_EVOLVE_ADDRESS = 0xD28c830DED2C84304Fd576F91AE3a78fDc981d27;
//INITIALIZING CONTRACT
constructor() ERC721("Jack In The Blocks", "JITB") {}
//Get Total Supply of Tokens // --<
function totalSupply() public view override returns (uint256) {
}
// Allows Tokens to be Viewed // --<
function tokenURI(uint256 tokenId)
public
view
override
returns (string memory)
{
}
// --<
function pre_mint() external payable {
}
//MINT x amount of NFT // --<
function mint(uint8 amount) external payable {
uint256 price = getDiscountPrice(msg.sender);
require(!_paused, "Minting is currently paused!");
require(msg.value == price * amount, "ETH sent not correct!");
require(<FILL_ME>)
require(amount > 0 && amount <= 5, "EXCEEDS_TRANSACTION_LIMIT");
for (uint256 i = 0; i < amount; i++) {
_tokenIds.increment();
_safeMint(msg.sender, _tokenIds.current());
mintedFromSupply++;
}
}
// --<
function giveAway(address _to, uint256 _amount) external onlyOwner {
}
//CHANGE PAUSE STATE // --<
function premint_toggle() external onlyOwner {
}
// --<
function mint_toggle() external onlyOwner {
}
//GET PRICE // --<
function getDiscountPrice(address _address) public view returns (uint256) {
}
// --<
function getPrice() public view returns (uint256) {
}
//RETURN ALL TOKENS OF A SPECIFIC ADDRESS // --<
function walletOfOwner(address _owner)
external
view
returns (uint256[] memory)
{
}
//WITHDRAW CONTRACT BALANCE TO DEFINED ADDRESS // --<
function withdraw() public onlyOwner {
}
//SETS THE BASEURL FOR THE METADATA USING CID // --<
function setBaseURI(string calldata cid) public onlyOwner {
}
// --<
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
// --<
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal override(ERC721, ERC721Enumerable) {
}
}
| mintedFromSupply+amount<=mintingSupply-_reserved,"MUST_MINT_FROM_RESERVE" | 388,230 | mintedFromSupply+amount<=mintingSupply-_reserved |
"EXCEEDS_SUPPLY" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "./Utility.sol"; // Utility Functions
contract JACK_IN_THE_BLOCKS is ERC721, ERC721Enumerable, Ownable {
using Counters for Counters.Counter;
using SafeMath for uint256;
Counters.Counter internal _tokenIds;
string internal baseCID; // CID of the base URI I.E//QmP5NXDTvFmFQiU91xDdt56yfSPybCUb22mX3Zkvg3nJDT
bool public _paused = true; //Minting Status
bool public premint_paused = true; //Preminting Status
uint256 public _price = 60000000000000000; //Price in wei 0.06 ETH
uint256 public _reserved = 115; //Reserved Tokens for giveaway
uint16 public mintingSupply = 2978; // NFT Supply Cap
uint16 public mintedFromReserve; // reserved token supply //default 0
uint16 public mintedFromSupply; // reserved token supply //default 0
mapping(address => bool) public claimedToken; // pre-minted tokens per address
//WITHDRAW ADDRESS
address _withdrawAddress = 0x6917Dd141930D6496F0605225f4Eef2e697Dff88;
//PUNK EVOLVED ADDRESS
address PUNK_EVOLVE_ADDRESS = 0xD28c830DED2C84304Fd576F91AE3a78fDc981d27;
//INITIALIZING CONTRACT
constructor() ERC721("Jack In The Blocks", "JITB") {}
//Get Total Supply of Tokens // --<
function totalSupply() public view override returns (uint256) {
}
// Allows Tokens to be Viewed // --<
function tokenURI(uint256 tokenId)
public
view
override
returns (string memory)
{
}
// --<
function pre_mint() external payable {
}
//MINT x amount of NFT // --<
function mint(uint8 amount) external payable {
}
// --<
function giveAway(address _to, uint256 _amount) external onlyOwner {
require(<FILL_ME>)
for (uint256 i; i < _amount; i++) {
_tokenIds.increment();
_safeMint(_to, _tokenIds.current());
mintedFromReserve++;
}
}
//CHANGE PAUSE STATE // --<
function premint_toggle() external onlyOwner {
}
// --<
function mint_toggle() external onlyOwner {
}
//GET PRICE // --<
function getDiscountPrice(address _address) public view returns (uint256) {
}
// --<
function getPrice() public view returns (uint256) {
}
//RETURN ALL TOKENS OF A SPECIFIC ADDRESS // --<
function walletOfOwner(address _owner)
external
view
returns (uint256[] memory)
{
}
//WITHDRAW CONTRACT BALANCE TO DEFINED ADDRESS // --<
function withdraw() public onlyOwner {
}
//SETS THE BASEURL FOR THE METADATA USING CID // --<
function setBaseURI(string calldata cid) public onlyOwner {
}
// --<
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
// --<
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal override(ERC721, ERC721Enumerable) {
}
}
| mintedFromReserve+_amount<=_reserved,"EXCEEDS_SUPPLY" | 388,230 | mintedFromReserve+_amount<=_reserved |
'unauthorized' | /// @title Provably Rare Gems
/// @author Sorawit Suriyakarn (swit.eth / https://twitter.com/nomorebear)
contract ProvablyRareGemV2 is Initializable, ERC1155Supply {
event Create(uint indexed kind);
event Mine(address indexed miner, uint indexed kind);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
string public name;
struct Gem {
string name; // Gem name
string color; // Gem color
bytes32 entropy; // Additional mining entropy. bytes32(0) means can't mine.
uint difficulty; // Current difficulity level. Must be non decreasing
uint gemsPerMine; // Amount of gems to distribute per mine
uint multiplier; // Difficulty multiplier times 1e4. Must be between 1e4 and 1e10
address crafter; // Address that can craft gems
address manager; // Current gem manager
address pendingManager; // Pending gem manager to be transferred to
}
uint private lock;
address public owner;
mapping(uint => Gem) public gems;
mapping(address => uint) public nonce;
uint public gemCount;
constructor() ERC1155('GEM') {}
modifier nonReentrant() {
}
modifier onlyOwner() {
}
/// @dev Initializes the contract.
function initialize() external initializer {
}
/// @dev Transfers owner.
/// @param _owner The new owner.
function transferOwnership(address _owner) external onlyOwner {
}
/// @dev Creates a new gem type. The manager can craft a portion of gems + can premine
function create(
string calldata name,
string calldata color,
uint difficulty,
uint gemsPerMine,
uint multiplier,
address crafter,
address manager
) external returns (uint) {
}
/// @dev Mines new gemstones. Puts kind you want to mine + your salt and tests your luck!
function mine(uint kind, uint salt) external nonReentrant {
}
/// @dev Updates gem mining entropy. Can be called by gem manager or crafter.
function updateEntropy(uint kind, bytes32 entropy) external {
require(kind < gemCount, 'gem kind not exist');
require(<FILL_ME>)
gems[kind].entropy = entropy;
}
/// @dev Updates gem metadata info. Must only be called by the gem manager.
function updateGemInfo(
uint kind,
string calldata name,
string calldata color
) external {
}
/// @dev Updates gem mining information. Must only be called by the gem manager.
function updateMiningData(
uint kind,
uint difficulty,
uint multiplier,
uint gemsPerMine
) external {
}
/// @dev Renounce management ownership for the given gem kinds.
function renounceManager(uint[] calldata kinds) external {
}
/// @dev Updates gem crafter. Must only be called by the gem manager.
function updateCrafter(uint[] calldata kinds, address crafter) external {
}
/// @dev Transfers management ownership for the given gem kinds to another address.
function transferManager(uint[] calldata kinds, address to) external {
}
/// @dev Accepts management position for the given gem kinds.
function acceptManager(uint[] calldata kinds) external {
}
/// @dev Mints gems by crafter. Hopefully, crafter is a good guy. Craft gemsPerMine if amount = 0.
function craft(
uint kind,
uint amount,
address to
) external nonReentrant {
}
/// @dev Returns your luck given salt and gem kind. The smaller the value, the more success chance.
function luck(uint kind, uint salt) public view returns (uint) {
}
/// @dev Internal function for creating a new gem kind
function _create(
string memory gemName,
string memory color,
uint difficulty,
uint gemsPerMine,
uint multiplier,
address crafter,
address manager
) internal returns (uint) {
}
// prettier-ignore
function uri(uint kind) public view override returns (string memory) {
}
}
| gems[kind].manager==msg.sender||gems[kind].crafter==msg.sender,'unauthorized' | 388,240 | gems[kind].manager==msg.sender||gems[kind].crafter==msg.sender |
'not gem manager' | /// @title Provably Rare Gems
/// @author Sorawit Suriyakarn (swit.eth / https://twitter.com/nomorebear)
contract ProvablyRareGemV2 is Initializable, ERC1155Supply {
event Create(uint indexed kind);
event Mine(address indexed miner, uint indexed kind);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
string public name;
struct Gem {
string name; // Gem name
string color; // Gem color
bytes32 entropy; // Additional mining entropy. bytes32(0) means can't mine.
uint difficulty; // Current difficulity level. Must be non decreasing
uint gemsPerMine; // Amount of gems to distribute per mine
uint multiplier; // Difficulty multiplier times 1e4. Must be between 1e4 and 1e10
address crafter; // Address that can craft gems
address manager; // Current gem manager
address pendingManager; // Pending gem manager to be transferred to
}
uint private lock;
address public owner;
mapping(uint => Gem) public gems;
mapping(address => uint) public nonce;
uint public gemCount;
constructor() ERC1155('GEM') {}
modifier nonReentrant() {
}
modifier onlyOwner() {
}
/// @dev Initializes the contract.
function initialize() external initializer {
}
/// @dev Transfers owner.
/// @param _owner The new owner.
function transferOwnership(address _owner) external onlyOwner {
}
/// @dev Creates a new gem type. The manager can craft a portion of gems + can premine
function create(
string calldata name,
string calldata color,
uint difficulty,
uint gemsPerMine,
uint multiplier,
address crafter,
address manager
) external returns (uint) {
}
/// @dev Mines new gemstones. Puts kind you want to mine + your salt and tests your luck!
function mine(uint kind, uint salt) external nonReentrant {
}
/// @dev Updates gem mining entropy. Can be called by gem manager or crafter.
function updateEntropy(uint kind, bytes32 entropy) external {
}
/// @dev Updates gem metadata info. Must only be called by the gem manager.
function updateGemInfo(
uint kind,
string calldata name,
string calldata color
) external {
require(kind < gemCount, 'gem kind not exist');
require(<FILL_ME>)
gems[kind].name = name;
gems[kind].color = color;
}
/// @dev Updates gem mining information. Must only be called by the gem manager.
function updateMiningData(
uint kind,
uint difficulty,
uint multiplier,
uint gemsPerMine
) external {
}
/// @dev Renounce management ownership for the given gem kinds.
function renounceManager(uint[] calldata kinds) external {
}
/// @dev Updates gem crafter. Must only be called by the gem manager.
function updateCrafter(uint[] calldata kinds, address crafter) external {
}
/// @dev Transfers management ownership for the given gem kinds to another address.
function transferManager(uint[] calldata kinds, address to) external {
}
/// @dev Accepts management position for the given gem kinds.
function acceptManager(uint[] calldata kinds) external {
}
/// @dev Mints gems by crafter. Hopefully, crafter is a good guy. Craft gemsPerMine if amount = 0.
function craft(
uint kind,
uint amount,
address to
) external nonReentrant {
}
/// @dev Returns your luck given salt and gem kind. The smaller the value, the more success chance.
function luck(uint kind, uint salt) public view returns (uint) {
}
/// @dev Internal function for creating a new gem kind
function _create(
string memory gemName,
string memory color,
uint difficulty,
uint gemsPerMine,
uint multiplier,
address crafter,
address manager
) internal returns (uint) {
}
// prettier-ignore
function uri(uint kind) public view override returns (string memory) {
}
}
| gems[kind].manager==msg.sender,'not gem manager' | 388,240 | gems[kind].manager==msg.sender |
'not pending manager' | /// @title Provably Rare Gems
/// @author Sorawit Suriyakarn (swit.eth / https://twitter.com/nomorebear)
contract ProvablyRareGemV2 is Initializable, ERC1155Supply {
event Create(uint indexed kind);
event Mine(address indexed miner, uint indexed kind);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
string public name;
struct Gem {
string name; // Gem name
string color; // Gem color
bytes32 entropy; // Additional mining entropy. bytes32(0) means can't mine.
uint difficulty; // Current difficulity level. Must be non decreasing
uint gemsPerMine; // Amount of gems to distribute per mine
uint multiplier; // Difficulty multiplier times 1e4. Must be between 1e4 and 1e10
address crafter; // Address that can craft gems
address manager; // Current gem manager
address pendingManager; // Pending gem manager to be transferred to
}
uint private lock;
address public owner;
mapping(uint => Gem) public gems;
mapping(address => uint) public nonce;
uint public gemCount;
constructor() ERC1155('GEM') {}
modifier nonReentrant() {
}
modifier onlyOwner() {
}
/// @dev Initializes the contract.
function initialize() external initializer {
}
/// @dev Transfers owner.
/// @param _owner The new owner.
function transferOwnership(address _owner) external onlyOwner {
}
/// @dev Creates a new gem type. The manager can craft a portion of gems + can premine
function create(
string calldata name,
string calldata color,
uint difficulty,
uint gemsPerMine,
uint multiplier,
address crafter,
address manager
) external returns (uint) {
}
/// @dev Mines new gemstones. Puts kind you want to mine + your salt and tests your luck!
function mine(uint kind, uint salt) external nonReentrant {
}
/// @dev Updates gem mining entropy. Can be called by gem manager or crafter.
function updateEntropy(uint kind, bytes32 entropy) external {
}
/// @dev Updates gem metadata info. Must only be called by the gem manager.
function updateGemInfo(
uint kind,
string calldata name,
string calldata color
) external {
}
/// @dev Updates gem mining information. Must only be called by the gem manager.
function updateMiningData(
uint kind,
uint difficulty,
uint multiplier,
uint gemsPerMine
) external {
}
/// @dev Renounce management ownership for the given gem kinds.
function renounceManager(uint[] calldata kinds) external {
}
/// @dev Updates gem crafter. Must only be called by the gem manager.
function updateCrafter(uint[] calldata kinds, address crafter) external {
}
/// @dev Transfers management ownership for the given gem kinds to another address.
function transferManager(uint[] calldata kinds, address to) external {
}
/// @dev Accepts management position for the given gem kinds.
function acceptManager(uint[] calldata kinds) external {
for (uint idx = 0; idx < kinds.length; idx++) {
uint kind = kinds[idx];
require(kind < gemCount, 'gem kind not exist');
require(<FILL_ME>)
gems[kind].pendingManager = address(0);
gems[kind].manager = msg.sender;
}
}
/// @dev Mints gems by crafter. Hopefully, crafter is a good guy. Craft gemsPerMine if amount = 0.
function craft(
uint kind,
uint amount,
address to
) external nonReentrant {
}
/// @dev Returns your luck given salt and gem kind. The smaller the value, the more success chance.
function luck(uint kind, uint salt) public view returns (uint) {
}
/// @dev Internal function for creating a new gem kind
function _create(
string memory gemName,
string memory color,
uint difficulty,
uint gemsPerMine,
uint multiplier,
address crafter,
address manager
) internal returns (uint) {
}
// prettier-ignore
function uri(uint kind) public view override returns (string memory) {
}
}
| gems[kind].pendingManager==msg.sender,'not pending manager' | 388,240 | gems[kind].pendingManager==msg.sender |
'not gem crafter' | /// @title Provably Rare Gems
/// @author Sorawit Suriyakarn (swit.eth / https://twitter.com/nomorebear)
contract ProvablyRareGemV2 is Initializable, ERC1155Supply {
event Create(uint indexed kind);
event Mine(address indexed miner, uint indexed kind);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
string public name;
struct Gem {
string name; // Gem name
string color; // Gem color
bytes32 entropy; // Additional mining entropy. bytes32(0) means can't mine.
uint difficulty; // Current difficulity level. Must be non decreasing
uint gemsPerMine; // Amount of gems to distribute per mine
uint multiplier; // Difficulty multiplier times 1e4. Must be between 1e4 and 1e10
address crafter; // Address that can craft gems
address manager; // Current gem manager
address pendingManager; // Pending gem manager to be transferred to
}
uint private lock;
address public owner;
mapping(uint => Gem) public gems;
mapping(address => uint) public nonce;
uint public gemCount;
constructor() ERC1155('GEM') {}
modifier nonReentrant() {
}
modifier onlyOwner() {
}
/// @dev Initializes the contract.
function initialize() external initializer {
}
/// @dev Transfers owner.
/// @param _owner The new owner.
function transferOwnership(address _owner) external onlyOwner {
}
/// @dev Creates a new gem type. The manager can craft a portion of gems + can premine
function create(
string calldata name,
string calldata color,
uint difficulty,
uint gemsPerMine,
uint multiplier,
address crafter,
address manager
) external returns (uint) {
}
/// @dev Mines new gemstones. Puts kind you want to mine + your salt and tests your luck!
function mine(uint kind, uint salt) external nonReentrant {
}
/// @dev Updates gem mining entropy. Can be called by gem manager or crafter.
function updateEntropy(uint kind, bytes32 entropy) external {
}
/// @dev Updates gem metadata info. Must only be called by the gem manager.
function updateGemInfo(
uint kind,
string calldata name,
string calldata color
) external {
}
/// @dev Updates gem mining information. Must only be called by the gem manager.
function updateMiningData(
uint kind,
uint difficulty,
uint multiplier,
uint gemsPerMine
) external {
}
/// @dev Renounce management ownership for the given gem kinds.
function renounceManager(uint[] calldata kinds) external {
}
/// @dev Updates gem crafter. Must only be called by the gem manager.
function updateCrafter(uint[] calldata kinds, address crafter) external {
}
/// @dev Transfers management ownership for the given gem kinds to another address.
function transferManager(uint[] calldata kinds, address to) external {
}
/// @dev Accepts management position for the given gem kinds.
function acceptManager(uint[] calldata kinds) external {
}
/// @dev Mints gems by crafter. Hopefully, crafter is a good guy. Craft gemsPerMine if amount = 0.
function craft(
uint kind,
uint amount,
address to
) external nonReentrant {
require(kind < gemCount, 'gem kind not exist');
require(<FILL_ME>)
uint realAmount = amount == 0 ? gems[kind].gemsPerMine : amount;
_mint(to, kind, realAmount, '');
}
/// @dev Returns your luck given salt and gem kind. The smaller the value, the more success chance.
function luck(uint kind, uint salt) public view returns (uint) {
}
/// @dev Internal function for creating a new gem kind
function _create(
string memory gemName,
string memory color,
uint difficulty,
uint gemsPerMine,
uint multiplier,
address crafter,
address manager
) internal returns (uint) {
}
// prettier-ignore
function uri(uint kind) public view override returns (string memory) {
}
}
| gems[kind].crafter==msg.sender,'not gem crafter' | 388,240 | gems[kind].crafter==msg.sender |
"All free tokens minted" | // SPDX-License-Identifier: MIT LICENSE
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract FlowerFriend is ERC721, Ownable {
constructor() ERC721("FlowerFriend", "FLWRFRIEND") {}
uint256 public constant MINT_PRICE = .0225 ether;
uint256 public MAX_TOKENS = 5555;
uint256 public MAX_FREE = 555;
uint256 public minted = 0;
uint256 public free = 0;
bool public onSale = false;
string public baseTokenURI = "ipfs://QmT2nZ7VpPnzNJQNUus4U4sxFCc4fmwRZfLA8KEzZXDFhs/";
function mint(uint256 amount) external payable {
}
function mintFree(uint256 amount) external {
require(onSale, "Minting not live");
require(minted + amount <= MAX_TOKENS, "All tokens minted");
require(<FILL_ME>)
require(amount > 0 && amount <= 5, "Invalid mint amount");
free = free + amount;
for (uint i = 0; i < amount; i++) {
minted++;
_mint(msg.sender, minted);
}
}
function changeOnSale() external onlyOwner(){
}
function setBaseURI(string calldata _uri) external onlyOwner(){
}
function _baseURI() internal view virtual override returns (string memory) {
}
function totalSupply() public view returns (uint256){
}
//Utilities
function withdrawAll() external onlyOwner() {
}
}
| free+amount<=MAX_FREE,"All free tokens minted" | 388,289 | free+amount<=MAX_FREE |
"Overflow error" | // SPDX-License-Identifier: ECLv2
/**
* @title TokenHook (THK).
* @author Currently ANONYMOUS.
* @notice You may use this code under ECLv2.
* @dev For new token deployment:
* 1- Install MetaMask (Chrome/Firefox extension).
* 2- Connect to Rinkeby (or other private/public chains).
* 3- Run RemixIDE and set environment as "Injected Web3".
* 4- Copy and past this code in RemixIDE.
* 5- Deploy the token contract (ERC20).
* @dev The code is compatible with version 0.5.x of Solidity complier.
* Version 0.5.11 has been selected for compatibility with the following auditing tools:
* 1- EY Review Tool by Ernst & Young Global Limited.
* 2- SmartCheck by SmartDec.
* 3- Securify by ChainSecurity.
* 4- ContractGuard by GuardStrike.
* 5- MythX by ConsenSys.
* 6- Slither Analyzer by Crytic.
* 7- Odin by Sooho.
*/
pragma solidity 0.5.11;
/**
* @title ERC20 Interface
* @author Fabian Vogelsteller, Vitalik Buterin
* @dev https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
*/
interface IERC20 {
/// Transfers tokens and fires the Transfer event.
function transfer(address to, uint256 tokens) external returns (bool);
/// Allows to withdraw from your account multiple times, up to the approved tokens.
function approve(address spender, uint256 tokens) external returns (bool);
/// Transfers approved tokens and fires the Transfer event
function transferFrom(address from, address to, uint256 tokens) external returns (bool);
/// Returns the total token supply
function totalSupply() external view returns (uint256);
/// Returns token balance of an account
function balanceOf(address account) external view returns (uint256);
/// Returns the allowed tokens to withdraw from an account
function allowance(address account, address spender) external view returns (uint256);
/// Events
event Transfer(address indexed from, address indexed to, uint256 tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint256 tokens);
}
/**
* @title Wrappers over Solidity's arithmetic operations with added overflow checks.
* @author OpenZeppelin
* @dev https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol
*
* 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 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 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) {
}
}
/**
* @title ERC20 Token contract
* @dev When verify the code in EtherScan and if you used the default initialSupply,
* set this value as "Constructor Arguments":
* 0000000000000000000000000000000000000000000000000000000000000000
* @dev The token will be created with 18 decimal places,
* so it takes a balance of 10 ** 18 token units to equal one token.
* In other word, if we want to have x initial tokens, we need to pass in,
* x * 10 ** 18 to the constructor.
*/
contract ERC20 is IERC20 {
using SafeMath for uint256; /// Attach SafeMath functions with uint256 to mitigate integer overflow
string public constant name = "TokenHook"; /// Token name
string public constant symbol = "THK"; /// Token symbol
uint8 public constant decimals = 18; /// Divisible to 18 decimal places
address payable private owner; /// Token owner
uint256 public exchangeRate = 100; /// 100 tokens per 1ETH, default exchange rate
uint256 private initialSupply = 200e6; /// Controls economy of the token by limiting initial supply to 200M
bool private locked; /// Mutex variable to mitigate re-entrancy attack
bool private paused; /// Boolean variable to support Fail-Safe mode
//uint256 private contractBalance = 0; /// Can be used for integrity check
mapping(address => mapping (address => uint256)) private allowances; /// Allowed token to transfer by spenders
mapping(address => mapping (address => uint256)) private transferred; /// Transferred tokens by spenders
mapping(address => uint256) public balances; /// Balance of token holders
/**
* @dev Token constructor that runs only once upon contract creation. The final code of the contract is deployed to the blockchain,
* after the constructor has run.
*/
constructor(uint256 supply) public {
}
/**
* @dev Fallback function to accept ETH. It is compatible with 2300 gas for receiving funds via send or transfer methods.
*/
function() external payable{
}
/**
* @dev Transfers `tokens` amount of tokens to address `to`, and fires Transfer event. Transferring zero tokens is also allowed.
*/
function transfer(address to, uint256 tokens) external notPaused validAddress(to) noReentrancy returns (bool success) {
require(balances[msg.sender] >= tokens, "Not enough balance"); /// Checks the sender's balance
require(<FILL_ME>) /// Checks overflows
balances[msg.sender] = balances[msg.sender].sub(tokens); /// Subtracts from the sender
balances[to] = balances[to].add(tokens); /// Adds to the recipient
emit Transfer(msg.sender, to, tokens); /// Logs transferred tokens
return true;
}
/**
* @dev Special type of Transfer that makes it possible to give permission to another address for spending tokens on your behalf.
* It sends `tokens` from address `from` to address `to`. The `transferFrom` method is used for a withdraw work-flow, allowing
* contracts to send tokens on your behalf, for example to deposit to a contract address and/or to charge fees in sub-currencies.
* The function call fails unless the `from` account has deliberately authorized the sender of the message via `approve` function.
*/
function transferFrom(address from, address to, uint256 tokens) external notPaused validAddress(to) noReentrancy returns (bool success) {
}
/**
* @dev It approves another address to spend tokens on your behalf. It allows `spender` to withdraw from your account, multiple times,
* up to the `tokens` amount. If this function is called again, it overwrites the current allowance with `tokens`.
*/
function approve(address spender, uint256 tokens) external notPaused validAddress(spender) noReentrancy returns (bool success) {
}
/**
* @dev Implements another way of approving tokens by increasing current approval. It is not defined in the standard.
* https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol
*/
function increaseAllowance(address spender, uint256 addedTokens) external notPaused validAddress(spender) noReentrancy returns (bool success) {
}
/**
* @dev Implements another way of approving tokens by decreasing current approval. It is not defined in the standard.
* https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol
*/
function decreaseAllowance(address spender, uint256 subtractedTokens) external notPaused validAddress(spender) noReentrancy returns (bool success) {
}
/**
* @dev Supports selling tokens to the contract. It uses msg.sender.call.value() mrthod to be compatible with EIP-1884.
* In addition to CEI, Mutex (noReentrancy modifier is also used to mitigate cross-function re-entrancy attack (along with same-function re-entrancy).
*/
function sell(uint256 tokens) external notPaused noReentrancy returns(bool success)
{
}
/**
* @dev Supports buying token by transferring Ether
*/
function buy() external payable notPaused noReentrancy returns(bool success){
}
/**
* @dev Withdraw Ether from the contract and send it to the address that is specified by the owner. It can be called only by the owner.
*/
function withdraw(uint256 amount) external onlyOwner returns(bool success){
}
/**
* @dev Returns balance of the Contract
*
function getContractBalance() public view onlyOwner returns(uint256, uint256){
return (address(this).balance, contractBalance);
}
/**
* @dev Checks for unexpected received Ether (forced to the contract without using payable functions)
*
function unexpectedEther() public view onlyOwner returns(bool){
return (contractBalance != address(this).balance);
}
*/
/**
/* @dev Creates new tokens and assigns them to the owner, increases the total supply as well.
*/
function mint(uint256 newTokens) external onlyOwner {
}
/**
* @dev Burns tokens from the owner, decreases the total supply as well.
*/
function burn(uint256 tokens) external onlyOwner {
}
/**
* @dev Sets new exchange rate. It can be called only by the owner.
*/
function setExchangeRate(uint256 newRate) external onlyOwner returns(bool success)
{
}
/**
* @dev Changes owner of the contract
*/
function changeOwner(address payable newOwner) external onlyOwner validAddress(newOwner) {
}
/**
* @dev Pause the contract as result of self-checks (off-chain computations).
*/
function pause() external onlyOwner {
}
/**
* @dev Unpause the contract after self-checks.
*/
function unpause() external onlyOwner {
}
/**
* @dev Returns the total token supply.
*/
function totalSupply() external view returns (uint256 tokens) {
}
/**
* @dev Returns the account balance of another account with address `tokenHolder`.
*/
function balanceOf(address tokenHolder) external view returns (uint256 tokens) {
}
/**
* @dev Returns the amount of tokens approved by the owner that can be transferred to the spender's account.
*/
function allowance(address tokenHolder, address spender) external view notPaused returns (uint256 tokens) {
}
/**
* @dev Returns the amount of transferred tokens by spender's account.
*/
function transfers(address tokenHolder, address spender) external view notPaused returns (uint256 tokens) {
}
/**
* @dev Checks whether the caller is the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Checks validity of the address.
*/
modifier validAddress(address addr){
}
/**
* @author https://solidity.readthedocs.io/en/latest/contracts.html#function-modifiers
* @dev Mutex modifier to mitigate Re-entrancy Attack. Operation will succeed if and only if the locking thread is the one that already holds the lock.
*/
modifier noReentrancy()
{
}
/**
* @dev Modifier to support Fail-Safe Mode. In case, it disables most of the toekn features, hands off control to the owner.
*/
modifier notPaused()
{
}
/// Events
event Buy(address indexed _buyer, uint256 _wei, address indexed _owner, uint256 _tokens);
event Sell(address indexed _seller, uint256 _tokens, address indexed _contract, uint256 _wei, address indexed _owner);
event Received(address indexed _sender, uint256 _wei);
event Withdrawal(address indexed _by, address indexed _contract, uint256 _wei);
event Change(uint256 _current, uint256 _new);
event ChangeOwner(address indexed _current, address indexed _new);
event Pause(address indexed _owner, bool _state);
event Mint(address indexed _owner, uint256 _tokens);
event Burn(address indexed _owner, uint256 _tokens);
}
| balances[to].add(tokens)>=balances[to],"Overflow error" | 388,459 | balances[to].add(tokens)>=balances[to] |
"Transfer more than allowed" | // SPDX-License-Identifier: ECLv2
/**
* @title TokenHook (THK).
* @author Currently ANONYMOUS.
* @notice You may use this code under ECLv2.
* @dev For new token deployment:
* 1- Install MetaMask (Chrome/Firefox extension).
* 2- Connect to Rinkeby (or other private/public chains).
* 3- Run RemixIDE and set environment as "Injected Web3".
* 4- Copy and past this code in RemixIDE.
* 5- Deploy the token contract (ERC20).
* @dev The code is compatible with version 0.5.x of Solidity complier.
* Version 0.5.11 has been selected for compatibility with the following auditing tools:
* 1- EY Review Tool by Ernst & Young Global Limited.
* 2- SmartCheck by SmartDec.
* 3- Securify by ChainSecurity.
* 4- ContractGuard by GuardStrike.
* 5- MythX by ConsenSys.
* 6- Slither Analyzer by Crytic.
* 7- Odin by Sooho.
*/
pragma solidity 0.5.11;
/**
* @title ERC20 Interface
* @author Fabian Vogelsteller, Vitalik Buterin
* @dev https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
*/
interface IERC20 {
/// Transfers tokens and fires the Transfer event.
function transfer(address to, uint256 tokens) external returns (bool);
/// Allows to withdraw from your account multiple times, up to the approved tokens.
function approve(address spender, uint256 tokens) external returns (bool);
/// Transfers approved tokens and fires the Transfer event
function transferFrom(address from, address to, uint256 tokens) external returns (bool);
/// Returns the total token supply
function totalSupply() external view returns (uint256);
/// Returns token balance of an account
function balanceOf(address account) external view returns (uint256);
/// Returns the allowed tokens to withdraw from an account
function allowance(address account, address spender) external view returns (uint256);
/// Events
event Transfer(address indexed from, address indexed to, uint256 tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint256 tokens);
}
/**
* @title Wrappers over Solidity's arithmetic operations with added overflow checks.
* @author OpenZeppelin
* @dev https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol
*
* 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 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 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) {
}
}
/**
* @title ERC20 Token contract
* @dev When verify the code in EtherScan and if you used the default initialSupply,
* set this value as "Constructor Arguments":
* 0000000000000000000000000000000000000000000000000000000000000000
* @dev The token will be created with 18 decimal places,
* so it takes a balance of 10 ** 18 token units to equal one token.
* In other word, if we want to have x initial tokens, we need to pass in,
* x * 10 ** 18 to the constructor.
*/
contract ERC20 is IERC20 {
using SafeMath for uint256; /// Attach SafeMath functions with uint256 to mitigate integer overflow
string public constant name = "TokenHook"; /// Token name
string public constant symbol = "THK"; /// Token symbol
uint8 public constant decimals = 18; /// Divisible to 18 decimal places
address payable private owner; /// Token owner
uint256 public exchangeRate = 100; /// 100 tokens per 1ETH, default exchange rate
uint256 private initialSupply = 200e6; /// Controls economy of the token by limiting initial supply to 200M
bool private locked; /// Mutex variable to mitigate re-entrancy attack
bool private paused; /// Boolean variable to support Fail-Safe mode
//uint256 private contractBalance = 0; /// Can be used for integrity check
mapping(address => mapping (address => uint256)) private allowances; /// Allowed token to transfer by spenders
mapping(address => mapping (address => uint256)) private transferred; /// Transferred tokens by spenders
mapping(address => uint256) public balances; /// Balance of token holders
/**
* @dev Token constructor that runs only once upon contract creation. The final code of the contract is deployed to the blockchain,
* after the constructor has run.
*/
constructor(uint256 supply) public {
}
/**
* @dev Fallback function to accept ETH. It is compatible with 2300 gas for receiving funds via send or transfer methods.
*/
function() external payable{
}
/**
* @dev Transfers `tokens` amount of tokens to address `to`, and fires Transfer event. Transferring zero tokens is also allowed.
*/
function transfer(address to, uint256 tokens) external notPaused validAddress(to) noReentrancy returns (bool success) {
}
/**
* @dev Special type of Transfer that makes it possible to give permission to another address for spending tokens on your behalf.
* It sends `tokens` from address `from` to address `to`. The `transferFrom` method is used for a withdraw work-flow, allowing
* contracts to send tokens on your behalf, for example to deposit to a contract address and/or to charge fees in sub-currencies.
* The function call fails unless the `from` account has deliberately authorized the sender of the message via `approve` function.
*/
function transferFrom(address from, address to, uint256 tokens) external notPaused validAddress(to) noReentrancy returns (bool success) {
require(balances[from] >= tokens, "Not enough tokens"); /// Checks the sender's balance
require(<FILL_ME>)
balances[from] = balances[from].sub(tokens); /// Decreases balance of approver
balances[to] = balances[to].add(tokens); /// Increases balance of spender
transferred[from][msg.sender] = transferred[from][msg.sender].add(tokens); /// Tracks transferred tokens
emit Transfer(from, to, tokens); /// Logs transferred tokens
return true;
}
/**
* @dev It approves another address to spend tokens on your behalf. It allows `spender` to withdraw from your account, multiple times,
* up to the `tokens` amount. If this function is called again, it overwrites the current allowance with `tokens`.
*/
function approve(address spender, uint256 tokens) external notPaused validAddress(spender) noReentrancy returns (bool success) {
}
/**
* @dev Implements another way of approving tokens by increasing current approval. It is not defined in the standard.
* https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol
*/
function increaseAllowance(address spender, uint256 addedTokens) external notPaused validAddress(spender) noReentrancy returns (bool success) {
}
/**
* @dev Implements another way of approving tokens by decreasing current approval. It is not defined in the standard.
* https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol
*/
function decreaseAllowance(address spender, uint256 subtractedTokens) external notPaused validAddress(spender) noReentrancy returns (bool success) {
}
/**
* @dev Supports selling tokens to the contract. It uses msg.sender.call.value() mrthod to be compatible with EIP-1884.
* In addition to CEI, Mutex (noReentrancy modifier is also used to mitigate cross-function re-entrancy attack (along with same-function re-entrancy).
*/
function sell(uint256 tokens) external notPaused noReentrancy returns(bool success)
{
}
/**
* @dev Supports buying token by transferring Ether
*/
function buy() external payable notPaused noReentrancy returns(bool success){
}
/**
* @dev Withdraw Ether from the contract and send it to the address that is specified by the owner. It can be called only by the owner.
*/
function withdraw(uint256 amount) external onlyOwner returns(bool success){
}
/**
* @dev Returns balance of the Contract
*
function getContractBalance() public view onlyOwner returns(uint256, uint256){
return (address(this).balance, contractBalance);
}
/**
* @dev Checks for unexpected received Ether (forced to the contract without using payable functions)
*
function unexpectedEther() public view onlyOwner returns(bool){
return (contractBalance != address(this).balance);
}
*/
/**
/* @dev Creates new tokens and assigns them to the owner, increases the total supply as well.
*/
function mint(uint256 newTokens) external onlyOwner {
}
/**
* @dev Burns tokens from the owner, decreases the total supply as well.
*/
function burn(uint256 tokens) external onlyOwner {
}
/**
* @dev Sets new exchange rate. It can be called only by the owner.
*/
function setExchangeRate(uint256 newRate) external onlyOwner returns(bool success)
{
}
/**
* @dev Changes owner of the contract
*/
function changeOwner(address payable newOwner) external onlyOwner validAddress(newOwner) {
}
/**
* @dev Pause the contract as result of self-checks (off-chain computations).
*/
function pause() external onlyOwner {
}
/**
* @dev Unpause the contract after self-checks.
*/
function unpause() external onlyOwner {
}
/**
* @dev Returns the total token supply.
*/
function totalSupply() external view returns (uint256 tokens) {
}
/**
* @dev Returns the account balance of another account with address `tokenHolder`.
*/
function balanceOf(address tokenHolder) external view returns (uint256 tokens) {
}
/**
* @dev Returns the amount of tokens approved by the owner that can be transferred to the spender's account.
*/
function allowance(address tokenHolder, address spender) external view notPaused returns (uint256 tokens) {
}
/**
* @dev Returns the amount of transferred tokens by spender's account.
*/
function transfers(address tokenHolder, address spender) external view notPaused returns (uint256 tokens) {
}
/**
* @dev Checks whether the caller is the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Checks validity of the address.
*/
modifier validAddress(address addr){
}
/**
* @author https://solidity.readthedocs.io/en/latest/contracts.html#function-modifiers
* @dev Mutex modifier to mitigate Re-entrancy Attack. Operation will succeed if and only if the locking thread is the one that already holds the lock.
*/
modifier noReentrancy()
{
}
/**
* @dev Modifier to support Fail-Safe Mode. In case, it disables most of the toekn features, hands off control to the owner.
*/
modifier notPaused()
{
}
/// Events
event Buy(address indexed _buyer, uint256 _wei, address indexed _owner, uint256 _tokens);
event Sell(address indexed _seller, uint256 _tokens, address indexed _contract, uint256 _wei, address indexed _owner);
event Received(address indexed _sender, uint256 _wei);
event Withdrawal(address indexed _by, address indexed _contract, uint256 _wei);
event Change(uint256 _current, uint256 _new);
event ChangeOwner(address indexed _current, address indexed _new);
event Pause(address indexed _owner, bool _state);
event Mint(address indexed _owner, uint256 _tokens);
event Burn(address indexed _owner, uint256 _tokens);
}
| tokens<=((allowances[from][msg.sender]>transferred[from][msg.sender])?allowances[from][msg.sender].sub(transferred[from][msg.sender]):0),"Transfer more than allowed" | 388,459 | tokens<=((allowances[from][msg.sender]>transferred[from][msg.sender])?allowances[from][msg.sender].sub(transferred[from][msg.sender]):0) |
"Not enough token" | // SPDX-License-Identifier: ECLv2
/**
* @title TokenHook (THK).
* @author Currently ANONYMOUS.
* @notice You may use this code under ECLv2.
* @dev For new token deployment:
* 1- Install MetaMask (Chrome/Firefox extension).
* 2- Connect to Rinkeby (or other private/public chains).
* 3- Run RemixIDE and set environment as "Injected Web3".
* 4- Copy and past this code in RemixIDE.
* 5- Deploy the token contract (ERC20).
* @dev The code is compatible with version 0.5.x of Solidity complier.
* Version 0.5.11 has been selected for compatibility with the following auditing tools:
* 1- EY Review Tool by Ernst & Young Global Limited.
* 2- SmartCheck by SmartDec.
* 3- Securify by ChainSecurity.
* 4- ContractGuard by GuardStrike.
* 5- MythX by ConsenSys.
* 6- Slither Analyzer by Crytic.
* 7- Odin by Sooho.
*/
pragma solidity 0.5.11;
/**
* @title ERC20 Interface
* @author Fabian Vogelsteller, Vitalik Buterin
* @dev https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
*/
interface IERC20 {
/// Transfers tokens and fires the Transfer event.
function transfer(address to, uint256 tokens) external returns (bool);
/// Allows to withdraw from your account multiple times, up to the approved tokens.
function approve(address spender, uint256 tokens) external returns (bool);
/// Transfers approved tokens and fires the Transfer event
function transferFrom(address from, address to, uint256 tokens) external returns (bool);
/// Returns the total token supply
function totalSupply() external view returns (uint256);
/// Returns token balance of an account
function balanceOf(address account) external view returns (uint256);
/// Returns the allowed tokens to withdraw from an account
function allowance(address account, address spender) external view returns (uint256);
/// Events
event Transfer(address indexed from, address indexed to, uint256 tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint256 tokens);
}
/**
* @title Wrappers over Solidity's arithmetic operations with added overflow checks.
* @author OpenZeppelin
* @dev https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol
*
* 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 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 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) {
}
}
/**
* @title ERC20 Token contract
* @dev When verify the code in EtherScan and if you used the default initialSupply,
* set this value as "Constructor Arguments":
* 0000000000000000000000000000000000000000000000000000000000000000
* @dev The token will be created with 18 decimal places,
* so it takes a balance of 10 ** 18 token units to equal one token.
* In other word, if we want to have x initial tokens, we need to pass in,
* x * 10 ** 18 to the constructor.
*/
contract ERC20 is IERC20 {
using SafeMath for uint256; /// Attach SafeMath functions with uint256 to mitigate integer overflow
string public constant name = "TokenHook"; /// Token name
string public constant symbol = "THK"; /// Token symbol
uint8 public constant decimals = 18; /// Divisible to 18 decimal places
address payable private owner; /// Token owner
uint256 public exchangeRate = 100; /// 100 tokens per 1ETH, default exchange rate
uint256 private initialSupply = 200e6; /// Controls economy of the token by limiting initial supply to 200M
bool private locked; /// Mutex variable to mitigate re-entrancy attack
bool private paused; /// Boolean variable to support Fail-Safe mode
//uint256 private contractBalance = 0; /// Can be used for integrity check
mapping(address => mapping (address => uint256)) private allowances; /// Allowed token to transfer by spenders
mapping(address => mapping (address => uint256)) private transferred; /// Transferred tokens by spenders
mapping(address => uint256) public balances; /// Balance of token holders
/**
* @dev Token constructor that runs only once upon contract creation. The final code of the contract is deployed to the blockchain,
* after the constructor has run.
*/
constructor(uint256 supply) public {
}
/**
* @dev Fallback function to accept ETH. It is compatible with 2300 gas for receiving funds via send or transfer methods.
*/
function() external payable{
}
/**
* @dev Transfers `tokens` amount of tokens to address `to`, and fires Transfer event. Transferring zero tokens is also allowed.
*/
function transfer(address to, uint256 tokens) external notPaused validAddress(to) noReentrancy returns (bool success) {
}
/**
* @dev Special type of Transfer that makes it possible to give permission to another address for spending tokens on your behalf.
* It sends `tokens` from address `from` to address `to`. The `transferFrom` method is used for a withdraw work-flow, allowing
* contracts to send tokens on your behalf, for example to deposit to a contract address and/or to charge fees in sub-currencies.
* The function call fails unless the `from` account has deliberately authorized the sender of the message via `approve` function.
*/
function transferFrom(address from, address to, uint256 tokens) external notPaused validAddress(to) noReentrancy returns (bool success) {
}
/**
* @dev It approves another address to spend tokens on your behalf. It allows `spender` to withdraw from your account, multiple times,
* up to the `tokens` amount. If this function is called again, it overwrites the current allowance with `tokens`.
*/
function approve(address spender, uint256 tokens) external notPaused validAddress(spender) noReentrancy returns (bool success) {
}
/**
* @dev Implements another way of approving tokens by increasing current approval. It is not defined in the standard.
* https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol
*/
function increaseAllowance(address spender, uint256 addedTokens) external notPaused validAddress(spender) noReentrancy returns (bool success) {
require(<FILL_ME>) /// Checks the approver's balance
allowances[msg.sender][spender] = allowances[msg.sender][spender].add(addedTokens); /// Adds allowance of the spender
emit Approval(msg.sender, spender, addedTokens); /// Logs approved tokens
return true;
}
/**
* @dev Implements another way of approving tokens by decreasing current approval. It is not defined in the standard.
* https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol
*/
function decreaseAllowance(address spender, uint256 subtractedTokens) external notPaused validAddress(spender) noReentrancy returns (bool success) {
}
/**
* @dev Supports selling tokens to the contract. It uses msg.sender.call.value() mrthod to be compatible with EIP-1884.
* In addition to CEI, Mutex (noReentrancy modifier is also used to mitigate cross-function re-entrancy attack (along with same-function re-entrancy).
*/
function sell(uint256 tokens) external notPaused noReentrancy returns(bool success)
{
}
/**
* @dev Supports buying token by transferring Ether
*/
function buy() external payable notPaused noReentrancy returns(bool success){
}
/**
* @dev Withdraw Ether from the contract and send it to the address that is specified by the owner. It can be called only by the owner.
*/
function withdraw(uint256 amount) external onlyOwner returns(bool success){
}
/**
* @dev Returns balance of the Contract
*
function getContractBalance() public view onlyOwner returns(uint256, uint256){
return (address(this).balance, contractBalance);
}
/**
* @dev Checks for unexpected received Ether (forced to the contract without using payable functions)
*
function unexpectedEther() public view onlyOwner returns(bool){
return (contractBalance != address(this).balance);
}
*/
/**
/* @dev Creates new tokens and assigns them to the owner, increases the total supply as well.
*/
function mint(uint256 newTokens) external onlyOwner {
}
/**
* @dev Burns tokens from the owner, decreases the total supply as well.
*/
function burn(uint256 tokens) external onlyOwner {
}
/**
* @dev Sets new exchange rate. It can be called only by the owner.
*/
function setExchangeRate(uint256 newRate) external onlyOwner returns(bool success)
{
}
/**
* @dev Changes owner of the contract
*/
function changeOwner(address payable newOwner) external onlyOwner validAddress(newOwner) {
}
/**
* @dev Pause the contract as result of self-checks (off-chain computations).
*/
function pause() external onlyOwner {
}
/**
* @dev Unpause the contract after self-checks.
*/
function unpause() external onlyOwner {
}
/**
* @dev Returns the total token supply.
*/
function totalSupply() external view returns (uint256 tokens) {
}
/**
* @dev Returns the account balance of another account with address `tokenHolder`.
*/
function balanceOf(address tokenHolder) external view returns (uint256 tokens) {
}
/**
* @dev Returns the amount of tokens approved by the owner that can be transferred to the spender's account.
*/
function allowance(address tokenHolder, address spender) external view notPaused returns (uint256 tokens) {
}
/**
* @dev Returns the amount of transferred tokens by spender's account.
*/
function transfers(address tokenHolder, address spender) external view notPaused returns (uint256 tokens) {
}
/**
* @dev Checks whether the caller is the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Checks validity of the address.
*/
modifier validAddress(address addr){
}
/**
* @author https://solidity.readthedocs.io/en/latest/contracts.html#function-modifiers
* @dev Mutex modifier to mitigate Re-entrancy Attack. Operation will succeed if and only if the locking thread is the one that already holds the lock.
*/
modifier noReentrancy()
{
}
/**
* @dev Modifier to support Fail-Safe Mode. In case, it disables most of the toekn features, hands off control to the owner.
*/
modifier notPaused()
{
}
/// Events
event Buy(address indexed _buyer, uint256 _wei, address indexed _owner, uint256 _tokens);
event Sell(address indexed _seller, uint256 _tokens, address indexed _contract, uint256 _wei, address indexed _owner);
event Received(address indexed _sender, uint256 _wei);
event Withdrawal(address indexed _by, address indexed _contract, uint256 _wei);
event Change(uint256 _current, uint256 _new);
event ChangeOwner(address indexed _current, address indexed _new);
event Pause(address indexed _owner, bool _state);
event Mint(address indexed _owner, uint256 _tokens);
event Burn(address indexed _owner, uint256 _tokens);
}
| balances[msg.sender]>=addedTokens,"Not enough token" | 388,459 | balances[msg.sender]>=addedTokens |
"Not enough token" | // SPDX-License-Identifier: ECLv2
/**
* @title TokenHook (THK).
* @author Currently ANONYMOUS.
* @notice You may use this code under ECLv2.
* @dev For new token deployment:
* 1- Install MetaMask (Chrome/Firefox extension).
* 2- Connect to Rinkeby (or other private/public chains).
* 3- Run RemixIDE and set environment as "Injected Web3".
* 4- Copy and past this code in RemixIDE.
* 5- Deploy the token contract (ERC20).
* @dev The code is compatible with version 0.5.x of Solidity complier.
* Version 0.5.11 has been selected for compatibility with the following auditing tools:
* 1- EY Review Tool by Ernst & Young Global Limited.
* 2- SmartCheck by SmartDec.
* 3- Securify by ChainSecurity.
* 4- ContractGuard by GuardStrike.
* 5- MythX by ConsenSys.
* 6- Slither Analyzer by Crytic.
* 7- Odin by Sooho.
*/
pragma solidity 0.5.11;
/**
* @title ERC20 Interface
* @author Fabian Vogelsteller, Vitalik Buterin
* @dev https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
*/
interface IERC20 {
/// Transfers tokens and fires the Transfer event.
function transfer(address to, uint256 tokens) external returns (bool);
/// Allows to withdraw from your account multiple times, up to the approved tokens.
function approve(address spender, uint256 tokens) external returns (bool);
/// Transfers approved tokens and fires the Transfer event
function transferFrom(address from, address to, uint256 tokens) external returns (bool);
/// Returns the total token supply
function totalSupply() external view returns (uint256);
/// Returns token balance of an account
function balanceOf(address account) external view returns (uint256);
/// Returns the allowed tokens to withdraw from an account
function allowance(address account, address spender) external view returns (uint256);
/// Events
event Transfer(address indexed from, address indexed to, uint256 tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint256 tokens);
}
/**
* @title Wrappers over Solidity's arithmetic operations with added overflow checks.
* @author OpenZeppelin
* @dev https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol
*
* 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 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 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) {
}
}
/**
* @title ERC20 Token contract
* @dev When verify the code in EtherScan and if you used the default initialSupply,
* set this value as "Constructor Arguments":
* 0000000000000000000000000000000000000000000000000000000000000000
* @dev The token will be created with 18 decimal places,
* so it takes a balance of 10 ** 18 token units to equal one token.
* In other word, if we want to have x initial tokens, we need to pass in,
* x * 10 ** 18 to the constructor.
*/
contract ERC20 is IERC20 {
using SafeMath for uint256; /// Attach SafeMath functions with uint256 to mitigate integer overflow
string public constant name = "TokenHook"; /// Token name
string public constant symbol = "THK"; /// Token symbol
uint8 public constant decimals = 18; /// Divisible to 18 decimal places
address payable private owner; /// Token owner
uint256 public exchangeRate = 100; /// 100 tokens per 1ETH, default exchange rate
uint256 private initialSupply = 200e6; /// Controls economy of the token by limiting initial supply to 200M
bool private locked; /// Mutex variable to mitigate re-entrancy attack
bool private paused; /// Boolean variable to support Fail-Safe mode
//uint256 private contractBalance = 0; /// Can be used for integrity check
mapping(address => mapping (address => uint256)) private allowances; /// Allowed token to transfer by spenders
mapping(address => mapping (address => uint256)) private transferred; /// Transferred tokens by spenders
mapping(address => uint256) public balances; /// Balance of token holders
/**
* @dev Token constructor that runs only once upon contract creation. The final code of the contract is deployed to the blockchain,
* after the constructor has run.
*/
constructor(uint256 supply) public {
}
/**
* @dev Fallback function to accept ETH. It is compatible with 2300 gas for receiving funds via send or transfer methods.
*/
function() external payable{
}
/**
* @dev Transfers `tokens` amount of tokens to address `to`, and fires Transfer event. Transferring zero tokens is also allowed.
*/
function transfer(address to, uint256 tokens) external notPaused validAddress(to) noReentrancy returns (bool success) {
}
/**
* @dev Special type of Transfer that makes it possible to give permission to another address for spending tokens on your behalf.
* It sends `tokens` from address `from` to address `to`. The `transferFrom` method is used for a withdraw work-flow, allowing
* contracts to send tokens on your behalf, for example to deposit to a contract address and/or to charge fees in sub-currencies.
* The function call fails unless the `from` account has deliberately authorized the sender of the message via `approve` function.
*/
function transferFrom(address from, address to, uint256 tokens) external notPaused validAddress(to) noReentrancy returns (bool success) {
}
/**
* @dev It approves another address to spend tokens on your behalf. It allows `spender` to withdraw from your account, multiple times,
* up to the `tokens` amount. If this function is called again, it overwrites the current allowance with `tokens`.
*/
function approve(address spender, uint256 tokens) external notPaused validAddress(spender) noReentrancy returns (bool success) {
}
/**
* @dev Implements another way of approving tokens by increasing current approval. It is not defined in the standard.
* https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol
*/
function increaseAllowance(address spender, uint256 addedTokens) external notPaused validAddress(spender) noReentrancy returns (bool success) {
}
/**
* @dev Implements another way of approving tokens by decreasing current approval. It is not defined in the standard.
* https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol
*/
function decreaseAllowance(address spender, uint256 subtractedTokens) external notPaused validAddress(spender) noReentrancy returns (bool success) {
require(<FILL_ME>) /// Checks the spenders's allowance
allowances[msg.sender][spender] = allowances[msg.sender][spender].sub(subtractedTokens);/// Adds allowance of the spender
emit Approval(msg.sender, spender, subtractedTokens); /// Logs approved tokens
return true;
}
/**
* @dev Supports selling tokens to the contract. It uses msg.sender.call.value() mrthod to be compatible with EIP-1884.
* In addition to CEI, Mutex (noReentrancy modifier is also used to mitigate cross-function re-entrancy attack (along with same-function re-entrancy).
*/
function sell(uint256 tokens) external notPaused noReentrancy returns(bool success)
{
}
/**
* @dev Supports buying token by transferring Ether
*/
function buy() external payable notPaused noReentrancy returns(bool success){
}
/**
* @dev Withdraw Ether from the contract and send it to the address that is specified by the owner. It can be called only by the owner.
*/
function withdraw(uint256 amount) external onlyOwner returns(bool success){
}
/**
* @dev Returns balance of the Contract
*
function getContractBalance() public view onlyOwner returns(uint256, uint256){
return (address(this).balance, contractBalance);
}
/**
* @dev Checks for unexpected received Ether (forced to the contract without using payable functions)
*
function unexpectedEther() public view onlyOwner returns(bool){
return (contractBalance != address(this).balance);
}
*/
/**
/* @dev Creates new tokens and assigns them to the owner, increases the total supply as well.
*/
function mint(uint256 newTokens) external onlyOwner {
}
/**
* @dev Burns tokens from the owner, decreases the total supply as well.
*/
function burn(uint256 tokens) external onlyOwner {
}
/**
* @dev Sets new exchange rate. It can be called only by the owner.
*/
function setExchangeRate(uint256 newRate) external onlyOwner returns(bool success)
{
}
/**
* @dev Changes owner of the contract
*/
function changeOwner(address payable newOwner) external onlyOwner validAddress(newOwner) {
}
/**
* @dev Pause the contract as result of self-checks (off-chain computations).
*/
function pause() external onlyOwner {
}
/**
* @dev Unpause the contract after self-checks.
*/
function unpause() external onlyOwner {
}
/**
* @dev Returns the total token supply.
*/
function totalSupply() external view returns (uint256 tokens) {
}
/**
* @dev Returns the account balance of another account with address `tokenHolder`.
*/
function balanceOf(address tokenHolder) external view returns (uint256 tokens) {
}
/**
* @dev Returns the amount of tokens approved by the owner that can be transferred to the spender's account.
*/
function allowance(address tokenHolder, address spender) external view notPaused returns (uint256 tokens) {
}
/**
* @dev Returns the amount of transferred tokens by spender's account.
*/
function transfers(address tokenHolder, address spender) external view notPaused returns (uint256 tokens) {
}
/**
* @dev Checks whether the caller is the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Checks validity of the address.
*/
modifier validAddress(address addr){
}
/**
* @author https://solidity.readthedocs.io/en/latest/contracts.html#function-modifiers
* @dev Mutex modifier to mitigate Re-entrancy Attack. Operation will succeed if and only if the locking thread is the one that already holds the lock.
*/
modifier noReentrancy()
{
}
/**
* @dev Modifier to support Fail-Safe Mode. In case, it disables most of the toekn features, hands off control to the owner.
*/
modifier notPaused()
{
}
/// Events
event Buy(address indexed _buyer, uint256 _wei, address indexed _owner, uint256 _tokens);
event Sell(address indexed _seller, uint256 _tokens, address indexed _contract, uint256 _wei, address indexed _owner);
event Received(address indexed _sender, uint256 _wei);
event Withdrawal(address indexed _by, address indexed _contract, uint256 _wei);
event Change(uint256 _current, uint256 _new);
event ChangeOwner(address indexed _current, address indexed _new);
event Pause(address indexed _owner, bool _state);
event Mint(address indexed _owner, uint256 _tokens);
event Burn(address indexed _owner, uint256 _tokens);
}
| allowances[msg.sender][spender]>=subtractedTokens,"Not enough token" | 388,459 | allowances[msg.sender][spender]>=subtractedTokens |
"Not enough wei" | // SPDX-License-Identifier: ECLv2
/**
* @title TokenHook (THK).
* @author Currently ANONYMOUS.
* @notice You may use this code under ECLv2.
* @dev For new token deployment:
* 1- Install MetaMask (Chrome/Firefox extension).
* 2- Connect to Rinkeby (or other private/public chains).
* 3- Run RemixIDE and set environment as "Injected Web3".
* 4- Copy and past this code in RemixIDE.
* 5- Deploy the token contract (ERC20).
* @dev The code is compatible with version 0.5.x of Solidity complier.
* Version 0.5.11 has been selected for compatibility with the following auditing tools:
* 1- EY Review Tool by Ernst & Young Global Limited.
* 2- SmartCheck by SmartDec.
* 3- Securify by ChainSecurity.
* 4- ContractGuard by GuardStrike.
* 5- MythX by ConsenSys.
* 6- Slither Analyzer by Crytic.
* 7- Odin by Sooho.
*/
pragma solidity 0.5.11;
/**
* @title ERC20 Interface
* @author Fabian Vogelsteller, Vitalik Buterin
* @dev https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
*/
interface IERC20 {
/// Transfers tokens and fires the Transfer event.
function transfer(address to, uint256 tokens) external returns (bool);
/// Allows to withdraw from your account multiple times, up to the approved tokens.
function approve(address spender, uint256 tokens) external returns (bool);
/// Transfers approved tokens and fires the Transfer event
function transferFrom(address from, address to, uint256 tokens) external returns (bool);
/// Returns the total token supply
function totalSupply() external view returns (uint256);
/// Returns token balance of an account
function balanceOf(address account) external view returns (uint256);
/// Returns the allowed tokens to withdraw from an account
function allowance(address account, address spender) external view returns (uint256);
/// Events
event Transfer(address indexed from, address indexed to, uint256 tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint256 tokens);
}
/**
* @title Wrappers over Solidity's arithmetic operations with added overflow checks.
* @author OpenZeppelin
* @dev https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol
*
* 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 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 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) {
}
}
/**
* @title ERC20 Token contract
* @dev When verify the code in EtherScan and if you used the default initialSupply,
* set this value as "Constructor Arguments":
* 0000000000000000000000000000000000000000000000000000000000000000
* @dev The token will be created with 18 decimal places,
* so it takes a balance of 10 ** 18 token units to equal one token.
* In other word, if we want to have x initial tokens, we need to pass in,
* x * 10 ** 18 to the constructor.
*/
contract ERC20 is IERC20 {
using SafeMath for uint256; /// Attach SafeMath functions with uint256 to mitigate integer overflow
string public constant name = "TokenHook"; /// Token name
string public constant symbol = "THK"; /// Token symbol
uint8 public constant decimals = 18; /// Divisible to 18 decimal places
address payable private owner; /// Token owner
uint256 public exchangeRate = 100; /// 100 tokens per 1ETH, default exchange rate
uint256 private initialSupply = 200e6; /// Controls economy of the token by limiting initial supply to 200M
bool private locked; /// Mutex variable to mitigate re-entrancy attack
bool private paused; /// Boolean variable to support Fail-Safe mode
//uint256 private contractBalance = 0; /// Can be used for integrity check
mapping(address => mapping (address => uint256)) private allowances; /// Allowed token to transfer by spenders
mapping(address => mapping (address => uint256)) private transferred; /// Transferred tokens by spenders
mapping(address => uint256) public balances; /// Balance of token holders
/**
* @dev Token constructor that runs only once upon contract creation. The final code of the contract is deployed to the blockchain,
* after the constructor has run.
*/
constructor(uint256 supply) public {
}
/**
* @dev Fallback function to accept ETH. It is compatible with 2300 gas for receiving funds via send or transfer methods.
*/
function() external payable{
}
/**
* @dev Transfers `tokens` amount of tokens to address `to`, and fires Transfer event. Transferring zero tokens is also allowed.
*/
function transfer(address to, uint256 tokens) external notPaused validAddress(to) noReentrancy returns (bool success) {
}
/**
* @dev Special type of Transfer that makes it possible to give permission to another address for spending tokens on your behalf.
* It sends `tokens` from address `from` to address `to`. The `transferFrom` method is used for a withdraw work-flow, allowing
* contracts to send tokens on your behalf, for example to deposit to a contract address and/or to charge fees in sub-currencies.
* The function call fails unless the `from` account has deliberately authorized the sender of the message via `approve` function.
*/
function transferFrom(address from, address to, uint256 tokens) external notPaused validAddress(to) noReentrancy returns (bool success) {
}
/**
* @dev It approves another address to spend tokens on your behalf. It allows `spender` to withdraw from your account, multiple times,
* up to the `tokens` amount. If this function is called again, it overwrites the current allowance with `tokens`.
*/
function approve(address spender, uint256 tokens) external notPaused validAddress(spender) noReentrancy returns (bool success) {
}
/**
* @dev Implements another way of approving tokens by increasing current approval. It is not defined in the standard.
* https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol
*/
function increaseAllowance(address spender, uint256 addedTokens) external notPaused validAddress(spender) noReentrancy returns (bool success) {
}
/**
* @dev Implements another way of approving tokens by decreasing current approval. It is not defined in the standard.
* https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol
*/
function decreaseAllowance(address spender, uint256 subtractedTokens) external notPaused validAddress(spender) noReentrancy returns (bool success) {
}
/**
* @dev Supports selling tokens to the contract. It uses msg.sender.call.value() mrthod to be compatible with EIP-1884.
* In addition to CEI, Mutex (noReentrancy modifier is also used to mitigate cross-function re-entrancy attack (along with same-function re-entrancy).
*/
function sell(uint256 tokens) external notPaused noReentrancy returns(bool success)
{
require(tokens > 0, "No token to sell"); /// Selling zero token is not allowed
require(balances[msg.sender] >= tokens, "Not enough token"); /// Checks the seller's balance
uint256 _wei = tokens.div(exchangeRate); /// Calculates equivalent of tokens in Wei
require(<FILL_ME>) /// Checks the contract's ETH balance
//require(contractBalance >= _wei, "Not enough wei"); /// Contract does not have enough Wei
/// Using Checks-Effects-Interactions (CEI) pattern to mitigate re-entrancy attack
balances[msg.sender] = balances[msg.sender].sub(tokens); /// Decreases tokens of seller
balances[owner] = balances[owner].add(tokens); /// Increases tokens of owner
//contractBalance = contractBalance.sub(_wei); /// Adjusts contract balance
emit Sell(msg.sender, tokens, address(this), _wei, owner); /// Logs sell event
(success, ) = msg.sender.call.value(_wei)(""); /// Transfers Wei to the seller
require(success, "Ether transfer failed"); /// Checks successful transfer
}
/**
* @dev Supports buying token by transferring Ether
*/
function buy() external payable notPaused noReentrancy returns(bool success){
}
/**
* @dev Withdraw Ether from the contract and send it to the address that is specified by the owner. It can be called only by the owner.
*/
function withdraw(uint256 amount) external onlyOwner returns(bool success){
}
/**
* @dev Returns balance of the Contract
*
function getContractBalance() public view onlyOwner returns(uint256, uint256){
return (address(this).balance, contractBalance);
}
/**
* @dev Checks for unexpected received Ether (forced to the contract without using payable functions)
*
function unexpectedEther() public view onlyOwner returns(bool){
return (contractBalance != address(this).balance);
}
*/
/**
/* @dev Creates new tokens and assigns them to the owner, increases the total supply as well.
*/
function mint(uint256 newTokens) external onlyOwner {
}
/**
* @dev Burns tokens from the owner, decreases the total supply as well.
*/
function burn(uint256 tokens) external onlyOwner {
}
/**
* @dev Sets new exchange rate. It can be called only by the owner.
*/
function setExchangeRate(uint256 newRate) external onlyOwner returns(bool success)
{
}
/**
* @dev Changes owner of the contract
*/
function changeOwner(address payable newOwner) external onlyOwner validAddress(newOwner) {
}
/**
* @dev Pause the contract as result of self-checks (off-chain computations).
*/
function pause() external onlyOwner {
}
/**
* @dev Unpause the contract after self-checks.
*/
function unpause() external onlyOwner {
}
/**
* @dev Returns the total token supply.
*/
function totalSupply() external view returns (uint256 tokens) {
}
/**
* @dev Returns the account balance of another account with address `tokenHolder`.
*/
function balanceOf(address tokenHolder) external view returns (uint256 tokens) {
}
/**
* @dev Returns the amount of tokens approved by the owner that can be transferred to the spender's account.
*/
function allowance(address tokenHolder, address spender) external view notPaused returns (uint256 tokens) {
}
/**
* @dev Returns the amount of transferred tokens by spender's account.
*/
function transfers(address tokenHolder, address spender) external view notPaused returns (uint256 tokens) {
}
/**
* @dev Checks whether the caller is the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Checks validity of the address.
*/
modifier validAddress(address addr){
}
/**
* @author https://solidity.readthedocs.io/en/latest/contracts.html#function-modifiers
* @dev Mutex modifier to mitigate Re-entrancy Attack. Operation will succeed if and only if the locking thread is the one that already holds the lock.
*/
modifier noReentrancy()
{
}
/**
* @dev Modifier to support Fail-Safe Mode. In case, it disables most of the toekn features, hands off control to the owner.
*/
modifier notPaused()
{
}
/// Events
event Buy(address indexed _buyer, uint256 _wei, address indexed _owner, uint256 _tokens);
event Sell(address indexed _seller, uint256 _tokens, address indexed _contract, uint256 _wei, address indexed _owner);
event Received(address indexed _sender, uint256 _wei);
event Withdrawal(address indexed _by, address indexed _contract, uint256 _wei);
event Change(uint256 _current, uint256 _new);
event ChangeOwner(address indexed _current, address indexed _new);
event Pause(address indexed _owner, bool _state);
event Mint(address indexed _owner, uint256 _tokens);
event Burn(address indexed _owner, uint256 _tokens);
}
| address(this).balance>=_wei,"Not enough wei" | 388,459 | address(this).balance>=_wei |
"Not enough tokens" | // SPDX-License-Identifier: ECLv2
/**
* @title TokenHook (THK).
* @author Currently ANONYMOUS.
* @notice You may use this code under ECLv2.
* @dev For new token deployment:
* 1- Install MetaMask (Chrome/Firefox extension).
* 2- Connect to Rinkeby (or other private/public chains).
* 3- Run RemixIDE and set environment as "Injected Web3".
* 4- Copy and past this code in RemixIDE.
* 5- Deploy the token contract (ERC20).
* @dev The code is compatible with version 0.5.x of Solidity complier.
* Version 0.5.11 has been selected for compatibility with the following auditing tools:
* 1- EY Review Tool by Ernst & Young Global Limited.
* 2- SmartCheck by SmartDec.
* 3- Securify by ChainSecurity.
* 4- ContractGuard by GuardStrike.
* 5- MythX by ConsenSys.
* 6- Slither Analyzer by Crytic.
* 7- Odin by Sooho.
*/
pragma solidity 0.5.11;
/**
* @title ERC20 Interface
* @author Fabian Vogelsteller, Vitalik Buterin
* @dev https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
*/
interface IERC20 {
/// Transfers tokens and fires the Transfer event.
function transfer(address to, uint256 tokens) external returns (bool);
/// Allows to withdraw from your account multiple times, up to the approved tokens.
function approve(address spender, uint256 tokens) external returns (bool);
/// Transfers approved tokens and fires the Transfer event
function transferFrom(address from, address to, uint256 tokens) external returns (bool);
/// Returns the total token supply
function totalSupply() external view returns (uint256);
/// Returns token balance of an account
function balanceOf(address account) external view returns (uint256);
/// Returns the allowed tokens to withdraw from an account
function allowance(address account, address spender) external view returns (uint256);
/// Events
event Transfer(address indexed from, address indexed to, uint256 tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint256 tokens);
}
/**
* @title Wrappers over Solidity's arithmetic operations with added overflow checks.
* @author OpenZeppelin
* @dev https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol
*
* 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 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 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) {
}
}
/**
* @title ERC20 Token contract
* @dev When verify the code in EtherScan and if you used the default initialSupply,
* set this value as "Constructor Arguments":
* 0000000000000000000000000000000000000000000000000000000000000000
* @dev The token will be created with 18 decimal places,
* so it takes a balance of 10 ** 18 token units to equal one token.
* In other word, if we want to have x initial tokens, we need to pass in,
* x * 10 ** 18 to the constructor.
*/
contract ERC20 is IERC20 {
using SafeMath for uint256; /// Attach SafeMath functions with uint256 to mitigate integer overflow
string public constant name = "TokenHook"; /// Token name
string public constant symbol = "THK"; /// Token symbol
uint8 public constant decimals = 18; /// Divisible to 18 decimal places
address payable private owner; /// Token owner
uint256 public exchangeRate = 100; /// 100 tokens per 1ETH, default exchange rate
uint256 private initialSupply = 200e6; /// Controls economy of the token by limiting initial supply to 200M
bool private locked; /// Mutex variable to mitigate re-entrancy attack
bool private paused; /// Boolean variable to support Fail-Safe mode
//uint256 private contractBalance = 0; /// Can be used for integrity check
mapping(address => mapping (address => uint256)) private allowances; /// Allowed token to transfer by spenders
mapping(address => mapping (address => uint256)) private transferred; /// Transferred tokens by spenders
mapping(address => uint256) public balances; /// Balance of token holders
/**
* @dev Token constructor that runs only once upon contract creation. The final code of the contract is deployed to the blockchain,
* after the constructor has run.
*/
constructor(uint256 supply) public {
}
/**
* @dev Fallback function to accept ETH. It is compatible with 2300 gas for receiving funds via send or transfer methods.
*/
function() external payable{
}
/**
* @dev Transfers `tokens` amount of tokens to address `to`, and fires Transfer event. Transferring zero tokens is also allowed.
*/
function transfer(address to, uint256 tokens) external notPaused validAddress(to) noReentrancy returns (bool success) {
}
/**
* @dev Special type of Transfer that makes it possible to give permission to another address for spending tokens on your behalf.
* It sends `tokens` from address `from` to address `to`. The `transferFrom` method is used for a withdraw work-flow, allowing
* contracts to send tokens on your behalf, for example to deposit to a contract address and/or to charge fees in sub-currencies.
* The function call fails unless the `from` account has deliberately authorized the sender of the message via `approve` function.
*/
function transferFrom(address from, address to, uint256 tokens) external notPaused validAddress(to) noReentrancy returns (bool success) {
}
/**
* @dev It approves another address to spend tokens on your behalf. It allows `spender` to withdraw from your account, multiple times,
* up to the `tokens` amount. If this function is called again, it overwrites the current allowance with `tokens`.
*/
function approve(address spender, uint256 tokens) external notPaused validAddress(spender) noReentrancy returns (bool success) {
}
/**
* @dev Implements another way of approving tokens by increasing current approval. It is not defined in the standard.
* https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol
*/
function increaseAllowance(address spender, uint256 addedTokens) external notPaused validAddress(spender) noReentrancy returns (bool success) {
}
/**
* @dev Implements another way of approving tokens by decreasing current approval. It is not defined in the standard.
* https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol
*/
function decreaseAllowance(address spender, uint256 subtractedTokens) external notPaused validAddress(spender) noReentrancy returns (bool success) {
}
/**
* @dev Supports selling tokens to the contract. It uses msg.sender.call.value() mrthod to be compatible with EIP-1884.
* In addition to CEI, Mutex (noReentrancy modifier is also used to mitigate cross-function re-entrancy attack (along with same-function re-entrancy).
*/
function sell(uint256 tokens) external notPaused noReentrancy returns(bool success)
{
}
/**
* @dev Supports buying token by transferring Ether
*/
function buy() external payable notPaused noReentrancy returns(bool success){
require(msg.sender != owner, "Called by the Owner"); /// The owner cannot be seller/buyer
uint256 _tokens = msg.value.mul(exchangeRate); /// Calculates token equivalents
require(<FILL_ME>) /// Checks owner's balance
balances[msg.sender] = balances[msg.sender].add(_tokens); /// Increases token balance of buyer
balances[owner] = balances[owner].sub(_tokens); /// Decreases token balance of owner
//contractBalance = contractBalance.add(msg.value); /// Adjustes contract balance
emit Buy(msg.sender, msg.value, owner, _tokens); /// Logs Buy event
return true;
}
/**
* @dev Withdraw Ether from the contract and send it to the address that is specified by the owner. It can be called only by the owner.
*/
function withdraw(uint256 amount) external onlyOwner returns(bool success){
}
/**
* @dev Returns balance of the Contract
*
function getContractBalance() public view onlyOwner returns(uint256, uint256){
return (address(this).balance, contractBalance);
}
/**
* @dev Checks for unexpected received Ether (forced to the contract without using payable functions)
*
function unexpectedEther() public view onlyOwner returns(bool){
return (contractBalance != address(this).balance);
}
*/
/**
/* @dev Creates new tokens and assigns them to the owner, increases the total supply as well.
*/
function mint(uint256 newTokens) external onlyOwner {
}
/**
* @dev Burns tokens from the owner, decreases the total supply as well.
*/
function burn(uint256 tokens) external onlyOwner {
}
/**
* @dev Sets new exchange rate. It can be called only by the owner.
*/
function setExchangeRate(uint256 newRate) external onlyOwner returns(bool success)
{
}
/**
* @dev Changes owner of the contract
*/
function changeOwner(address payable newOwner) external onlyOwner validAddress(newOwner) {
}
/**
* @dev Pause the contract as result of self-checks (off-chain computations).
*/
function pause() external onlyOwner {
}
/**
* @dev Unpause the contract after self-checks.
*/
function unpause() external onlyOwner {
}
/**
* @dev Returns the total token supply.
*/
function totalSupply() external view returns (uint256 tokens) {
}
/**
* @dev Returns the account balance of another account with address `tokenHolder`.
*/
function balanceOf(address tokenHolder) external view returns (uint256 tokens) {
}
/**
* @dev Returns the amount of tokens approved by the owner that can be transferred to the spender's account.
*/
function allowance(address tokenHolder, address spender) external view notPaused returns (uint256 tokens) {
}
/**
* @dev Returns the amount of transferred tokens by spender's account.
*/
function transfers(address tokenHolder, address spender) external view notPaused returns (uint256 tokens) {
}
/**
* @dev Checks whether the caller is the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Checks validity of the address.
*/
modifier validAddress(address addr){
}
/**
* @author https://solidity.readthedocs.io/en/latest/contracts.html#function-modifiers
* @dev Mutex modifier to mitigate Re-entrancy Attack. Operation will succeed if and only if the locking thread is the one that already holds the lock.
*/
modifier noReentrancy()
{
}
/**
* @dev Modifier to support Fail-Safe Mode. In case, it disables most of the toekn features, hands off control to the owner.
*/
modifier notPaused()
{
}
/// Events
event Buy(address indexed _buyer, uint256 _wei, address indexed _owner, uint256 _tokens);
event Sell(address indexed _seller, uint256 _tokens, address indexed _contract, uint256 _wei, address indexed _owner);
event Received(address indexed _sender, uint256 _wei);
event Withdrawal(address indexed _by, address indexed _contract, uint256 _wei);
event Change(uint256 _current, uint256 _new);
event ChangeOwner(address indexed _current, address indexed _new);
event Pause(address indexed _owner, bool _state);
event Mint(address indexed _owner, uint256 _tokens);
event Burn(address indexed _owner, uint256 _tokens);
}
| balances[owner]>=_tokens,"Not enough tokens" | 388,459 | balances[owner]>=_tokens |
"WRONG_FROM" | pragma solidity ^0.8.0;
abstract contract ERC721M is ERC721 {
/* -------------------------------------------------------------------------- */
/* ERC721M STORAGE */
/* -------------------------------------------------------------------------- */
/// @dev The index is the token ID counter and points to its owner.
address[] internal _owners;
/* -------------------------------------------------------------------------- */
/* CONSTRUCTOR */
/* -------------------------------------------------------------------------- */
constructor(string memory name_, string memory symbol_) ERC721(name_, symbol_) {
}
/* -------------------------------------------------------------------------- */
/* ENUMERABLE LOGIC */
/* -------------------------------------------------------------------------- */
/// @inheritdoc ERC721
function totalSupply() public view override returns (uint256) {
}
/// @dev O(totalSupply), it is discouraged to call this function from other contracts
/// as it can become very expensive, especially with higher total collection sizes.
/// @inheritdoc ERC721
function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
}
/// @inheritdoc ERC721
function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
}
/* -------------------------------------------------------------------------- */
/* ERC721 LOGIC */
/* -------------------------------------------------------------------------- */
/// @dev O(totalSupply), it is discouraged to call this function from other contracts
/// as it can become very expensive, especially with higher total collection sizes.
/// @inheritdoc ERC721
function balanceOf(address owner) public view virtual override returns (uint256 balance) {
}
/// @dev O(MAX_TX), gradually moves to O(1) as more tokens get transferred and
/// the owners are explicitly set.
/// @inheritdoc ERC721
function ownerOf(uint256 id) public view virtual override returns (address owner) {
}
/* -------------------------------------------------------------------------- */
/* INTERNAL LOGIC */
/* -------------------------------------------------------------------------- */
/// @inheritdoc ERC721
function _mint(address to, uint256 amount) internal virtual override {
}
/// @inheritdoc ERC721
function _exists(uint256 id) internal view virtual override returns (bool) {
}
/// @inheritdoc ERC721
function _transfer(
address from,
address to,
uint256 id
) internal virtual override {
require(<FILL_ME>)
require(to != address(0), "INVALID_RECIPIENT");
require(msg.sender == from || getApproved(id) == msg.sender || isApprovedForAll(from, msg.sender), "NOT_AUTHORIZED");
delete _tokenApprovals[id];
_owners[id] = to;
unchecked {
uint256 prevId = id - 1;
if (_owners[prevId] == address(0)) {
_owners[prevId] = from;
}
}
emit Transfer(from, to, id);
}
}
| ownerOf(id)==from,"WRONG_FROM" | 388,497 | ownerOf(id)==from |
"Current allowance value does not match." | pragma solidity 0.4.24;
interface ERC20 {
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
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);
function totalSupply() external view returns (uint256);
function balanceOf(address _who) external view returns (uint256);
function allowance(address _owner, address _spender) external view returns (uint256);
}
/**
* @title ERC223Basic additions to ERC20Basic
* @dev see also: https://github.com/ethereum/EIPs/issues/223
*
*/
contract ERC223 is ERC20 {
event Transfer(address indexed _from, address indexed _to, uint256 _value, bytes indexed _data);
function transfer(address _to, uint256 _value, bytes _data) public returns (bool success);
function contractFallback(address _to, uint _value, bytes _data) internal returns (bool success);
function isContract(address _addr) internal view returns (bool);
}
/**
* @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 private owner_;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @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() {
}
/**
* @dev Allows the current owner to relinquish control of the contract.
* @notice Renouncing to ownership will leave the contract without an owner.
* It will not be possible to call the functions with the `onlyOwner`
* modifier anymore.
*/
function renounceOwnership() public onlyOwner {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function transferOwnership(address _newOwner) public onlyOwner {
}
/**
* @dev Transfers control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function _transferOwnership(address _newOwner) internal {
}
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 _a, uint256 _b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 _a, uint256 _b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
}
}
contract Generic223Receiver {
uint public sentValue;
address public tokenAddr;
address public tokenSender;
bool public calledFoo;
bytes public tokenData;
bytes4 public tokenSig;
Tkn private tkn;
bool private __isTokenFallback;
struct Tkn {
address addr;
address sender;
uint256 value;
bytes data;
bytes4 sig;
}
modifier tokenPayable {
}
function tokenFallback(address _sender, uint _value, bytes _data) public returns (bool success) {
}
function foo() public tokenPayable {
}
function getSig(bytes _data) private pure returns (bytes4 sig) {
}
function saveTokenValues() private {
}
}
contract InvoxFinanceToken is ERC223, Ownable {
using SafeMath for uint256;
string private name_ = "Invox Finance Token";
string private symbol_ = "INVOX";
uint256 private decimals_ = 18;
uint256 public totalSupply = 464000000 * (10 ** decimals_);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
mapping (address => uint256) internal balances_;
mapping (address => mapping (address => uint256)) private allowed_;
constructor() public {
}
function() public payable { }
function name() public view returns(string) {
}
function symbol() public view returns(string) {
}
function decimals() public view returns(uint256) {
}
function totalSupply() public view returns (uint256) {
}
function safeTransfer(address _to, uint256 _value) public {
}
function safeTransferFrom(address _from, address _to, uint256 _value) public {
}
function safeApprove( address _spender, uint256 _currentValue, uint256 _value ) public {
require(<FILL_ME>)
approve(_spender, _value);
}
// ERC20
function balanceOf(address _owner) public view returns (uint256) {
}
function allowance(address _owner, address _spender) public view returns (uint256) {
}
function transfer(address _to, uint256 _value) public returns (bool) {
}
function approve(address _spender, uint256 _value) public returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
function increaseApproval(address _spender, uint256 _addedValue) public returns (bool) {
}
function decreaseApproval(address _spender, uint256 _subtractedValue) public returns (bool) {
}
// ERC223
function transfer(address _to, uint _value, bytes _data) public returns (bool success) {
}
function contractFallback(address _to, uint _value, bytes _data) internal returns (bool success) {
}
// Assemble the given address bytecode. If bytecode exists then the _addr is a contract.
function isContract(address _addr) internal view returns (bool) {
}
}
| allowed_[msg.sender][_spender]==_currentValue,"Current allowance value does not match." | 388,522 | allowed_[msg.sender][_spender]==_currentValue |
"All tokens have been minted" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
// npx hardhat verify --network mainnet DEPLOYED_CONTRACT_ADDRESS "Constructor argument 1"
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract WTFISTHIS is ERC721Enumerable, Ownable {
using Strings for uint256;
uint256 public constant MAX_ARTS = 88;
uint256 public price = 0.05 ether;
uint256 public constant MAX_PER_MINT = 4;
string public baseTokenURI;
mapping(address => uint256) private _totalClaimed;
constructor(string memory baseURI) ERC721("EVERYBODY LOTTERY 1", "E LOTTERY 1")
{
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function setPrice(uint256 p) external onlyOwner {
}
function airdrop(address receiver, uint256 amountOfArts)
external
onlyOwner
{
}
function mint(uint256 amountOfArts) external payable {
require(<FILL_ME>)
require(amountOfArts > 0, "at least 1");
require(
amountOfArts <= MAX_PER_MINT,
"exceeds max"
);
require(
totalSupply() + amountOfArts <= MAX_ARTS,
"exceed supply"
);
require(
_totalClaimed[msg.sender] + amountOfArts <= MAX_PER_MINT,
"exceed per address"
);
require(price * amountOfArts == msg.value, "wrong ETH amount");
uint256 _nextTokenId = totalSupply();
for (uint256 i = 0; i < amountOfArts; i++) {
_safeMint(msg.sender, _nextTokenId++);
}
_totalClaimed[msg.sender] += amountOfArts;
}
function withdrawAll() public onlyOwner {
}
function _widthdraw(address _address, uint256 _amount) private {
}
}
| totalSupply()<MAX_ARTS,"All tokens have been minted" | 388,550 | totalSupply()<MAX_ARTS |
"exceed supply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
// npx hardhat verify --network mainnet DEPLOYED_CONTRACT_ADDRESS "Constructor argument 1"
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract WTFISTHIS is ERC721Enumerable, Ownable {
using Strings for uint256;
uint256 public constant MAX_ARTS = 88;
uint256 public price = 0.05 ether;
uint256 public constant MAX_PER_MINT = 4;
string public baseTokenURI;
mapping(address => uint256) private _totalClaimed;
constructor(string memory baseURI) ERC721("EVERYBODY LOTTERY 1", "E LOTTERY 1")
{
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function setPrice(uint256 p) external onlyOwner {
}
function airdrop(address receiver, uint256 amountOfArts)
external
onlyOwner
{
}
function mint(uint256 amountOfArts) external payable {
require(totalSupply() < MAX_ARTS, "All tokens have been minted");
require(amountOfArts > 0, "at least 1");
require(
amountOfArts <= MAX_PER_MINT,
"exceeds max"
);
require(<FILL_ME>)
require(
_totalClaimed[msg.sender] + amountOfArts <= MAX_PER_MINT,
"exceed per address"
);
require(price * amountOfArts == msg.value, "wrong ETH amount");
uint256 _nextTokenId = totalSupply();
for (uint256 i = 0; i < amountOfArts; i++) {
_safeMint(msg.sender, _nextTokenId++);
}
_totalClaimed[msg.sender] += amountOfArts;
}
function withdrawAll() public onlyOwner {
}
function _widthdraw(address _address, uint256 _amount) private {
}
}
| totalSupply()+amountOfArts<=MAX_ARTS,"exceed supply" | 388,550 | totalSupply()+amountOfArts<=MAX_ARTS |
"exceed per address" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
// npx hardhat verify --network mainnet DEPLOYED_CONTRACT_ADDRESS "Constructor argument 1"
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract WTFISTHIS is ERC721Enumerable, Ownable {
using Strings for uint256;
uint256 public constant MAX_ARTS = 88;
uint256 public price = 0.05 ether;
uint256 public constant MAX_PER_MINT = 4;
string public baseTokenURI;
mapping(address => uint256) private _totalClaimed;
constructor(string memory baseURI) ERC721("EVERYBODY LOTTERY 1", "E LOTTERY 1")
{
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function setPrice(uint256 p) external onlyOwner {
}
function airdrop(address receiver, uint256 amountOfArts)
external
onlyOwner
{
}
function mint(uint256 amountOfArts) external payable {
require(totalSupply() < MAX_ARTS, "All tokens have been minted");
require(amountOfArts > 0, "at least 1");
require(
amountOfArts <= MAX_PER_MINT,
"exceeds max"
);
require(
totalSupply() + amountOfArts <= MAX_ARTS,
"exceed supply"
);
require(<FILL_ME>)
require(price * amountOfArts == msg.value, "wrong ETH amount");
uint256 _nextTokenId = totalSupply();
for (uint256 i = 0; i < amountOfArts; i++) {
_safeMint(msg.sender, _nextTokenId++);
}
_totalClaimed[msg.sender] += amountOfArts;
}
function withdrawAll() public onlyOwner {
}
function _widthdraw(address _address, uint256 _amount) private {
}
}
| _totalClaimed[msg.sender]+amountOfArts<=MAX_PER_MINT,"exceed per address" | 388,550 | _totalClaimed[msg.sender]+amountOfArts<=MAX_PER_MINT |
"wrong ETH amount" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
// npx hardhat verify --network mainnet DEPLOYED_CONTRACT_ADDRESS "Constructor argument 1"
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract WTFISTHIS is ERC721Enumerable, Ownable {
using Strings for uint256;
uint256 public constant MAX_ARTS = 88;
uint256 public price = 0.05 ether;
uint256 public constant MAX_PER_MINT = 4;
string public baseTokenURI;
mapping(address => uint256) private _totalClaimed;
constructor(string memory baseURI) ERC721("EVERYBODY LOTTERY 1", "E LOTTERY 1")
{
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function setPrice(uint256 p) external onlyOwner {
}
function airdrop(address receiver, uint256 amountOfArts)
external
onlyOwner
{
}
function mint(uint256 amountOfArts) external payable {
require(totalSupply() < MAX_ARTS, "All tokens have been minted");
require(amountOfArts > 0, "at least 1");
require(
amountOfArts <= MAX_PER_MINT,
"exceeds max"
);
require(
totalSupply() + amountOfArts <= MAX_ARTS,
"exceed supply"
);
require(
_totalClaimed[msg.sender] + amountOfArts <= MAX_PER_MINT,
"exceed per address"
);
require(<FILL_ME>)
uint256 _nextTokenId = totalSupply();
for (uint256 i = 0; i < amountOfArts; i++) {
_safeMint(msg.sender, _nextTokenId++);
}
_totalClaimed[msg.sender] += amountOfArts;
}
function withdrawAll() public onlyOwner {
}
function _widthdraw(address _address, uint256 _amount) private {
}
}
| price*amountOfArts==msg.value,"wrong ETH amount" | 388,550 | price*amountOfArts==msg.value |
"Exceeds maximum supply of Optical Illusion" | pragma solidity ^0.8.0;
/// @author
contract OpticalIllusion is ERC721Enumerable, Ownable {
using Counters for Counters.Counter;
Counters.Counter private _tokenId;
uint256 public maxOPI = 1111;
uint256 public price = 150000000000000000; //0.15 Ether
string baseTokenURI;
bool public isSaleOpen = false;
event OpticalIllusionMinted(uint256 totalMinted);
constructor(string memory baseURI) ERC721("Optical Illusion", "OPI") {
}
//Get token Ids of all tokens owned by _owner
function walletOfOwner(address _owner)
external
view
returns (uint256[] memory)
{
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function changePrice(uint256 _newPrice) external onlyOwner {
}
function changeMaxOPI(uint256 _maxOPI) external onlyOwner {
}
//Close sale if open, open sale if closed
function toggleSale() external onlyOwner {
}
function withdrawETH() external onlyOwner {
}
//mint OpticalIllusion
function mintOpticalIllusion(address _to, uint256 _count) external payable {
require(<FILL_ME>)
if (msg.sender != owner()) {
require(isSaleOpen, "Sale is not open yet");
require(
_count > 0 && _count <= 5,
"Minimum 1 & Maximum 5 Optical Illusions can be minted per transaction"
);
require(
msg.value >= price * _count,
"Ether sent with this transaction is not correct"
);
}
for (uint256 i = 0; i < _count; i++) {
_mint(_to);
}
}
function _mint(address _to) private {
}
function _baseURI() internal view virtual override returns (string memory) {
}
}
| totalSupply()+_count<=maxOPI,"Exceeds maximum supply of Optical Illusion" | 388,561 | totalSupply()+_count<=maxOPI |
"sender not own deadhead token" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
abstract contract DeadTickets {
function ownerOf(uint tokenId) public virtual view returns (address);
function balanceOf(address owner) external virtual view returns (uint balance);
function burn(uint tokenId) public virtual;
}
contract DHVessel is ERC721, ERC721Enumerable, ERC721Burnable, EIP712, Ownable {
using Counters for Counters.Counter;
using Strings for uint256;
Counters.Counter private _tokenIdCounter;
string baseURI;
IERC721 _deadHeads = IERC721(0x6fC355D4e0EE44b292E50878F49798ff755A5bbC);
DeadTickets _deadTickets = DeadTickets(0x78f28143902e9346526933e3C2EdA2662d1cD1F7);
address _signerAddress;
mapping(uint => uint) public tokenToTokenType;
event Evolve(uint dhTokenId, uint ticketId, uint newTokenId, address owner);
constructor() ERC721("DeadHeads Vessels", "DeadVessels") EIP712("VESSEL", "1.0.0") {}
function safeMint(address to) internal returns (uint) {
}
function onERC721Received(address operator, address, uint256, bytes calldata) external returns(bytes4) {
}
function evolve(uint dhTokenId, uint ticketId, uint tokenType, bytes calldata signature) public {
require(<FILL_ME>)
require(_deadTickets.ownerOf(ticketId) == msg.sender, "sender not own ticket token");
require(_signerAddress == recoverAddress(msg.sender, tokenType, dhTokenId, ticketId, signature), "user cannot mint");
_deadHeads.safeTransferFrom(msg.sender, address(this), dhTokenId);
_deadTickets.burn(ticketId);
uint newTokenId = safeMint(msg.sender);
tokenToTokenType[newTokenId] = tokenType;
emit Evolve(dhTokenId, ticketId, newTokenId, msg.sender);
}
function _hash(address account, uint tokenType, uint dhTokenId, uint ticketId) internal view returns (bytes32) {
}
function recoverAddress(address account, uint tokenType, uint dhTokenId, uint ticketId, bytes calldata signature) public view returns(address) {
}
function setSignerAddress(address signerAddress) external onlyOwner {
}
function setBaseURI(string memory baseURI_) public onlyOwner {
}
function tokenURI(uint256 tokenId) public view override returns (string memory) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721, ERC721Enumerable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
function withdrawDH(uint tokenId, address receiver) external onlyOwner {
}
}
| _deadHeads.ownerOf(dhTokenId)==msg.sender,"sender not own deadhead token" | 388,598 | _deadHeads.ownerOf(dhTokenId)==msg.sender |
"sender not own ticket token" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
abstract contract DeadTickets {
function ownerOf(uint tokenId) public virtual view returns (address);
function balanceOf(address owner) external virtual view returns (uint balance);
function burn(uint tokenId) public virtual;
}
contract DHVessel is ERC721, ERC721Enumerable, ERC721Burnable, EIP712, Ownable {
using Counters for Counters.Counter;
using Strings for uint256;
Counters.Counter private _tokenIdCounter;
string baseURI;
IERC721 _deadHeads = IERC721(0x6fC355D4e0EE44b292E50878F49798ff755A5bbC);
DeadTickets _deadTickets = DeadTickets(0x78f28143902e9346526933e3C2EdA2662d1cD1F7);
address _signerAddress;
mapping(uint => uint) public tokenToTokenType;
event Evolve(uint dhTokenId, uint ticketId, uint newTokenId, address owner);
constructor() ERC721("DeadHeads Vessels", "DeadVessels") EIP712("VESSEL", "1.0.0") {}
function safeMint(address to) internal returns (uint) {
}
function onERC721Received(address operator, address, uint256, bytes calldata) external returns(bytes4) {
}
function evolve(uint dhTokenId, uint ticketId, uint tokenType, bytes calldata signature) public {
require(_deadHeads.ownerOf(dhTokenId) == msg.sender, "sender not own deadhead token");
require(<FILL_ME>)
require(_signerAddress == recoverAddress(msg.sender, tokenType, dhTokenId, ticketId, signature), "user cannot mint");
_deadHeads.safeTransferFrom(msg.sender, address(this), dhTokenId);
_deadTickets.burn(ticketId);
uint newTokenId = safeMint(msg.sender);
tokenToTokenType[newTokenId] = tokenType;
emit Evolve(dhTokenId, ticketId, newTokenId, msg.sender);
}
function _hash(address account, uint tokenType, uint dhTokenId, uint ticketId) internal view returns (bytes32) {
}
function recoverAddress(address account, uint tokenType, uint dhTokenId, uint ticketId, bytes calldata signature) public view returns(address) {
}
function setSignerAddress(address signerAddress) external onlyOwner {
}
function setBaseURI(string memory baseURI_) public onlyOwner {
}
function tokenURI(uint256 tokenId) public view override returns (string memory) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721, ERC721Enumerable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
function withdrawDH(uint tokenId, address receiver) external onlyOwner {
}
}
| _deadTickets.ownerOf(ticketId)==msg.sender,"sender not own ticket token" | 388,598 | _deadTickets.ownerOf(ticketId)==msg.sender |
null | pragma solidity ^0.4.23;
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* See https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
function totalSupply() public view returns (uint256);
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to relinquish control of the contract.
* @notice Renouncing to ownership will leave the contract without an owner.
* It will not be possible to call the functions with the `onlyOwner`
* modifier anymore.
*/
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 BBODServiceRegistry is Ownable {
//1. Manager
//2. CustodyStorage
mapping(uint => address) public registry;
constructor(address _owner) {
}
function setServiceRegistryEntry (uint key, address entry) external onlyOwner {
}
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender)
public view returns (uint256);
function transferFrom(address from, address to, uint256 value)
public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
}
contract ManagerInterface {
function createCustody(address) external {}
function isExchangeAlive() public pure returns (bool) {}
function isDailySettlementOnGoing() public pure returns (bool) {}
}
contract Custody {
using SafeMath for uint;
BBODServiceRegistry public bbodServiceRegistry;
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor(address _serviceRegistryAddress, address _owner) public {
}
function() public payable {}
modifier liveExchangeOrOwner(address _recipient) {
}
function withdraw(uint _amount, address _recipient) external liveExchangeOrOwner(_recipient) {
}
function transferToken(address _erc20Address, address _recipient, uint _amount)
external liveExchangeOrOwner(_recipient) {
}
function transferOwnership(address newOwner) public {
}
}
contract Insurance is Custody {
constructor(address _serviceRegistryAddress, address _owner)
Custody(_serviceRegistryAddress, _owner) public {}
function useInsurance (uint _amount) external {
var manager = ManagerInterface(bbodServiceRegistry.registry(1));
//Only usable for manager during settlement
require(<FILL_ME>)
address(manager).transfer(_amount);
}
}
| manager.isDailySettlementOnGoing()&&msg.sender==address(manager) | 388,692 | manager.isDailySettlementOnGoing()&&msg.sender==address(manager) |
"You can't stake this monster." | // contracts/MonsterDough.sol
// SPDX-License-Identifier: MIT
// Forked from Cheeth. <3
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";
contract MonsterDough is ERC20Burnable, Ownable {
using SafeMath for uint256;
uint256 public MAX_WALLET_STAKED = 10;
uint256 public EMISSIONS_RATE = 11574070000000;
uint256 public CLAIM_END_TIME = 1643673600;
address nullAddress = 0x0000000000000000000000000000000000000000;
address public monstersAddress;
mapping(uint256 => uint256) internal tokenIdToTimeStamp;
mapping(uint256 => address) internal tokenIdToStaker;
mapping(address => uint256[]) internal stakerToTokenIds;
constructor() ERC20("MonsterDough", "OCMD") {}
function setMonstersAddress(address a) public onlyOwner {
}
function getTokensStaked(address staker) public view returns (uint256[] memory) {
}
function removeTokenIdFromStaker(address staker, uint256 tokenId) internal {
}
function stakeByIds(uint256[] memory tokenIds) public {
require(
stakerToTokenIds[msg.sender].length + tokenIds.length <=
MAX_WALLET_STAKED,
"You can not stake more than 10 monsters."
);
for (uint256 i = 0; i < tokenIds.length; i++) {
require(<FILL_ME>)
IERC721(monstersAddress).transferFrom(msg.sender, address(this), tokenIds[i]);
stakerToTokenIds[msg.sender].push(tokenIds[i]);
tokenIdToTimeStamp[tokenIds[i]] = block.timestamp;
tokenIdToStaker[tokenIds[i]] = msg.sender;
}
}
function unstakeAll() public {
}
function unstakeByIds(uint256[] memory tokenIds) public {
}
function claimByTokenId(uint256 tokenId) public {
}
function claimAll() public {
}
function getAllRewards(address staker) public view returns (uint256) {
}
function getRewardsByTokenId(uint256 tokenId) public view returns (uint256) {
}
function getStaker(uint256 tokenId) public view returns (address) {
}
}
| IERC721(monstersAddress).ownerOf(tokenIds[i])==msg.sender&&tokenIdToStaker[tokenIds[i]]==nullAddress,"You can't stake this monster." | 388,695 | IERC721(monstersAddress).ownerOf(tokenIds[i])==msg.sender&&tokenIdToStaker[tokenIds[i]]==nullAddress |
"Not whitelisted." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract EIP712Whitelisting is Ownable {
using ECDSA for bytes32;
// The key used to sign whitelist signatures.
// We will check to ensure that the key that signed the signature
// is this one that we expect.
address whitelistSigningKey = address(0);
// Domain Separator is the EIP-712 defined structure that defines what contract
// and chain these signatures can be used for. This ensures people can't take
// a signature used to mint on one contract and use it for another, or a signature
// from testnet to replay on mainnet.
// It has to be created in the constructor so we can dynamically grab the chainId.
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md#definition-of-domainseparator
bytes32 public DOMAIN_SEPARATOR;
// The typehash for the data type specified in the structured data
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md#rationale-for-typehash
// This should match whats in the client side whitelist signing code
bytes32 public constant MINTER_TYPEHASH =
keccak256("Minter(address wallet)");
constructor() {
}
function setWhitelistSigningAddress(address newSigningKey)
public
onlyOwner
{
}
modifier requiresWhitelist(bytes calldata signature) {
require(whitelistSigningKey != address(0), "whitelist not enabled.");
require(<FILL_ME>)
_;
}
function isEIP712WhiteListed(bytes calldata signature)
public
view
returns (bool)
{
}
function getEIP712RecoverAddress(bytes calldata signature)
internal
view
returns (address)
{
}
}
| getEIP712RecoverAddress(signature)==whitelistSigningKey,"Not whitelisted." | 388,700 | getEIP712RecoverAddress(signature)==whitelistSigningKey |
"invalid message" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import "./AuthorizedV2.sol";
import "./NFTCollectionV2.sol";
contract FanEpackCollection is AuthorizedV2, NFTCollectionV2 {
/** Fields */
bytes32 private immutable _claimSeparator;
mapping(address => uint256) private _claimed;
constructor(address authority_, string memory baseURI_) {
}
/** @dev IERC721Metadata Views */
/**
* @dev Returns the token collection name.
*/
function name() external pure override returns (string memory) {
}
/**
* @dev Returns the token collection symbol.
*/
function symbol() external pure override returns (string memory) {
}
/** @dev Admin */
function changeAuthority(address newAuthority) external onlyAdmin {
}
/** @dev Claim */
function claimed(address wallet) external view returns (uint256) {
}
function claim(
uint256 quantity,
uint256 earned,
uint8 v,
bytes32 r,
bytes32 s
) external {
require(<FILL_ME>)
require(quantity + _claimed[msg.sender] <= earned, "more than earned");
for (uint256 i = 1; i <= quantity; i++) {
_owners[_totalSupply + i] = msg.sender;
emit Transfer(address(0), msg.sender, _totalSupply + i);
}
_balances[msg.sender] += quantity;
_claimed[msg.sender] += quantity;
_totalSupply += quantity;
}
}
| verify(keccak256(abi.encode(_claimSeparator,msg.sender,earned)),v,r,s),"invalid message" | 388,950 | verify(keccak256(abi.encode(_claimSeparator,msg.sender,earned)),v,r,s) |
"more than earned" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import "./AuthorizedV2.sol";
import "./NFTCollectionV2.sol";
contract FanEpackCollection is AuthorizedV2, NFTCollectionV2 {
/** Fields */
bytes32 private immutable _claimSeparator;
mapping(address => uint256) private _claimed;
constructor(address authority_, string memory baseURI_) {
}
/** @dev IERC721Metadata Views */
/**
* @dev Returns the token collection name.
*/
function name() external pure override returns (string memory) {
}
/**
* @dev Returns the token collection symbol.
*/
function symbol() external pure override returns (string memory) {
}
/** @dev Admin */
function changeAuthority(address newAuthority) external onlyAdmin {
}
/** @dev Claim */
function claimed(address wallet) external view returns (uint256) {
}
function claim(
uint256 quantity,
uint256 earned,
uint8 v,
bytes32 r,
bytes32 s
) external {
require(verify(keccak256(abi.encode(_claimSeparator, msg.sender, earned)), v, r, s), "invalid message");
require(<FILL_ME>)
for (uint256 i = 1; i <= quantity; i++) {
_owners[_totalSupply + i] = msg.sender;
emit Transfer(address(0), msg.sender, _totalSupply + i);
}
_balances[msg.sender] += quantity;
_claimed[msg.sender] += quantity;
_totalSupply += quantity;
}
}
| quantity+_claimed[msg.sender]<=earned,"more than earned" | 388,950 | quantity+_claimed[msg.sender]<=earned |
null | pragma solidity ^0.4.18;
// https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/math/SafeMath.sol
library SafeMath {
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
// https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/ownership/Ownable.sol
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
function Ownable() public {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) public onlyOwner {
}
}
// https://github.com/ethereum/EIPs/issues/179
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
// https://github.com/ethereum/EIPs/issues/20
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
// https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/token/DetailedERC20.sol
contract DetailedERC20 is ERC20 {
string public name;
string public symbol;
uint8 public decimals;
function DetailedERC20(string _name, string _symbol, uint8 _decimals) public {
}
}
// RoyalForkToken has the following properties:
// - users create an "account", which consists of a unique username, and token count.
// - tokens are minted at the discretion of "owner" and "minter".
// - tokens can only be transferred to existing token holders.
// - each token holder is entitled to a share of all donations sent to contract
// on a per-month basis and regardless of total token holdings; a dividend.
// (eg: 10 eth is sent to the contract in January. There are 100 token
// holders on Jan 31. At any time in February, each token holder can
// withdraw .1 eth for their January share).
// - dividends not collected for a given month become donations for the next month.
contract RoyalForkToken is Ownable, DetailedERC20("RoyalForkToken", "RFT", 0) {
using SafeMath for uint256;
struct Hodler {
bytes16 username;
uint64 balance;
uint16 canWithdrawPeriod;
}
mapping(address => Hodler) public hodlers;
mapping(bytes16 => address) public usernames;
uint256 public epoch = now;
uint16 public currentPeriod = 1;
uint64 public numHodlers;
uint64 public prevHodlers;
uint256 public prevBalance;
address minter;
mapping(address => mapping (address => uint256)) internal allowed;
event Mint(address indexed to, uint256 amount);
event PeriodEnd(uint16 indexed period, uint256 amount, uint64 hodlers);
event Donation(address indexed from, uint256 amount);
event Withdrawal(address indexed to, uint16 indexed period, uint256 amount);
modifier onlyMinter() {
}
// === Private Functions
// https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/ECRecovery.sol
function recover(bytes32 hash, bytes sig) internal pure returns (address) {
}
// Ensures that username isn't taken, and account doesn't already exist for
// user's address.
function newHodler(address user, bytes16 username, uint64 endowment) private {
require(<FILL_ME>)
require(hodlers[user].canWithdrawPeriod == 0);
hodlers[user].canWithdrawPeriod = currentPeriod;
hodlers[user].balance = endowment;
hodlers[user].username = username;
usernames[username] = user;
numHodlers += 1;
totalSupply += endowment;
Mint(user, endowment);
}
// === Owner Functions
function setMinter(address newMinter) public onlyOwner {
}
// Owner should call this on 1st of every month.
function newPeriod() public onlyOwner {
}
// === Minter Functions
function createHodler(address to, bytes16 username, uint64 amount) public onlyMinter {
}
// Send tokens to existing account.
function mint(address user, uint64 amount) public onlyMinter {
}
// === User Functions
// Owner will sign hash(amount, address), and address owner uses this
// signature to create their account.
function create(bytes16 username, uint64 endowment, bytes sig) public {
}
// User can withdraw their share of donations from the previous month.
function withdraw() public {
}
// ERC20 Functions
function balanceOf(address _owner) public view returns (uint256 balance) {
}
function transfer(address _to, uint256 _value) public returns (bool) {
}
function allowance(address _owner, address _spender) public view returns (uint256) {
}
function approve(address _spender, uint256 _value) public returns (bool) {
}
function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
// === Constructor/Default
function RoyalForkToken() public {
}
function() payable public {
}
}
| usernames[username]==address(0) | 388,957 | usernames[username]==address(0) |
null | pragma solidity ^0.4.18;
// https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/math/SafeMath.sol
library SafeMath {
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
// https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/ownership/Ownable.sol
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
function Ownable() public {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) public onlyOwner {
}
}
// https://github.com/ethereum/EIPs/issues/179
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
// https://github.com/ethereum/EIPs/issues/20
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
// https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/token/DetailedERC20.sol
contract DetailedERC20 is ERC20 {
string public name;
string public symbol;
uint8 public decimals;
function DetailedERC20(string _name, string _symbol, uint8 _decimals) public {
}
}
// RoyalForkToken has the following properties:
// - users create an "account", which consists of a unique username, and token count.
// - tokens are minted at the discretion of "owner" and "minter".
// - tokens can only be transferred to existing token holders.
// - each token holder is entitled to a share of all donations sent to contract
// on a per-month basis and regardless of total token holdings; a dividend.
// (eg: 10 eth is sent to the contract in January. There are 100 token
// holders on Jan 31. At any time in February, each token holder can
// withdraw .1 eth for their January share).
// - dividends not collected for a given month become donations for the next month.
contract RoyalForkToken is Ownable, DetailedERC20("RoyalForkToken", "RFT", 0) {
using SafeMath for uint256;
struct Hodler {
bytes16 username;
uint64 balance;
uint16 canWithdrawPeriod;
}
mapping(address => Hodler) public hodlers;
mapping(bytes16 => address) public usernames;
uint256 public epoch = now;
uint16 public currentPeriod = 1;
uint64 public numHodlers;
uint64 public prevHodlers;
uint256 public prevBalance;
address minter;
mapping(address => mapping (address => uint256)) internal allowed;
event Mint(address indexed to, uint256 amount);
event PeriodEnd(uint16 indexed period, uint256 amount, uint64 hodlers);
event Donation(address indexed from, uint256 amount);
event Withdrawal(address indexed to, uint16 indexed period, uint256 amount);
modifier onlyMinter() {
}
// === Private Functions
// https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/ECRecovery.sol
function recover(bytes32 hash, bytes sig) internal pure returns (address) {
}
// Ensures that username isn't taken, and account doesn't already exist for
// user's address.
function newHodler(address user, bytes16 username, uint64 endowment) private {
require(usernames[username] == address(0));
require(<FILL_ME>)
hodlers[user].canWithdrawPeriod = currentPeriod;
hodlers[user].balance = endowment;
hodlers[user].username = username;
usernames[username] = user;
numHodlers += 1;
totalSupply += endowment;
Mint(user, endowment);
}
// === Owner Functions
function setMinter(address newMinter) public onlyOwner {
}
// Owner should call this on 1st of every month.
function newPeriod() public onlyOwner {
}
// === Minter Functions
function createHodler(address to, bytes16 username, uint64 amount) public onlyMinter {
}
// Send tokens to existing account.
function mint(address user, uint64 amount) public onlyMinter {
}
// === User Functions
// Owner will sign hash(amount, address), and address owner uses this
// signature to create their account.
function create(bytes16 username, uint64 endowment, bytes sig) public {
}
// User can withdraw their share of donations from the previous month.
function withdraw() public {
}
// ERC20 Functions
function balanceOf(address _owner) public view returns (uint256 balance) {
}
function transfer(address _to, uint256 _value) public returns (bool) {
}
function allowance(address _owner, address _spender) public view returns (uint256) {
}
function approve(address _spender, uint256 _value) public returns (bool) {
}
function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
// === Constructor/Default
function RoyalForkToken() public {
}
function() payable public {
}
}
| hodlers[user].canWithdrawPeriod==0 | 388,957 | hodlers[user].canWithdrawPeriod==0 |
null | pragma solidity ^0.4.18;
// https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/math/SafeMath.sol
library SafeMath {
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
// https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/ownership/Ownable.sol
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
function Ownable() public {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) public onlyOwner {
}
}
// https://github.com/ethereum/EIPs/issues/179
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
// https://github.com/ethereum/EIPs/issues/20
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
// https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/token/DetailedERC20.sol
contract DetailedERC20 is ERC20 {
string public name;
string public symbol;
uint8 public decimals;
function DetailedERC20(string _name, string _symbol, uint8 _decimals) public {
}
}
// RoyalForkToken has the following properties:
// - users create an "account", which consists of a unique username, and token count.
// - tokens are minted at the discretion of "owner" and "minter".
// - tokens can only be transferred to existing token holders.
// - each token holder is entitled to a share of all donations sent to contract
// on a per-month basis and regardless of total token holdings; a dividend.
// (eg: 10 eth is sent to the contract in January. There are 100 token
// holders on Jan 31. At any time in February, each token holder can
// withdraw .1 eth for their January share).
// - dividends not collected for a given month become donations for the next month.
contract RoyalForkToken is Ownable, DetailedERC20("RoyalForkToken", "RFT", 0) {
using SafeMath for uint256;
struct Hodler {
bytes16 username;
uint64 balance;
uint16 canWithdrawPeriod;
}
mapping(address => Hodler) public hodlers;
mapping(bytes16 => address) public usernames;
uint256 public epoch = now;
uint16 public currentPeriod = 1;
uint64 public numHodlers;
uint64 public prevHodlers;
uint256 public prevBalance;
address minter;
mapping(address => mapping (address => uint256)) internal allowed;
event Mint(address indexed to, uint256 amount);
event PeriodEnd(uint16 indexed period, uint256 amount, uint64 hodlers);
event Donation(address indexed from, uint256 amount);
event Withdrawal(address indexed to, uint16 indexed period, uint256 amount);
modifier onlyMinter() {
}
// === Private Functions
// https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/ECRecovery.sol
function recover(bytes32 hash, bytes sig) internal pure returns (address) {
}
// Ensures that username isn't taken, and account doesn't already exist for
// user's address.
function newHodler(address user, bytes16 username, uint64 endowment) private {
}
// === Owner Functions
function setMinter(address newMinter) public onlyOwner {
}
// Owner should call this on 1st of every month.
function newPeriod() public onlyOwner {
}
// === Minter Functions
function createHodler(address to, bytes16 username, uint64 amount) public onlyMinter {
}
// Send tokens to existing account.
function mint(address user, uint64 amount) public onlyMinter {
require(<FILL_ME>)
require(hodlers[user].balance + amount > hodlers[user].balance);
hodlers[user].balance += amount;
totalSupply += amount;
Mint(user, amount);
}
// === User Functions
// Owner will sign hash(amount, address), and address owner uses this
// signature to create their account.
function create(bytes16 username, uint64 endowment, bytes sig) public {
}
// User can withdraw their share of donations from the previous month.
function withdraw() public {
}
// ERC20 Functions
function balanceOf(address _owner) public view returns (uint256 balance) {
}
function transfer(address _to, uint256 _value) public returns (bool) {
}
function allowance(address _owner, address _spender) public view returns (uint256) {
}
function approve(address _spender, uint256 _value) public returns (bool) {
}
function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
// === Constructor/Default
function RoyalForkToken() public {
}
function() payable public {
}
}
| hodlers[user].canWithdrawPeriod!=0 | 388,957 | hodlers[user].canWithdrawPeriod!=0 |
null | pragma solidity ^0.4.18;
// https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/math/SafeMath.sol
library SafeMath {
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
// https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/ownership/Ownable.sol
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
function Ownable() public {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) public onlyOwner {
}
}
// https://github.com/ethereum/EIPs/issues/179
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
// https://github.com/ethereum/EIPs/issues/20
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
// https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/token/DetailedERC20.sol
contract DetailedERC20 is ERC20 {
string public name;
string public symbol;
uint8 public decimals;
function DetailedERC20(string _name, string _symbol, uint8 _decimals) public {
}
}
// RoyalForkToken has the following properties:
// - users create an "account", which consists of a unique username, and token count.
// - tokens are minted at the discretion of "owner" and "minter".
// - tokens can only be transferred to existing token holders.
// - each token holder is entitled to a share of all donations sent to contract
// on a per-month basis and regardless of total token holdings; a dividend.
// (eg: 10 eth is sent to the contract in January. There are 100 token
// holders on Jan 31. At any time in February, each token holder can
// withdraw .1 eth for their January share).
// - dividends not collected for a given month become donations for the next month.
contract RoyalForkToken is Ownable, DetailedERC20("RoyalForkToken", "RFT", 0) {
using SafeMath for uint256;
struct Hodler {
bytes16 username;
uint64 balance;
uint16 canWithdrawPeriod;
}
mapping(address => Hodler) public hodlers;
mapping(bytes16 => address) public usernames;
uint256 public epoch = now;
uint16 public currentPeriod = 1;
uint64 public numHodlers;
uint64 public prevHodlers;
uint256 public prevBalance;
address minter;
mapping(address => mapping (address => uint256)) internal allowed;
event Mint(address indexed to, uint256 amount);
event PeriodEnd(uint16 indexed period, uint256 amount, uint64 hodlers);
event Donation(address indexed from, uint256 amount);
event Withdrawal(address indexed to, uint16 indexed period, uint256 amount);
modifier onlyMinter() {
}
// === Private Functions
// https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/ECRecovery.sol
function recover(bytes32 hash, bytes sig) internal pure returns (address) {
}
// Ensures that username isn't taken, and account doesn't already exist for
// user's address.
function newHodler(address user, bytes16 username, uint64 endowment) private {
}
// === Owner Functions
function setMinter(address newMinter) public onlyOwner {
}
// Owner should call this on 1st of every month.
function newPeriod() public onlyOwner {
}
// === Minter Functions
function createHodler(address to, bytes16 username, uint64 amount) public onlyMinter {
}
// Send tokens to existing account.
function mint(address user, uint64 amount) public onlyMinter {
require(hodlers[user].canWithdrawPeriod != 0);
require(<FILL_ME>)
hodlers[user].balance += amount;
totalSupply += amount;
Mint(user, amount);
}
// === User Functions
// Owner will sign hash(amount, address), and address owner uses this
// signature to create their account.
function create(bytes16 username, uint64 endowment, bytes sig) public {
}
// User can withdraw their share of donations from the previous month.
function withdraw() public {
}
// ERC20 Functions
function balanceOf(address _owner) public view returns (uint256 balance) {
}
function transfer(address _to, uint256 _value) public returns (bool) {
}
function allowance(address _owner, address _spender) public view returns (uint256) {
}
function approve(address _spender, uint256 _value) public returns (bool) {
}
function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
// === Constructor/Default
function RoyalForkToken() public {
}
function() payable public {
}
}
| hodlers[user].balance+amount>hodlers[user].balance | 388,957 | hodlers[user].balance+amount>hodlers[user].balance |
null | pragma solidity ^0.4.18;
// https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/math/SafeMath.sol
library SafeMath {
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
// https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/ownership/Ownable.sol
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
function Ownable() public {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) public onlyOwner {
}
}
// https://github.com/ethereum/EIPs/issues/179
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
// https://github.com/ethereum/EIPs/issues/20
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
// https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/token/DetailedERC20.sol
contract DetailedERC20 is ERC20 {
string public name;
string public symbol;
uint8 public decimals;
function DetailedERC20(string _name, string _symbol, uint8 _decimals) public {
}
}
// RoyalForkToken has the following properties:
// - users create an "account", which consists of a unique username, and token count.
// - tokens are minted at the discretion of "owner" and "minter".
// - tokens can only be transferred to existing token holders.
// - each token holder is entitled to a share of all donations sent to contract
// on a per-month basis and regardless of total token holdings; a dividend.
// (eg: 10 eth is sent to the contract in January. There are 100 token
// holders on Jan 31. At any time in February, each token holder can
// withdraw .1 eth for their January share).
// - dividends not collected for a given month become donations for the next month.
contract RoyalForkToken is Ownable, DetailedERC20("RoyalForkToken", "RFT", 0) {
using SafeMath for uint256;
struct Hodler {
bytes16 username;
uint64 balance;
uint16 canWithdrawPeriod;
}
mapping(address => Hodler) public hodlers;
mapping(bytes16 => address) public usernames;
uint256 public epoch = now;
uint16 public currentPeriod = 1;
uint64 public numHodlers;
uint64 public prevHodlers;
uint256 public prevBalance;
address minter;
mapping(address => mapping (address => uint256)) internal allowed;
event Mint(address indexed to, uint256 amount);
event PeriodEnd(uint16 indexed period, uint256 amount, uint64 hodlers);
event Donation(address indexed from, uint256 amount);
event Withdrawal(address indexed to, uint16 indexed period, uint256 amount);
modifier onlyMinter() {
}
// === Private Functions
// https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/ECRecovery.sol
function recover(bytes32 hash, bytes sig) internal pure returns (address) {
}
// Ensures that username isn't taken, and account doesn't already exist for
// user's address.
function newHodler(address user, bytes16 username, uint64 endowment) private {
}
// === Owner Functions
function setMinter(address newMinter) public onlyOwner {
}
// Owner should call this on 1st of every month.
function newPeriod() public onlyOwner {
}
// === Minter Functions
function createHodler(address to, bytes16 username, uint64 amount) public onlyMinter {
}
// Send tokens to existing account.
function mint(address user, uint64 amount) public onlyMinter {
}
// === User Functions
// Owner will sign hash(amount, address), and address owner uses this
// signature to create their account.
function create(bytes16 username, uint64 endowment, bytes sig) public {
require(<FILL_ME>)
newHodler(msg.sender, username, endowment);
}
// User can withdraw their share of donations from the previous month.
function withdraw() public {
}
// ERC20 Functions
function balanceOf(address _owner) public view returns (uint256 balance) {
}
function transfer(address _to, uint256 _value) public returns (bool) {
}
function allowance(address _owner, address _spender) public view returns (uint256) {
}
function approve(address _spender, uint256 _value) public returns (bool) {
}
function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
// === Constructor/Default
function RoyalForkToken() public {
}
function() payable public {
}
}
| recover(keccak256(endowment,msg.sender),sig)==owner | 388,957 | recover(keccak256(endowment,msg.sender),sig)==owner |
null | pragma solidity ^0.4.18;
// https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/math/SafeMath.sol
library SafeMath {
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
// https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/ownership/Ownable.sol
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
function Ownable() public {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) public onlyOwner {
}
}
// https://github.com/ethereum/EIPs/issues/179
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
// https://github.com/ethereum/EIPs/issues/20
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
// https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/token/DetailedERC20.sol
contract DetailedERC20 is ERC20 {
string public name;
string public symbol;
uint8 public decimals;
function DetailedERC20(string _name, string _symbol, uint8 _decimals) public {
}
}
// RoyalForkToken has the following properties:
// - users create an "account", which consists of a unique username, and token count.
// - tokens are minted at the discretion of "owner" and "minter".
// - tokens can only be transferred to existing token holders.
// - each token holder is entitled to a share of all donations sent to contract
// on a per-month basis and regardless of total token holdings; a dividend.
// (eg: 10 eth is sent to the contract in January. There are 100 token
// holders on Jan 31. At any time in February, each token holder can
// withdraw .1 eth for their January share).
// - dividends not collected for a given month become donations for the next month.
contract RoyalForkToken is Ownable, DetailedERC20("RoyalForkToken", "RFT", 0) {
using SafeMath for uint256;
struct Hodler {
bytes16 username;
uint64 balance;
uint16 canWithdrawPeriod;
}
mapping(address => Hodler) public hodlers;
mapping(bytes16 => address) public usernames;
uint256 public epoch = now;
uint16 public currentPeriod = 1;
uint64 public numHodlers;
uint64 public prevHodlers;
uint256 public prevBalance;
address minter;
mapping(address => mapping (address => uint256)) internal allowed;
event Mint(address indexed to, uint256 amount);
event PeriodEnd(uint16 indexed period, uint256 amount, uint64 hodlers);
event Donation(address indexed from, uint256 amount);
event Withdrawal(address indexed to, uint16 indexed period, uint256 amount);
modifier onlyMinter() {
}
// === Private Functions
// https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/ECRecovery.sol
function recover(bytes32 hash, bytes sig) internal pure returns (address) {
}
// Ensures that username isn't taken, and account doesn't already exist for
// user's address.
function newHodler(address user, bytes16 username, uint64 endowment) private {
}
// === Owner Functions
function setMinter(address newMinter) public onlyOwner {
}
// Owner should call this on 1st of every month.
function newPeriod() public onlyOwner {
}
// === Minter Functions
function createHodler(address to, bytes16 username, uint64 amount) public onlyMinter {
}
// Send tokens to existing account.
function mint(address user, uint64 amount) public onlyMinter {
}
// === User Functions
// Owner will sign hash(amount, address), and address owner uses this
// signature to create their account.
function create(bytes16 username, uint64 endowment, bytes sig) public {
}
// User can withdraw their share of donations from the previous month.
function withdraw() public {
require(<FILL_ME>)
require(hodlers[msg.sender].canWithdrawPeriod < currentPeriod);
hodlers[msg.sender].canWithdrawPeriod = currentPeriod;
uint256 payment = prevBalance / prevHodlers;
prevHodlers -= 1;
prevBalance -= payment;
msg.sender.send(payment);
Withdrawal(msg.sender, currentPeriod-1, payment);
}
// ERC20 Functions
function balanceOf(address _owner) public view returns (uint256 balance) {
}
function transfer(address _to, uint256 _value) public returns (bool) {
}
function allowance(address _owner, address _spender) public view returns (uint256) {
}
function approve(address _spender, uint256 _value) public returns (bool) {
}
function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
// === Constructor/Default
function RoyalForkToken() public {
}
function() payable public {
}
}
| hodlers[msg.sender].canWithdrawPeriod!=0 | 388,957 | hodlers[msg.sender].canWithdrawPeriod!=0 |
null | pragma solidity ^0.4.18;
// https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/math/SafeMath.sol
library SafeMath {
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
// https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/ownership/Ownable.sol
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
function Ownable() public {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) public onlyOwner {
}
}
// https://github.com/ethereum/EIPs/issues/179
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
// https://github.com/ethereum/EIPs/issues/20
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
// https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/token/DetailedERC20.sol
contract DetailedERC20 is ERC20 {
string public name;
string public symbol;
uint8 public decimals;
function DetailedERC20(string _name, string _symbol, uint8 _decimals) public {
}
}
// RoyalForkToken has the following properties:
// - users create an "account", which consists of a unique username, and token count.
// - tokens are minted at the discretion of "owner" and "minter".
// - tokens can only be transferred to existing token holders.
// - each token holder is entitled to a share of all donations sent to contract
// on a per-month basis and regardless of total token holdings; a dividend.
// (eg: 10 eth is sent to the contract in January. There are 100 token
// holders on Jan 31. At any time in February, each token holder can
// withdraw .1 eth for their January share).
// - dividends not collected for a given month become donations for the next month.
contract RoyalForkToken is Ownable, DetailedERC20("RoyalForkToken", "RFT", 0) {
using SafeMath for uint256;
struct Hodler {
bytes16 username;
uint64 balance;
uint16 canWithdrawPeriod;
}
mapping(address => Hodler) public hodlers;
mapping(bytes16 => address) public usernames;
uint256 public epoch = now;
uint16 public currentPeriod = 1;
uint64 public numHodlers;
uint64 public prevHodlers;
uint256 public prevBalance;
address minter;
mapping(address => mapping (address => uint256)) internal allowed;
event Mint(address indexed to, uint256 amount);
event PeriodEnd(uint16 indexed period, uint256 amount, uint64 hodlers);
event Donation(address indexed from, uint256 amount);
event Withdrawal(address indexed to, uint16 indexed period, uint256 amount);
modifier onlyMinter() {
}
// === Private Functions
// https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/ECRecovery.sol
function recover(bytes32 hash, bytes sig) internal pure returns (address) {
}
// Ensures that username isn't taken, and account doesn't already exist for
// user's address.
function newHodler(address user, bytes16 username, uint64 endowment) private {
}
// === Owner Functions
function setMinter(address newMinter) public onlyOwner {
}
// Owner should call this on 1st of every month.
function newPeriod() public onlyOwner {
}
// === Minter Functions
function createHodler(address to, bytes16 username, uint64 amount) public onlyMinter {
}
// Send tokens to existing account.
function mint(address user, uint64 amount) public onlyMinter {
}
// === User Functions
// Owner will sign hash(amount, address), and address owner uses this
// signature to create their account.
function create(bytes16 username, uint64 endowment, bytes sig) public {
}
// User can withdraw their share of donations from the previous month.
function withdraw() public {
require(hodlers[msg.sender].canWithdrawPeriod != 0);
require(<FILL_ME>)
hodlers[msg.sender].canWithdrawPeriod = currentPeriod;
uint256 payment = prevBalance / prevHodlers;
prevHodlers -= 1;
prevBalance -= payment;
msg.sender.send(payment);
Withdrawal(msg.sender, currentPeriod-1, payment);
}
// ERC20 Functions
function balanceOf(address _owner) public view returns (uint256 balance) {
}
function transfer(address _to, uint256 _value) public returns (bool) {
}
function allowance(address _owner, address _spender) public view returns (uint256) {
}
function approve(address _spender, uint256 _value) public returns (bool) {
}
function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
// === Constructor/Default
function RoyalForkToken() public {
}
function() payable public {
}
}
| hodlers[msg.sender].canWithdrawPeriod<currentPeriod | 388,957 | hodlers[msg.sender].canWithdrawPeriod<currentPeriod |
null | pragma solidity ^0.4.18;
// https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/math/SafeMath.sol
library SafeMath {
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
// https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/ownership/Ownable.sol
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
function Ownable() public {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) public onlyOwner {
}
}
// https://github.com/ethereum/EIPs/issues/179
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
// https://github.com/ethereum/EIPs/issues/20
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
// https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/token/DetailedERC20.sol
contract DetailedERC20 is ERC20 {
string public name;
string public symbol;
uint8 public decimals;
function DetailedERC20(string _name, string _symbol, uint8 _decimals) public {
}
}
// RoyalForkToken has the following properties:
// - users create an "account", which consists of a unique username, and token count.
// - tokens are minted at the discretion of "owner" and "minter".
// - tokens can only be transferred to existing token holders.
// - each token holder is entitled to a share of all donations sent to contract
// on a per-month basis and regardless of total token holdings; a dividend.
// (eg: 10 eth is sent to the contract in January. There are 100 token
// holders on Jan 31. At any time in February, each token holder can
// withdraw .1 eth for their January share).
// - dividends not collected for a given month become donations for the next month.
contract RoyalForkToken is Ownable, DetailedERC20("RoyalForkToken", "RFT", 0) {
using SafeMath for uint256;
struct Hodler {
bytes16 username;
uint64 balance;
uint16 canWithdrawPeriod;
}
mapping(address => Hodler) public hodlers;
mapping(bytes16 => address) public usernames;
uint256 public epoch = now;
uint16 public currentPeriod = 1;
uint64 public numHodlers;
uint64 public prevHodlers;
uint256 public prevBalance;
address minter;
mapping(address => mapping (address => uint256)) internal allowed;
event Mint(address indexed to, uint256 amount);
event PeriodEnd(uint16 indexed period, uint256 amount, uint64 hodlers);
event Donation(address indexed from, uint256 amount);
event Withdrawal(address indexed to, uint16 indexed period, uint256 amount);
modifier onlyMinter() {
}
// === Private Functions
// https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/ECRecovery.sol
function recover(bytes32 hash, bytes sig) internal pure returns (address) {
}
// Ensures that username isn't taken, and account doesn't already exist for
// user's address.
function newHodler(address user, bytes16 username, uint64 endowment) private {
}
// === Owner Functions
function setMinter(address newMinter) public onlyOwner {
}
// Owner should call this on 1st of every month.
function newPeriod() public onlyOwner {
}
// === Minter Functions
function createHodler(address to, bytes16 username, uint64 amount) public onlyMinter {
}
// Send tokens to existing account.
function mint(address user, uint64 amount) public onlyMinter {
}
// === User Functions
// Owner will sign hash(amount, address), and address owner uses this
// signature to create their account.
function create(bytes16 username, uint64 endowment, bytes sig) public {
}
// User can withdraw their share of donations from the previous month.
function withdraw() public {
}
// ERC20 Functions
function balanceOf(address _owner) public view returns (uint256 balance) {
}
function transfer(address _to, uint256 _value) public returns (bool) {
require(<FILL_ME>)
require(_value <= hodlers[msg.sender].balance);
require(hodlers[_to].balance + uint64(_value) > hodlers[_to].balance);
hodlers[msg.sender].balance -= uint64(_value);
hodlers[_to].balance += uint64(_value);
Transfer(msg.sender, _to, _value);
return true;
}
function allowance(address _owner, address _spender) public view returns (uint256) {
}
function approve(address _spender, uint256 _value) public returns (bool) {
}
function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
// === Constructor/Default
function RoyalForkToken() public {
}
function() payable public {
}
}
| hodlers[_to].canWithdrawPeriod!=0 | 388,957 | hodlers[_to].canWithdrawPeriod!=0 |
null | pragma solidity ^0.4.18;
// https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/math/SafeMath.sol
library SafeMath {
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
// https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/ownership/Ownable.sol
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
function Ownable() public {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) public onlyOwner {
}
}
// https://github.com/ethereum/EIPs/issues/179
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
// https://github.com/ethereum/EIPs/issues/20
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
// https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/token/DetailedERC20.sol
contract DetailedERC20 is ERC20 {
string public name;
string public symbol;
uint8 public decimals;
function DetailedERC20(string _name, string _symbol, uint8 _decimals) public {
}
}
// RoyalForkToken has the following properties:
// - users create an "account", which consists of a unique username, and token count.
// - tokens are minted at the discretion of "owner" and "minter".
// - tokens can only be transferred to existing token holders.
// - each token holder is entitled to a share of all donations sent to contract
// on a per-month basis and regardless of total token holdings; a dividend.
// (eg: 10 eth is sent to the contract in January. There are 100 token
// holders on Jan 31. At any time in February, each token holder can
// withdraw .1 eth for their January share).
// - dividends not collected for a given month become donations for the next month.
contract RoyalForkToken is Ownable, DetailedERC20("RoyalForkToken", "RFT", 0) {
using SafeMath for uint256;
struct Hodler {
bytes16 username;
uint64 balance;
uint16 canWithdrawPeriod;
}
mapping(address => Hodler) public hodlers;
mapping(bytes16 => address) public usernames;
uint256 public epoch = now;
uint16 public currentPeriod = 1;
uint64 public numHodlers;
uint64 public prevHodlers;
uint256 public prevBalance;
address minter;
mapping(address => mapping (address => uint256)) internal allowed;
event Mint(address indexed to, uint256 amount);
event PeriodEnd(uint16 indexed period, uint256 amount, uint64 hodlers);
event Donation(address indexed from, uint256 amount);
event Withdrawal(address indexed to, uint16 indexed period, uint256 amount);
modifier onlyMinter() {
}
// === Private Functions
// https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/ECRecovery.sol
function recover(bytes32 hash, bytes sig) internal pure returns (address) {
}
// Ensures that username isn't taken, and account doesn't already exist for
// user's address.
function newHodler(address user, bytes16 username, uint64 endowment) private {
}
// === Owner Functions
function setMinter(address newMinter) public onlyOwner {
}
// Owner should call this on 1st of every month.
function newPeriod() public onlyOwner {
}
// === Minter Functions
function createHodler(address to, bytes16 username, uint64 amount) public onlyMinter {
}
// Send tokens to existing account.
function mint(address user, uint64 amount) public onlyMinter {
}
// === User Functions
// Owner will sign hash(amount, address), and address owner uses this
// signature to create their account.
function create(bytes16 username, uint64 endowment, bytes sig) public {
}
// User can withdraw their share of donations from the previous month.
function withdraw() public {
}
// ERC20 Functions
function balanceOf(address _owner) public view returns (uint256 balance) {
}
function transfer(address _to, uint256 _value) public returns (bool) {
require(hodlers[_to].canWithdrawPeriod != 0);
require(_value <= hodlers[msg.sender].balance);
require(<FILL_ME>)
hodlers[msg.sender].balance -= uint64(_value);
hodlers[_to].balance += uint64(_value);
Transfer(msg.sender, _to, _value);
return true;
}
function allowance(address _owner, address _spender) public view returns (uint256) {
}
function approve(address _spender, uint256 _value) public returns (bool) {
}
function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
// === Constructor/Default
function RoyalForkToken() public {
}
function() payable public {
}
}
| hodlers[_to].balance+uint64(_value)>hodlers[_to].balance | 388,957 | hodlers[_to].balance+uint64(_value)>hodlers[_to].balance |
"ERROR deposit Compound" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {Math} from "@openzeppelin/contracts/utils/math/Math.sol";
// Euler
import {IEulerMarkets} from "./interfaces/IEulerMarkets.sol";
import {IEToken} from "./interfaces/IEToken.sol";
// Aave
import {ILendingPool} from "./interfaces/ILendingPool.sol";
import {IAToken} from "./interfaces/IAToken.sol";
// Compound
import {ICToken} from "./interfaces/ICToken.sol";
// libs
import {BoringBatchable} from "./libs/BoringBatchable.sol";
contract LendingMigrator is BoringBatchable {
using SafeERC20 for IERC20;
using Math for uint256;
// Euler
address public immutable EULER;
IEulerMarkets public immutable EULER_MARKETS;
// Aave v2
ILendingPool public immutable AAVE_V2_LENDING_POOL;
uint16 public immutable AAVE_V2_REFERRAL;
// Compound
// TODO setters for these functions
mapping(address => address) public cTokenToUnderlying;
mapping(address => address) public underlyingToCToken;
constructor(
address _euler,
address _eulerMarkets,
address _aaveV2LendingPool,
uint16 _aaveV2Referral
) {
}
// Euler
function depositEuler(address _token, address _receiver) external {
}
function withdrawEuler(address _eToken, address _receiver) external {
}
// Aave
function depositAaveV2(address _token, address _receiver) external {
}
function withdrawAaveV2(address _aToken, address _receiver) external {
}
// Compound
function depositCompound(address _token, address _receiver) external {
IERC20 token = IERC20(_token);
ICToken cToken = ICToken(underlyingToCToken[_token]);
uint256 amount = token.balanceOf(address(this));
token.approve(address(cToken), amount);
// Replace for custom error
require(<FILL_ME>)
if(_receiver != address(0)) {
uint256 cTokenAmount = cToken.balanceOf(address(this));
cToken.transfer(_receiver, cTokenAmount);
}
}
function withdrawCompound(address _cToken, address _receiver) external {
}
function pullToken(address _token, uint256 _amount) external {
}
function sendToken(address _token, address _receiver) external {
}
}
| cToken.mint(amount)==0,"ERROR deposit Compound" | 389,026 | cToken.mint(amount)==0 |
"Error withdraw Compound" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {Math} from "@openzeppelin/contracts/utils/math/Math.sol";
// Euler
import {IEulerMarkets} from "./interfaces/IEulerMarkets.sol";
import {IEToken} from "./interfaces/IEToken.sol";
// Aave
import {ILendingPool} from "./interfaces/ILendingPool.sol";
import {IAToken} from "./interfaces/IAToken.sol";
// Compound
import {ICToken} from "./interfaces/ICToken.sol";
// libs
import {BoringBatchable} from "./libs/BoringBatchable.sol";
contract LendingMigrator is BoringBatchable {
using SafeERC20 for IERC20;
using Math for uint256;
// Euler
address public immutable EULER;
IEulerMarkets public immutable EULER_MARKETS;
// Aave v2
ILendingPool public immutable AAVE_V2_LENDING_POOL;
uint16 public immutable AAVE_V2_REFERRAL;
// Compound
// TODO setters for these functions
mapping(address => address) public cTokenToUnderlying;
mapping(address => address) public underlyingToCToken;
constructor(
address _euler,
address _eulerMarkets,
address _aaveV2LendingPool,
uint16 _aaveV2Referral
) {
}
// Euler
function depositEuler(address _token, address _receiver) external {
}
function withdrawEuler(address _eToken, address _receiver) external {
}
// Aave
function depositAaveV2(address _token, address _receiver) external {
}
function withdrawAaveV2(address _aToken, address _receiver) external {
}
// Compound
function depositCompound(address _token, address _receiver) external {
}
function withdrawCompound(address _cToken, address _receiver) external {
IERC20 token = IERC20(cTokenToUnderlying[_cToken]);
ICToken cToken = ICToken(_cToken);
uint256 amount = cToken.balanceOf(address(this));
require(<FILL_ME>)
if(_receiver != address(0)) {
uint256 tokenAmount = token.balanceOf(address(this));
token.transfer(msg.sender, tokenAmount);
}
}
function pullToken(address _token, uint256 _amount) external {
}
function sendToken(address _token, address _receiver) external {
}
}
| cToken.redeem(amount)==0,"Error withdraw Compound" | 389,026 | cToken.redeem(amount)==0 |
null | pragma solidity ^0.4.21;
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
}
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
function totalSupply() public view returns (uint256);
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
function setCrowdsale(address tokenWallet, uint256 amount) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract cDeployer {
function deployCrowdsale(address _tWallet, address _token, address _eWallet, uint _maxETH, address reqBy) public returns (address);
}
contract tDeployer {
function deployToken(string _tName, string _tSymbol, uint _mint, address _owner) public returns (address);
}
contract customTkn {
function multiTransfer(address[] _to, uint256[] _values) public;
function transferFrom(address from, address to, uint256 value) public returns (bool);
}
contract contractDeployer is Ownable {
event ContractCreated(address newAddress);
address public tokenAddr;
uint public tokenFee;
uint public crowdsaleFee;
uint public multisendFee;
ERC20 token;
cDeployer cdep;
tDeployer tdep;
function setUp(address _token, address _cdep, address _tdep) public onlyOwner {
}
function changeTokenFee(uint _amount) public onlyOwner {
}
function changeCrowdsaleFee(uint _amount) public onlyOwner {
}
function changeMultisendFee(uint _amount) public onlyOwner {
}
function deployToken(string _tName, string _tSymbol, uint _mint, address _owner) public returns (address) {
require(<FILL_ME>)
emit ContractCreated(tdep.deployToken(_tName, _tSymbol, _mint, _owner));
}
function deployCrowdsale(address _tWallet, address _token, address _eWallet, uint _maxETH) public returns (address) {
}
function multiSender(address _token, uint _total, address[] _to, uint[] _amount) public {
}
}
| token.transferFrom(msg.sender,owner,tokenFee) | 389,074 | token.transferFrom(msg.sender,owner,tokenFee) |
null | pragma solidity ^0.4.21;
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
}
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
function totalSupply() public view returns (uint256);
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
function setCrowdsale(address tokenWallet, uint256 amount) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract cDeployer {
function deployCrowdsale(address _tWallet, address _token, address _eWallet, uint _maxETH, address reqBy) public returns (address);
}
contract tDeployer {
function deployToken(string _tName, string _tSymbol, uint _mint, address _owner) public returns (address);
}
contract customTkn {
function multiTransfer(address[] _to, uint256[] _values) public;
function transferFrom(address from, address to, uint256 value) public returns (bool);
}
contract contractDeployer is Ownable {
event ContractCreated(address newAddress);
address public tokenAddr;
uint public tokenFee;
uint public crowdsaleFee;
uint public multisendFee;
ERC20 token;
cDeployer cdep;
tDeployer tdep;
function setUp(address _token, address _cdep, address _tdep) public onlyOwner {
}
function changeTokenFee(uint _amount) public onlyOwner {
}
function changeCrowdsaleFee(uint _amount) public onlyOwner {
}
function changeMultisendFee(uint _amount) public onlyOwner {
}
function deployToken(string _tName, string _tSymbol, uint _mint, address _owner) public returns (address) {
}
function deployCrowdsale(address _tWallet, address _token, address _eWallet, uint _maxETH) public returns (address) {
require(<FILL_ME>)
emit ContractCreated(cdep.deployCrowdsale(_eWallet, _token, _tWallet, _maxETH, msg.sender));
}
function multiSender(address _token, uint _total, address[] _to, uint[] _amount) public {
}
}
| token.transferFrom(msg.sender,owner,crowdsaleFee) | 389,074 | token.transferFrom(msg.sender,owner,crowdsaleFee) |
null | pragma solidity ^0.4.21;
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
}
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
function totalSupply() public view returns (uint256);
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
function setCrowdsale(address tokenWallet, uint256 amount) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract cDeployer {
function deployCrowdsale(address _tWallet, address _token, address _eWallet, uint _maxETH, address reqBy) public returns (address);
}
contract tDeployer {
function deployToken(string _tName, string _tSymbol, uint _mint, address _owner) public returns (address);
}
contract customTkn {
function multiTransfer(address[] _to, uint256[] _values) public;
function transferFrom(address from, address to, uint256 value) public returns (bool);
}
contract contractDeployer is Ownable {
event ContractCreated(address newAddress);
address public tokenAddr;
uint public tokenFee;
uint public crowdsaleFee;
uint public multisendFee;
ERC20 token;
cDeployer cdep;
tDeployer tdep;
function setUp(address _token, address _cdep, address _tdep) public onlyOwner {
}
function changeTokenFee(uint _amount) public onlyOwner {
}
function changeCrowdsaleFee(uint _amount) public onlyOwner {
}
function changeMultisendFee(uint _amount) public onlyOwner {
}
function deployToken(string _tName, string _tSymbol, uint _mint, address _owner) public returns (address) {
}
function deployCrowdsale(address _tWallet, address _token, address _eWallet, uint _maxETH) public returns (address) {
}
function multiSender(address _token, uint _total, address[] _to, uint[] _amount) public {
require(<FILL_ME>)
customTkn er2 = customTkn(_token);
require(er2.transferFrom(msg.sender, this, _total));
er2.multiTransfer(_to, _amount);
}
}
| token.transferFrom(msg.sender,owner,multisendFee) | 389,074 | token.transferFrom(msg.sender,owner,multisendFee) |
null | pragma solidity ^0.4.21;
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
}
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
function totalSupply() public view returns (uint256);
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
function setCrowdsale(address tokenWallet, uint256 amount) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract cDeployer {
function deployCrowdsale(address _tWallet, address _token, address _eWallet, uint _maxETH, address reqBy) public returns (address);
}
contract tDeployer {
function deployToken(string _tName, string _tSymbol, uint _mint, address _owner) public returns (address);
}
contract customTkn {
function multiTransfer(address[] _to, uint256[] _values) public;
function transferFrom(address from, address to, uint256 value) public returns (bool);
}
contract contractDeployer is Ownable {
event ContractCreated(address newAddress);
address public tokenAddr;
uint public tokenFee;
uint public crowdsaleFee;
uint public multisendFee;
ERC20 token;
cDeployer cdep;
tDeployer tdep;
function setUp(address _token, address _cdep, address _tdep) public onlyOwner {
}
function changeTokenFee(uint _amount) public onlyOwner {
}
function changeCrowdsaleFee(uint _amount) public onlyOwner {
}
function changeMultisendFee(uint _amount) public onlyOwner {
}
function deployToken(string _tName, string _tSymbol, uint _mint, address _owner) public returns (address) {
}
function deployCrowdsale(address _tWallet, address _token, address _eWallet, uint _maxETH) public returns (address) {
}
function multiSender(address _token, uint _total, address[] _to, uint[] _amount) public {
require(token.transferFrom(msg.sender, owner, multisendFee));
customTkn er2 = customTkn(_token);
require(<FILL_ME>)
er2.multiTransfer(_to, _amount);
}
}
| er2.transferFrom(msg.sender,this,_total) | 389,074 | er2.transferFrom(msg.sender,this,_total) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.