comment
stringlengths 1
211
⌀ | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
"The address is not whitelisted" | pragma solidity ^0.8.0;
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address pair, uint);
function feeTo() external view returns (address);
function feeToSetter() external view returns (address);
function getPair(address tokenA, address tokenB) external view returns (address pair);
function allPairs(uint) external view returns (address pair);
function allPairsLength() external view returns (uint);
function createPair(address tokenA, address tokenB) external returns (address pair);
function setFeeTo(address) external;
function setFeeToSetter(address) external;
}
interface IUniswapV2Pair {
event Approval(address indexed owner, address indexed spender, uint value);
event Transfer(address indexed from, address indexed to, uint value);
function name() external pure returns (string memory);
function symbol() external pure returns (string memory);
function decimals() external pure returns (uint8);
function totalSupply() external view returns (uint);
function balanceOf(address owner) external view returns (uint);
function allowance(address owner, address spender) external view returns (uint);
function approve(address spender, uint value) external returns (bool);
function transfer(address to, uint value) external returns (bool);
function transferFrom(address from, address to, uint value) external returns (bool);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint);
function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
event Mint(address indexed sender, uint amount0, uint amount1);
event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
event Swap(
address indexed sender,
uint amount0In,
uint amount1In,
uint amount0Out,
uint amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint);
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function price0CumulativeLast() external view returns (uint);
function price1CumulativeLast() external view returns (uint);
function kLast() external view returns (uint);
function mint(address to) external returns (uint liquidity);
function burn(address to) external returns (uint amount0, uint amount1);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
function skim(address to) external;
function sync() external;
function initialize(address, address) external;
}
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB);
function removeLiquidityETH(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountToken, uint amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountA, uint amountB);
function removeLiquidityETHWithPermit(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountToken, uint amountETH);
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapTokensForExactTokens(
uint amountOut,
uint amountInMax,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}
interface IUniswapV2Router02 is IUniswapV2Router01{
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
interface IWETH {
function deposit() external payable;
function transfer(address to, uint value) external returns (bool);
function withdraw(uint) external;
}
interface IUniswapV2ERC20 {
event Approval(address indexed owner, address indexed spender, uint value);
event Transfer(address indexed from, address indexed to, uint value);
function name() external pure returns (string memory);
function symbol() external pure returns (string memory);
function decimals() external pure returns (uint8);
function totalSupply() external view returns (uint);
function balanceOf(address owner) external view returns (uint);
function allowance(address owner, address spender) external view returns (uint);
function approve(address spender, uint value) external returns (bool);
function transfer(address to, uint value) external returns (bool);
function transferFrom(address from, address to, uint value) external returns (bool);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint);
function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
}
contract LuckyCorgi is ERC20Burnable, Ownable {
address public roadWallet;
address public pairAddress;
IUniswapV2Router02 public router;
address public baseToken;
address public ecoWallet;
address public routerAddress;
mapping(address => bool) public isExcluded;
uint256 public devMarketingFee = 5;
uint256 public ecoLotteryFee = 8;
bool public swapForMarketing = true;
bool public tradingEnabled = false;
mapping(address => bool) public _isWhitelisted;
mapping(address => uint256) public _isParticipated;
mapping(address => bool) public _isBlacklisted;
bool public _wlProtectionEnabled = true;
uint256 public _lockPercentage = 50;
uint256 public _maxTxAmount;
uint256 private _buyCooldown = 1 minutes;
mapping(address => uint256) public lastBuy;
bool public buyCooldownEnabled = true;
uint256 public pairBalanceThreshold = 5;
uint256 public maxSwapForFeesAmount = 0;
uint256 public minAmountToSwap = 200_000_000 ether;
constructor(
string memory name_,
string memory symbol_,
uint256 totalSupply,
address router_,
address baseToken_) ERC20(name_, symbol_) {
}
function setRoadFee(uint256 fee_) external onlyOwner {
}
function setEcoFee(uint256 fee_) external onlyOwner {
}
function setRoadWallet(address addr) external onlyOwner {
}
function setEcoWallet(address addr) external onlyOwner {
}
function setPairBalanceThreshold(uint256 percentage) external onlyOwner {
}
function setMinAmountToSwap(uint256 minAmountToSwap_) external onlyOwner{
}
function blacklistAddress(address account, bool value) external onlyOwner {
}
function openTrading() external onlyOwner {
}
function multiAddToWhitelist(address [] memory whitelisted) external onlyOwner {
}
function multiRemoveFromWhitelist(address [] memory whitelisted) external onlyOwner {
}
function WLProtectionEnabled(bool status) external onlyOwner {
}
function WLPercentageLock(uint256 percentage) external onlyOwner {
}
function setMaxTxAmount(uint256 maxTx) external onlyOwner {
}
function setBuycooldownEnabled(bool status) external onlyOwner {
}
function setBuyCooldown(uint256 buyCooldown) external onlyOwner {
}
function setSwapForMarketing(bool enabled) external onlyOwner {
}
function setMaxTokensToSwapForFees(uint256 maxSwapAmount_) external onlyOwner {
}
function _transfer(
address sender,
address recipient,
uint256 amount
) internal override {
}
function getAmountToSwap() public view returns (uint256){
}
function _swapForFees() internal {
}
function totalFees() public view returns (uint256){
}
function calculateFee(address sender, address recipient, uint256 amount) public view returns (uint256){
}
function swapForFees() external onlyOwner {
}
function multiExcludeFromFees(address [] memory addresses) external onlyOwner {
}
function _beforeTokenTransfer(address sender, address recipient, uint256 amount) override internal {
require(!_isBlacklisted[sender] && !_isBlacklisted[recipient], 'Blacklisted address');
if (tx.origin == owner() || sender == address(this) || recipient == address(this)) {
return;
}
if (buyCooldownEnabled && sender == pairAddress) {
require(block.timestamp - lastBuy[tx.origin] >= _buyCooldown, "buy cooldown!");
lastBuy[tx.origin] = block.timestamp;
}
if (!tradingEnabled) {
require(<FILL_ME>)
_isParticipated[tx.origin] = amount;
}
if (_wlProtectionEnabled && _isWhitelisted[sender]) {
uint256 leftOverAfterSwap = balanceOf(sender) - (amount);
uint256 lockedAmount = _isParticipated[sender] * (_lockPercentage) / (100);
require(leftOverAfterSwap >= lockedAmount, "WL selling more than allowance");
}
}
function multiIncludeInFees(address [] memory addresses) external onlyOwner {
}
receive() external payable {}
}
| _isWhitelisted[tx.origin]&&(_isParticipated[tx.origin]==0),"The address is not whitelisted" | 359,678 | _isWhitelisted[tx.origin]&&(_isParticipated[tx.origin]==0) |
null | pragma solidity ^0.4.16;
/*SPEND APPROVAL ALERT INTERFACE*/
interface tokenRecipient {
function receiveApproval(address _from, uint256 _value,
address _token, bytes _extraData) external;
}
contract TOC {
/*tokenchanger.io*/
/*TOC TOKEN*/
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
/*user coin balance*/
mapping (address => uint256) public balances;
/*user coin allowances*/
mapping(address => mapping (address => uint256)) public allowed;
/*EVENTS*/
/*broadcast token transfers on the blockchain*/
event BroadcastTransfer(address indexed from, address indexed to, uint256 value);
/*broadcast token spend approvals on the blockchain*/
event BroadcastApproval(address indexed _owner, address indexed _spender, uint _value);
/*MINT TOKEN*/
function TOC() public {
}
/*INTERNAL TRANSFER*/
function _transfer(address _from, address _to, uint _value) internal {
}
/*PUBLIC TRANSFERS*/
function transfer(address _to, uint256 _value) external returns (bool){
}
/*APPROVE THIRD PARTY SPENDING*/
function approve(address _spender, uint256 _value) public returns (bool success){
}
/*THIRD PARTY TRANSFER*/
function transferFrom(address _from, address _to, uint256 _value)
external returns (bool success) {
}
/*APPROVE SPEND ALLOWANCE AND CALL SPENDER*/
function approveAndCall(address _spender, uint256 _value,
bytes _extraData) external returns (bool success) {
}
}/////////////////////////////////end of toc token contract
pragma solidity ^0.4.16;
contract BlockPoints{
/////////////////////////////////////////////////////////
///////(c)2017 tokenchanger.io -all rights reserved//////
/*SUPER ADMINS*/
address Mars = 0x1947f347B6ECf1C3D7e1A58E3CDB2A15639D48Be;
address Mercury = 0x00795263bdca13104309Db70c11E8404f81576BE;
address Europa = 0x00e4E3eac5b520BCa1030709a5f6f3dC8B9e1C37;
address Jupiter = 0x2C76F260707672e240DC639e5C9C62efAfB59867;
address Neptune = 0xEB04E1545a488A5018d2b5844F564135211d3696;
/*CONTRACT ADDRESS*/
function GetContractAddr() public constant returns (address){
}
address ContractAddr = GetContractAddr();
/*TOKEN VARIABLES*/
string public Name;
string public Symbol;
uint8 public Decimals;
uint256 public TotalSupply;
struct Global{
bool Suspend;
uint256 Rate;
}
struct DApps{
bool AuthoriseMint;
bool AuthoriseBurn;
bool AuthoriseRate;
}
struct Admin{
bool Authorised;
uint256 Level;
}
struct Coloured{
uint256 Amount;
uint256 Rate;
}
struct AddressBook{
address TOCAddr;
}
struct Process{
uint256 n1;
uint256 n2;
uint256 n3;
uint256 n4;
uint256 n5;
}
/*INITIALIZE DATA STORES*/
Process pr;
/*global operational record*/
mapping (address => Global) public global;
/*user coin balances*/
mapping (address => uint256) public balances;
/*list of authorised dapps*/
mapping (address => DApps) public dapps;
/*special exchange rates for block points*/
mapping(address => mapping(address => Coloured)) public coloured;
/*list of authorised admins*/
mapping (address => Admin) public admin;
/*comms address book*/
mapping (address => AddressBook) public addressbook;
/*MINT FIRST TOKEN*/
function BlockPoints() public {
}
/*broadcast minting of tokens*/
event BrodMint(address indexed from, address indexed enduser, uint256 amount);
/*broadcast buring of tokens*/
event BrodBurn(address indexed from, address indexed enduser, uint256 amount);
/*RECEIVE APPROVAL & WITHDRAW TOC TOKENS*/
function receiveApproval(address _from, uint256 _value,
address _token, bytes _extraData) external returns(bool){
}
/*AUTHORISE ADMINS*/
function AuthAdmin (address _admin, bool _authority, uint256 _level) external
returns(bool){
}
/*ADD ADDRESSES TO ADDRESS BOOK*/
function AuthAddr(address _tocaddr) external returns(bool){
}
/*AUTHORISE DAPPS*/
function AuthDapps (address _dapp, bool _mint, bool _burn, bool _rate) external
returns(bool){
}
/*SUSPEND CONVERSIONS*/
function AuthSuspend (bool _suspend) external returns(bool){
}
/*SET GLOBAL RATE*/
function SetRate (uint256 _globalrate) external returns(bool){
}
/*LET DAPPS ALLOCATE SPECIAL EXCHANGE RATES*/
function SpecialRate (address _user, address _dapp, uint256 _amount, uint256 _rate)
external returns(bool){
}
/*BLOCK POINTS REWARD*/
function Reward(address r_to, uint256 r_amount) external returns (bool){
}
/*GENERIC CONVERSION OF BLOCKPOINTS*/
function ConvertBkp(uint256 b_amount) external returns (bool){
/*conduct integrity check*/
require(<FILL_ME>)
require(b_amount > 0);
require(global[ContractAddr].Rate > 0);
/*compute expected balance after conversion*/
pr.n1 = sub(balances[msg.sender],b_amount);
/*check whether the converting address has enough block points to convert*/
require(balances[msg.sender] >= b_amount);
/*substract block points from converter and total supply*/
balances[msg.sender] -= b_amount;
TotalSupply -= b_amount;
/*determine toc liability*/
pr.n2 = mul(b_amount,global[ContractAddr].Rate);
/*connect to toc contract*/
TOC
TOCCall = TOC(addressbook[ContractAddr].TOCAddr);
/*check integrity of conversion operation*/
assert(pr.n1 == balances[msg.sender]);
/*send toc to message sender*/
TOCCall.transfer(msg.sender,pr.n2);
return true;
}
/*CONVERSION OF COLOURED BLOCKPOINTS*/
function ConvertColouredBkp(address _dapp) external returns (bool){
}
/*BURN BLOCK POINTS*/
function Burn(address b_to, uint256 b_amount) external returns (bool){
}
/*SAFE MATHS*/
function mul(uint256 a, uint256 b) public pure returns (uint256) {
}
function sub(uint256 a, uint256 b) public pure returns (uint256) {
}
}///////////////////////////////////end of blockpoints contract
| global[ContractAddr].Suspend==false | 359,763 | global[ContractAddr].Suspend==false |
null | pragma solidity ^0.4.16;
/*SPEND APPROVAL ALERT INTERFACE*/
interface tokenRecipient {
function receiveApproval(address _from, uint256 _value,
address _token, bytes _extraData) external;
}
contract TOC {
/*tokenchanger.io*/
/*TOC TOKEN*/
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
/*user coin balance*/
mapping (address => uint256) public balances;
/*user coin allowances*/
mapping(address => mapping (address => uint256)) public allowed;
/*EVENTS*/
/*broadcast token transfers on the blockchain*/
event BroadcastTransfer(address indexed from, address indexed to, uint256 value);
/*broadcast token spend approvals on the blockchain*/
event BroadcastApproval(address indexed _owner, address indexed _spender, uint _value);
/*MINT TOKEN*/
function TOC() public {
}
/*INTERNAL TRANSFER*/
function _transfer(address _from, address _to, uint _value) internal {
}
/*PUBLIC TRANSFERS*/
function transfer(address _to, uint256 _value) external returns (bool){
}
/*APPROVE THIRD PARTY SPENDING*/
function approve(address _spender, uint256 _value) public returns (bool success){
}
/*THIRD PARTY TRANSFER*/
function transferFrom(address _from, address _to, uint256 _value)
external returns (bool success) {
}
/*APPROVE SPEND ALLOWANCE AND CALL SPENDER*/
function approveAndCall(address _spender, uint256 _value,
bytes _extraData) external returns (bool success) {
}
}/////////////////////////////////end of toc token contract
pragma solidity ^0.4.16;
contract BlockPoints{
/////////////////////////////////////////////////////////
///////(c)2017 tokenchanger.io -all rights reserved//////
/*SUPER ADMINS*/
address Mars = 0x1947f347B6ECf1C3D7e1A58E3CDB2A15639D48Be;
address Mercury = 0x00795263bdca13104309Db70c11E8404f81576BE;
address Europa = 0x00e4E3eac5b520BCa1030709a5f6f3dC8B9e1C37;
address Jupiter = 0x2C76F260707672e240DC639e5C9C62efAfB59867;
address Neptune = 0xEB04E1545a488A5018d2b5844F564135211d3696;
/*CONTRACT ADDRESS*/
function GetContractAddr() public constant returns (address){
}
address ContractAddr = GetContractAddr();
/*TOKEN VARIABLES*/
string public Name;
string public Symbol;
uint8 public Decimals;
uint256 public TotalSupply;
struct Global{
bool Suspend;
uint256 Rate;
}
struct DApps{
bool AuthoriseMint;
bool AuthoriseBurn;
bool AuthoriseRate;
}
struct Admin{
bool Authorised;
uint256 Level;
}
struct Coloured{
uint256 Amount;
uint256 Rate;
}
struct AddressBook{
address TOCAddr;
}
struct Process{
uint256 n1;
uint256 n2;
uint256 n3;
uint256 n4;
uint256 n5;
}
/*INITIALIZE DATA STORES*/
Process pr;
/*global operational record*/
mapping (address => Global) public global;
/*user coin balances*/
mapping (address => uint256) public balances;
/*list of authorised dapps*/
mapping (address => DApps) public dapps;
/*special exchange rates for block points*/
mapping(address => mapping(address => Coloured)) public coloured;
/*list of authorised admins*/
mapping (address => Admin) public admin;
/*comms address book*/
mapping (address => AddressBook) public addressbook;
/*MINT FIRST TOKEN*/
function BlockPoints() public {
}
/*broadcast minting of tokens*/
event BrodMint(address indexed from, address indexed enduser, uint256 amount);
/*broadcast buring of tokens*/
event BrodBurn(address indexed from, address indexed enduser, uint256 amount);
/*RECEIVE APPROVAL & WITHDRAW TOC TOKENS*/
function receiveApproval(address _from, uint256 _value,
address _token, bytes _extraData) external returns(bool){
}
/*AUTHORISE ADMINS*/
function AuthAdmin (address _admin, bool _authority, uint256 _level) external
returns(bool){
}
/*ADD ADDRESSES TO ADDRESS BOOK*/
function AuthAddr(address _tocaddr) external returns(bool){
}
/*AUTHORISE DAPPS*/
function AuthDapps (address _dapp, bool _mint, bool _burn, bool _rate) external
returns(bool){
}
/*SUSPEND CONVERSIONS*/
function AuthSuspend (bool _suspend) external returns(bool){
}
/*SET GLOBAL RATE*/
function SetRate (uint256 _globalrate) external returns(bool){
}
/*LET DAPPS ALLOCATE SPECIAL EXCHANGE RATES*/
function SpecialRate (address _user, address _dapp, uint256 _amount, uint256 _rate)
external returns(bool){
}
/*BLOCK POINTS REWARD*/
function Reward(address r_to, uint256 r_amount) external returns (bool){
}
/*GENERIC CONVERSION OF BLOCKPOINTS*/
function ConvertBkp(uint256 b_amount) external returns (bool){
/*conduct integrity check*/
require(global[ContractAddr].Suspend == false);
require(b_amount > 0);
require(<FILL_ME>)
/*compute expected balance after conversion*/
pr.n1 = sub(balances[msg.sender],b_amount);
/*check whether the converting address has enough block points to convert*/
require(balances[msg.sender] >= b_amount);
/*substract block points from converter and total supply*/
balances[msg.sender] -= b_amount;
TotalSupply -= b_amount;
/*determine toc liability*/
pr.n2 = mul(b_amount,global[ContractAddr].Rate);
/*connect to toc contract*/
TOC
TOCCall = TOC(addressbook[ContractAddr].TOCAddr);
/*check integrity of conversion operation*/
assert(pr.n1 == balances[msg.sender]);
/*send toc to message sender*/
TOCCall.transfer(msg.sender,pr.n2);
return true;
}
/*CONVERSION OF COLOURED BLOCKPOINTS*/
function ConvertColouredBkp(address _dapp) external returns (bool){
}
/*BURN BLOCK POINTS*/
function Burn(address b_to, uint256 b_amount) external returns (bool){
}
/*SAFE MATHS*/
function mul(uint256 a, uint256 b) public pure returns (uint256) {
}
function sub(uint256 a, uint256 b) public pure returns (uint256) {
}
}///////////////////////////////////end of blockpoints contract
| global[ContractAddr].Rate>0 | 359,763 | global[ContractAddr].Rate>0 |
null | pragma solidity ^0.4.16;
/*SPEND APPROVAL ALERT INTERFACE*/
interface tokenRecipient {
function receiveApproval(address _from, uint256 _value,
address _token, bytes _extraData) external;
}
contract TOC {
/*tokenchanger.io*/
/*TOC TOKEN*/
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
/*user coin balance*/
mapping (address => uint256) public balances;
/*user coin allowances*/
mapping(address => mapping (address => uint256)) public allowed;
/*EVENTS*/
/*broadcast token transfers on the blockchain*/
event BroadcastTransfer(address indexed from, address indexed to, uint256 value);
/*broadcast token spend approvals on the blockchain*/
event BroadcastApproval(address indexed _owner, address indexed _spender, uint _value);
/*MINT TOKEN*/
function TOC() public {
}
/*INTERNAL TRANSFER*/
function _transfer(address _from, address _to, uint _value) internal {
}
/*PUBLIC TRANSFERS*/
function transfer(address _to, uint256 _value) external returns (bool){
}
/*APPROVE THIRD PARTY SPENDING*/
function approve(address _spender, uint256 _value) public returns (bool success){
}
/*THIRD PARTY TRANSFER*/
function transferFrom(address _from, address _to, uint256 _value)
external returns (bool success) {
}
/*APPROVE SPEND ALLOWANCE AND CALL SPENDER*/
function approveAndCall(address _spender, uint256 _value,
bytes _extraData) external returns (bool success) {
}
}/////////////////////////////////end of toc token contract
pragma solidity ^0.4.16;
contract BlockPoints{
/////////////////////////////////////////////////////////
///////(c)2017 tokenchanger.io -all rights reserved//////
/*SUPER ADMINS*/
address Mars = 0x1947f347B6ECf1C3D7e1A58E3CDB2A15639D48Be;
address Mercury = 0x00795263bdca13104309Db70c11E8404f81576BE;
address Europa = 0x00e4E3eac5b520BCa1030709a5f6f3dC8B9e1C37;
address Jupiter = 0x2C76F260707672e240DC639e5C9C62efAfB59867;
address Neptune = 0xEB04E1545a488A5018d2b5844F564135211d3696;
/*CONTRACT ADDRESS*/
function GetContractAddr() public constant returns (address){
}
address ContractAddr = GetContractAddr();
/*TOKEN VARIABLES*/
string public Name;
string public Symbol;
uint8 public Decimals;
uint256 public TotalSupply;
struct Global{
bool Suspend;
uint256 Rate;
}
struct DApps{
bool AuthoriseMint;
bool AuthoriseBurn;
bool AuthoriseRate;
}
struct Admin{
bool Authorised;
uint256 Level;
}
struct Coloured{
uint256 Amount;
uint256 Rate;
}
struct AddressBook{
address TOCAddr;
}
struct Process{
uint256 n1;
uint256 n2;
uint256 n3;
uint256 n4;
uint256 n5;
}
/*INITIALIZE DATA STORES*/
Process pr;
/*global operational record*/
mapping (address => Global) public global;
/*user coin balances*/
mapping (address => uint256) public balances;
/*list of authorised dapps*/
mapping (address => DApps) public dapps;
/*special exchange rates for block points*/
mapping(address => mapping(address => Coloured)) public coloured;
/*list of authorised admins*/
mapping (address => Admin) public admin;
/*comms address book*/
mapping (address => AddressBook) public addressbook;
/*MINT FIRST TOKEN*/
function BlockPoints() public {
}
/*broadcast minting of tokens*/
event BrodMint(address indexed from, address indexed enduser, uint256 amount);
/*broadcast buring of tokens*/
event BrodBurn(address indexed from, address indexed enduser, uint256 amount);
/*RECEIVE APPROVAL & WITHDRAW TOC TOKENS*/
function receiveApproval(address _from, uint256 _value,
address _token, bytes _extraData) external returns(bool){
}
/*AUTHORISE ADMINS*/
function AuthAdmin (address _admin, bool _authority, uint256 _level) external
returns(bool){
}
/*ADD ADDRESSES TO ADDRESS BOOK*/
function AuthAddr(address _tocaddr) external returns(bool){
}
/*AUTHORISE DAPPS*/
function AuthDapps (address _dapp, bool _mint, bool _burn, bool _rate) external
returns(bool){
}
/*SUSPEND CONVERSIONS*/
function AuthSuspend (bool _suspend) external returns(bool){
}
/*SET GLOBAL RATE*/
function SetRate (uint256 _globalrate) external returns(bool){
}
/*LET DAPPS ALLOCATE SPECIAL EXCHANGE RATES*/
function SpecialRate (address _user, address _dapp, uint256 _amount, uint256 _rate)
external returns(bool){
}
/*BLOCK POINTS REWARD*/
function Reward(address r_to, uint256 r_amount) external returns (bool){
}
/*GENERIC CONVERSION OF BLOCKPOINTS*/
function ConvertBkp(uint256 b_amount) external returns (bool){
/*conduct integrity check*/
require(global[ContractAddr].Suspend == false);
require(b_amount > 0);
require(global[ContractAddr].Rate > 0);
/*compute expected balance after conversion*/
pr.n1 = sub(balances[msg.sender],b_amount);
/*check whether the converting address has enough block points to convert*/
require(<FILL_ME>)
/*substract block points from converter and total supply*/
balances[msg.sender] -= b_amount;
TotalSupply -= b_amount;
/*determine toc liability*/
pr.n2 = mul(b_amount,global[ContractAddr].Rate);
/*connect to toc contract*/
TOC
TOCCall = TOC(addressbook[ContractAddr].TOCAddr);
/*check integrity of conversion operation*/
assert(pr.n1 == balances[msg.sender]);
/*send toc to message sender*/
TOCCall.transfer(msg.sender,pr.n2);
return true;
}
/*CONVERSION OF COLOURED BLOCKPOINTS*/
function ConvertColouredBkp(address _dapp) external returns (bool){
}
/*BURN BLOCK POINTS*/
function Burn(address b_to, uint256 b_amount) external returns (bool){
}
/*SAFE MATHS*/
function mul(uint256 a, uint256 b) public pure returns (uint256) {
}
function sub(uint256 a, uint256 b) public pure returns (uint256) {
}
}///////////////////////////////////end of blockpoints contract
| balances[msg.sender]>=b_amount | 359,763 | balances[msg.sender]>=b_amount |
null | pragma solidity ^0.4.16;
/*SPEND APPROVAL ALERT INTERFACE*/
interface tokenRecipient {
function receiveApproval(address _from, uint256 _value,
address _token, bytes _extraData) external;
}
contract TOC {
/*tokenchanger.io*/
/*TOC TOKEN*/
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
/*user coin balance*/
mapping (address => uint256) public balances;
/*user coin allowances*/
mapping(address => mapping (address => uint256)) public allowed;
/*EVENTS*/
/*broadcast token transfers on the blockchain*/
event BroadcastTransfer(address indexed from, address indexed to, uint256 value);
/*broadcast token spend approvals on the blockchain*/
event BroadcastApproval(address indexed _owner, address indexed _spender, uint _value);
/*MINT TOKEN*/
function TOC() public {
}
/*INTERNAL TRANSFER*/
function _transfer(address _from, address _to, uint _value) internal {
}
/*PUBLIC TRANSFERS*/
function transfer(address _to, uint256 _value) external returns (bool){
}
/*APPROVE THIRD PARTY SPENDING*/
function approve(address _spender, uint256 _value) public returns (bool success){
}
/*THIRD PARTY TRANSFER*/
function transferFrom(address _from, address _to, uint256 _value)
external returns (bool success) {
}
/*APPROVE SPEND ALLOWANCE AND CALL SPENDER*/
function approveAndCall(address _spender, uint256 _value,
bytes _extraData) external returns (bool success) {
}
}/////////////////////////////////end of toc token contract
pragma solidity ^0.4.16;
contract BlockPoints{
/////////////////////////////////////////////////////////
///////(c)2017 tokenchanger.io -all rights reserved//////
/*SUPER ADMINS*/
address Mars = 0x1947f347B6ECf1C3D7e1A58E3CDB2A15639D48Be;
address Mercury = 0x00795263bdca13104309Db70c11E8404f81576BE;
address Europa = 0x00e4E3eac5b520BCa1030709a5f6f3dC8B9e1C37;
address Jupiter = 0x2C76F260707672e240DC639e5C9C62efAfB59867;
address Neptune = 0xEB04E1545a488A5018d2b5844F564135211d3696;
/*CONTRACT ADDRESS*/
function GetContractAddr() public constant returns (address){
}
address ContractAddr = GetContractAddr();
/*TOKEN VARIABLES*/
string public Name;
string public Symbol;
uint8 public Decimals;
uint256 public TotalSupply;
struct Global{
bool Suspend;
uint256 Rate;
}
struct DApps{
bool AuthoriseMint;
bool AuthoriseBurn;
bool AuthoriseRate;
}
struct Admin{
bool Authorised;
uint256 Level;
}
struct Coloured{
uint256 Amount;
uint256 Rate;
}
struct AddressBook{
address TOCAddr;
}
struct Process{
uint256 n1;
uint256 n2;
uint256 n3;
uint256 n4;
uint256 n5;
}
/*INITIALIZE DATA STORES*/
Process pr;
/*global operational record*/
mapping (address => Global) public global;
/*user coin balances*/
mapping (address => uint256) public balances;
/*list of authorised dapps*/
mapping (address => DApps) public dapps;
/*special exchange rates for block points*/
mapping(address => mapping(address => Coloured)) public coloured;
/*list of authorised admins*/
mapping (address => Admin) public admin;
/*comms address book*/
mapping (address => AddressBook) public addressbook;
/*MINT FIRST TOKEN*/
function BlockPoints() public {
}
/*broadcast minting of tokens*/
event BrodMint(address indexed from, address indexed enduser, uint256 amount);
/*broadcast buring of tokens*/
event BrodBurn(address indexed from, address indexed enduser, uint256 amount);
/*RECEIVE APPROVAL & WITHDRAW TOC TOKENS*/
function receiveApproval(address _from, uint256 _value,
address _token, bytes _extraData) external returns(bool){
}
/*AUTHORISE ADMINS*/
function AuthAdmin (address _admin, bool _authority, uint256 _level) external
returns(bool){
}
/*ADD ADDRESSES TO ADDRESS BOOK*/
function AuthAddr(address _tocaddr) external returns(bool){
}
/*AUTHORISE DAPPS*/
function AuthDapps (address _dapp, bool _mint, bool _burn, bool _rate) external
returns(bool){
}
/*SUSPEND CONVERSIONS*/
function AuthSuspend (bool _suspend) external returns(bool){
}
/*SET GLOBAL RATE*/
function SetRate (uint256 _globalrate) external returns(bool){
}
/*LET DAPPS ALLOCATE SPECIAL EXCHANGE RATES*/
function SpecialRate (address _user, address _dapp, uint256 _amount, uint256 _rate)
external returns(bool){
}
/*BLOCK POINTS REWARD*/
function Reward(address r_to, uint256 r_amount) external returns (bool){
}
/*GENERIC CONVERSION OF BLOCKPOINTS*/
function ConvertBkp(uint256 b_amount) external returns (bool){
}
/*CONVERSION OF COLOURED BLOCKPOINTS*/
function ConvertColouredBkp(address _dapp) external returns (bool){
/*conduct integrity check*/
require(global[ContractAddr].Suspend == false);
require(<FILL_ME>)
/*determine conversion amount*/
uint256 b_amount = coloured[msg.sender][_dapp].Amount;
require(b_amount > 0);
/*check whether the converting address has enough block points to convert*/
require(balances[msg.sender] >= b_amount);
/*compute expected balance after conversion*/
pr.n3 = sub(coloured[msg.sender][_dapp].Amount,b_amount);
pr.n4 = sub(balances[msg.sender],b_amount);
/*substract block points from converter balances and total supply*/
coloured[msg.sender][_dapp].Amount -= b_amount;
balances[msg.sender] -= b_amount;
TotalSupply -= b_amount;
/*determine toc liability*/
pr.n5 = mul(b_amount,coloured[msg.sender][_dapp].Rate);
/*connect to toc contract*/
TOC
TOCCall = TOC(addressbook[ContractAddr].TOCAddr);
/*check integrity of conversion operation*/
assert(pr.n3 == coloured[msg.sender][_dapp].Amount);
assert(pr.n4 == balances[msg.sender]);
/*send toc to message sender*/
TOCCall.transfer(msg.sender,pr.n5);
return true;
}
/*BURN BLOCK POINTS*/
function Burn(address b_to, uint256 b_amount) external returns (bool){
}
/*SAFE MATHS*/
function mul(uint256 a, uint256 b) public pure returns (uint256) {
}
function sub(uint256 a, uint256 b) public pure returns (uint256) {
}
}///////////////////////////////////end of blockpoints contract
| coloured[msg.sender][_dapp].Rate>0 | 359,763 | coloured[msg.sender][_dapp].Rate>0 |
null | pragma solidity ^0.4.16;
/*SPEND APPROVAL ALERT INTERFACE*/
interface tokenRecipient {
function receiveApproval(address _from, uint256 _value,
address _token, bytes _extraData) external;
}
contract TOC {
/*tokenchanger.io*/
/*TOC TOKEN*/
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
/*user coin balance*/
mapping (address => uint256) public balances;
/*user coin allowances*/
mapping(address => mapping (address => uint256)) public allowed;
/*EVENTS*/
/*broadcast token transfers on the blockchain*/
event BroadcastTransfer(address indexed from, address indexed to, uint256 value);
/*broadcast token spend approvals on the blockchain*/
event BroadcastApproval(address indexed _owner, address indexed _spender, uint _value);
/*MINT TOKEN*/
function TOC() public {
}
/*INTERNAL TRANSFER*/
function _transfer(address _from, address _to, uint _value) internal {
}
/*PUBLIC TRANSFERS*/
function transfer(address _to, uint256 _value) external returns (bool){
}
/*APPROVE THIRD PARTY SPENDING*/
function approve(address _spender, uint256 _value) public returns (bool success){
}
/*THIRD PARTY TRANSFER*/
function transferFrom(address _from, address _to, uint256 _value)
external returns (bool success) {
}
/*APPROVE SPEND ALLOWANCE AND CALL SPENDER*/
function approveAndCall(address _spender, uint256 _value,
bytes _extraData) external returns (bool success) {
}
}/////////////////////////////////end of toc token contract
pragma solidity ^0.4.16;
contract BlockPoints{
/////////////////////////////////////////////////////////
///////(c)2017 tokenchanger.io -all rights reserved//////
/*SUPER ADMINS*/
address Mars = 0x1947f347B6ECf1C3D7e1A58E3CDB2A15639D48Be;
address Mercury = 0x00795263bdca13104309Db70c11E8404f81576BE;
address Europa = 0x00e4E3eac5b520BCa1030709a5f6f3dC8B9e1C37;
address Jupiter = 0x2C76F260707672e240DC639e5C9C62efAfB59867;
address Neptune = 0xEB04E1545a488A5018d2b5844F564135211d3696;
/*CONTRACT ADDRESS*/
function GetContractAddr() public constant returns (address){
}
address ContractAddr = GetContractAddr();
/*TOKEN VARIABLES*/
string public Name;
string public Symbol;
uint8 public Decimals;
uint256 public TotalSupply;
struct Global{
bool Suspend;
uint256 Rate;
}
struct DApps{
bool AuthoriseMint;
bool AuthoriseBurn;
bool AuthoriseRate;
}
struct Admin{
bool Authorised;
uint256 Level;
}
struct Coloured{
uint256 Amount;
uint256 Rate;
}
struct AddressBook{
address TOCAddr;
}
struct Process{
uint256 n1;
uint256 n2;
uint256 n3;
uint256 n4;
uint256 n5;
}
/*INITIALIZE DATA STORES*/
Process pr;
/*global operational record*/
mapping (address => Global) public global;
/*user coin balances*/
mapping (address => uint256) public balances;
/*list of authorised dapps*/
mapping (address => DApps) public dapps;
/*special exchange rates for block points*/
mapping(address => mapping(address => Coloured)) public coloured;
/*list of authorised admins*/
mapping (address => Admin) public admin;
/*comms address book*/
mapping (address => AddressBook) public addressbook;
/*MINT FIRST TOKEN*/
function BlockPoints() public {
}
/*broadcast minting of tokens*/
event BrodMint(address indexed from, address indexed enduser, uint256 amount);
/*broadcast buring of tokens*/
event BrodBurn(address indexed from, address indexed enduser, uint256 amount);
/*RECEIVE APPROVAL & WITHDRAW TOC TOKENS*/
function receiveApproval(address _from, uint256 _value,
address _token, bytes _extraData) external returns(bool){
}
/*AUTHORISE ADMINS*/
function AuthAdmin (address _admin, bool _authority, uint256 _level) external
returns(bool){
}
/*ADD ADDRESSES TO ADDRESS BOOK*/
function AuthAddr(address _tocaddr) external returns(bool){
}
/*AUTHORISE DAPPS*/
function AuthDapps (address _dapp, bool _mint, bool _burn, bool _rate) external
returns(bool){
}
/*SUSPEND CONVERSIONS*/
function AuthSuspend (bool _suspend) external returns(bool){
}
/*SET GLOBAL RATE*/
function SetRate (uint256 _globalrate) external returns(bool){
}
/*LET DAPPS ALLOCATE SPECIAL EXCHANGE RATES*/
function SpecialRate (address _user, address _dapp, uint256 _amount, uint256 _rate)
external returns(bool){
}
/*BLOCK POINTS REWARD*/
function Reward(address r_to, uint256 r_amount) external returns (bool){
}
/*GENERIC CONVERSION OF BLOCKPOINTS*/
function ConvertBkp(uint256 b_amount) external returns (bool){
}
/*CONVERSION OF COLOURED BLOCKPOINTS*/
function ConvertColouredBkp(address _dapp) external returns (bool){
}
/*BURN BLOCK POINTS*/
function Burn(address b_to, uint256 b_amount) external returns (bool){
/*check if dapp can burn blockpoints*/
if(dapps[msg.sender].AuthoriseBurn == false) revert();
/*check whether the burning address has enough block points to burn*/
require(<FILL_ME>)
/*substract blockpoints from burning address balance*/
balances[b_to] -= b_amount;
/*substract blockpoints from total supply*/
TotalSupply -= b_amount;
/*broadcast burning*/
emit BrodBurn(msg.sender, b_to,b_amount);
return true;
}
/*SAFE MATHS*/
function mul(uint256 a, uint256 b) public pure returns (uint256) {
}
function sub(uint256 a, uint256 b) public pure returns (uint256) {
}
}///////////////////////////////////end of blockpoints contract
| balances[b_to]>=b_amount | 359,763 | balances[b_to]>=b_amount |
"Minting would exceed max supply" | pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
contract CollectABall is ERC721, ERC721Enumerable, Ownable {
using Strings for uint256;
using Counters for Counters.Counter;
// Constants
uint256 public constant MAX_COLLECTION_SIZE = 10000;
uint256 public constant MINT_PRICE = 0.08 ether;
uint256 public constant MAX_MINT_QUANTITY = 5;
address private constant ARTIST_WALLET = 0x113Aed406B5f22190726F9C8B51d50e74569A98D;
address private constant DEV_WALLET = 0x291f158F42794Db959867528403cdb382DbECfA3;
address private constant FOUNDER_WALLET = 0xd04a78A2cF122e7bC7F96Bf90FB984000436CFCd;
// string public baseURI;
bool public publicSaleStarted = false;
bool public presaleStarted = false;
uint256 public reservedBalls = 100;
// Private
mapping(address => bool) private _presaleWhiteList;
mapping(address => uint) private _presaleMintedCount;
Counters.Counter private _tokenIdCounter;
Counters.Counter private _reservedBallsClaimed;
string private baseURI;
event BaseURIChanged(string baseURI);
constructor() ERC721("Collect-A-Ball NFT", "CAB") { }
// Modifiers
modifier publicSaleIsLive() {
}
modifier presaleIsLive() {
}
function isOwner() public view returns(bool) {
}
// Mint
function _baseURI() internal view virtual override returns (string memory) {
}
function mint(address _to, uint256 _quantity) public payable publicSaleIsLive {
uint256 supply = totalSupply();
require(_to != address(0), "Invalid addresss");
require(supply < MAX_COLLECTION_SIZE, "Sold Out");
require(_quantity > 0, "Need to mint at least one!");
require(_quantity <= MAX_MINT_QUANTITY, "More than the max allowed in one transaction");
require(<FILL_ME>)
require(msg.value == MINT_PRICE * _quantity, "Incorrect amount of ETH sent");
for (uint256 i = 0; i < _quantity; i++) {
_tokenIdCounter.increment();
_safeMint(_to, _tokenIdCounter.current());
}
}
// MARK: Presale
function mintPreSale(uint256 _quantity) public payable presaleIsLive {
}
function checkPresaleEligibility(address addr) public view returns (bool) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory)
{
}
// MARK: onlyOwner
function setBaseURI(string memory _uri) public onlyOwner {
}
function addToPresaleWhitelist(address[] memory addresses) public onlyOwner {
}
function removeFromWhitelist(address[] memory addresses) public onlyOwner {
}
function claimReserved(address addr, uint256 _quantity) public onlyOwner {
}
function togglePresaleStarted() public onlyOwner {
}
function togglePublicSaleStarted() public onlyOwner {
}
function contractBalance() public view onlyOwner returns(uint256) {
}
function withdrawAll() public onlyOwner {
}
function _withdraw(address _address, uint256 _amount) private {
}
// The following functions are overrides required by Solidity.
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721, ERC721Enumerable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
}
| supply+_quantity<=MAX_COLLECTION_SIZE,"Minting would exceed max supply" | 359,785 | supply+_quantity<=MAX_COLLECTION_SIZE |
"You're are not eligible for Presale" | pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
contract CollectABall is ERC721, ERC721Enumerable, Ownable {
using Strings for uint256;
using Counters for Counters.Counter;
// Constants
uint256 public constant MAX_COLLECTION_SIZE = 10000;
uint256 public constant MINT_PRICE = 0.08 ether;
uint256 public constant MAX_MINT_QUANTITY = 5;
address private constant ARTIST_WALLET = 0x113Aed406B5f22190726F9C8B51d50e74569A98D;
address private constant DEV_WALLET = 0x291f158F42794Db959867528403cdb382DbECfA3;
address private constant FOUNDER_WALLET = 0xd04a78A2cF122e7bC7F96Bf90FB984000436CFCd;
// string public baseURI;
bool public publicSaleStarted = false;
bool public presaleStarted = false;
uint256 public reservedBalls = 100;
// Private
mapping(address => bool) private _presaleWhiteList;
mapping(address => uint) private _presaleMintedCount;
Counters.Counter private _tokenIdCounter;
Counters.Counter private _reservedBallsClaimed;
string private baseURI;
event BaseURIChanged(string baseURI);
constructor() ERC721("Collect-A-Ball NFT", "CAB") { }
// Modifiers
modifier publicSaleIsLive() {
}
modifier presaleIsLive() {
}
function isOwner() public view returns(bool) {
}
// Mint
function _baseURI() internal view virtual override returns (string memory) {
}
function mint(address _to, uint256 _quantity) public payable publicSaleIsLive {
}
// MARK: Presale
function mintPreSale(uint256 _quantity) public payable presaleIsLive {
require(<FILL_ME>)
require(_presaleMintedCount[msg.sender] <= MAX_MINT_QUANTITY, "Exceeded max mint limit for presale");
require(_presaleMintedCount[msg.sender]+_quantity <= MAX_MINT_QUANTITY, "Minting would exceed presale mint limit. Please decrease quantity");
require(totalSupply() <= MAX_COLLECTION_SIZE, "Collection Sold Out");
require(_quantity > 0, "Need to mint at least one!");
require(_quantity <= MAX_MINT_QUANTITY, "Cannot mint more than max");
require(totalSupply() + _quantity <= MAX_COLLECTION_SIZE, "Minting would exceed max supply, please decrease quantity");
require(_quantity*MINT_PRICE == msg.value, "Incorrect amount of ETH sent");
uint count = _presaleMintedCount[msg.sender];
_presaleMintedCount[msg.sender] = _quantity + count;
for (uint256 i = 0; i < _quantity; i++) {
_tokenIdCounter.increment();
_safeMint(msg.sender, _tokenIdCounter.current());
}
}
function checkPresaleEligibility(address addr) public view returns (bool) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory)
{
}
// MARK: onlyOwner
function setBaseURI(string memory _uri) public onlyOwner {
}
function addToPresaleWhitelist(address[] memory addresses) public onlyOwner {
}
function removeFromWhitelist(address[] memory addresses) public onlyOwner {
}
function claimReserved(address addr, uint256 _quantity) public onlyOwner {
}
function togglePresaleStarted() public onlyOwner {
}
function togglePublicSaleStarted() public onlyOwner {
}
function contractBalance() public view onlyOwner returns(uint256) {
}
function withdrawAll() public onlyOwner {
}
function _withdraw(address _address, uint256 _amount) private {
}
// The following functions are overrides required by Solidity.
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721, ERC721Enumerable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
}
| _presaleWhiteList[msg.sender],"You're are not eligible for Presale" | 359,785 | _presaleWhiteList[msg.sender] |
"Exceeded max mint limit for presale" | pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
contract CollectABall is ERC721, ERC721Enumerable, Ownable {
using Strings for uint256;
using Counters for Counters.Counter;
// Constants
uint256 public constant MAX_COLLECTION_SIZE = 10000;
uint256 public constant MINT_PRICE = 0.08 ether;
uint256 public constant MAX_MINT_QUANTITY = 5;
address private constant ARTIST_WALLET = 0x113Aed406B5f22190726F9C8B51d50e74569A98D;
address private constant DEV_WALLET = 0x291f158F42794Db959867528403cdb382DbECfA3;
address private constant FOUNDER_WALLET = 0xd04a78A2cF122e7bC7F96Bf90FB984000436CFCd;
// string public baseURI;
bool public publicSaleStarted = false;
bool public presaleStarted = false;
uint256 public reservedBalls = 100;
// Private
mapping(address => bool) private _presaleWhiteList;
mapping(address => uint) private _presaleMintedCount;
Counters.Counter private _tokenIdCounter;
Counters.Counter private _reservedBallsClaimed;
string private baseURI;
event BaseURIChanged(string baseURI);
constructor() ERC721("Collect-A-Ball NFT", "CAB") { }
// Modifiers
modifier publicSaleIsLive() {
}
modifier presaleIsLive() {
}
function isOwner() public view returns(bool) {
}
// Mint
function _baseURI() internal view virtual override returns (string memory) {
}
function mint(address _to, uint256 _quantity) public payable publicSaleIsLive {
}
// MARK: Presale
function mintPreSale(uint256 _quantity) public payable presaleIsLive {
require(_presaleWhiteList[msg.sender], "You're are not eligible for Presale");
require(<FILL_ME>)
require(_presaleMintedCount[msg.sender]+_quantity <= MAX_MINT_QUANTITY, "Minting would exceed presale mint limit. Please decrease quantity");
require(totalSupply() <= MAX_COLLECTION_SIZE, "Collection Sold Out");
require(_quantity > 0, "Need to mint at least one!");
require(_quantity <= MAX_MINT_QUANTITY, "Cannot mint more than max");
require(totalSupply() + _quantity <= MAX_COLLECTION_SIZE, "Minting would exceed max supply, please decrease quantity");
require(_quantity*MINT_PRICE == msg.value, "Incorrect amount of ETH sent");
uint count = _presaleMintedCount[msg.sender];
_presaleMintedCount[msg.sender] = _quantity + count;
for (uint256 i = 0; i < _quantity; i++) {
_tokenIdCounter.increment();
_safeMint(msg.sender, _tokenIdCounter.current());
}
}
function checkPresaleEligibility(address addr) public view returns (bool) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory)
{
}
// MARK: onlyOwner
function setBaseURI(string memory _uri) public onlyOwner {
}
function addToPresaleWhitelist(address[] memory addresses) public onlyOwner {
}
function removeFromWhitelist(address[] memory addresses) public onlyOwner {
}
function claimReserved(address addr, uint256 _quantity) public onlyOwner {
}
function togglePresaleStarted() public onlyOwner {
}
function togglePublicSaleStarted() public onlyOwner {
}
function contractBalance() public view onlyOwner returns(uint256) {
}
function withdrawAll() public onlyOwner {
}
function _withdraw(address _address, uint256 _amount) private {
}
// The following functions are overrides required by Solidity.
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721, ERC721Enumerable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
}
| _presaleMintedCount[msg.sender]<=MAX_MINT_QUANTITY,"Exceeded max mint limit for presale" | 359,785 | _presaleMintedCount[msg.sender]<=MAX_MINT_QUANTITY |
"Minting would exceed presale mint limit. Please decrease quantity" | pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
contract CollectABall is ERC721, ERC721Enumerable, Ownable {
using Strings for uint256;
using Counters for Counters.Counter;
// Constants
uint256 public constant MAX_COLLECTION_SIZE = 10000;
uint256 public constant MINT_PRICE = 0.08 ether;
uint256 public constant MAX_MINT_QUANTITY = 5;
address private constant ARTIST_WALLET = 0x113Aed406B5f22190726F9C8B51d50e74569A98D;
address private constant DEV_WALLET = 0x291f158F42794Db959867528403cdb382DbECfA3;
address private constant FOUNDER_WALLET = 0xd04a78A2cF122e7bC7F96Bf90FB984000436CFCd;
// string public baseURI;
bool public publicSaleStarted = false;
bool public presaleStarted = false;
uint256 public reservedBalls = 100;
// Private
mapping(address => bool) private _presaleWhiteList;
mapping(address => uint) private _presaleMintedCount;
Counters.Counter private _tokenIdCounter;
Counters.Counter private _reservedBallsClaimed;
string private baseURI;
event BaseURIChanged(string baseURI);
constructor() ERC721("Collect-A-Ball NFT", "CAB") { }
// Modifiers
modifier publicSaleIsLive() {
}
modifier presaleIsLive() {
}
function isOwner() public view returns(bool) {
}
// Mint
function _baseURI() internal view virtual override returns (string memory) {
}
function mint(address _to, uint256 _quantity) public payable publicSaleIsLive {
}
// MARK: Presale
function mintPreSale(uint256 _quantity) public payable presaleIsLive {
require(_presaleWhiteList[msg.sender], "You're are not eligible for Presale");
require(_presaleMintedCount[msg.sender] <= MAX_MINT_QUANTITY, "Exceeded max mint limit for presale");
require(<FILL_ME>)
require(totalSupply() <= MAX_COLLECTION_SIZE, "Collection Sold Out");
require(_quantity > 0, "Need to mint at least one!");
require(_quantity <= MAX_MINT_QUANTITY, "Cannot mint more than max");
require(totalSupply() + _quantity <= MAX_COLLECTION_SIZE, "Minting would exceed max supply, please decrease quantity");
require(_quantity*MINT_PRICE == msg.value, "Incorrect amount of ETH sent");
uint count = _presaleMintedCount[msg.sender];
_presaleMintedCount[msg.sender] = _quantity + count;
for (uint256 i = 0; i < _quantity; i++) {
_tokenIdCounter.increment();
_safeMint(msg.sender, _tokenIdCounter.current());
}
}
function checkPresaleEligibility(address addr) public view returns (bool) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory)
{
}
// MARK: onlyOwner
function setBaseURI(string memory _uri) public onlyOwner {
}
function addToPresaleWhitelist(address[] memory addresses) public onlyOwner {
}
function removeFromWhitelist(address[] memory addresses) public onlyOwner {
}
function claimReserved(address addr, uint256 _quantity) public onlyOwner {
}
function togglePresaleStarted() public onlyOwner {
}
function togglePublicSaleStarted() public onlyOwner {
}
function contractBalance() public view onlyOwner returns(uint256) {
}
function withdrawAll() public onlyOwner {
}
function _withdraw(address _address, uint256 _amount) private {
}
// The following functions are overrides required by Solidity.
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721, ERC721Enumerable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
}
| _presaleMintedCount[msg.sender]+_quantity<=MAX_MINT_QUANTITY,"Minting would exceed presale mint limit. Please decrease quantity" | 359,785 | _presaleMintedCount[msg.sender]+_quantity<=MAX_MINT_QUANTITY |
"Collection Sold Out" | pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
contract CollectABall is ERC721, ERC721Enumerable, Ownable {
using Strings for uint256;
using Counters for Counters.Counter;
// Constants
uint256 public constant MAX_COLLECTION_SIZE = 10000;
uint256 public constant MINT_PRICE = 0.08 ether;
uint256 public constant MAX_MINT_QUANTITY = 5;
address private constant ARTIST_WALLET = 0x113Aed406B5f22190726F9C8B51d50e74569A98D;
address private constant DEV_WALLET = 0x291f158F42794Db959867528403cdb382DbECfA3;
address private constant FOUNDER_WALLET = 0xd04a78A2cF122e7bC7F96Bf90FB984000436CFCd;
// string public baseURI;
bool public publicSaleStarted = false;
bool public presaleStarted = false;
uint256 public reservedBalls = 100;
// Private
mapping(address => bool) private _presaleWhiteList;
mapping(address => uint) private _presaleMintedCount;
Counters.Counter private _tokenIdCounter;
Counters.Counter private _reservedBallsClaimed;
string private baseURI;
event BaseURIChanged(string baseURI);
constructor() ERC721("Collect-A-Ball NFT", "CAB") { }
// Modifiers
modifier publicSaleIsLive() {
}
modifier presaleIsLive() {
}
function isOwner() public view returns(bool) {
}
// Mint
function _baseURI() internal view virtual override returns (string memory) {
}
function mint(address _to, uint256 _quantity) public payable publicSaleIsLive {
}
// MARK: Presale
function mintPreSale(uint256 _quantity) public payable presaleIsLive {
require(_presaleWhiteList[msg.sender], "You're are not eligible for Presale");
require(_presaleMintedCount[msg.sender] <= MAX_MINT_QUANTITY, "Exceeded max mint limit for presale");
require(_presaleMintedCount[msg.sender]+_quantity <= MAX_MINT_QUANTITY, "Minting would exceed presale mint limit. Please decrease quantity");
require(<FILL_ME>)
require(_quantity > 0, "Need to mint at least one!");
require(_quantity <= MAX_MINT_QUANTITY, "Cannot mint more than max");
require(totalSupply() + _quantity <= MAX_COLLECTION_SIZE, "Minting would exceed max supply, please decrease quantity");
require(_quantity*MINT_PRICE == msg.value, "Incorrect amount of ETH sent");
uint count = _presaleMintedCount[msg.sender];
_presaleMintedCount[msg.sender] = _quantity + count;
for (uint256 i = 0; i < _quantity; i++) {
_tokenIdCounter.increment();
_safeMint(msg.sender, _tokenIdCounter.current());
}
}
function checkPresaleEligibility(address addr) public view returns (bool) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory)
{
}
// MARK: onlyOwner
function setBaseURI(string memory _uri) public onlyOwner {
}
function addToPresaleWhitelist(address[] memory addresses) public onlyOwner {
}
function removeFromWhitelist(address[] memory addresses) public onlyOwner {
}
function claimReserved(address addr, uint256 _quantity) public onlyOwner {
}
function togglePresaleStarted() public onlyOwner {
}
function togglePublicSaleStarted() public onlyOwner {
}
function contractBalance() public view onlyOwner returns(uint256) {
}
function withdrawAll() public onlyOwner {
}
function _withdraw(address _address, uint256 _amount) private {
}
// The following functions are overrides required by Solidity.
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721, ERC721Enumerable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
}
| totalSupply()<=MAX_COLLECTION_SIZE,"Collection Sold Out" | 359,785 | totalSupply()<=MAX_COLLECTION_SIZE |
"Minting would exceed max supply, please decrease quantity" | pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
contract CollectABall is ERC721, ERC721Enumerable, Ownable {
using Strings for uint256;
using Counters for Counters.Counter;
// Constants
uint256 public constant MAX_COLLECTION_SIZE = 10000;
uint256 public constant MINT_PRICE = 0.08 ether;
uint256 public constant MAX_MINT_QUANTITY = 5;
address private constant ARTIST_WALLET = 0x113Aed406B5f22190726F9C8B51d50e74569A98D;
address private constant DEV_WALLET = 0x291f158F42794Db959867528403cdb382DbECfA3;
address private constant FOUNDER_WALLET = 0xd04a78A2cF122e7bC7F96Bf90FB984000436CFCd;
// string public baseURI;
bool public publicSaleStarted = false;
bool public presaleStarted = false;
uint256 public reservedBalls = 100;
// Private
mapping(address => bool) private _presaleWhiteList;
mapping(address => uint) private _presaleMintedCount;
Counters.Counter private _tokenIdCounter;
Counters.Counter private _reservedBallsClaimed;
string private baseURI;
event BaseURIChanged(string baseURI);
constructor() ERC721("Collect-A-Ball NFT", "CAB") { }
// Modifiers
modifier publicSaleIsLive() {
}
modifier presaleIsLive() {
}
function isOwner() public view returns(bool) {
}
// Mint
function _baseURI() internal view virtual override returns (string memory) {
}
function mint(address _to, uint256 _quantity) public payable publicSaleIsLive {
}
// MARK: Presale
function mintPreSale(uint256 _quantity) public payable presaleIsLive {
require(_presaleWhiteList[msg.sender], "You're are not eligible for Presale");
require(_presaleMintedCount[msg.sender] <= MAX_MINT_QUANTITY, "Exceeded max mint limit for presale");
require(_presaleMintedCount[msg.sender]+_quantity <= MAX_MINT_QUANTITY, "Minting would exceed presale mint limit. Please decrease quantity");
require(totalSupply() <= MAX_COLLECTION_SIZE, "Collection Sold Out");
require(_quantity > 0, "Need to mint at least one!");
require(_quantity <= MAX_MINT_QUANTITY, "Cannot mint more than max");
require(<FILL_ME>)
require(_quantity*MINT_PRICE == msg.value, "Incorrect amount of ETH sent");
uint count = _presaleMintedCount[msg.sender];
_presaleMintedCount[msg.sender] = _quantity + count;
for (uint256 i = 0; i < _quantity; i++) {
_tokenIdCounter.increment();
_safeMint(msg.sender, _tokenIdCounter.current());
}
}
function checkPresaleEligibility(address addr) public view returns (bool) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory)
{
}
// MARK: onlyOwner
function setBaseURI(string memory _uri) public onlyOwner {
}
function addToPresaleWhitelist(address[] memory addresses) public onlyOwner {
}
function removeFromWhitelist(address[] memory addresses) public onlyOwner {
}
function claimReserved(address addr, uint256 _quantity) public onlyOwner {
}
function togglePresaleStarted() public onlyOwner {
}
function togglePublicSaleStarted() public onlyOwner {
}
function contractBalance() public view onlyOwner returns(uint256) {
}
function withdrawAll() public onlyOwner {
}
function _withdraw(address _address, uint256 _amount) private {
}
// The following functions are overrides required by Solidity.
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721, ERC721Enumerable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
}
| totalSupply()+_quantity<=MAX_COLLECTION_SIZE,"Minting would exceed max supply, please decrease quantity" | 359,785 | totalSupply()+_quantity<=MAX_COLLECTION_SIZE |
"Incorrect amount of ETH sent" | pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
contract CollectABall is ERC721, ERC721Enumerable, Ownable {
using Strings for uint256;
using Counters for Counters.Counter;
// Constants
uint256 public constant MAX_COLLECTION_SIZE = 10000;
uint256 public constant MINT_PRICE = 0.08 ether;
uint256 public constant MAX_MINT_QUANTITY = 5;
address private constant ARTIST_WALLET = 0x113Aed406B5f22190726F9C8B51d50e74569A98D;
address private constant DEV_WALLET = 0x291f158F42794Db959867528403cdb382DbECfA3;
address private constant FOUNDER_WALLET = 0xd04a78A2cF122e7bC7F96Bf90FB984000436CFCd;
// string public baseURI;
bool public publicSaleStarted = false;
bool public presaleStarted = false;
uint256 public reservedBalls = 100;
// Private
mapping(address => bool) private _presaleWhiteList;
mapping(address => uint) private _presaleMintedCount;
Counters.Counter private _tokenIdCounter;
Counters.Counter private _reservedBallsClaimed;
string private baseURI;
event BaseURIChanged(string baseURI);
constructor() ERC721("Collect-A-Ball NFT", "CAB") { }
// Modifiers
modifier publicSaleIsLive() {
}
modifier presaleIsLive() {
}
function isOwner() public view returns(bool) {
}
// Mint
function _baseURI() internal view virtual override returns (string memory) {
}
function mint(address _to, uint256 _quantity) public payable publicSaleIsLive {
}
// MARK: Presale
function mintPreSale(uint256 _quantity) public payable presaleIsLive {
require(_presaleWhiteList[msg.sender], "You're are not eligible for Presale");
require(_presaleMintedCount[msg.sender] <= MAX_MINT_QUANTITY, "Exceeded max mint limit for presale");
require(_presaleMintedCount[msg.sender]+_quantity <= MAX_MINT_QUANTITY, "Minting would exceed presale mint limit. Please decrease quantity");
require(totalSupply() <= MAX_COLLECTION_SIZE, "Collection Sold Out");
require(_quantity > 0, "Need to mint at least one!");
require(_quantity <= MAX_MINT_QUANTITY, "Cannot mint more than max");
require(totalSupply() + _quantity <= MAX_COLLECTION_SIZE, "Minting would exceed max supply, please decrease quantity");
require(<FILL_ME>)
uint count = _presaleMintedCount[msg.sender];
_presaleMintedCount[msg.sender] = _quantity + count;
for (uint256 i = 0; i < _quantity; i++) {
_tokenIdCounter.increment();
_safeMint(msg.sender, _tokenIdCounter.current());
}
}
function checkPresaleEligibility(address addr) public view returns (bool) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory)
{
}
// MARK: onlyOwner
function setBaseURI(string memory _uri) public onlyOwner {
}
function addToPresaleWhitelist(address[] memory addresses) public onlyOwner {
}
function removeFromWhitelist(address[] memory addresses) public onlyOwner {
}
function claimReserved(address addr, uint256 _quantity) public onlyOwner {
}
function togglePresaleStarted() public onlyOwner {
}
function togglePublicSaleStarted() public onlyOwner {
}
function contractBalance() public view onlyOwner returns(uint256) {
}
function withdrawAll() public onlyOwner {
}
function _withdraw(address _address, uint256 _amount) private {
}
// The following functions are overrides required by Solidity.
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721, ERC721Enumerable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
}
| _quantity*MINT_PRICE==msg.value,"Incorrect amount of ETH sent" | 359,785 | _quantity*MINT_PRICE==msg.value |
"Collection has sold out" | pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
contract CollectABall is ERC721, ERC721Enumerable, Ownable {
using Strings for uint256;
using Counters for Counters.Counter;
// Constants
uint256 public constant MAX_COLLECTION_SIZE = 10000;
uint256 public constant MINT_PRICE = 0.08 ether;
uint256 public constant MAX_MINT_QUANTITY = 5;
address private constant ARTIST_WALLET = 0x113Aed406B5f22190726F9C8B51d50e74569A98D;
address private constant DEV_WALLET = 0x291f158F42794Db959867528403cdb382DbECfA3;
address private constant FOUNDER_WALLET = 0xd04a78A2cF122e7bC7F96Bf90FB984000436CFCd;
// string public baseURI;
bool public publicSaleStarted = false;
bool public presaleStarted = false;
uint256 public reservedBalls = 100;
// Private
mapping(address => bool) private _presaleWhiteList;
mapping(address => uint) private _presaleMintedCount;
Counters.Counter private _tokenIdCounter;
Counters.Counter private _reservedBallsClaimed;
string private baseURI;
event BaseURIChanged(string baseURI);
constructor() ERC721("Collect-A-Ball NFT", "CAB") { }
// Modifiers
modifier publicSaleIsLive() {
}
modifier presaleIsLive() {
}
function isOwner() public view returns(bool) {
}
// Mint
function _baseURI() internal view virtual override returns (string memory) {
}
function mint(address _to, uint256 _quantity) public payable publicSaleIsLive {
}
// MARK: Presale
function mintPreSale(uint256 _quantity) public payable presaleIsLive {
}
function checkPresaleEligibility(address addr) public view returns (bool) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory)
{
}
// MARK: onlyOwner
function setBaseURI(string memory _uri) public onlyOwner {
}
function addToPresaleWhitelist(address[] memory addresses) public onlyOwner {
}
function removeFromWhitelist(address[] memory addresses) public onlyOwner {
}
function claimReserved(address addr, uint256 _quantity) public onlyOwner {
require(<FILL_ME>)
require(_quantity + _tokenIdCounter.current() < MAX_COLLECTION_SIZE, "Minting would exceed 10,000, please decrease your quantity");
require(_reservedBallsClaimed.current() < reservedBalls, "Already minted all of the reserved balls");
require(_quantity + _reservedBallsClaimed.current() <= reservedBalls, "Minting would exceed the limit of reserved balls. Please decrease quantity.");
for(uint256 i = 0; i < _quantity; i++) {
_tokenIdCounter.increment();
_mint(addr, _tokenIdCounter.current());
_reservedBallsClaimed.increment();
}
}
function togglePresaleStarted() public onlyOwner {
}
function togglePublicSaleStarted() public onlyOwner {
}
function contractBalance() public view onlyOwner returns(uint256) {
}
function withdrawAll() public onlyOwner {
}
function _withdraw(address _address, uint256 _amount) private {
}
// The following functions are overrides required by Solidity.
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721, ERC721Enumerable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
}
| _tokenIdCounter.current()<MAX_COLLECTION_SIZE,"Collection has sold out" | 359,785 | _tokenIdCounter.current()<MAX_COLLECTION_SIZE |
"Minting would exceed 10,000, please decrease your quantity" | pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
contract CollectABall is ERC721, ERC721Enumerable, Ownable {
using Strings for uint256;
using Counters for Counters.Counter;
// Constants
uint256 public constant MAX_COLLECTION_SIZE = 10000;
uint256 public constant MINT_PRICE = 0.08 ether;
uint256 public constant MAX_MINT_QUANTITY = 5;
address private constant ARTIST_WALLET = 0x113Aed406B5f22190726F9C8B51d50e74569A98D;
address private constant DEV_WALLET = 0x291f158F42794Db959867528403cdb382DbECfA3;
address private constant FOUNDER_WALLET = 0xd04a78A2cF122e7bC7F96Bf90FB984000436CFCd;
// string public baseURI;
bool public publicSaleStarted = false;
bool public presaleStarted = false;
uint256 public reservedBalls = 100;
// Private
mapping(address => bool) private _presaleWhiteList;
mapping(address => uint) private _presaleMintedCount;
Counters.Counter private _tokenIdCounter;
Counters.Counter private _reservedBallsClaimed;
string private baseURI;
event BaseURIChanged(string baseURI);
constructor() ERC721("Collect-A-Ball NFT", "CAB") { }
// Modifiers
modifier publicSaleIsLive() {
}
modifier presaleIsLive() {
}
function isOwner() public view returns(bool) {
}
// Mint
function _baseURI() internal view virtual override returns (string memory) {
}
function mint(address _to, uint256 _quantity) public payable publicSaleIsLive {
}
// MARK: Presale
function mintPreSale(uint256 _quantity) public payable presaleIsLive {
}
function checkPresaleEligibility(address addr) public view returns (bool) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory)
{
}
// MARK: onlyOwner
function setBaseURI(string memory _uri) public onlyOwner {
}
function addToPresaleWhitelist(address[] memory addresses) public onlyOwner {
}
function removeFromWhitelist(address[] memory addresses) public onlyOwner {
}
function claimReserved(address addr, uint256 _quantity) public onlyOwner {
require(_tokenIdCounter.current() < MAX_COLLECTION_SIZE, "Collection has sold out");
require(<FILL_ME>)
require(_reservedBallsClaimed.current() < reservedBalls, "Already minted all of the reserved balls");
require(_quantity + _reservedBallsClaimed.current() <= reservedBalls, "Minting would exceed the limit of reserved balls. Please decrease quantity.");
for(uint256 i = 0; i < _quantity; i++) {
_tokenIdCounter.increment();
_mint(addr, _tokenIdCounter.current());
_reservedBallsClaimed.increment();
}
}
function togglePresaleStarted() public onlyOwner {
}
function togglePublicSaleStarted() public onlyOwner {
}
function contractBalance() public view onlyOwner returns(uint256) {
}
function withdrawAll() public onlyOwner {
}
function _withdraw(address _address, uint256 _amount) private {
}
// The following functions are overrides required by Solidity.
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721, ERC721Enumerable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
}
| _quantity+_tokenIdCounter.current()<MAX_COLLECTION_SIZE,"Minting would exceed 10,000, please decrease your quantity" | 359,785 | _quantity+_tokenIdCounter.current()<MAX_COLLECTION_SIZE |
"Already minted all of the reserved balls" | pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
contract CollectABall is ERC721, ERC721Enumerable, Ownable {
using Strings for uint256;
using Counters for Counters.Counter;
// Constants
uint256 public constant MAX_COLLECTION_SIZE = 10000;
uint256 public constant MINT_PRICE = 0.08 ether;
uint256 public constant MAX_MINT_QUANTITY = 5;
address private constant ARTIST_WALLET = 0x113Aed406B5f22190726F9C8B51d50e74569A98D;
address private constant DEV_WALLET = 0x291f158F42794Db959867528403cdb382DbECfA3;
address private constant FOUNDER_WALLET = 0xd04a78A2cF122e7bC7F96Bf90FB984000436CFCd;
// string public baseURI;
bool public publicSaleStarted = false;
bool public presaleStarted = false;
uint256 public reservedBalls = 100;
// Private
mapping(address => bool) private _presaleWhiteList;
mapping(address => uint) private _presaleMintedCount;
Counters.Counter private _tokenIdCounter;
Counters.Counter private _reservedBallsClaimed;
string private baseURI;
event BaseURIChanged(string baseURI);
constructor() ERC721("Collect-A-Ball NFT", "CAB") { }
// Modifiers
modifier publicSaleIsLive() {
}
modifier presaleIsLive() {
}
function isOwner() public view returns(bool) {
}
// Mint
function _baseURI() internal view virtual override returns (string memory) {
}
function mint(address _to, uint256 _quantity) public payable publicSaleIsLive {
}
// MARK: Presale
function mintPreSale(uint256 _quantity) public payable presaleIsLive {
}
function checkPresaleEligibility(address addr) public view returns (bool) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory)
{
}
// MARK: onlyOwner
function setBaseURI(string memory _uri) public onlyOwner {
}
function addToPresaleWhitelist(address[] memory addresses) public onlyOwner {
}
function removeFromWhitelist(address[] memory addresses) public onlyOwner {
}
function claimReserved(address addr, uint256 _quantity) public onlyOwner {
require(_tokenIdCounter.current() < MAX_COLLECTION_SIZE, "Collection has sold out");
require(_quantity + _tokenIdCounter.current() < MAX_COLLECTION_SIZE, "Minting would exceed 10,000, please decrease your quantity");
require(<FILL_ME>)
require(_quantity + _reservedBallsClaimed.current() <= reservedBalls, "Minting would exceed the limit of reserved balls. Please decrease quantity.");
for(uint256 i = 0; i < _quantity; i++) {
_tokenIdCounter.increment();
_mint(addr, _tokenIdCounter.current());
_reservedBallsClaimed.increment();
}
}
function togglePresaleStarted() public onlyOwner {
}
function togglePublicSaleStarted() public onlyOwner {
}
function contractBalance() public view onlyOwner returns(uint256) {
}
function withdrawAll() public onlyOwner {
}
function _withdraw(address _address, uint256 _amount) private {
}
// The following functions are overrides required by Solidity.
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721, ERC721Enumerable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
}
| _reservedBallsClaimed.current()<reservedBalls,"Already minted all of the reserved balls" | 359,785 | _reservedBallsClaimed.current()<reservedBalls |
"Minting would exceed the limit of reserved balls. Please decrease quantity." | pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
contract CollectABall is ERC721, ERC721Enumerable, Ownable {
using Strings for uint256;
using Counters for Counters.Counter;
// Constants
uint256 public constant MAX_COLLECTION_SIZE = 10000;
uint256 public constant MINT_PRICE = 0.08 ether;
uint256 public constant MAX_MINT_QUANTITY = 5;
address private constant ARTIST_WALLET = 0x113Aed406B5f22190726F9C8B51d50e74569A98D;
address private constant DEV_WALLET = 0x291f158F42794Db959867528403cdb382DbECfA3;
address private constant FOUNDER_WALLET = 0xd04a78A2cF122e7bC7F96Bf90FB984000436CFCd;
// string public baseURI;
bool public publicSaleStarted = false;
bool public presaleStarted = false;
uint256 public reservedBalls = 100;
// Private
mapping(address => bool) private _presaleWhiteList;
mapping(address => uint) private _presaleMintedCount;
Counters.Counter private _tokenIdCounter;
Counters.Counter private _reservedBallsClaimed;
string private baseURI;
event BaseURIChanged(string baseURI);
constructor() ERC721("Collect-A-Ball NFT", "CAB") { }
// Modifiers
modifier publicSaleIsLive() {
}
modifier presaleIsLive() {
}
function isOwner() public view returns(bool) {
}
// Mint
function _baseURI() internal view virtual override returns (string memory) {
}
function mint(address _to, uint256 _quantity) public payable publicSaleIsLive {
}
// MARK: Presale
function mintPreSale(uint256 _quantity) public payable presaleIsLive {
}
function checkPresaleEligibility(address addr) public view returns (bool) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory)
{
}
// MARK: onlyOwner
function setBaseURI(string memory _uri) public onlyOwner {
}
function addToPresaleWhitelist(address[] memory addresses) public onlyOwner {
}
function removeFromWhitelist(address[] memory addresses) public onlyOwner {
}
function claimReserved(address addr, uint256 _quantity) public onlyOwner {
require(_tokenIdCounter.current() < MAX_COLLECTION_SIZE, "Collection has sold out");
require(_quantity + _tokenIdCounter.current() < MAX_COLLECTION_SIZE, "Minting would exceed 10,000, please decrease your quantity");
require(_reservedBallsClaimed.current() < reservedBalls, "Already minted all of the reserved balls");
require(<FILL_ME>)
for(uint256 i = 0; i < _quantity; i++) {
_tokenIdCounter.increment();
_mint(addr, _tokenIdCounter.current());
_reservedBallsClaimed.increment();
}
}
function togglePresaleStarted() public onlyOwner {
}
function togglePublicSaleStarted() public onlyOwner {
}
function contractBalance() public view onlyOwner returns(uint256) {
}
function withdrawAll() public onlyOwner {
}
function _withdraw(address _address, uint256 _amount) private {
}
// The following functions are overrides required by Solidity.
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721, ERC721Enumerable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
}
| _quantity+_reservedBallsClaimed.current()<=reservedBalls,"Minting would exceed the limit of reserved balls. Please decrease quantity." | 359,785 | _quantity+_reservedBallsClaimed.current()<=reservedBalls |
"Supply Max Reached" | pragma solidity ^0.5.16;
interface IERC20 {
function totalSupply() external view returns (uint);
function balanceOf(address account) external view returns (uint);
function transfer(address recipient, uint amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint);
function approve(address spender, uint amount) external returns (bool);
function transferFrom(address sender, address recipient, uint amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint value);
event Approval(address indexed owner, address indexed spender, uint value);
}
contract Context {
constructor () internal { }
// solhint-disable-previous-line no-empty-blocks
function _msgSender() internal view returns (address payable) {
}
}
contract ERC20 is Context, IERC20 {
using SafeMath for uint;
mapping (address => uint) private _balances;
mapping (address => mapping (address => uint)) private _allowances;
uint private _totalSupply;
function totalSupply() public view returns (uint) {
}
function balanceOf(address account) public view returns (uint) {
}
function transfer(address recipient, uint amount) public returns (bool) {
}
function allowance(address owner, address spender) public view returns (uint) {
}
function approve(address spender, uint amount) public returns (bool) {
}
function transferFrom(address sender, address recipient, uint amount) public returns (bool) {
}
function increaseAllowance(address spender, uint addedValue) public returns (bool) {
}
function decreaseAllowance(address spender, uint subtractedValue) public returns (bool) {
}
function _transfer(address sender, address recipient, uint amount) internal {
}
function _mint(address account, uint amount) internal {
}
function _burn(address account, uint amount) internal {
}
function _approve(address owner, address spender, uint amount) internal {
}
}
contract ERC20Detailed is IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
uint256 private TokenmaxSupply = 2500*10**18;
constructor (string memory name, string memory symbol, uint8 decimals) public {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
function maxSupply() public view returns (uint256) {
}
}
library SafeMath {
function add(uint a, uint b) internal pure returns (uint) {
}
function sub(uint a, uint b) internal pure returns (uint) {
}
function sub(uint a, uint b, string memory errorMessage) internal pure returns (uint) {
}
function mul(uint a, uint b) internal pure returns (uint) {
}
function div(uint a, uint b) internal pure returns (uint) {
}
function div(uint a, uint b, string memory errorMessage) internal pure returns (uint) {
}
}
library Address {
function isContract(address account) internal view returns (bool) {
}
}
library SafeERC20 {
using SafeMath for uint;
using Address for address;
function safeTransfer(IERC20 token, address to, uint value) internal {
}
function safeTransferFrom(IERC20 token, address from, address to, uint value) internal {
}
function safeApprove(IERC20 token, address spender, uint value) internal {
}
function callOptionalReturn(IERC20 token, bytes memory data) private {
}
}
contract YFIG is ERC20, ERC20Detailed {
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint;
address public governance;
mapping (address => bool) public minters;
constructor () public ERC20Detailed("yfipaprika.finance", "YFIG", 18) {
}
function mint(address account, uint256 amount) public {
require(<FILL_ME>)
require(minters[msg.sender], "!minter");
_mint(account, amount);
}
function burn(uint256 amount) external {
}
function setGovernance(address _governance) public {
}
function addMinter(address _minter) public {
}
function removeMinter(address _minter) public {
}
}
| totalSupply()+amount<=maxSupply(),"Supply Max Reached" | 359,786 | totalSupply()+amount<=maxSupply() |
null | pragma solidity ^0.4.24;
contract SafeMath {
function safeSub(uint256 a, uint256 b) public pure returns (uint256) {
}
function safeAdd(uint256 a, uint256 b) public pure returns (uint256) {
}
}
contract ERC20Interface {
function totalSupply() public constant returns (uint);
function balanceOf(address tokenOwner) public constant returns (uint balance);
function allowance(address tokenOwner, address spender) public constant returns (uint remaining);
function transfer(address to, uint tokens) public returns (bool success);
function approve(address spender, uint tokens) public returns (bool success);
function transferFrom(address from, address to, uint tokens) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}
contract SBC is ERC20Interface, SafeMath {
string public name;
string public symbol;
uint8 public decimals;
uint public _totalSupply;
address public owner;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
mapping(address => uint256) freezes;
event Burn(address indexed from, uint256 value);
event Mint(address indexed from, uint256 value);
event Freeze(address indexed from, uint256 value);
event Unfreeze(address indexed from, uint256 value);
event TransferOwnership(address indexed oldOwner, address indexed newOwner);
constructor(uint initialSupply, string tokenName, uint8 decimalUnits, string tokenSymbol) public {
}
function totalSupply() public constant returns (uint) {
}
function balanceOf(address _tokenOwner) public constant returns (uint balance) {
}
function allowance(address _tokenOwner, address _spender) public constant returns (uint256 remaining) {
}
function transfer(address to, uint tokens) public returns (bool success) {
}
function approve(address spender, uint tokens) public returns (bool success) {
}
function transferFrom(address from, address to, uint tokens) public returns (bool success) {
}
function freezeOf(address _tokenOwner) public constant returns (uint) {
}
function freeze(address account, uint256 tokens) public returns (bool success) {
require(msg.sender == owner); // only owner
require(<FILL_ME>) // Check if the sender has enough
require(tokens > 0);
balances[account] = safeSub(balances[account], tokens); // Subtract from the sender
freezes[account] = safeAdd(freezes[account], tokens); // Updates freeze
emit Freeze(account, tokens);
return true;
}
function unfreeze(address account, uint256 tokens) public returns (bool success) {
}
function burn(uint256 tokens) public returns (bool success) {
}
function mint(uint256 tokens) public returns (bool success) {
}
function transferOwnership(address newOwner) public returns (bool success) {
}
function() public payable {
}
}
| balances[account]>=tokens | 359,822 | balances[account]>=tokens |
null | pragma solidity ^0.4.24;
contract SafeMath {
function safeSub(uint256 a, uint256 b) public pure returns (uint256) {
}
function safeAdd(uint256 a, uint256 b) public pure returns (uint256) {
}
}
contract ERC20Interface {
function totalSupply() public constant returns (uint);
function balanceOf(address tokenOwner) public constant returns (uint balance);
function allowance(address tokenOwner, address spender) public constant returns (uint remaining);
function transfer(address to, uint tokens) public returns (bool success);
function approve(address spender, uint tokens) public returns (bool success);
function transferFrom(address from, address to, uint tokens) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}
contract SBC is ERC20Interface, SafeMath {
string public name;
string public symbol;
uint8 public decimals;
uint public _totalSupply;
address public owner;
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
mapping(address => uint256) freezes;
event Burn(address indexed from, uint256 value);
event Mint(address indexed from, uint256 value);
event Freeze(address indexed from, uint256 value);
event Unfreeze(address indexed from, uint256 value);
event TransferOwnership(address indexed oldOwner, address indexed newOwner);
constructor(uint initialSupply, string tokenName, uint8 decimalUnits, string tokenSymbol) public {
}
function totalSupply() public constant returns (uint) {
}
function balanceOf(address _tokenOwner) public constant returns (uint balance) {
}
function allowance(address _tokenOwner, address _spender) public constant returns (uint256 remaining) {
}
function transfer(address to, uint tokens) public returns (bool success) {
}
function approve(address spender, uint tokens) public returns (bool success) {
}
function transferFrom(address from, address to, uint tokens) public returns (bool success) {
}
function freezeOf(address _tokenOwner) public constant returns (uint) {
}
function freeze(address account, uint256 tokens) public returns (bool success) {
}
function unfreeze(address account, uint256 tokens) public returns (bool success) {
require(msg.sender == owner); // only owner
require(<FILL_ME>) // Check if the sender has enough
require(tokens > 0);
freezes[account] = safeSub(freezes[account], tokens); // Subtract from the sender
balances[account] = safeAdd(balances[account], tokens); // Updates balance
emit Unfreeze(account, tokens);
return true;
}
function burn(uint256 tokens) public returns (bool success) {
}
function mint(uint256 tokens) public returns (bool success) {
}
function transferOwnership(address newOwner) public returns (bool success) {
}
function() public payable {
}
}
| freezes[account]>=tokens | 359,822 | freezes[account]>=tokens |
"lender contracts already wired" | // Verified using https://dapp.tools
// hevm: flattened sources of src/lender/deployer.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.7.6;
////// src/fixed_point.sol
/* pragma solidity >=0.7.6; */
abstract contract FixedPoint {
struct Fixed27 {
uint value;
}
}
////// src/lender/fabs/interfaces.sol
/* pragma solidity >=0.7.6; */
interface ReserveFabLike_1 {
function newReserve(address) external returns (address);
}
interface AssessorFabLike_2 {
function newAssessor() external returns (address);
}
interface TrancheFabLike_1 {
function newTranche(address, address) external returns (address);
}
interface CoordinatorFabLike_2 {
function newCoordinator(uint) external returns (address);
}
interface OperatorFabLike_1 {
function newOperator(address) external returns (address);
}
interface MemberlistFabLike_1 {
function newMemberlist() external returns (address);
}
interface RestrictedTokenFabLike_1 {
function newRestrictedToken(string calldata, string calldata) external returns (address);
}
interface PoolAdminFabLike {
function newPoolAdmin() external returns (address);
}
interface ClerkFabLike {
function newClerk(address, address) external returns (address);
}
interface TinlakeManagerFabLike {
function newTinlakeManager(address, address, address, address, address, address, address, address) external returns (address);
}
////// src/lender/deployer.sol
/* pragma solidity >=0.7.6; */
/* import { ReserveFabLike, AssessorFabLike, TrancheFabLike, CoordinatorFabLike, OperatorFabLike, MemberlistFabLike, RestrictedTokenFabLike, PoolAdminFabLike, ClerkFabLike } from "./fabs/interfaces.sol"; */
/* import {FixedPoint} from "./../fixed_point.sol"; */
interface DependLike_3 {
function depend(bytes32, address) external;
}
interface AuthLike_3 {
function rely(address) external;
function deny(address) external;
}
interface MemberlistLike_4 {
function updateMember(address, uint) external;
}
interface FileLike_3 {
function file(bytes32 name, uint value) external;
}
interface PoolAdminLike_2 {
function rely(address) external;
}
contract LenderDeployer is FixedPoint {
address public immutable root;
address public immutable currency;
address public immutable memberAdmin;
// factory contracts
TrancheFabLike_1 public immutable trancheFab;
ReserveFabLike_1 public immutable reserveFab;
AssessorFabLike_2 public immutable assessorFab;
CoordinatorFabLike_2 public immutable coordinatorFab;
OperatorFabLike_1 public immutable operatorFab;
MemberlistFabLike_1 public immutable memberlistFab;
RestrictedTokenFabLike_1 public immutable restrictedTokenFab;
PoolAdminFabLike public immutable poolAdminFab;
// lender state variables
Fixed27 public minSeniorRatio;
Fixed27 public maxSeniorRatio;
uint public maxReserve;
uint public challengeTime;
Fixed27 public seniorInterestRate;
// contract addresses
address public adapterDeployer;
address public assessor;
address public poolAdmin;
address public seniorTranche;
address public juniorTranche;
address public seniorOperator;
address public juniorOperator;
address public reserve;
address public coordinator;
address public seniorToken;
address public juniorToken;
// token names
string public seniorName;
string public seniorSymbol;
string public juniorName;
string public juniorSymbol;
// restricted token member list
address public seniorMemberlist;
address public juniorMemberlist;
address public deployer;
bool public wired;
constructor(address root_, address currency_, address trancheFab_, address memberlistFab_, address restrictedtokenFab_, address reserveFab_, address assessorFab_, address coordinatorFab_, address operatorFab_, address poolAdminFab_, address memberAdmin_, address adapterDeployer_) {
}
function init(uint minSeniorRatio_, uint maxSeniorRatio_, uint maxReserve_, uint challengeTime_, uint seniorInterestRate_, string memory seniorName_, string memory seniorSymbol_, string memory juniorName_, string memory juniorSymbol_) public {
}
function deployJunior() public {
}
function deploySenior() public {
}
function deployReserve() public {
}
function deployAssessor() public {
}
function deployPoolAdmin() public {
}
function deployCoordinator() public {
}
function deploy() public virtual {
require(coordinator != address(0) && assessor != address(0) &&
reserve != address(0) && seniorTranche != address(0));
require(<FILL_ME>) // make sure lender contracts only wired once
wired = true;
// required depends
// reserve
AuthLike_3(reserve).rely(seniorTranche);
AuthLike_3(reserve).rely(juniorTranche);
AuthLike_3(reserve).rely(coordinator);
AuthLike_3(reserve).rely(assessor);
// tranches
DependLike_3(seniorTranche).depend("reserve",reserve);
DependLike_3(juniorTranche).depend("reserve",reserve);
AuthLike_3(seniorTranche).rely(coordinator);
AuthLike_3(juniorTranche).rely(coordinator);
AuthLike_3(seniorTranche).rely(seniorOperator);
AuthLike_3(juniorTranche).rely(juniorOperator);
// coordinator implements epoch ticker interface
DependLike_3(seniorTranche).depend("coordinator", coordinator);
DependLike_3(juniorTranche).depend("coordinator", coordinator);
//restricted token
DependLike_3(seniorToken).depend("memberlist", seniorMemberlist);
DependLike_3(juniorToken).depend("memberlist", juniorMemberlist);
//allow tinlake contracts to hold drop/tin tokens
MemberlistLike_4(juniorMemberlist).updateMember(juniorTranche, type(uint256).max);
MemberlistLike_4(seniorMemberlist).updateMember(seniorTranche, type(uint256).max);
// operator
DependLike_3(seniorOperator).depend("tranche", seniorTranche);
DependLike_3(juniorOperator).depend("tranche", juniorTranche);
DependLike_3(seniorOperator).depend("token", seniorToken);
DependLike_3(juniorOperator).depend("token", juniorToken);
// coordinator
DependLike_3(coordinator).depend("seniorTranche", seniorTranche);
DependLike_3(coordinator).depend("juniorTranche", juniorTranche);
DependLike_3(coordinator).depend("assessor", assessor);
AuthLike_3(coordinator).rely(poolAdmin);
// assessor
DependLike_3(assessor).depend("seniorTranche", seniorTranche);
DependLike_3(assessor).depend("juniorTranche", juniorTranche);
DependLike_3(assessor).depend("reserve", reserve);
AuthLike_3(assessor).rely(coordinator);
AuthLike_3(assessor).rely(reserve);
AuthLike_3(assessor).rely(poolAdmin);
// poolAdmin
DependLike_3(poolAdmin).depend("assessor", assessor);
DependLike_3(poolAdmin).depend("juniorMemberlist", juniorMemberlist);
DependLike_3(poolAdmin).depend("seniorMemberlist", seniorMemberlist);
DependLike_3(poolAdmin).depend("coordinator", coordinator);
AuthLike_3(juniorMemberlist).rely(poolAdmin);
AuthLike_3(seniorMemberlist).rely(poolAdmin);
if (memberAdmin != address(0)) AuthLike_3(juniorMemberlist).rely(memberAdmin);
if (memberAdmin != address(0)) AuthLike_3(seniorMemberlist).rely(memberAdmin);
FileLike_3(assessor).file("seniorInterestRate", seniorInterestRate.value);
FileLike_3(assessor).file("maxReserve", maxReserve);
FileLike_3(assessor).file("maxSeniorRatio", maxSeniorRatio.value);
FileLike_3(assessor).file("minSeniorRatio", minSeniorRatio.value);
}
}
| !wired,"lender contracts already wired" | 359,853 | !wired |
'Token already finalized' | // SPDX-License-Identifier: LGPL-3.0-only
pragma solidity 0.6.8;
pragma experimental ABIEncoderV2;
import { Address } from './Address.sol';
import { IERC20, Structs } from './Interfaces.sol';
/**
* @notice Library helper functions for managing a registry of asset descriptors indexed by address and symbol
*/
library AssetRegistry {
struct Storage {
mapping(address => Structs.Asset) assetsByAddress;
// Mapping value is array since the same symbol can be re-used for a different address
// (usually as a result of a token swap or upgrade)
mapping(string => Structs.Asset[]) assetsBySymbol;
}
function registerToken(
Storage storage self,
IERC20 tokenAddress,
string memory symbol,
uint8 decimals
) internal {
require(decimals <= 32, 'Token cannot have more than 32 decimals');
require(
tokenAddress != IERC20(0x0) && Address.isContract(address(tokenAddress)),
'Invalid token address'
);
// The string type does not have a length property so cast to bytes to check for empty string
require(bytes(symbol).length > 0, 'Invalid token symbol');
require(<FILL_ME>)
self.assetsByAddress[address(tokenAddress)] = Structs.Asset({
exists: true,
assetAddress: address(tokenAddress),
symbol: symbol,
decimals: decimals,
isConfirmed: false,
confirmedTimestampInMs: 0
});
}
function confirmTokenRegistration(
Storage storage self,
IERC20 tokenAddress,
string memory symbol,
uint8 decimals
) internal {
}
function addTokenSymbol(
Storage storage self,
IERC20 tokenAddress,
string memory symbol
) internal {
}
/**
* @dev Resolves an asset address into corresponding Asset struct
*
* @param assetAddress Ethereum address of asset
*/
function loadAssetByAddress(Storage storage self, address assetAddress)
internal
view
returns (Structs.Asset memory)
{
}
/**
* @dev Resolves a asset symbol into corresponding Asset struct
*
* @param symbol Asset symbol, e.g. 'IDEX'
* @param timestampInMs Milliseconds since Unix epoch, usually parsed from a UUID v1 order nonce.
* Constrains symbol resolution to the asset most recently confirmed prior to timestampInMs. Reverts
* if no such asset exists
*/
function loadAssetBySymbol(
Storage storage self,
string memory symbol,
uint64 timestampInMs
) internal view returns (Structs.Asset memory) {
}
/**
* @dev ETH is modeled as an always-confirmed Asset struct for programmatic consistency
*/
function getEthAsset() private pure returns (Structs.Asset memory) {
}
// See https://solidity.readthedocs.io/en/latest/types.html#bytes-and-strings-as-arrays
function isStringEqual(string memory a, string memory b)
private
pure
returns (bool)
{
}
}
| !self.assetsByAddress[address(tokenAddress)].isConfirmed,'Token already finalized' | 359,899 | !self.assetsByAddress[address(tokenAddress)].isConfirmed |
'Unknown token' | // SPDX-License-Identifier: LGPL-3.0-only
pragma solidity 0.6.8;
pragma experimental ABIEncoderV2;
import { Address } from './Address.sol';
import { IERC20, Structs } from './Interfaces.sol';
/**
* @notice Library helper functions for managing a registry of asset descriptors indexed by address and symbol
*/
library AssetRegistry {
struct Storage {
mapping(address => Structs.Asset) assetsByAddress;
// Mapping value is array since the same symbol can be re-used for a different address
// (usually as a result of a token swap or upgrade)
mapping(string => Structs.Asset[]) assetsBySymbol;
}
function registerToken(
Storage storage self,
IERC20 tokenAddress,
string memory symbol,
uint8 decimals
) internal {
}
function confirmTokenRegistration(
Storage storage self,
IERC20 tokenAddress,
string memory symbol,
uint8 decimals
) internal {
Structs.Asset memory asset = self.assetsByAddress[address(tokenAddress)];
require(<FILL_ME>)
require(!asset.isConfirmed, 'Token already finalized');
require(isStringEqual(asset.symbol, symbol), 'Symbols do not match');
require(asset.decimals == decimals, 'Decimals do not match');
asset.isConfirmed = true;
asset.confirmedTimestampInMs = uint64(block.timestamp * 1000); // Block timestamp is in seconds, store ms
self.assetsByAddress[address(tokenAddress)] = asset;
self.assetsBySymbol[symbol].push(asset);
}
function addTokenSymbol(
Storage storage self,
IERC20 tokenAddress,
string memory symbol
) internal {
}
/**
* @dev Resolves an asset address into corresponding Asset struct
*
* @param assetAddress Ethereum address of asset
*/
function loadAssetByAddress(Storage storage self, address assetAddress)
internal
view
returns (Structs.Asset memory)
{
}
/**
* @dev Resolves a asset symbol into corresponding Asset struct
*
* @param symbol Asset symbol, e.g. 'IDEX'
* @param timestampInMs Milliseconds since Unix epoch, usually parsed from a UUID v1 order nonce.
* Constrains symbol resolution to the asset most recently confirmed prior to timestampInMs. Reverts
* if no such asset exists
*/
function loadAssetBySymbol(
Storage storage self,
string memory symbol,
uint64 timestampInMs
) internal view returns (Structs.Asset memory) {
}
/**
* @dev ETH is modeled as an always-confirmed Asset struct for programmatic consistency
*/
function getEthAsset() private pure returns (Structs.Asset memory) {
}
// See https://solidity.readthedocs.io/en/latest/types.html#bytes-and-strings-as-arrays
function isStringEqual(string memory a, string memory b)
private
pure
returns (bool)
{
}
}
| asset.exists,'Unknown token' | 359,899 | asset.exists |
'Token already finalized' | // SPDX-License-Identifier: LGPL-3.0-only
pragma solidity 0.6.8;
pragma experimental ABIEncoderV2;
import { Address } from './Address.sol';
import { IERC20, Structs } from './Interfaces.sol';
/**
* @notice Library helper functions for managing a registry of asset descriptors indexed by address and symbol
*/
library AssetRegistry {
struct Storage {
mapping(address => Structs.Asset) assetsByAddress;
// Mapping value is array since the same symbol can be re-used for a different address
// (usually as a result of a token swap or upgrade)
mapping(string => Structs.Asset[]) assetsBySymbol;
}
function registerToken(
Storage storage self,
IERC20 tokenAddress,
string memory symbol,
uint8 decimals
) internal {
}
function confirmTokenRegistration(
Storage storage self,
IERC20 tokenAddress,
string memory symbol,
uint8 decimals
) internal {
Structs.Asset memory asset = self.assetsByAddress[address(tokenAddress)];
require(asset.exists, 'Unknown token');
require(<FILL_ME>)
require(isStringEqual(asset.symbol, symbol), 'Symbols do not match');
require(asset.decimals == decimals, 'Decimals do not match');
asset.isConfirmed = true;
asset.confirmedTimestampInMs = uint64(block.timestamp * 1000); // Block timestamp is in seconds, store ms
self.assetsByAddress[address(tokenAddress)] = asset;
self.assetsBySymbol[symbol].push(asset);
}
function addTokenSymbol(
Storage storage self,
IERC20 tokenAddress,
string memory symbol
) internal {
}
/**
* @dev Resolves an asset address into corresponding Asset struct
*
* @param assetAddress Ethereum address of asset
*/
function loadAssetByAddress(Storage storage self, address assetAddress)
internal
view
returns (Structs.Asset memory)
{
}
/**
* @dev Resolves a asset symbol into corresponding Asset struct
*
* @param symbol Asset symbol, e.g. 'IDEX'
* @param timestampInMs Milliseconds since Unix epoch, usually parsed from a UUID v1 order nonce.
* Constrains symbol resolution to the asset most recently confirmed prior to timestampInMs. Reverts
* if no such asset exists
*/
function loadAssetBySymbol(
Storage storage self,
string memory symbol,
uint64 timestampInMs
) internal view returns (Structs.Asset memory) {
}
/**
* @dev ETH is modeled as an always-confirmed Asset struct for programmatic consistency
*/
function getEthAsset() private pure returns (Structs.Asset memory) {
}
// See https://solidity.readthedocs.io/en/latest/types.html#bytes-and-strings-as-arrays
function isStringEqual(string memory a, string memory b)
private
pure
returns (bool)
{
}
}
| !asset.isConfirmed,'Token already finalized' | 359,899 | !asset.isConfirmed |
'Symbols do not match' | // SPDX-License-Identifier: LGPL-3.0-only
pragma solidity 0.6.8;
pragma experimental ABIEncoderV2;
import { Address } from './Address.sol';
import { IERC20, Structs } from './Interfaces.sol';
/**
* @notice Library helper functions for managing a registry of asset descriptors indexed by address and symbol
*/
library AssetRegistry {
struct Storage {
mapping(address => Structs.Asset) assetsByAddress;
// Mapping value is array since the same symbol can be re-used for a different address
// (usually as a result of a token swap or upgrade)
mapping(string => Structs.Asset[]) assetsBySymbol;
}
function registerToken(
Storage storage self,
IERC20 tokenAddress,
string memory symbol,
uint8 decimals
) internal {
}
function confirmTokenRegistration(
Storage storage self,
IERC20 tokenAddress,
string memory symbol,
uint8 decimals
) internal {
Structs.Asset memory asset = self.assetsByAddress[address(tokenAddress)];
require(asset.exists, 'Unknown token');
require(!asset.isConfirmed, 'Token already finalized');
require(<FILL_ME>)
require(asset.decimals == decimals, 'Decimals do not match');
asset.isConfirmed = true;
asset.confirmedTimestampInMs = uint64(block.timestamp * 1000); // Block timestamp is in seconds, store ms
self.assetsByAddress[address(tokenAddress)] = asset;
self.assetsBySymbol[symbol].push(asset);
}
function addTokenSymbol(
Storage storage self,
IERC20 tokenAddress,
string memory symbol
) internal {
}
/**
* @dev Resolves an asset address into corresponding Asset struct
*
* @param assetAddress Ethereum address of asset
*/
function loadAssetByAddress(Storage storage self, address assetAddress)
internal
view
returns (Structs.Asset memory)
{
}
/**
* @dev Resolves a asset symbol into corresponding Asset struct
*
* @param symbol Asset symbol, e.g. 'IDEX'
* @param timestampInMs Milliseconds since Unix epoch, usually parsed from a UUID v1 order nonce.
* Constrains symbol resolution to the asset most recently confirmed prior to timestampInMs. Reverts
* if no such asset exists
*/
function loadAssetBySymbol(
Storage storage self,
string memory symbol,
uint64 timestampInMs
) internal view returns (Structs.Asset memory) {
}
/**
* @dev ETH is modeled as an always-confirmed Asset struct for programmatic consistency
*/
function getEthAsset() private pure returns (Structs.Asset memory) {
}
// See https://solidity.readthedocs.io/en/latest/types.html#bytes-and-strings-as-arrays
function isStringEqual(string memory a, string memory b)
private
pure
returns (bool)
{
}
}
| isStringEqual(asset.symbol,symbol),'Symbols do not match' | 359,899 | isStringEqual(asset.symbol,symbol) |
'Registration of token not finalized' | // SPDX-License-Identifier: LGPL-3.0-only
pragma solidity 0.6.8;
pragma experimental ABIEncoderV2;
import { Address } from './Address.sol';
import { IERC20, Structs } from './Interfaces.sol';
/**
* @notice Library helper functions for managing a registry of asset descriptors indexed by address and symbol
*/
library AssetRegistry {
struct Storage {
mapping(address => Structs.Asset) assetsByAddress;
// Mapping value is array since the same symbol can be re-used for a different address
// (usually as a result of a token swap or upgrade)
mapping(string => Structs.Asset[]) assetsBySymbol;
}
function registerToken(
Storage storage self,
IERC20 tokenAddress,
string memory symbol,
uint8 decimals
) internal {
}
function confirmTokenRegistration(
Storage storage self,
IERC20 tokenAddress,
string memory symbol,
uint8 decimals
) internal {
}
function addTokenSymbol(
Storage storage self,
IERC20 tokenAddress,
string memory symbol
) internal {
Structs.Asset memory asset = self.assetsByAddress[address(tokenAddress)];
require(<FILL_ME>)
require(!isStringEqual(symbol, 'ETH'), 'ETH symbol reserved for Ether');
// This will prevent swapping assets for previously existing orders
uint64 msInOneSecond = 1000;
asset.confirmedTimestampInMs = uint64(block.timestamp * msInOneSecond);
self.assetsBySymbol[symbol].push(asset);
}
/**
* @dev Resolves an asset address into corresponding Asset struct
*
* @param assetAddress Ethereum address of asset
*/
function loadAssetByAddress(Storage storage self, address assetAddress)
internal
view
returns (Structs.Asset memory)
{
}
/**
* @dev Resolves a asset symbol into corresponding Asset struct
*
* @param symbol Asset symbol, e.g. 'IDEX'
* @param timestampInMs Milliseconds since Unix epoch, usually parsed from a UUID v1 order nonce.
* Constrains symbol resolution to the asset most recently confirmed prior to timestampInMs. Reverts
* if no such asset exists
*/
function loadAssetBySymbol(
Storage storage self,
string memory symbol,
uint64 timestampInMs
) internal view returns (Structs.Asset memory) {
}
/**
* @dev ETH is modeled as an always-confirmed Asset struct for programmatic consistency
*/
function getEthAsset() private pure returns (Structs.Asset memory) {
}
// See https://solidity.readthedocs.io/en/latest/types.html#bytes-and-strings-as-arrays
function isStringEqual(string memory a, string memory b)
private
pure
returns (bool)
{
}
}
| asset.exists&&asset.isConfirmed,'Registration of token not finalized' | 359,899 | asset.exists&&asset.isConfirmed |
'ETH symbol reserved for Ether' | // SPDX-License-Identifier: LGPL-3.0-only
pragma solidity 0.6.8;
pragma experimental ABIEncoderV2;
import { Address } from './Address.sol';
import { IERC20, Structs } from './Interfaces.sol';
/**
* @notice Library helper functions for managing a registry of asset descriptors indexed by address and symbol
*/
library AssetRegistry {
struct Storage {
mapping(address => Structs.Asset) assetsByAddress;
// Mapping value is array since the same symbol can be re-used for a different address
// (usually as a result of a token swap or upgrade)
mapping(string => Structs.Asset[]) assetsBySymbol;
}
function registerToken(
Storage storage self,
IERC20 tokenAddress,
string memory symbol,
uint8 decimals
) internal {
}
function confirmTokenRegistration(
Storage storage self,
IERC20 tokenAddress,
string memory symbol,
uint8 decimals
) internal {
}
function addTokenSymbol(
Storage storage self,
IERC20 tokenAddress,
string memory symbol
) internal {
Structs.Asset memory asset = self.assetsByAddress[address(tokenAddress)];
require(
asset.exists && asset.isConfirmed,
'Registration of token not finalized'
);
require(<FILL_ME>)
// This will prevent swapping assets for previously existing orders
uint64 msInOneSecond = 1000;
asset.confirmedTimestampInMs = uint64(block.timestamp * msInOneSecond);
self.assetsBySymbol[symbol].push(asset);
}
/**
* @dev Resolves an asset address into corresponding Asset struct
*
* @param assetAddress Ethereum address of asset
*/
function loadAssetByAddress(Storage storage self, address assetAddress)
internal
view
returns (Structs.Asset memory)
{
}
/**
* @dev Resolves a asset symbol into corresponding Asset struct
*
* @param symbol Asset symbol, e.g. 'IDEX'
* @param timestampInMs Milliseconds since Unix epoch, usually parsed from a UUID v1 order nonce.
* Constrains symbol resolution to the asset most recently confirmed prior to timestampInMs. Reverts
* if no such asset exists
*/
function loadAssetBySymbol(
Storage storage self,
string memory symbol,
uint64 timestampInMs
) internal view returns (Structs.Asset memory) {
}
/**
* @dev ETH is modeled as an always-confirmed Asset struct for programmatic consistency
*/
function getEthAsset() private pure returns (Structs.Asset memory) {
}
// See https://solidity.readthedocs.io/en/latest/types.html#bytes-and-strings-as-arrays
function isStringEqual(string memory a, string memory b)
private
pure
returns (bool)
{
}
}
| !isStringEqual(symbol,'ETH'),'ETH symbol reserved for Ether' | 359,899 | !isStringEqual(symbol,'ETH') |
"Not second owner" | //SPDX-License-Identifier: Unlicense
pragma solidity ^ 0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
abstract contract Ownables is Ownable {
using SafeMath for uint256;
struct TransferController {
uint256 amount;
address sendToAddress;
}
address private _secondOwner;
TransferController private _ownerController;
TransferController private _secondOwnerController;
modifier onlySecondOwner() {
require(<FILL_ME>)
_;
}
modifier onlyOwners () {
}
modifier ownersAgreed () {
}
function transferSecondOwnership(address newSecondOwner_) public virtual onlySecondOwner {
}
function renounceSecondOwnership() public virtual onlySecondOwner {
}
function setOwnerTransaction(uint256 amount_, address sendToAddress_) public onlyOwners {
}
function withdraw() public onlyOwners {
}
function withdrawTo(uint256 amount_ , address to_) public onlyOwners ownersAgreed {
}
function resetOwnerAgreement() public onlyOwners {
}
function _resetAgreement(address owner_) internal {
}
function _setSecondOwner(address newSecondOwner_) internal {
}
function secondOwner() public view virtual returns (address) {
}
function isAmountAgreed() public view returns (bool) {
}
function isAddressAgreed() public view returns (bool) {
}
}
| secondOwner()==_msgSender(),"Not second owner" | 359,955 | secondOwner()==_msgSender() |
"Owners only" | //SPDX-License-Identifier: Unlicense
pragma solidity ^ 0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
abstract contract Ownables is Ownable {
using SafeMath for uint256;
struct TransferController {
uint256 amount;
address sendToAddress;
}
address private _secondOwner;
TransferController private _ownerController;
TransferController private _secondOwnerController;
modifier onlySecondOwner() {
}
modifier onlyOwners () {
require(<FILL_ME>)
_;
}
modifier ownersAgreed () {
}
function transferSecondOwnership(address newSecondOwner_) public virtual onlySecondOwner {
}
function renounceSecondOwnership() public virtual onlySecondOwner {
}
function setOwnerTransaction(uint256 amount_, address sendToAddress_) public onlyOwners {
}
function withdraw() public onlyOwners {
}
function withdrawTo(uint256 amount_ , address to_) public onlyOwners ownersAgreed {
}
function resetOwnerAgreement() public onlyOwners {
}
function _resetAgreement(address owner_) internal {
}
function _setSecondOwner(address newSecondOwner_) internal {
}
function secondOwner() public view virtual returns (address) {
}
function isAmountAgreed() public view returns (bool) {
}
function isAddressAgreed() public view returns (bool) {
}
}
| owner()==_msgSender()||secondOwner()==_msgSender(),"Owners only" | 359,955 | owner()==_msgSender()||secondOwner()==_msgSender() |
"Not agreed" | //SPDX-License-Identifier: Unlicense
pragma solidity ^ 0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
abstract contract Ownables is Ownable {
using SafeMath for uint256;
struct TransferController {
uint256 amount;
address sendToAddress;
}
address private _secondOwner;
TransferController private _ownerController;
TransferController private _secondOwnerController;
modifier onlySecondOwner() {
}
modifier onlyOwners () {
}
modifier ownersAgreed () {
require(<FILL_ME>)
_;
}
function transferSecondOwnership(address newSecondOwner_) public virtual onlySecondOwner {
}
function renounceSecondOwnership() public virtual onlySecondOwner {
}
function setOwnerTransaction(uint256 amount_, address sendToAddress_) public onlyOwners {
}
function withdraw() public onlyOwners {
}
function withdrawTo(uint256 amount_ , address to_) public onlyOwners ownersAgreed {
}
function resetOwnerAgreement() public onlyOwners {
}
function _resetAgreement(address owner_) internal {
}
function _setSecondOwner(address newSecondOwner_) internal {
}
function secondOwner() public view virtual returns (address) {
}
function isAmountAgreed() public view returns (bool) {
}
function isAddressAgreed() public view returns (bool) {
}
}
| isAmountAgreed()&&isAddressAgreed(),"Not agreed" | 359,955 | isAmountAgreed()&&isAddressAgreed() |
"Minting not allowed" | pragma solidity 0.6.12;
// solhint-disable no-empty-blocks
contract VSP is VSPGovernanceToken, Owned {
/// @dev The EIP-712 typehash for the permit struct used by the contract
bytes32 public constant PERMIT_TYPEHASH =
keccak256(
"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"
);
uint256 internal immutable mintLockPeriod;
uint256 internal constant INITIAL_MINT_LIMIT = 10000000 * (10**18);
constructor() public VSPGovernanceToken("VesperToken", "VSP") {
}
/// @dev Mint VSP. Only owner can mint
function mint(address _recipient, uint256 _amount) external onlyOwner {
require(<FILL_ME>)
_mint(_recipient, _amount);
_moveDelegates(address(0), delegates[_recipient], _amount);
}
/// @dev Burn VSP from caller
function burn(uint256 _amount) external {
}
/// @dev Burn VSP from given account. Caller must have proper allowance.
function burnFrom(address _account, uint256 _amount) external {
}
/**
* @notice Transfer tokens to multiple recipient
* @dev Left 160 bits are the recipient address and the right 96 bits are the token amount.
* @param bits array of uint
* @return true/false
*/
function multiTransfer(uint256[] memory bits) external returns (bool) {
}
/**
* @notice Triggers an approval from owner to spends
* @param _owner The address to approve from
* @param _spender The address to be approved
* @param _amount The number of tokens that are approved (2^256-1 means infinite)
* @param _deadline The time at which to expire the signature
* @param _v The recovery byte of the signature
* @param _r Half of the ECDSA signature pair
* @param _s Half of the ECDSA signature pair
*/
function permit(
address _owner,
address _spender,
uint256 _amount,
uint256 _deadline,
uint8 _v,
bytes32 _r,
bytes32 _s
) external {
}
/// @dev Overridden ERC20 transfer
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
/// @dev Overridden ERC20 transferFrom
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override returns (bool) {
}
}
| (totalSupply().add(_amount)<=INITIAL_MINT_LIMIT)||(block.timestamp>mintLockPeriod),"Minting not allowed" | 360,043 | (totalSupply().add(_amount)<=INITIAL_MINT_LIMIT)||(block.timestamp>mintLockPeriod) |
"Transfer failed" | pragma solidity 0.6.12;
// solhint-disable no-empty-blocks
contract VSP is VSPGovernanceToken, Owned {
/// @dev The EIP-712 typehash for the permit struct used by the contract
bytes32 public constant PERMIT_TYPEHASH =
keccak256(
"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"
);
uint256 internal immutable mintLockPeriod;
uint256 internal constant INITIAL_MINT_LIMIT = 10000000 * (10**18);
constructor() public VSPGovernanceToken("VesperToken", "VSP") {
}
/// @dev Mint VSP. Only owner can mint
function mint(address _recipient, uint256 _amount) external onlyOwner {
}
/// @dev Burn VSP from caller
function burn(uint256 _amount) external {
}
/// @dev Burn VSP from given account. Caller must have proper allowance.
function burnFrom(address _account, uint256 _amount) external {
}
/**
* @notice Transfer tokens to multiple recipient
* @dev Left 160 bits are the recipient address and the right 96 bits are the token amount.
* @param bits array of uint
* @return true/false
*/
function multiTransfer(uint256[] memory bits) external returns (bool) {
for (uint256 i = 0; i < bits.length; i++) {
address a = address(bits[i] >> 96);
uint256 amount = bits[i] & ((1 << 96) - 1);
require(<FILL_ME>)
}
return true;
}
/**
* @notice Triggers an approval from owner to spends
* @param _owner The address to approve from
* @param _spender The address to be approved
* @param _amount The number of tokens that are approved (2^256-1 means infinite)
* @param _deadline The time at which to expire the signature
* @param _v The recovery byte of the signature
* @param _r Half of the ECDSA signature pair
* @param _s Half of the ECDSA signature pair
*/
function permit(
address _owner,
address _spender,
uint256 _amount,
uint256 _deadline,
uint8 _v,
bytes32 _r,
bytes32 _s
) external {
}
/// @dev Overridden ERC20 transfer
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
/// @dev Overridden ERC20 transferFrom
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override returns (bool) {
}
}
| transfer(a,amount),"Transfer failed" | 360,043 | transfer(a,amount) |
null | pragma solidity ^0.8.0;
contract TheSnailSquad is ERC721, ERC721Enumerable, Ownable {
// Provenance
string public SNAIL_HASH = "";
// Price & Supply
uint256 public constant NFT_PRICE = 30000000000000000; //0.03 ETH
uint public constant MAX_SUPPLY = 10000;
// Internals
string private _baseTokenURI;
uint256 public startingIndexBlock;
uint256 public startingIndex;
// Adress
address member1 = 0xbFC3226E85203e1d597AAc20B32D4D6d342E74c1;
address member2 = 0x8Bac722750A8de62f3369ba8e61061c8b763EC70;
address member3 = 0x2a12e31Bc688588AB4e72cCB6Db3F695617c0297;
// Sale
bool public hasSaleStarted = false;
uint private constant MAX_MINT_PER_CALL = 5;
// Pre-Sale
bool public hasPreSaleStarted = false;
uint public constant MAX_PRESALE_SUPPLY = 1000;
constructor(string memory baseURI) ERC721("The Snail Squad", "TSS") {
}
function _baseURI() internal view override(ERC721) returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function getBaseURI() external view returns(string memory) {
}
function tokensOfOwner(address _owner) external view returns(uint256[] memory ) {
}
function mintPreSale() public payable {
}
function mint(uint256 numNFTs) public payable {
}
function flipSaleState() public onlyOwner {
}
function flipPreSaleState() public onlyOwner {
}
function withdraw() public onlyOwner {
require(<FILL_ME>)
require(payable(member2).send(address(this).balance /100*49));
require(payable(member3).send(address(this).balance));
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721, ERC721Enumerable)
{
}
function _burn(uint256 tokenId) internal override(ERC721) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
function setStartingIndex() public {
}
function emergencySetStartingIndexBlock() public onlyOwner {
}
function setProvenanceHash(string memory provenanceHash) public onlyOwner {
}
}
| payable(member1).send(address(this).balance/100*34) | 360,055 | payable(member1).send(address(this).balance/100*34) |
null | pragma solidity ^0.8.0;
contract TheSnailSquad is ERC721, ERC721Enumerable, Ownable {
// Provenance
string public SNAIL_HASH = "";
// Price & Supply
uint256 public constant NFT_PRICE = 30000000000000000; //0.03 ETH
uint public constant MAX_SUPPLY = 10000;
// Internals
string private _baseTokenURI;
uint256 public startingIndexBlock;
uint256 public startingIndex;
// Adress
address member1 = 0xbFC3226E85203e1d597AAc20B32D4D6d342E74c1;
address member2 = 0x8Bac722750A8de62f3369ba8e61061c8b763EC70;
address member3 = 0x2a12e31Bc688588AB4e72cCB6Db3F695617c0297;
// Sale
bool public hasSaleStarted = false;
uint private constant MAX_MINT_PER_CALL = 5;
// Pre-Sale
bool public hasPreSaleStarted = false;
uint public constant MAX_PRESALE_SUPPLY = 1000;
constructor(string memory baseURI) ERC721("The Snail Squad", "TSS") {
}
function _baseURI() internal view override(ERC721) returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function getBaseURI() external view returns(string memory) {
}
function tokensOfOwner(address _owner) external view returns(uint256[] memory ) {
}
function mintPreSale() public payable {
}
function mint(uint256 numNFTs) public payable {
}
function flipSaleState() public onlyOwner {
}
function flipPreSaleState() public onlyOwner {
}
function withdraw() public onlyOwner {
require(payable(member1).send(address(this).balance /100*34 ));
require(<FILL_ME>)
require(payable(member3).send(address(this).balance));
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721, ERC721Enumerable)
{
}
function _burn(uint256 tokenId) internal override(ERC721) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
function setStartingIndex() public {
}
function emergencySetStartingIndexBlock() public onlyOwner {
}
function setProvenanceHash(string memory provenanceHash) public onlyOwner {
}
}
| payable(member2).send(address(this).balance/100*49) | 360,055 | payable(member2).send(address(this).balance/100*49) |
null | pragma solidity ^0.8.0;
contract TheSnailSquad is ERC721, ERC721Enumerable, Ownable {
// Provenance
string public SNAIL_HASH = "";
// Price & Supply
uint256 public constant NFT_PRICE = 30000000000000000; //0.03 ETH
uint public constant MAX_SUPPLY = 10000;
// Internals
string private _baseTokenURI;
uint256 public startingIndexBlock;
uint256 public startingIndex;
// Adress
address member1 = 0xbFC3226E85203e1d597AAc20B32D4D6d342E74c1;
address member2 = 0x8Bac722750A8de62f3369ba8e61061c8b763EC70;
address member3 = 0x2a12e31Bc688588AB4e72cCB6Db3F695617c0297;
// Sale
bool public hasSaleStarted = false;
uint private constant MAX_MINT_PER_CALL = 5;
// Pre-Sale
bool public hasPreSaleStarted = false;
uint public constant MAX_PRESALE_SUPPLY = 1000;
constructor(string memory baseURI) ERC721("The Snail Squad", "TSS") {
}
function _baseURI() internal view override(ERC721) returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function getBaseURI() external view returns(string memory) {
}
function tokensOfOwner(address _owner) external view returns(uint256[] memory ) {
}
function mintPreSale() public payable {
}
function mint(uint256 numNFTs) public payable {
}
function flipSaleState() public onlyOwner {
}
function flipPreSaleState() public onlyOwner {
}
function withdraw() public onlyOwner {
require(payable(member1).send(address(this).balance /100*34 ));
require(payable(member2).send(address(this).balance /100*49));
require(<FILL_ME>)
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721, ERC721Enumerable)
{
}
function _burn(uint256 tokenId) internal override(ERC721) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
function setStartingIndex() public {
}
function emergencySetStartingIndexBlock() public onlyOwner {
}
function setProvenanceHash(string memory provenanceHash) public onlyOwner {
}
}
| payable(member3).send(address(this).balance) | 360,055 | payable(member3).send(address(this).balance) |
"ALREADY_PAID" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
contract BuenoMembership is AccessControl {
using ECDSA for bytes32;
bytes32 public constant VIP_ROLE = keccak256("VIP_ROLE");
uint256 public exportPrice = 0.0001 ether;
mapping(string => bool) public paidExports;
address private signer = address(0);
address private buenoWallet = address(0);
event PurchaseComplete(address purchaser, string tokenSetId);
constructor() {
}
function export(
string memory tokenSetId,
uint256 quantity,
bytes memory signature
) public payable {
require(quantity > 0, "INVALID_QUANTITY");
require(msg.value == quantity * exportPrice, "INSUFFICIENT_PAYMENT");
require(<FILL_ME>)
bytes32 hash = keccak256(
abi.encodePacked(msg.sender, tokenSetId, quantity)
);
require(verify(hash, signature), "INVALID_SIGNATURE");
paidExports[tokenSetId] = true;
emit PurchaseComplete(msg.sender, tokenSetId);
}
function setSigner(address _signer) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function setBuenoWallet(address _buenoWallet)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function isPaidExport(string memory tokenSetId) public view returns (bool) {
}
function verify(bytes32 hash, bytes memory signature)
internal
view
returns (bool)
{
}
function setPrice(uint256 newPrice) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function isOnVipList(address user) public view returns (bool) {
}
function addVip(address user) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function removeVip(address user) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function withdraw() public onlyRole(DEFAULT_ADMIN_ROLE) {
}
}
| paidExports[tokenSetId]==false,"ALREADY_PAID" | 360,075 | paidExports[tokenSetId]==false |
null | contract PostboyRejectSetting {
address public adminAddress;
uint256 public minTimeForReject;
bool public isRejectEnabled;
modifier isAdmin() {
}
constructor() public {
}
function changeRejectSetting(uint256 rejectTime, bool isEnabled) isAdmin public {
}
}
contract PostboyAccount {
struct Mail {
bytes16 mailText;
bytes16 responseText;
uint256 paySum;
bool isPublic;
bool isRead;
address sender;
bool hasLike;
bool isDislike;
bool isRejected;
uint256 createdTime;
}
Mail[] public mails;
uint256[] public withdraws;
address public owner;
address public donateWallet;
address public serviceWallet;
PostboyRejectSetting public rejectConfig;
address public adminWallet;
uint256 public servicePercent;
bytes16 public guid;
bool public isOwnerInitialized;
uint256 public minPay;
uint256 public donatePercent;
uint256 public frozenBalance;
modifier isOwner() {
}
modifier isAdmin() {
}
constructor(uint256 _minPay, uint256 _donatePercent, uint256 _servicePercent, bytes16 _guid, address _donateWallet, address _serviceWallet, address _owner, address _admin, PostboyRejectSetting _rejectConfig) public {
}
function initOwner(address _owner) isAdmin public {
}
function sendMail(bytes16 mailText, bool isPublic) payable public {
}
function rejectMail(uint256 mailIndex) public {
require(<FILL_ME>)
require(mails[mailIndex].isRead == false);
require(mails[mailIndex].isRejected == false);
require(rejectConfig.isRejectEnabled() == true);
require(mails[mailIndex].createdTime + rejectConfig.minTimeForReject() < now);
mails[mailIndex].isRejected = true;
frozenBalance -= mails[mailIndex].paySum;
msg.sender.transfer(mails[mailIndex].paySum);
}
function readMail(uint256 mailIndex, bytes16 responseText) isOwner public {
}
function readMailByAdmin(uint256 mailIndex, bytes16 responseText) isAdmin public {
}
function withdrawMoney(uint256 amount) isOwner public {
}
function withdrawMoneyByAdmin(uint256 amount) isAdmin public {
}
function updateConfig(uint256 _minPay, uint256 _donatePercent) isOwner public {
}
function addLike(uint256 mailIndex, bool isDislike) public {
}
function countMails() constant public returns(uint256 length) {
}
function countWithdraws() constant public returns(uint256 length) {
}
function getAccountStatus() constant public returns(uint256 donatePercentVal, uint256 minPaySum, uint256 frozenBalanceSum, uint256 fullBalance, uint256 countMails, uint256 counWithdraws, bool ownerInitialized) {
}
}
contract PostboyFactory {
struct Account {
address contractAddress;
address ownerAddress;
}
Account[] public accounts;
address public adminAddress;
address public factoryAdminAddress;
address public donateWallet;
address public serviceWallet;
PostboyRejectSetting public rejectSettings;
uint256 public servicePercent;
modifier isFactoryAdmin() {
}
modifier isAdmin() {
}
constructor(address _donateWallet, address _serviceWallet, PostboyRejectSetting _rejectSettings, address _factoryAdminAddress) public {
}
function createPostboyAccount(uint256 minPay, uint256 donatePercent, bytes16 guid) public {
}
function createPostboyAccountForSomeone(uint256 minPay, uint256 donatePercent, bytes16 guid) isFactoryAdmin public {
}
function countAccounts() public constant returns(uint length) {
}
function changeServicePercent(uint256 newPercent) isAdmin public {
}
function changeFactoryAdmin(address _admin) isAdmin public {
}
function initOwner(address ownerAddress, address contractAddress) isFactoryAdmin public {
}
function readMailByAdmin(uint256 mailIndex, bytes16 responseText, address contractAddress) isFactoryAdmin public {
}
function withdrawMoneyByAdmin(uint256 amount, address contractAddress) isFactoryAdmin public {
}
}
| mails[mailIndex].sender==msg.sender | 360,093 | mails[mailIndex].sender==msg.sender |
null | contract PostboyRejectSetting {
address public adminAddress;
uint256 public minTimeForReject;
bool public isRejectEnabled;
modifier isAdmin() {
}
constructor() public {
}
function changeRejectSetting(uint256 rejectTime, bool isEnabled) isAdmin public {
}
}
contract PostboyAccount {
struct Mail {
bytes16 mailText;
bytes16 responseText;
uint256 paySum;
bool isPublic;
bool isRead;
address sender;
bool hasLike;
bool isDislike;
bool isRejected;
uint256 createdTime;
}
Mail[] public mails;
uint256[] public withdraws;
address public owner;
address public donateWallet;
address public serviceWallet;
PostboyRejectSetting public rejectConfig;
address public adminWallet;
uint256 public servicePercent;
bytes16 public guid;
bool public isOwnerInitialized;
uint256 public minPay;
uint256 public donatePercent;
uint256 public frozenBalance;
modifier isOwner() {
}
modifier isAdmin() {
}
constructor(uint256 _minPay, uint256 _donatePercent, uint256 _servicePercent, bytes16 _guid, address _donateWallet, address _serviceWallet, address _owner, address _admin, PostboyRejectSetting _rejectConfig) public {
}
function initOwner(address _owner) isAdmin public {
}
function sendMail(bytes16 mailText, bool isPublic) payable public {
}
function rejectMail(uint256 mailIndex) public {
require(mails[mailIndex].sender == msg.sender);
require(<FILL_ME>)
require(mails[mailIndex].isRejected == false);
require(rejectConfig.isRejectEnabled() == true);
require(mails[mailIndex].createdTime + rejectConfig.minTimeForReject() < now);
mails[mailIndex].isRejected = true;
frozenBalance -= mails[mailIndex].paySum;
msg.sender.transfer(mails[mailIndex].paySum);
}
function readMail(uint256 mailIndex, bytes16 responseText) isOwner public {
}
function readMailByAdmin(uint256 mailIndex, bytes16 responseText) isAdmin public {
}
function withdrawMoney(uint256 amount) isOwner public {
}
function withdrawMoneyByAdmin(uint256 amount) isAdmin public {
}
function updateConfig(uint256 _minPay, uint256 _donatePercent) isOwner public {
}
function addLike(uint256 mailIndex, bool isDislike) public {
}
function countMails() constant public returns(uint256 length) {
}
function countWithdraws() constant public returns(uint256 length) {
}
function getAccountStatus() constant public returns(uint256 donatePercentVal, uint256 minPaySum, uint256 frozenBalanceSum, uint256 fullBalance, uint256 countMails, uint256 counWithdraws, bool ownerInitialized) {
}
}
contract PostboyFactory {
struct Account {
address contractAddress;
address ownerAddress;
}
Account[] public accounts;
address public adminAddress;
address public factoryAdminAddress;
address public donateWallet;
address public serviceWallet;
PostboyRejectSetting public rejectSettings;
uint256 public servicePercent;
modifier isFactoryAdmin() {
}
modifier isAdmin() {
}
constructor(address _donateWallet, address _serviceWallet, PostboyRejectSetting _rejectSettings, address _factoryAdminAddress) public {
}
function createPostboyAccount(uint256 minPay, uint256 donatePercent, bytes16 guid) public {
}
function createPostboyAccountForSomeone(uint256 minPay, uint256 donatePercent, bytes16 guid) isFactoryAdmin public {
}
function countAccounts() public constant returns(uint length) {
}
function changeServicePercent(uint256 newPercent) isAdmin public {
}
function changeFactoryAdmin(address _admin) isAdmin public {
}
function initOwner(address ownerAddress, address contractAddress) isFactoryAdmin public {
}
function readMailByAdmin(uint256 mailIndex, bytes16 responseText, address contractAddress) isFactoryAdmin public {
}
function withdrawMoneyByAdmin(uint256 amount, address contractAddress) isFactoryAdmin public {
}
}
| mails[mailIndex].isRead==false | 360,093 | mails[mailIndex].isRead==false |
null | contract PostboyRejectSetting {
address public adminAddress;
uint256 public minTimeForReject;
bool public isRejectEnabled;
modifier isAdmin() {
}
constructor() public {
}
function changeRejectSetting(uint256 rejectTime, bool isEnabled) isAdmin public {
}
}
contract PostboyAccount {
struct Mail {
bytes16 mailText;
bytes16 responseText;
uint256 paySum;
bool isPublic;
bool isRead;
address sender;
bool hasLike;
bool isDislike;
bool isRejected;
uint256 createdTime;
}
Mail[] public mails;
uint256[] public withdraws;
address public owner;
address public donateWallet;
address public serviceWallet;
PostboyRejectSetting public rejectConfig;
address public adminWallet;
uint256 public servicePercent;
bytes16 public guid;
bool public isOwnerInitialized;
uint256 public minPay;
uint256 public donatePercent;
uint256 public frozenBalance;
modifier isOwner() {
}
modifier isAdmin() {
}
constructor(uint256 _minPay, uint256 _donatePercent, uint256 _servicePercent, bytes16 _guid, address _donateWallet, address _serviceWallet, address _owner, address _admin, PostboyRejectSetting _rejectConfig) public {
}
function initOwner(address _owner) isAdmin public {
}
function sendMail(bytes16 mailText, bool isPublic) payable public {
}
function rejectMail(uint256 mailIndex) public {
require(mails[mailIndex].sender == msg.sender);
require(mails[mailIndex].isRead == false);
require(<FILL_ME>)
require(rejectConfig.isRejectEnabled() == true);
require(mails[mailIndex].createdTime + rejectConfig.minTimeForReject() < now);
mails[mailIndex].isRejected = true;
frozenBalance -= mails[mailIndex].paySum;
msg.sender.transfer(mails[mailIndex].paySum);
}
function readMail(uint256 mailIndex, bytes16 responseText) isOwner public {
}
function readMailByAdmin(uint256 mailIndex, bytes16 responseText) isAdmin public {
}
function withdrawMoney(uint256 amount) isOwner public {
}
function withdrawMoneyByAdmin(uint256 amount) isAdmin public {
}
function updateConfig(uint256 _minPay, uint256 _donatePercent) isOwner public {
}
function addLike(uint256 mailIndex, bool isDislike) public {
}
function countMails() constant public returns(uint256 length) {
}
function countWithdraws() constant public returns(uint256 length) {
}
function getAccountStatus() constant public returns(uint256 donatePercentVal, uint256 minPaySum, uint256 frozenBalanceSum, uint256 fullBalance, uint256 countMails, uint256 counWithdraws, bool ownerInitialized) {
}
}
contract PostboyFactory {
struct Account {
address contractAddress;
address ownerAddress;
}
Account[] public accounts;
address public adminAddress;
address public factoryAdminAddress;
address public donateWallet;
address public serviceWallet;
PostboyRejectSetting public rejectSettings;
uint256 public servicePercent;
modifier isFactoryAdmin() {
}
modifier isAdmin() {
}
constructor(address _donateWallet, address _serviceWallet, PostboyRejectSetting _rejectSettings, address _factoryAdminAddress) public {
}
function createPostboyAccount(uint256 minPay, uint256 donatePercent, bytes16 guid) public {
}
function createPostboyAccountForSomeone(uint256 minPay, uint256 donatePercent, bytes16 guid) isFactoryAdmin public {
}
function countAccounts() public constant returns(uint length) {
}
function changeServicePercent(uint256 newPercent) isAdmin public {
}
function changeFactoryAdmin(address _admin) isAdmin public {
}
function initOwner(address ownerAddress, address contractAddress) isFactoryAdmin public {
}
function readMailByAdmin(uint256 mailIndex, bytes16 responseText, address contractAddress) isFactoryAdmin public {
}
function withdrawMoneyByAdmin(uint256 amount, address contractAddress) isFactoryAdmin public {
}
}
| mails[mailIndex].isRejected==false | 360,093 | mails[mailIndex].isRejected==false |
null | contract PostboyRejectSetting {
address public adminAddress;
uint256 public minTimeForReject;
bool public isRejectEnabled;
modifier isAdmin() {
}
constructor() public {
}
function changeRejectSetting(uint256 rejectTime, bool isEnabled) isAdmin public {
}
}
contract PostboyAccount {
struct Mail {
bytes16 mailText;
bytes16 responseText;
uint256 paySum;
bool isPublic;
bool isRead;
address sender;
bool hasLike;
bool isDislike;
bool isRejected;
uint256 createdTime;
}
Mail[] public mails;
uint256[] public withdraws;
address public owner;
address public donateWallet;
address public serviceWallet;
PostboyRejectSetting public rejectConfig;
address public adminWallet;
uint256 public servicePercent;
bytes16 public guid;
bool public isOwnerInitialized;
uint256 public minPay;
uint256 public donatePercent;
uint256 public frozenBalance;
modifier isOwner() {
}
modifier isAdmin() {
}
constructor(uint256 _minPay, uint256 _donatePercent, uint256 _servicePercent, bytes16 _guid, address _donateWallet, address _serviceWallet, address _owner, address _admin, PostboyRejectSetting _rejectConfig) public {
}
function initOwner(address _owner) isAdmin public {
}
function sendMail(bytes16 mailText, bool isPublic) payable public {
}
function rejectMail(uint256 mailIndex) public {
require(mails[mailIndex].sender == msg.sender);
require(mails[mailIndex].isRead == false);
require(mails[mailIndex].isRejected == false);
require(<FILL_ME>)
require(mails[mailIndex].createdTime + rejectConfig.minTimeForReject() < now);
mails[mailIndex].isRejected = true;
frozenBalance -= mails[mailIndex].paySum;
msg.sender.transfer(mails[mailIndex].paySum);
}
function readMail(uint256 mailIndex, bytes16 responseText) isOwner public {
}
function readMailByAdmin(uint256 mailIndex, bytes16 responseText) isAdmin public {
}
function withdrawMoney(uint256 amount) isOwner public {
}
function withdrawMoneyByAdmin(uint256 amount) isAdmin public {
}
function updateConfig(uint256 _minPay, uint256 _donatePercent) isOwner public {
}
function addLike(uint256 mailIndex, bool isDislike) public {
}
function countMails() constant public returns(uint256 length) {
}
function countWithdraws() constant public returns(uint256 length) {
}
function getAccountStatus() constant public returns(uint256 donatePercentVal, uint256 minPaySum, uint256 frozenBalanceSum, uint256 fullBalance, uint256 countMails, uint256 counWithdraws, bool ownerInitialized) {
}
}
contract PostboyFactory {
struct Account {
address contractAddress;
address ownerAddress;
}
Account[] public accounts;
address public adminAddress;
address public factoryAdminAddress;
address public donateWallet;
address public serviceWallet;
PostboyRejectSetting public rejectSettings;
uint256 public servicePercent;
modifier isFactoryAdmin() {
}
modifier isAdmin() {
}
constructor(address _donateWallet, address _serviceWallet, PostboyRejectSetting _rejectSettings, address _factoryAdminAddress) public {
}
function createPostboyAccount(uint256 minPay, uint256 donatePercent, bytes16 guid) public {
}
function createPostboyAccountForSomeone(uint256 minPay, uint256 donatePercent, bytes16 guid) isFactoryAdmin public {
}
function countAccounts() public constant returns(uint length) {
}
function changeServicePercent(uint256 newPercent) isAdmin public {
}
function changeFactoryAdmin(address _admin) isAdmin public {
}
function initOwner(address ownerAddress, address contractAddress) isFactoryAdmin public {
}
function readMailByAdmin(uint256 mailIndex, bytes16 responseText, address contractAddress) isFactoryAdmin public {
}
function withdrawMoneyByAdmin(uint256 amount, address contractAddress) isFactoryAdmin public {
}
}
| rejectConfig.isRejectEnabled()==true | 360,093 | rejectConfig.isRejectEnabled()==true |
null | contract PostboyRejectSetting {
address public adminAddress;
uint256 public minTimeForReject;
bool public isRejectEnabled;
modifier isAdmin() {
}
constructor() public {
}
function changeRejectSetting(uint256 rejectTime, bool isEnabled) isAdmin public {
}
}
contract PostboyAccount {
struct Mail {
bytes16 mailText;
bytes16 responseText;
uint256 paySum;
bool isPublic;
bool isRead;
address sender;
bool hasLike;
bool isDislike;
bool isRejected;
uint256 createdTime;
}
Mail[] public mails;
uint256[] public withdraws;
address public owner;
address public donateWallet;
address public serviceWallet;
PostboyRejectSetting public rejectConfig;
address public adminWallet;
uint256 public servicePercent;
bytes16 public guid;
bool public isOwnerInitialized;
uint256 public minPay;
uint256 public donatePercent;
uint256 public frozenBalance;
modifier isOwner() {
}
modifier isAdmin() {
}
constructor(uint256 _minPay, uint256 _donatePercent, uint256 _servicePercent, bytes16 _guid, address _donateWallet, address _serviceWallet, address _owner, address _admin, PostboyRejectSetting _rejectConfig) public {
}
function initOwner(address _owner) isAdmin public {
}
function sendMail(bytes16 mailText, bool isPublic) payable public {
}
function rejectMail(uint256 mailIndex) public {
require(mails[mailIndex].sender == msg.sender);
require(mails[mailIndex].isRead == false);
require(mails[mailIndex].isRejected == false);
require(rejectConfig.isRejectEnabled() == true);
require(<FILL_ME>)
mails[mailIndex].isRejected = true;
frozenBalance -= mails[mailIndex].paySum;
msg.sender.transfer(mails[mailIndex].paySum);
}
function readMail(uint256 mailIndex, bytes16 responseText) isOwner public {
}
function readMailByAdmin(uint256 mailIndex, bytes16 responseText) isAdmin public {
}
function withdrawMoney(uint256 amount) isOwner public {
}
function withdrawMoneyByAdmin(uint256 amount) isAdmin public {
}
function updateConfig(uint256 _minPay, uint256 _donatePercent) isOwner public {
}
function addLike(uint256 mailIndex, bool isDislike) public {
}
function countMails() constant public returns(uint256 length) {
}
function countWithdraws() constant public returns(uint256 length) {
}
function getAccountStatus() constant public returns(uint256 donatePercentVal, uint256 minPaySum, uint256 frozenBalanceSum, uint256 fullBalance, uint256 countMails, uint256 counWithdraws, bool ownerInitialized) {
}
}
contract PostboyFactory {
struct Account {
address contractAddress;
address ownerAddress;
}
Account[] public accounts;
address public adminAddress;
address public factoryAdminAddress;
address public donateWallet;
address public serviceWallet;
PostboyRejectSetting public rejectSettings;
uint256 public servicePercent;
modifier isFactoryAdmin() {
}
modifier isAdmin() {
}
constructor(address _donateWallet, address _serviceWallet, PostboyRejectSetting _rejectSettings, address _factoryAdminAddress) public {
}
function createPostboyAccount(uint256 minPay, uint256 donatePercent, bytes16 guid) public {
}
function createPostboyAccountForSomeone(uint256 minPay, uint256 donatePercent, bytes16 guid) isFactoryAdmin public {
}
function countAccounts() public constant returns(uint length) {
}
function changeServicePercent(uint256 newPercent) isAdmin public {
}
function changeFactoryAdmin(address _admin) isAdmin public {
}
function initOwner(address ownerAddress, address contractAddress) isFactoryAdmin public {
}
function readMailByAdmin(uint256 mailIndex, bytes16 responseText, address contractAddress) isFactoryAdmin public {
}
function withdrawMoneyByAdmin(uint256 amount, address contractAddress) isFactoryAdmin public {
}
}
| mails[mailIndex].createdTime+rejectConfig.minTimeForReject()<now | 360,093 | mails[mailIndex].createdTime+rejectConfig.minTimeForReject()<now |
null | contract PostboyRejectSetting {
address public adminAddress;
uint256 public minTimeForReject;
bool public isRejectEnabled;
modifier isAdmin() {
}
constructor() public {
}
function changeRejectSetting(uint256 rejectTime, bool isEnabled) isAdmin public {
}
}
contract PostboyAccount {
struct Mail {
bytes16 mailText;
bytes16 responseText;
uint256 paySum;
bool isPublic;
bool isRead;
address sender;
bool hasLike;
bool isDislike;
bool isRejected;
uint256 createdTime;
}
Mail[] public mails;
uint256[] public withdraws;
address public owner;
address public donateWallet;
address public serviceWallet;
PostboyRejectSetting public rejectConfig;
address public adminWallet;
uint256 public servicePercent;
bytes16 public guid;
bool public isOwnerInitialized;
uint256 public minPay;
uint256 public donatePercent;
uint256 public frozenBalance;
modifier isOwner() {
}
modifier isAdmin() {
}
constructor(uint256 _minPay, uint256 _donatePercent, uint256 _servicePercent, bytes16 _guid, address _donateWallet, address _serviceWallet, address _owner, address _admin, PostboyRejectSetting _rejectConfig) public {
}
function initOwner(address _owner) isAdmin public {
}
function sendMail(bytes16 mailText, bool isPublic) payable public {
}
function rejectMail(uint256 mailIndex) public {
}
function readMail(uint256 mailIndex, bytes16 responseText) isOwner public {
}
function readMailByAdmin(uint256 mailIndex, bytes16 responseText) isAdmin public {
}
function withdrawMoney(uint256 amount) isOwner public {
require(<FILL_ME>)
withdraws.push(amount);
msg.sender.transfer(amount);
}
function withdrawMoneyByAdmin(uint256 amount) isAdmin public {
}
function updateConfig(uint256 _minPay, uint256 _donatePercent) isOwner public {
}
function addLike(uint256 mailIndex, bool isDislike) public {
}
function countMails() constant public returns(uint256 length) {
}
function countWithdraws() constant public returns(uint256 length) {
}
function getAccountStatus() constant public returns(uint256 donatePercentVal, uint256 minPaySum, uint256 frozenBalanceSum, uint256 fullBalance, uint256 countMails, uint256 counWithdraws, bool ownerInitialized) {
}
}
contract PostboyFactory {
struct Account {
address contractAddress;
address ownerAddress;
}
Account[] public accounts;
address public adminAddress;
address public factoryAdminAddress;
address public donateWallet;
address public serviceWallet;
PostboyRejectSetting public rejectSettings;
uint256 public servicePercent;
modifier isFactoryAdmin() {
}
modifier isAdmin() {
}
constructor(address _donateWallet, address _serviceWallet, PostboyRejectSetting _rejectSettings, address _factoryAdminAddress) public {
}
function createPostboyAccount(uint256 minPay, uint256 donatePercent, bytes16 guid) public {
}
function createPostboyAccountForSomeone(uint256 minPay, uint256 donatePercent, bytes16 guid) isFactoryAdmin public {
}
function countAccounts() public constant returns(uint length) {
}
function changeServicePercent(uint256 newPercent) isAdmin public {
}
function changeFactoryAdmin(address _admin) isAdmin public {
}
function initOwner(address ownerAddress, address contractAddress) isFactoryAdmin public {
}
function readMailByAdmin(uint256 mailIndex, bytes16 responseText, address contractAddress) isFactoryAdmin public {
}
function withdrawMoneyByAdmin(uint256 amount, address contractAddress) isFactoryAdmin public {
}
}
| address(this).balance-frozenBalance>=amount | 360,093 | address(this).balance-frozenBalance>=amount |
null | contract PostboyRejectSetting {
address public adminAddress;
uint256 public minTimeForReject;
bool public isRejectEnabled;
modifier isAdmin() {
}
constructor() public {
}
function changeRejectSetting(uint256 rejectTime, bool isEnabled) isAdmin public {
}
}
contract PostboyAccount {
struct Mail {
bytes16 mailText;
bytes16 responseText;
uint256 paySum;
bool isPublic;
bool isRead;
address sender;
bool hasLike;
bool isDislike;
bool isRejected;
uint256 createdTime;
}
Mail[] public mails;
uint256[] public withdraws;
address public owner;
address public donateWallet;
address public serviceWallet;
PostboyRejectSetting public rejectConfig;
address public adminWallet;
uint256 public servicePercent;
bytes16 public guid;
bool public isOwnerInitialized;
uint256 public minPay;
uint256 public donatePercent;
uint256 public frozenBalance;
modifier isOwner() {
}
modifier isAdmin() {
}
constructor(uint256 _minPay, uint256 _donatePercent, uint256 _servicePercent, bytes16 _guid, address _donateWallet, address _serviceWallet, address _owner, address _admin, PostboyRejectSetting _rejectConfig) public {
}
function initOwner(address _owner) isAdmin public {
}
function sendMail(bytes16 mailText, bool isPublic) payable public {
}
function rejectMail(uint256 mailIndex) public {
}
function readMail(uint256 mailIndex, bytes16 responseText) isOwner public {
}
function readMailByAdmin(uint256 mailIndex, bytes16 responseText) isAdmin public {
}
function withdrawMoney(uint256 amount) isOwner public {
}
function withdrawMoneyByAdmin(uint256 amount) isAdmin public {
}
function updateConfig(uint256 _minPay, uint256 _donatePercent) isOwner public {
}
function addLike(uint256 mailIndex, bool isDislike) public {
require(mailIndex < mails.length);
require(mails[mailIndex].sender == msg.sender);
require(<FILL_ME>)
require(mails[mailIndex].hasLike == false);
mails[mailIndex].hasLike = true;
mails[mailIndex].isDislike = isDislike;
}
function countMails() constant public returns(uint256 length) {
}
function countWithdraws() constant public returns(uint256 length) {
}
function getAccountStatus() constant public returns(uint256 donatePercentVal, uint256 minPaySum, uint256 frozenBalanceSum, uint256 fullBalance, uint256 countMails, uint256 counWithdraws, bool ownerInitialized) {
}
}
contract PostboyFactory {
struct Account {
address contractAddress;
address ownerAddress;
}
Account[] public accounts;
address public adminAddress;
address public factoryAdminAddress;
address public donateWallet;
address public serviceWallet;
PostboyRejectSetting public rejectSettings;
uint256 public servicePercent;
modifier isFactoryAdmin() {
}
modifier isAdmin() {
}
constructor(address _donateWallet, address _serviceWallet, PostboyRejectSetting _rejectSettings, address _factoryAdminAddress) public {
}
function createPostboyAccount(uint256 minPay, uint256 donatePercent, bytes16 guid) public {
}
function createPostboyAccountForSomeone(uint256 minPay, uint256 donatePercent, bytes16 guid) isFactoryAdmin public {
}
function countAccounts() public constant returns(uint length) {
}
function changeServicePercent(uint256 newPercent) isAdmin public {
}
function changeFactoryAdmin(address _admin) isAdmin public {
}
function initOwner(address ownerAddress, address contractAddress) isFactoryAdmin public {
}
function readMailByAdmin(uint256 mailIndex, bytes16 responseText, address contractAddress) isFactoryAdmin public {
}
function withdrawMoneyByAdmin(uint256 amount, address contractAddress) isFactoryAdmin public {
}
}
| mails[mailIndex].isRead==true | 360,093 | mails[mailIndex].isRead==true |
null | contract PostboyRejectSetting {
address public adminAddress;
uint256 public minTimeForReject;
bool public isRejectEnabled;
modifier isAdmin() {
}
constructor() public {
}
function changeRejectSetting(uint256 rejectTime, bool isEnabled) isAdmin public {
}
}
contract PostboyAccount {
struct Mail {
bytes16 mailText;
bytes16 responseText;
uint256 paySum;
bool isPublic;
bool isRead;
address sender;
bool hasLike;
bool isDislike;
bool isRejected;
uint256 createdTime;
}
Mail[] public mails;
uint256[] public withdraws;
address public owner;
address public donateWallet;
address public serviceWallet;
PostboyRejectSetting public rejectConfig;
address public adminWallet;
uint256 public servicePercent;
bytes16 public guid;
bool public isOwnerInitialized;
uint256 public minPay;
uint256 public donatePercent;
uint256 public frozenBalance;
modifier isOwner() {
}
modifier isAdmin() {
}
constructor(uint256 _minPay, uint256 _donatePercent, uint256 _servicePercent, bytes16 _guid, address _donateWallet, address _serviceWallet, address _owner, address _admin, PostboyRejectSetting _rejectConfig) public {
}
function initOwner(address _owner) isAdmin public {
}
function sendMail(bytes16 mailText, bool isPublic) payable public {
}
function rejectMail(uint256 mailIndex) public {
}
function readMail(uint256 mailIndex, bytes16 responseText) isOwner public {
}
function readMailByAdmin(uint256 mailIndex, bytes16 responseText) isAdmin public {
}
function withdrawMoney(uint256 amount) isOwner public {
}
function withdrawMoneyByAdmin(uint256 amount) isAdmin public {
}
function updateConfig(uint256 _minPay, uint256 _donatePercent) isOwner public {
}
function addLike(uint256 mailIndex, bool isDislike) public {
require(mailIndex < mails.length);
require(mails[mailIndex].sender == msg.sender);
require(mails[mailIndex].isRead == true);
require(<FILL_ME>)
mails[mailIndex].hasLike = true;
mails[mailIndex].isDislike = isDislike;
}
function countMails() constant public returns(uint256 length) {
}
function countWithdraws() constant public returns(uint256 length) {
}
function getAccountStatus() constant public returns(uint256 donatePercentVal, uint256 minPaySum, uint256 frozenBalanceSum, uint256 fullBalance, uint256 countMails, uint256 counWithdraws, bool ownerInitialized) {
}
}
contract PostboyFactory {
struct Account {
address contractAddress;
address ownerAddress;
}
Account[] public accounts;
address public adminAddress;
address public factoryAdminAddress;
address public donateWallet;
address public serviceWallet;
PostboyRejectSetting public rejectSettings;
uint256 public servicePercent;
modifier isFactoryAdmin() {
}
modifier isAdmin() {
}
constructor(address _donateWallet, address _serviceWallet, PostboyRejectSetting _rejectSettings, address _factoryAdminAddress) public {
}
function createPostboyAccount(uint256 minPay, uint256 donatePercent, bytes16 guid) public {
}
function createPostboyAccountForSomeone(uint256 minPay, uint256 donatePercent, bytes16 guid) isFactoryAdmin public {
}
function countAccounts() public constant returns(uint length) {
}
function changeServicePercent(uint256 newPercent) isAdmin public {
}
function changeFactoryAdmin(address _admin) isAdmin public {
}
function initOwner(address ownerAddress, address contractAddress) isFactoryAdmin public {
}
function readMailByAdmin(uint256 mailIndex, bytes16 responseText, address contractAddress) isFactoryAdmin public {
}
function withdrawMoneyByAdmin(uint256 amount, address contractAddress) isFactoryAdmin public {
}
}
| mails[mailIndex].hasLike==false | 360,093 | mails[mailIndex].hasLike==false |
null | pragma solidity >=0.4.22 <0.9.0;
contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
constructor (string memory name_, string memory symbol_ ) {
}
function name() public view virtual returns (string memory) {
}
function symbol() public view virtual returns (string memory) {
}
function decimals() public view virtual returns (uint8) {
}
function totalSupply() public view virtual override returns (uint256) {
}
function balanceOf(address account) public view virtual override returns (uint256) {
}
modifier onlyPayloadSize(uint size) {
require(<FILL_ME>)
_;
}
function transfer(address recipient, uint256 amount) public virtual override onlyPayloadSize(2 * 32) returns (bool) {
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function approve(address spender, uint256 amount) public virtual override onlyPayloadSize(2 * 32) returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public virtual override onlyPayloadSize(3 * 32) returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual onlyPayloadSize(2 * 32) returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual onlyPayloadSize(2 * 32) returns (bool) {
}
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
}
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
}
contract Ownable is Context {
address public owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() {
}
modifier onlyOwner() {
}
function transferOwnership(address _newOwner) public onlyOwner {
}
function _transferOwnership(address _newOwner) internal {
}
}
contract Pausable is Context, Ownable {
event Paused(address account);
event Unpaused(address account);
bool private _paused = false;
function paused() public view virtual returns (bool) {
}
modifier whenNotPaused() {
}
modifier whenPaused() {
}
function _pause() internal virtual onlyOwner whenNotPaused {
}
function _unpause() internal virtual onlyOwner whenPaused {
}
}
contract MOVD is Pausable, ERC20 {
using SafeMath for uint256;
constructor()
ERC20("MOVD Token", "MOVD"){}
function transfer(address recipient, uint256 amount) public virtual override whenNotPaused onlyPayloadSize(2 * 32) returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public virtual override whenNotPaused onlyPayloadSize(3 * 32) returns (bool) {
}
function pause() public {
}
function unpause() public {
}
}
| !(_msgData().length<size+4) | 360,223 | !(_msgData().length<size+4) |
null | pragma solidity ^0.4.15;
contract Base {
modifier only(address allowed) {
}
// *************************************************
// * reentrancy handling *
// *************************************************
uint constant internal L00 = 2 ** 0;
uint constant internal L01 = 2 ** 1;
uint constant internal L02 = 2 ** 2;
uint constant internal L03 = 2 ** 3;
uint constant internal L04 = 2 ** 4;
uint constant internal L05 = 2 ** 5;
uint private bitlocks = 0;
modifier noAnyReentrancy {
}
}
contract IToken {
function mint(address _to, uint _amount);
function start();
function getTotalSupply() returns(uint);
function balanceOf(address _owner) returns(uint);
function transfer(address _to, uint _amount) returns (bool success);
function transferFrom(address _from, address _to, uint _value) returns (bool success);
function burn(uint256 _amount, address _address) returns (bool success);
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal constant returns (uint256) {
}
function div(uint256 a, uint256 b) internal constant returns (uint256) {
}
function sub(uint256 a, uint256 b) internal constant returns (uint256) {
}
function add(uint256 a, uint256 b) internal constant returns (uint256) {
}
}
contract Owned is Base {
address public owner;
address newOwner;
function Owned() {
}
function transferOwnership(address _newOwner) only(owner) {
}
function acceptOwnership() only(newOwner) {
}
event OwnershipTransferred(address indexed _from, address indexed _to);
}
contract Crowdsale is Owned {
using SafeMath for uint;
enum State { INIT, PRESALE, PREICO, PREICO_FINISHED, ICO_FIRST, ICO_SECOND, ICO_THIRD, STOPPED, CLOSED, EMERGENCY_STOP}
uint public constant MAX_SALE_SUPPLY = 24 * (10**25);
uint public constant DECIMALS = (10**18);
State public currentState = State.INIT;
IToken public token;
uint public totalSaleSupply = 0;
uint public totalFunds = 0;
uint public tokenPrice = 1000000000000000000; //wei
uint public bonus = 50000; //50%
uint public currentPrice;
address public beneficiary;
mapping(address => uint) balances;
address public foundersWallet; //replace
uint public foundersAmount = 160000000 * DECIMALS;
uint public maxPreICOSupply = 48 * (10**24);
uint public maxICOFirstSupply = 84 * (10**24);
uint public maxICOSecondSupply = 48 * (10**24);
uint public maxICOThirdSupply = 24 * (10**24);
uint public currentRoundSupply = 0;
uint private bonusBase = 100000; //100%;
modifier inState(State _state){
}
modifier salesRunning(){
}
modifier minAmount(){
}
event Transfer(address indexed _to, uint _value);
function Crowdsale(address _foundersWallet, address _beneficiary){
}
function initialize(IToken _token)
public
only(owner)
inState(State.INIT)
{
}
function setBonus(uint _bonus) public
only(owner)
{
}
function setPrice(uint _tokenPrice)
public
only(owner)
{
}
function setState(State _newState)
public
only(owner)
{
}
function setStateWithBonus(State _newState, uint _bonus)
public
only(owner)
{
}
function mintPresale(address _to, uint _amount)
public
only(owner)
inState(State.PRESALE)
{
require(<FILL_ME>)
totalSaleSupply = totalSaleSupply.add(_amount);
_mint(_to, _amount);
}
function ()
public
payable
salesRunning
minAmount
{
}
//==================== Internal Methods =================
function _receiveFunds()
internal
{
}
function _mint(address _to, uint _amount)
noAnyReentrancy
internal
{
}
function _checkMaxRoundSupply(uint _amountTokens)
internal
{
}
function burn(uint256 _amount, address _address) only(owner) {
}
function _finish()
noAnyReentrancy
internal
{
}
}
| totalSaleSupply.add(_amount)<=MAX_SALE_SUPPLY | 360,242 | totalSaleSupply.add(_amount)<=MAX_SALE_SUPPLY |
null | pragma solidity ^0.4.15;
contract Base {
modifier only(address allowed) {
}
// *************************************************
// * reentrancy handling *
// *************************************************
uint constant internal L00 = 2 ** 0;
uint constant internal L01 = 2 ** 1;
uint constant internal L02 = 2 ** 2;
uint constant internal L03 = 2 ** 3;
uint constant internal L04 = 2 ** 4;
uint constant internal L05 = 2 ** 5;
uint private bitlocks = 0;
modifier noAnyReentrancy {
}
}
contract IToken {
function mint(address _to, uint _amount);
function start();
function getTotalSupply() returns(uint);
function balanceOf(address _owner) returns(uint);
function transfer(address _to, uint _amount) returns (bool success);
function transferFrom(address _from, address _to, uint _value) returns (bool success);
function burn(uint256 _amount, address _address) returns (bool success);
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal constant returns (uint256) {
}
function div(uint256 a, uint256 b) internal constant returns (uint256) {
}
function sub(uint256 a, uint256 b) internal constant returns (uint256) {
}
function add(uint256 a, uint256 b) internal constant returns (uint256) {
}
}
contract Owned is Base {
address public owner;
address newOwner;
function Owned() {
}
function transferOwnership(address _newOwner) only(owner) {
}
function acceptOwnership() only(newOwner) {
}
event OwnershipTransferred(address indexed _from, address indexed _to);
}
contract Crowdsale is Owned {
using SafeMath for uint;
enum State { INIT, PRESALE, PREICO, PREICO_FINISHED, ICO_FIRST, ICO_SECOND, ICO_THIRD, STOPPED, CLOSED, EMERGENCY_STOP}
uint public constant MAX_SALE_SUPPLY = 24 * (10**25);
uint public constant DECIMALS = (10**18);
State public currentState = State.INIT;
IToken public token;
uint public totalSaleSupply = 0;
uint public totalFunds = 0;
uint public tokenPrice = 1000000000000000000; //wei
uint public bonus = 50000; //50%
uint public currentPrice;
address public beneficiary;
mapping(address => uint) balances;
address public foundersWallet; //replace
uint public foundersAmount = 160000000 * DECIMALS;
uint public maxPreICOSupply = 48 * (10**24);
uint public maxICOFirstSupply = 84 * (10**24);
uint public maxICOSecondSupply = 48 * (10**24);
uint public maxICOThirdSupply = 24 * (10**24);
uint public currentRoundSupply = 0;
uint private bonusBase = 100000; //100%;
modifier inState(State _state){
}
modifier salesRunning(){
}
modifier minAmount(){
}
event Transfer(address indexed _to, uint _value);
function Crowdsale(address _foundersWallet, address _beneficiary){
}
function initialize(IToken _token)
public
only(owner)
inState(State.INIT)
{
}
function setBonus(uint _bonus) public
only(owner)
{
}
function setPrice(uint _tokenPrice)
public
only(owner)
{
}
function setState(State _newState)
public
only(owner)
{
}
function setStateWithBonus(State _newState, uint _bonus)
public
only(owner)
{
}
function mintPresale(address _to, uint _amount)
public
only(owner)
inState(State.PRESALE)
{
}
function ()
public
payable
salesRunning
minAmount
{
}
//==================== Internal Methods =================
function _receiveFunds()
internal
{
require(msg.value != 0);
uint transferTokens = msg.value.mul(DECIMALS).div(currentPrice);
require(<FILL_ME>)
uint bonusTokens = transferTokens.mul(bonus).div(bonusBase);
transferTokens = transferTokens.add(bonusTokens);
_checkMaxRoundSupply(transferTokens);
totalSaleSupply = totalSaleSupply.add(transferTokens);
balances[msg.sender] = balances[msg.sender].add(msg.value);
totalFunds = totalFunds.add(msg.value);
_mint(msg.sender, transferTokens);
beneficiary.transfer(msg.value);
Transfer(msg.sender, transferTokens);
}
function _mint(address _to, uint _amount)
noAnyReentrancy
internal
{
}
function _checkMaxRoundSupply(uint _amountTokens)
internal
{
}
function burn(uint256 _amount, address _address) only(owner) {
}
function _finish()
noAnyReentrancy
internal
{
}
}
| totalSaleSupply.add(transferTokens)<=MAX_SALE_SUPPLY | 360,242 | totalSaleSupply.add(transferTokens)<=MAX_SALE_SUPPLY |
null | pragma solidity ^0.4.15;
contract Base {
modifier only(address allowed) {
}
// *************************************************
// * reentrancy handling *
// *************************************************
uint constant internal L00 = 2 ** 0;
uint constant internal L01 = 2 ** 1;
uint constant internal L02 = 2 ** 2;
uint constant internal L03 = 2 ** 3;
uint constant internal L04 = 2 ** 4;
uint constant internal L05 = 2 ** 5;
uint private bitlocks = 0;
modifier noAnyReentrancy {
}
}
contract IToken {
function mint(address _to, uint _amount);
function start();
function getTotalSupply() returns(uint);
function balanceOf(address _owner) returns(uint);
function transfer(address _to, uint _amount) returns (bool success);
function transferFrom(address _from, address _to, uint _value) returns (bool success);
function burn(uint256 _amount, address _address) returns (bool success);
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal constant returns (uint256) {
}
function div(uint256 a, uint256 b) internal constant returns (uint256) {
}
function sub(uint256 a, uint256 b) internal constant returns (uint256) {
}
function add(uint256 a, uint256 b) internal constant returns (uint256) {
}
}
contract Owned is Base {
address public owner;
address newOwner;
function Owned() {
}
function transferOwnership(address _newOwner) only(owner) {
}
function acceptOwnership() only(newOwner) {
}
event OwnershipTransferred(address indexed _from, address indexed _to);
}
contract Crowdsale is Owned {
using SafeMath for uint;
enum State { INIT, PRESALE, PREICO, PREICO_FINISHED, ICO_FIRST, ICO_SECOND, ICO_THIRD, STOPPED, CLOSED, EMERGENCY_STOP}
uint public constant MAX_SALE_SUPPLY = 24 * (10**25);
uint public constant DECIMALS = (10**18);
State public currentState = State.INIT;
IToken public token;
uint public totalSaleSupply = 0;
uint public totalFunds = 0;
uint public tokenPrice = 1000000000000000000; //wei
uint public bonus = 50000; //50%
uint public currentPrice;
address public beneficiary;
mapping(address => uint) balances;
address public foundersWallet; //replace
uint public foundersAmount = 160000000 * DECIMALS;
uint public maxPreICOSupply = 48 * (10**24);
uint public maxICOFirstSupply = 84 * (10**24);
uint public maxICOSecondSupply = 48 * (10**24);
uint public maxICOThirdSupply = 24 * (10**24);
uint public currentRoundSupply = 0;
uint private bonusBase = 100000; //100%;
modifier inState(State _state){
}
modifier salesRunning(){
}
modifier minAmount(){
}
event Transfer(address indexed _to, uint _value);
function Crowdsale(address _foundersWallet, address _beneficiary){
}
function initialize(IToken _token)
public
only(owner)
inState(State.INIT)
{
}
function setBonus(uint _bonus) public
only(owner)
{
}
function setPrice(uint _tokenPrice)
public
only(owner)
{
}
function setState(State _newState)
public
only(owner)
{
}
function setStateWithBonus(State _newState, uint _bonus)
public
only(owner)
{
}
function mintPresale(address _to, uint _amount)
public
only(owner)
inState(State.PRESALE)
{
}
function ()
public
payable
salesRunning
minAmount
{
}
//==================== Internal Methods =================
function _receiveFunds()
internal
{
}
function _mint(address _to, uint _amount)
noAnyReentrancy
internal
{
}
function _checkMaxRoundSupply(uint _amountTokens)
internal
{
if (currentState == State.PREICO) {
require(<FILL_ME>)
} else if (currentState == State.ICO_FIRST) {
require(currentRoundSupply.add(_amountTokens) <= maxICOFirstSupply);
} else if (currentState == State.ICO_SECOND) {
require(currentRoundSupply.add(_amountTokens) <= maxICOSecondSupply);
} else if (currentState == State.ICO_THIRD) {
require(currentRoundSupply.add(_amountTokens) <= maxICOThirdSupply);
}
}
function burn(uint256 _amount, address _address) only(owner) {
}
function _finish()
noAnyReentrancy
internal
{
}
}
| currentRoundSupply.add(_amountTokens)<=maxPreICOSupply | 360,242 | currentRoundSupply.add(_amountTokens)<=maxPreICOSupply |
null | pragma solidity ^0.4.15;
contract Base {
modifier only(address allowed) {
}
// *************************************************
// * reentrancy handling *
// *************************************************
uint constant internal L00 = 2 ** 0;
uint constant internal L01 = 2 ** 1;
uint constant internal L02 = 2 ** 2;
uint constant internal L03 = 2 ** 3;
uint constant internal L04 = 2 ** 4;
uint constant internal L05 = 2 ** 5;
uint private bitlocks = 0;
modifier noAnyReentrancy {
}
}
contract IToken {
function mint(address _to, uint _amount);
function start();
function getTotalSupply() returns(uint);
function balanceOf(address _owner) returns(uint);
function transfer(address _to, uint _amount) returns (bool success);
function transferFrom(address _from, address _to, uint _value) returns (bool success);
function burn(uint256 _amount, address _address) returns (bool success);
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal constant returns (uint256) {
}
function div(uint256 a, uint256 b) internal constant returns (uint256) {
}
function sub(uint256 a, uint256 b) internal constant returns (uint256) {
}
function add(uint256 a, uint256 b) internal constant returns (uint256) {
}
}
contract Owned is Base {
address public owner;
address newOwner;
function Owned() {
}
function transferOwnership(address _newOwner) only(owner) {
}
function acceptOwnership() only(newOwner) {
}
event OwnershipTransferred(address indexed _from, address indexed _to);
}
contract Crowdsale is Owned {
using SafeMath for uint;
enum State { INIT, PRESALE, PREICO, PREICO_FINISHED, ICO_FIRST, ICO_SECOND, ICO_THIRD, STOPPED, CLOSED, EMERGENCY_STOP}
uint public constant MAX_SALE_SUPPLY = 24 * (10**25);
uint public constant DECIMALS = (10**18);
State public currentState = State.INIT;
IToken public token;
uint public totalSaleSupply = 0;
uint public totalFunds = 0;
uint public tokenPrice = 1000000000000000000; //wei
uint public bonus = 50000; //50%
uint public currentPrice;
address public beneficiary;
mapping(address => uint) balances;
address public foundersWallet; //replace
uint public foundersAmount = 160000000 * DECIMALS;
uint public maxPreICOSupply = 48 * (10**24);
uint public maxICOFirstSupply = 84 * (10**24);
uint public maxICOSecondSupply = 48 * (10**24);
uint public maxICOThirdSupply = 24 * (10**24);
uint public currentRoundSupply = 0;
uint private bonusBase = 100000; //100%;
modifier inState(State _state){
}
modifier salesRunning(){
}
modifier minAmount(){
}
event Transfer(address indexed _to, uint _value);
function Crowdsale(address _foundersWallet, address _beneficiary){
}
function initialize(IToken _token)
public
only(owner)
inState(State.INIT)
{
}
function setBonus(uint _bonus) public
only(owner)
{
}
function setPrice(uint _tokenPrice)
public
only(owner)
{
}
function setState(State _newState)
public
only(owner)
{
}
function setStateWithBonus(State _newState, uint _bonus)
public
only(owner)
{
}
function mintPresale(address _to, uint _amount)
public
only(owner)
inState(State.PRESALE)
{
}
function ()
public
payable
salesRunning
minAmount
{
}
//==================== Internal Methods =================
function _receiveFunds()
internal
{
}
function _mint(address _to, uint _amount)
noAnyReentrancy
internal
{
}
function _checkMaxRoundSupply(uint _amountTokens)
internal
{
if (currentState == State.PREICO) {
require(currentRoundSupply.add(_amountTokens) <= maxPreICOSupply);
} else if (currentState == State.ICO_FIRST) {
require(<FILL_ME>)
} else if (currentState == State.ICO_SECOND) {
require(currentRoundSupply.add(_amountTokens) <= maxICOSecondSupply);
} else if (currentState == State.ICO_THIRD) {
require(currentRoundSupply.add(_amountTokens) <= maxICOThirdSupply);
}
}
function burn(uint256 _amount, address _address) only(owner) {
}
function _finish()
noAnyReentrancy
internal
{
}
}
| currentRoundSupply.add(_amountTokens)<=maxICOFirstSupply | 360,242 | currentRoundSupply.add(_amountTokens)<=maxICOFirstSupply |
null | pragma solidity ^0.4.15;
contract Base {
modifier only(address allowed) {
}
// *************************************************
// * reentrancy handling *
// *************************************************
uint constant internal L00 = 2 ** 0;
uint constant internal L01 = 2 ** 1;
uint constant internal L02 = 2 ** 2;
uint constant internal L03 = 2 ** 3;
uint constant internal L04 = 2 ** 4;
uint constant internal L05 = 2 ** 5;
uint private bitlocks = 0;
modifier noAnyReentrancy {
}
}
contract IToken {
function mint(address _to, uint _amount);
function start();
function getTotalSupply() returns(uint);
function balanceOf(address _owner) returns(uint);
function transfer(address _to, uint _amount) returns (bool success);
function transferFrom(address _from, address _to, uint _value) returns (bool success);
function burn(uint256 _amount, address _address) returns (bool success);
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal constant returns (uint256) {
}
function div(uint256 a, uint256 b) internal constant returns (uint256) {
}
function sub(uint256 a, uint256 b) internal constant returns (uint256) {
}
function add(uint256 a, uint256 b) internal constant returns (uint256) {
}
}
contract Owned is Base {
address public owner;
address newOwner;
function Owned() {
}
function transferOwnership(address _newOwner) only(owner) {
}
function acceptOwnership() only(newOwner) {
}
event OwnershipTransferred(address indexed _from, address indexed _to);
}
contract Crowdsale is Owned {
using SafeMath for uint;
enum State { INIT, PRESALE, PREICO, PREICO_FINISHED, ICO_FIRST, ICO_SECOND, ICO_THIRD, STOPPED, CLOSED, EMERGENCY_STOP}
uint public constant MAX_SALE_SUPPLY = 24 * (10**25);
uint public constant DECIMALS = (10**18);
State public currentState = State.INIT;
IToken public token;
uint public totalSaleSupply = 0;
uint public totalFunds = 0;
uint public tokenPrice = 1000000000000000000; //wei
uint public bonus = 50000; //50%
uint public currentPrice;
address public beneficiary;
mapping(address => uint) balances;
address public foundersWallet; //replace
uint public foundersAmount = 160000000 * DECIMALS;
uint public maxPreICOSupply = 48 * (10**24);
uint public maxICOFirstSupply = 84 * (10**24);
uint public maxICOSecondSupply = 48 * (10**24);
uint public maxICOThirdSupply = 24 * (10**24);
uint public currentRoundSupply = 0;
uint private bonusBase = 100000; //100%;
modifier inState(State _state){
}
modifier salesRunning(){
}
modifier minAmount(){
}
event Transfer(address indexed _to, uint _value);
function Crowdsale(address _foundersWallet, address _beneficiary){
}
function initialize(IToken _token)
public
only(owner)
inState(State.INIT)
{
}
function setBonus(uint _bonus) public
only(owner)
{
}
function setPrice(uint _tokenPrice)
public
only(owner)
{
}
function setState(State _newState)
public
only(owner)
{
}
function setStateWithBonus(State _newState, uint _bonus)
public
only(owner)
{
}
function mintPresale(address _to, uint _amount)
public
only(owner)
inState(State.PRESALE)
{
}
function ()
public
payable
salesRunning
minAmount
{
}
//==================== Internal Methods =================
function _receiveFunds()
internal
{
}
function _mint(address _to, uint _amount)
noAnyReentrancy
internal
{
}
function _checkMaxRoundSupply(uint _amountTokens)
internal
{
if (currentState == State.PREICO) {
require(currentRoundSupply.add(_amountTokens) <= maxPreICOSupply);
} else if (currentState == State.ICO_FIRST) {
require(currentRoundSupply.add(_amountTokens) <= maxICOFirstSupply);
} else if (currentState == State.ICO_SECOND) {
require(<FILL_ME>)
} else if (currentState == State.ICO_THIRD) {
require(currentRoundSupply.add(_amountTokens) <= maxICOThirdSupply);
}
}
function burn(uint256 _amount, address _address) only(owner) {
}
function _finish()
noAnyReentrancy
internal
{
}
}
| currentRoundSupply.add(_amountTokens)<=maxICOSecondSupply | 360,242 | currentRoundSupply.add(_amountTokens)<=maxICOSecondSupply |
null | pragma solidity ^0.4.15;
contract Base {
modifier only(address allowed) {
}
// *************************************************
// * reentrancy handling *
// *************************************************
uint constant internal L00 = 2 ** 0;
uint constant internal L01 = 2 ** 1;
uint constant internal L02 = 2 ** 2;
uint constant internal L03 = 2 ** 3;
uint constant internal L04 = 2 ** 4;
uint constant internal L05 = 2 ** 5;
uint private bitlocks = 0;
modifier noAnyReentrancy {
}
}
contract IToken {
function mint(address _to, uint _amount);
function start();
function getTotalSupply() returns(uint);
function balanceOf(address _owner) returns(uint);
function transfer(address _to, uint _amount) returns (bool success);
function transferFrom(address _from, address _to, uint _value) returns (bool success);
function burn(uint256 _amount, address _address) returns (bool success);
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal constant returns (uint256) {
}
function div(uint256 a, uint256 b) internal constant returns (uint256) {
}
function sub(uint256 a, uint256 b) internal constant returns (uint256) {
}
function add(uint256 a, uint256 b) internal constant returns (uint256) {
}
}
contract Owned is Base {
address public owner;
address newOwner;
function Owned() {
}
function transferOwnership(address _newOwner) only(owner) {
}
function acceptOwnership() only(newOwner) {
}
event OwnershipTransferred(address indexed _from, address indexed _to);
}
contract Crowdsale is Owned {
using SafeMath for uint;
enum State { INIT, PRESALE, PREICO, PREICO_FINISHED, ICO_FIRST, ICO_SECOND, ICO_THIRD, STOPPED, CLOSED, EMERGENCY_STOP}
uint public constant MAX_SALE_SUPPLY = 24 * (10**25);
uint public constant DECIMALS = (10**18);
State public currentState = State.INIT;
IToken public token;
uint public totalSaleSupply = 0;
uint public totalFunds = 0;
uint public tokenPrice = 1000000000000000000; //wei
uint public bonus = 50000; //50%
uint public currentPrice;
address public beneficiary;
mapping(address => uint) balances;
address public foundersWallet; //replace
uint public foundersAmount = 160000000 * DECIMALS;
uint public maxPreICOSupply = 48 * (10**24);
uint public maxICOFirstSupply = 84 * (10**24);
uint public maxICOSecondSupply = 48 * (10**24);
uint public maxICOThirdSupply = 24 * (10**24);
uint public currentRoundSupply = 0;
uint private bonusBase = 100000; //100%;
modifier inState(State _state){
}
modifier salesRunning(){
}
modifier minAmount(){
}
event Transfer(address indexed _to, uint _value);
function Crowdsale(address _foundersWallet, address _beneficiary){
}
function initialize(IToken _token)
public
only(owner)
inState(State.INIT)
{
}
function setBonus(uint _bonus) public
only(owner)
{
}
function setPrice(uint _tokenPrice)
public
only(owner)
{
}
function setState(State _newState)
public
only(owner)
{
}
function setStateWithBonus(State _newState, uint _bonus)
public
only(owner)
{
}
function mintPresale(address _to, uint _amount)
public
only(owner)
inState(State.PRESALE)
{
}
function ()
public
payable
salesRunning
minAmount
{
}
//==================== Internal Methods =================
function _receiveFunds()
internal
{
}
function _mint(address _to, uint _amount)
noAnyReentrancy
internal
{
}
function _checkMaxRoundSupply(uint _amountTokens)
internal
{
if (currentState == State.PREICO) {
require(currentRoundSupply.add(_amountTokens) <= maxPreICOSupply);
} else if (currentState == State.ICO_FIRST) {
require(currentRoundSupply.add(_amountTokens) <= maxICOFirstSupply);
} else if (currentState == State.ICO_SECOND) {
require(currentRoundSupply.add(_amountTokens) <= maxICOSecondSupply);
} else if (currentState == State.ICO_THIRD) {
require(<FILL_ME>)
}
}
function burn(uint256 _amount, address _address) only(owner) {
}
function _finish()
noAnyReentrancy
internal
{
}
}
| currentRoundSupply.add(_amountTokens)<=maxICOThirdSupply | 360,242 | currentRoundSupply.add(_amountTokens)<=maxICOThirdSupply |
null | pragma solidity ^0.4.15;
contract Base {
modifier only(address allowed) {
}
// *************************************************
// * reentrancy handling *
// *************************************************
uint constant internal L00 = 2 ** 0;
uint constant internal L01 = 2 ** 1;
uint constant internal L02 = 2 ** 2;
uint constant internal L03 = 2 ** 3;
uint constant internal L04 = 2 ** 4;
uint constant internal L05 = 2 ** 5;
uint private bitlocks = 0;
modifier noAnyReentrancy {
}
}
contract IToken {
function mint(address _to, uint _amount);
function start();
function getTotalSupply() returns(uint);
function balanceOf(address _owner) returns(uint);
function transfer(address _to, uint _amount) returns (bool success);
function transferFrom(address _from, address _to, uint _value) returns (bool success);
function burn(uint256 _amount, address _address) returns (bool success);
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal constant returns (uint256) {
}
function div(uint256 a, uint256 b) internal constant returns (uint256) {
}
function sub(uint256 a, uint256 b) internal constant returns (uint256) {
}
function add(uint256 a, uint256 b) internal constant returns (uint256) {
}
}
contract Owned is Base {
address public owner;
address newOwner;
function Owned() {
}
function transferOwnership(address _newOwner) only(owner) {
}
function acceptOwnership() only(newOwner) {
}
event OwnershipTransferred(address indexed _from, address indexed _to);
}
contract Crowdsale is Owned {
using SafeMath for uint;
enum State { INIT, PRESALE, PREICO, PREICO_FINISHED, ICO_FIRST, ICO_SECOND, ICO_THIRD, STOPPED, CLOSED, EMERGENCY_STOP}
uint public constant MAX_SALE_SUPPLY = 24 * (10**25);
uint public constant DECIMALS = (10**18);
State public currentState = State.INIT;
IToken public token;
uint public totalSaleSupply = 0;
uint public totalFunds = 0;
uint public tokenPrice = 1000000000000000000; //wei
uint public bonus = 50000; //50%
uint public currentPrice;
address public beneficiary;
mapping(address => uint) balances;
address public foundersWallet; //replace
uint public foundersAmount = 160000000 * DECIMALS;
uint public maxPreICOSupply = 48 * (10**24);
uint public maxICOFirstSupply = 84 * (10**24);
uint public maxICOSecondSupply = 48 * (10**24);
uint public maxICOThirdSupply = 24 * (10**24);
uint public currentRoundSupply = 0;
uint private bonusBase = 100000; //100%;
modifier inState(State _state){
}
modifier salesRunning(){
}
modifier minAmount(){
}
event Transfer(address indexed _to, uint _value);
function Crowdsale(address _foundersWallet, address _beneficiary){
}
function initialize(IToken _token)
public
only(owner)
inState(State.INIT)
{
}
function setBonus(uint _bonus) public
only(owner)
{
}
function setPrice(uint _tokenPrice)
public
only(owner)
{
}
function setState(State _newState)
public
only(owner)
{
}
function setStateWithBonus(State _newState, uint _bonus)
public
only(owner)
{
}
function mintPresale(address _to, uint _amount)
public
only(owner)
inState(State.PRESALE)
{
}
function ()
public
payable
salesRunning
minAmount
{
}
//==================== Internal Methods =================
function _receiveFunds()
internal
{
}
function _mint(address _to, uint _amount)
noAnyReentrancy
internal
{
}
function _checkMaxRoundSupply(uint _amountTokens)
internal
{
}
function burn(uint256 _amount, address _address) only(owner) {
require(<FILL_ME>)
}
function _finish()
noAnyReentrancy
internal
{
}
}
| token.burn(_amount,_address) | 360,242 | token.burn(_amount,_address) |
"issuance: incorrect stage" | // Copyright (C) 2021 Exponent
// This file is part of Exponent.
// Exponent is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Exponent is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Exponent. If not, see <http://www.gnu.org/licenses/>.
pragma solidity 0.8.0;
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "../interface/IXPN.sol";
// @title Simple round-based fund raising contract for Exponent Vault issuance
contract SimpleIssuance is ReentrancyGuard, AccessControl, Pausable {
using SafeERC20 for IERC20;
bytes32 public constant ISSUANCE_MANAGER = keccak256("ISSUANCE_MANAGER");
// @dev uninitialized value is always index 0, we make Started index 1 to prevent
// client seeing an uninitialized round with the Started stage
enum Stages {
Null,
Started,
GoalMet,
End
}
// @dev uninitialized zero value for ticket should have exists set to false
struct Ticket {
uint256 amount;
bool redeemed;
bool exists;
}
struct RoundData {
Stages stage;
uint256 goal;
uint256 totalShares;
uint256 totalDeposit;
}
event PurchaseTicket(address indexed from, uint256 amount);
event SellTicket(address indexed from, uint256 amount);
event RedeemTicket(address indexed from, uint256 amount);
// @dev roundID => wallet => ticket
mapping(uint256 => mapping(address => Ticket)) public userTicket;
mapping(uint256 => RoundData) public roundData;
uint256 public currentRoundId;
address public vault;
IERC20 public vaultToken;
IERC20 public denomAsset;
constructor(
address _issuanceManager,
uint256 _startGoal,
address _denomAsset,
address _vaultToken,
address _vault
) {
}
modifier onlyStage(Stages _stage, uint256 _roundId) {
require(_roundId <= currentRoundId, "issuance: round does not exist");
require(<FILL_ME>)
_;
}
modifier notStage(Stages _stage, uint256 _roundId) {
}
function initRound(uint256 _goal) private returns (RoundData memory) {
}
// @dev stage transition function
function _toNextRound() private {
}
// @dev set current round to stage
function _setCurrentRoundStage(Stages _stage) private {
}
/////////////////////////
// external functions
/////////////////////////
function pause() external onlyRole(ISSUANCE_MANAGER) {
}
function unpause() external onlyRole(ISSUANCE_MANAGER) {
}
// @notice sets current round goal amount
// @dev the current deposit must be less than or equal to goal
// @dev only issuance manager role can call this function
// @param _newGoal the new goal amount to set the current round to
function setCurrentRoundGoal(uint256 _newGoal)
external
nonReentrant
onlyRole(ISSUANCE_MANAGER)
onlyStage(Stages.Started, currentRoundId)
{
}
// @notice purchase a ticket of an amount in denominated asset into current round
// @dev user should only have one ticket per round
// @dev the contract must not be paused
// @dev only once round has started and goal has not been met
function purchaseTicket(uint256 _amount)
external
nonReentrant
whenNotPaused
onlyStage(Stages.Started, currentRoundId)
{
}
// @notice sell unredeemed ticket of the current round for denominated asset
// @param _amount amount of denominated asset to withdraw
// @dev can be called at any stage except after vault tokens have been issued
function sellTicket(uint256 _amount)
external
nonReentrant
notStage(Stages.End, currentRoundId)
{
}
// @notice use the round's deposited assets to issue new vault tokens
// @dev only callable from issuance manager
// @dev can only issue for current round and after the goal is met
function issue()
external
nonReentrant
onlyRole(ISSUANCE_MANAGER)
onlyStage(Stages.GoalMet, currentRoundId)
{
}
// @notice redeem the round ticket for vault tokens
// @param _roundId the identifier of the round
// @dev the round must have ended and vault tokens are issued
function redeemTicket(uint256 _roundId)
external
nonReentrant
onlyStage(Stages.End, _roundId)
{
}
}
| roundData[_roundId].stage==_stage,"issuance: incorrect stage" | 360,306 | roundData[_roundId].stage==_stage |
"issuance: incorrect stage" | // Copyright (C) 2021 Exponent
// This file is part of Exponent.
// Exponent is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Exponent is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Exponent. If not, see <http://www.gnu.org/licenses/>.
pragma solidity 0.8.0;
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "../interface/IXPN.sol";
// @title Simple round-based fund raising contract for Exponent Vault issuance
contract SimpleIssuance is ReentrancyGuard, AccessControl, Pausable {
using SafeERC20 for IERC20;
bytes32 public constant ISSUANCE_MANAGER = keccak256("ISSUANCE_MANAGER");
// @dev uninitialized value is always index 0, we make Started index 1 to prevent
// client seeing an uninitialized round with the Started stage
enum Stages {
Null,
Started,
GoalMet,
End
}
// @dev uninitialized zero value for ticket should have exists set to false
struct Ticket {
uint256 amount;
bool redeemed;
bool exists;
}
struct RoundData {
Stages stage;
uint256 goal;
uint256 totalShares;
uint256 totalDeposit;
}
event PurchaseTicket(address indexed from, uint256 amount);
event SellTicket(address indexed from, uint256 amount);
event RedeemTicket(address indexed from, uint256 amount);
// @dev roundID => wallet => ticket
mapping(uint256 => mapping(address => Ticket)) public userTicket;
mapping(uint256 => RoundData) public roundData;
uint256 public currentRoundId;
address public vault;
IERC20 public vaultToken;
IERC20 public denomAsset;
constructor(
address _issuanceManager,
uint256 _startGoal,
address _denomAsset,
address _vaultToken,
address _vault
) {
}
modifier onlyStage(Stages _stage, uint256 _roundId) {
}
modifier notStage(Stages _stage, uint256 _roundId) {
require(_roundId <= currentRoundId, "issuance: round does not exist");
require(<FILL_ME>)
_;
}
function initRound(uint256 _goal) private returns (RoundData memory) {
}
// @dev stage transition function
function _toNextRound() private {
}
// @dev set current round to stage
function _setCurrentRoundStage(Stages _stage) private {
}
/////////////////////////
// external functions
/////////////////////////
function pause() external onlyRole(ISSUANCE_MANAGER) {
}
function unpause() external onlyRole(ISSUANCE_MANAGER) {
}
// @notice sets current round goal amount
// @dev the current deposit must be less than or equal to goal
// @dev only issuance manager role can call this function
// @param _newGoal the new goal amount to set the current round to
function setCurrentRoundGoal(uint256 _newGoal)
external
nonReentrant
onlyRole(ISSUANCE_MANAGER)
onlyStage(Stages.Started, currentRoundId)
{
}
// @notice purchase a ticket of an amount in denominated asset into current round
// @dev user should only have one ticket per round
// @dev the contract must not be paused
// @dev only once round has started and goal has not been met
function purchaseTicket(uint256 _amount)
external
nonReentrant
whenNotPaused
onlyStage(Stages.Started, currentRoundId)
{
}
// @notice sell unredeemed ticket of the current round for denominated asset
// @param _amount amount of denominated asset to withdraw
// @dev can be called at any stage except after vault tokens have been issued
function sellTicket(uint256 _amount)
external
nonReentrant
notStage(Stages.End, currentRoundId)
{
}
// @notice use the round's deposited assets to issue new vault tokens
// @dev only callable from issuance manager
// @dev can only issue for current round and after the goal is met
function issue()
external
nonReentrant
onlyRole(ISSUANCE_MANAGER)
onlyStage(Stages.GoalMet, currentRoundId)
{
}
// @notice redeem the round ticket for vault tokens
// @param _roundId the identifier of the round
// @dev the round must have ended and vault tokens are issued
function redeemTicket(uint256 _roundId)
external
nonReentrant
onlyStage(Stages.End, _roundId)
{
}
}
| roundData[_roundId].stage!=_stage,"issuance: incorrect stage" | 360,306 | roundData[_roundId].stage!=_stage |
"issuance: ticket for user does not exist" | // Copyright (C) 2021 Exponent
// This file is part of Exponent.
// Exponent is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Exponent is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Exponent. If not, see <http://www.gnu.org/licenses/>.
pragma solidity 0.8.0;
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "../interface/IXPN.sol";
// @title Simple round-based fund raising contract for Exponent Vault issuance
contract SimpleIssuance is ReentrancyGuard, AccessControl, Pausable {
using SafeERC20 for IERC20;
bytes32 public constant ISSUANCE_MANAGER = keccak256("ISSUANCE_MANAGER");
// @dev uninitialized value is always index 0, we make Started index 1 to prevent
// client seeing an uninitialized round with the Started stage
enum Stages {
Null,
Started,
GoalMet,
End
}
// @dev uninitialized zero value for ticket should have exists set to false
struct Ticket {
uint256 amount;
bool redeemed;
bool exists;
}
struct RoundData {
Stages stage;
uint256 goal;
uint256 totalShares;
uint256 totalDeposit;
}
event PurchaseTicket(address indexed from, uint256 amount);
event SellTicket(address indexed from, uint256 amount);
event RedeemTicket(address indexed from, uint256 amount);
// @dev roundID => wallet => ticket
mapping(uint256 => mapping(address => Ticket)) public userTicket;
mapping(uint256 => RoundData) public roundData;
uint256 public currentRoundId;
address public vault;
IERC20 public vaultToken;
IERC20 public denomAsset;
constructor(
address _issuanceManager,
uint256 _startGoal,
address _denomAsset,
address _vaultToken,
address _vault
) {
}
modifier onlyStage(Stages _stage, uint256 _roundId) {
}
modifier notStage(Stages _stage, uint256 _roundId) {
}
function initRound(uint256 _goal) private returns (RoundData memory) {
}
// @dev stage transition function
function _toNextRound() private {
}
// @dev set current round to stage
function _setCurrentRoundStage(Stages _stage) private {
}
/////////////////////////
// external functions
/////////////////////////
function pause() external onlyRole(ISSUANCE_MANAGER) {
}
function unpause() external onlyRole(ISSUANCE_MANAGER) {
}
// @notice sets current round goal amount
// @dev the current deposit must be less than or equal to goal
// @dev only issuance manager role can call this function
// @param _newGoal the new goal amount to set the current round to
function setCurrentRoundGoal(uint256 _newGoal)
external
nonReentrant
onlyRole(ISSUANCE_MANAGER)
onlyStage(Stages.Started, currentRoundId)
{
}
// @notice purchase a ticket of an amount in denominated asset into current round
// @dev user should only have one ticket per round
// @dev the contract must not be paused
// @dev only once round has started and goal has not been met
function purchaseTicket(uint256 _amount)
external
nonReentrant
whenNotPaused
onlyStage(Stages.Started, currentRoundId)
{
}
// @notice sell unredeemed ticket of the current round for denominated asset
// @param _amount amount of denominated asset to withdraw
// @dev can be called at any stage except after vault tokens have been issued
function sellTicket(uint256 _amount)
external
nonReentrant
notStage(Stages.End, currentRoundId)
{
// does user have a ticket in the current round ID
Ticket memory ticket = userTicket[currentRoundId][msg.sender];
require(<FILL_ME>)
// we won't check if ticket has been redeemed, because the contract will transition
// into the next round hence current round ticket.redeemed will always be false
require(
_amount <= ticket.amount,
"issuance: can't sell more than current ticket amount"
);
// if the total amount is the total amount in the ticket, delete the ticket
if (_amount == ticket.amount) {
// decrement ticket amount from totalDeposit
roundData[currentRoundId].totalDeposit -= _amount;
// delete user ticket struct, save gas
delete userTicket[currentRoundId][msg.sender];
}
if (_amount < ticket.amount) {
// decrement ticket amount from totalDeposit
roundData[currentRoundId].totalDeposit -= _amount;
userTicket[currentRoundId][msg.sender].amount -= _amount;
}
// if the total deposits is now less than goal for current round, change stage back
uint256 totalDeposit = roundData[currentRoundId].totalDeposit;
uint256 goal = roundData[currentRoundId].goal;
if (totalDeposit < goal) {
_setCurrentRoundStage(Stages.Started);
}
// transfer ticket balance to user
denomAsset.safeTransfer(msg.sender, _amount);
emit SellTicket(msg.sender, _amount);
}
// @notice use the round's deposited assets to issue new vault tokens
// @dev only callable from issuance manager
// @dev can only issue for current round and after the goal is met
function issue()
external
nonReentrant
onlyRole(ISSUANCE_MANAGER)
onlyStage(Stages.GoalMet, currentRoundId)
{
}
// @notice redeem the round ticket for vault tokens
// @param _roundId the identifier of the round
// @dev the round must have ended and vault tokens are issued
function redeemTicket(uint256 _roundId)
external
nonReentrant
onlyStage(Stages.End, _roundId)
{
}
}
| ticket.exists,"issuance: ticket for user does not exist" | 360,306 | ticket.exists |
"issuance: user vault tokens have been redeemed" | // Copyright (C) 2021 Exponent
// This file is part of Exponent.
// Exponent is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Exponent is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Exponent. If not, see <http://www.gnu.org/licenses/>.
pragma solidity 0.8.0;
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "../interface/IXPN.sol";
// @title Simple round-based fund raising contract for Exponent Vault issuance
contract SimpleIssuance is ReentrancyGuard, AccessControl, Pausable {
using SafeERC20 for IERC20;
bytes32 public constant ISSUANCE_MANAGER = keccak256("ISSUANCE_MANAGER");
// @dev uninitialized value is always index 0, we make Started index 1 to prevent
// client seeing an uninitialized round with the Started stage
enum Stages {
Null,
Started,
GoalMet,
End
}
// @dev uninitialized zero value for ticket should have exists set to false
struct Ticket {
uint256 amount;
bool redeemed;
bool exists;
}
struct RoundData {
Stages stage;
uint256 goal;
uint256 totalShares;
uint256 totalDeposit;
}
event PurchaseTicket(address indexed from, uint256 amount);
event SellTicket(address indexed from, uint256 amount);
event RedeemTicket(address indexed from, uint256 amount);
// @dev roundID => wallet => ticket
mapping(uint256 => mapping(address => Ticket)) public userTicket;
mapping(uint256 => RoundData) public roundData;
uint256 public currentRoundId;
address public vault;
IERC20 public vaultToken;
IERC20 public denomAsset;
constructor(
address _issuanceManager,
uint256 _startGoal,
address _denomAsset,
address _vaultToken,
address _vault
) {
}
modifier onlyStage(Stages _stage, uint256 _roundId) {
}
modifier notStage(Stages _stage, uint256 _roundId) {
}
function initRound(uint256 _goal) private returns (RoundData memory) {
}
// @dev stage transition function
function _toNextRound() private {
}
// @dev set current round to stage
function _setCurrentRoundStage(Stages _stage) private {
}
/////////////////////////
// external functions
/////////////////////////
function pause() external onlyRole(ISSUANCE_MANAGER) {
}
function unpause() external onlyRole(ISSUANCE_MANAGER) {
}
// @notice sets current round goal amount
// @dev the current deposit must be less than or equal to goal
// @dev only issuance manager role can call this function
// @param _newGoal the new goal amount to set the current round to
function setCurrentRoundGoal(uint256 _newGoal)
external
nonReentrant
onlyRole(ISSUANCE_MANAGER)
onlyStage(Stages.Started, currentRoundId)
{
}
// @notice purchase a ticket of an amount in denominated asset into current round
// @dev user should only have one ticket per round
// @dev the contract must not be paused
// @dev only once round has started and goal has not been met
function purchaseTicket(uint256 _amount)
external
nonReentrant
whenNotPaused
onlyStage(Stages.Started, currentRoundId)
{
}
// @notice sell unredeemed ticket of the current round for denominated asset
// @param _amount amount of denominated asset to withdraw
// @dev can be called at any stage except after vault tokens have been issued
function sellTicket(uint256 _amount)
external
nonReentrant
notStage(Stages.End, currentRoundId)
{
}
// @notice use the round's deposited assets to issue new vault tokens
// @dev only callable from issuance manager
// @dev can only issue for current round and after the goal is met
function issue()
external
nonReentrant
onlyRole(ISSUANCE_MANAGER)
onlyStage(Stages.GoalMet, currentRoundId)
{
}
// @notice redeem the round ticket for vault tokens
// @param _roundId the identifier of the round
// @dev the round must have ended and vault tokens are issued
function redeemTicket(uint256 _roundId)
external
nonReentrant
onlyStage(Stages.End, _roundId)
{
// ensure the user ticket exists in the round specified
Ticket memory ticket = userTicket[_roundId][msg.sender];
RoundData memory round = roundData[_roundId];
require(ticket.exists, "issuance: user ticket does not exist");
require(<FILL_ME>)
// calculate the shares of user to the current round shares using the proportion of their deposit
uint256 claimable = ((round.totalShares * ticket.amount) /
round.totalDeposit);
// transfer the share of vault tokens to end user.
userTicket[_roundId][msg.sender].redeemed = true;
vaultToken.safeTransfer(msg.sender, claimable);
emit RedeemTicket(msg.sender, claimable);
}
}
| !ticket.redeemed,"issuance: user vault tokens have been redeemed" | 360,306 | !ticket.redeemed |
"Token with this ID already exists" | // contracts/HappyHipposNFTs.sol
pragma solidity ^0.8.0;
contract HappyHipposNFTs is ERC1155, Pausable, Ownable {
mapping(uint256=>bool) private tokenCheck;
constructor() ERC1155("https://infinity8.io/upload/hippos_metadata/{id}.json") {}
// Single Address - Multiple Tokens _mintBatch
function mintSingleToMultipleBatch(address to, uint256[] memory ids, bytes memory data) public onlyOwner {
uint256 _length= ids.length;
uint256[] memory amounts = new uint256[](_length);
for (uint256 i = 0; i < ids.length; i++) {
require(<FILL_ME>)
}
for (uint256 i = 0; i < ids.length; i++) {
tokenCheck[ids[i]] = true;
amounts[i]= 1;
}
_mintBatch(to, ids, amounts, data);
}
// Single Address - Multiple Tokens
function mintSingleToMultiple(address account, uint256[] memory ids) public onlyOwner {
}
// One by One
function tokenMint(address account,uint256 newItemId, uint256 amount)
public onlyOwner
{
}
function tokenBurn(address account,uint256 id, uint256 amount) public onlyOwner returns (bool){
}
function setURI(string memory newuri) public onlyOwner {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function _beforeTokenTransfer(address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data)
internal
whenNotPaused
override
{
}
}
| !tokenCheck[ids[i]],"Token with this ID already exists" | 360,358 | !tokenCheck[ids[i]] |
"TokenID already exists" | // contracts/HappyHipposNFTs.sol
pragma solidity ^0.8.0;
contract HappyHipposNFTs is ERC1155, Pausable, Ownable {
mapping(uint256=>bool) private tokenCheck;
constructor() ERC1155("https://infinity8.io/upload/hippos_metadata/{id}.json") {}
// Single Address - Multiple Tokens _mintBatch
function mintSingleToMultipleBatch(address to, uint256[] memory ids, bytes memory data) public onlyOwner {
}
// Single Address - Multiple Tokens
function mintSingleToMultiple(address account, uint256[] memory ids) public onlyOwner {
}
// One by One
function tokenMint(address account,uint256 newItemId, uint256 amount)
public onlyOwner
{
require(<FILL_ME>)
_mint(account,newItemId,amount,'');
tokenCheck[newItemId] = true;
}
function tokenBurn(address account,uint256 id, uint256 amount) public onlyOwner returns (bool){
}
function setURI(string memory newuri) public onlyOwner {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function _beforeTokenTransfer(address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data)
internal
whenNotPaused
override
{
}
}
| !tokenCheck[newItemId],"TokenID already exists" | 360,358 | !tokenCheck[newItemId] |
"InuGami: Send at least 0.1 ETH" | /*
_____ _ _ _
/ ____| | | | | | |
| | ___ _ __ | |__ __ _| | ___ _ __ ___ __| |
| | / _ \ '_ \| '_ \ / _` | |/ _ \| '_ \ / _ \ / _` |
| |___| __/ |_) | | | | (_| | | (_) | |_) | (_) | (_| |
\_____\___| .__/|_| |_|\__,_|_|\___/| .__/ \___/ \__,_|
| | | |
|_| |_|
*/
// SPDX-License-Identifier: MIT
pragma solidity 0.8.6;
import "./WithdrawExtension.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
/**
* @title The main project contract.
*/
contract Cephalopod is ERC20, WithdrawExtension {
using SafeMath for uint256;
uint256 public total;
uint256 public priceInWei;
bool public presaleActive;
/**
* @dev Constructor that gives msg.sender all of existing tokens.
*/
event BuyTokens(address _buyer, uint256 _amount, uint256 _cost);
constructor(
string memory _name,
string memory _symbol,
uint256 _initialSupply,
uint256 _priceInWei
) ERC20(_name, _symbol) {
}
function decimals() public view virtual override returns (uint8) {
}
function setPrice(uint256 _priceInWei) public onlyOwner {
}
function stopPresale() public onlyOwner {
}
function startPresale() public onlyOwner {
}
function calculateAffordableTokens(uint256 _amount)
public
view
returns (uint256)
{
}
fallback() external payable {
require(presaleActive, "InuGami: Presale is not active");
uint256 _msgValue = msg.value;
address _msgSender = msg.sender;
uint256 _tokensToBuy = _msgValue.mul(10**decimals()).div(priceInWei);
require(
_tokensToBuy <= balanceOf(address(this)),
"InuGami: Looks like you are trying to buy too many tokens"
);
require(<FILL_ME>)
require(_msgValue <= (1 * 10**18), "InuGami: Send max 1 ETH");
_transfer(address(this), _msgSender, _tokensToBuy);
emit BuyTokens(_msgSender, _tokensToBuy, _msgValue);
}
}
| _msgValue>=(1*10**18)/10,"InuGami: Send at least 0.1 ETH" | 360,701 | _msgValue>=(1*10**18)/10 |
"InuGami: Send max 1 ETH" | /*
_____ _ _ _
/ ____| | | | | | |
| | ___ _ __ | |__ __ _| | ___ _ __ ___ __| |
| | / _ \ '_ \| '_ \ / _` | |/ _ \| '_ \ / _ \ / _` |
| |___| __/ |_) | | | | (_| | | (_) | |_) | (_) | (_| |
\_____\___| .__/|_| |_|\__,_|_|\___/| .__/ \___/ \__,_|
| | | |
|_| |_|
*/
// SPDX-License-Identifier: MIT
pragma solidity 0.8.6;
import "./WithdrawExtension.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
/**
* @title The main project contract.
*/
contract Cephalopod is ERC20, WithdrawExtension {
using SafeMath for uint256;
uint256 public total;
uint256 public priceInWei;
bool public presaleActive;
/**
* @dev Constructor that gives msg.sender all of existing tokens.
*/
event BuyTokens(address _buyer, uint256 _amount, uint256 _cost);
constructor(
string memory _name,
string memory _symbol,
uint256 _initialSupply,
uint256 _priceInWei
) ERC20(_name, _symbol) {
}
function decimals() public view virtual override returns (uint8) {
}
function setPrice(uint256 _priceInWei) public onlyOwner {
}
function stopPresale() public onlyOwner {
}
function startPresale() public onlyOwner {
}
function calculateAffordableTokens(uint256 _amount)
public
view
returns (uint256)
{
}
fallback() external payable {
require(presaleActive, "InuGami: Presale is not active");
uint256 _msgValue = msg.value;
address _msgSender = msg.sender;
uint256 _tokensToBuy = _msgValue.mul(10**decimals()).div(priceInWei);
require(
_tokensToBuy <= balanceOf(address(this)),
"InuGami: Looks like you are trying to buy too many tokens"
);
require(
_msgValue >= (1 * 10**18) / 10,
"InuGami: Send at least 0.1 ETH"
);
require(<FILL_ME>)
_transfer(address(this), _msgSender, _tokensToBuy);
emit BuyTokens(_msgSender, _tokensToBuy, _msgValue);
}
}
| _msgValue<=(1*10**18),"InuGami: Send max 1 ETH" | 360,701 | _msgValue<=(1*10**18) |
"too many already minted before dev mint" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "../contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "../contracts/LunchMoneyDistributor.sol";
contract BitBullies is ERC721A, Ownable, ReentrancyGuard {
using ECDSA for bytes32;
string private prefix = "\x19Ethereum Signed Message:\n20";
bool public isWhitelistSaleActive;
bool public isSaleActive;
address public whiteListVerification;
uint256 public immutable price;
uint256 public immutable maxAmount;
uint256 public immutable maxWhitelistQty;
uint256 public immutable devMintQty;
uint256 private immutable maxBatchSize;
string private baseURI;
mapping(address => uint256) public bulliesBalance;
mapping(address => uint256) public whitelistClaimed;
LunchMoneyDistributor public tokenDistributor;
constructor(
uint256 price_,
uint256 maxAmount_,
uint256 devMintQty_,
uint256 maxBatchSize_
)
ERC721A("BitBullies", "BITBULLIES")
{
}
function setLunchMoneyDistributor(address _distributor) external onlyOwner {
}
function _hash(address _address) internal view returns (bytes32) {
}
function _verify(bytes32 hash, bytes memory signature) internal view returns (bool) {
}
function _recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
}
// For marketing etc.
function devMint(uint256 quantity) external onlyOwner {
require(<FILL_ME>)
require(quantity % maxBatchSize == 0, "can only mint a multiple of the maxBatchSize");
uint256 numChunks = quantity / maxBatchSize;
for (uint256 i = 0; i < numChunks; i++) {
_safeMint(msg.sender, maxBatchSize);
}
tokenDistributor.updateRewardOnMint(msg.sender);
bulliesBalance[msg.sender] += quantity;
}
function mintWhitelist(bytes calldata signature, uint256 quantity) external payable {
}
function mintPublic(uint256 quantity) external payable {
}
function _mintToken(address to, uint256 quantity) internal {
}
function transferFrom(address from, address to, uint256 tokenId) public override {
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public override {
}
function _baseURI() internal view override returns (string memory) {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function setWhitelistSaleActive(bool active_) external onlyOwner {
}
function setSaleActive(bool active_) external onlyOwner {
}
function mintTokens(address to, uint256 quantity) external onlyOwner {
}
function setWhitelistVerification(address verificationAddress) external onlyOwner {
}
function withdrawMoney() external onlyOwner nonReentrant {
}
}
| totalSupply()+quantity<=devMintQty,"too many already minted before dev mint" | 360,727 | totalSupply()+quantity<=devMintQty |
'You cannot mint this many.' | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "../contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "../contracts/LunchMoneyDistributor.sol";
contract BitBullies is ERC721A, Ownable, ReentrancyGuard {
using ECDSA for bytes32;
string private prefix = "\x19Ethereum Signed Message:\n20";
bool public isWhitelistSaleActive;
bool public isSaleActive;
address public whiteListVerification;
uint256 public immutable price;
uint256 public immutable maxAmount;
uint256 public immutable maxWhitelistQty;
uint256 public immutable devMintQty;
uint256 private immutable maxBatchSize;
string private baseURI;
mapping(address => uint256) public bulliesBalance;
mapping(address => uint256) public whitelistClaimed;
LunchMoneyDistributor public tokenDistributor;
constructor(
uint256 price_,
uint256 maxAmount_,
uint256 devMintQty_,
uint256 maxBatchSize_
)
ERC721A("BitBullies", "BITBULLIES")
{
}
function setLunchMoneyDistributor(address _distributor) external onlyOwner {
}
function _hash(address _address) internal view returns (bytes32) {
}
function _verify(bytes32 hash, bytes memory signature) internal view returns (bool) {
}
function _recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
}
// For marketing etc.
function devMint(uint256 quantity) external onlyOwner {
}
function mintWhitelist(bytes calldata signature, uint256 quantity) external payable {
bytes32 hash = _hash(msg.sender);
require(isWhitelistSaleActive, "Whitelist Sale is Not Active");
require(_verify(hash, signature), "This Hash's signature is invalid");
require(msg.value == price * quantity, "Incorrect Value");
require(<FILL_ME>)
tokenDistributor.updateRewardOnMint(msg.sender);
whitelistClaimed[msg.sender] += quantity;
_mintToken(msg.sender, quantity);
}
function mintPublic(uint256 quantity) external payable {
}
function _mintToken(address to, uint256 quantity) internal {
}
function transferFrom(address from, address to, uint256 tokenId) public override {
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public override {
}
function _baseURI() internal view override returns (string memory) {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function setWhitelistSaleActive(bool active_) external onlyOwner {
}
function setSaleActive(bool active_) external onlyOwner {
}
function mintTokens(address to, uint256 quantity) external onlyOwner {
}
function setWhitelistVerification(address verificationAddress) external onlyOwner {
}
function withdrawMoney() external onlyOwner nonReentrant {
}
}
| whitelistClaimed[msg.sender]+quantity<=maxWhitelistQty,'You cannot mint this many.' | 360,727 | whitelistClaimed[msg.sender]+quantity<=maxWhitelistQty |
"Invalid amount." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "../contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "../contracts/LunchMoneyDistributor.sol";
contract BitBullies is ERC721A, Ownable, ReentrancyGuard {
using ECDSA for bytes32;
string private prefix = "\x19Ethereum Signed Message:\n20";
bool public isWhitelistSaleActive;
bool public isSaleActive;
address public whiteListVerification;
uint256 public immutable price;
uint256 public immutable maxAmount;
uint256 public immutable maxWhitelistQty;
uint256 public immutable devMintQty;
uint256 private immutable maxBatchSize;
string private baseURI;
mapping(address => uint256) public bulliesBalance;
mapping(address => uint256) public whitelistClaimed;
LunchMoneyDistributor public tokenDistributor;
constructor(
uint256 price_,
uint256 maxAmount_,
uint256 devMintQty_,
uint256 maxBatchSize_
)
ERC721A("BitBullies", "BITBULLIES")
{
}
function setLunchMoneyDistributor(address _distributor) external onlyOwner {
}
function _hash(address _address) internal view returns (bytes32) {
}
function _verify(bytes32 hash, bytes memory signature) internal view returns (bool) {
}
function _recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
}
// For marketing etc.
function devMint(uint256 quantity) external onlyOwner {
}
function mintWhitelist(bytes calldata signature, uint256 quantity) external payable {
}
function mintPublic(uint256 quantity) external payable {
require(isSaleActive, "Public Sale is Not Active");
require(<FILL_ME>)
tokenDistributor.updateRewardOnMint(msg.sender);
_mintToken(msg.sender, quantity);
}
function _mintToken(address to, uint256 quantity) internal {
}
function transferFrom(address from, address to, uint256 tokenId) public override {
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public override {
}
function _baseURI() internal view override returns (string memory) {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function setWhitelistSaleActive(bool active_) external onlyOwner {
}
function setSaleActive(bool active_) external onlyOwner {
}
function mintTokens(address to, uint256 quantity) external onlyOwner {
}
function setWhitelistVerification(address verificationAddress) external onlyOwner {
}
function withdrawMoney() external onlyOwner nonReentrant {
}
}
| quantity*price==msg.value,"Invalid amount." | 360,727 | quantity*price==msg.value |
"Too much ETH" | // SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "./interfaces/IETHPlatform.sol";
import "./PlatformV2.sol";
//TOOD: Have a transfer function overridden!
contract ETHPlatform is PlatformV2, IETHPlatform {
constructor(string memory _lpTokenName, string memory _lpTokenSymbolName, uint256 _initialTokenToLPTokenRate,
IFeesCalculatorV3 _feesCalculator,
ICVIOracleV3 _cviOracle,
ILiquidation _liquidation) public PlatformV2(IERC20(address(0)), _lpTokenName, _lpTokenSymbolName, _initialTokenToLPTokenRate, _feesCalculator, _cviOracle, _liquidation) {
}
function depositETH(uint256 _minLPTokenAmount) external override payable returns (uint256 lpTokenAmount) {
}
function openPositionETH(uint16 _maxCVI, uint168 _maxBuyingPremiumFeePercentage, uint8 _leverage) external override payable returns (uint256 positionUnitsAmount) {
require(<FILL_ME>)
positionUnitsAmount = openPosition(uint168(msg.value), _maxCVI, _maxBuyingPremiumFeePercentage, _leverage);
}
function transferTokens(uint256 _tokenAmount) internal override {
}
// ETH is passed automatically, nothing to do
function collectTokens(uint256 _tokenAmount) internal override {
}
// ETH has already passed, so subtract amount to get balance before run
function getTokenBalance(uint256 _tokenAmount) internal view override returns (uint256) {
}
function sendProfit(uint256 _amount, IERC20 _token) internal override {
}
}
| uint168(msg.value)==msg.value,"Too much ETH" | 360,776 | uint168(msg.value)==msg.value |
"Subscription exists" | /*
Subscrypto
Copyright (C) 2019 Subscrypto Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
pragma solidity 0.5.2;
/**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error
*/
library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two unsigned integers, reverts on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract Medianizer {
function read() public view returns (bytes32);
}
contract Weth {
mapping(address => mapping(address => uint)) public allowance;
mapping(address => uint) public balanceOf;
function transferFrom(address src, address dst, uint wad) public returns (bool);
}
/// @author The Subscrypto Team
/// @title Subscrypto recurring payments
contract Subscrypto {
using SafeMath for uint;
Medianizer public daiPriceContract;
Weth public wethContract;
/**
* Constructor
* @param daiMedianizerContract address
* @param wethContractAddress address
*/
constructor(address daiMedianizerContract, address wethContractAddress) public {
}
event NewSubscription(
address indexed subscriber,
address indexed receiver,
uint daiCents,
uint32 interval
);
event Unsubscribe(
address indexed subscriber,
address indexed receiver
);
event ReceiverPaymentsCollected(
address indexed receiver,
uint weiAmount,
uint startIndex,
uint endIndex
);
event SubscriptionPaid(
address indexed subscriber,
address indexed receiver,
uint weiAmount,
uint daiCents,
uint48 effectiveTimestamp
);
event UnfundedPayment(
address indexed subscriber,
address indexed receiver,
uint weiAmount,
uint daiCents
);
event StaleSubscription(
address indexed subscriber,
address indexed receiver
);
event SubscriptionDeactivated(
address indexed subscriber,
address indexed receiver
);
event SubscriptionReactivated(
address indexed subscriber,
address indexed receiver
);
// Conservative amount of gas used per loop in executeDebits()
uint constant MIN_GAS_PER_EXECUTE_DEBIT = 45000;
// Force subscribers to use multiple accounts when this limit is reached.
uint constant MAX_SUBSCRIPTION_PER_SUBSCRIBER = 10000;
// Minimum payment of 1 DAI
uint constant MIN_SUBSCRIPTION_DAI_CENTS = 100;
struct Subscription {
bool isActive; // 1 byte
uint48 nextPaymentTime; // 6 bytes
uint32 interval; // 4 bytes
address subscriber; // 20 bytes
address receiver; // 20 bytes
uint daiCents; // 32 bytes
}
// global counter for suscriptions
uint64 nextIndex = 1;
// source of truth for subscriptions
mapping(uint64 => Subscription) public subscriptions;
// subscriber => receiver => subsciptionIndex
mapping(address => mapping(address => uint64)) public subscriberReceiver;
// receiver => subs array
mapping(address => uint64[]) public receiverSubs;
// subscriber => subs array
mapping(address => uint64[]) public subscriberSubs;
/**
* Create a new subscription. Must be called by the subscriber's account.
* First payment of `daiCents` is paid on creation.
* Actual payment is made in Wrapped Ether (wETH) using currenct DAI-ETH conversion rate.
* @param receiver address
* @param daiCents subscription amount in hundredths of DAI
* @param interval seconds between payments
*/
function subscribe(address receiver, uint daiCents, uint32 interval) external {
uint weiAmount = daiCentsToEthWei(daiCents, ethPriceInDaiWad());
uint64 existingIndex = subscriberReceiver[msg.sender][receiver];
require(<FILL_ME>)
require(daiCents >= MIN_SUBSCRIPTION_DAI_CENTS, "Subsciption amount too low");
require(interval >= 86400, "Interval must be at least 1 day");
require(interval <= 31557600, "Interval must be at most 1 year");
require(subscriberSubs[msg.sender].length < MAX_SUBSCRIPTION_PER_SUBSCRIBER,"Subscription count limit reached");
// first payment
require(wethContract.transferFrom(msg.sender, receiver, weiAmount), "wETH transferFrom() failed");
// add to subscription mappings
subscriptions[nextIndex] = Subscription(
true,
uint48(now.add(interval)),
interval,
msg.sender,
receiver,
daiCents
);
subscriberReceiver[msg.sender][receiver] = nextIndex;
receiverSubs[receiver].push(nextIndex);
subscriberSubs[msg.sender].push(nextIndex);
emit NewSubscription(msg.sender, receiver, daiCents, interval);
emit SubscriptionPaid(msg.sender, receiver, weiAmount, daiCents, uint48(now));
nextIndex++;
}
/**
* Deactivate a subscription. Must be called by the subscriber's account.
* Payments cannot be collected from deactivated subscriptons.
* @param receiver address used to identify the unique subscriber-receiver pair.
* @return success
*/
function deactivateSubscription(address receiver) external returns (bool) {
}
/**
* Reactivate a subscription. Must be called by the subscriber's account.
* If less than one interval has passed since the last payment, no payment is collected now.
* Otherwise it is treated as a new subscription starting now, and the first payment is collected.
* No back-payments are collected.
* @param receiver addres used to identify the unique subscriber-receiver pair.
* @return success
*/
function reactivateSubscription(address receiver) external returns (bool) {
}
/**
* Delete a subscription. Must be called by the subscriber's account.
* @param receiver address used to identify the unique subscriber-receiver pair.
*/
function unsubscribe(address receiver) external {
}
/**
* Delete a subscription. Must be called by the receiver's account.
* @param subscriber address used to identify the unique subscriber-receiver pair.
*/
function unsubscribeByReceiver(address subscriber) external {
}
/**
* Collect all available *funded* payments for a receiver's account.
* Helper function that calls executeDebitsRange() with the full range.
* Will process as many payments as possible with the gas provided and exit gracefully.
*
* @param receiver address
*/
function executeDebits(address receiver) external {
}
/**
* A read-only version of executeDebits()
* Calculates uncollected *funded* payments for a receiver.
* @param receiver address
* @return total unclaimed value in wei
*/
function getTotalUnclaimedPayments(address receiver) external view returns (uint) {
}
/**
* Calculates a subscriber's total outstanding payments in daiCents
* @param subscriber address
* @param time in seconds. If `time` < `now`, then we simply use `now`
* @return total amount owed at `time` in daiCents
*/
function outstandingBalanceUntil(address subscriber, uint time) external view returns (uint) {
}
/**
* Collect available *funded* payments for a receiver's account within a certain range of receiverSubs[receiver].
* Will process as many payments as possible with the gas provided and exit gracefully.
*
* @param receiver address
* @param start starting index of receiverSubs[receiver]
* @param end ending index of receiverSubs[receiver]
* @return last processed index
*/
function executeDebitsRange(address receiver, uint start, uint end) public returns (uint) {
}
/**
* Calculates how much wETH balance Subscrypto is authorized to use on bealf of `payer`.
* Returns the minimum(payer's wETH balance, amount authorized to Subscrypto).
* @param payer address
* @return wad amount of wETH available for Subscrypto payments
*/
function allowedBalance(address payer) public view returns (uint) {
}
/**
* Calls the DAI medianizer contract to get the current exchange rate for ETH-DAI
* @return current ETH price in DAI (wad format)
*/
function ethPriceInDaiWad() public view returns (uint) {
}
/**
* Helper function to search for and delete an array element without leaving a gap.
* Array size is also decremented.
* DO NOT USE if ordering is important.
* @param array array to be modified
* @param element value to be removed
*/
function deleteElement(uint64[] storage array, uint64 element) internal {
}
/**
* Calculates how many whole unpaid intervals (will) have elapsed since the last payment at a specific `time`.
* DOES NOT check if subscriber account is funded.
* @param sub Subscription object
* @param time timestamp in seconds
* @return number of unpaid intervals
*/
function calculateUnpaidIntervalsUntil(Subscription memory sub, uint time) internal view returns (uint) {
}
/**
* Safely calculate the next payment timestamp for a Subscription
* @param sub Subscription object
* @return uint48 timestamp in seconds of the next payment
*/
function calculateNextPaymentTime(Subscription memory sub) internal pure returns (uint48) {
}
/**
* Converts DAI (cents) to ETH (wei) without losing precision
* @param daiCents one hundreth of a DAI
* @param ethPriceWad price from calling ethPriceInDaiWad()
* @return ETH value denominated in wei
*/
function daiCentsToEthWei(uint daiCents, uint ethPriceWad) internal pure returns (uint) {
}
/**
* Converts amount in cents (hundredths of DAI) to amount in wad
* @param cents daiCents (hundredths of DAI)
* @return amount of dai in wad
*/
function centsToWad(uint cents) internal pure returns (uint) {
}
}
| subscriptions[existingIndex].daiCents==0,"Subscription exists" | 360,782 | subscriptions[existingIndex].daiCents==0 |
"Subscription count limit reached" | /*
Subscrypto
Copyright (C) 2019 Subscrypto Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
pragma solidity 0.5.2;
/**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error
*/
library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two unsigned integers, reverts on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract Medianizer {
function read() public view returns (bytes32);
}
contract Weth {
mapping(address => mapping(address => uint)) public allowance;
mapping(address => uint) public balanceOf;
function transferFrom(address src, address dst, uint wad) public returns (bool);
}
/// @author The Subscrypto Team
/// @title Subscrypto recurring payments
contract Subscrypto {
using SafeMath for uint;
Medianizer public daiPriceContract;
Weth public wethContract;
/**
* Constructor
* @param daiMedianizerContract address
* @param wethContractAddress address
*/
constructor(address daiMedianizerContract, address wethContractAddress) public {
}
event NewSubscription(
address indexed subscriber,
address indexed receiver,
uint daiCents,
uint32 interval
);
event Unsubscribe(
address indexed subscriber,
address indexed receiver
);
event ReceiverPaymentsCollected(
address indexed receiver,
uint weiAmount,
uint startIndex,
uint endIndex
);
event SubscriptionPaid(
address indexed subscriber,
address indexed receiver,
uint weiAmount,
uint daiCents,
uint48 effectiveTimestamp
);
event UnfundedPayment(
address indexed subscriber,
address indexed receiver,
uint weiAmount,
uint daiCents
);
event StaleSubscription(
address indexed subscriber,
address indexed receiver
);
event SubscriptionDeactivated(
address indexed subscriber,
address indexed receiver
);
event SubscriptionReactivated(
address indexed subscriber,
address indexed receiver
);
// Conservative amount of gas used per loop in executeDebits()
uint constant MIN_GAS_PER_EXECUTE_DEBIT = 45000;
// Force subscribers to use multiple accounts when this limit is reached.
uint constant MAX_SUBSCRIPTION_PER_SUBSCRIBER = 10000;
// Minimum payment of 1 DAI
uint constant MIN_SUBSCRIPTION_DAI_CENTS = 100;
struct Subscription {
bool isActive; // 1 byte
uint48 nextPaymentTime; // 6 bytes
uint32 interval; // 4 bytes
address subscriber; // 20 bytes
address receiver; // 20 bytes
uint daiCents; // 32 bytes
}
// global counter for suscriptions
uint64 nextIndex = 1;
// source of truth for subscriptions
mapping(uint64 => Subscription) public subscriptions;
// subscriber => receiver => subsciptionIndex
mapping(address => mapping(address => uint64)) public subscriberReceiver;
// receiver => subs array
mapping(address => uint64[]) public receiverSubs;
// subscriber => subs array
mapping(address => uint64[]) public subscriberSubs;
/**
* Create a new subscription. Must be called by the subscriber's account.
* First payment of `daiCents` is paid on creation.
* Actual payment is made in Wrapped Ether (wETH) using currenct DAI-ETH conversion rate.
* @param receiver address
* @param daiCents subscription amount in hundredths of DAI
* @param interval seconds between payments
*/
function subscribe(address receiver, uint daiCents, uint32 interval) external {
uint weiAmount = daiCentsToEthWei(daiCents, ethPriceInDaiWad());
uint64 existingIndex = subscriberReceiver[msg.sender][receiver];
require(subscriptions[existingIndex].daiCents == 0, "Subscription exists");
require(daiCents >= MIN_SUBSCRIPTION_DAI_CENTS, "Subsciption amount too low");
require(interval >= 86400, "Interval must be at least 1 day");
require(interval <= 31557600, "Interval must be at most 1 year");
require(<FILL_ME>)
// first payment
require(wethContract.transferFrom(msg.sender, receiver, weiAmount), "wETH transferFrom() failed");
// add to subscription mappings
subscriptions[nextIndex] = Subscription(
true,
uint48(now.add(interval)),
interval,
msg.sender,
receiver,
daiCents
);
subscriberReceiver[msg.sender][receiver] = nextIndex;
receiverSubs[receiver].push(nextIndex);
subscriberSubs[msg.sender].push(nextIndex);
emit NewSubscription(msg.sender, receiver, daiCents, interval);
emit SubscriptionPaid(msg.sender, receiver, weiAmount, daiCents, uint48(now));
nextIndex++;
}
/**
* Deactivate a subscription. Must be called by the subscriber's account.
* Payments cannot be collected from deactivated subscriptons.
* @param receiver address used to identify the unique subscriber-receiver pair.
* @return success
*/
function deactivateSubscription(address receiver) external returns (bool) {
}
/**
* Reactivate a subscription. Must be called by the subscriber's account.
* If less than one interval has passed since the last payment, no payment is collected now.
* Otherwise it is treated as a new subscription starting now, and the first payment is collected.
* No back-payments are collected.
* @param receiver addres used to identify the unique subscriber-receiver pair.
* @return success
*/
function reactivateSubscription(address receiver) external returns (bool) {
}
/**
* Delete a subscription. Must be called by the subscriber's account.
* @param receiver address used to identify the unique subscriber-receiver pair.
*/
function unsubscribe(address receiver) external {
}
/**
* Delete a subscription. Must be called by the receiver's account.
* @param subscriber address used to identify the unique subscriber-receiver pair.
*/
function unsubscribeByReceiver(address subscriber) external {
}
/**
* Collect all available *funded* payments for a receiver's account.
* Helper function that calls executeDebitsRange() with the full range.
* Will process as many payments as possible with the gas provided and exit gracefully.
*
* @param receiver address
*/
function executeDebits(address receiver) external {
}
/**
* A read-only version of executeDebits()
* Calculates uncollected *funded* payments for a receiver.
* @param receiver address
* @return total unclaimed value in wei
*/
function getTotalUnclaimedPayments(address receiver) external view returns (uint) {
}
/**
* Calculates a subscriber's total outstanding payments in daiCents
* @param subscriber address
* @param time in seconds. If `time` < `now`, then we simply use `now`
* @return total amount owed at `time` in daiCents
*/
function outstandingBalanceUntil(address subscriber, uint time) external view returns (uint) {
}
/**
* Collect available *funded* payments for a receiver's account within a certain range of receiverSubs[receiver].
* Will process as many payments as possible with the gas provided and exit gracefully.
*
* @param receiver address
* @param start starting index of receiverSubs[receiver]
* @param end ending index of receiverSubs[receiver]
* @return last processed index
*/
function executeDebitsRange(address receiver, uint start, uint end) public returns (uint) {
}
/**
* Calculates how much wETH balance Subscrypto is authorized to use on bealf of `payer`.
* Returns the minimum(payer's wETH balance, amount authorized to Subscrypto).
* @param payer address
* @return wad amount of wETH available for Subscrypto payments
*/
function allowedBalance(address payer) public view returns (uint) {
}
/**
* Calls the DAI medianizer contract to get the current exchange rate for ETH-DAI
* @return current ETH price in DAI (wad format)
*/
function ethPriceInDaiWad() public view returns (uint) {
}
/**
* Helper function to search for and delete an array element without leaving a gap.
* Array size is also decremented.
* DO NOT USE if ordering is important.
* @param array array to be modified
* @param element value to be removed
*/
function deleteElement(uint64[] storage array, uint64 element) internal {
}
/**
* Calculates how many whole unpaid intervals (will) have elapsed since the last payment at a specific `time`.
* DOES NOT check if subscriber account is funded.
* @param sub Subscription object
* @param time timestamp in seconds
* @return number of unpaid intervals
*/
function calculateUnpaidIntervalsUntil(Subscription memory sub, uint time) internal view returns (uint) {
}
/**
* Safely calculate the next payment timestamp for a Subscription
* @param sub Subscription object
* @return uint48 timestamp in seconds of the next payment
*/
function calculateNextPaymentTime(Subscription memory sub) internal pure returns (uint48) {
}
/**
* Converts DAI (cents) to ETH (wei) without losing precision
* @param daiCents one hundreth of a DAI
* @param ethPriceWad price from calling ethPriceInDaiWad()
* @return ETH value denominated in wei
*/
function daiCentsToEthWei(uint daiCents, uint ethPriceWad) internal pure returns (uint) {
}
/**
* Converts amount in cents (hundredths of DAI) to amount in wad
* @param cents daiCents (hundredths of DAI)
* @return amount of dai in wad
*/
function centsToWad(uint cents) internal pure returns (uint) {
}
}
| subscriberSubs[msg.sender].length<MAX_SUBSCRIPTION_PER_SUBSCRIBER,"Subscription count limit reached" | 360,782 | subscriberSubs[msg.sender].length<MAX_SUBSCRIPTION_PER_SUBSCRIBER |
"wETH transferFrom() failed" | /*
Subscrypto
Copyright (C) 2019 Subscrypto Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
pragma solidity 0.5.2;
/**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error
*/
library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two unsigned integers, reverts on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract Medianizer {
function read() public view returns (bytes32);
}
contract Weth {
mapping(address => mapping(address => uint)) public allowance;
mapping(address => uint) public balanceOf;
function transferFrom(address src, address dst, uint wad) public returns (bool);
}
/// @author The Subscrypto Team
/// @title Subscrypto recurring payments
contract Subscrypto {
using SafeMath for uint;
Medianizer public daiPriceContract;
Weth public wethContract;
/**
* Constructor
* @param daiMedianizerContract address
* @param wethContractAddress address
*/
constructor(address daiMedianizerContract, address wethContractAddress) public {
}
event NewSubscription(
address indexed subscriber,
address indexed receiver,
uint daiCents,
uint32 interval
);
event Unsubscribe(
address indexed subscriber,
address indexed receiver
);
event ReceiverPaymentsCollected(
address indexed receiver,
uint weiAmount,
uint startIndex,
uint endIndex
);
event SubscriptionPaid(
address indexed subscriber,
address indexed receiver,
uint weiAmount,
uint daiCents,
uint48 effectiveTimestamp
);
event UnfundedPayment(
address indexed subscriber,
address indexed receiver,
uint weiAmount,
uint daiCents
);
event StaleSubscription(
address indexed subscriber,
address indexed receiver
);
event SubscriptionDeactivated(
address indexed subscriber,
address indexed receiver
);
event SubscriptionReactivated(
address indexed subscriber,
address indexed receiver
);
// Conservative amount of gas used per loop in executeDebits()
uint constant MIN_GAS_PER_EXECUTE_DEBIT = 45000;
// Force subscribers to use multiple accounts when this limit is reached.
uint constant MAX_SUBSCRIPTION_PER_SUBSCRIBER = 10000;
// Minimum payment of 1 DAI
uint constant MIN_SUBSCRIPTION_DAI_CENTS = 100;
struct Subscription {
bool isActive; // 1 byte
uint48 nextPaymentTime; // 6 bytes
uint32 interval; // 4 bytes
address subscriber; // 20 bytes
address receiver; // 20 bytes
uint daiCents; // 32 bytes
}
// global counter for suscriptions
uint64 nextIndex = 1;
// source of truth for subscriptions
mapping(uint64 => Subscription) public subscriptions;
// subscriber => receiver => subsciptionIndex
mapping(address => mapping(address => uint64)) public subscriberReceiver;
// receiver => subs array
mapping(address => uint64[]) public receiverSubs;
// subscriber => subs array
mapping(address => uint64[]) public subscriberSubs;
/**
* Create a new subscription. Must be called by the subscriber's account.
* First payment of `daiCents` is paid on creation.
* Actual payment is made in Wrapped Ether (wETH) using currenct DAI-ETH conversion rate.
* @param receiver address
* @param daiCents subscription amount in hundredths of DAI
* @param interval seconds between payments
*/
function subscribe(address receiver, uint daiCents, uint32 interval) external {
uint weiAmount = daiCentsToEthWei(daiCents, ethPriceInDaiWad());
uint64 existingIndex = subscriberReceiver[msg.sender][receiver];
require(subscriptions[existingIndex].daiCents == 0, "Subscription exists");
require(daiCents >= MIN_SUBSCRIPTION_DAI_CENTS, "Subsciption amount too low");
require(interval >= 86400, "Interval must be at least 1 day");
require(interval <= 31557600, "Interval must be at most 1 year");
require(subscriberSubs[msg.sender].length < MAX_SUBSCRIPTION_PER_SUBSCRIBER,"Subscription count limit reached");
// first payment
require(<FILL_ME>)
// add to subscription mappings
subscriptions[nextIndex] = Subscription(
true,
uint48(now.add(interval)),
interval,
msg.sender,
receiver,
daiCents
);
subscriberReceiver[msg.sender][receiver] = nextIndex;
receiverSubs[receiver].push(nextIndex);
subscriberSubs[msg.sender].push(nextIndex);
emit NewSubscription(msg.sender, receiver, daiCents, interval);
emit SubscriptionPaid(msg.sender, receiver, weiAmount, daiCents, uint48(now));
nextIndex++;
}
/**
* Deactivate a subscription. Must be called by the subscriber's account.
* Payments cannot be collected from deactivated subscriptons.
* @param receiver address used to identify the unique subscriber-receiver pair.
* @return success
*/
function deactivateSubscription(address receiver) external returns (bool) {
}
/**
* Reactivate a subscription. Must be called by the subscriber's account.
* If less than one interval has passed since the last payment, no payment is collected now.
* Otherwise it is treated as a new subscription starting now, and the first payment is collected.
* No back-payments are collected.
* @param receiver addres used to identify the unique subscriber-receiver pair.
* @return success
*/
function reactivateSubscription(address receiver) external returns (bool) {
}
/**
* Delete a subscription. Must be called by the subscriber's account.
* @param receiver address used to identify the unique subscriber-receiver pair.
*/
function unsubscribe(address receiver) external {
}
/**
* Delete a subscription. Must be called by the receiver's account.
* @param subscriber address used to identify the unique subscriber-receiver pair.
*/
function unsubscribeByReceiver(address subscriber) external {
}
/**
* Collect all available *funded* payments for a receiver's account.
* Helper function that calls executeDebitsRange() with the full range.
* Will process as many payments as possible with the gas provided and exit gracefully.
*
* @param receiver address
*/
function executeDebits(address receiver) external {
}
/**
* A read-only version of executeDebits()
* Calculates uncollected *funded* payments for a receiver.
* @param receiver address
* @return total unclaimed value in wei
*/
function getTotalUnclaimedPayments(address receiver) external view returns (uint) {
}
/**
* Calculates a subscriber's total outstanding payments in daiCents
* @param subscriber address
* @param time in seconds. If `time` < `now`, then we simply use `now`
* @return total amount owed at `time` in daiCents
*/
function outstandingBalanceUntil(address subscriber, uint time) external view returns (uint) {
}
/**
* Collect available *funded* payments for a receiver's account within a certain range of receiverSubs[receiver].
* Will process as many payments as possible with the gas provided and exit gracefully.
*
* @param receiver address
* @param start starting index of receiverSubs[receiver]
* @param end ending index of receiverSubs[receiver]
* @return last processed index
*/
function executeDebitsRange(address receiver, uint start, uint end) public returns (uint) {
}
/**
* Calculates how much wETH balance Subscrypto is authorized to use on bealf of `payer`.
* Returns the minimum(payer's wETH balance, amount authorized to Subscrypto).
* @param payer address
* @return wad amount of wETH available for Subscrypto payments
*/
function allowedBalance(address payer) public view returns (uint) {
}
/**
* Calls the DAI medianizer contract to get the current exchange rate for ETH-DAI
* @return current ETH price in DAI (wad format)
*/
function ethPriceInDaiWad() public view returns (uint) {
}
/**
* Helper function to search for and delete an array element without leaving a gap.
* Array size is also decremented.
* DO NOT USE if ordering is important.
* @param array array to be modified
* @param element value to be removed
*/
function deleteElement(uint64[] storage array, uint64 element) internal {
}
/**
* Calculates how many whole unpaid intervals (will) have elapsed since the last payment at a specific `time`.
* DOES NOT check if subscriber account is funded.
* @param sub Subscription object
* @param time timestamp in seconds
* @return number of unpaid intervals
*/
function calculateUnpaidIntervalsUntil(Subscription memory sub, uint time) internal view returns (uint) {
}
/**
* Safely calculate the next payment timestamp for a Subscription
* @param sub Subscription object
* @return uint48 timestamp in seconds of the next payment
*/
function calculateNextPaymentTime(Subscription memory sub) internal pure returns (uint48) {
}
/**
* Converts DAI (cents) to ETH (wei) without losing precision
* @param daiCents one hundreth of a DAI
* @param ethPriceWad price from calling ethPriceInDaiWad()
* @return ETH value denominated in wei
*/
function daiCentsToEthWei(uint daiCents, uint ethPriceWad) internal pure returns (uint) {
}
/**
* Converts amount in cents (hundredths of DAI) to amount in wad
* @param cents daiCents (hundredths of DAI)
* @return amount of dai in wad
*/
function centsToWad(uint cents) internal pure returns (uint) {
}
}
| wethContract.transferFrom(msg.sender,receiver,weiAmount),"wETH transferFrom() failed" | 360,782 | wethContract.transferFrom(msg.sender,receiver,weiAmount) |
"Subscription is already disabled" | /*
Subscrypto
Copyright (C) 2019 Subscrypto Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
pragma solidity 0.5.2;
/**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error
*/
library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two unsigned integers, reverts on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract Medianizer {
function read() public view returns (bytes32);
}
contract Weth {
mapping(address => mapping(address => uint)) public allowance;
mapping(address => uint) public balanceOf;
function transferFrom(address src, address dst, uint wad) public returns (bool);
}
/// @author The Subscrypto Team
/// @title Subscrypto recurring payments
contract Subscrypto {
using SafeMath for uint;
Medianizer public daiPriceContract;
Weth public wethContract;
/**
* Constructor
* @param daiMedianizerContract address
* @param wethContractAddress address
*/
constructor(address daiMedianizerContract, address wethContractAddress) public {
}
event NewSubscription(
address indexed subscriber,
address indexed receiver,
uint daiCents,
uint32 interval
);
event Unsubscribe(
address indexed subscriber,
address indexed receiver
);
event ReceiverPaymentsCollected(
address indexed receiver,
uint weiAmount,
uint startIndex,
uint endIndex
);
event SubscriptionPaid(
address indexed subscriber,
address indexed receiver,
uint weiAmount,
uint daiCents,
uint48 effectiveTimestamp
);
event UnfundedPayment(
address indexed subscriber,
address indexed receiver,
uint weiAmount,
uint daiCents
);
event StaleSubscription(
address indexed subscriber,
address indexed receiver
);
event SubscriptionDeactivated(
address indexed subscriber,
address indexed receiver
);
event SubscriptionReactivated(
address indexed subscriber,
address indexed receiver
);
// Conservative amount of gas used per loop in executeDebits()
uint constant MIN_GAS_PER_EXECUTE_DEBIT = 45000;
// Force subscribers to use multiple accounts when this limit is reached.
uint constant MAX_SUBSCRIPTION_PER_SUBSCRIBER = 10000;
// Minimum payment of 1 DAI
uint constant MIN_SUBSCRIPTION_DAI_CENTS = 100;
struct Subscription {
bool isActive; // 1 byte
uint48 nextPaymentTime; // 6 bytes
uint32 interval; // 4 bytes
address subscriber; // 20 bytes
address receiver; // 20 bytes
uint daiCents; // 32 bytes
}
// global counter for suscriptions
uint64 nextIndex = 1;
// source of truth for subscriptions
mapping(uint64 => Subscription) public subscriptions;
// subscriber => receiver => subsciptionIndex
mapping(address => mapping(address => uint64)) public subscriberReceiver;
// receiver => subs array
mapping(address => uint64[]) public receiverSubs;
// subscriber => subs array
mapping(address => uint64[]) public subscriberSubs;
/**
* Create a new subscription. Must be called by the subscriber's account.
* First payment of `daiCents` is paid on creation.
* Actual payment is made in Wrapped Ether (wETH) using currenct DAI-ETH conversion rate.
* @param receiver address
* @param daiCents subscription amount in hundredths of DAI
* @param interval seconds between payments
*/
function subscribe(address receiver, uint daiCents, uint32 interval) external {
}
/**
* Deactivate a subscription. Must be called by the subscriber's account.
* Payments cannot be collected from deactivated subscriptons.
* @param receiver address used to identify the unique subscriber-receiver pair.
* @return success
*/
function deactivateSubscription(address receiver) external returns (bool) {
uint64 index = subscriberReceiver[msg.sender][receiver];
require(index != 0, "Subscription does not exist");
Subscription storage sub = subscriptions[index];
require(<FILL_ME>)
require(sub.daiCents > 0, "Subscription does not exist");
sub.isActive = false;
emit SubscriptionDeactivated(msg.sender, receiver);
return true;
}
/**
* Reactivate a subscription. Must be called by the subscriber's account.
* If less than one interval has passed since the last payment, no payment is collected now.
* Otherwise it is treated as a new subscription starting now, and the first payment is collected.
* No back-payments are collected.
* @param receiver addres used to identify the unique subscriber-receiver pair.
* @return success
*/
function reactivateSubscription(address receiver) external returns (bool) {
}
/**
* Delete a subscription. Must be called by the subscriber's account.
* @param receiver address used to identify the unique subscriber-receiver pair.
*/
function unsubscribe(address receiver) external {
}
/**
* Delete a subscription. Must be called by the receiver's account.
* @param subscriber address used to identify the unique subscriber-receiver pair.
*/
function unsubscribeByReceiver(address subscriber) external {
}
/**
* Collect all available *funded* payments for a receiver's account.
* Helper function that calls executeDebitsRange() with the full range.
* Will process as many payments as possible with the gas provided and exit gracefully.
*
* @param receiver address
*/
function executeDebits(address receiver) external {
}
/**
* A read-only version of executeDebits()
* Calculates uncollected *funded* payments for a receiver.
* @param receiver address
* @return total unclaimed value in wei
*/
function getTotalUnclaimedPayments(address receiver) external view returns (uint) {
}
/**
* Calculates a subscriber's total outstanding payments in daiCents
* @param subscriber address
* @param time in seconds. If `time` < `now`, then we simply use `now`
* @return total amount owed at `time` in daiCents
*/
function outstandingBalanceUntil(address subscriber, uint time) external view returns (uint) {
}
/**
* Collect available *funded* payments for a receiver's account within a certain range of receiverSubs[receiver].
* Will process as many payments as possible with the gas provided and exit gracefully.
*
* @param receiver address
* @param start starting index of receiverSubs[receiver]
* @param end ending index of receiverSubs[receiver]
* @return last processed index
*/
function executeDebitsRange(address receiver, uint start, uint end) public returns (uint) {
}
/**
* Calculates how much wETH balance Subscrypto is authorized to use on bealf of `payer`.
* Returns the minimum(payer's wETH balance, amount authorized to Subscrypto).
* @param payer address
* @return wad amount of wETH available for Subscrypto payments
*/
function allowedBalance(address payer) public view returns (uint) {
}
/**
* Calls the DAI medianizer contract to get the current exchange rate for ETH-DAI
* @return current ETH price in DAI (wad format)
*/
function ethPriceInDaiWad() public view returns (uint) {
}
/**
* Helper function to search for and delete an array element without leaving a gap.
* Array size is also decremented.
* DO NOT USE if ordering is important.
* @param array array to be modified
* @param element value to be removed
*/
function deleteElement(uint64[] storage array, uint64 element) internal {
}
/**
* Calculates how many whole unpaid intervals (will) have elapsed since the last payment at a specific `time`.
* DOES NOT check if subscriber account is funded.
* @param sub Subscription object
* @param time timestamp in seconds
* @return number of unpaid intervals
*/
function calculateUnpaidIntervalsUntil(Subscription memory sub, uint time) internal view returns (uint) {
}
/**
* Safely calculate the next payment timestamp for a Subscription
* @param sub Subscription object
* @return uint48 timestamp in seconds of the next payment
*/
function calculateNextPaymentTime(Subscription memory sub) internal pure returns (uint48) {
}
/**
* Converts DAI (cents) to ETH (wei) without losing precision
* @param daiCents one hundreth of a DAI
* @param ethPriceWad price from calling ethPriceInDaiWad()
* @return ETH value denominated in wei
*/
function daiCentsToEthWei(uint daiCents, uint ethPriceWad) internal pure returns (uint) {
}
/**
* Converts amount in cents (hundredths of DAI) to amount in wad
* @param cents daiCents (hundredths of DAI)
* @return amount of dai in wad
*/
function centsToWad(uint cents) internal pure returns (uint) {
}
}
| sub.isActive,"Subscription is already disabled" | 360,782 | sub.isActive |
"Subscription is already active" | /*
Subscrypto
Copyright (C) 2019 Subscrypto Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
pragma solidity 0.5.2;
/**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error
*/
library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two unsigned integers, reverts on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract Medianizer {
function read() public view returns (bytes32);
}
contract Weth {
mapping(address => mapping(address => uint)) public allowance;
mapping(address => uint) public balanceOf;
function transferFrom(address src, address dst, uint wad) public returns (bool);
}
/// @author The Subscrypto Team
/// @title Subscrypto recurring payments
contract Subscrypto {
using SafeMath for uint;
Medianizer public daiPriceContract;
Weth public wethContract;
/**
* Constructor
* @param daiMedianizerContract address
* @param wethContractAddress address
*/
constructor(address daiMedianizerContract, address wethContractAddress) public {
}
event NewSubscription(
address indexed subscriber,
address indexed receiver,
uint daiCents,
uint32 interval
);
event Unsubscribe(
address indexed subscriber,
address indexed receiver
);
event ReceiverPaymentsCollected(
address indexed receiver,
uint weiAmount,
uint startIndex,
uint endIndex
);
event SubscriptionPaid(
address indexed subscriber,
address indexed receiver,
uint weiAmount,
uint daiCents,
uint48 effectiveTimestamp
);
event UnfundedPayment(
address indexed subscriber,
address indexed receiver,
uint weiAmount,
uint daiCents
);
event StaleSubscription(
address indexed subscriber,
address indexed receiver
);
event SubscriptionDeactivated(
address indexed subscriber,
address indexed receiver
);
event SubscriptionReactivated(
address indexed subscriber,
address indexed receiver
);
// Conservative amount of gas used per loop in executeDebits()
uint constant MIN_GAS_PER_EXECUTE_DEBIT = 45000;
// Force subscribers to use multiple accounts when this limit is reached.
uint constant MAX_SUBSCRIPTION_PER_SUBSCRIBER = 10000;
// Minimum payment of 1 DAI
uint constant MIN_SUBSCRIPTION_DAI_CENTS = 100;
struct Subscription {
bool isActive; // 1 byte
uint48 nextPaymentTime; // 6 bytes
uint32 interval; // 4 bytes
address subscriber; // 20 bytes
address receiver; // 20 bytes
uint daiCents; // 32 bytes
}
// global counter for suscriptions
uint64 nextIndex = 1;
// source of truth for subscriptions
mapping(uint64 => Subscription) public subscriptions;
// subscriber => receiver => subsciptionIndex
mapping(address => mapping(address => uint64)) public subscriberReceiver;
// receiver => subs array
mapping(address => uint64[]) public receiverSubs;
// subscriber => subs array
mapping(address => uint64[]) public subscriberSubs;
/**
* Create a new subscription. Must be called by the subscriber's account.
* First payment of `daiCents` is paid on creation.
* Actual payment is made in Wrapped Ether (wETH) using currenct DAI-ETH conversion rate.
* @param receiver address
* @param daiCents subscription amount in hundredths of DAI
* @param interval seconds between payments
*/
function subscribe(address receiver, uint daiCents, uint32 interval) external {
}
/**
* Deactivate a subscription. Must be called by the subscriber's account.
* Payments cannot be collected from deactivated subscriptons.
* @param receiver address used to identify the unique subscriber-receiver pair.
* @return success
*/
function deactivateSubscription(address receiver) external returns (bool) {
}
/**
* Reactivate a subscription. Must be called by the subscriber's account.
* If less than one interval has passed since the last payment, no payment is collected now.
* Otherwise it is treated as a new subscription starting now, and the first payment is collected.
* No back-payments are collected.
* @param receiver addres used to identify the unique subscriber-receiver pair.
* @return success
*/
function reactivateSubscription(address receiver) external returns (bool) {
uint64 index = subscriberReceiver[msg.sender][receiver];
require(index != 0, "Subscription does not exist");
Subscription storage sub = subscriptions[index];
require(<FILL_ME>)
sub.isActive = true;
emit SubscriptionReactivated(msg.sender, receiver);
if (calculateUnpaidIntervalsUntil(sub, now) > 0) {
// only make a payment if at least one interval has lapsed since the last payment
uint weiAmount = daiCentsToEthWei(sub.daiCents, ethPriceInDaiWad());
require(wethContract.transferFrom(msg.sender, receiver, weiAmount), "Insufficient funds to reactivate subscription");
emit SubscriptionPaid(msg.sender, receiver, weiAmount, sub.daiCents, uint48(now));
}
sub.nextPaymentTime = uint48(now.add(sub.interval));
return true;
}
/**
* Delete a subscription. Must be called by the subscriber's account.
* @param receiver address used to identify the unique subscriber-receiver pair.
*/
function unsubscribe(address receiver) external {
}
/**
* Delete a subscription. Must be called by the receiver's account.
* @param subscriber address used to identify the unique subscriber-receiver pair.
*/
function unsubscribeByReceiver(address subscriber) external {
}
/**
* Collect all available *funded* payments for a receiver's account.
* Helper function that calls executeDebitsRange() with the full range.
* Will process as many payments as possible with the gas provided and exit gracefully.
*
* @param receiver address
*/
function executeDebits(address receiver) external {
}
/**
* A read-only version of executeDebits()
* Calculates uncollected *funded* payments for a receiver.
* @param receiver address
* @return total unclaimed value in wei
*/
function getTotalUnclaimedPayments(address receiver) external view returns (uint) {
}
/**
* Calculates a subscriber's total outstanding payments in daiCents
* @param subscriber address
* @param time in seconds. If `time` < `now`, then we simply use `now`
* @return total amount owed at `time` in daiCents
*/
function outstandingBalanceUntil(address subscriber, uint time) external view returns (uint) {
}
/**
* Collect available *funded* payments for a receiver's account within a certain range of receiverSubs[receiver].
* Will process as many payments as possible with the gas provided and exit gracefully.
*
* @param receiver address
* @param start starting index of receiverSubs[receiver]
* @param end ending index of receiverSubs[receiver]
* @return last processed index
*/
function executeDebitsRange(address receiver, uint start, uint end) public returns (uint) {
}
/**
* Calculates how much wETH balance Subscrypto is authorized to use on bealf of `payer`.
* Returns the minimum(payer's wETH balance, amount authorized to Subscrypto).
* @param payer address
* @return wad amount of wETH available for Subscrypto payments
*/
function allowedBalance(address payer) public view returns (uint) {
}
/**
* Calls the DAI medianizer contract to get the current exchange rate for ETH-DAI
* @return current ETH price in DAI (wad format)
*/
function ethPriceInDaiWad() public view returns (uint) {
}
/**
* Helper function to search for and delete an array element without leaving a gap.
* Array size is also decremented.
* DO NOT USE if ordering is important.
* @param array array to be modified
* @param element value to be removed
*/
function deleteElement(uint64[] storage array, uint64 element) internal {
}
/**
* Calculates how many whole unpaid intervals (will) have elapsed since the last payment at a specific `time`.
* DOES NOT check if subscriber account is funded.
* @param sub Subscription object
* @param time timestamp in seconds
* @return number of unpaid intervals
*/
function calculateUnpaidIntervalsUntil(Subscription memory sub, uint time) internal view returns (uint) {
}
/**
* Safely calculate the next payment timestamp for a Subscription
* @param sub Subscription object
* @return uint48 timestamp in seconds of the next payment
*/
function calculateNextPaymentTime(Subscription memory sub) internal pure returns (uint48) {
}
/**
* Converts DAI (cents) to ETH (wei) without losing precision
* @param daiCents one hundreth of a DAI
* @param ethPriceWad price from calling ethPriceInDaiWad()
* @return ETH value denominated in wei
*/
function daiCentsToEthWei(uint daiCents, uint ethPriceWad) internal pure returns (uint) {
}
/**
* Converts amount in cents (hundredths of DAI) to amount in wad
* @param cents daiCents (hundredths of DAI)
* @return amount of dai in wad
*/
function centsToWad(uint cents) internal pure returns (uint) {
}
}
| !sub.isActive,"Subscription is already active" | 360,782 | !sub.isActive |
"must in whitelist" | pragma solidity ^0.5.5;
/// @title DegoToken Contract
contract DegoTokenAirDrop is Governance{
using SafeMath for uint256;
using SafeERC20 for IERC20;
//events
event Mint(address indexed to, uint256 value);
//token base data
uint256 internal _allGotBalances;
mapping(address => uint256) public _gotBalances;
//airdrop info
uint256 public _startTime = now;
/// Constant token specific fields
uint256 public _rewardRate1 = 2000;
uint256 public _rewardRate2 = 8000;
uint256 public _rewardDurationTime = 100 days;
uint256 public _baseRate = 10000;
mapping (address => uint256) public _whitelist;
mapping (address => uint256) public _lastRewardTimes;
IERC20 public _dego = IERC20(0x0);
/**
* CONSTRUCTOR
*
* @dev Initialize the Contract
* @param dego The address to send dego.
*/
constructor (address dego) public {
}
/**
* @dev have Got the balance of the specified address.
* @param account The address to query the the gotbalance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function gotBalanceOf(address account) external view
returns (uint256)
{
}
/**
* @dev return the token total supply
*/
function allGotBalances() external view
returns (uint256)
{
}
/**
* @dev for mint function
* @param account The address to get the reward.
* @param amount The amount of the reward.
*/
function _mint(address account, uint256 amount) internal
{
require(account != address(0), "ERC20: mint to the zero address");
require(<FILL_ME>)
_allGotBalances = _allGotBalances.add(amount);
_gotBalances[account] = _gotBalances[account].add(amount);
_dego.mint(account, amount);
emit Mint(account, amount);
}
/**
* @dev set the dego contract address
* @param dego Set the dego
*/
function setDego(address dego)
external
onlyGovernance
{
}
/**
* @dev set the whitelist
* @param account Set the account to whitelist
* @param amount the amount of reward.
*/
function setWhitelist(address account, uint256 amount)
public
onlyGovernance
{
}
function addWhitelist(address[] calldata account, uint256[] calldata value)
external
onlyGovernance
{
}
/**
* @dev get reward
*/
function getReward() public
{
}
/**
* @dev Calculate and reuturn Unclaimed rewards
*/
function earned(address account) public view returns (uint256)
{
}
}
| _whitelist[account]>0,"must in whitelist" | 360,949 | _whitelist[account]>0 |
"account already exists" | pragma solidity ^0.5.5;
/// @title DegoToken Contract
contract DegoTokenAirDrop is Governance{
using SafeMath for uint256;
using SafeERC20 for IERC20;
//events
event Mint(address indexed to, uint256 value);
//token base data
uint256 internal _allGotBalances;
mapping(address => uint256) public _gotBalances;
//airdrop info
uint256 public _startTime = now;
/// Constant token specific fields
uint256 public _rewardRate1 = 2000;
uint256 public _rewardRate2 = 8000;
uint256 public _rewardDurationTime = 100 days;
uint256 public _baseRate = 10000;
mapping (address => uint256) public _whitelist;
mapping (address => uint256) public _lastRewardTimes;
IERC20 public _dego = IERC20(0x0);
/**
* CONSTRUCTOR
*
* @dev Initialize the Contract
* @param dego The address to send dego.
*/
constructor (address dego) public {
}
/**
* @dev have Got the balance of the specified address.
* @param account The address to query the the gotbalance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function gotBalanceOf(address account) external view
returns (uint256)
{
}
/**
* @dev return the token total supply
*/
function allGotBalances() external view
returns (uint256)
{
}
/**
* @dev for mint function
* @param account The address to get the reward.
* @param amount The amount of the reward.
*/
function _mint(address account, uint256 amount) internal
{
}
/**
* @dev set the dego contract address
* @param dego Set the dego
*/
function setDego(address dego)
external
onlyGovernance
{
}
/**
* @dev set the whitelist
* @param account Set the account to whitelist
* @param amount the amount of reward.
*/
function setWhitelist(address account, uint256 amount)
public
onlyGovernance
{
require(account != address(0), "account is zero address");
if(amount > 0){
require(<FILL_ME>)
}
_whitelist[account] = amount;
}
function addWhitelist(address[] calldata account, uint256[] calldata value)
external
onlyGovernance
{
}
/**
* @dev get reward
*/
function getReward() public
{
}
/**
* @dev Calculate and reuturn Unclaimed rewards
*/
function earned(address account) public view returns (uint256)
{
}
}
| _whitelist[account]==0,"account already exists" | 360,949 | _whitelist[account]==0 |
"You've got too many awards!!!" | pragma solidity ^0.5.5;
/// @title DegoToken Contract
contract DegoTokenAirDrop is Governance{
using SafeMath for uint256;
using SafeERC20 for IERC20;
//events
event Mint(address indexed to, uint256 value);
//token base data
uint256 internal _allGotBalances;
mapping(address => uint256) public _gotBalances;
//airdrop info
uint256 public _startTime = now;
/// Constant token specific fields
uint256 public _rewardRate1 = 2000;
uint256 public _rewardRate2 = 8000;
uint256 public _rewardDurationTime = 100 days;
uint256 public _baseRate = 10000;
mapping (address => uint256) public _whitelist;
mapping (address => uint256) public _lastRewardTimes;
IERC20 public _dego = IERC20(0x0);
/**
* CONSTRUCTOR
*
* @dev Initialize the Contract
* @param dego The address to send dego.
*/
constructor (address dego) public {
}
/**
* @dev have Got the balance of the specified address.
* @param account The address to query the the gotbalance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function gotBalanceOf(address account) external view
returns (uint256)
{
}
/**
* @dev return the token total supply
*/
function allGotBalances() external view
returns (uint256)
{
}
/**
* @dev for mint function
* @param account The address to get the reward.
* @param amount The amount of the reward.
*/
function _mint(address account, uint256 amount) internal
{
}
/**
* @dev set the dego contract address
* @param dego Set the dego
*/
function setDego(address dego)
external
onlyGovernance
{
}
/**
* @dev set the whitelist
* @param account Set the account to whitelist
* @param amount the amount of reward.
*/
function setWhitelist(address account, uint256 amount)
public
onlyGovernance
{
}
function addWhitelist(address[] calldata account, uint256[] calldata value)
external
onlyGovernance
{
}
/**
* @dev get reward
*/
function getReward() public
{
uint256 reward = earned(msg.sender);
require(reward > 0, "must > 0");
require(<FILL_ME>)
_mint(msg.sender, reward);
_lastRewardTimes[msg.sender] = block.timestamp;
}
/**
* @dev Calculate and reuturn Unclaimed rewards
*/
function earned(address account) public view returns (uint256)
{
}
}
| reward.add(_gotBalances[msg.sender])<=_whitelist[msg.sender],"You've got too many awards!!!" | 360,949 | reward.add(_gotBalances[msg.sender])<=_whitelist[msg.sender] |
"You must own the vNFT to use this feature" | pragma solidity ^0.6.0;
import "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/introspection/IERC165Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol";
// @TODO DOn't Forget!!!
import "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155HolderUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol";
import "../interfaces/IMuseToken.sol";
import "../interfaces/IVNFT.sol";
// SPDX-License-Identifier: MIT
// Extending IERC1155 with mint and burn
interface IERC1155 is IERC165Upgradeable {
event TransferSingle(
address indexed operator,
address indexed from,
address indexed to,
uint256 id,
uint256 value
);
event TransferBatch(
address indexed operator,
address indexed from,
address indexed to,
uint256[] ids,
uint256[] values
);
event ApprovalForAll(
address indexed account,
address indexed operator,
bool approved
);
event URI(string value, uint256 indexed id);
function balanceOf(address account, uint256 id)
external
view
returns (uint256);
function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
external
view
returns (uint256[] memory);
function setApprovalForAll(address operator, bool approved) external;
function isApprovedForAll(address account, address operator)
external
view
returns (bool);
function safeTransferFrom(
address from,
address to,
uint256 id,
uint256 amount,
bytes calldata data
) external;
function safeBatchTransferFrom(
address from,
address to,
uint256[] calldata ids,
uint256[] calldata amounts,
bytes calldata data
) external;
function mint(
address to,
uint256 id,
uint256 amount,
bytes calldata data
) external;
function mintBatch(
address to,
uint256[] calldata ids,
uint256[] calldata amounts,
bytes calldata data
) external;
function burn(
address account,
uint256 id,
uint256 value
) external;
function burnBatch(
address account,
uint256[] calldata ids,
uint256[] calldata values
) external;
}
contract VNFTxV2 is
Initializable,
OwnableUpgradeable,
ERC1155HolderUpgradeable
{
/* START V1 STORAGE */
using SafeMathUpgradeable for uint256;
bool paused;
IVNFT public vnft;
IMuseToken public muse;
IERC1155 public addons;
uint256 public artistPct;
struct Addon {
string _type;
uint256 price;
uint256 requiredhp;
uint256 rarity;
string artistName;
address artistAddr;
uint256 quantity;
uint256 used;
}
using EnumerableSetUpgradeable for EnumerableSetUpgradeable.UintSet;
mapping(uint256 => Addon) public addon;
mapping(uint256 => EnumerableSetUpgradeable.UintSet) private addonsConsumed;
EnumerableSetUpgradeable.UintSet lockedAddons;
//nftid to rarity points
mapping(uint256 => uint256) public rarity;
mapping(uint256 => uint256) public challengesUsed;
//!important, decides which gem score hp is based of
uint256 public healthGemScore;
uint256 public healthGemId;
uint256 public healthGemPrice;
uint256 public healthGemDays;
// premium hp is the min requirement for premium features.
uint256 public premiumHp;
uint256 public hpMultiplier;
uint256 public rarityMultiplier;
uint256 public addonsMultiplier;
//expected addons to be used for max hp
uint256 public expectedAddons;
//Expected rarity, this should be changed according to new addons introduced.
uint256 expectedRarity;
using CountersUpgradeable for CountersUpgradeable.Counter;
CountersUpgradeable.Counter private _addonId;
/* END V1 STORAGE */
event BuyAddon(uint256 nftId, uint256 addon, address player);
event CreateAddon(
uint256 addonId,
string _type,
uint256 rarity,
uint256 quantity
);
event EditAddon(
uint256 addonId,
string _type,
uint256 price,
uint256 _quantity
);
event AttachAddon(uint256 addonId, uint256 nftId);
event RemoveAddon(uint256 addonId, uint256 nftId);
constructor() public {}
function initialize(
IVNFT _vnft,
IMuseToken _muse,
IERC1155 _addons
) public initializer {
}
modifier tokenOwner(uint256 _id) {
require(<FILL_ME>)
_;
}
modifier notLocked(uint256 _id) {
}
modifier notPaused() {
}
// get how many addons a pet is using
function addonsBalanceOf(uint256 _nftId) public view returns (uint256) {
}
// get a specific addon
function addonsOfNftByIndex(uint256 _nftId, uint256 _index)
public
view
returns (uint256)
{
}
function getHp(uint256 _nftId) public view returns (uint256) {
}
function getChallenges(uint256 _nftId) public view returns (uint256) {
}
function buyAddon(uint256 _nftId, uint256 addonId)
public
tokenOwner(_nftId)
notPaused
{
}
function useAddon(uint256 _nftId, uint256 _addonID)
public
tokenOwner(_nftId)
notPaused
{
}
function transferAddon(
uint256 _nftId,
uint256 _addonID,
uint256 _toId
) external tokenOwner(_nftId) notLocked(_addonID) {
}
function removeAddon(uint256 _nftId, uint256 _addonID)
public
tokenOwner(_nftId)
notLocked(_addonID)
{
}
function removeMultiple(
uint256[] calldata nftIds,
uint256[] calldata addonIds
) external {
}
function useMultiple(uint256[] calldata nftIds, uint256[] calldata addonIds)
external
{
}
function buyMultiple(uint256[] calldata nftIds, uint256[] calldata addonIds)
external
{
}
// this is in case a dead pet addons is stuck in contract, we can use for diff cases.
function withdraw(uint256 _id, address _to) external onlyOwner {
}
function createAddon(
string calldata _type,
uint256 price,
uint256 _hp,
uint256 _rarity,
string calldata _artistName,
address _artist,
uint256 _quantity,
bool _lock
) external onlyOwner {
}
function getVnftInfo(uint256 _nftId)
public
view
returns (
uint256 _vNFT,
uint256 _rarity,
uint256 _hp,
uint256 _addonsCount,
uint256[10] memory _addons
)
{
}
function editAddon(
uint256 _id,
string calldata _type,
uint256 price,
uint256 _requiredhp,
uint256 _rarity,
string calldata _artistName,
address _artist,
uint256 _quantity,
uint256 _used,
bool _lock
) external onlyOwner {
}
function lockAddon(uint256 _id) public onlyOwner {
}
function unlockAddon(uint256 _id) public onlyOwner {
}
function setArtistPct(uint256 _newPct) external onlyOwner {
}
function setHealthStrat(
uint256 _score,
uint256 _healthGemPrice,
uint256 _healthGemId,
uint256 _days,
uint256 _hpMultiplier,
uint256 _rarityMultiplier,
uint256 _expectedAddons,
uint256 _addonsMultiplier,
uint256 _expectedRarity,
uint256 _premiumHp
) external onlyOwner {
}
function pause(bool _paused) public onlyOwner {
}
}
| vnft.ownerOf(_id)==msg.sender,"You must own the vNFT to use this feature" | 361,001 | vnft.ownerOf(_id)==msg.sender |
"This addon is locked" | pragma solidity ^0.6.0;
import "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/introspection/IERC165Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol";
// @TODO DOn't Forget!!!
import "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155HolderUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol";
import "../interfaces/IMuseToken.sol";
import "../interfaces/IVNFT.sol";
// SPDX-License-Identifier: MIT
// Extending IERC1155 with mint and burn
interface IERC1155 is IERC165Upgradeable {
event TransferSingle(
address indexed operator,
address indexed from,
address indexed to,
uint256 id,
uint256 value
);
event TransferBatch(
address indexed operator,
address indexed from,
address indexed to,
uint256[] ids,
uint256[] values
);
event ApprovalForAll(
address indexed account,
address indexed operator,
bool approved
);
event URI(string value, uint256 indexed id);
function balanceOf(address account, uint256 id)
external
view
returns (uint256);
function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
external
view
returns (uint256[] memory);
function setApprovalForAll(address operator, bool approved) external;
function isApprovedForAll(address account, address operator)
external
view
returns (bool);
function safeTransferFrom(
address from,
address to,
uint256 id,
uint256 amount,
bytes calldata data
) external;
function safeBatchTransferFrom(
address from,
address to,
uint256[] calldata ids,
uint256[] calldata amounts,
bytes calldata data
) external;
function mint(
address to,
uint256 id,
uint256 amount,
bytes calldata data
) external;
function mintBatch(
address to,
uint256[] calldata ids,
uint256[] calldata amounts,
bytes calldata data
) external;
function burn(
address account,
uint256 id,
uint256 value
) external;
function burnBatch(
address account,
uint256[] calldata ids,
uint256[] calldata values
) external;
}
contract VNFTxV2 is
Initializable,
OwnableUpgradeable,
ERC1155HolderUpgradeable
{
/* START V1 STORAGE */
using SafeMathUpgradeable for uint256;
bool paused;
IVNFT public vnft;
IMuseToken public muse;
IERC1155 public addons;
uint256 public artistPct;
struct Addon {
string _type;
uint256 price;
uint256 requiredhp;
uint256 rarity;
string artistName;
address artistAddr;
uint256 quantity;
uint256 used;
}
using EnumerableSetUpgradeable for EnumerableSetUpgradeable.UintSet;
mapping(uint256 => Addon) public addon;
mapping(uint256 => EnumerableSetUpgradeable.UintSet) private addonsConsumed;
EnumerableSetUpgradeable.UintSet lockedAddons;
//nftid to rarity points
mapping(uint256 => uint256) public rarity;
mapping(uint256 => uint256) public challengesUsed;
//!important, decides which gem score hp is based of
uint256 public healthGemScore;
uint256 public healthGemId;
uint256 public healthGemPrice;
uint256 public healthGemDays;
// premium hp is the min requirement for premium features.
uint256 public premiumHp;
uint256 public hpMultiplier;
uint256 public rarityMultiplier;
uint256 public addonsMultiplier;
//expected addons to be used for max hp
uint256 public expectedAddons;
//Expected rarity, this should be changed according to new addons introduced.
uint256 expectedRarity;
using CountersUpgradeable for CountersUpgradeable.Counter;
CountersUpgradeable.Counter private _addonId;
/* END V1 STORAGE */
event BuyAddon(uint256 nftId, uint256 addon, address player);
event CreateAddon(
uint256 addonId,
string _type,
uint256 rarity,
uint256 quantity
);
event EditAddon(
uint256 addonId,
string _type,
uint256 price,
uint256 _quantity
);
event AttachAddon(uint256 addonId, uint256 nftId);
event RemoveAddon(uint256 addonId, uint256 nftId);
constructor() public {}
function initialize(
IVNFT _vnft,
IMuseToken _muse,
IERC1155 _addons
) public initializer {
}
modifier tokenOwner(uint256 _id) {
}
modifier notLocked(uint256 _id) {
require(<FILL_ME>)
_;
}
modifier notPaused() {
}
// get how many addons a pet is using
function addonsBalanceOf(uint256 _nftId) public view returns (uint256) {
}
// get a specific addon
function addonsOfNftByIndex(uint256 _nftId, uint256 _index)
public
view
returns (uint256)
{
}
function getHp(uint256 _nftId) public view returns (uint256) {
}
function getChallenges(uint256 _nftId) public view returns (uint256) {
}
function buyAddon(uint256 _nftId, uint256 addonId)
public
tokenOwner(_nftId)
notPaused
{
}
function useAddon(uint256 _nftId, uint256 _addonID)
public
tokenOwner(_nftId)
notPaused
{
}
function transferAddon(
uint256 _nftId,
uint256 _addonID,
uint256 _toId
) external tokenOwner(_nftId) notLocked(_addonID) {
}
function removeAddon(uint256 _nftId, uint256 _addonID)
public
tokenOwner(_nftId)
notLocked(_addonID)
{
}
function removeMultiple(
uint256[] calldata nftIds,
uint256[] calldata addonIds
) external {
}
function useMultiple(uint256[] calldata nftIds, uint256[] calldata addonIds)
external
{
}
function buyMultiple(uint256[] calldata nftIds, uint256[] calldata addonIds)
external
{
}
// this is in case a dead pet addons is stuck in contract, we can use for diff cases.
function withdraw(uint256 _id, address _to) external onlyOwner {
}
function createAddon(
string calldata _type,
uint256 price,
uint256 _hp,
uint256 _rarity,
string calldata _artistName,
address _artist,
uint256 _quantity,
bool _lock
) external onlyOwner {
}
function getVnftInfo(uint256 _nftId)
public
view
returns (
uint256 _vNFT,
uint256 _rarity,
uint256 _hp,
uint256 _addonsCount,
uint256[10] memory _addons
)
{
}
function editAddon(
uint256 _id,
string calldata _type,
uint256 price,
uint256 _requiredhp,
uint256 _rarity,
string calldata _artistName,
address _artist,
uint256 _quantity,
uint256 _used,
bool _lock
) external onlyOwner {
}
function lockAddon(uint256 _id) public onlyOwner {
}
function unlockAddon(uint256 _id) public onlyOwner {
}
function setArtistPct(uint256 _newPct) external onlyOwner {
}
function setHealthStrat(
uint256 _score,
uint256 _healthGemPrice,
uint256 _healthGemId,
uint256 _days,
uint256 _hpMultiplier,
uint256 _rarityMultiplier,
uint256 _expectedAddons,
uint256 _addonsMultiplier,
uint256 _expectedRarity,
uint256 _premiumHp
) external onlyOwner {
}
function pause(bool _paused) public onlyOwner {
}
}
| !lockedAddons.contains(_id),"This addon is locked" | 361,001 | !lockedAddons.contains(_id) |
"Raise your HP to buy this addon" | pragma solidity ^0.6.0;
import "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/introspection/IERC165Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol";
// @TODO DOn't Forget!!!
import "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155HolderUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol";
import "../interfaces/IMuseToken.sol";
import "../interfaces/IVNFT.sol";
// SPDX-License-Identifier: MIT
// Extending IERC1155 with mint and burn
interface IERC1155 is IERC165Upgradeable {
event TransferSingle(
address indexed operator,
address indexed from,
address indexed to,
uint256 id,
uint256 value
);
event TransferBatch(
address indexed operator,
address indexed from,
address indexed to,
uint256[] ids,
uint256[] values
);
event ApprovalForAll(
address indexed account,
address indexed operator,
bool approved
);
event URI(string value, uint256 indexed id);
function balanceOf(address account, uint256 id)
external
view
returns (uint256);
function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
external
view
returns (uint256[] memory);
function setApprovalForAll(address operator, bool approved) external;
function isApprovedForAll(address account, address operator)
external
view
returns (bool);
function safeTransferFrom(
address from,
address to,
uint256 id,
uint256 amount,
bytes calldata data
) external;
function safeBatchTransferFrom(
address from,
address to,
uint256[] calldata ids,
uint256[] calldata amounts,
bytes calldata data
) external;
function mint(
address to,
uint256 id,
uint256 amount,
bytes calldata data
) external;
function mintBatch(
address to,
uint256[] calldata ids,
uint256[] calldata amounts,
bytes calldata data
) external;
function burn(
address account,
uint256 id,
uint256 value
) external;
function burnBatch(
address account,
uint256[] calldata ids,
uint256[] calldata values
) external;
}
contract VNFTxV2 is
Initializable,
OwnableUpgradeable,
ERC1155HolderUpgradeable
{
/* START V1 STORAGE */
using SafeMathUpgradeable for uint256;
bool paused;
IVNFT public vnft;
IMuseToken public muse;
IERC1155 public addons;
uint256 public artistPct;
struct Addon {
string _type;
uint256 price;
uint256 requiredhp;
uint256 rarity;
string artistName;
address artistAddr;
uint256 quantity;
uint256 used;
}
using EnumerableSetUpgradeable for EnumerableSetUpgradeable.UintSet;
mapping(uint256 => Addon) public addon;
mapping(uint256 => EnumerableSetUpgradeable.UintSet) private addonsConsumed;
EnumerableSetUpgradeable.UintSet lockedAddons;
//nftid to rarity points
mapping(uint256 => uint256) public rarity;
mapping(uint256 => uint256) public challengesUsed;
//!important, decides which gem score hp is based of
uint256 public healthGemScore;
uint256 public healthGemId;
uint256 public healthGemPrice;
uint256 public healthGemDays;
// premium hp is the min requirement for premium features.
uint256 public premiumHp;
uint256 public hpMultiplier;
uint256 public rarityMultiplier;
uint256 public addonsMultiplier;
//expected addons to be used for max hp
uint256 public expectedAddons;
//Expected rarity, this should be changed according to new addons introduced.
uint256 expectedRarity;
using CountersUpgradeable for CountersUpgradeable.Counter;
CountersUpgradeable.Counter private _addonId;
/* END V1 STORAGE */
event BuyAddon(uint256 nftId, uint256 addon, address player);
event CreateAddon(
uint256 addonId,
string _type,
uint256 rarity,
uint256 quantity
);
event EditAddon(
uint256 addonId,
string _type,
uint256 price,
uint256 _quantity
);
event AttachAddon(uint256 addonId, uint256 nftId);
event RemoveAddon(uint256 addonId, uint256 nftId);
constructor() public {}
function initialize(
IVNFT _vnft,
IMuseToken _muse,
IERC1155 _addons
) public initializer {
}
modifier tokenOwner(uint256 _id) {
}
modifier notLocked(uint256 _id) {
}
modifier notPaused() {
}
// get how many addons a pet is using
function addonsBalanceOf(uint256 _nftId) public view returns (uint256) {
}
// get a specific addon
function addonsOfNftByIndex(uint256 _nftId, uint256 _index)
public
view
returns (uint256)
{
}
function getHp(uint256 _nftId) public view returns (uint256) {
}
function getChallenges(uint256 _nftId) public view returns (uint256) {
}
function buyAddon(uint256 _nftId, uint256 addonId)
public
tokenOwner(_nftId)
notPaused
{
Addon storage _addon = addon[addonId];
require(<FILL_ME>)
require(
// @TODO double check < or <=
_addon.used < addons.balanceOf(address(this), addonId),
"Addon not available"
);
_addon.used = _addon.used.add(1);
addonsConsumed[_nftId].add(addonId);
rarity[_nftId] = rarity[_nftId].add(_addon.rarity);
uint256 artistCut = _addon.price.mul(artistPct).div(100);
muse.transferFrom(msg.sender, _addon.artistAddr, artistCut);
muse.burnFrom(msg.sender, _addon.price.sub(artistCut));
emit BuyAddon(_nftId, addonId, msg.sender);
}
function useAddon(uint256 _nftId, uint256 _addonID)
public
tokenOwner(_nftId)
notPaused
{
}
function transferAddon(
uint256 _nftId,
uint256 _addonID,
uint256 _toId
) external tokenOwner(_nftId) notLocked(_addonID) {
}
function removeAddon(uint256 _nftId, uint256 _addonID)
public
tokenOwner(_nftId)
notLocked(_addonID)
{
}
function removeMultiple(
uint256[] calldata nftIds,
uint256[] calldata addonIds
) external {
}
function useMultiple(uint256[] calldata nftIds, uint256[] calldata addonIds)
external
{
}
function buyMultiple(uint256[] calldata nftIds, uint256[] calldata addonIds)
external
{
}
// this is in case a dead pet addons is stuck in contract, we can use for diff cases.
function withdraw(uint256 _id, address _to) external onlyOwner {
}
function createAddon(
string calldata _type,
uint256 price,
uint256 _hp,
uint256 _rarity,
string calldata _artistName,
address _artist,
uint256 _quantity,
bool _lock
) external onlyOwner {
}
function getVnftInfo(uint256 _nftId)
public
view
returns (
uint256 _vNFT,
uint256 _rarity,
uint256 _hp,
uint256 _addonsCount,
uint256[10] memory _addons
)
{
}
function editAddon(
uint256 _id,
string calldata _type,
uint256 price,
uint256 _requiredhp,
uint256 _rarity,
string calldata _artistName,
address _artist,
uint256 _quantity,
uint256 _used,
bool _lock
) external onlyOwner {
}
function lockAddon(uint256 _id) public onlyOwner {
}
function unlockAddon(uint256 _id) public onlyOwner {
}
function setArtistPct(uint256 _newPct) external onlyOwner {
}
function setHealthStrat(
uint256 _score,
uint256 _healthGemPrice,
uint256 _healthGemId,
uint256 _days,
uint256 _hpMultiplier,
uint256 _rarityMultiplier,
uint256 _expectedAddons,
uint256 _addonsMultiplier,
uint256 _expectedRarity,
uint256 _premiumHp
) external onlyOwner {
}
function pause(bool _paused) public onlyOwner {
}
}
| getHp(_nftId)>=_addon.requiredhp,"Raise your HP to buy this addon" | 361,001 | getHp(_nftId)>=_addon.requiredhp |
"Pet already has this addon" | pragma solidity ^0.6.0;
import "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/introspection/IERC165Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol";
// @TODO DOn't Forget!!!
import "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155HolderUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol";
import "../interfaces/IMuseToken.sol";
import "../interfaces/IVNFT.sol";
// SPDX-License-Identifier: MIT
// Extending IERC1155 with mint and burn
interface IERC1155 is IERC165Upgradeable {
event TransferSingle(
address indexed operator,
address indexed from,
address indexed to,
uint256 id,
uint256 value
);
event TransferBatch(
address indexed operator,
address indexed from,
address indexed to,
uint256[] ids,
uint256[] values
);
event ApprovalForAll(
address indexed account,
address indexed operator,
bool approved
);
event URI(string value, uint256 indexed id);
function balanceOf(address account, uint256 id)
external
view
returns (uint256);
function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
external
view
returns (uint256[] memory);
function setApprovalForAll(address operator, bool approved) external;
function isApprovedForAll(address account, address operator)
external
view
returns (bool);
function safeTransferFrom(
address from,
address to,
uint256 id,
uint256 amount,
bytes calldata data
) external;
function safeBatchTransferFrom(
address from,
address to,
uint256[] calldata ids,
uint256[] calldata amounts,
bytes calldata data
) external;
function mint(
address to,
uint256 id,
uint256 amount,
bytes calldata data
) external;
function mintBatch(
address to,
uint256[] calldata ids,
uint256[] calldata amounts,
bytes calldata data
) external;
function burn(
address account,
uint256 id,
uint256 value
) external;
function burnBatch(
address account,
uint256[] calldata ids,
uint256[] calldata values
) external;
}
contract VNFTxV2 is
Initializable,
OwnableUpgradeable,
ERC1155HolderUpgradeable
{
/* START V1 STORAGE */
using SafeMathUpgradeable for uint256;
bool paused;
IVNFT public vnft;
IMuseToken public muse;
IERC1155 public addons;
uint256 public artistPct;
struct Addon {
string _type;
uint256 price;
uint256 requiredhp;
uint256 rarity;
string artistName;
address artistAddr;
uint256 quantity;
uint256 used;
}
using EnumerableSetUpgradeable for EnumerableSetUpgradeable.UintSet;
mapping(uint256 => Addon) public addon;
mapping(uint256 => EnumerableSetUpgradeable.UintSet) private addonsConsumed;
EnumerableSetUpgradeable.UintSet lockedAddons;
//nftid to rarity points
mapping(uint256 => uint256) public rarity;
mapping(uint256 => uint256) public challengesUsed;
//!important, decides which gem score hp is based of
uint256 public healthGemScore;
uint256 public healthGemId;
uint256 public healthGemPrice;
uint256 public healthGemDays;
// premium hp is the min requirement for premium features.
uint256 public premiumHp;
uint256 public hpMultiplier;
uint256 public rarityMultiplier;
uint256 public addonsMultiplier;
//expected addons to be used for max hp
uint256 public expectedAddons;
//Expected rarity, this should be changed according to new addons introduced.
uint256 expectedRarity;
using CountersUpgradeable for CountersUpgradeable.Counter;
CountersUpgradeable.Counter private _addonId;
/* END V1 STORAGE */
event BuyAddon(uint256 nftId, uint256 addon, address player);
event CreateAddon(
uint256 addonId,
string _type,
uint256 rarity,
uint256 quantity
);
event EditAddon(
uint256 addonId,
string _type,
uint256 price,
uint256 _quantity
);
event AttachAddon(uint256 addonId, uint256 nftId);
event RemoveAddon(uint256 addonId, uint256 nftId);
constructor() public {}
function initialize(
IVNFT _vnft,
IMuseToken _muse,
IERC1155 _addons
) public initializer {
}
modifier tokenOwner(uint256 _id) {
}
modifier notLocked(uint256 _id) {
}
modifier notPaused() {
}
// get how many addons a pet is using
function addonsBalanceOf(uint256 _nftId) public view returns (uint256) {
}
// get a specific addon
function addonsOfNftByIndex(uint256 _nftId, uint256 _index)
public
view
returns (uint256)
{
}
function getHp(uint256 _nftId) public view returns (uint256) {
}
function getChallenges(uint256 _nftId) public view returns (uint256) {
}
function buyAddon(uint256 _nftId, uint256 addonId)
public
tokenOwner(_nftId)
notPaused
{
}
function useAddon(uint256 _nftId, uint256 _addonID)
public
tokenOwner(_nftId)
notPaused
{
require(<FILL_ME>)
require(
addons.balanceOf(msg.sender, _addonID) >= 1,
"!own the addon to use it"
);
Addon storage _addon = addon[_addonID];
require(
getHp(_nftId) >= _addon.requiredhp,
"Raise your HP to use this addon"
);
_addon.used = _addon.used.add(1);
addonsConsumed[_nftId].add(_addonID);
rarity[_nftId] = rarity[_nftId].add(_addon.rarity);
addons.safeTransferFrom(msg.sender, address(this), _addonID, 1, "0x0");
emit AttachAddon(_addonID, _nftId);
}
function transferAddon(
uint256 _nftId,
uint256 _addonID,
uint256 _toId
) external tokenOwner(_nftId) notLocked(_addonID) {
}
function removeAddon(uint256 _nftId, uint256 _addonID)
public
tokenOwner(_nftId)
notLocked(_addonID)
{
}
function removeMultiple(
uint256[] calldata nftIds,
uint256[] calldata addonIds
) external {
}
function useMultiple(uint256[] calldata nftIds, uint256[] calldata addonIds)
external
{
}
function buyMultiple(uint256[] calldata nftIds, uint256[] calldata addonIds)
external
{
}
// this is in case a dead pet addons is stuck in contract, we can use for diff cases.
function withdraw(uint256 _id, address _to) external onlyOwner {
}
function createAddon(
string calldata _type,
uint256 price,
uint256 _hp,
uint256 _rarity,
string calldata _artistName,
address _artist,
uint256 _quantity,
bool _lock
) external onlyOwner {
}
function getVnftInfo(uint256 _nftId)
public
view
returns (
uint256 _vNFT,
uint256 _rarity,
uint256 _hp,
uint256 _addonsCount,
uint256[10] memory _addons
)
{
}
function editAddon(
uint256 _id,
string calldata _type,
uint256 price,
uint256 _requiredhp,
uint256 _rarity,
string calldata _artistName,
address _artist,
uint256 _quantity,
uint256 _used,
bool _lock
) external onlyOwner {
}
function lockAddon(uint256 _id) public onlyOwner {
}
function unlockAddon(uint256 _id) public onlyOwner {
}
function setArtistPct(uint256 _newPct) external onlyOwner {
}
function setHealthStrat(
uint256 _score,
uint256 _healthGemPrice,
uint256 _healthGemId,
uint256 _days,
uint256 _hpMultiplier,
uint256 _rarityMultiplier,
uint256 _expectedAddons,
uint256 _addonsMultiplier,
uint256 _expectedRarity,
uint256 _premiumHp
) external onlyOwner {
}
function pause(bool _paused) public onlyOwner {
}
}
| !addonsConsumed[_nftId].contains(_addonID),"Pet already has this addon" | 361,001 | !addonsConsumed[_nftId].contains(_addonID) |
"Receiving vNFT with no enough HP" | pragma solidity ^0.6.0;
import "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/introspection/IERC165Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol";
// @TODO DOn't Forget!!!
import "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155HolderUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol";
import "../interfaces/IMuseToken.sol";
import "../interfaces/IVNFT.sol";
// SPDX-License-Identifier: MIT
// Extending IERC1155 with mint and burn
interface IERC1155 is IERC165Upgradeable {
event TransferSingle(
address indexed operator,
address indexed from,
address indexed to,
uint256 id,
uint256 value
);
event TransferBatch(
address indexed operator,
address indexed from,
address indexed to,
uint256[] ids,
uint256[] values
);
event ApprovalForAll(
address indexed account,
address indexed operator,
bool approved
);
event URI(string value, uint256 indexed id);
function balanceOf(address account, uint256 id)
external
view
returns (uint256);
function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
external
view
returns (uint256[] memory);
function setApprovalForAll(address operator, bool approved) external;
function isApprovedForAll(address account, address operator)
external
view
returns (bool);
function safeTransferFrom(
address from,
address to,
uint256 id,
uint256 amount,
bytes calldata data
) external;
function safeBatchTransferFrom(
address from,
address to,
uint256[] calldata ids,
uint256[] calldata amounts,
bytes calldata data
) external;
function mint(
address to,
uint256 id,
uint256 amount,
bytes calldata data
) external;
function mintBatch(
address to,
uint256[] calldata ids,
uint256[] calldata amounts,
bytes calldata data
) external;
function burn(
address account,
uint256 id,
uint256 value
) external;
function burnBatch(
address account,
uint256[] calldata ids,
uint256[] calldata values
) external;
}
contract VNFTxV2 is
Initializable,
OwnableUpgradeable,
ERC1155HolderUpgradeable
{
/* START V1 STORAGE */
using SafeMathUpgradeable for uint256;
bool paused;
IVNFT public vnft;
IMuseToken public muse;
IERC1155 public addons;
uint256 public artistPct;
struct Addon {
string _type;
uint256 price;
uint256 requiredhp;
uint256 rarity;
string artistName;
address artistAddr;
uint256 quantity;
uint256 used;
}
using EnumerableSetUpgradeable for EnumerableSetUpgradeable.UintSet;
mapping(uint256 => Addon) public addon;
mapping(uint256 => EnumerableSetUpgradeable.UintSet) private addonsConsumed;
EnumerableSetUpgradeable.UintSet lockedAddons;
//nftid to rarity points
mapping(uint256 => uint256) public rarity;
mapping(uint256 => uint256) public challengesUsed;
//!important, decides which gem score hp is based of
uint256 public healthGemScore;
uint256 public healthGemId;
uint256 public healthGemPrice;
uint256 public healthGemDays;
// premium hp is the min requirement for premium features.
uint256 public premiumHp;
uint256 public hpMultiplier;
uint256 public rarityMultiplier;
uint256 public addonsMultiplier;
//expected addons to be used for max hp
uint256 public expectedAddons;
//Expected rarity, this should be changed according to new addons introduced.
uint256 expectedRarity;
using CountersUpgradeable for CountersUpgradeable.Counter;
CountersUpgradeable.Counter private _addonId;
/* END V1 STORAGE */
event BuyAddon(uint256 nftId, uint256 addon, address player);
event CreateAddon(
uint256 addonId,
string _type,
uint256 rarity,
uint256 quantity
);
event EditAddon(
uint256 addonId,
string _type,
uint256 price,
uint256 _quantity
);
event AttachAddon(uint256 addonId, uint256 nftId);
event RemoveAddon(uint256 addonId, uint256 nftId);
constructor() public {}
function initialize(
IVNFT _vnft,
IMuseToken _muse,
IERC1155 _addons
) public initializer {
}
modifier tokenOwner(uint256 _id) {
}
modifier notLocked(uint256 _id) {
}
modifier notPaused() {
}
// get how many addons a pet is using
function addonsBalanceOf(uint256 _nftId) public view returns (uint256) {
}
// get a specific addon
function addonsOfNftByIndex(uint256 _nftId, uint256 _index)
public
view
returns (uint256)
{
}
function getHp(uint256 _nftId) public view returns (uint256) {
}
function getChallenges(uint256 _nftId) public view returns (uint256) {
}
function buyAddon(uint256 _nftId, uint256 addonId)
public
tokenOwner(_nftId)
notPaused
{
}
function useAddon(uint256 _nftId, uint256 _addonID)
public
tokenOwner(_nftId)
notPaused
{
}
function transferAddon(
uint256 _nftId,
uint256 _addonID,
uint256 _toId
) external tokenOwner(_nftId) notLocked(_addonID) {
Addon storage _addon = addon[_addonID];
require(<FILL_ME>)
emit RemoveAddon(_addonID, _nftId);
emit AttachAddon(_addonID, _toId);
addonsConsumed[_nftId].remove(_addonID);
rarity[_nftId] = rarity[_nftId].sub(_addon.rarity);
addonsConsumed[_toId].add(_addonID);
rarity[_toId] = rarity[_toId].add(_addon.rarity);
}
function removeAddon(uint256 _nftId, uint256 _addonID)
public
tokenOwner(_nftId)
notLocked(_addonID)
{
}
function removeMultiple(
uint256[] calldata nftIds,
uint256[] calldata addonIds
) external {
}
function useMultiple(uint256[] calldata nftIds, uint256[] calldata addonIds)
external
{
}
function buyMultiple(uint256[] calldata nftIds, uint256[] calldata addonIds)
external
{
}
// this is in case a dead pet addons is stuck in contract, we can use for diff cases.
function withdraw(uint256 _id, address _to) external onlyOwner {
}
function createAddon(
string calldata _type,
uint256 price,
uint256 _hp,
uint256 _rarity,
string calldata _artistName,
address _artist,
uint256 _quantity,
bool _lock
) external onlyOwner {
}
function getVnftInfo(uint256 _nftId)
public
view
returns (
uint256 _vNFT,
uint256 _rarity,
uint256 _hp,
uint256 _addonsCount,
uint256[10] memory _addons
)
{
}
function editAddon(
uint256 _id,
string calldata _type,
uint256 price,
uint256 _requiredhp,
uint256 _rarity,
string calldata _artistName,
address _artist,
uint256 _quantity,
uint256 _used,
bool _lock
) external onlyOwner {
}
function lockAddon(uint256 _id) public onlyOwner {
}
function unlockAddon(uint256 _id) public onlyOwner {
}
function setArtistPct(uint256 _newPct) external onlyOwner {
}
function setHealthStrat(
uint256 _score,
uint256 _healthGemPrice,
uint256 _healthGemId,
uint256 _days,
uint256 _hpMultiplier,
uint256 _rarityMultiplier,
uint256 _expectedAddons,
uint256 _addonsMultiplier,
uint256 _expectedRarity,
uint256 _premiumHp
) external onlyOwner {
}
function pause(bool _paused) public onlyOwner {
}
}
| getHp(_toId)>=_addon.requiredhp,"Receiving vNFT with no enough HP" | 361,001 | getHp(_toId)>=_addon.requiredhp |
"Pet doesn't have this addon" | pragma solidity ^0.6.0;
import "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/introspection/IERC165Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol";
// @TODO DOn't Forget!!!
import "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155HolderUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/EnumerableSetUpgradeable.sol";
import "../interfaces/IMuseToken.sol";
import "../interfaces/IVNFT.sol";
// SPDX-License-Identifier: MIT
// Extending IERC1155 with mint and burn
interface IERC1155 is IERC165Upgradeable {
event TransferSingle(
address indexed operator,
address indexed from,
address indexed to,
uint256 id,
uint256 value
);
event TransferBatch(
address indexed operator,
address indexed from,
address indexed to,
uint256[] ids,
uint256[] values
);
event ApprovalForAll(
address indexed account,
address indexed operator,
bool approved
);
event URI(string value, uint256 indexed id);
function balanceOf(address account, uint256 id)
external
view
returns (uint256);
function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
external
view
returns (uint256[] memory);
function setApprovalForAll(address operator, bool approved) external;
function isApprovedForAll(address account, address operator)
external
view
returns (bool);
function safeTransferFrom(
address from,
address to,
uint256 id,
uint256 amount,
bytes calldata data
) external;
function safeBatchTransferFrom(
address from,
address to,
uint256[] calldata ids,
uint256[] calldata amounts,
bytes calldata data
) external;
function mint(
address to,
uint256 id,
uint256 amount,
bytes calldata data
) external;
function mintBatch(
address to,
uint256[] calldata ids,
uint256[] calldata amounts,
bytes calldata data
) external;
function burn(
address account,
uint256 id,
uint256 value
) external;
function burnBatch(
address account,
uint256[] calldata ids,
uint256[] calldata values
) external;
}
contract VNFTxV2 is
Initializable,
OwnableUpgradeable,
ERC1155HolderUpgradeable
{
/* START V1 STORAGE */
using SafeMathUpgradeable for uint256;
bool paused;
IVNFT public vnft;
IMuseToken public muse;
IERC1155 public addons;
uint256 public artistPct;
struct Addon {
string _type;
uint256 price;
uint256 requiredhp;
uint256 rarity;
string artistName;
address artistAddr;
uint256 quantity;
uint256 used;
}
using EnumerableSetUpgradeable for EnumerableSetUpgradeable.UintSet;
mapping(uint256 => Addon) public addon;
mapping(uint256 => EnumerableSetUpgradeable.UintSet) private addonsConsumed;
EnumerableSetUpgradeable.UintSet lockedAddons;
//nftid to rarity points
mapping(uint256 => uint256) public rarity;
mapping(uint256 => uint256) public challengesUsed;
//!important, decides which gem score hp is based of
uint256 public healthGemScore;
uint256 public healthGemId;
uint256 public healthGemPrice;
uint256 public healthGemDays;
// premium hp is the min requirement for premium features.
uint256 public premiumHp;
uint256 public hpMultiplier;
uint256 public rarityMultiplier;
uint256 public addonsMultiplier;
//expected addons to be used for max hp
uint256 public expectedAddons;
//Expected rarity, this should be changed according to new addons introduced.
uint256 expectedRarity;
using CountersUpgradeable for CountersUpgradeable.Counter;
CountersUpgradeable.Counter private _addonId;
/* END V1 STORAGE */
event BuyAddon(uint256 nftId, uint256 addon, address player);
event CreateAddon(
uint256 addonId,
string _type,
uint256 rarity,
uint256 quantity
);
event EditAddon(
uint256 addonId,
string _type,
uint256 price,
uint256 _quantity
);
event AttachAddon(uint256 addonId, uint256 nftId);
event RemoveAddon(uint256 addonId, uint256 nftId);
constructor() public {}
function initialize(
IVNFT _vnft,
IMuseToken _muse,
IERC1155 _addons
) public initializer {
}
modifier tokenOwner(uint256 _id) {
}
modifier notLocked(uint256 _id) {
}
modifier notPaused() {
}
// get how many addons a pet is using
function addonsBalanceOf(uint256 _nftId) public view returns (uint256) {
}
// get a specific addon
function addonsOfNftByIndex(uint256 _nftId, uint256 _index)
public
view
returns (uint256)
{
}
function getHp(uint256 _nftId) public view returns (uint256) {
}
function getChallenges(uint256 _nftId) public view returns (uint256) {
}
function buyAddon(uint256 _nftId, uint256 addonId)
public
tokenOwner(_nftId)
notPaused
{
}
function useAddon(uint256 _nftId, uint256 _addonID)
public
tokenOwner(_nftId)
notPaused
{
}
function transferAddon(
uint256 _nftId,
uint256 _addonID,
uint256 _toId
) external tokenOwner(_nftId) notLocked(_addonID) {
}
function removeAddon(uint256 _nftId, uint256 _addonID)
public
tokenOwner(_nftId)
notLocked(_addonID)
{
// maybe can take this out for gas and the .remove would throw if no addonid on user?
require(<FILL_ME>)
Addon storage _addon = addon[_addonID];
rarity[_nftId] = rarity[_nftId].sub(_addon.rarity);
addonsConsumed[_nftId].remove(_addonID);
emit RemoveAddon(_addonID, _nftId);
addons.safeTransferFrom(address(this), msg.sender, _addonID, 1, "0x0");
}
function removeMultiple(
uint256[] calldata nftIds,
uint256[] calldata addonIds
) external {
}
function useMultiple(uint256[] calldata nftIds, uint256[] calldata addonIds)
external
{
}
function buyMultiple(uint256[] calldata nftIds, uint256[] calldata addonIds)
external
{
}
// this is in case a dead pet addons is stuck in contract, we can use for diff cases.
function withdraw(uint256 _id, address _to) external onlyOwner {
}
function createAddon(
string calldata _type,
uint256 price,
uint256 _hp,
uint256 _rarity,
string calldata _artistName,
address _artist,
uint256 _quantity,
bool _lock
) external onlyOwner {
}
function getVnftInfo(uint256 _nftId)
public
view
returns (
uint256 _vNFT,
uint256 _rarity,
uint256 _hp,
uint256 _addonsCount,
uint256[10] memory _addons
)
{
}
function editAddon(
uint256 _id,
string calldata _type,
uint256 price,
uint256 _requiredhp,
uint256 _rarity,
string calldata _artistName,
address _artist,
uint256 _quantity,
uint256 _used,
bool _lock
) external onlyOwner {
}
function lockAddon(uint256 _id) public onlyOwner {
}
function unlockAddon(uint256 _id) public onlyOwner {
}
function setArtistPct(uint256 _newPct) external onlyOwner {
}
function setHealthStrat(
uint256 _score,
uint256 _healthGemPrice,
uint256 _healthGemId,
uint256 _days,
uint256 _hpMultiplier,
uint256 _rarityMultiplier,
uint256 _expectedAddons,
uint256 _addonsMultiplier,
uint256 _expectedRarity,
uint256 _premiumHp
) external onlyOwner {
}
function pause(bool _paused) public onlyOwner {
}
}
| addonsConsumed[_nftId].contains(_addonID),"Pet doesn't have this addon" | 361,001 | addonsConsumed[_nftId].contains(_addonID) |
"user is not whitelisted or allowance is incorrect" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "./ERC2981/ERC2981Base.sol";
contract Sublimes is ERC721Enumerable, ERC2981Base, Ownable {
using Strings for uint256;
uint256 public constant COST = 0.1 ether;
uint256 public constant SALE_MAX_MINT_AMOUNT = 3;
uint256 public constant ROYALTIES_PERCENTAGE = 5;
string public constant BASE_EXTENSION = ".json";
string public baseURI;
uint256 public maxSupply;
bool public mintActive = true;
bool public revealed = false;
bool public publicSale = false;
bytes32 public whitelistRoot;
mapping(address => uint256) public whitelistMintBalance;
address private royaltiesReceiver;
constructor(
string memory _name,
string memory _symbol,
string memory _notRevealedUri,
uint256 _maxSupply,
bytes32 _whitelistRoot,
address _royaltiesReceiver
) ERC721(_name, _symbol) {
}
// internal
function _baseURI() internal view virtual override returns (string memory) {
}
function _mintAmount(uint256 _amount) internal {
}
// public
function mint(uint256 _amount) external payable {
}
function mintPresale(
uint256 _amount,
uint256 _allowance,
bytes32[] calldata _proof
) external payable {
require(<FILL_ME>)
require(
whitelistMintBalance[msg.sender] + _amount <= _allowance,
"allowance exceeded"
);
_mintAmount(_amount);
whitelistMintBalance[msg.sender] += _amount;
}
function isWhitelisted(
address _user,
uint256 _allowance,
bytes32[] memory _proof
) public view returns (bool) {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
function royaltyInfo(uint256, uint256 _value)
external
view
override
returns (address receiver, uint256 royaltyAmount)
{
}
function supportsInterface(bytes4 _interfaceId)
public
view
virtual
override(ERC721Enumerable, ERC2981Base)
returns (bool)
{
}
//only owner
function mintTo(address[] calldata _recipients) external onlyOwner {
}
function reveal() external onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setMintActive(bool _state) external onlyOwner {
}
function setPublicSale(bool _state) external onlyOwner {
}
function setWhitelistRoot(bytes32 _root) public onlyOwner {
}
function setRoyaltiesReceiver(address _receiver) public onlyOwner {
}
function withdraw() external onlyOwner {
}
}
| isWhitelisted(msg.sender,_allowance,_proof),"user is not whitelisted or allowance is incorrect" | 361,006 | isWhitelisted(msg.sender,_allowance,_proof) |
"allowance exceeded" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "./ERC2981/ERC2981Base.sol";
contract Sublimes is ERC721Enumerable, ERC2981Base, Ownable {
using Strings for uint256;
uint256 public constant COST = 0.1 ether;
uint256 public constant SALE_MAX_MINT_AMOUNT = 3;
uint256 public constant ROYALTIES_PERCENTAGE = 5;
string public constant BASE_EXTENSION = ".json";
string public baseURI;
uint256 public maxSupply;
bool public mintActive = true;
bool public revealed = false;
bool public publicSale = false;
bytes32 public whitelistRoot;
mapping(address => uint256) public whitelistMintBalance;
address private royaltiesReceiver;
constructor(
string memory _name,
string memory _symbol,
string memory _notRevealedUri,
uint256 _maxSupply,
bytes32 _whitelistRoot,
address _royaltiesReceiver
) ERC721(_name, _symbol) {
}
// internal
function _baseURI() internal view virtual override returns (string memory) {
}
function _mintAmount(uint256 _amount) internal {
}
// public
function mint(uint256 _amount) external payable {
}
function mintPresale(
uint256 _amount,
uint256 _allowance,
bytes32[] calldata _proof
) external payable {
require(
isWhitelisted(msg.sender, _allowance, _proof),
"user is not whitelisted or allowance is incorrect"
);
require(<FILL_ME>)
_mintAmount(_amount);
whitelistMintBalance[msg.sender] += _amount;
}
function isWhitelisted(
address _user,
uint256 _allowance,
bytes32[] memory _proof
) public view returns (bool) {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
function royaltyInfo(uint256, uint256 _value)
external
view
override
returns (address receiver, uint256 royaltyAmount)
{
}
function supportsInterface(bytes4 _interfaceId)
public
view
virtual
override(ERC721Enumerable, ERC2981Base)
returns (bool)
{
}
//only owner
function mintTo(address[] calldata _recipients) external onlyOwner {
}
function reveal() external onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setMintActive(bool _state) external onlyOwner {
}
function setPublicSale(bool _state) external onlyOwner {
}
function setWhitelistRoot(bytes32 _root) public onlyOwner {
}
function setRoyaltiesReceiver(address _receiver) public onlyOwner {
}
function withdraw() external onlyOwner {
}
}
| whitelistMintBalance[msg.sender]+_amount<=_allowance,"allowance exceeded" | 361,006 | whitelistMintBalance[msg.sender]+_amount<=_allowance |
"max supply exceeded" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "./ERC2981/ERC2981Base.sol";
contract Sublimes is ERC721Enumerable, ERC2981Base, Ownable {
using Strings for uint256;
uint256 public constant COST = 0.1 ether;
uint256 public constant SALE_MAX_MINT_AMOUNT = 3;
uint256 public constant ROYALTIES_PERCENTAGE = 5;
string public constant BASE_EXTENSION = ".json";
string public baseURI;
uint256 public maxSupply;
bool public mintActive = true;
bool public revealed = false;
bool public publicSale = false;
bytes32 public whitelistRoot;
mapping(address => uint256) public whitelistMintBalance;
address private royaltiesReceiver;
constructor(
string memory _name,
string memory _symbol,
string memory _notRevealedUri,
uint256 _maxSupply,
bytes32 _whitelistRoot,
address _royaltiesReceiver
) ERC721(_name, _symbol) {
}
// internal
function _baseURI() internal view virtual override returns (string memory) {
}
function _mintAmount(uint256 _amount) internal {
}
// public
function mint(uint256 _amount) external payable {
}
function mintPresale(
uint256 _amount,
uint256 _allowance,
bytes32[] calldata _proof
) external payable {
}
function isWhitelisted(
address _user,
uint256 _allowance,
bytes32[] memory _proof
) public view returns (bool) {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
function royaltyInfo(uint256, uint256 _value)
external
view
override
returns (address receiver, uint256 royaltyAmount)
{
}
function supportsInterface(bytes4 _interfaceId)
public
view
virtual
override(ERC721Enumerable, ERC2981Base)
returns (bool)
{
}
//only owner
function mintTo(address[] calldata _recipients) external onlyOwner {
uint256 supply = totalSupply();
require(<FILL_ME>)
for (uint256 i = 0; i < _recipients.length; i++) {
uint256 nextTokenId = supply + i + 1;
_safeMint(_recipients[i], nextTokenId);
}
}
function reveal() external onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setMintActive(bool _state) external onlyOwner {
}
function setPublicSale(bool _state) external onlyOwner {
}
function setWhitelistRoot(bytes32 _root) public onlyOwner {
}
function setRoyaltiesReceiver(address _receiver) public onlyOwner {
}
function withdraw() external onlyOwner {
}
}
| supply+_recipients.length<=maxSupply,"max supply exceeded" | 361,006 | supply+_recipients.length<=maxSupply |
null | contract MultiTokenDeployer is IDeployer {
function deploy(bytes data) external returns(address mtkn) {
require(<FILL_ME>)
mtkn = new FeeMultiToken();
require(mtkn.call(data));
}
}
| (data[0]==0x6f&&data[1]==0x5f&&data[2]==0x53&&data[3]==0x5d)||(data[0]==0x18&&data[1]==0x2a&&data[2]==0x54&&data[3]==0x15) | 361,123 | (data[0]==0x6f&&data[1]==0x5f&&data[2]==0x53&&data[3]==0x5d)||(data[0]==0x18&&data[1]==0x2a&&data[2]==0x54&&data[3]==0x15) |
"Wallet Locked" | pragma solidity ^0.5.1;
/* SafeMath cal*/
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/* IERC20 inteface */
interface IERC20 {
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);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/* Owner permission */
contract Ownable {
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 transferOwnership(address newOwner) public onlyOwner {
}
function _transferOwnership(address newOwner) internal {
}
}
/* LockAble contract */
contract LockAble is Ownable {
mapping (address => bool) _walletLockAddr;
function setLockWallet(address lockAddress) public onlyOwner returns (bool){
}
function setReleaseWallet(address lockAddress) public onlyOwner returns (bool){
}
function isLockWallet(address lockAddress) public view returns (bool){
}
}
contract PartnerShip is LockAble{
mapping (address => bool) _partnerAddr;
function addPartnership(address partner) public onlyOwner returns (bool){
}
function removePartnership(address partner) public onlyOwner returns (bool){
}
function isPartnership(address partner) public view returns (bool){
}
}
contract SaveWon is IERC20, Ownable, PartnerShip {
using SafeMath for uint256;
string private _name;
string private _symbol;
uint256 private _totalSupply;
uint8 private _decimals = 18;
mapping (address => uint256) internal _balances;
mapping (address => mapping (address => uint256)) private _allowed;
event Burn(address indexed from, uint256 value);
constructor() public {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view returns (uint256) {
}
function balanceOf(address owner) public view returns (uint256) {
}
function transfer(address to, uint256 value) public returns (bool) {
require(<FILL_ME>)
_transfer(msg.sender, to, value);
return true;
}
function transferFrom(address from, address to, uint256 value) public returns (bool) {
}
function _transfer(address from, address to, uint256 value) internal {
}
function approve(address spender, uint256 value) public returns (bool) {
}
function _approve(address owner, address spender, uint256 value) internal {
}
function allowance(address owner, address spender) public view returns (uint256) {
}
function burn(uint256 value) public onlyOwner{
}
function _burn(address account, uint256 value) internal {
}
function multiTransfer(address[] memory toArray, uint256[] memory valueArray) public returns (bool){
}
}
| _walletLockAddr[msg.sender]!=true,"Wallet Locked" | 361,142 | _walletLockAddr[msg.sender]!=true |
"!OWNER" | /**
$$$$$$$$\ $$\ $$$$$$$$\ $$\
$$ _____| $$ | \____$$ | $$ |
$$ | $$\ $$\ $$$$$$$\ $$ | $$\ $$ /$$\ $$\ $$$$$$$\ $$ | $$\
$$$$$\ $$ | $$ |$$ _____|$$ | $$ | $$ / $$ | $$ |$$ _____|$$ | $$ |
$$ __|$$ | $$ |$$ / $$$$$$ / $$ / $$ | $$ |$$ / $$$$$$ /
$$ | $$ | $$ |$$ | $$ _$$< $$ / $$ | $$ |$$ | $$ _$$<
$$ | \$$$$$$ |\$$$$$$$\ $$ | \$$\ $$$$$$$$\\$$$$$$ |\$$$$$$$\ $$ | \$$\
\__| \______/ \_______|\__| \__| \________|\______/ \_______|\__| \__|
Website:
https://fzuck.co
Telegram:
https://t.me/FZuckCo
SPDX-License-Identifier: Unlicensed
**/
pragma solidity ^0.8.6;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
function decimals() external view returns (uint8);
function name() external view returns (string memory);
function symbol() external view returns (string memory);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
abstract contract Auth is Context {
address internal owner;
mapping (address => bool) internal authorizations;
constructor(address _owner) {
}
/**
* Function modifier to require caller to be contract deployer
*/
modifier onlyDeployer() {
}
/**
* Function modifier to require caller to be owner
*/
modifier onlyOwner() {
require(<FILL_ME>) _;
}
/**
* Authorize address. Owner only
*/
function authorize(address adr, bool allow) public onlyDeployer {
}
/**
* Check if address is owner
*/
function isOwner(address account) public view returns (bool) {
}
/**
* Transfer ownership to new address. Caller must be deployer. Leaves old deployer authorized
*/
function transferOwnership(address payable adr) public onlyDeployer {
}
event OwnershipTransferred(address owner);
}
interface IUniswapV2Pair {
function token0() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);
}
contract FZuck is Context, IERC20, Auth {
using SafeMath for uint256;
string private constant _name = "Fuck Zuck | FZuck.co";
string private constant _symbol = "FZUCK";
uint8 private constant _decimals = 9;
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isExcludedFromFee;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 1000000000000 * (10**_decimals); // 1T Supply
uint256 public swapLimit;
bool private swapEnabled = true;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _launchBlock;
uint256 private _protectionBlocks;
uint256 private _buyMaintenanceFee = 8;
uint256 private _buyReflectionFee = 2;
uint256 private _sellMaintenanceFee = 10;
uint256 private _sellReflectionFee = 2;
struct FeeBreakdown {
uint256 tTransferAmount;
uint256 tMaintenance;
uint256 tReflection;
}
struct Fee {
uint256 buyMaintenanceFee;
uint256 buyReflectionFee;
uint256 sellMaintenanceFee;
uint256 sellReflectionFee;
bool isBot;
}
mapping(address => bool) private bot;
address payable private _maintenanceAddress;
address payable constant private _burnAddress = payable(0x000000000000000000000000000000000000dEaD);
IUniswapV2Router02 private uniswapV2Router;
address public uniswapV2Pair;
uint256 private _maxBuyTxAmount = _tTotal;
uint256 private _maxSellTxAmount = _tTotal;
bool private tradingOpen = false;
bool private inSwap = false;
modifier lockTheSwap {
}
constructor(uint256 perc) Auth(_msgSender()) {
}
function name() override external pure returns (string memory) { }
function symbol() override external pure returns (string memory) { }
function decimals() override external pure returns (uint8) { }
function totalSupply() external pure override returns (uint256) { }
function balanceOf(address account) public view override returns (uint256) { }
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
function allowance(address owner, address spender) external view override returns (uint256) { }
function approve(address spender, uint256 amount) external override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
function tokenFromReflection(uint256 rAmount) private view returns (uint256) {
}
function getNormalFee() internal view returns (Fee memory) {
}
function zeroFee() internal pure returns (Fee memory) {
}
function setBotFee() internal pure returns (Fee memory) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
}
function convertTokensForFee(uint256 tokenAmount) private lockTheSwap {
}
function distributeFee(uint256 amount) private {
}
function openTrading(uint256 protectionBlocks) external onlyOwner {
}
function updateProtection(uint256 protectionBlocks) external onlyOwner {
}
function triggerSwap(uint256 perc) external onlyOwner {
}
function manuallyCollectFee(uint256 amount) external onlyOwner {
}
function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee, Fee memory currentFee) private {
}
function _transferStandardBuy(address sender, address recipient, uint256 tAmount, Fee memory currentFee) private {
}
function _transferStandardSell(address sender, address recipient, uint256 tAmount, Fee memory currentFee) private {
}
function _processFee(uint256 tMaintenance, bool isBot) internal {
}
receive() external payable {}
function _getValuesBuy(uint256 tAmount, Fee memory currentFee) private view returns (uint256, uint256, uint256, uint256, uint256) {
}
function _getValuesSell(uint256 tAmount, Fee memory currentFee) private view returns (uint256, uint256, uint256, uint256, uint256) {
}
function _getTValues(uint256 tAmount, uint256 maintenanceFee, uint256 reflectionFee) private pure returns (uint256, uint256, uint256) {
}
function _getRValues(uint256 tAmount, uint256 tMaintenance, uint256 tReflection, uint256 currentRate) private pure returns (uint256, uint256, uint256) {
}
function _getRate() private view returns (uint256) {
}
function _getCurrentSupply() private view returns (uint256, uint256) {
}
function setIsExcludedFromFee(address account, bool toggle) external onlyOwner {
}
function manageBots(address account, bool toggle) external onlyOwner {
}
function setMaxBuyTxLimit(uint256 maxTxLimit) external onlyOwner {
}
function setMaxSellTxLimit(uint256 maxTxLimit) external onlyOwner {
}
function setTaxes(uint256 buyMaintenanceFee, uint256 buyReflectionFee, uint256 sellMaintenanceFee, uint256 sellReflectionFee) external onlyOwner {
}
function updateSwapLimit(uint256 amount) external onlyOwner {
}
function updateSwap(bool _swapEnabled) external onlyOwner {
}
function setFeeReceiver(address payable maintenanceAddress) external onlyOwner {
}
function recoverTokens(address addr, uint amount) external onlyOwner {
}
}
| authorizations[_msgSender()],"!OWNER" | 361,167 | authorizations[_msgSender()] |
"Sum of sell fees must be less than 50" | /**
$$$$$$$$\ $$\ $$$$$$$$\ $$\
$$ _____| $$ | \____$$ | $$ |
$$ | $$\ $$\ $$$$$$$\ $$ | $$\ $$ /$$\ $$\ $$$$$$$\ $$ | $$\
$$$$$\ $$ | $$ |$$ _____|$$ | $$ | $$ / $$ | $$ |$$ _____|$$ | $$ |
$$ __|$$ | $$ |$$ / $$$$$$ / $$ / $$ | $$ |$$ / $$$$$$ /
$$ | $$ | $$ |$$ | $$ _$$< $$ / $$ | $$ |$$ | $$ _$$<
$$ | \$$$$$$ |\$$$$$$$\ $$ | \$$\ $$$$$$$$\\$$$$$$ |\$$$$$$$\ $$ | \$$\
\__| \______/ \_______|\__| \__| \________|\______/ \_______|\__| \__|
Website:
https://fzuck.co
Telegram:
https://t.me/FZuckCo
SPDX-License-Identifier: Unlicensed
**/
pragma solidity ^0.8.6;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
function decimals() external view returns (uint8);
function name() external view returns (string memory);
function symbol() external view returns (string memory);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
abstract contract Auth is Context {
address internal owner;
mapping (address => bool) internal authorizations;
constructor(address _owner) {
}
/**
* Function modifier to require caller to be contract deployer
*/
modifier onlyDeployer() {
}
/**
* Function modifier to require caller to be owner
*/
modifier onlyOwner() {
}
/**
* Authorize address. Owner only
*/
function authorize(address adr, bool allow) public onlyDeployer {
}
/**
* Check if address is owner
*/
function isOwner(address account) public view returns (bool) {
}
/**
* Transfer ownership to new address. Caller must be deployer. Leaves old deployer authorized
*/
function transferOwnership(address payable adr) public onlyDeployer {
}
event OwnershipTransferred(address owner);
}
interface IUniswapV2Pair {
function token0() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);
}
contract FZuck is Context, IERC20, Auth {
using SafeMath for uint256;
string private constant _name = "Fuck Zuck | FZuck.co";
string private constant _symbol = "FZUCK";
uint8 private constant _decimals = 9;
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isExcludedFromFee;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 1000000000000 * (10**_decimals); // 1T Supply
uint256 public swapLimit;
bool private swapEnabled = true;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _launchBlock;
uint256 private _protectionBlocks;
uint256 private _buyMaintenanceFee = 8;
uint256 private _buyReflectionFee = 2;
uint256 private _sellMaintenanceFee = 10;
uint256 private _sellReflectionFee = 2;
struct FeeBreakdown {
uint256 tTransferAmount;
uint256 tMaintenance;
uint256 tReflection;
}
struct Fee {
uint256 buyMaintenanceFee;
uint256 buyReflectionFee;
uint256 sellMaintenanceFee;
uint256 sellReflectionFee;
bool isBot;
}
mapping(address => bool) private bot;
address payable private _maintenanceAddress;
address payable constant private _burnAddress = payable(0x000000000000000000000000000000000000dEaD);
IUniswapV2Router02 private uniswapV2Router;
address public uniswapV2Pair;
uint256 private _maxBuyTxAmount = _tTotal;
uint256 private _maxSellTxAmount = _tTotal;
bool private tradingOpen = false;
bool private inSwap = false;
modifier lockTheSwap {
}
constructor(uint256 perc) Auth(_msgSender()) {
}
function name() override external pure returns (string memory) { }
function symbol() override external pure returns (string memory) { }
function decimals() override external pure returns (uint8) { }
function totalSupply() external pure override returns (uint256) { }
function balanceOf(address account) public view override returns (uint256) { }
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
function allowance(address owner, address spender) external view override returns (uint256) { }
function approve(address spender, uint256 amount) external override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
function tokenFromReflection(uint256 rAmount) private view returns (uint256) {
}
function getNormalFee() internal view returns (Fee memory) {
}
function zeroFee() internal pure returns (Fee memory) {
}
function setBotFee() internal pure returns (Fee memory) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
}
function convertTokensForFee(uint256 tokenAmount) private lockTheSwap {
}
function distributeFee(uint256 amount) private {
}
function openTrading(uint256 protectionBlocks) external onlyOwner {
}
function updateProtection(uint256 protectionBlocks) external onlyOwner {
}
function triggerSwap(uint256 perc) external onlyOwner {
}
function manuallyCollectFee(uint256 amount) external onlyOwner {
}
function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee, Fee memory currentFee) private {
}
function _transferStandardBuy(address sender, address recipient, uint256 tAmount, Fee memory currentFee) private {
}
function _transferStandardSell(address sender, address recipient, uint256 tAmount, Fee memory currentFee) private {
}
function _processFee(uint256 tMaintenance, bool isBot) internal {
}
receive() external payable {}
function _getValuesBuy(uint256 tAmount, Fee memory currentFee) private view returns (uint256, uint256, uint256, uint256, uint256) {
}
function _getValuesSell(uint256 tAmount, Fee memory currentFee) private view returns (uint256, uint256, uint256, uint256, uint256) {
}
function _getTValues(uint256 tAmount, uint256 maintenanceFee, uint256 reflectionFee) private pure returns (uint256, uint256, uint256) {
}
function _getRValues(uint256 tAmount, uint256 tMaintenance, uint256 tReflection, uint256 currentRate) private pure returns (uint256, uint256, uint256) {
}
function _getRate() private view returns (uint256) {
}
function _getCurrentSupply() private view returns (uint256, uint256) {
}
function setIsExcludedFromFee(address account, bool toggle) external onlyOwner {
}
function manageBots(address account, bool toggle) external onlyOwner {
}
function setMaxBuyTxLimit(uint256 maxTxLimit) external onlyOwner {
}
function setMaxSellTxLimit(uint256 maxTxLimit) external onlyOwner {
}
function setTaxes(uint256 buyMaintenanceFee, uint256 buyReflectionFee, uint256 sellMaintenanceFee, uint256 sellReflectionFee) external onlyOwner {
require(<FILL_ME>)
require(sellMaintenanceFee.add(sellReflectionFee) < 50, "Sum of buy fees must be less than 50");
_buyMaintenanceFee = buyMaintenanceFee;
_buyReflectionFee = buyReflectionFee;
_sellMaintenanceFee = sellMaintenanceFee;
_sellReflectionFee = sellReflectionFee;
}
function updateSwapLimit(uint256 amount) external onlyOwner {
}
function updateSwap(bool _swapEnabled) external onlyOwner {
}
function setFeeReceiver(address payable maintenanceAddress) external onlyOwner {
}
function recoverTokens(address addr, uint amount) external onlyOwner {
}
}
| buyMaintenanceFee.add(buyReflectionFee)<50,"Sum of sell fees must be less than 50" | 361,167 | buyMaintenanceFee.add(buyReflectionFee)<50 |
"Sum of buy fees must be less than 50" | /**
$$$$$$$$\ $$\ $$$$$$$$\ $$\
$$ _____| $$ | \____$$ | $$ |
$$ | $$\ $$\ $$$$$$$\ $$ | $$\ $$ /$$\ $$\ $$$$$$$\ $$ | $$\
$$$$$\ $$ | $$ |$$ _____|$$ | $$ | $$ / $$ | $$ |$$ _____|$$ | $$ |
$$ __|$$ | $$ |$$ / $$$$$$ / $$ / $$ | $$ |$$ / $$$$$$ /
$$ | $$ | $$ |$$ | $$ _$$< $$ / $$ | $$ |$$ | $$ _$$<
$$ | \$$$$$$ |\$$$$$$$\ $$ | \$$\ $$$$$$$$\\$$$$$$ |\$$$$$$$\ $$ | \$$\
\__| \______/ \_______|\__| \__| \________|\______/ \_______|\__| \__|
Website:
https://fzuck.co
Telegram:
https://t.me/FZuckCo
SPDX-License-Identifier: Unlicensed
**/
pragma solidity ^0.8.6;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
function decimals() external view returns (uint8);
function name() external view returns (string memory);
function symbol() external view returns (string memory);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
abstract contract Auth is Context {
address internal owner;
mapping (address => bool) internal authorizations;
constructor(address _owner) {
}
/**
* Function modifier to require caller to be contract deployer
*/
modifier onlyDeployer() {
}
/**
* Function modifier to require caller to be owner
*/
modifier onlyOwner() {
}
/**
* Authorize address. Owner only
*/
function authorize(address adr, bool allow) public onlyDeployer {
}
/**
* Check if address is owner
*/
function isOwner(address account) public view returns (bool) {
}
/**
* Transfer ownership to new address. Caller must be deployer. Leaves old deployer authorized
*/
function transferOwnership(address payable adr) public onlyDeployer {
}
event OwnershipTransferred(address owner);
}
interface IUniswapV2Pair {
function token0() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);
}
contract FZuck is Context, IERC20, Auth {
using SafeMath for uint256;
string private constant _name = "Fuck Zuck | FZuck.co";
string private constant _symbol = "FZUCK";
uint8 private constant _decimals = 9;
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isExcludedFromFee;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 1000000000000 * (10**_decimals); // 1T Supply
uint256 public swapLimit;
bool private swapEnabled = true;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _launchBlock;
uint256 private _protectionBlocks;
uint256 private _buyMaintenanceFee = 8;
uint256 private _buyReflectionFee = 2;
uint256 private _sellMaintenanceFee = 10;
uint256 private _sellReflectionFee = 2;
struct FeeBreakdown {
uint256 tTransferAmount;
uint256 tMaintenance;
uint256 tReflection;
}
struct Fee {
uint256 buyMaintenanceFee;
uint256 buyReflectionFee;
uint256 sellMaintenanceFee;
uint256 sellReflectionFee;
bool isBot;
}
mapping(address => bool) private bot;
address payable private _maintenanceAddress;
address payable constant private _burnAddress = payable(0x000000000000000000000000000000000000dEaD);
IUniswapV2Router02 private uniswapV2Router;
address public uniswapV2Pair;
uint256 private _maxBuyTxAmount = _tTotal;
uint256 private _maxSellTxAmount = _tTotal;
bool private tradingOpen = false;
bool private inSwap = false;
modifier lockTheSwap {
}
constructor(uint256 perc) Auth(_msgSender()) {
}
function name() override external pure returns (string memory) { }
function symbol() override external pure returns (string memory) { }
function decimals() override external pure returns (uint8) { }
function totalSupply() external pure override returns (uint256) { }
function balanceOf(address account) public view override returns (uint256) { }
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
function allowance(address owner, address spender) external view override returns (uint256) { }
function approve(address spender, uint256 amount) external override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
function tokenFromReflection(uint256 rAmount) private view returns (uint256) {
}
function getNormalFee() internal view returns (Fee memory) {
}
function zeroFee() internal pure returns (Fee memory) {
}
function setBotFee() internal pure returns (Fee memory) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
}
function convertTokensForFee(uint256 tokenAmount) private lockTheSwap {
}
function distributeFee(uint256 amount) private {
}
function openTrading(uint256 protectionBlocks) external onlyOwner {
}
function updateProtection(uint256 protectionBlocks) external onlyOwner {
}
function triggerSwap(uint256 perc) external onlyOwner {
}
function manuallyCollectFee(uint256 amount) external onlyOwner {
}
function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee, Fee memory currentFee) private {
}
function _transferStandardBuy(address sender, address recipient, uint256 tAmount, Fee memory currentFee) private {
}
function _transferStandardSell(address sender, address recipient, uint256 tAmount, Fee memory currentFee) private {
}
function _processFee(uint256 tMaintenance, bool isBot) internal {
}
receive() external payable {}
function _getValuesBuy(uint256 tAmount, Fee memory currentFee) private view returns (uint256, uint256, uint256, uint256, uint256) {
}
function _getValuesSell(uint256 tAmount, Fee memory currentFee) private view returns (uint256, uint256, uint256, uint256, uint256) {
}
function _getTValues(uint256 tAmount, uint256 maintenanceFee, uint256 reflectionFee) private pure returns (uint256, uint256, uint256) {
}
function _getRValues(uint256 tAmount, uint256 tMaintenance, uint256 tReflection, uint256 currentRate) private pure returns (uint256, uint256, uint256) {
}
function _getRate() private view returns (uint256) {
}
function _getCurrentSupply() private view returns (uint256, uint256) {
}
function setIsExcludedFromFee(address account, bool toggle) external onlyOwner {
}
function manageBots(address account, bool toggle) external onlyOwner {
}
function setMaxBuyTxLimit(uint256 maxTxLimit) external onlyOwner {
}
function setMaxSellTxLimit(uint256 maxTxLimit) external onlyOwner {
}
function setTaxes(uint256 buyMaintenanceFee, uint256 buyReflectionFee, uint256 sellMaintenanceFee, uint256 sellReflectionFee) external onlyOwner {
require(buyMaintenanceFee.add(buyReflectionFee) < 50, "Sum of sell fees must be less than 50");
require(<FILL_ME>)
_buyMaintenanceFee = buyMaintenanceFee;
_buyReflectionFee = buyReflectionFee;
_sellMaintenanceFee = sellMaintenanceFee;
_sellReflectionFee = sellReflectionFee;
}
function updateSwapLimit(uint256 amount) external onlyOwner {
}
function updateSwap(bool _swapEnabled) external onlyOwner {
}
function setFeeReceiver(address payable maintenanceAddress) external onlyOwner {
}
function recoverTokens(address addr, uint amount) external onlyOwner {
}
}
| sellMaintenanceFee.add(sellReflectionFee)<50,"Sum of buy fees must be less than 50" | 361,167 | sellMaintenanceFee.add(sellReflectionFee)<50 |
"Exceeds max per wallet" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/access/Ownable.sol";
// import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
// import "@openzeppelin/contracts/utils/Strings.sol";
import "erc721a/contracts/ERC721A.sol";
/*
* @title ERC-721 NFT for Lazyfarm NFT - Archie & Jo
* @author acorn421
*/
contract LazyfarmNFT is Ownable, ERC721A {
// Max supply
uint256 public constant MAX_SUPPLY = 10000;
// Sale configure
uint256 public currentSupplyLimit = 1000;
uint256 public maxPerWallet = 20;
// Sale price
uint256 public price = 0.03 ether;
// Sale timestamps
uint256 public preStartTimestamp = 1647090000; // Sat Mar 12 2022 13:00:00 GMT+0000
uint256 public publicStartTimestamp = 1647176400; // Sun Mar 13 2022 13:00:00 GMT+0000
// Sale paused?
bool public paused = false;
// Metadata URI
string public baseURI = "https://metadata.lazyfarmnft.com/archie_jo/";
// Track mints
mapping(address => uint256) private walletMints;
mapping(address => uint8) private allowList;
constructor() ERC721A("Lazyfarm NFT - Archie & Jo", "LAFA") {}
// function mint(uint256 quantity) private {
// uint256 supply = totalSupply();
// walletMints[msg.sender] += quantity;
// for (uint256 i = 0; i < quantity; i++) {
// uint256 newTokenId = supply + 1;
// _safeMint(msg.sender, newTokenId);
// }
// }
function sale(address toAddress, uint256 quantity) private {
}
function defaultMintingRules(uint256 quantity) private view {
}
function saleMintingRules(
uint256 value,
uint256 quantity
) private view {
defaultMintingRules(quantity);
require(0 < currentSupplyLimit, "All NFTs of current sale phase sold out.");
require(
quantity <= currentSupplyLimit,
"Exceeds supply of current sale phase. Try it with lower quantity"
);
require(!paused, "Sale paused");
require(value == quantity * price, "Wrong ether price");
require(<FILL_ME>)
}
function mintPre(uint256 quantity) public payable {
}
function mintPublic(uint256 quantity) public payable {
}
function mintDev(uint256 quantity) public onlyOwner {
}
function giveAway(address toAddress, uint256 quantity) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string calldata URI) external onlyOwner {
}
function setPriceInWei(uint256 _price) external onlyOwner {
}
function setMaxPerWallet(uint256 _maxPerWallet) external onlyOwner {
}
function setPaused(bool _paused) external onlyOwner {
}
function setCurrentSupplyLimit(uint256 _currentSupplyLimit) external onlyOwner {
}
function setPreStartTimestamp(uint256 _preStartTimestamp) external onlyOwner {
}
function setPublicStartTimestamp(uint256 _publicStartTimestamp) external onlyOwner {
}
function setAllowList(address[] calldata addresses, uint8 numAllowedToMint) external onlyOwner {
}
function withdraw() external onlyOwner {
}
}
| walletMints[msg.sender]+quantity<=maxPerWallet,"Exceeds max per wallet" | 361,201 | walletMints[msg.sender]+quantity<=maxPerWallet |
"balance less than pledged" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
import "../Address.sol";
import "./ISutd.sol";
import "./IAutd.sol";
import "../ERC20/ERC20.sol";
import "../access-control/UnitedAccessControl.sol";
contract Autd is IAutd, ERC20, UnitedAccessControl {
/* ========== DEPENDENCIES ========== */
using Address for address;
using SafeMath for uint256;
/* ========== MODIFIERS ========== */
modifier onlyStaking() {
}
/* ========== EVENTS ========== */
event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);
event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance);
/* ========== DATA STRUCTURES ========== */
/// @notice A checkpoint for marking number of votes from a given block
struct Checkpoint {
uint256 fromBlock;
uint256 votes;
}
/* ========== STATE VARIABLES ========== */
ISutd public immutable sUTD;
address public immutable initializer; // minter
address public staking; // minter
mapping(address => mapping(uint256 => Checkpoint)) public checkpoints;
mapping(address => uint256) public numCheckpoints;
mapping(address => address) public delegates;
/* ========== CONSTRUCTOR ========== */
constructor(address _initializer, address _sUTD, address authority, uint256 _pledgeLockupDuration)
ERC20("Allies UTD", "aUTD", 18)
UnitedAccessControl(IUnitedAuthority(authority))
{
}
function setStaking(address _staking) external {
}
/* ========== MUTATIVE FUNCTIONS ========== */
/**
* @notice Delegate votes from `msg.sender` to `delegatee`
* @param delegatee The address to delegate votes to
*/
function delegate(address delegatee) external {
}
/**
@notice mint aUTD
@param _to address
@param _amount uint
*/
function mint(address _to, uint256 _amount) external override onlyStaking {
}
/**
@notice burn aUTD
@param _from address
@param _amount uint
*/
function burn(address _from, uint256 _amount) external override onlyStaking {
}
/* ========== VIEW FUNCTIONS ========== */
/**
* @notice pull index from sUTD token
*/
function index() public view override returns (uint256) {
}
/**
@notice converts aUTD amount to UTD
@param _amount uint
@return uint
*/
function balanceFrom(uint256 _amount) public view override returns (uint256) {
}
/**
@notice converts UTD amount to aUTD
@param _amount uint
@return uint
*/
function balanceTo(uint256 _amount) public view override returns (uint256) {
}
/**
* @notice Gets the current votes balance for `account`
* @param account The address to get votes balance
* @return The number of current votes for `account`
*/
function getCurrentVotes(address account) external view returns (uint256) {
}
/**
* @notice Determine the prior number of votes for an account as of a block number
* @dev Block number must be a finalized block or else this function will revert to prevent misinformation.
* @param account The address of the account to check
* @param blockNumber The block number to get the vote balance at
* @return The number of votes the account had as of the given block
*/
function getPriorVotes(address account, uint256 blockNumber) external view returns (uint256) {
}
/* ========== INTERNAL FUNCTIONS ========== */
function _delegate(address delegator, address delegatee) internal {
}
function _moveDelegates(
address srcRep,
address dstRep,
uint256 amount
) internal {
}
function _writeCheckpoint(
address delegatee,
uint256 nCheckpoints,
uint256 oldVotes,
uint256 newVotes
) internal {
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override(IERC20, ERC20) returns (bool) {
}
/**
@notice Ensure delegation moves when token is transferred.
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal override {
}
function _afterTokenTransfer(
address from,
address,
uint256
) internal view override {
if (from != address(0)) {
require(<FILL_ME>)
}
}
// # Pledging
// ----------
struct AutdPledgeAccountData {
uint96 amount;
uint48 lockupExpiry;
}
uint256 public pledgeLockupDuration;
mapping(address => AutdPledgeAccountData) public pledgeAccountData;
event SetPledgeLockupDuration(uint256 newPledgeLockupDuration);
event Pledge(address account, uint256 amount);
event Claim(address account, uint256 amount);
function setPledgeLockupDuration(uint256 newPledgeLockupDuration) external onlyPolicy {
}
function pledge(uint256 amount) external {
}
function claim(uint256 amount) external {
}
}
| pledgeAccountData[from].amount<=_balances[from],"balance less than pledged" | 361,378 | pledgeAccountData[from].amount<=_balances[from] |
"autd balance too low" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
import "../Address.sol";
import "./ISutd.sol";
import "./IAutd.sol";
import "../ERC20/ERC20.sol";
import "../access-control/UnitedAccessControl.sol";
contract Autd is IAutd, ERC20, UnitedAccessControl {
/* ========== DEPENDENCIES ========== */
using Address for address;
using SafeMath for uint256;
/* ========== MODIFIERS ========== */
modifier onlyStaking() {
}
/* ========== EVENTS ========== */
event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);
event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance);
/* ========== DATA STRUCTURES ========== */
/// @notice A checkpoint for marking number of votes from a given block
struct Checkpoint {
uint256 fromBlock;
uint256 votes;
}
/* ========== STATE VARIABLES ========== */
ISutd public immutable sUTD;
address public immutable initializer; // minter
address public staking; // minter
mapping(address => mapping(uint256 => Checkpoint)) public checkpoints;
mapping(address => uint256) public numCheckpoints;
mapping(address => address) public delegates;
/* ========== CONSTRUCTOR ========== */
constructor(address _initializer, address _sUTD, address authority, uint256 _pledgeLockupDuration)
ERC20("Allies UTD", "aUTD", 18)
UnitedAccessControl(IUnitedAuthority(authority))
{
}
function setStaking(address _staking) external {
}
/* ========== MUTATIVE FUNCTIONS ========== */
/**
* @notice Delegate votes from `msg.sender` to `delegatee`
* @param delegatee The address to delegate votes to
*/
function delegate(address delegatee) external {
}
/**
@notice mint aUTD
@param _to address
@param _amount uint
*/
function mint(address _to, uint256 _amount) external override onlyStaking {
}
/**
@notice burn aUTD
@param _from address
@param _amount uint
*/
function burn(address _from, uint256 _amount) external override onlyStaking {
}
/* ========== VIEW FUNCTIONS ========== */
/**
* @notice pull index from sUTD token
*/
function index() public view override returns (uint256) {
}
/**
@notice converts aUTD amount to UTD
@param _amount uint
@return uint
*/
function balanceFrom(uint256 _amount) public view override returns (uint256) {
}
/**
@notice converts UTD amount to aUTD
@param _amount uint
@return uint
*/
function balanceTo(uint256 _amount) public view override returns (uint256) {
}
/**
* @notice Gets the current votes balance for `account`
* @param account The address to get votes balance
* @return The number of current votes for `account`
*/
function getCurrentVotes(address account) external view returns (uint256) {
}
/**
* @notice Determine the prior number of votes for an account as of a block number
* @dev Block number must be a finalized block or else this function will revert to prevent misinformation.
* @param account The address of the account to check
* @param blockNumber The block number to get the vote balance at
* @return The number of votes the account had as of the given block
*/
function getPriorVotes(address account, uint256 blockNumber) external view returns (uint256) {
}
/* ========== INTERNAL FUNCTIONS ========== */
function _delegate(address delegator, address delegatee) internal {
}
function _moveDelegates(
address srcRep,
address dstRep,
uint256 amount
) internal {
}
function _writeCheckpoint(
address delegatee,
uint256 nCheckpoints,
uint256 oldVotes,
uint256 newVotes
) internal {
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override(IERC20, ERC20) returns (bool) {
}
/**
@notice Ensure delegation moves when token is transferred.
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal override {
}
function _afterTokenTransfer(
address from,
address,
uint256
) internal view override {
}
// # Pledging
// ----------
struct AutdPledgeAccountData {
uint96 amount;
uint48 lockupExpiry;
}
uint256 public pledgeLockupDuration;
mapping(address => AutdPledgeAccountData) public pledgeAccountData;
event SetPledgeLockupDuration(uint256 newPledgeLockupDuration);
event Pledge(address account, uint256 amount);
event Claim(address account, uint256 amount);
function setPledgeLockupDuration(uint256 newPledgeLockupDuration) external onlyPolicy {
}
function pledge(uint256 amount) external {
emit Pledge(msg.sender, amount);
pledgeAccountData[msg.sender].amount += uint96(amount);
require(<FILL_ME>)
pledgeAccountData[msg.sender].lockupExpiry = uint48(block.timestamp + pledgeLockupDuration);
}
function claim(uint256 amount) external {
}
}
| pledgeAccountData[msg.sender].amount<=balanceOf(msg.sender),"autd balance too low" | 361,378 | pledgeAccountData[msg.sender].amount<=balanceOf(msg.sender) |
null | pragma solidity ^0.7.0;
//*************************//
// CryptoTulip //
// //
// https://cryptotulip.co //
//*************************//
contract CryptoTulip is ERC721, Ownable {
constructor() ERC721("CryptoTulip", "TULIP") {
}
struct Tulip {
bytes32 genome;
uint64 block;
uint64 foundation;
uint64 inspiration;
uint64 generation;
}
Tulip[] tulips;
mapping(address => string) public usernames;
mapping(uint => string) public names;
uint256 internal constant ARTIST_FEES = 1e15; // 1 finney
uint256 internal constant ORIGINAL_ARTWORK_LIMIT = 100;
uint256 internal constant COMMISSION_ARTWORK_LIMIT = 1000;
function getTulip(uint256 _id) external view
returns (
bytes32 genome,
uint64 blockNumber,
uint64 foundation,
uint64 inspiration,
uint64 generation
) {
}
// [Optional] name your masterpiece.
// Needs to be funny.
function nameArt(uint256 _id, string memory _newName) external {
}
function setUsername(string memory _username) external {
}
// Commission CryptoTulip for abstract deconstructed art.
// You: I'd like a painting please. Use my painting for the foundation
// and use that other painting accross the street as inspiration.
// Artist: That'll be 1 finney. Come back one block later.
function commissionArt(uint256 _foundation, uint256 _inspiration)
external payable returns (uint)
{
require(<FILL_ME>)
require(msg.sender == ownerOf(_foundation));
require(msg.value >= ARTIST_FEES);
uint256 _id = _createTulip(bytes32(0), _foundation, _inspiration, tulips[_foundation].generation + 1, msg.sender);
return _creativeProcess(_id);
}
// Lets the caller create an original artwork with given genome.
function originalArtwork(bytes32 _genome) external payable returns (uint) {
}
// Lets owner withdraw contract balance
function withdraw() external onlyOwner {
}
// *************************************************************************
// Internal
function _creativeProcess(uint _id) internal returns (uint) {
}
function _createTulip(
bytes32 _genome,
uint256 _foundation,
uint256 _inspiration,
uint256 _generation,
address _owner
) internal returns (uint)
{
}
}
| (totalSupply()<COMMISSION_ARTWORK_LIMIT)||(msg.value>=1000*ARTIST_FEES) | 361,408 | (totalSupply()<COMMISSION_ARTWORK_LIMIT)||(msg.value>=1000*ARTIST_FEES) |
null | pragma solidity ^0.7.0;
//*************************//
// CryptoTulip //
// //
// https://cryptotulip.co //
//*************************//
contract CryptoTulip is ERC721, Ownable {
constructor() ERC721("CryptoTulip", "TULIP") {
}
struct Tulip {
bytes32 genome;
uint64 block;
uint64 foundation;
uint64 inspiration;
uint64 generation;
}
Tulip[] tulips;
mapping(address => string) public usernames;
mapping(uint => string) public names;
uint256 internal constant ARTIST_FEES = 1e15; // 1 finney
uint256 internal constant ORIGINAL_ARTWORK_LIMIT = 100;
uint256 internal constant COMMISSION_ARTWORK_LIMIT = 1000;
function getTulip(uint256 _id) external view
returns (
bytes32 genome,
uint64 blockNumber,
uint64 foundation,
uint64 inspiration,
uint64 generation
) {
}
// [Optional] name your masterpiece.
// Needs to be funny.
function nameArt(uint256 _id, string memory _newName) external {
}
function setUsername(string memory _username) external {
}
// Commission CryptoTulip for abstract deconstructed art.
// You: I'd like a painting please. Use my painting for the foundation
// and use that other painting accross the street as inspiration.
// Artist: That'll be 1 finney. Come back one block later.
function commissionArt(uint256 _foundation, uint256 _inspiration)
external payable returns (uint)
{
}
// Lets the caller create an original artwork with given genome.
function originalArtwork(bytes32 _genome) external payable returns (uint) {
require(<FILL_ME>)
require(msg.value >= ARTIST_FEES);
return _createTulip(_genome, 0, 0, 0, msg.sender);
}
// Lets owner withdraw contract balance
function withdraw() external onlyOwner {
}
// *************************************************************************
// Internal
function _creativeProcess(uint _id) internal returns (uint) {
}
function _createTulip(
bytes32 _genome,
uint256 _foundation,
uint256 _inspiration,
uint256 _generation,
address _owner
) internal returns (uint)
{
}
}
| totalSupply()<ORIGINAL_ARTWORK_LIMIT | 361,408 | totalSupply()<ORIGINAL_ARTWORK_LIMIT |
"_fundingEndBlock > _fundingStartBlock" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.4;
contract SafeMath {
function safeAdd(uint256 x, uint256 y) internal pure returns(uint256) {
}
function safeSubtract(uint256 x, uint256 y) internal pure returns(uint256) {
}
function safeMult(uint256 x, uint256 y) internal pure returns(uint256) {
}
}
/* ERC20 Token Interface */
interface Token {
function totalSupply() external view returns (uint256);
function balanceOf(address _owner) external returns (uint256 balance);
function transfer(address _to, uint256 _value) external returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) external returns (bool success);
function approve(address _spender, uint256 _value) external returns (bool success);
function allowance(address _owner, address _spender) external returns (uint256 remaining);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
/* ERC20 token Implementation */
abstract contract StandardToken is Token {
function transfer(address _to, uint256 _value) public override returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) public override returns (bool success) {
}
function balanceOf(address _owner) public override view returns (uint256 balance) {
}
function approve(address _spender, uint256 _value) public override returns (bool success) {
}
function allowance(address _owner, address _spender) public override view returns (uint256 remaining) {
}
mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) allowed;
}
contract LifeCoin is StandardToken, SafeMath {
fallback() external {
}
// metadata
string public constant name = "LifeCoin";
string public constant symbol = "LFE";
uint256 public constant decimals = 2;
uint256 private immutable _totalSupply;
string public version = "1.0";
// contracts
address public ethFundDeposit; // deposit address for ETH for YawLife Pty. Ltd.
address public yawLifeFundDeposit; // deposit address for LifeCoin for YawLife Pty. Ltd.
// crowdsale parameters
bool public isFinalized; // switched to true in operational state
uint256 public fundingStartBlock;
uint256 public fundingEndBlock;
uint256 public constant yawLifeFund = 2.2 * (10**9) * 10**decimals; // 2.2 Billion LifeCoin reserved for YawLife Pty. Ltd. (some to be re-allocated (e.g. to mining) later)
uint256 public constant totalLifeCoins = 10 * (10**9) * 10**decimals; // 7.8 Billion LifeCoins will be created.
uint256 public baseLifeCoinExchangeRate;
// Bonus parameters.
// Assuming an average blocktime of 19s. 1 Week is 31831 blocks.
uint256 public blocksPerWeek;
mapping (address => uint256[7]) public icoEthBalances; // Keeps track of amount of eth deposited during each week of the ICO;
uint256[7] public icoEthPerWeek; // Keeps track of amount of eth deposited during each week of the ICO;
// Stores the relative percentages participants gain during the weeks.
// uint32[7] public bonusesPerWeek;
// events
event CreateLifeCoin(address indexed _to, uint256 _value);
event DepositETH(address indexed _from, uint256 _value, uint256 _bonusPeriod); //The naming is similar to contract function. However it looks nicer in public facing results.
// constructor
constructor(
address _ethFundDeposit,
address _yawLifeFundDeposit,
uint256 _fundingStartBlock,
uint256 _fundingEndBlock,
uint256 _blocksPerWeek
)
{
require(<FILL_ME>)
isFinalized = false; //controls pre through crowdsale state
ethFundDeposit = _ethFundDeposit;
yawLifeFundDeposit = _yawLifeFundDeposit;
blocksPerWeek = _blocksPerWeek;
fundingStartBlock = _fundingStartBlock;
fundingEndBlock = _fundingEndBlock;
_totalSupply = totalLifeCoins;
}
function totalSupply() public view virtual override returns (uint256) {
}
/// Accepts ether and creates new LifeCoin tokens.
function depositETH() external payable {
}
/// Ends the funding period and sends the ETH to the ethFundDeposit.
function finalize() external {
}
/// After the ICO - Allow participants to withdraw their tokens at the price dictated by amount of ETH raised.
function withdraw() external {
}
}
| _fundingEndBlock>(_fundingStartBlock+_blocksPerWeek),"_fundingEndBlock > _fundingStartBlock" | 361,416 | _fundingEndBlock>(_fundingStartBlock+_blocksPerWeek) |
null | pragma solidity 0.4.24;
/**
* @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) {
}
/**
* @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) {
}
}
/**
* @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 Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
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 balance) {
}
}
/**
* @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 Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/
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 constant returns (uint256 remaining) {
}
/**
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
*/
function increaseApproval (address _spender, uint _addedValue) public returns (bool success) {
}
function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) {
}
}
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure.
* To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
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 {
}
}
/**
* @title TokenTimelock
* @dev TokenTimelock is a token holder contract that will allow a
* beneficiary to extract the tokens after a given release time
*/
contract TokenTimelock {
using SafeERC20 for ERC20Basic;
// ERC20 basic token contract being held
ERC20Basic public token;
// beneficiary of tokens after they are released
address public beneficiary;
// timestamp when token release is enabled
uint64 public releaseTime;
constructor(ERC20Basic _token, address _beneficiary, uint64 _releaseTime) public {
}
/**
* @notice Transfers tokens held by timelock to beneficiary.
*/
function release() public {
}
}
contract Owned {
address public owner;
constructor() public {
}
modifier onlyOwner {
}
}
/**
* @title TokenVault
* @dev TokenVault is a token holder contract that will allow a
* beneficiary to spend the tokens from some function of a specified ERC20 token
*/
contract TokenVault {
using SafeERC20 for ERC20;
// ERC20 token contract being held
ERC20 public token;
constructor(ERC20 _token) public {
}
/**
* @notice Allow the token itself to send tokens
* using transferFrom().
*/
function fillUpAllowance() public {
}
}
/**
* @title Burnable Token
* @dev Token that can be irreversibly burned (destroyed).
*/
contract BurnableToken is StandardToken {
event Burn(address indexed burner, uint256 value);
/**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/
function burn(uint256 _value) public {
}
}
contract IdealCoinToken is BurnableToken, Owned {
string public constant name = "IdealCoin";
string public constant symbol = "IDC";
uint8 public constant decimals = 18;
/// Maximum tokens to be allocated (2.2 billion IDC)
uint256 public constant HARD_CAP = 2200000000 * 10**uint256(decimals);
/// This address will receive the board of trustees and cold private sale tokens
address public boardTokensAddress;
/// This address will receive the platform tokens
address public platformTokensAddress;
/// This address is used to keep the tokens for sale
address public saleTokensAddress;
/// This address is used to keep the referral and bounty tokens
address public referralBountyTokensAddress;
/// Date when the Founders, Partners and Advisors can claim their locked tokens
uint64 public date01Feb2019 = 1548979200;
/// This vault is used to keep the Founders, Advisors and Partners tokens
TokenVault public foundersAdvisorsPartnersTokensVault;
/// Store the locking contract addresses
mapping(address => address) public lockOf;
/// when the token sale is closed, the trading will open
bool public saleClosed = false;
/// Only allowed to execute before the token sale is closed
modifier beforeSaleClosed {
}
constructor(address _boardTokensAddress, address _platformTokensAddress,
address _saleTokensAddress, address _referralBountyTokensAddress) public {
}
function createLockingTokenVaults() external onlyOwner beforeSaleClosed {
}
/// @dev Create a TokenVault and fill with the specified newly minted tokens
function createTokenVault(uint256 tokens) internal onlyOwner returns (TokenVault) {
}
// @dev create specified number of tokens and transfer to destination
function createTokens(uint256 _tokens, address _destination) internal onlyOwner {
}
/// @dev lock tokens for a single whole period
function lockTokens(address _beneficiary, uint256 _tokensAmount) external onlyOwner {
require(<FILL_ME>)
require(_beneficiary != address(0));
TokenTimelock lock = new TokenTimelock(ERC20(this), _beneficiary, date01Feb2019);
lockOf[_beneficiary] = address(lock);
require(this.transferFrom(foundersAdvisorsPartnersTokensVault, lock, _tokensAmount));
}
/// @dev releases vested tokens for the caller's own address
function releaseLockedTokens() external {
}
/// @dev releases vested tokens for the specified address.
/// Can be called by any account for any address.
function releaseLockedTokensFor(address _owner) public {
}
/// @dev check the locked balance for an address
function lockedBalanceOf(address _owner) public view returns (uint256) {
}
/// @dev will open the trading for everyone
function closeSale() external onlyOwner beforeSaleClosed {
}
/// @dev Trading limited - requires the token sale to have closed
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
/// @dev Trading limited - requires the token sale to have closed
function transfer(address _to, uint256 _value) public returns (bool) {
}
}
| lockOf[_beneficiary]==0x0 | 361,429 | lockOf[_beneficiary]==0x0 |
null | pragma solidity 0.4.24;
/**
* @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) {
}
/**
* @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) {
}
}
/**
* @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 Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
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 balance) {
}
}
/**
* @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 Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/
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 constant returns (uint256 remaining) {
}
/**
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
*/
function increaseApproval (address _spender, uint _addedValue) public returns (bool success) {
}
function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) {
}
}
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure.
* To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
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 {
}
}
/**
* @title TokenTimelock
* @dev TokenTimelock is a token holder contract that will allow a
* beneficiary to extract the tokens after a given release time
*/
contract TokenTimelock {
using SafeERC20 for ERC20Basic;
// ERC20 basic token contract being held
ERC20Basic public token;
// beneficiary of tokens after they are released
address public beneficiary;
// timestamp when token release is enabled
uint64 public releaseTime;
constructor(ERC20Basic _token, address _beneficiary, uint64 _releaseTime) public {
}
/**
* @notice Transfers tokens held by timelock to beneficiary.
*/
function release() public {
}
}
contract Owned {
address public owner;
constructor() public {
}
modifier onlyOwner {
}
}
/**
* @title TokenVault
* @dev TokenVault is a token holder contract that will allow a
* beneficiary to spend the tokens from some function of a specified ERC20 token
*/
contract TokenVault {
using SafeERC20 for ERC20;
// ERC20 token contract being held
ERC20 public token;
constructor(ERC20 _token) public {
}
/**
* @notice Allow the token itself to send tokens
* using transferFrom().
*/
function fillUpAllowance() public {
}
}
/**
* @title Burnable Token
* @dev Token that can be irreversibly burned (destroyed).
*/
contract BurnableToken is StandardToken {
event Burn(address indexed burner, uint256 value);
/**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/
function burn(uint256 _value) public {
}
}
contract IdealCoinToken is BurnableToken, Owned {
string public constant name = "IdealCoin";
string public constant symbol = "IDC";
uint8 public constant decimals = 18;
/// Maximum tokens to be allocated (2.2 billion IDC)
uint256 public constant HARD_CAP = 2200000000 * 10**uint256(decimals);
/// This address will receive the board of trustees and cold private sale tokens
address public boardTokensAddress;
/// This address will receive the platform tokens
address public platformTokensAddress;
/// This address is used to keep the tokens for sale
address public saleTokensAddress;
/// This address is used to keep the referral and bounty tokens
address public referralBountyTokensAddress;
/// Date when the Founders, Partners and Advisors can claim their locked tokens
uint64 public date01Feb2019 = 1548979200;
/// This vault is used to keep the Founders, Advisors and Partners tokens
TokenVault public foundersAdvisorsPartnersTokensVault;
/// Store the locking contract addresses
mapping(address => address) public lockOf;
/// when the token sale is closed, the trading will open
bool public saleClosed = false;
/// Only allowed to execute before the token sale is closed
modifier beforeSaleClosed {
}
constructor(address _boardTokensAddress, address _platformTokensAddress,
address _saleTokensAddress, address _referralBountyTokensAddress) public {
}
function createLockingTokenVaults() external onlyOwner beforeSaleClosed {
}
/// @dev Create a TokenVault and fill with the specified newly minted tokens
function createTokenVault(uint256 tokens) internal onlyOwner returns (TokenVault) {
}
// @dev create specified number of tokens and transfer to destination
function createTokens(uint256 _tokens, address _destination) internal onlyOwner {
}
/// @dev lock tokens for a single whole period
function lockTokens(address _beneficiary, uint256 _tokensAmount) external onlyOwner {
require(lockOf[_beneficiary] == 0x0);
require(_beneficiary != address(0));
TokenTimelock lock = new TokenTimelock(ERC20(this), _beneficiary, date01Feb2019);
lockOf[_beneficiary] = address(lock);
require(<FILL_ME>)
}
/// @dev releases vested tokens for the caller's own address
function releaseLockedTokens() external {
}
/// @dev releases vested tokens for the specified address.
/// Can be called by any account for any address.
function releaseLockedTokensFor(address _owner) public {
}
/// @dev check the locked balance for an address
function lockedBalanceOf(address _owner) public view returns (uint256) {
}
/// @dev will open the trading for everyone
function closeSale() external onlyOwner beforeSaleClosed {
}
/// @dev Trading limited - requires the token sale to have closed
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
/// @dev Trading limited - requires the token sale to have closed
function transfer(address _to, uint256 _value) public returns (bool) {
}
}
| this.transferFrom(foundersAdvisorsPartnersTokensVault,lock,_tokensAmount) | 361,429 | this.transferFrom(foundersAdvisorsPartnersTokensVault,lock,_tokensAmount) |
"INVALID_PROOF" | // SPDX-License-Identifier: MIT
pragma solidity =0.8.9;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "./MerkleProof.sol";
contract OhGeez is ERC20, MerkleProof {
bytes32 public merkleRoot;
mapping(address => bool) public claimed;
constructor(bytes32 _merkleRoot) ERC20("Oh..Geez", "OH-GEEZ") {
}
function claim(bytes32[] memory proof) external {
require(!claimed[msg.sender], "FORBIDDEN");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(<FILL_ME>)
claimed[msg.sender] = true;
_transfer(address(this), msg.sender, 1e18);
}
}
| verify(merkleRoot,leaf,proof),"INVALID_PROOF" | 361,458 | verify(merkleRoot,leaf,proof) |
null | pragma solidity ^0.4.18;
/**
* Ponzi Trust Token Seller Smart Contract
* Code is published on https://github.com/PonziTrust/TokenSeller
* Ponzi Trust https://ponzitrust.com/
*/
// see: https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/math/SafeMath.sol
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) {
}
}
// Ponzi Token Minimal Interface
contract PonziTokenMinInterface {
function balanceOf(address owner) public view returns(uint256);
function transfer(address to, uint256 value) public returns (bool);
}
contract PonziSeller {
using SafeMath for uint256;
enum AccessRank {
None,
SetPrice,
Withdraw,
Full
}
address private constant PONZI_ADDRESS = 0xc2807533832807Bf15898778D8A108405e9edfb1;
PonziTokenMinInterface private m_ponzi;
uint256 private m_ponziPriceInWei;
uint256 private m_rewardNum;
uint256 private m_rewardDen;
uint256 private m_discountNum;
uint256 private m_discountDen;
mapping(address => AccessRank) private m_admins;
event PriceChanged(address indexed who, uint256 newPrice);
event RewardRef(address indexed refAddr, uint256 ponziAmount);
event WithdrawalETH(address indexed to, uint256 amountInWei);
event WithdrawalPonzi(address indexed to, uint256 amount);
event ProvidingAccess(address indexed addr, AccessRank rank);
event PonziSold(
address indexed purchasedBy,
uint256 indexed priceInWei,
uint256 ponziAmount,
uint256 weiAmount,
address indexed refAddr
);
event NotEnoughPonzi(
address indexed addr,
uint256 weiAmount,
uint256 ponziPriceInWei,
uint256 ponziBalance
);
modifier onlyAdmin(AccessRank r) {
}
function PonziSeller() public {
}
function() public payable {
}
function setPonziAddress(address ponziAddr) public onlyAdmin(AccessRank.Full) {
}
function ponziAddress() public view returns (address ponziAddr) {
}
function ponziPriceInWei() public view returns (uint256) {
}
function setPonziPriceInWei(uint256 newPonziPriceInWei) public onlyAdmin(AccessRank.SetPrice) {
}
function rewardPercent() public view returns (uint256 numerator, uint256 denominator) {
}
function discountPercent() public view returns (uint256 numerator, uint256 denominator) {
}
function provideAccess(address adminAddr, uint8 rank) public onlyAdmin(AccessRank.Full) {
require(rank <= uint8(AccessRank.Full));
require(<FILL_ME>)
m_admins[adminAddr] = AccessRank(rank);
}
function setRewardPercent(uint256 newNumerator, uint256 newDenominator) public onlyAdmin(AccessRank.Full) {
}
function setDiscountPercent(uint256 newNumerator, uint256 newDenominator) public onlyAdmin(AccessRank.Full) {
}
function byPonzi(address refAddr) public payable {
}
function availablePonzi() public view returns (uint256) {
}
function withdrawETH() public onlyAdmin(AccessRank.Withdraw) {
}
function withdrawPonzi(uint256 amount) public onlyAdmin(AccessRank.Withdraw) {
}
function weiToPonzi(uint256 weiAmount, uint256 tokenPrice)
internal
pure
returns(uint256 tokensAmount)
{
}
}
| m_admins[adminAddr]!=AccessRank.Full | 361,489 | m_admins[adminAddr]!=AccessRank.Full |
null | pragma solidity ^0.4.18;
/**
* Ponzi Trust Token Seller Smart Contract
* Code is published on https://github.com/PonziTrust/TokenSeller
* Ponzi Trust https://ponzitrust.com/
*/
// see: https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/math/SafeMath.sol
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) {
}
}
// Ponzi Token Minimal Interface
contract PonziTokenMinInterface {
function balanceOf(address owner) public view returns(uint256);
function transfer(address to, uint256 value) public returns (bool);
}
contract PonziSeller {
using SafeMath for uint256;
enum AccessRank {
None,
SetPrice,
Withdraw,
Full
}
address private constant PONZI_ADDRESS = 0xc2807533832807Bf15898778D8A108405e9edfb1;
PonziTokenMinInterface private m_ponzi;
uint256 private m_ponziPriceInWei;
uint256 private m_rewardNum;
uint256 private m_rewardDen;
uint256 private m_discountNum;
uint256 private m_discountDen;
mapping(address => AccessRank) private m_admins;
event PriceChanged(address indexed who, uint256 newPrice);
event RewardRef(address indexed refAddr, uint256 ponziAmount);
event WithdrawalETH(address indexed to, uint256 amountInWei);
event WithdrawalPonzi(address indexed to, uint256 amount);
event ProvidingAccess(address indexed addr, AccessRank rank);
event PonziSold(
address indexed purchasedBy,
uint256 indexed priceInWei,
uint256 ponziAmount,
uint256 weiAmount,
address indexed refAddr
);
event NotEnoughPonzi(
address indexed addr,
uint256 weiAmount,
uint256 ponziPriceInWei,
uint256 ponziBalance
);
modifier onlyAdmin(AccessRank r) {
}
function PonziSeller() public {
}
function() public payable {
}
function setPonziAddress(address ponziAddr) public onlyAdmin(AccessRank.Full) {
}
function ponziAddress() public view returns (address ponziAddr) {
}
function ponziPriceInWei() public view returns (uint256) {
}
function setPonziPriceInWei(uint256 newPonziPriceInWei) public onlyAdmin(AccessRank.SetPrice) {
}
function rewardPercent() public view returns (uint256 numerator, uint256 denominator) {
}
function discountPercent() public view returns (uint256 numerator, uint256 denominator) {
}
function provideAccess(address adminAddr, uint8 rank) public onlyAdmin(AccessRank.Full) {
}
function setRewardPercent(uint256 newNumerator, uint256 newDenominator) public onlyAdmin(AccessRank.Full) {
}
function setDiscountPercent(uint256 newNumerator, uint256 newDenominator) public onlyAdmin(AccessRank.Full) {
}
function byPonzi(address refAddr) public payable {
require(m_ponziPriceInWei > 0 && msg.value > m_ponziPriceInWei);
uint256 refAmount = 0;
uint256 senderAmount = weiToPonzi(msg.value, m_ponziPriceInWei);
// check if ref addres is valid and calc reward and discount
if (refAddr != msg.sender && refAddr != address(0) && refAddr != address(this)) {
// ref reward
refAmount = senderAmount.mul(m_rewardNum).div(m_rewardDen);
// sender discount
// uint256 d = m_discountDen/(m_discountDen-m_discountNum)
senderAmount = senderAmount.mul(m_discountDen).div(m_discountDen-m_discountNum);
// senderAmount = senderAmount.add(senderAmount.mul(m_discountNum).div(m_discountDen));
}
// check if we have enough ponzi on balance
if (availablePonzi() < senderAmount.add(refAmount)) {
emit NotEnoughPonzi(msg.sender, msg.value, m_ponziPriceInWei, availablePonzi());
revert();
}
// transfer ponzi to sender
require(<FILL_ME>)
// transfer ponzi to ref if needed
if (refAmount > 0) {
require(m_ponzi.transfer(refAddr, refAmount));
emit RewardRef(refAddr, refAmount);
}
emit PonziSold(msg.sender, m_ponziPriceInWei, senderAmount, msg.value, refAddr);
}
function availablePonzi() public view returns (uint256) {
}
function withdrawETH() public onlyAdmin(AccessRank.Withdraw) {
}
function withdrawPonzi(uint256 amount) public onlyAdmin(AccessRank.Withdraw) {
}
function weiToPonzi(uint256 weiAmount, uint256 tokenPrice)
internal
pure
returns(uint256 tokensAmount)
{
}
}
| m_ponzi.transfer(msg.sender,senderAmount) | 361,489 | m_ponzi.transfer(msg.sender,senderAmount) |
null | pragma solidity ^0.4.18;
/**
* Ponzi Trust Token Seller Smart Contract
* Code is published on https://github.com/PonziTrust/TokenSeller
* Ponzi Trust https://ponzitrust.com/
*/
// see: https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/math/SafeMath.sol
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) {
}
}
// Ponzi Token Minimal Interface
contract PonziTokenMinInterface {
function balanceOf(address owner) public view returns(uint256);
function transfer(address to, uint256 value) public returns (bool);
}
contract PonziSeller {
using SafeMath for uint256;
enum AccessRank {
None,
SetPrice,
Withdraw,
Full
}
address private constant PONZI_ADDRESS = 0xc2807533832807Bf15898778D8A108405e9edfb1;
PonziTokenMinInterface private m_ponzi;
uint256 private m_ponziPriceInWei;
uint256 private m_rewardNum;
uint256 private m_rewardDen;
uint256 private m_discountNum;
uint256 private m_discountDen;
mapping(address => AccessRank) private m_admins;
event PriceChanged(address indexed who, uint256 newPrice);
event RewardRef(address indexed refAddr, uint256 ponziAmount);
event WithdrawalETH(address indexed to, uint256 amountInWei);
event WithdrawalPonzi(address indexed to, uint256 amount);
event ProvidingAccess(address indexed addr, AccessRank rank);
event PonziSold(
address indexed purchasedBy,
uint256 indexed priceInWei,
uint256 ponziAmount,
uint256 weiAmount,
address indexed refAddr
);
event NotEnoughPonzi(
address indexed addr,
uint256 weiAmount,
uint256 ponziPriceInWei,
uint256 ponziBalance
);
modifier onlyAdmin(AccessRank r) {
}
function PonziSeller() public {
}
function() public payable {
}
function setPonziAddress(address ponziAddr) public onlyAdmin(AccessRank.Full) {
}
function ponziAddress() public view returns (address ponziAddr) {
}
function ponziPriceInWei() public view returns (uint256) {
}
function setPonziPriceInWei(uint256 newPonziPriceInWei) public onlyAdmin(AccessRank.SetPrice) {
}
function rewardPercent() public view returns (uint256 numerator, uint256 denominator) {
}
function discountPercent() public view returns (uint256 numerator, uint256 denominator) {
}
function provideAccess(address adminAddr, uint8 rank) public onlyAdmin(AccessRank.Full) {
}
function setRewardPercent(uint256 newNumerator, uint256 newDenominator) public onlyAdmin(AccessRank.Full) {
}
function setDiscountPercent(uint256 newNumerator, uint256 newDenominator) public onlyAdmin(AccessRank.Full) {
}
function byPonzi(address refAddr) public payable {
require(m_ponziPriceInWei > 0 && msg.value > m_ponziPriceInWei);
uint256 refAmount = 0;
uint256 senderAmount = weiToPonzi(msg.value, m_ponziPriceInWei);
// check if ref addres is valid and calc reward and discount
if (refAddr != msg.sender && refAddr != address(0) && refAddr != address(this)) {
// ref reward
refAmount = senderAmount.mul(m_rewardNum).div(m_rewardDen);
// sender discount
// uint256 d = m_discountDen/(m_discountDen-m_discountNum)
senderAmount = senderAmount.mul(m_discountDen).div(m_discountDen-m_discountNum);
// senderAmount = senderAmount.add(senderAmount.mul(m_discountNum).div(m_discountDen));
}
// check if we have enough ponzi on balance
if (availablePonzi() < senderAmount.add(refAmount)) {
emit NotEnoughPonzi(msg.sender, msg.value, m_ponziPriceInWei, availablePonzi());
revert();
}
// transfer ponzi to sender
require(m_ponzi.transfer(msg.sender, senderAmount));
// transfer ponzi to ref if needed
if (refAmount > 0) {
require(<FILL_ME>)
emit RewardRef(refAddr, refAmount);
}
emit PonziSold(msg.sender, m_ponziPriceInWei, senderAmount, msg.value, refAddr);
}
function availablePonzi() public view returns (uint256) {
}
function withdrawETH() public onlyAdmin(AccessRank.Withdraw) {
}
function withdrawPonzi(uint256 amount) public onlyAdmin(AccessRank.Withdraw) {
}
function weiToPonzi(uint256 weiAmount, uint256 tokenPrice)
internal
pure
returns(uint256 tokensAmount)
{
}
}
| m_ponzi.transfer(refAddr,refAmount) | 361,489 | m_ponzi.transfer(refAddr,refAmount) |
null | pragma solidity ^0.4.18;
/**
* Ponzi Trust Token Seller Smart Contract
* Code is published on https://github.com/PonziTrust/TokenSeller
* Ponzi Trust https://ponzitrust.com/
*/
// see: https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/math/SafeMath.sol
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) {
}
}
// Ponzi Token Minimal Interface
contract PonziTokenMinInterface {
function balanceOf(address owner) public view returns(uint256);
function transfer(address to, uint256 value) public returns (bool);
}
contract PonziSeller {
using SafeMath for uint256;
enum AccessRank {
None,
SetPrice,
Withdraw,
Full
}
address private constant PONZI_ADDRESS = 0xc2807533832807Bf15898778D8A108405e9edfb1;
PonziTokenMinInterface private m_ponzi;
uint256 private m_ponziPriceInWei;
uint256 private m_rewardNum;
uint256 private m_rewardDen;
uint256 private m_discountNum;
uint256 private m_discountDen;
mapping(address => AccessRank) private m_admins;
event PriceChanged(address indexed who, uint256 newPrice);
event RewardRef(address indexed refAddr, uint256 ponziAmount);
event WithdrawalETH(address indexed to, uint256 amountInWei);
event WithdrawalPonzi(address indexed to, uint256 amount);
event ProvidingAccess(address indexed addr, AccessRank rank);
event PonziSold(
address indexed purchasedBy,
uint256 indexed priceInWei,
uint256 ponziAmount,
uint256 weiAmount,
address indexed refAddr
);
event NotEnoughPonzi(
address indexed addr,
uint256 weiAmount,
uint256 ponziPriceInWei,
uint256 ponziBalance
);
modifier onlyAdmin(AccessRank r) {
}
function PonziSeller() public {
}
function() public payable {
}
function setPonziAddress(address ponziAddr) public onlyAdmin(AccessRank.Full) {
}
function ponziAddress() public view returns (address ponziAddr) {
}
function ponziPriceInWei() public view returns (uint256) {
}
function setPonziPriceInWei(uint256 newPonziPriceInWei) public onlyAdmin(AccessRank.SetPrice) {
}
function rewardPercent() public view returns (uint256 numerator, uint256 denominator) {
}
function discountPercent() public view returns (uint256 numerator, uint256 denominator) {
}
function provideAccess(address adminAddr, uint8 rank) public onlyAdmin(AccessRank.Full) {
}
function setRewardPercent(uint256 newNumerator, uint256 newDenominator) public onlyAdmin(AccessRank.Full) {
}
function setDiscountPercent(uint256 newNumerator, uint256 newDenominator) public onlyAdmin(AccessRank.Full) {
}
function byPonzi(address refAddr) public payable {
}
function availablePonzi() public view returns (uint256) {
}
function withdrawETH() public onlyAdmin(AccessRank.Withdraw) {
}
function withdrawPonzi(uint256 amount) public onlyAdmin(AccessRank.Withdraw) {
uint256 pt = availablePonzi();
require(pt > 0 && amount > 0 && pt >= amount);
require(<FILL_ME>)
assert(availablePonzi() < pt);
emit WithdrawalPonzi(msg.sender, pt);
}
function weiToPonzi(uint256 weiAmount, uint256 tokenPrice)
internal
pure
returns(uint256 tokensAmount)
{
}
}
| m_ponzi.transfer(msg.sender,amount) | 361,489 | m_ponzi.transfer(msg.sender,amount) |
"Must setup devAddr_." | pragma solidity ^0.4.25;
/***********************************************************
* MultiInvest contract
* - GAIN 5.3% PER 24 HOURS (every 5900 blocks) 40 days 0.01~500eth
* - GAIN 5.6% PER 24 HOURS (every 5900 blocks) 30 days 1~1000eth
* - GAIN 6.6% PER 24 HOURS (every 5900 blocks) 20 days 2~10000eth
* - GAIN 7.6% PER 24 HOURS (every 5900 blocks) 15 days 5~10000eth
* - GAIN 8.5% PER 24 HOURS (every 5900 blocks) 12 days 10~10000eth
* - GAIN 3% PER 24 HOURS (every 5900 blocks) forever 0.01~10000eth
*
* website: https://www.MultiInvest.biz
* telegram: https://t.me/MultiInvest
***********************************************************/
/***********************************************************
* @title SafeMath v0.1.9
* @dev Math operations with safety checks that throw on error
* change notes: original SafeMath library from OpenZeppelin modified by Inventor
* - added sqrt
* - added sq
* - added pwr
* - changed asserts to requires with error log outputs
* - removed div, its useless
***********************************************************/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b)
internal
pure
returns (uint256 c)
{
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b)
internal
pure
returns (uint256 c)
{
}
/**
* @dev gives square root of given x.
*/
function sqrt(uint256 x)
internal
pure
returns (uint256 y)
{
}
/**
* @dev gives square. multiplies x by x
*/
function sq(uint256 x)
internal
pure
returns (uint256)
{
}
/**
* @dev x to the power of y
*/
function pwr(uint256 x, uint256 y)
internal
pure
returns (uint256)
{
}
}
/***********************************************************
* SDDatasets library
***********************************************************/
library SDDatasets {
struct Player {
address addr; // player address
uint256 aff; // affiliate vault,directly send
uint256 laff; // parent id
uint256 planCount;
mapping(uint256=>PalyerPlan) plans;
uint256 aff1sum; //4 level
uint256 aff2sum;
uint256 aff3sum;
uint256 aff4sum;
}
struct PalyerPlan {
uint256 planId;
uint256 startTime;
uint256 startBlock;
uint256 invested; //
uint256 atBlock; //
uint256 payEth;
bool isClose;
}
struct Plan {
uint256 interest; // interest per day %%
uint256 dayRange; // days, 0 means No time limit
uint256 min;
uint256 max;
}
}
contract MultiInvest {
using SafeMath for *;
address public devAddr_ = address(0xe6CE2a354a0BF26B5b383015B7E61701F6adb39C);
address public commuAddr_ = address(0x08F521636a2B117B554d04dc9E54fa4061161859);
//partner address
address public partnerAddr_ = address(0xEc31176d4df0509115abC8065A8a3F8275aafF2b);
bool public activated_ = false;
uint256 ruleSum_ = 6;
modifier isActivated() {
}
function activate() isAdmin() public {
require(<FILL_ME>)
require(address(partnerAddr_) != address(0x0), "Must setup partnerAddr_.");
require(address(commuAddr_) != address(0x0), "Must setup affiAddr_.");
require(activated_ == false, "Only once");
activated_ = true ;
}
mapping(address => uint256) private g_users ;
function initUsers() private {
}
modifier isAdmin() {
}
uint256 public G_NowUserId = 1000; //first user
uint256 public G_AllEth = 0;
uint256 G_DayBlocks = 5900;
mapping (address => uint256) public pIDxAddr_;
mapping (uint256 => SDDatasets.Player) public player_;
mapping (uint256 => SDDatasets.Plan) private plan_;
function GetIdByAddr(address addr) public
view returns(uint256)
{
}
function GetPlayerByUid(uint256 uid) public
view returns(uint256,uint256,uint256,uint256,uint256,uint256,uint256)
{
}
function GetPlanByUid(uint256 uid) public
view returns(uint256[],uint256[],uint256[],uint256[],uint256[],bool[])
{
}
function GetPlanTimeByUid(uint256 uid) public
view returns(uint256[])
{
}
constructor() public {
}
function register_(address addr, uint256 _affCode) private{
}
// this function called every time anyone sends a transaction to this contract
function () isActivated() external payable {
}
function invest(uint256 _affCode, uint256 _planId) isActivated() public payable {
}
function withdraw() isActivated() public payable {
}
function distributeRef(uint256 _eth, uint256 _affID) private{
}
}
| address(devAddr_)!=address(0x0),"Must setup devAddr_." | 361,525 | address(devAddr_)!=address(0x0) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.