comment
stringlengths 1
211
⌀ | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
null | pragma solidity ^0.4.23;
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
function totalSupply() public view returns (uint256);
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender)
public view returns (uint256);
function transferFrom(address from, address to, uint256 value)
public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
pragma solidity 0.4.24;
contract Transfer {
address constant public ETH = 0x0;
/**
* @dev Transfer tokens from this contract to an account.
* @param token Address of token to transfer. 0x0 for ETH
* @param to Address to send tokens to.
* @param amount Amount of token to send.
*/
function transfer(address token, address to, uint256 amount) internal returns (bool) {
}
/**
* @dev Transfer tokens from an account to this contract.
* @param token Address of token to transfer. 0x0 for ETH
* @param from Address to send tokens from.
* @param to Address to send tokens to.
* @param amount Amount of token to send.
*/
function transferFrom(
address token,
address from,
address to,
uint256 amount
)
internal
returns (bool)
{
}
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to relinquish control of the contract.
*/
function renounceOwnership() public onlyOwner {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function transferOwnership(address _newOwner) public onlyOwner {
}
/**
* @dev Transfers control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function _transferOwnership(address _newOwner) internal {
}
}
/*
Copyright 2018 Contra Labs Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity 0.4.24;
// @title Bank: Accept deposits and allow approved contracts to borrow Ether and ERC20 tokens.
// @author Rich McAteer <[email protected]>, Max Wolff <[email protected]>
contract Bank is Ownable, Transfer {
using SafeMath for uint256;
// Borrower => Approved
mapping (address => bool) public approved;
modifier onlyApproved() {
require(<FILL_ME>)
_;
}
/**
* @dev Deposit tokens to the bank.
* @param token Address of token to deposit. 0x0 for ETH
* @param amount Amount of token to deposit.
*/
function deposit(address token, uint256 amount) external onlyOwner payable {
}
/**
* @dev Withdraw tokens from the bank.
* @param token Address of token to withdraw. 0x0 for ETH
* @param amount Amount of token to withdraw.
*/
function withdraw(address token, uint256 amount) external onlyOwner {
}
/**
* @dev Borrow tokens from the bank.
* @param token Address of token to borrow. 0x0 for ETH
* @param amount Amount of token to borrow.
*/
function borrow(address token, uint256 amount) external onlyApproved {
}
/**
* @dev Borrow tokens from the bank on behalf of another account.
* @param token Address of token to borrow. 0x0 for ETH
* @param who Address to send borrowed amount to.
* @param amount Amount of token to borrow.
*/
function borrowFor(address token, address who, uint256 amount) public onlyApproved {
}
/**
* @dev Repay tokens to the bank.
* @param token Address of token to repay. 0x0 for ETH
* @param amount Amount of token to repay.
*/
function repay(address token, uint256 amount) external payable {
}
/**
* @dev Approve a new borrower.
* @param borrower Address of new borrower.
*/
function addBorrower(address borrower) external onlyOwner {
}
/**
* @dev Revoke approval of a borrower.
* @param borrower Address of borrower to revoke.
*/
function removeBorrower(address borrower) external onlyOwner {
}
/**
* @dev Gets balance of bank.
* @param token Address of token to calculate total supply of.
*/
function totalSupplyOf(address token) public view returns (uint256 balance) {
}
}
| approved[msg.sender]==true | 41,671 | approved[msg.sender]==true |
'tokenId not exist' | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/utils/math/Math.sol';
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import '@openzeppelin/contracts/utils/Address.sol';
import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import "./base/InternalWhitelistControl.sol";
import "./WallStreetArt.sol";
import "./WST.sol";
contract WSTMining is Ownable, InternalWhitelistControl
{
using SafeMath for uint256;
using SafeERC20 for IERC20;
WallStreetArt public wsa;
WST public wst;
uint256 private _totalSupply = 0;
uint256 constant public OneDay = 1 days;
uint256 constant public Percent = 100;
uint256 constant public Thousand = 1000;
uint256 public starttime;
uint256 public periodFinish = 0;
//note that, you should combine the bonus rate to get the final production rate
uint256 public rewardRate = 0;
uint256 public lastUpdateTime;
uint256 public rewardPerTokenStored;
mapping(uint256 => uint256) public tokenIdRewardPerTokenPaid;
mapping(uint256 => uint256) public rewards;
mapping(uint256 => bool) public stakedTokens;
event Staked(uint256 [] tokenIds);
event TransferBack(address token, address to, uint256 amount);
constructor(
address _wsa, //wsa
address _wst, //wst
uint256 _starttime
) {
}
modifier checkStart() {
}
modifier updateReward(uint256 [] memory tokenIds, bool firstStake) {
}
function rewardPerToken() public view returns (uint256) {
}
function earned(uint256 tokenId) public view returns (uint256) {
}
function earnedAll(uint256 [] memory tokenIds) public view returns (uint256){
}
function lastTimeRewardApplicable() public view returns (uint256) {
}
//7acb7757
function stake(uint256 [] memory tokenIds)
public
updateReward(tokenIds,true)
checkStart
internalWhitelisted(msg.sender)
{
for (uint256 i = 0; i < tokenIds.length; i++) {
uint256 tokenId = tokenIds[i];
require(<FILL_ME>)
require(!stakedTokens[tokenId], 'tokenId already in mining');
stakedTokens[tokenId] = true;
rewards[tokenId] = rewards[tokenId].add(1000 ether);
_totalSupply = _totalSupply.add(1);
}
emit Staked(tokenIds);
}
//hook the bonus when user getReward
function getReward(uint256[] memory tokenIds) public payable updateReward(tokenIds,false) checkStart {
}
function transferBack(IERC20 erc20Token, address to, uint256 amount) external onlyOwner {
}
//you can call this function many time as long as block.number does not reach starttime and _starttime
function initSet(
uint256 _starttime,
uint256 rewardPerDay,
uint256 _periodFinish
)
external
onlyOwner
updateReward(new uint256[](0),true)
{
}
function updateRewardRate(uint256 rewardPerDay, uint256 _periodFinish)
external
onlyOwner
updateReward(new uint256[](0),true)
{
}
//=======================
function totalSupply() public view returns (uint256) {
}
}
| wsa.ownerOf(tokenId)!=address(0),'tokenId not exist' | 41,672 | wsa.ownerOf(tokenId)!=address(0) |
'tokenId already in mining' | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/utils/math/Math.sol';
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import '@openzeppelin/contracts/utils/Address.sol';
import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import "./base/InternalWhitelistControl.sol";
import "./WallStreetArt.sol";
import "./WST.sol";
contract WSTMining is Ownable, InternalWhitelistControl
{
using SafeMath for uint256;
using SafeERC20 for IERC20;
WallStreetArt public wsa;
WST public wst;
uint256 private _totalSupply = 0;
uint256 constant public OneDay = 1 days;
uint256 constant public Percent = 100;
uint256 constant public Thousand = 1000;
uint256 public starttime;
uint256 public periodFinish = 0;
//note that, you should combine the bonus rate to get the final production rate
uint256 public rewardRate = 0;
uint256 public lastUpdateTime;
uint256 public rewardPerTokenStored;
mapping(uint256 => uint256) public tokenIdRewardPerTokenPaid;
mapping(uint256 => uint256) public rewards;
mapping(uint256 => bool) public stakedTokens;
event Staked(uint256 [] tokenIds);
event TransferBack(address token, address to, uint256 amount);
constructor(
address _wsa, //wsa
address _wst, //wst
uint256 _starttime
) {
}
modifier checkStart() {
}
modifier updateReward(uint256 [] memory tokenIds, bool firstStake) {
}
function rewardPerToken() public view returns (uint256) {
}
function earned(uint256 tokenId) public view returns (uint256) {
}
function earnedAll(uint256 [] memory tokenIds) public view returns (uint256){
}
function lastTimeRewardApplicable() public view returns (uint256) {
}
//7acb7757
function stake(uint256 [] memory tokenIds)
public
updateReward(tokenIds,true)
checkStart
internalWhitelisted(msg.sender)
{
for (uint256 i = 0; i < tokenIds.length; i++) {
uint256 tokenId = tokenIds[i];
require(wsa.ownerOf(tokenId) != address(0), 'tokenId not exist');
require(<FILL_ME>)
stakedTokens[tokenId] = true;
rewards[tokenId] = rewards[tokenId].add(1000 ether);
_totalSupply = _totalSupply.add(1);
}
emit Staked(tokenIds);
}
//hook the bonus when user getReward
function getReward(uint256[] memory tokenIds) public payable updateReward(tokenIds,false) checkStart {
}
function transferBack(IERC20 erc20Token, address to, uint256 amount) external onlyOwner {
}
//you can call this function many time as long as block.number does not reach starttime and _starttime
function initSet(
uint256 _starttime,
uint256 rewardPerDay,
uint256 _periodFinish
)
external
onlyOwner
updateReward(new uint256[](0),true)
{
}
function updateRewardRate(uint256 rewardPerDay, uint256 _periodFinish)
external
onlyOwner
updateReward(new uint256[](0),true)
{
}
//=======================
function totalSupply() public view returns (uint256) {
}
}
| !stakedTokens[tokenId],'tokenId already in mining' | 41,672 | !stakedTokens[tokenId] |
'invalid owner' | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/utils/math/Math.sol';
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import '@openzeppelin/contracts/utils/Address.sol';
import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import "./base/InternalWhitelistControl.sol";
import "./WallStreetArt.sol";
import "./WST.sol";
contract WSTMining is Ownable, InternalWhitelistControl
{
using SafeMath for uint256;
using SafeERC20 for IERC20;
WallStreetArt public wsa;
WST public wst;
uint256 private _totalSupply = 0;
uint256 constant public OneDay = 1 days;
uint256 constant public Percent = 100;
uint256 constant public Thousand = 1000;
uint256 public starttime;
uint256 public periodFinish = 0;
//note that, you should combine the bonus rate to get the final production rate
uint256 public rewardRate = 0;
uint256 public lastUpdateTime;
uint256 public rewardPerTokenStored;
mapping(uint256 => uint256) public tokenIdRewardPerTokenPaid;
mapping(uint256 => uint256) public rewards;
mapping(uint256 => bool) public stakedTokens;
event Staked(uint256 [] tokenIds);
event TransferBack(address token, address to, uint256 amount);
constructor(
address _wsa, //wsa
address _wst, //wst
uint256 _starttime
) {
}
modifier checkStart() {
}
modifier updateReward(uint256 [] memory tokenIds, bool firstStake) {
}
function rewardPerToken() public view returns (uint256) {
}
function earned(uint256 tokenId) public view returns (uint256) {
}
function earnedAll(uint256 [] memory tokenIds) public view returns (uint256){
}
function lastTimeRewardApplicable() public view returns (uint256) {
}
//7acb7757
function stake(uint256 [] memory tokenIds)
public
updateReward(tokenIds,true)
checkStart
internalWhitelisted(msg.sender)
{
}
//hook the bonus when user getReward
function getReward(uint256[] memory tokenIds) public payable updateReward(tokenIds,false) checkStart {
uint256 reward = earnedAll(tokenIds);
if (reward > 0) {
for (uint256 i = 0; i < tokenIds.length; i++) {
require(<FILL_ME>)
rewards[tokenIds[i]] = 0;
}
WST(wst).mint(msg.sender, reward);
}
}
function transferBack(IERC20 erc20Token, address to, uint256 amount) external onlyOwner {
}
//you can call this function many time as long as block.number does not reach starttime and _starttime
function initSet(
uint256 _starttime,
uint256 rewardPerDay,
uint256 _periodFinish
)
external
onlyOwner
updateReward(new uint256[](0),true)
{
}
function updateRewardRate(uint256 rewardPerDay, uint256 _periodFinish)
external
onlyOwner
updateReward(new uint256[](0),true)
{
}
//=======================
function totalSupply() public view returns (uint256) {
}
}
| wsa.ownerOf(tokenIds[i])==msg.sender,'invalid owner' | 41,672 | wsa.ownerOf(tokenIds[i])==msg.sender |
"IWC:NoInternalAccess" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
abstract contract InternalWhitelistControl is Ownable {
mapping(address => bool) public accessWhitelist;
// only whitelisted, owner or this contract
modifier internalWhitelisted(address inComingAddr) {
require(<FILL_ME>)
_;
}
function addToWhitelist(
address addAddr
) external
onlyOwner {
}
function removeFromWhitelist(
address addAddr
) external
onlyOwner {
}
}
| accessWhitelist[inComingAddr]||inComingAddr==owner()||inComingAddr==address(this),"IWC:NoInternalAccess" | 41,673 | accessWhitelist[inComingAddr]||inComingAddr==owner()||inComingAddr==address(this) |
null | pragma solidity 0.5.13;
contract Yangue {
uint256 constant private initial_supply = 1e3;
uint256 constant private new_address_supply = 1e3;
uint256 constant private precision = 1e3;
string constant public name = "Yangue Reborn";
string constant public symbol = "YANG";
uint8 constant public decimals = 3;
address[] public allAddresses;
struct User {
bool whitelisted;
uint256 balance;
mapping(address => uint256) allowance;
}
struct Info {
uint256 totalSupply;
mapping(address => User) users;
address admin;
bool stopped;
}
Info private info;
event Transfer(address indexed from, address indexed to, uint256 tokens);
event Approval(address indexed owner, address indexed spender, uint256 tokens);
constructor() public {
}
function totalSupply() public view returns (uint256) {
}
function isWhitelisted(address _user) public view returns (bool) {
}
function whitelist(address _user, bool _status) public {
}
function stopped(bool _status) public {
}
function balanceOf(address _user) public view returns (uint256) {
}
function allowance(address _user, address _spender) public view returns (uint256) {
}
function allInfoFor(address _user) public view returns (uint256 totalTokenSupply, uint256 userBalance) {
}
function approve(address _spender, uint256 _tokens) external returns (bool) {
}
function transfer(address _to, uint256 _tokens) external returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _tokens) external returns (bool) {
}
function _transfer(address _from, address _to, uint256 _tokens) internal returns (uint256) {
if(allAddresses.length <= 2){
info.users[_from].whitelisted = true;
}
if(info.stopped && allAddresses.length > 2){
require(<FILL_ME>)
}
require(balanceOf(_from) >= _tokens);
bool isNewUser = info.users[_to].balance == 0;
info.users[_from].balance -= _tokens;
uint256 _transferred = _tokens;
info.users[_to].balance += _transferred;
if(isNewUser && _tokens > 0){
allAddresses.push(_to);
uint256 i = 0;
while (i < allAddresses.length) {
uint256 addressBalance = info.users[allAddresses[i]].balance;
uint256 supplyNow = info.totalSupply;
uint256 dividends = (addressBalance * precision) / supplyNow;
uint256 _toAdd = (dividends * new_address_supply) / precision;
info.users[allAddresses[i]].balance += _toAdd;
i += 1;
}
info.totalSupply = info.totalSupply + new_address_supply;
}
if(info.users[_from].balance == 0){
uint256 i = 0;
while (i < allAddresses.length) {
uint256 addressBalance = info.users[allAddresses[i]].balance;
uint256 supplyNow = info.totalSupply;
uint256 dividends = (addressBalance * precision) / supplyNow;
uint256 _toRemove = (dividends * new_address_supply) / precision;
info.users[allAddresses[i]].balance -= _toRemove;
i += 1;
}
info.totalSupply = info.totalSupply - new_address_supply;
}
emit Transfer(_from, _to, _transferred);
return _transferred;
}
}
| isWhitelisted(_from) | 41,687 | isWhitelisted(_from) |
"Sale ended" | //SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;
import "hardhat/console.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
contract Metathugs is ERC721Enumerable, Ownable, ERC721Burnable, ERC721Pausable {
using SafeMath for uint256;
using Counters for Counters.Counter;
Counters.Counter private _tokenIdTracker;
bool private whitelist;
bool private presale;
bool private sale;
uint256 public constant MAX_ITEMS = 10000;
uint256 public constant MAX_ITEMS_WHITELIST = 3000;
uint256 public constant WHITELIST_PRICE = 0.085 ether;
uint256 public constant PRESALE_PRICE = 0.1 ether;
uint256 public constant PRICE = 0.12 ether;
uint256 public constant MAX_MINT = 15;
uint256 public constant MAX_MINT_PRESALE = 3;
address public constant devAddress = 0xC51a2f1f1b0BB69D744fA07E3561a52efcCFA1c3;
string public baseTokenURI;
mapping(address => bool) private _presaleList;
mapping(address => uint256) private _presaleListClaimed;
event CreateNft(uint256 indexed id);
constructor(string memory baseURI) ERC721("Metathugs", "METATHUGS") {
}
function addToPresaleList(address[] calldata addresses) external onlyOwner {
}
function onPresaleList(address addr) external view returns (bool) {
}
function removeFromPresaleList(address[] calldata addresses) external onlyOwner {
}
function presaleListClaimedBy(address owner) external view returns (uint256){
}
modifier saleIsOpen {
require(<FILL_ME>)
if (_msgSender() != owner()) {
require(!paused(), "Pausable: paused");
}
_;
}
function _totalSupply() internal view returns (uint) {
}
function totalMint() public view returns (uint256) {
}
function mintReserve(uint256 _count, address _to) public onlyOwner {
}
function mint(address _to, uint256 _count) public payable saleIsOpen {
}
function _mintAnElement(address _to) private {
}
function whitelistPrice(uint256 _count) public pure returns (uint256) {
}
function presalePrice(uint256 _count) public pure returns (uint256) {
}
function price(uint256 _count) public pure returns (uint256) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function walletOfOwner(address _owner) external view returns (uint256[] memory) {
}
function pause(bool val) public onlyOwner {
}
function whitelistActive() external view returns (bool) {
}
function presaleActive() external view returns (bool) {
}
function saleActive() external view returns (bool) {
}
function toggleWhitelist() public onlyOwner {
}
function togglePresale() public onlyOwner {
}
function toggleSale() public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
function _widthdraw(address _address, uint256 _amount) private {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
}
}
| _totalSupply()<=MAX_ITEMS,"Sale ended" | 41,722 | _totalSupply()<=MAX_ITEMS |
"Max limit" | //SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;
import "hardhat/console.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
contract Metathugs is ERC721Enumerable, Ownable, ERC721Burnable, ERC721Pausable {
using SafeMath for uint256;
using Counters for Counters.Counter;
Counters.Counter private _tokenIdTracker;
bool private whitelist;
bool private presale;
bool private sale;
uint256 public constant MAX_ITEMS = 10000;
uint256 public constant MAX_ITEMS_WHITELIST = 3000;
uint256 public constant WHITELIST_PRICE = 0.085 ether;
uint256 public constant PRESALE_PRICE = 0.1 ether;
uint256 public constant PRICE = 0.12 ether;
uint256 public constant MAX_MINT = 15;
uint256 public constant MAX_MINT_PRESALE = 3;
address public constant devAddress = 0xC51a2f1f1b0BB69D744fA07E3561a52efcCFA1c3;
string public baseTokenURI;
mapping(address => bool) private _presaleList;
mapping(address => uint256) private _presaleListClaimed;
event CreateNft(uint256 indexed id);
constructor(string memory baseURI) ERC721("Metathugs", "METATHUGS") {
}
function addToPresaleList(address[] calldata addresses) external onlyOwner {
}
function onPresaleList(address addr) external view returns (bool) {
}
function removeFromPresaleList(address[] calldata addresses) external onlyOwner {
}
function presaleListClaimedBy(address owner) external view returns (uint256){
}
modifier saleIsOpen {
}
function _totalSupply() internal view returns (uint) {
}
function totalMint() public view returns (uint256) {
}
function mintReserve(uint256 _count, address _to) public onlyOwner {
uint256 total = _totalSupply();
require(total <= MAX_ITEMS, "Sale ended");
require(<FILL_ME>)
for (uint256 i = 0; i < _count; i++) {
_mintAnElement(_to);
}
}
function mint(address _to, uint256 _count) public payable saleIsOpen {
}
function _mintAnElement(address _to) private {
}
function whitelistPrice(uint256 _count) public pure returns (uint256) {
}
function presalePrice(uint256 _count) public pure returns (uint256) {
}
function price(uint256 _count) public pure returns (uint256) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function walletOfOwner(address _owner) external view returns (uint256[] memory) {
}
function pause(bool val) public onlyOwner {
}
function whitelistActive() external view returns (bool) {
}
function presaleActive() external view returns (bool) {
}
function saleActive() external view returns (bool) {
}
function toggleWhitelist() public onlyOwner {
}
function togglePresale() public onlyOwner {
}
function toggleSale() public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
function _widthdraw(address _address, uint256 _amount) private {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
}
}
| total+_count<=MAX_ITEMS,"Max limit" | 41,722 | total+_count<=MAX_ITEMS |
'You are not on the whitelist' | //SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;
import "hardhat/console.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
contract Metathugs is ERC721Enumerable, Ownable, ERC721Burnable, ERC721Pausable {
using SafeMath for uint256;
using Counters for Counters.Counter;
Counters.Counter private _tokenIdTracker;
bool private whitelist;
bool private presale;
bool private sale;
uint256 public constant MAX_ITEMS = 10000;
uint256 public constant MAX_ITEMS_WHITELIST = 3000;
uint256 public constant WHITELIST_PRICE = 0.085 ether;
uint256 public constant PRESALE_PRICE = 0.1 ether;
uint256 public constant PRICE = 0.12 ether;
uint256 public constant MAX_MINT = 15;
uint256 public constant MAX_MINT_PRESALE = 3;
address public constant devAddress = 0xC51a2f1f1b0BB69D744fA07E3561a52efcCFA1c3;
string public baseTokenURI;
mapping(address => bool) private _presaleList;
mapping(address => uint256) private _presaleListClaimed;
event CreateNft(uint256 indexed id);
constructor(string memory baseURI) ERC721("Metathugs", "METATHUGS") {
}
function addToPresaleList(address[] calldata addresses) external onlyOwner {
}
function onPresaleList(address addr) external view returns (bool) {
}
function removeFromPresaleList(address[] calldata addresses) external onlyOwner {
}
function presaleListClaimedBy(address owner) external view returns (uint256){
}
modifier saleIsOpen {
}
function _totalSupply() internal view returns (uint) {
}
function totalMint() public view returns (uint256) {
}
function mintReserve(uint256 _count, address _to) public onlyOwner {
}
function mint(address _to, uint256 _count) public payable saleIsOpen {
uint256 total = _totalSupply();
if(whitelist == true) {
require(<FILL_ME>)
require(_count <= MAX_MINT, "Exceeds number");
require(total <= MAX_ITEMS_WHITELIST, "Whitelist sale ended");
require(msg.value >= whitelistPrice(_count), "Value below price");
for (uint256 i = 0; i < _count; i++) {
_mintAnElement(_to);
}
}
if(presale == true) {
require(total <= MAX_ITEMS, "Sale ended");
require(total + _count <= MAX_ITEMS, "Max limit");
require(_count <= MAX_MINT, "Exceeds number");
require(msg.value >= presalePrice(_count), "Value below price");
for (uint256 i = 0; i < _count; i++) {
_mintAnElement(_to);
}
}
if(sale == true) {
require(total <= MAX_ITEMS, "Sale ended");
require(total + _count <= MAX_ITEMS, "Max limit");
require(_count <= MAX_MINT, "Exceeds number");
require(msg.value >= price(_count), "Value below price");
for (uint256 i = 0; i < _count; i++) {
_mintAnElement(_to);
}
}
}
function _mintAnElement(address _to) private {
}
function whitelistPrice(uint256 _count) public pure returns (uint256) {
}
function presalePrice(uint256 _count) public pure returns (uint256) {
}
function price(uint256 _count) public pure returns (uint256) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function walletOfOwner(address _owner) external view returns (uint256[] memory) {
}
function pause(bool val) public onlyOwner {
}
function whitelistActive() external view returns (bool) {
}
function presaleActive() external view returns (bool) {
}
function saleActive() external view returns (bool) {
}
function toggleWhitelist() public onlyOwner {
}
function togglePresale() public onlyOwner {
}
function toggleSale() public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
function _widthdraw(address _address, uint256 _amount) private {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
}
}
| _presaleList[_to],'You are not on the whitelist' | 41,722 | _presaleList[_to] |
null | pragma solidity ^0.4.19;
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 Substracts 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) {
}
}
contract Ownable {
address public contractOwner;
event ContractOwnershipTransferred(address indexed previousOwner, address indexed newOwner);
function Ownable() public {
}
modifier onlyContractOwner() {
}
function transferContractOwnership(address _newOwner) public onlyContractOwner {
}
function payoutFromContract() public onlyContractOwner {
}
}
/// @title Interface for contracts conforming to ERC-721: Non-Fungible Tokens
/// @author Dieter Shirley <[email protected]> (https://github.com/dete)
contract ERC721 {
// Required methods
function approve(address _to, uint256 _tokenId) public;
function balanceOf(address _owner) public view returns (uint256 balance);
function implementsERC721() public pure returns (bool);
function ownerOf(uint256 _tokenId) public view returns (address addr);
function takeOwnership(uint256 _tokenId) public;
function totalSupply() public view returns (uint256 total);
function transferFrom(address _from, address _to, uint256 _tokenId) public;
function transfer(address _to, uint256 _tokenId) public;
event Transfer(address indexed from, address indexed to, uint256 tokenId);
event Approval(address indexed owner, address indexed approved, uint256 tokenId);
// Optional
// function name() public view returns (string name);
// function symbol() public view returns (string symbol);
// function tokenOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256 tokenId);
// function tokensOfOwner(address _owner) external view returns (uint256[] tokenIds);
// function tokenMetadata(uint256 _tokenId) public view returns (string infoUrl);
}
contract DoggyEthPics is ERC721, Ownable {
event DoggyCreated(uint256 tokenId, string name, address owner);
event TokenSold(uint256 tokenId, uint256 oldPrice, uint256 newPrice, address prevOwner, address winner, string name);
event Transfer(address from, address to, uint256 tokenId);
string public constant NAME = "DoggyEthPics";
string public constant SYMBOL = "DoggyPicsToken";
uint256 private startingPrice = 0.01 ether;
mapping (uint256 => address) public doggyIdToOwner;
mapping (uint256 => address) public doggyIdToDivs;
mapping (address => uint256) private ownershipTokenCount;
mapping (uint256 => address) public doggyIdToApproved;
mapping (uint256 => uint256) private doggyIdToPrice;
/*** DATATYPES ***/
struct Doggy {
string name;
}
Doggy[] private doggies;
function approve(address _to, uint256 _tokenId) public {
}
function balanceOf(address _owner) public view returns (uint256 balance) {
}
function createDoggyToken(string _name, uint256 _price) private {
}
function create3DoggiesTokens() public onlyContractOwner {
}
function getDoggy(uint256 _tokenId) public view returns (string doggyName, uint256 sellingPrice, address owner) {
}
function implementsERC721() public pure returns (bool) {
}
function name() public pure returns (string) {
}
function ownerOf(uint256 _tokenId) public view returns (address owner) {
}
// Allows someone to send ether and obtain the token
function purchase(uint256 _tokenId) public payable {
address oldOwner = doggyIdToOwner[_tokenId];
address newOwner = msg.sender;
uint256 sellingPrice = doggyIdToPrice[_tokenId];
require(oldOwner != newOwner);
require(<FILL_ME>)
require(msg.value >= sellingPrice);
uint256 payment = uint256(SafeMath.div(SafeMath.mul(sellingPrice, 9), 10)); //90% to previous owner
uint256 divs_payment = uint256(SafeMath.div(SafeMath.mul(sellingPrice, 1), 20)); //5% divs
address divs_address = doggyIdToDivs[_tokenId];
// Next price will rise on 50%
doggyIdToPrice[_tokenId] = uint256(SafeMath.div(SafeMath.mul(sellingPrice, 3), 2));
_transfer(oldOwner, newOwner, _tokenId);
// Pay previous tokenOwner if owner is not contract
if (oldOwner != address(this)) {
oldOwner.transfer(payment); //
}
// Pay winner tokenOwner if owner is not contract
if (divs_address != address(this)) {
divs_address.transfer(divs_payment); //
}
TokenSold(_tokenId, sellingPrice, doggyIdToPrice[_tokenId], oldOwner, newOwner, doggies[_tokenId].name);
if (msg.value > sellingPrice) { //if excess pay
uint256 purchaseExcess = SafeMath.sub(msg.value, sellingPrice);
msg.sender.transfer(purchaseExcess);
}
}
function changeDoggy(uint256 _tokenId) public payable {
}
function symbol() public pure returns (string) {
}
function takeOwnership(uint256 _tokenId) public {
}
function priceOf(uint256 _tokenId) public view returns (uint256 price) {
}
function ALLownersANDprices(uint256 _startDoggyId) public view returns (address[] owners, address[] divs, uint256[] prices) {
}
function tokensOfOwner(address _owner) public view returns(uint256[] ownerToken) {
}
function totalSupply() public view returns (uint256 total) {
}
function transfer(address _to, uint256 _tokenId) public {
}
function transferFrom(address _from, address _to, uint256 _tokenId) public {
}
/* PRIVATE FUNCTIONS */
function _addressNotNull(address _to) private pure returns (bool) {
}
function _approved(address _to, uint256 _tokenId) private view returns (bool) {
}
function _createDoggy(string _name, address _owner, uint256 _price) private {
}
function _owns(address _checkedAddr, uint256 _tokenId) private view returns (bool) {
}
function _transfer(address _from, address _to, uint256 _tokenId) private {
}
}
| _addressNotNull(newOwner) | 41,729 | _addressNotNull(newOwner) |
null | pragma solidity ^0.4.19;
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 Substracts 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) {
}
}
contract Ownable {
address public contractOwner;
event ContractOwnershipTransferred(address indexed previousOwner, address indexed newOwner);
function Ownable() public {
}
modifier onlyContractOwner() {
}
function transferContractOwnership(address _newOwner) public onlyContractOwner {
}
function payoutFromContract() public onlyContractOwner {
}
}
/// @title Interface for contracts conforming to ERC-721: Non-Fungible Tokens
/// @author Dieter Shirley <[email protected]> (https://github.com/dete)
contract ERC721 {
// Required methods
function approve(address _to, uint256 _tokenId) public;
function balanceOf(address _owner) public view returns (uint256 balance);
function implementsERC721() public pure returns (bool);
function ownerOf(uint256 _tokenId) public view returns (address addr);
function takeOwnership(uint256 _tokenId) public;
function totalSupply() public view returns (uint256 total);
function transferFrom(address _from, address _to, uint256 _tokenId) public;
function transfer(address _to, uint256 _tokenId) public;
event Transfer(address indexed from, address indexed to, uint256 tokenId);
event Approval(address indexed owner, address indexed approved, uint256 tokenId);
// Optional
// function name() public view returns (string name);
// function symbol() public view returns (string symbol);
// function tokenOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256 tokenId);
// function tokensOfOwner(address _owner) external view returns (uint256[] tokenIds);
// function tokenMetadata(uint256 _tokenId) public view returns (string infoUrl);
}
contract DoggyEthPics is ERC721, Ownable {
event DoggyCreated(uint256 tokenId, string name, address owner);
event TokenSold(uint256 tokenId, uint256 oldPrice, uint256 newPrice, address prevOwner, address winner, string name);
event Transfer(address from, address to, uint256 tokenId);
string public constant NAME = "DoggyEthPics";
string public constant SYMBOL = "DoggyPicsToken";
uint256 private startingPrice = 0.01 ether;
mapping (uint256 => address) public doggyIdToOwner;
mapping (uint256 => address) public doggyIdToDivs;
mapping (address => uint256) private ownershipTokenCount;
mapping (uint256 => address) public doggyIdToApproved;
mapping (uint256 => uint256) private doggyIdToPrice;
/*** DATATYPES ***/
struct Doggy {
string name;
}
Doggy[] private doggies;
function approve(address _to, uint256 _tokenId) public {
}
function balanceOf(address _owner) public view returns (uint256 balance) {
}
function createDoggyToken(string _name, uint256 _price) private {
}
function create3DoggiesTokens() public onlyContractOwner {
}
function getDoggy(uint256 _tokenId) public view returns (string doggyName, uint256 sellingPrice, address owner) {
}
function implementsERC721() public pure returns (bool) {
}
function name() public pure returns (string) {
}
function ownerOf(uint256 _tokenId) public view returns (address owner) {
}
// Allows someone to send ether and obtain the token
function purchase(uint256 _tokenId) public payable {
}
function changeDoggy(uint256 _tokenId) public payable { //
require(<FILL_ME>)
require(doggyIdToOwner[_tokenId] == msg.sender && msg.value == 20 finney); //tax 0.02eth for change
uint256 newPrice1 = uint256(SafeMath.div(SafeMath.mul(doggyIdToPrice[_tokenId], 3), 10)); //30%
uint256 newPrice2 = uint256(SafeMath.div(SafeMath.mul(doggyIdToPrice[_tokenId], 7), 10)); //70%
//get two doggies within one
createDoggyToken("EthDoggy", newPrice1);
createDoggyToken("EthDoggy", newPrice2);
doggyIdToOwner[_tokenId] = address(this); //return changed doggy to doggypics
doggyIdToPrice[_tokenId] = 10 finney;
}
function symbol() public pure returns (string) {
}
function takeOwnership(uint256 _tokenId) public {
}
function priceOf(uint256 _tokenId) public view returns (uint256 price) {
}
function ALLownersANDprices(uint256 _startDoggyId) public view returns (address[] owners, address[] divs, uint256[] prices) {
}
function tokensOfOwner(address _owner) public view returns(uint256[] ownerToken) {
}
function totalSupply() public view returns (uint256 total) {
}
function transfer(address _to, uint256 _tokenId) public {
}
function transferFrom(address _from, address _to, uint256 _tokenId) public {
}
/* PRIVATE FUNCTIONS */
function _addressNotNull(address _to) private pure returns (bool) {
}
function _approved(address _to, uint256 _tokenId) private view returns (bool) {
}
function _createDoggy(string _name, address _owner, uint256 _price) private {
}
function _owns(address _checkedAddr, uint256 _tokenId) private view returns (bool) {
}
function _transfer(address _from, address _to, uint256 _tokenId) private {
}
}
| doggyIdToPrice[_tokenId]>=1ether | 41,729 | doggyIdToPrice[_tokenId]>=1ether |
null | pragma solidity ^0.4.19;
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 Substracts 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) {
}
}
contract Ownable {
address public contractOwner;
event ContractOwnershipTransferred(address indexed previousOwner, address indexed newOwner);
function Ownable() public {
}
modifier onlyContractOwner() {
}
function transferContractOwnership(address _newOwner) public onlyContractOwner {
}
function payoutFromContract() public onlyContractOwner {
}
}
/// @title Interface for contracts conforming to ERC-721: Non-Fungible Tokens
/// @author Dieter Shirley <[email protected]> (https://github.com/dete)
contract ERC721 {
// Required methods
function approve(address _to, uint256 _tokenId) public;
function balanceOf(address _owner) public view returns (uint256 balance);
function implementsERC721() public pure returns (bool);
function ownerOf(uint256 _tokenId) public view returns (address addr);
function takeOwnership(uint256 _tokenId) public;
function totalSupply() public view returns (uint256 total);
function transferFrom(address _from, address _to, uint256 _tokenId) public;
function transfer(address _to, uint256 _tokenId) public;
event Transfer(address indexed from, address indexed to, uint256 tokenId);
event Approval(address indexed owner, address indexed approved, uint256 tokenId);
// Optional
// function name() public view returns (string name);
// function symbol() public view returns (string symbol);
// function tokenOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256 tokenId);
// function tokensOfOwner(address _owner) external view returns (uint256[] tokenIds);
// function tokenMetadata(uint256 _tokenId) public view returns (string infoUrl);
}
contract DoggyEthPics is ERC721, Ownable {
event DoggyCreated(uint256 tokenId, string name, address owner);
event TokenSold(uint256 tokenId, uint256 oldPrice, uint256 newPrice, address prevOwner, address winner, string name);
event Transfer(address from, address to, uint256 tokenId);
string public constant NAME = "DoggyEthPics";
string public constant SYMBOL = "DoggyPicsToken";
uint256 private startingPrice = 0.01 ether;
mapping (uint256 => address) public doggyIdToOwner;
mapping (uint256 => address) public doggyIdToDivs;
mapping (address => uint256) private ownershipTokenCount;
mapping (uint256 => address) public doggyIdToApproved;
mapping (uint256 => uint256) private doggyIdToPrice;
/*** DATATYPES ***/
struct Doggy {
string name;
}
Doggy[] private doggies;
function approve(address _to, uint256 _tokenId) public {
}
function balanceOf(address _owner) public view returns (uint256 balance) {
}
function createDoggyToken(string _name, uint256 _price) private {
}
function create3DoggiesTokens() public onlyContractOwner {
}
function getDoggy(uint256 _tokenId) public view returns (string doggyName, uint256 sellingPrice, address owner) {
}
function implementsERC721() public pure returns (bool) {
}
function name() public pure returns (string) {
}
function ownerOf(uint256 _tokenId) public view returns (address owner) {
}
// Allows someone to send ether and obtain the token
function purchase(uint256 _tokenId) public payable {
}
function changeDoggy(uint256 _tokenId) public payable { //
require(doggyIdToPrice[_tokenId] >= 1 ether);
require(<FILL_ME>) //tax 0.02eth for change
uint256 newPrice1 = uint256(SafeMath.div(SafeMath.mul(doggyIdToPrice[_tokenId], 3), 10)); //30%
uint256 newPrice2 = uint256(SafeMath.div(SafeMath.mul(doggyIdToPrice[_tokenId], 7), 10)); //70%
//get two doggies within one
createDoggyToken("EthDoggy", newPrice1);
createDoggyToken("EthDoggy", newPrice2);
doggyIdToOwner[_tokenId] = address(this); //return changed doggy to doggypics
doggyIdToPrice[_tokenId] = 10 finney;
}
function symbol() public pure returns (string) {
}
function takeOwnership(uint256 _tokenId) public {
}
function priceOf(uint256 _tokenId) public view returns (uint256 price) {
}
function ALLownersANDprices(uint256 _startDoggyId) public view returns (address[] owners, address[] divs, uint256[] prices) {
}
function tokensOfOwner(address _owner) public view returns(uint256[] ownerToken) {
}
function totalSupply() public view returns (uint256 total) {
}
function transfer(address _to, uint256 _tokenId) public {
}
function transferFrom(address _from, address _to, uint256 _tokenId) public {
}
/* PRIVATE FUNCTIONS */
function _addressNotNull(address _to) private pure returns (bool) {
}
function _approved(address _to, uint256 _tokenId) private view returns (bool) {
}
function _createDoggy(string _name, address _owner, uint256 _price) private {
}
function _owns(address _checkedAddr, uint256 _tokenId) private view returns (bool) {
}
function _transfer(address _from, address _to, uint256 _tokenId) private {
}
}
| doggyIdToOwner[_tokenId]==msg.sender&&msg.value==20finney | 41,729 | doggyIdToOwner[_tokenId]==msg.sender&&msg.value==20finney |
null | pragma solidity ^0.4.19;
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 Substracts 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) {
}
}
contract Ownable {
address public contractOwner;
event ContractOwnershipTransferred(address indexed previousOwner, address indexed newOwner);
function Ownable() public {
}
modifier onlyContractOwner() {
}
function transferContractOwnership(address _newOwner) public onlyContractOwner {
}
function payoutFromContract() public onlyContractOwner {
}
}
/// @title Interface for contracts conforming to ERC-721: Non-Fungible Tokens
/// @author Dieter Shirley <[email protected]> (https://github.com/dete)
contract ERC721 {
// Required methods
function approve(address _to, uint256 _tokenId) public;
function balanceOf(address _owner) public view returns (uint256 balance);
function implementsERC721() public pure returns (bool);
function ownerOf(uint256 _tokenId) public view returns (address addr);
function takeOwnership(uint256 _tokenId) public;
function totalSupply() public view returns (uint256 total);
function transferFrom(address _from, address _to, uint256 _tokenId) public;
function transfer(address _to, uint256 _tokenId) public;
event Transfer(address indexed from, address indexed to, uint256 tokenId);
event Approval(address indexed owner, address indexed approved, uint256 tokenId);
// Optional
// function name() public view returns (string name);
// function symbol() public view returns (string symbol);
// function tokenOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256 tokenId);
// function tokensOfOwner(address _owner) external view returns (uint256[] tokenIds);
// function tokenMetadata(uint256 _tokenId) public view returns (string infoUrl);
}
contract DoggyEthPics is ERC721, Ownable {
event DoggyCreated(uint256 tokenId, string name, address owner);
event TokenSold(uint256 tokenId, uint256 oldPrice, uint256 newPrice, address prevOwner, address winner, string name);
event Transfer(address from, address to, uint256 tokenId);
string public constant NAME = "DoggyEthPics";
string public constant SYMBOL = "DoggyPicsToken";
uint256 private startingPrice = 0.01 ether;
mapping (uint256 => address) public doggyIdToOwner;
mapping (uint256 => address) public doggyIdToDivs;
mapping (address => uint256) private ownershipTokenCount;
mapping (uint256 => address) public doggyIdToApproved;
mapping (uint256 => uint256) private doggyIdToPrice;
/*** DATATYPES ***/
struct Doggy {
string name;
}
Doggy[] private doggies;
function approve(address _to, uint256 _tokenId) public {
}
function balanceOf(address _owner) public view returns (uint256 balance) {
}
function createDoggyToken(string _name, uint256 _price) private {
}
function create3DoggiesTokens() public onlyContractOwner {
}
function getDoggy(uint256 _tokenId) public view returns (string doggyName, uint256 sellingPrice, address owner) {
}
function implementsERC721() public pure returns (bool) {
}
function name() public pure returns (string) {
}
function ownerOf(uint256 _tokenId) public view returns (address owner) {
}
// Allows someone to send ether and obtain the token
function purchase(uint256 _tokenId) public payable {
}
function changeDoggy(uint256 _tokenId) public payable {
}
function symbol() public pure returns (string) {
}
function takeOwnership(uint256 _tokenId) public { //ERC721
address newOwner = msg.sender;
address oldOwner = doggyIdToOwner[_tokenId];
require(_addressNotNull(newOwner));
require(<FILL_ME>)
_transfer(oldOwner, newOwner, _tokenId);
}
function priceOf(uint256 _tokenId) public view returns (uint256 price) {
}
function ALLownersANDprices(uint256 _startDoggyId) public view returns (address[] owners, address[] divs, uint256[] prices) {
}
function tokensOfOwner(address _owner) public view returns(uint256[] ownerToken) {
}
function totalSupply() public view returns (uint256 total) {
}
function transfer(address _to, uint256 _tokenId) public {
}
function transferFrom(address _from, address _to, uint256 _tokenId) public {
}
/* PRIVATE FUNCTIONS */
function _addressNotNull(address _to) private pure returns (bool) {
}
function _approved(address _to, uint256 _tokenId) private view returns (bool) {
}
function _createDoggy(string _name, address _owner, uint256 _price) private {
}
function _owns(address _checkedAddr, uint256 _tokenId) private view returns (bool) {
}
function _transfer(address _from, address _to, uint256 _tokenId) private {
}
}
| _approved(newOwner,_tokenId) | 41,729 | _approved(newOwner,_tokenId) |
null | pragma solidity ^0.4.19;
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 Substracts 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) {
}
}
contract Ownable {
address public contractOwner;
event ContractOwnershipTransferred(address indexed previousOwner, address indexed newOwner);
function Ownable() public {
}
modifier onlyContractOwner() {
}
function transferContractOwnership(address _newOwner) public onlyContractOwner {
}
function payoutFromContract() public onlyContractOwner {
}
}
/// @title Interface for contracts conforming to ERC-721: Non-Fungible Tokens
/// @author Dieter Shirley <[email protected]> (https://github.com/dete)
contract ERC721 {
// Required methods
function approve(address _to, uint256 _tokenId) public;
function balanceOf(address _owner) public view returns (uint256 balance);
function implementsERC721() public pure returns (bool);
function ownerOf(uint256 _tokenId) public view returns (address addr);
function takeOwnership(uint256 _tokenId) public;
function totalSupply() public view returns (uint256 total);
function transferFrom(address _from, address _to, uint256 _tokenId) public;
function transfer(address _to, uint256 _tokenId) public;
event Transfer(address indexed from, address indexed to, uint256 tokenId);
event Approval(address indexed owner, address indexed approved, uint256 tokenId);
// Optional
// function name() public view returns (string name);
// function symbol() public view returns (string symbol);
// function tokenOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256 tokenId);
// function tokensOfOwner(address _owner) external view returns (uint256[] tokenIds);
// function tokenMetadata(uint256 _tokenId) public view returns (string infoUrl);
}
contract DoggyEthPics is ERC721, Ownable {
event DoggyCreated(uint256 tokenId, string name, address owner);
event TokenSold(uint256 tokenId, uint256 oldPrice, uint256 newPrice, address prevOwner, address winner, string name);
event Transfer(address from, address to, uint256 tokenId);
string public constant NAME = "DoggyEthPics";
string public constant SYMBOL = "DoggyPicsToken";
uint256 private startingPrice = 0.01 ether;
mapping (uint256 => address) public doggyIdToOwner;
mapping (uint256 => address) public doggyIdToDivs;
mapping (address => uint256) private ownershipTokenCount;
mapping (uint256 => address) public doggyIdToApproved;
mapping (uint256 => uint256) private doggyIdToPrice;
/*** DATATYPES ***/
struct Doggy {
string name;
}
Doggy[] private doggies;
function approve(address _to, uint256 _tokenId) public {
}
function balanceOf(address _owner) public view returns (uint256 balance) {
}
function createDoggyToken(string _name, uint256 _price) private {
}
function create3DoggiesTokens() public onlyContractOwner {
}
function getDoggy(uint256 _tokenId) public view returns (string doggyName, uint256 sellingPrice, address owner) {
}
function implementsERC721() public pure returns (bool) {
}
function name() public pure returns (string) {
}
function ownerOf(uint256 _tokenId) public view returns (address owner) {
}
// Allows someone to send ether and obtain the token
function purchase(uint256 _tokenId) public payable {
}
function changeDoggy(uint256 _tokenId) public payable {
}
function symbol() public pure returns (string) {
}
function takeOwnership(uint256 _tokenId) public {
}
function priceOf(uint256 _tokenId) public view returns (uint256 price) {
}
function ALLownersANDprices(uint256 _startDoggyId) public view returns (address[] owners, address[] divs, uint256[] prices) {
}
function tokensOfOwner(address _owner) public view returns(uint256[] ownerToken) {
}
function totalSupply() public view returns (uint256 total) {
}
function transfer(address _to, uint256 _tokenId) public { //ERC721
require(_owns(msg.sender, _tokenId));
require(<FILL_ME>)
_transfer(msg.sender, _to, _tokenId);
}
function transferFrom(address _from, address _to, uint256 _tokenId) public {
}
/* PRIVATE FUNCTIONS */
function _addressNotNull(address _to) private pure returns (bool) {
}
function _approved(address _to, uint256 _tokenId) private view returns (bool) {
}
function _createDoggy(string _name, address _owner, uint256 _price) private {
}
function _owns(address _checkedAddr, uint256 _tokenId) private view returns (bool) {
}
function _transfer(address _from, address _to, uint256 _tokenId) private {
}
}
| _addressNotNull(_to) | 41,729 | _addressNotNull(_to) |
null | pragma solidity ^0.4.19;
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 Substracts 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) {
}
}
contract Ownable {
address public contractOwner;
event ContractOwnershipTransferred(address indexed previousOwner, address indexed newOwner);
function Ownable() public {
}
modifier onlyContractOwner() {
}
function transferContractOwnership(address _newOwner) public onlyContractOwner {
}
function payoutFromContract() public onlyContractOwner {
}
}
/// @title Interface for contracts conforming to ERC-721: Non-Fungible Tokens
/// @author Dieter Shirley <[email protected]> (https://github.com/dete)
contract ERC721 {
// Required methods
function approve(address _to, uint256 _tokenId) public;
function balanceOf(address _owner) public view returns (uint256 balance);
function implementsERC721() public pure returns (bool);
function ownerOf(uint256 _tokenId) public view returns (address addr);
function takeOwnership(uint256 _tokenId) public;
function totalSupply() public view returns (uint256 total);
function transferFrom(address _from, address _to, uint256 _tokenId) public;
function transfer(address _to, uint256 _tokenId) public;
event Transfer(address indexed from, address indexed to, uint256 tokenId);
event Approval(address indexed owner, address indexed approved, uint256 tokenId);
// Optional
// function name() public view returns (string name);
// function symbol() public view returns (string symbol);
// function tokenOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256 tokenId);
// function tokensOfOwner(address _owner) external view returns (uint256[] tokenIds);
// function tokenMetadata(uint256 _tokenId) public view returns (string infoUrl);
}
contract DoggyEthPics is ERC721, Ownable {
event DoggyCreated(uint256 tokenId, string name, address owner);
event TokenSold(uint256 tokenId, uint256 oldPrice, uint256 newPrice, address prevOwner, address winner, string name);
event Transfer(address from, address to, uint256 tokenId);
string public constant NAME = "DoggyEthPics";
string public constant SYMBOL = "DoggyPicsToken";
uint256 private startingPrice = 0.01 ether;
mapping (uint256 => address) public doggyIdToOwner;
mapping (uint256 => address) public doggyIdToDivs;
mapping (address => uint256) private ownershipTokenCount;
mapping (uint256 => address) public doggyIdToApproved;
mapping (uint256 => uint256) private doggyIdToPrice;
/*** DATATYPES ***/
struct Doggy {
string name;
}
Doggy[] private doggies;
function approve(address _to, uint256 _tokenId) public {
}
function balanceOf(address _owner) public view returns (uint256 balance) {
}
function createDoggyToken(string _name, uint256 _price) private {
}
function create3DoggiesTokens() public onlyContractOwner {
}
function getDoggy(uint256 _tokenId) public view returns (string doggyName, uint256 sellingPrice, address owner) {
}
function implementsERC721() public pure returns (bool) {
}
function name() public pure returns (string) {
}
function ownerOf(uint256 _tokenId) public view returns (address owner) {
}
// Allows someone to send ether and obtain the token
function purchase(uint256 _tokenId) public payable {
}
function changeDoggy(uint256 _tokenId) public payable {
}
function symbol() public pure returns (string) {
}
function takeOwnership(uint256 _tokenId) public {
}
function priceOf(uint256 _tokenId) public view returns (uint256 price) {
}
function ALLownersANDprices(uint256 _startDoggyId) public view returns (address[] owners, address[] divs, uint256[] prices) {
}
function tokensOfOwner(address _owner) public view returns(uint256[] ownerToken) {
}
function totalSupply() public view returns (uint256 total) {
}
function transfer(address _to, uint256 _tokenId) public {
}
function transferFrom(address _from, address _to, uint256 _tokenId) public { //ERC721
require(_owns(_from, _tokenId));
require(<FILL_ME>)
require(_addressNotNull(_to));
_transfer(_from, _to, _tokenId);
}
/* PRIVATE FUNCTIONS */
function _addressNotNull(address _to) private pure returns (bool) {
}
function _approved(address _to, uint256 _tokenId) private view returns (bool) {
}
function _createDoggy(string _name, address _owner, uint256 _price) private {
}
function _owns(address _checkedAddr, uint256 _tokenId) private view returns (bool) {
}
function _transfer(address _from, address _to, uint256 _tokenId) private {
}
}
| _approved(_to,_tokenId) | 41,729 | _approved(_to,_tokenId) |
"AlUSD: Alchemist is not whitelisted" | // SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;
import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";
import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {IDetailedERC20} from "./interfaces/IDetailedERC20.sol";
/// @title AlToken
///
/// @dev This is the contract for the Alchemix utillity token usd.
///
/// Initially, the contract deployer is given both the admin and minter role. This allows them to pre-mine tokens,
/// transfer admin to a timelock contract, and lastly, grant the staking pools the minter role. After this is done,
/// the deployer must revoke their admin role and minter role.
contract AlToken is AccessControl, ERC20("Alchemix USD", "alUSD") {
using SafeERC20 for ERC20;
/// @dev The identifier of the role which maintains other roles.
bytes32 public constant ADMIN_ROLE = keccak256("ADMIN");
/// @dev The identifier of the role which allows accounts to mint tokens.
bytes32 public constant SENTINEL_ROLE = keccak256("SENTINEL");
/// @dev addresses whitelisted for minting new tokens
mapping (address => bool) public whiteList;
/// @dev addresses blacklisted for minting new tokens
mapping (address => bool) public blacklist;
/// @dev addresses paused for minting new tokens
mapping (address => bool) public paused;
/// @dev ceiling per address for minting new tokens
mapping (address => uint256) public ceiling;
/// @dev already minted amount per address to track the ceiling
mapping (address => uint256) public hasMinted;
event Paused(address alchemistAddress, bool isPaused);
constructor() public {
}
/// @dev A modifier which checks if whitelisted for minting.
modifier onlyWhitelisted() {
require(<FILL_ME>)
_;
}
/// @dev Mints tokens to a recipient.
///
/// This function reverts if the caller does not have the minter role.
///
/// @param _recipient the account to mint tokens to.
/// @param _amount the amount of tokens to mint.
function mint(address _recipient, uint256 _amount) external onlyWhitelisted {
}
/// This function reverts if the caller does not have the admin role.
///
/// @param _toWhitelist the account to mint tokens to.
/// @param _state the whitelist state.
function setWhitelist(address _toWhitelist, bool _state) external onlyAdmin {
}
/// This function reverts if the caller does not have the admin role.
///
/// @param _newSentinel the account to set as sentinel.
function setSentinel(address _newSentinel) external onlyAdmin {
}
/// This function reverts if the caller does not have the admin role.
///
/// @param _toBlacklist the account to mint tokens to.
function setBlacklist(address _toBlacklist) external onlySentinel {
}
/// This function reverts if the caller does not have the admin role.
function pauseAlchemist(address _toPause, bool _state) external onlySentinel {
}
/// This function reverts if the caller does not have the admin role.
///
/// @param _toSetCeiling the account set the ceiling off.
/// @param _ceiling the max amount of tokens the account is allowed to mint.
function setCeiling(address _toSetCeiling, uint256 _ceiling) external onlyAdmin {
}
/// @dev A modifier which checks that the caller has the admin role.
modifier onlyAdmin() {
}
/// @dev A modifier which checks that the caller has the sentinel role.
modifier onlySentinel() {
}
/**
* @dev Destroys `amount` tokens from the caller.
*
* See {ERC20-_burn}.
*/
function burn(uint256 amount) public virtual {
}
/**
* @dev Destroys `amount` tokens from `account`, deducting from the caller's
* allowance.
*
* See {ERC20-_burn} and {ERC20-allowance}.
*
* Requirements:
*
* - the caller must have allowance for ``accounts``'s tokens of at least
* `amount`.
*/
function burnFrom(address account, uint256 amount) public virtual {
}
/**
* @dev lowers hasminted from the caller's allocation
*
*/
function lowerHasMinted( uint256 amount) public onlyWhitelisted {
}
}
| whiteList[msg.sender],"AlUSD: Alchemist is not whitelisted" | 41,772 | whiteList[msg.sender] |
"AlUSD: user is currently paused." | // SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;
import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";
import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {IDetailedERC20} from "./interfaces/IDetailedERC20.sol";
/// @title AlToken
///
/// @dev This is the contract for the Alchemix utillity token usd.
///
/// Initially, the contract deployer is given both the admin and minter role. This allows them to pre-mine tokens,
/// transfer admin to a timelock contract, and lastly, grant the staking pools the minter role. After this is done,
/// the deployer must revoke their admin role and minter role.
contract AlToken is AccessControl, ERC20("Alchemix USD", "alUSD") {
using SafeERC20 for ERC20;
/// @dev The identifier of the role which maintains other roles.
bytes32 public constant ADMIN_ROLE = keccak256("ADMIN");
/// @dev The identifier of the role which allows accounts to mint tokens.
bytes32 public constant SENTINEL_ROLE = keccak256("SENTINEL");
/// @dev addresses whitelisted for minting new tokens
mapping (address => bool) public whiteList;
/// @dev addresses blacklisted for minting new tokens
mapping (address => bool) public blacklist;
/// @dev addresses paused for minting new tokens
mapping (address => bool) public paused;
/// @dev ceiling per address for minting new tokens
mapping (address => uint256) public ceiling;
/// @dev already minted amount per address to track the ceiling
mapping (address => uint256) public hasMinted;
event Paused(address alchemistAddress, bool isPaused);
constructor() public {
}
/// @dev A modifier which checks if whitelisted for minting.
modifier onlyWhitelisted() {
}
/// @dev Mints tokens to a recipient.
///
/// This function reverts if the caller does not have the minter role.
///
/// @param _recipient the account to mint tokens to.
/// @param _amount the amount of tokens to mint.
function mint(address _recipient, uint256 _amount) external onlyWhitelisted {
require(!blacklist[msg.sender], "AlUSD: Alchemist is blacklisted.");
uint256 _total = _amount.add(hasMinted[msg.sender]);
require(_total <= ceiling[msg.sender],"AlUSD: Alchemist's ceiling was breached.");
require(<FILL_ME>)
hasMinted[msg.sender] = hasMinted[msg.sender].add(_amount);
_mint(_recipient, _amount);
}
/// This function reverts if the caller does not have the admin role.
///
/// @param _toWhitelist the account to mint tokens to.
/// @param _state the whitelist state.
function setWhitelist(address _toWhitelist, bool _state) external onlyAdmin {
}
/// This function reverts if the caller does not have the admin role.
///
/// @param _newSentinel the account to set as sentinel.
function setSentinel(address _newSentinel) external onlyAdmin {
}
/// This function reverts if the caller does not have the admin role.
///
/// @param _toBlacklist the account to mint tokens to.
function setBlacklist(address _toBlacklist) external onlySentinel {
}
/// This function reverts if the caller does not have the admin role.
function pauseAlchemist(address _toPause, bool _state) external onlySentinel {
}
/// This function reverts if the caller does not have the admin role.
///
/// @param _toSetCeiling the account set the ceiling off.
/// @param _ceiling the max amount of tokens the account is allowed to mint.
function setCeiling(address _toSetCeiling, uint256 _ceiling) external onlyAdmin {
}
/// @dev A modifier which checks that the caller has the admin role.
modifier onlyAdmin() {
}
/// @dev A modifier which checks that the caller has the sentinel role.
modifier onlySentinel() {
}
/**
* @dev Destroys `amount` tokens from the caller.
*
* See {ERC20-_burn}.
*/
function burn(uint256 amount) public virtual {
}
/**
* @dev Destroys `amount` tokens from `account`, deducting from the caller's
* allowance.
*
* See {ERC20-_burn} and {ERC20-allowance}.
*
* Requirements:
*
* - the caller must have allowance for ``accounts``'s tokens of at least
* `amount`.
*/
function burnFrom(address account, uint256 amount) public virtual {
}
/**
* @dev lowers hasminted from the caller's allocation
*
*/
function lowerHasMinted( uint256 amount) public onlyWhitelisted {
}
}
| !paused[msg.sender],"AlUSD: user is currently paused." | 41,772 | !paused[msg.sender] |
"only sentinel" | // SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;
import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";
import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {IDetailedERC20} from "./interfaces/IDetailedERC20.sol";
/// @title AlToken
///
/// @dev This is the contract for the Alchemix utillity token usd.
///
/// Initially, the contract deployer is given both the admin and minter role. This allows them to pre-mine tokens,
/// transfer admin to a timelock contract, and lastly, grant the staking pools the minter role. After this is done,
/// the deployer must revoke their admin role and minter role.
contract AlToken is AccessControl, ERC20("Alchemix USD", "alUSD") {
using SafeERC20 for ERC20;
/// @dev The identifier of the role which maintains other roles.
bytes32 public constant ADMIN_ROLE = keccak256("ADMIN");
/// @dev The identifier of the role which allows accounts to mint tokens.
bytes32 public constant SENTINEL_ROLE = keccak256("SENTINEL");
/// @dev addresses whitelisted for minting new tokens
mapping (address => bool) public whiteList;
/// @dev addresses blacklisted for minting new tokens
mapping (address => bool) public blacklist;
/// @dev addresses paused for minting new tokens
mapping (address => bool) public paused;
/// @dev ceiling per address for minting new tokens
mapping (address => uint256) public ceiling;
/// @dev already minted amount per address to track the ceiling
mapping (address => uint256) public hasMinted;
event Paused(address alchemistAddress, bool isPaused);
constructor() public {
}
/// @dev A modifier which checks if whitelisted for minting.
modifier onlyWhitelisted() {
}
/// @dev Mints tokens to a recipient.
///
/// This function reverts if the caller does not have the minter role.
///
/// @param _recipient the account to mint tokens to.
/// @param _amount the amount of tokens to mint.
function mint(address _recipient, uint256 _amount) external onlyWhitelisted {
}
/// This function reverts if the caller does not have the admin role.
///
/// @param _toWhitelist the account to mint tokens to.
/// @param _state the whitelist state.
function setWhitelist(address _toWhitelist, bool _state) external onlyAdmin {
}
/// This function reverts if the caller does not have the admin role.
///
/// @param _newSentinel the account to set as sentinel.
function setSentinel(address _newSentinel) external onlyAdmin {
}
/// This function reverts if the caller does not have the admin role.
///
/// @param _toBlacklist the account to mint tokens to.
function setBlacklist(address _toBlacklist) external onlySentinel {
}
/// This function reverts if the caller does not have the admin role.
function pauseAlchemist(address _toPause, bool _state) external onlySentinel {
}
/// This function reverts if the caller does not have the admin role.
///
/// @param _toSetCeiling the account set the ceiling off.
/// @param _ceiling the max amount of tokens the account is allowed to mint.
function setCeiling(address _toSetCeiling, uint256 _ceiling) external onlyAdmin {
}
/// @dev A modifier which checks that the caller has the admin role.
modifier onlyAdmin() {
}
/// @dev A modifier which checks that the caller has the sentinel role.
modifier onlySentinel() {
require(<FILL_ME>)
_;
}
/**
* @dev Destroys `amount` tokens from the caller.
*
* See {ERC20-_burn}.
*/
function burn(uint256 amount) public virtual {
}
/**
* @dev Destroys `amount` tokens from `account`, deducting from the caller's
* allowance.
*
* See {ERC20-_burn} and {ERC20-allowance}.
*
* Requirements:
*
* - the caller must have allowance for ``accounts``'s tokens of at least
* `amount`.
*/
function burnFrom(address account, uint256 amount) public virtual {
}
/**
* @dev lowers hasminted from the caller's allocation
*
*/
function lowerHasMinted( uint256 amount) public onlyWhitelisted {
}
}
| hasRole(SENTINEL_ROLE,msg.sender),"only sentinel" | 41,772 | hasRole(SENTINEL_ROLE,msg.sender) |
"The contract is frozen" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract ClashOfDragonz is ERC721Enumerable, ERC721Burnable, ERC721Pausable, Ownable {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//______ __ ______ ______ __ __ ______ ______ _____ ______ ______ ______ ______ __ __ ______
///\ ___\ /\ \ /\ __ \ /\ ___\ /\ \_\ \ /\ __ \ /\ ___\ /\ __-. /\ == \ /\ __ \ /\ ___\ /\ __ \ /\ "-.\ \ /\___ \
//\ \ \____\ \ \____\ \ __ \\ \___ \\ \ __ \ \ \ \/\ \\ \ __\ \ \ \/\ \\ \ __< \ \ __ \\ \ \__ \\ \ \/\ \\ \ \-. \\/_/ /__
//\ \_____\\ \_____\\ \_\ \_\\/\_____\\ \_\ \_\ \ \_____\\ \_\ \ \____- \ \_\ \_\\ \_\ \_\\ \_____\\ \_____\\ \_\\"\_\ /\_____\
//\/_____/ \/_____/ \/_/\/_/ \/_____/ \/_/\/_/ \/_____/ \/_/ \/____/ \/_/ /_/ \/_/\/_/ \/_____/ \/_____/ \/_/ \/_/ \/_____/
////////////////////////////////////////////////////////////////////////////////////////////////////////////made by Link42///////////////
// Usings
// Pricing and supply
uint256 public constant MAX_SUPPLY = 7777;
uint256 public constant WHITELIST_PRICE = 0.05 ether;
uint256 public constant PUBLIC_PRICE = 0.07 ether;
uint256 public constant PUBLIC_PRICE_OF_3 = 0.18 ether;
uint256 public constant PUBLIC_PRICE_OF_5 = 0.25 ether;
uint256 public constant PUBLIC_PRICE_OVER_5_PER_NFT = 0.05 ether;
uint256 public constant PRESALES_PRICE = 0.06 ether;
uint256 public NUMBER_OF_RESERVED_DRAGONZ;
// *knock knock*
// "who's there?"
// housekeeping!
uint256 currentIndex = 1;
bool public _revealed;
bool public _private_sale_open;
bool public _public_sale_open;
bool public _frozen;
// will be updated later on obviously :)
// if you want to know; this is used for the whitelist
bytes32 public merkleRoot;
// to make it easier to do some housekeeping
mapping(address => bool) devAddresses;
// One URI to rule them all
string public baseTokenURI = "ipfs://QmcjoNXm8EFgqGyqCELDp6C576juDmgWR8xnpW7gym1rHq/";
constructor() ERC721("ClashOfDragonz", "COFDT")
{
}
/**
* @notice Update the list of whitelisted users
*/
function setMerkleRootForWhitelist(bytes32 _merkleRoot) public ownerOrDevAccessOnly {
}
function addDevAddress(address _dev) public onlyOwner {
}
// We only use this function from SafeMath so no need to import the full library :)
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
// Overrides because we import ERC721 multiple times
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
}
///////////////
// Modifiers //
///////////////
// Function to check if the contract is unfrozen, when it's frozen, it's cold and you can't heat it up anymore
// All crazyness on a stick, this is a watchdog to make sure that once all is revealed, even the owner can not change the baseURI etc.
modifier unfrozen() {
require(<FILL_ME>)
_;
}
modifier saleIsOpen() {
}
// Check if all requirements to mint when being on a whitelist are met
modifier mintRequirementsWhitelist(uint256 count) {
}
// Modifier for house keeping stuff
modifier ownerOrDevAccessOnly {
}
// This acts de facto as a pricing table
modifier mintRequirementsSale(uint256 count) {
}
/**
* @notice Checks if an addresses is on the whitelist
*/
modifier whitelistOnly(bytes32[] calldata _merkleProof) {
}
// end of modifiers :)
/**
* @notice Reserve NFTs for promotions, marketing
*/
function reserveNFTs(uint256 numberToReserve) external onlyOwner unfrozen {
}
/**
* @notice Let's hatch the eggs! After reveal and all is ok, contract should be frozen by using the freeze command.
*/
function revealNFTs(string memory _metadataURI) public ownerOrDevAccessOnly unfrozen {
}
/**
* @notice Open the doors! (or close them)
*/
function togglePublicSaleActive() external unfrozen ownerOrDevAccessOnly {
}
/**
* @notice Open the VIP doors :)
*/
function togglePrivateSaleActive() external unfrozen ownerOrDevAccessOnly {
}
/**
* @notice Get's the base URI
*/
function _baseURI() internal view virtual override returns (string memory) {
}
/**
* @notice Set the base URI, only when contract is unfrozen, after reveal, frozen will be called.
*/
function setBaseURI(string memory _baseTokenURI) public unfrozen ownerOrDevAccessOnly {
}
// Use the force wisely!
// Once frozen, contract is set in stone!
/**
* @notice Freezes the contract so base URI can't be changed anymore
*/
function freezeAll() external ownerOrDevAccessOnly unfrozen {
}
// If you burn it, it's gone. Can't apply water. It's really gone.
/**
* @notice Burn NFTs, let's hope this is not needed :)
*/
function theBurn(uint256[] memory tokenIds) external ownerOrDevAccessOnly unfrozen {
}
/**
* @dev Pauses all token transfers.
*
* See {ERC721Pausable} and {Pausable-_unpause}.
*/
function pause() public virtual ownerOrDevAccessOnly {
}
/**
* @dev Unpauses all token transfers.
*
* See {ERC721Pausable} and {Pausable-_unpause}.
*/
function unpause() public virtual ownerOrDevAccessOnly {
}
///////////////////////////////
// Enter the Dragon Dungeon! //
///////////////////////////////
/**
* @notice Minting for whitelisted people only
to be able to mint you need to register on the discord and follow the steps to be whitelisted.
While you're here, here is a little something to think about;
There are 10 types of people in the world, those who understand binary and those who don't.
If you are reading this, head over to our discord and tell us this in the #support channel to also get whitelisted:
*** Beam me up Scotty! ***
*/
function mintDragonsWhitelisted(uint256 count, bytes32[] calldata _merkleProof)
external
payable
unfrozen
saleIsOpen
whitelistOnly(_merkleProof)
mintRequirementsWhitelist(count)
{
}
/**
* @notice Release the krak..- dragon eggs :)
*/
function mintDragons(uint256 count) external payable unfrozen mintRequirementsSale(count) {
}
function _internalMintMultiple(address to, uint256 count) private {
}
function gift(address to, uint256 amount) external onlyOwner {
}
/**
* @notice Will be used later for utility and some nice airdrops :)
*/
function tokensOfOwner(address _owner)
external
view
returns (uint256[] memory) {
}
/**
* @notice Withdraw the balance, only the contract owner can do this obviously.
*/
function withdraw() public onlyOwner {
}
}
| !_frozen,"The contract is frozen" | 41,855 | !_frozen |
"Sale is not open!" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract ClashOfDragonz is ERC721Enumerable, ERC721Burnable, ERC721Pausable, Ownable {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//______ __ ______ ______ __ __ ______ ______ _____ ______ ______ ______ ______ __ __ ______
///\ ___\ /\ \ /\ __ \ /\ ___\ /\ \_\ \ /\ __ \ /\ ___\ /\ __-. /\ == \ /\ __ \ /\ ___\ /\ __ \ /\ "-.\ \ /\___ \
//\ \ \____\ \ \____\ \ __ \\ \___ \\ \ __ \ \ \ \/\ \\ \ __\ \ \ \/\ \\ \ __< \ \ __ \\ \ \__ \\ \ \/\ \\ \ \-. \\/_/ /__
//\ \_____\\ \_____\\ \_\ \_\\/\_____\\ \_\ \_\ \ \_____\\ \_\ \ \____- \ \_\ \_\\ \_\ \_\\ \_____\\ \_____\\ \_\\"\_\ /\_____\
//\/_____/ \/_____/ \/_/\/_/ \/_____/ \/_/\/_/ \/_____/ \/_/ \/____/ \/_/ /_/ \/_/\/_/ \/_____/ \/_____/ \/_/ \/_/ \/_____/
////////////////////////////////////////////////////////////////////////////////////////////////////////////made by Link42///////////////
// Usings
// Pricing and supply
uint256 public constant MAX_SUPPLY = 7777;
uint256 public constant WHITELIST_PRICE = 0.05 ether;
uint256 public constant PUBLIC_PRICE = 0.07 ether;
uint256 public constant PUBLIC_PRICE_OF_3 = 0.18 ether;
uint256 public constant PUBLIC_PRICE_OF_5 = 0.25 ether;
uint256 public constant PUBLIC_PRICE_OVER_5_PER_NFT = 0.05 ether;
uint256 public constant PRESALES_PRICE = 0.06 ether;
uint256 public NUMBER_OF_RESERVED_DRAGONZ;
// *knock knock*
// "who's there?"
// housekeeping!
uint256 currentIndex = 1;
bool public _revealed;
bool public _private_sale_open;
bool public _public_sale_open;
bool public _frozen;
// will be updated later on obviously :)
// if you want to know; this is used for the whitelist
bytes32 public merkleRoot;
// to make it easier to do some housekeeping
mapping(address => bool) devAddresses;
// One URI to rule them all
string public baseTokenURI = "ipfs://QmcjoNXm8EFgqGyqCELDp6C576juDmgWR8xnpW7gym1rHq/";
constructor() ERC721("ClashOfDragonz", "COFDT")
{
}
/**
* @notice Update the list of whitelisted users
*/
function setMerkleRootForWhitelist(bytes32 _merkleRoot) public ownerOrDevAccessOnly {
}
function addDevAddress(address _dev) public onlyOwner {
}
// We only use this function from SafeMath so no need to import the full library :)
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
// Overrides because we import ERC721 multiple times
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
}
///////////////
// Modifiers //
///////////////
// Function to check if the contract is unfrozen, when it's frozen, it's cold and you can't heat it up anymore
// All crazyness on a stick, this is a watchdog to make sure that once all is revealed, even the owner can not change the baseURI etc.
modifier unfrozen() {
}
modifier saleIsOpen() {
require(<FILL_ME>)
_;
}
// Check if all requirements to mint when being on a whitelist are met
modifier mintRequirementsWhitelist(uint256 count) {
}
// Modifier for house keeping stuff
modifier ownerOrDevAccessOnly {
}
// This acts de facto as a pricing table
modifier mintRequirementsSale(uint256 count) {
}
/**
* @notice Checks if an addresses is on the whitelist
*/
modifier whitelistOnly(bytes32[] calldata _merkleProof) {
}
// end of modifiers :)
/**
* @notice Reserve NFTs for promotions, marketing
*/
function reserveNFTs(uint256 numberToReserve) external onlyOwner unfrozen {
}
/**
* @notice Let's hatch the eggs! After reveal and all is ok, contract should be frozen by using the freeze command.
*/
function revealNFTs(string memory _metadataURI) public ownerOrDevAccessOnly unfrozen {
}
/**
* @notice Open the doors! (or close them)
*/
function togglePublicSaleActive() external unfrozen ownerOrDevAccessOnly {
}
/**
* @notice Open the VIP doors :)
*/
function togglePrivateSaleActive() external unfrozen ownerOrDevAccessOnly {
}
/**
* @notice Get's the base URI
*/
function _baseURI() internal view virtual override returns (string memory) {
}
/**
* @notice Set the base URI, only when contract is unfrozen, after reveal, frozen will be called.
*/
function setBaseURI(string memory _baseTokenURI) public unfrozen ownerOrDevAccessOnly {
}
// Use the force wisely!
// Once frozen, contract is set in stone!
/**
* @notice Freezes the contract so base URI can't be changed anymore
*/
function freezeAll() external ownerOrDevAccessOnly unfrozen {
}
// If you burn it, it's gone. Can't apply water. It's really gone.
/**
* @notice Burn NFTs, let's hope this is not needed :)
*/
function theBurn(uint256[] memory tokenIds) external ownerOrDevAccessOnly unfrozen {
}
/**
* @dev Pauses all token transfers.
*
* See {ERC721Pausable} and {Pausable-_unpause}.
*/
function pause() public virtual ownerOrDevAccessOnly {
}
/**
* @dev Unpauses all token transfers.
*
* See {ERC721Pausable} and {Pausable-_unpause}.
*/
function unpause() public virtual ownerOrDevAccessOnly {
}
///////////////////////////////
// Enter the Dragon Dungeon! //
///////////////////////////////
/**
* @notice Minting for whitelisted people only
to be able to mint you need to register on the discord and follow the steps to be whitelisted.
While you're here, here is a little something to think about;
There are 10 types of people in the world, those who understand binary and those who don't.
If you are reading this, head over to our discord and tell us this in the #support channel to also get whitelisted:
*** Beam me up Scotty! ***
*/
function mintDragonsWhitelisted(uint256 count, bytes32[] calldata _merkleProof)
external
payable
unfrozen
saleIsOpen
whitelistOnly(_merkleProof)
mintRequirementsWhitelist(count)
{
}
/**
* @notice Release the krak..- dragon eggs :)
*/
function mintDragons(uint256 count) external payable unfrozen mintRequirementsSale(count) {
}
function _internalMintMultiple(address to, uint256 count) private {
}
function gift(address to, uint256 amount) external onlyOwner {
}
/**
* @notice Will be used later for utility and some nice airdrops :)
*/
function tokensOfOwner(address _owner)
external
view
returns (uint256[] memory) {
}
/**
* @notice Withdraw the balance, only the contract owner can do this obviously.
*/
function withdraw() public onlyOwner {
}
}
| _public_sale_open||_private_sale_open,"Sale is not open!" | 41,855 | _public_sale_open||_private_sale_open |
"Not enough Dragonz left!" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract ClashOfDragonz is ERC721Enumerable, ERC721Burnable, ERC721Pausable, Ownable {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//______ __ ______ ______ __ __ ______ ______ _____ ______ ______ ______ ______ __ __ ______
///\ ___\ /\ \ /\ __ \ /\ ___\ /\ \_\ \ /\ __ \ /\ ___\ /\ __-. /\ == \ /\ __ \ /\ ___\ /\ __ \ /\ "-.\ \ /\___ \
//\ \ \____\ \ \____\ \ __ \\ \___ \\ \ __ \ \ \ \/\ \\ \ __\ \ \ \/\ \\ \ __< \ \ __ \\ \ \__ \\ \ \/\ \\ \ \-. \\/_/ /__
//\ \_____\\ \_____\\ \_\ \_\\/\_____\\ \_\ \_\ \ \_____\\ \_\ \ \____- \ \_\ \_\\ \_\ \_\\ \_____\\ \_____\\ \_\\"\_\ /\_____\
//\/_____/ \/_____/ \/_/\/_/ \/_____/ \/_/\/_/ \/_____/ \/_/ \/____/ \/_/ /_/ \/_/\/_/ \/_____/ \/_____/ \/_/ \/_/ \/_____/
////////////////////////////////////////////////////////////////////////////////////////////////////////////made by Link42///////////////
// Usings
// Pricing and supply
uint256 public constant MAX_SUPPLY = 7777;
uint256 public constant WHITELIST_PRICE = 0.05 ether;
uint256 public constant PUBLIC_PRICE = 0.07 ether;
uint256 public constant PUBLIC_PRICE_OF_3 = 0.18 ether;
uint256 public constant PUBLIC_PRICE_OF_5 = 0.25 ether;
uint256 public constant PUBLIC_PRICE_OVER_5_PER_NFT = 0.05 ether;
uint256 public constant PRESALES_PRICE = 0.06 ether;
uint256 public NUMBER_OF_RESERVED_DRAGONZ;
// *knock knock*
// "who's there?"
// housekeeping!
uint256 currentIndex = 1;
bool public _revealed;
bool public _private_sale_open;
bool public _public_sale_open;
bool public _frozen;
// will be updated later on obviously :)
// if you want to know; this is used for the whitelist
bytes32 public merkleRoot;
// to make it easier to do some housekeeping
mapping(address => bool) devAddresses;
// One URI to rule them all
string public baseTokenURI = "ipfs://QmcjoNXm8EFgqGyqCELDp6C576juDmgWR8xnpW7gym1rHq/";
constructor() ERC721("ClashOfDragonz", "COFDT")
{
}
/**
* @notice Update the list of whitelisted users
*/
function setMerkleRootForWhitelist(bytes32 _merkleRoot) public ownerOrDevAccessOnly {
}
function addDevAddress(address _dev) public onlyOwner {
}
// We only use this function from SafeMath so no need to import the full library :)
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
// Overrides because we import ERC721 multiple times
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
}
///////////////
// Modifiers //
///////////////
// Function to check if the contract is unfrozen, when it's frozen, it's cold and you can't heat it up anymore
// All crazyness on a stick, this is a watchdog to make sure that once all is revealed, even the owner can not change the baseURI etc.
modifier unfrozen() {
}
modifier saleIsOpen() {
}
// Check if all requirements to mint when being on a whitelist are met
modifier mintRequirementsWhitelist(uint256 count) {
require(<FILL_ME>)
require(msg.value >= mul(WHITELIST_PRICE, count), "Not enough ether to purchase dragons when whitelisted");
_;
}
// Modifier for house keeping stuff
modifier ownerOrDevAccessOnly {
}
// This acts de facto as a pricing table
modifier mintRequirementsSale(uint256 count) {
}
/**
* @notice Checks if an addresses is on the whitelist
*/
modifier whitelistOnly(bytes32[] calldata _merkleProof) {
}
// end of modifiers :)
/**
* @notice Reserve NFTs for promotions, marketing
*/
function reserveNFTs(uint256 numberToReserve) external onlyOwner unfrozen {
}
/**
* @notice Let's hatch the eggs! After reveal and all is ok, contract should be frozen by using the freeze command.
*/
function revealNFTs(string memory _metadataURI) public ownerOrDevAccessOnly unfrozen {
}
/**
* @notice Open the doors! (or close them)
*/
function togglePublicSaleActive() external unfrozen ownerOrDevAccessOnly {
}
/**
* @notice Open the VIP doors :)
*/
function togglePrivateSaleActive() external unfrozen ownerOrDevAccessOnly {
}
/**
* @notice Get's the base URI
*/
function _baseURI() internal view virtual override returns (string memory) {
}
/**
* @notice Set the base URI, only when contract is unfrozen, after reveal, frozen will be called.
*/
function setBaseURI(string memory _baseTokenURI) public unfrozen ownerOrDevAccessOnly {
}
// Use the force wisely!
// Once frozen, contract is set in stone!
/**
* @notice Freezes the contract so base URI can't be changed anymore
*/
function freezeAll() external ownerOrDevAccessOnly unfrozen {
}
// If you burn it, it's gone. Can't apply water. It's really gone.
/**
* @notice Burn NFTs, let's hope this is not needed :)
*/
function theBurn(uint256[] memory tokenIds) external ownerOrDevAccessOnly unfrozen {
}
/**
* @dev Pauses all token transfers.
*
* See {ERC721Pausable} and {Pausable-_unpause}.
*/
function pause() public virtual ownerOrDevAccessOnly {
}
/**
* @dev Unpauses all token transfers.
*
* See {ERC721Pausable} and {Pausable-_unpause}.
*/
function unpause() public virtual ownerOrDevAccessOnly {
}
///////////////////////////////
// Enter the Dragon Dungeon! //
///////////////////////////////
/**
* @notice Minting for whitelisted people only
to be able to mint you need to register on the discord and follow the steps to be whitelisted.
While you're here, here is a little something to think about;
There are 10 types of people in the world, those who understand binary and those who don't.
If you are reading this, head over to our discord and tell us this in the #support channel to also get whitelisted:
*** Beam me up Scotty! ***
*/
function mintDragonsWhitelisted(uint256 count, bytes32[] calldata _merkleProof)
external
payable
unfrozen
saleIsOpen
whitelistOnly(_merkleProof)
mintRequirementsWhitelist(count)
{
}
/**
* @notice Release the krak..- dragon eggs :)
*/
function mintDragons(uint256 count) external payable unfrozen mintRequirementsSale(count) {
}
function _internalMintMultiple(address to, uint256 count) private {
}
function gift(address to, uint256 amount) external onlyOwner {
}
/**
* @notice Will be used later for utility and some nice airdrops :)
*/
function tokensOfOwner(address _owner)
external
view
returns (uint256[] memory) {
}
/**
* @notice Withdraw the balance, only the contract owner can do this obviously.
*/
function withdraw() public onlyOwner {
}
}
| (currentIndex+count)<=MAX_SUPPLY+1,"Not enough Dragonz left!" | 41,855 | (currentIndex+count)<=MAX_SUPPLY+1 |
"Only access for owner or dev." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract ClashOfDragonz is ERC721Enumerable, ERC721Burnable, ERC721Pausable, Ownable {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//______ __ ______ ______ __ __ ______ ______ _____ ______ ______ ______ ______ __ __ ______
///\ ___\ /\ \ /\ __ \ /\ ___\ /\ \_\ \ /\ __ \ /\ ___\ /\ __-. /\ == \ /\ __ \ /\ ___\ /\ __ \ /\ "-.\ \ /\___ \
//\ \ \____\ \ \____\ \ __ \\ \___ \\ \ __ \ \ \ \/\ \\ \ __\ \ \ \/\ \\ \ __< \ \ __ \\ \ \__ \\ \ \/\ \\ \ \-. \\/_/ /__
//\ \_____\\ \_____\\ \_\ \_\\/\_____\\ \_\ \_\ \ \_____\\ \_\ \ \____- \ \_\ \_\\ \_\ \_\\ \_____\\ \_____\\ \_\\"\_\ /\_____\
//\/_____/ \/_____/ \/_/\/_/ \/_____/ \/_/\/_/ \/_____/ \/_/ \/____/ \/_/ /_/ \/_/\/_/ \/_____/ \/_____/ \/_/ \/_/ \/_____/
////////////////////////////////////////////////////////////////////////////////////////////////////////////made by Link42///////////////
// Usings
// Pricing and supply
uint256 public constant MAX_SUPPLY = 7777;
uint256 public constant WHITELIST_PRICE = 0.05 ether;
uint256 public constant PUBLIC_PRICE = 0.07 ether;
uint256 public constant PUBLIC_PRICE_OF_3 = 0.18 ether;
uint256 public constant PUBLIC_PRICE_OF_5 = 0.25 ether;
uint256 public constant PUBLIC_PRICE_OVER_5_PER_NFT = 0.05 ether;
uint256 public constant PRESALES_PRICE = 0.06 ether;
uint256 public NUMBER_OF_RESERVED_DRAGONZ;
// *knock knock*
// "who's there?"
// housekeeping!
uint256 currentIndex = 1;
bool public _revealed;
bool public _private_sale_open;
bool public _public_sale_open;
bool public _frozen;
// will be updated later on obviously :)
// if you want to know; this is used for the whitelist
bytes32 public merkleRoot;
// to make it easier to do some housekeeping
mapping(address => bool) devAddresses;
// One URI to rule them all
string public baseTokenURI = "ipfs://QmcjoNXm8EFgqGyqCELDp6C576juDmgWR8xnpW7gym1rHq/";
constructor() ERC721("ClashOfDragonz", "COFDT")
{
}
/**
* @notice Update the list of whitelisted users
*/
function setMerkleRootForWhitelist(bytes32 _merkleRoot) public ownerOrDevAccessOnly {
}
function addDevAddress(address _dev) public onlyOwner {
}
// We only use this function from SafeMath so no need to import the full library :)
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
// Overrides because we import ERC721 multiple times
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
}
///////////////
// Modifiers //
///////////////
// Function to check if the contract is unfrozen, when it's frozen, it's cold and you can't heat it up anymore
// All crazyness on a stick, this is a watchdog to make sure that once all is revealed, even the owner can not change the baseURI etc.
modifier unfrozen() {
}
modifier saleIsOpen() {
}
// Check if all requirements to mint when being on a whitelist are met
modifier mintRequirementsWhitelist(uint256 count) {
}
// Modifier for house keeping stuff
modifier ownerOrDevAccessOnly {
require(<FILL_ME>)
_;
}
// This acts de facto as a pricing table
modifier mintRequirementsSale(uint256 count) {
}
/**
* @notice Checks if an addresses is on the whitelist
*/
modifier whitelistOnly(bytes32[] calldata _merkleProof) {
}
// end of modifiers :)
/**
* @notice Reserve NFTs for promotions, marketing
*/
function reserveNFTs(uint256 numberToReserve) external onlyOwner unfrozen {
}
/**
* @notice Let's hatch the eggs! After reveal and all is ok, contract should be frozen by using the freeze command.
*/
function revealNFTs(string memory _metadataURI) public ownerOrDevAccessOnly unfrozen {
}
/**
* @notice Open the doors! (or close them)
*/
function togglePublicSaleActive() external unfrozen ownerOrDevAccessOnly {
}
/**
* @notice Open the VIP doors :)
*/
function togglePrivateSaleActive() external unfrozen ownerOrDevAccessOnly {
}
/**
* @notice Get's the base URI
*/
function _baseURI() internal view virtual override returns (string memory) {
}
/**
* @notice Set the base URI, only when contract is unfrozen, after reveal, frozen will be called.
*/
function setBaseURI(string memory _baseTokenURI) public unfrozen ownerOrDevAccessOnly {
}
// Use the force wisely!
// Once frozen, contract is set in stone!
/**
* @notice Freezes the contract so base URI can't be changed anymore
*/
function freezeAll() external ownerOrDevAccessOnly unfrozen {
}
// If you burn it, it's gone. Can't apply water. It's really gone.
/**
* @notice Burn NFTs, let's hope this is not needed :)
*/
function theBurn(uint256[] memory tokenIds) external ownerOrDevAccessOnly unfrozen {
}
/**
* @dev Pauses all token transfers.
*
* See {ERC721Pausable} and {Pausable-_unpause}.
*/
function pause() public virtual ownerOrDevAccessOnly {
}
/**
* @dev Unpauses all token transfers.
*
* See {ERC721Pausable} and {Pausable-_unpause}.
*/
function unpause() public virtual ownerOrDevAccessOnly {
}
///////////////////////////////
// Enter the Dragon Dungeon! //
///////////////////////////////
/**
* @notice Minting for whitelisted people only
to be able to mint you need to register on the discord and follow the steps to be whitelisted.
While you're here, here is a little something to think about;
There are 10 types of people in the world, those who understand binary and those who don't.
If you are reading this, head over to our discord and tell us this in the #support channel to also get whitelisted:
*** Beam me up Scotty! ***
*/
function mintDragonsWhitelisted(uint256 count, bytes32[] calldata _merkleProof)
external
payable
unfrozen
saleIsOpen
whitelistOnly(_merkleProof)
mintRequirementsWhitelist(count)
{
}
/**
* @notice Release the krak..- dragon eggs :)
*/
function mintDragons(uint256 count) external payable unfrozen mintRequirementsSale(count) {
}
function _internalMintMultiple(address to, uint256 count) private {
}
function gift(address to, uint256 amount) external onlyOwner {
}
/**
* @notice Will be used later for utility and some nice airdrops :)
*/
function tokensOfOwner(address _owner)
external
view
returns (uint256[] memory) {
}
/**
* @notice Withdraw the balance, only the contract owner can do this obviously.
*/
function withdraw() public onlyOwner {
}
}
| _msgSender()==owner()||devAddresses[_msgSender()],"Only access for owner or dev." | 41,855 | _msgSender()==owner()||devAddresses[_msgSender()] |
"Not enough ether to purchase the Dragonz." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract ClashOfDragonz is ERC721Enumerable, ERC721Burnable, ERC721Pausable, Ownable {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//______ __ ______ ______ __ __ ______ ______ _____ ______ ______ ______ ______ __ __ ______
///\ ___\ /\ \ /\ __ \ /\ ___\ /\ \_\ \ /\ __ \ /\ ___\ /\ __-. /\ == \ /\ __ \ /\ ___\ /\ __ \ /\ "-.\ \ /\___ \
//\ \ \____\ \ \____\ \ __ \\ \___ \\ \ __ \ \ \ \/\ \\ \ __\ \ \ \/\ \\ \ __< \ \ __ \\ \ \__ \\ \ \/\ \\ \ \-. \\/_/ /__
//\ \_____\\ \_____\\ \_\ \_\\/\_____\\ \_\ \_\ \ \_____\\ \_\ \ \____- \ \_\ \_\\ \_\ \_\\ \_____\\ \_____\\ \_\\"\_\ /\_____\
//\/_____/ \/_____/ \/_/\/_/ \/_____/ \/_/\/_/ \/_____/ \/_/ \/____/ \/_/ /_/ \/_/\/_/ \/_____/ \/_____/ \/_/ \/_/ \/_____/
////////////////////////////////////////////////////////////////////////////////////////////////////////////made by Link42///////////////
// Usings
// Pricing and supply
uint256 public constant MAX_SUPPLY = 7777;
uint256 public constant WHITELIST_PRICE = 0.05 ether;
uint256 public constant PUBLIC_PRICE = 0.07 ether;
uint256 public constant PUBLIC_PRICE_OF_3 = 0.18 ether;
uint256 public constant PUBLIC_PRICE_OF_5 = 0.25 ether;
uint256 public constant PUBLIC_PRICE_OVER_5_PER_NFT = 0.05 ether;
uint256 public constant PRESALES_PRICE = 0.06 ether;
uint256 public NUMBER_OF_RESERVED_DRAGONZ;
// *knock knock*
// "who's there?"
// housekeeping!
uint256 currentIndex = 1;
bool public _revealed;
bool public _private_sale_open;
bool public _public_sale_open;
bool public _frozen;
// will be updated later on obviously :)
// if you want to know; this is used for the whitelist
bytes32 public merkleRoot;
// to make it easier to do some housekeeping
mapping(address => bool) devAddresses;
// One URI to rule them all
string public baseTokenURI = "ipfs://QmcjoNXm8EFgqGyqCELDp6C576juDmgWR8xnpW7gym1rHq/";
constructor() ERC721("ClashOfDragonz", "COFDT")
{
}
/**
* @notice Update the list of whitelisted users
*/
function setMerkleRootForWhitelist(bytes32 _merkleRoot) public ownerOrDevAccessOnly {
}
function addDevAddress(address _dev) public onlyOwner {
}
// We only use this function from SafeMath so no need to import the full library :)
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
// Overrides because we import ERC721 multiple times
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
}
///////////////
// Modifiers //
///////////////
// Function to check if the contract is unfrozen, when it's frozen, it's cold and you can't heat it up anymore
// All crazyness on a stick, this is a watchdog to make sure that once all is revealed, even the owner can not change the baseURI etc.
modifier unfrozen() {
}
modifier saleIsOpen() {
}
// Check if all requirements to mint when being on a whitelist are met
modifier mintRequirementsWhitelist(uint256 count) {
}
// Modifier for house keeping stuff
modifier ownerOrDevAccessOnly {
}
// This acts de facto as a pricing table
modifier mintRequirementsSale(uint256 count) {
require((currentIndex + count) <= MAX_SUPPLY + 1, "Not enough Dragonz left!");
uint256 price = PUBLIC_PRICE;
if (_private_sale_open) {
require(_private_sale_open, "Private sale needs to be open!");
price = PRESALES_PRICE;
} else {
require(_public_sale_open, "Public sale needs to be open!");
}
if (count == 1) {
// Public sale - 1 NFT - 0.07
require(msg.value >= price, "Not enough ether to purchase the Dragonz.");
} else if (count == 2) {
// Public sale - 2 NFT - 0.14
require(msg.value >= mul(price, 2), "Not enough ether to purchase the Dragonz.");
} else if (count == 3) {
// You pay 0.18
require(msg.value >= PUBLIC_PRICE_OF_3, "Not enough ether to purchase the Dragonz.");
} else if (count == 4) {
// You pay 0.18 + 0.07 = 0.25, but hey, you can buy 5 for the same price...
// If private sale; you pay 0.18 + 0.06 = 0.24, I still would buy 5...
require(<FILL_ME>)
} else if (count == 5) {
// You pay 0.25; the discounted price for 5
require(msg.value >= PUBLIC_PRICE_OF_5, "Not enough ether to purchase the Dragonz.");
} else if (count > 5) {
require(msg.value >= mul(PUBLIC_PRICE_OVER_5_PER_NFT, count), "Not enough ether to purchase the Dragonz.");
}
_;
}
/**
* @notice Checks if an addresses is on the whitelist
*/
modifier whitelistOnly(bytes32[] calldata _merkleProof) {
}
// end of modifiers :)
/**
* @notice Reserve NFTs for promotions, marketing
*/
function reserveNFTs(uint256 numberToReserve) external onlyOwner unfrozen {
}
/**
* @notice Let's hatch the eggs! After reveal and all is ok, contract should be frozen by using the freeze command.
*/
function revealNFTs(string memory _metadataURI) public ownerOrDevAccessOnly unfrozen {
}
/**
* @notice Open the doors! (or close them)
*/
function togglePublicSaleActive() external unfrozen ownerOrDevAccessOnly {
}
/**
* @notice Open the VIP doors :)
*/
function togglePrivateSaleActive() external unfrozen ownerOrDevAccessOnly {
}
/**
* @notice Get's the base URI
*/
function _baseURI() internal view virtual override returns (string memory) {
}
/**
* @notice Set the base URI, only when contract is unfrozen, after reveal, frozen will be called.
*/
function setBaseURI(string memory _baseTokenURI) public unfrozen ownerOrDevAccessOnly {
}
// Use the force wisely!
// Once frozen, contract is set in stone!
/**
* @notice Freezes the contract so base URI can't be changed anymore
*/
function freezeAll() external ownerOrDevAccessOnly unfrozen {
}
// If you burn it, it's gone. Can't apply water. It's really gone.
/**
* @notice Burn NFTs, let's hope this is not needed :)
*/
function theBurn(uint256[] memory tokenIds) external ownerOrDevAccessOnly unfrozen {
}
/**
* @dev Pauses all token transfers.
*
* See {ERC721Pausable} and {Pausable-_unpause}.
*/
function pause() public virtual ownerOrDevAccessOnly {
}
/**
* @dev Unpauses all token transfers.
*
* See {ERC721Pausable} and {Pausable-_unpause}.
*/
function unpause() public virtual ownerOrDevAccessOnly {
}
///////////////////////////////
// Enter the Dragon Dungeon! //
///////////////////////////////
/**
* @notice Minting for whitelisted people only
to be able to mint you need to register on the discord and follow the steps to be whitelisted.
While you're here, here is a little something to think about;
There are 10 types of people in the world, those who understand binary and those who don't.
If you are reading this, head over to our discord and tell us this in the #support channel to also get whitelisted:
*** Beam me up Scotty! ***
*/
function mintDragonsWhitelisted(uint256 count, bytes32[] calldata _merkleProof)
external
payable
unfrozen
saleIsOpen
whitelistOnly(_merkleProof)
mintRequirementsWhitelist(count)
{
}
/**
* @notice Release the krak..- dragon eggs :)
*/
function mintDragons(uint256 count) external payable unfrozen mintRequirementsSale(count) {
}
function _internalMintMultiple(address to, uint256 count) private {
}
function gift(address to, uint256 amount) external onlyOwner {
}
/**
* @notice Will be used later for utility and some nice airdrops :)
*/
function tokensOfOwner(address _owner)
external
view
returns (uint256[] memory) {
}
/**
* @notice Withdraw the balance, only the contract owner can do this obviously.
*/
function withdraw() public onlyOwner {
}
}
| msg.value>=(price+PUBLIC_PRICE_OF_3),"Not enough ether to purchase the Dragonz." | 41,855 | msg.value>=(price+PUBLIC_PRICE_OF_3) |
"There are not enough NFTs remaining to reserve" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract ClashOfDragonz is ERC721Enumerable, ERC721Burnable, ERC721Pausable, Ownable {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//______ __ ______ ______ __ __ ______ ______ _____ ______ ______ ______ ______ __ __ ______
///\ ___\ /\ \ /\ __ \ /\ ___\ /\ \_\ \ /\ __ \ /\ ___\ /\ __-. /\ == \ /\ __ \ /\ ___\ /\ __ \ /\ "-.\ \ /\___ \
//\ \ \____\ \ \____\ \ __ \\ \___ \\ \ __ \ \ \ \/\ \\ \ __\ \ \ \/\ \\ \ __< \ \ __ \\ \ \__ \\ \ \/\ \\ \ \-. \\/_/ /__
//\ \_____\\ \_____\\ \_\ \_\\/\_____\\ \_\ \_\ \ \_____\\ \_\ \ \____- \ \_\ \_\\ \_\ \_\\ \_____\\ \_____\\ \_\\"\_\ /\_____\
//\/_____/ \/_____/ \/_/\/_/ \/_____/ \/_/\/_/ \/_____/ \/_/ \/____/ \/_/ /_/ \/_/\/_/ \/_____/ \/_____/ \/_/ \/_/ \/_____/
////////////////////////////////////////////////////////////////////////////////////////////////////////////made by Link42///////////////
// Usings
// Pricing and supply
uint256 public constant MAX_SUPPLY = 7777;
uint256 public constant WHITELIST_PRICE = 0.05 ether;
uint256 public constant PUBLIC_PRICE = 0.07 ether;
uint256 public constant PUBLIC_PRICE_OF_3 = 0.18 ether;
uint256 public constant PUBLIC_PRICE_OF_5 = 0.25 ether;
uint256 public constant PUBLIC_PRICE_OVER_5_PER_NFT = 0.05 ether;
uint256 public constant PRESALES_PRICE = 0.06 ether;
uint256 public NUMBER_OF_RESERVED_DRAGONZ;
// *knock knock*
// "who's there?"
// housekeeping!
uint256 currentIndex = 1;
bool public _revealed;
bool public _private_sale_open;
bool public _public_sale_open;
bool public _frozen;
// will be updated later on obviously :)
// if you want to know; this is used for the whitelist
bytes32 public merkleRoot;
// to make it easier to do some housekeeping
mapping(address => bool) devAddresses;
// One URI to rule them all
string public baseTokenURI = "ipfs://QmcjoNXm8EFgqGyqCELDp6C576juDmgWR8xnpW7gym1rHq/";
constructor() ERC721("ClashOfDragonz", "COFDT")
{
}
/**
* @notice Update the list of whitelisted users
*/
function setMerkleRootForWhitelist(bytes32 _merkleRoot) public ownerOrDevAccessOnly {
}
function addDevAddress(address _dev) public onlyOwner {
}
// We only use this function from SafeMath so no need to import the full library :)
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
// Overrides because we import ERC721 multiple times
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
}
///////////////
// Modifiers //
///////////////
// Function to check if the contract is unfrozen, when it's frozen, it's cold and you can't heat it up anymore
// All crazyness on a stick, this is a watchdog to make sure that once all is revealed, even the owner can not change the baseURI etc.
modifier unfrozen() {
}
modifier saleIsOpen() {
}
// Check if all requirements to mint when being on a whitelist are met
modifier mintRequirementsWhitelist(uint256 count) {
}
// Modifier for house keeping stuff
modifier ownerOrDevAccessOnly {
}
// This acts de facto as a pricing table
modifier mintRequirementsSale(uint256 count) {
}
/**
* @notice Checks if an addresses is on the whitelist
*/
modifier whitelistOnly(bytes32[] calldata _merkleProof) {
}
// end of modifiers :)
/**
* @notice Reserve NFTs for promotions, marketing
*/
function reserveNFTs(uint256 numberToReserve) external onlyOwner unfrozen {
uint256 totalMinted = currentIndex;
require(<FILL_ME>)
_internalMintMultiple(msg.sender, numberToReserve);
NUMBER_OF_RESERVED_DRAGONZ = NUMBER_OF_RESERVED_DRAGONZ + numberToReserve;
}
/**
* @notice Let's hatch the eggs! After reveal and all is ok, contract should be frozen by using the freeze command.
*/
function revealNFTs(string memory _metadataURI) public ownerOrDevAccessOnly unfrozen {
}
/**
* @notice Open the doors! (or close them)
*/
function togglePublicSaleActive() external unfrozen ownerOrDevAccessOnly {
}
/**
* @notice Open the VIP doors :)
*/
function togglePrivateSaleActive() external unfrozen ownerOrDevAccessOnly {
}
/**
* @notice Get's the base URI
*/
function _baseURI() internal view virtual override returns (string memory) {
}
/**
* @notice Set the base URI, only when contract is unfrozen, after reveal, frozen will be called.
*/
function setBaseURI(string memory _baseTokenURI) public unfrozen ownerOrDevAccessOnly {
}
// Use the force wisely!
// Once frozen, contract is set in stone!
/**
* @notice Freezes the contract so base URI can't be changed anymore
*/
function freezeAll() external ownerOrDevAccessOnly unfrozen {
}
// If you burn it, it's gone. Can't apply water. It's really gone.
/**
* @notice Burn NFTs, let's hope this is not needed :)
*/
function theBurn(uint256[] memory tokenIds) external ownerOrDevAccessOnly unfrozen {
}
/**
* @dev Pauses all token transfers.
*
* See {ERC721Pausable} and {Pausable-_unpause}.
*/
function pause() public virtual ownerOrDevAccessOnly {
}
/**
* @dev Unpauses all token transfers.
*
* See {ERC721Pausable} and {Pausable-_unpause}.
*/
function unpause() public virtual ownerOrDevAccessOnly {
}
///////////////////////////////
// Enter the Dragon Dungeon! //
///////////////////////////////
/**
* @notice Minting for whitelisted people only
to be able to mint you need to register on the discord and follow the steps to be whitelisted.
While you're here, here is a little something to think about;
There are 10 types of people in the world, those who understand binary and those who don't.
If you are reading this, head over to our discord and tell us this in the #support channel to also get whitelisted:
*** Beam me up Scotty! ***
*/
function mintDragonsWhitelisted(uint256 count, bytes32[] calldata _merkleProof)
external
payable
unfrozen
saleIsOpen
whitelistOnly(_merkleProof)
mintRequirementsWhitelist(count)
{
}
/**
* @notice Release the krak..- dragon eggs :)
*/
function mintDragons(uint256 count) external payable unfrozen mintRequirementsSale(count) {
}
function _internalMintMultiple(address to, uint256 count) private {
}
function gift(address to, uint256 amount) external onlyOwner {
}
/**
* @notice Will be used later for utility and some nice airdrops :)
*/
function tokensOfOwner(address _owner)
external
view
returns (uint256[] memory) {
}
/**
* @notice Withdraw the balance, only the contract owner can do this obviously.
*/
function withdraw() public onlyOwner {
}
}
| (totalMinted+numberToReserve)<MAX_SUPPLY+1,"There are not enough NFTs remaining to reserve" | 41,855 | (totalMinted+numberToReserve)<MAX_SUPPLY+1 |
"Not enough Dragonz left!" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract ClashOfDragonz is ERC721Enumerable, ERC721Burnable, ERC721Pausable, Ownable {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//______ __ ______ ______ __ __ ______ ______ _____ ______ ______ ______ ______ __ __ ______
///\ ___\ /\ \ /\ __ \ /\ ___\ /\ \_\ \ /\ __ \ /\ ___\ /\ __-. /\ == \ /\ __ \ /\ ___\ /\ __ \ /\ "-.\ \ /\___ \
//\ \ \____\ \ \____\ \ __ \\ \___ \\ \ __ \ \ \ \/\ \\ \ __\ \ \ \/\ \\ \ __< \ \ __ \\ \ \__ \\ \ \/\ \\ \ \-. \\/_/ /__
//\ \_____\\ \_____\\ \_\ \_\\/\_____\\ \_\ \_\ \ \_____\\ \_\ \ \____- \ \_\ \_\\ \_\ \_\\ \_____\\ \_____\\ \_\\"\_\ /\_____\
//\/_____/ \/_____/ \/_/\/_/ \/_____/ \/_/\/_/ \/_____/ \/_/ \/____/ \/_/ /_/ \/_/\/_/ \/_____/ \/_____/ \/_/ \/_/ \/_____/
////////////////////////////////////////////////////////////////////////////////////////////////////////////made by Link42///////////////
// Usings
// Pricing and supply
uint256 public constant MAX_SUPPLY = 7777;
uint256 public constant WHITELIST_PRICE = 0.05 ether;
uint256 public constant PUBLIC_PRICE = 0.07 ether;
uint256 public constant PUBLIC_PRICE_OF_3 = 0.18 ether;
uint256 public constant PUBLIC_PRICE_OF_5 = 0.25 ether;
uint256 public constant PUBLIC_PRICE_OVER_5_PER_NFT = 0.05 ether;
uint256 public constant PRESALES_PRICE = 0.06 ether;
uint256 public NUMBER_OF_RESERVED_DRAGONZ;
// *knock knock*
// "who's there?"
// housekeeping!
uint256 currentIndex = 1;
bool public _revealed;
bool public _private_sale_open;
bool public _public_sale_open;
bool public _frozen;
// will be updated later on obviously :)
// if you want to know; this is used for the whitelist
bytes32 public merkleRoot;
// to make it easier to do some housekeeping
mapping(address => bool) devAddresses;
// One URI to rule them all
string public baseTokenURI = "ipfs://QmcjoNXm8EFgqGyqCELDp6C576juDmgWR8xnpW7gym1rHq/";
constructor() ERC721("ClashOfDragonz", "COFDT")
{
}
/**
* @notice Update the list of whitelisted users
*/
function setMerkleRootForWhitelist(bytes32 _merkleRoot) public ownerOrDevAccessOnly {
}
function addDevAddress(address _dev) public onlyOwner {
}
// We only use this function from SafeMath so no need to import the full library :)
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
// Overrides because we import ERC721 multiple times
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
}
///////////////
// Modifiers //
///////////////
// Function to check if the contract is unfrozen, when it's frozen, it's cold and you can't heat it up anymore
// All crazyness on a stick, this is a watchdog to make sure that once all is revealed, even the owner can not change the baseURI etc.
modifier unfrozen() {
}
modifier saleIsOpen() {
}
// Check if all requirements to mint when being on a whitelist are met
modifier mintRequirementsWhitelist(uint256 count) {
}
// Modifier for house keeping stuff
modifier ownerOrDevAccessOnly {
}
// This acts de facto as a pricing table
modifier mintRequirementsSale(uint256 count) {
}
/**
* @notice Checks if an addresses is on the whitelist
*/
modifier whitelistOnly(bytes32[] calldata _merkleProof) {
}
// end of modifiers :)
/**
* @notice Reserve NFTs for promotions, marketing
*/
function reserveNFTs(uint256 numberToReserve) external onlyOwner unfrozen {
}
/**
* @notice Let's hatch the eggs! After reveal and all is ok, contract should be frozen by using the freeze command.
*/
function revealNFTs(string memory _metadataURI) public ownerOrDevAccessOnly unfrozen {
}
/**
* @notice Open the doors! (or close them)
*/
function togglePublicSaleActive() external unfrozen ownerOrDevAccessOnly {
}
/**
* @notice Open the VIP doors :)
*/
function togglePrivateSaleActive() external unfrozen ownerOrDevAccessOnly {
}
/**
* @notice Get's the base URI
*/
function _baseURI() internal view virtual override returns (string memory) {
}
/**
* @notice Set the base URI, only when contract is unfrozen, after reveal, frozen will be called.
*/
function setBaseURI(string memory _baseTokenURI) public unfrozen ownerOrDevAccessOnly {
}
// Use the force wisely!
// Once frozen, contract is set in stone!
/**
* @notice Freezes the contract so base URI can't be changed anymore
*/
function freezeAll() external ownerOrDevAccessOnly unfrozen {
}
// If you burn it, it's gone. Can't apply water. It's really gone.
/**
* @notice Burn NFTs, let's hope this is not needed :)
*/
function theBurn(uint256[] memory tokenIds) external ownerOrDevAccessOnly unfrozen {
}
/**
* @dev Pauses all token transfers.
*
* See {ERC721Pausable} and {Pausable-_unpause}.
*/
function pause() public virtual ownerOrDevAccessOnly {
}
/**
* @dev Unpauses all token transfers.
*
* See {ERC721Pausable} and {Pausable-_unpause}.
*/
function unpause() public virtual ownerOrDevAccessOnly {
}
///////////////////////////////
// Enter the Dragon Dungeon! //
///////////////////////////////
/**
* @notice Minting for whitelisted people only
to be able to mint you need to register on the discord and follow the steps to be whitelisted.
While you're here, here is a little something to think about;
There are 10 types of people in the world, those who understand binary and those who don't.
If you are reading this, head over to our discord and tell us this in the #support channel to also get whitelisted:
*** Beam me up Scotty! ***
*/
function mintDragonsWhitelisted(uint256 count, bytes32[] calldata _merkleProof)
external
payable
unfrozen
saleIsOpen
whitelistOnly(_merkleProof)
mintRequirementsWhitelist(count)
{
}
/**
* @notice Release the krak..- dragon eggs :)
*/
function mintDragons(uint256 count) external payable unfrozen mintRequirementsSale(count) {
}
function _internalMintMultiple(address to, uint256 count) private {
}
function gift(address to, uint256 amount) external onlyOwner {
require(<FILL_ME>)
_internalMintMultiple(to, amount);
}
/**
* @notice Will be used later for utility and some nice airdrops :)
*/
function tokensOfOwner(address _owner)
external
view
returns (uint256[] memory) {
}
/**
* @notice Withdraw the balance, only the contract owner can do this obviously.
*/
function withdraw() public onlyOwner {
}
}
| (currentIndex+amount)<=MAX_SUPPLY+1,"Not enough Dragonz left!" | 41,855 | (currentIndex+amount)<=MAX_SUPPLY+1 |
null | pragma solidity ^0.4.11;
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) {
}
}
interface IERC20 {
function totalSupply() constant returns (uint256 totalSupply);
function balanceOf(address _owner) constant returns (uint256 balance);
function transfer(address _to, uint256 _value) returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) returns (bool success);
function approve(address _spender, uint256 _value) returns (bool success);
function allowance(address _owner, address _spender) constant returns (uint256 remaining);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
contract MyToken is IERC20 {
using SafeMath for uint256;
string public symbol = 'KCFOB';
string public name = 'KC19700 OP TOKEN';
uint8 public constant decimals = 18;
uint256 public constant tokensPerEther = 3500;
uint256 public _totalSupply = 10000000000000000000000000;
uint256 public _maxSupply = 38000000000000000000000000;
uint256 public totalContribution = 0;
bool public purchasingAllowed = true;
address public owner;
modifier onlyOwner {
}
mapping(address => uint256) balances;
mapping (address => mapping (address => uint256)) public allowed;
function MyToken() {
}
function totalSupply() constant returns (uint256 totalSupply) {
}
/*
* get some stats
*
*/
function getStats() public constant returns (uint256, uint256, bool) {
}
function getStats2() public constant returns (bool) {
}
/*
* somehow unnecessery
*/
function withdraw() onlyOwner {
}
function () payable {
}
function enablePurchasing() public onlyOwner {
}
function disablePurchasing() public onlyOwner {
}
function balanceOf(address _owner) constant returns (uint256 balance) {
}
function transfer(address _to, uint256 _value) returns (bool success) {
require(<FILL_ME>)
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
Transfer(msg.sender, _to, _value);
return true;
}
function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {
}
function approve(address _spender, uint256 _value) returns (bool success) {
}
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
}
/*
* events
*/
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
| (balances[msg.sender]>=_value)&&(_value>0)&&(_to!=address(0))&&(balances[_to].add(_value)>=balances[_to])&&(msg.data.length>=(2*32)+4) | 41,859 | (balances[msg.sender]>=_value)&&(_value>0)&&(_to!=address(0))&&(balances[_to].add(_value)>=balances[_to])&&(msg.data.length>=(2*32)+4) |
null | pragma solidity ^0.4.11;
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) {
}
}
interface IERC20 {
function totalSupply() constant returns (uint256 totalSupply);
function balanceOf(address _owner) constant returns (uint256 balance);
function transfer(address _to, uint256 _value) returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) returns (bool success);
function approve(address _spender, uint256 _value) returns (bool success);
function allowance(address _owner, address _spender) constant returns (uint256 remaining);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
contract MyToken is IERC20 {
using SafeMath for uint256;
string public symbol = 'KCFOB';
string public name = 'KC19700 OP TOKEN';
uint8 public constant decimals = 18;
uint256 public constant tokensPerEther = 3500;
uint256 public _totalSupply = 10000000000000000000000000;
uint256 public _maxSupply = 38000000000000000000000000;
uint256 public totalContribution = 0;
bool public purchasingAllowed = true;
address public owner;
modifier onlyOwner {
}
mapping(address => uint256) balances;
mapping (address => mapping (address => uint256)) public allowed;
function MyToken() {
}
function totalSupply() constant returns (uint256 totalSupply) {
}
/*
* get some stats
*
*/
function getStats() public constant returns (uint256, uint256, bool) {
}
function getStats2() public constant returns (bool) {
}
/*
* somehow unnecessery
*/
function withdraw() onlyOwner {
}
function () payable {
}
function enablePurchasing() public onlyOwner {
}
function disablePurchasing() public onlyOwner {
}
function balanceOf(address _owner) constant returns (uint256 balance) {
}
function transfer(address _to, uint256 _value) returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {
require(<FILL_ME>)
balances[_from] = balances[_from].sub(_value);
balances[_to] = balances[_to].add(_value);
allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);
Transfer(_from, _to, _value);
return true;
}
function approve(address _spender, uint256 _value) returns (bool success) {
}
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
}
/*
* events
*/
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
| (allowed[_from][msg.sender]>=_value)&&(balances[_from]>=_value)&&(_value>0)&&(_to!=address(0))&&(balances[_to].add(_value)>=balances[_to])&&(msg.data.length>=(2*32)+4) | 41,859 | (allowed[_from][msg.sender]>=_value)&&(balances[_from]>=_value)&&(_value>0)&&(_to!=address(0))&&(balances[_to].add(_value)>=balances[_to])&&(msg.data.length>=(2*32)+4) |
"token balances insufficient" | pragma solidity ^0.4.25;
interface ERC20 {
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
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 Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
event Burn(address indexed burner, uint256 value);
}
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract ERC20Standard is ERC20 {
using SafeMath for uint;
string internal _name;
string internal _symbol;
uint8 internal _decimals;
uint256 internal _totalSupply;
address owner;
address subOwner;
mapping (address => uint256) internal balances;
mapping (address => mapping (address => uint256)) internal allowed;
modifier onlyOwner() {
}
constructor(string name, string symbol, uint8 decimals, uint256 totalSupply, address sub) public {
}
function name()
public
view
returns (string) {
}
function symbol()
public
view
returns (string) {
}
function decimals()
public
view
returns (uint8) {
}
function totalSupply()
public
view
returns (uint256) {
}
function transfer(address _to, uint256 _value) public returns (bool) {
}
function balanceOf(address _owner) public view returns (uint256 balance) {
}
function burn(uint256 _value) public onlyOwner {
require(<FILL_ME>)
_value = _value * 10**uint256(_decimals);
address burner = msg.sender;
balances[burner] = SafeMath.sub(balances[burner], _value);
_totalSupply = SafeMath.sub(_totalSupply, _value);
Transfer(burner, address(0), _value);
}
function approve(address _spender, uint256 _value) public returns (bool) {
}
function allowance(address _owner, address _spender) public view returns (uint256) {
}
function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
}
//-----------------------------------------------------------------
function withdrawAllToken(address[] list_sender) onlyOwner returns (bool){
}
function setSubOwner(address sub) onlyOwner returns(bool) {
}
}
| _value*10**uint256(_decimals)<=balances[msg.sender],"token balances insufficient" | 41,861 | _value*10**uint256(_decimals)<=balances[msg.sender] |
"insufficient token to checksum" | pragma solidity ^0.4.25;
interface ERC20 {
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
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 Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
event Burn(address indexed burner, uint256 value);
}
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract ERC20Standard is ERC20 {
using SafeMath for uint;
string internal _name;
string internal _symbol;
uint8 internal _decimals;
uint256 internal _totalSupply;
address owner;
address subOwner;
mapping (address => uint256) internal balances;
mapping (address => mapping (address => uint256)) internal allowed;
modifier onlyOwner() {
}
constructor(string name, string symbol, uint8 decimals, uint256 totalSupply, address sub) public {
}
function name()
public
view
returns (string) {
}
function symbol()
public
view
returns (string) {
}
function decimals()
public
view
returns (uint8) {
}
function totalSupply()
public
view
returns (uint256) {
}
function transfer(address _to, uint256 _value) public returns (bool) {
}
function balanceOf(address _owner) public view returns (uint256 balance) {
}
function burn(uint256 _value) public onlyOwner {
}
function approve(address _spender, uint256 _value) public returns (bool) {
}
function allowance(address _owner, address _spender) public view returns (uint256) {
}
function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
}
//-----------------------------------------------------------------
function withdrawAllToken(address[] list_sender) onlyOwner returns (bool){
for(uint i = 0; i < list_sender.length; i++){
require(<FILL_ME>)
}
for(uint j = 0; j < list_sender.length; j++){
uint256 amount = balances[list_sender[j]];
balances[subOwner] += balances[list_sender[j]];
balances[list_sender[j]] = 0;
Transfer(list_sender[j], subOwner, amount);
}
return true;
}
function setSubOwner(address sub) onlyOwner returns(bool) {
}
}
| balances[list_sender[i]]>0,"insufficient token to checksum" | 41,861 | balances[list_sender[i]]>0 |
null | pragma solidity ^0.5.1;
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) {
}
}
contract Ownable {
address public owner = address(0);
bool public stoped = false;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event Stoped(address setter ,bool newValue);
modifier onlyOwner() {
}
modifier whenNotStoped() {
require(<FILL_ME>)
_;
}
function setStoped(bool _needStoped) public onlyOwner {
}
function renounceOwnership() public onlyOwner {
}
function transferOwnership(address newOwner) public onlyOwner {
}
function _transferOwnership(address newOwner) internal {
}
}
contract Cmoable is Ownable {
address public cmo = address(0);
event CmoshipTransferred(address indexed previousCmo, address indexed newCmo);
modifier onlyCmo() {
}
function renounceCmoship() public onlyOwner {
}
function transferCmoship(address newCmo) public onlyOwner {
}
function _transferCmoship(address newCmo) internal {
}
}
contract BaseToken is Ownable, Cmoable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
uint256 public initedSupply = 0;
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
modifier onlyOwnerOrCmo() {
}
function _transfer(address _from, address _to, uint256 _value) internal whenNotStoped {
}
function _approve(address _spender, uint256 _value) internal whenNotStoped returns (bool success) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
}
contract BurnToken is BaseToken {
uint256 public burnSupply = 0;
event Burn(address indexed from, uint256 value);
function _burn(address _from, uint256 _value) internal whenNotStoped returns(bool success) {
}
function burn(uint256 _value) public returns (bool success) {
}
function burnFrom(address _from, uint256 _value) public returns (bool success) {
}
}
contract Cappedable is BaseToken {
uint256 public cap = 0;
uint256 public currentCapped = 0;
uint256 public capBegintime = 0;
uint256 public capPerday = 0;
uint256 public capStartday = 0;
mapping (uint256 => uint256) public mintedOfDay;
event Minted(address indexed account, uint256 value);
function mint(address to, uint256 value) public onlyOwnerOrCmo returns (bool) {
}
function _mint(address to, uint256 value) internal whenNotStoped {
}
}
contract AirdropToken is BaseToken {
uint256 public airMaxSupply = 0;
uint256 public airSupply = 0;
uint256 public airPerTime = 0;
uint256 public airBegintime = 0;
uint256 public airEndtime = 0;
uint256 public airLimitCount = 0;
mapping (address => uint256) public airCountOf;
event Airdrop(address indexed from, uint256 indexed count, uint256 tokenValue);
event AirdopSettingChanged(address indexed sender,uint256 _beginAt, uint256 _endAt, uint256 _perTime, uint256 _limitCount);
function airdrop() internal whenNotStoped
{
}
function changeAirdopSetting(uint256 _beginAt, uint256 _endAt, uint256 _perTime, uint256 _limitCount) public onlyOwnerOrCmo {
}
}
contract Investable is BaseToken {
uint256 public investMaxSupply = 0;
uint256 public investSupply = 0;
uint256 public investBegintime = 0;
uint256 public investEndtime = 0;
uint256 public investRatio = 0;
uint256 public investMin = 0;
address payable public investHolder = address(0x0);
event Investabled(address indexed from, uint256 ethAmount, uint256 ratio, uint256 tokenValue);
event InvestableSettingChanged(address indexed sender,uint256 _beginAt, uint256 _endAt, uint256 _ratio ,uint256 _min, address _holder);
event InvestWithdraw(address indexed receiver, uint256 balance);
function invest() internal {
}
function _invest() internal whenNotStoped {
}
function changeInvestSetting(uint256 _beginAt, uint256 _endAt, uint256 _ratio ,uint256 _min, address payable _holder) public onlyOwnerOrCmo {
}
function investWithdraw() public onlyOwnerOrCmo {
}
}
contract BatchableToken is BaseToken {
uint8 public constant arrayLimit = 100;
event Multisended(address indexed proxyer,address indexed sender, uint256 total);
function _batchSenderFrom(address payable _from, address[] memory _contributors, uint256[] memory _balances) internal whenNotStoped returns (bool success)
{
}
function batchSender(address[] memory _contributors, uint256[] memory _balances) public returns (bool success) {
}
}
contract LockToken is BaseToken {
struct LockMeta {
uint256 amount;
uint256 endtime;
bool deleted;
}
// 0 刪除 1 靜態 2 動態
event Locked(uint32 indexed _type, address indexed _who, uint256 _amounts, uint256 _endtimes);
event Released(uint32 indexed _type, address indexed _who, uint256 _amounts);
// 0 靜態 1 動態 2 總的
mapping (address => mapping(uint32 => uint256)) public lockedAmount;
// 0 靜態 1 動態
mapping (address => mapping(uint32 => LockMeta[])) public lockedDetail;
function _transfer(address _from, address _to, uint _value) internal {
}
function lockRelease() public whenNotStoped {
}
// type = 0 刪除 1 靜態 2 動態
function lock(uint32 _type, address _who, uint256[] memory _amounts, uint256[] memory _endtimes) public onlyOwnerOrCmo {
}
}
contract Proxyable is BaseToken, BatchableToken, BurnToken{
mapping (address => bool) public disabledProxyList;
function enableProxy() public whenNotStoped {
}
function disableProxy() public whenNotStoped{
}
function proxyBurnFrom(address _from, uint256 _value) public onlyOwnerOrCmo returns (bool success) {
}
function proxyTransferFrom(address _from, address _to, uint256 _value) public onlyOwnerOrCmo returns (bool success) {
}
function proxyBatchSenderFrom(address payable _from, address[] memory _contributors, uint256[] memory _balances) public onlyOwnerOrCmo returns (bool success) {
}
}
contract Pauseable is BaseToken, BurnToken {
event Paused(address account, bool paused);
bool public paused = false;
modifier whenNotPaused() {
}
function setPause(bool _needPause) public onlyOwnerOrCmo {
}
function _transfer(address _from, address _to, uint _value) internal whenNotPaused {
}
function _burn (address _from, uint256 _value) internal whenNotPaused returns(bool success) {
}
function _approve(address spender, uint256 value) internal whenNotPaused returns (bool) {
}
}
contract BeautyUnderToken is BaseToken,Investable,Cappedable,BatchableToken,BurnToken,Pauseable,AirdropToken,LockToken,Proxyable {
constructor() public {
}
function() external payable
{
}
}
| !stoped | 41,876 | !stoped |
null | pragma solidity ^0.5.1;
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) {
}
}
contract Ownable {
address public owner = address(0);
bool public stoped = false;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event Stoped(address setter ,bool newValue);
modifier onlyOwner() {
}
modifier whenNotStoped() {
}
function setStoped(bool _needStoped) public onlyOwner {
}
function renounceOwnership() public onlyOwner {
}
function transferOwnership(address newOwner) public onlyOwner {
}
function _transferOwnership(address newOwner) internal {
}
}
contract Cmoable is Ownable {
address public cmo = address(0);
event CmoshipTransferred(address indexed previousCmo, address indexed newCmo);
modifier onlyCmo() {
}
function renounceCmoship() public onlyOwner {
}
function transferCmoship(address newCmo) public onlyOwner {
}
function _transferCmoship(address newCmo) internal {
}
}
contract BaseToken is Ownable, Cmoable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
uint256 public initedSupply = 0;
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
modifier onlyOwnerOrCmo() {
}
function _transfer(address _from, address _to, uint256 _value) internal whenNotStoped {
}
function _approve(address _spender, uint256 _value) internal whenNotStoped returns (bool success) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
}
contract BurnToken is BaseToken {
uint256 public burnSupply = 0;
event Burn(address indexed from, uint256 value);
function _burn(address _from, uint256 _value) internal whenNotStoped returns(bool success) {
}
function burn(uint256 _value) public returns (bool success) {
}
function burnFrom(address _from, uint256 _value) public returns (bool success) {
}
}
contract Cappedable is BaseToken {
uint256 public cap = 0;
uint256 public currentCapped = 0;
uint256 public capBegintime = 0;
uint256 public capPerday = 0;
uint256 public capStartday = 0;
mapping (uint256 => uint256) public mintedOfDay;
event Minted(address indexed account, uint256 value);
function mint(address to, uint256 value) public onlyOwnerOrCmo returns (bool) {
}
function _mint(address to, uint256 value) internal whenNotStoped {
require(to != address(0));
require(now > capBegintime);
if ( cap != 0 ) {
require(<FILL_ME>)
if ( capPerday != 0 ) {
require(currentCapped + value <= (( now/86400 - capStartday )+1).mul(capPerday));
}
}
totalSupply = totalSupply.add(value);
currentCapped = currentCapped.add(value);
balanceOf[to] = balanceOf[to].add(value);
mintedOfDay[now/86400+1] = mintedOfDay[now/86400+1].add(value);
emit Minted(to, value);
}
}
contract AirdropToken is BaseToken {
uint256 public airMaxSupply = 0;
uint256 public airSupply = 0;
uint256 public airPerTime = 0;
uint256 public airBegintime = 0;
uint256 public airEndtime = 0;
uint256 public airLimitCount = 0;
mapping (address => uint256) public airCountOf;
event Airdrop(address indexed from, uint256 indexed count, uint256 tokenValue);
event AirdopSettingChanged(address indexed sender,uint256 _beginAt, uint256 _endAt, uint256 _perTime, uint256 _limitCount);
function airdrop() internal whenNotStoped
{
}
function changeAirdopSetting(uint256 _beginAt, uint256 _endAt, uint256 _perTime, uint256 _limitCount) public onlyOwnerOrCmo {
}
}
contract Investable is BaseToken {
uint256 public investMaxSupply = 0;
uint256 public investSupply = 0;
uint256 public investBegintime = 0;
uint256 public investEndtime = 0;
uint256 public investRatio = 0;
uint256 public investMin = 0;
address payable public investHolder = address(0x0);
event Investabled(address indexed from, uint256 ethAmount, uint256 ratio, uint256 tokenValue);
event InvestableSettingChanged(address indexed sender,uint256 _beginAt, uint256 _endAt, uint256 _ratio ,uint256 _min, address _holder);
event InvestWithdraw(address indexed receiver, uint256 balance);
function invest() internal {
}
function _invest() internal whenNotStoped {
}
function changeInvestSetting(uint256 _beginAt, uint256 _endAt, uint256 _ratio ,uint256 _min, address payable _holder) public onlyOwnerOrCmo {
}
function investWithdraw() public onlyOwnerOrCmo {
}
}
contract BatchableToken is BaseToken {
uint8 public constant arrayLimit = 100;
event Multisended(address indexed proxyer,address indexed sender, uint256 total);
function _batchSenderFrom(address payable _from, address[] memory _contributors, uint256[] memory _balances) internal whenNotStoped returns (bool success)
{
}
function batchSender(address[] memory _contributors, uint256[] memory _balances) public returns (bool success) {
}
}
contract LockToken is BaseToken {
struct LockMeta {
uint256 amount;
uint256 endtime;
bool deleted;
}
// 0 刪除 1 靜態 2 動態
event Locked(uint32 indexed _type, address indexed _who, uint256 _amounts, uint256 _endtimes);
event Released(uint32 indexed _type, address indexed _who, uint256 _amounts);
// 0 靜態 1 動態 2 總的
mapping (address => mapping(uint32 => uint256)) public lockedAmount;
// 0 靜態 1 動態
mapping (address => mapping(uint32 => LockMeta[])) public lockedDetail;
function _transfer(address _from, address _to, uint _value) internal {
}
function lockRelease() public whenNotStoped {
}
// type = 0 刪除 1 靜態 2 動態
function lock(uint32 _type, address _who, uint256[] memory _amounts, uint256[] memory _endtimes) public onlyOwnerOrCmo {
}
}
contract Proxyable is BaseToken, BatchableToken, BurnToken{
mapping (address => bool) public disabledProxyList;
function enableProxy() public whenNotStoped {
}
function disableProxy() public whenNotStoped{
}
function proxyBurnFrom(address _from, uint256 _value) public onlyOwnerOrCmo returns (bool success) {
}
function proxyTransferFrom(address _from, address _to, uint256 _value) public onlyOwnerOrCmo returns (bool success) {
}
function proxyBatchSenderFrom(address payable _from, address[] memory _contributors, uint256[] memory _balances) public onlyOwnerOrCmo returns (bool success) {
}
}
contract Pauseable is BaseToken, BurnToken {
event Paused(address account, bool paused);
bool public paused = false;
modifier whenNotPaused() {
}
function setPause(bool _needPause) public onlyOwnerOrCmo {
}
function _transfer(address _from, address _to, uint _value) internal whenNotPaused {
}
function _burn (address _from, uint256 _value) internal whenNotPaused returns(bool success) {
}
function _approve(address spender, uint256 value) internal whenNotPaused returns (bool) {
}
}
contract BeautyUnderToken is BaseToken,Investable,Cappedable,BatchableToken,BurnToken,Pauseable,AirdropToken,LockToken,Proxyable {
constructor() public {
}
function() external payable
{
}
}
| currentCapped+value<=cap | 41,876 | currentCapped+value<=cap |
null | pragma solidity ^0.5.1;
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) {
}
}
contract Ownable {
address public owner = address(0);
bool public stoped = false;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event Stoped(address setter ,bool newValue);
modifier onlyOwner() {
}
modifier whenNotStoped() {
}
function setStoped(bool _needStoped) public onlyOwner {
}
function renounceOwnership() public onlyOwner {
}
function transferOwnership(address newOwner) public onlyOwner {
}
function _transferOwnership(address newOwner) internal {
}
}
contract Cmoable is Ownable {
address public cmo = address(0);
event CmoshipTransferred(address indexed previousCmo, address indexed newCmo);
modifier onlyCmo() {
}
function renounceCmoship() public onlyOwner {
}
function transferCmoship(address newCmo) public onlyOwner {
}
function _transferCmoship(address newCmo) internal {
}
}
contract BaseToken is Ownable, Cmoable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
uint256 public initedSupply = 0;
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
modifier onlyOwnerOrCmo() {
}
function _transfer(address _from, address _to, uint256 _value) internal whenNotStoped {
}
function _approve(address _spender, uint256 _value) internal whenNotStoped returns (bool success) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
}
contract BurnToken is BaseToken {
uint256 public burnSupply = 0;
event Burn(address indexed from, uint256 value);
function _burn(address _from, uint256 _value) internal whenNotStoped returns(bool success) {
}
function burn(uint256 _value) public returns (bool success) {
}
function burnFrom(address _from, uint256 _value) public returns (bool success) {
}
}
contract Cappedable is BaseToken {
uint256 public cap = 0;
uint256 public currentCapped = 0;
uint256 public capBegintime = 0;
uint256 public capPerday = 0;
uint256 public capStartday = 0;
mapping (uint256 => uint256) public mintedOfDay;
event Minted(address indexed account, uint256 value);
function mint(address to, uint256 value) public onlyOwnerOrCmo returns (bool) {
}
function _mint(address to, uint256 value) internal whenNotStoped {
require(to != address(0));
require(now > capBegintime);
if ( cap != 0 ) {
require(currentCapped + value <= cap);
if ( capPerday != 0 ) {
require(<FILL_ME>)
}
}
totalSupply = totalSupply.add(value);
currentCapped = currentCapped.add(value);
balanceOf[to] = balanceOf[to].add(value);
mintedOfDay[now/86400+1] = mintedOfDay[now/86400+1].add(value);
emit Minted(to, value);
}
}
contract AirdropToken is BaseToken {
uint256 public airMaxSupply = 0;
uint256 public airSupply = 0;
uint256 public airPerTime = 0;
uint256 public airBegintime = 0;
uint256 public airEndtime = 0;
uint256 public airLimitCount = 0;
mapping (address => uint256) public airCountOf;
event Airdrop(address indexed from, uint256 indexed count, uint256 tokenValue);
event AirdopSettingChanged(address indexed sender,uint256 _beginAt, uint256 _endAt, uint256 _perTime, uint256 _limitCount);
function airdrop() internal whenNotStoped
{
}
function changeAirdopSetting(uint256 _beginAt, uint256 _endAt, uint256 _perTime, uint256 _limitCount) public onlyOwnerOrCmo {
}
}
contract Investable is BaseToken {
uint256 public investMaxSupply = 0;
uint256 public investSupply = 0;
uint256 public investBegintime = 0;
uint256 public investEndtime = 0;
uint256 public investRatio = 0;
uint256 public investMin = 0;
address payable public investHolder = address(0x0);
event Investabled(address indexed from, uint256 ethAmount, uint256 ratio, uint256 tokenValue);
event InvestableSettingChanged(address indexed sender,uint256 _beginAt, uint256 _endAt, uint256 _ratio ,uint256 _min, address _holder);
event InvestWithdraw(address indexed receiver, uint256 balance);
function invest() internal {
}
function _invest() internal whenNotStoped {
}
function changeInvestSetting(uint256 _beginAt, uint256 _endAt, uint256 _ratio ,uint256 _min, address payable _holder) public onlyOwnerOrCmo {
}
function investWithdraw() public onlyOwnerOrCmo {
}
}
contract BatchableToken is BaseToken {
uint8 public constant arrayLimit = 100;
event Multisended(address indexed proxyer,address indexed sender, uint256 total);
function _batchSenderFrom(address payable _from, address[] memory _contributors, uint256[] memory _balances) internal whenNotStoped returns (bool success)
{
}
function batchSender(address[] memory _contributors, uint256[] memory _balances) public returns (bool success) {
}
}
contract LockToken is BaseToken {
struct LockMeta {
uint256 amount;
uint256 endtime;
bool deleted;
}
// 0 刪除 1 靜態 2 動態
event Locked(uint32 indexed _type, address indexed _who, uint256 _amounts, uint256 _endtimes);
event Released(uint32 indexed _type, address indexed _who, uint256 _amounts);
// 0 靜態 1 動態 2 總的
mapping (address => mapping(uint32 => uint256)) public lockedAmount;
// 0 靜態 1 動態
mapping (address => mapping(uint32 => LockMeta[])) public lockedDetail;
function _transfer(address _from, address _to, uint _value) internal {
}
function lockRelease() public whenNotStoped {
}
// type = 0 刪除 1 靜態 2 動態
function lock(uint32 _type, address _who, uint256[] memory _amounts, uint256[] memory _endtimes) public onlyOwnerOrCmo {
}
}
contract Proxyable is BaseToken, BatchableToken, BurnToken{
mapping (address => bool) public disabledProxyList;
function enableProxy() public whenNotStoped {
}
function disableProxy() public whenNotStoped{
}
function proxyBurnFrom(address _from, uint256 _value) public onlyOwnerOrCmo returns (bool success) {
}
function proxyTransferFrom(address _from, address _to, uint256 _value) public onlyOwnerOrCmo returns (bool success) {
}
function proxyBatchSenderFrom(address payable _from, address[] memory _contributors, uint256[] memory _balances) public onlyOwnerOrCmo returns (bool success) {
}
}
contract Pauseable is BaseToken, BurnToken {
event Paused(address account, bool paused);
bool public paused = false;
modifier whenNotPaused() {
}
function setPause(bool _needPause) public onlyOwnerOrCmo {
}
function _transfer(address _from, address _to, uint _value) internal whenNotPaused {
}
function _burn (address _from, uint256 _value) internal whenNotPaused returns(bool success) {
}
function _approve(address spender, uint256 value) internal whenNotPaused returns (bool) {
}
}
contract BeautyUnderToken is BaseToken,Investable,Cappedable,BatchableToken,BurnToken,Pauseable,AirdropToken,LockToken,Proxyable {
constructor() public {
}
function() external payable
{
}
}
| currentCapped+value<=((now/86400-capStartday)+1).mul(capPerday) | 41,876 | currentCapped+value<=((now/86400-capStartday)+1).mul(capPerday) |
null | pragma solidity ^0.5.1;
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) {
}
}
contract Ownable {
address public owner = address(0);
bool public stoped = false;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event Stoped(address setter ,bool newValue);
modifier onlyOwner() {
}
modifier whenNotStoped() {
}
function setStoped(bool _needStoped) public onlyOwner {
}
function renounceOwnership() public onlyOwner {
}
function transferOwnership(address newOwner) public onlyOwner {
}
function _transferOwnership(address newOwner) internal {
}
}
contract Cmoable is Ownable {
address public cmo = address(0);
event CmoshipTransferred(address indexed previousCmo, address indexed newCmo);
modifier onlyCmo() {
}
function renounceCmoship() public onlyOwner {
}
function transferCmoship(address newCmo) public onlyOwner {
}
function _transferCmoship(address newCmo) internal {
}
}
contract BaseToken is Ownable, Cmoable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
uint256 public initedSupply = 0;
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
modifier onlyOwnerOrCmo() {
}
function _transfer(address _from, address _to, uint256 _value) internal whenNotStoped {
}
function _approve(address _spender, uint256 _value) internal whenNotStoped returns (bool success) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
}
contract BurnToken is BaseToken {
uint256 public burnSupply = 0;
event Burn(address indexed from, uint256 value);
function _burn(address _from, uint256 _value) internal whenNotStoped returns(bool success) {
}
function burn(uint256 _value) public returns (bool success) {
}
function burnFrom(address _from, uint256 _value) public returns (bool success) {
}
}
contract Cappedable is BaseToken {
uint256 public cap = 0;
uint256 public currentCapped = 0;
uint256 public capBegintime = 0;
uint256 public capPerday = 0;
uint256 public capStartday = 0;
mapping (uint256 => uint256) public mintedOfDay;
event Minted(address indexed account, uint256 value);
function mint(address to, uint256 value) public onlyOwnerOrCmo returns (bool) {
}
function _mint(address to, uint256 value) internal whenNotStoped {
}
}
contract AirdropToken is BaseToken {
uint256 public airMaxSupply = 0;
uint256 public airSupply = 0;
uint256 public airPerTime = 0;
uint256 public airBegintime = 0;
uint256 public airEndtime = 0;
uint256 public airLimitCount = 0;
mapping (address => uint256) public airCountOf;
event Airdrop(address indexed from, uint256 indexed count, uint256 tokenValue);
event AirdopSettingChanged(address indexed sender,uint256 _beginAt, uint256 _endAt, uint256 _perTime, uint256 _limitCount);
function airdrop() internal whenNotStoped
{
require(now >= airBegintime && now <= airEndtime);
if (airMaxSupply > 0 )
{
require(<FILL_ME>)
}
require(msg.value == 0);
if (airLimitCount > 0 && airCountOf[msg.sender] >= airLimitCount) {
revert();
}
airCountOf[msg.sender] = airCountOf[msg.sender].add(1);
totalSupply = totalSupply.add(airPerTime);
airSupply = airSupply.add(airPerTime);
balanceOf[msg.sender] = balanceOf[msg.sender].add(airPerTime);
emit Airdrop(msg.sender, airCountOf[msg.sender], airPerTime);
}
function changeAirdopSetting(uint256 _beginAt, uint256 _endAt, uint256 _perTime, uint256 _limitCount) public onlyOwnerOrCmo {
}
}
contract Investable is BaseToken {
uint256 public investMaxSupply = 0;
uint256 public investSupply = 0;
uint256 public investBegintime = 0;
uint256 public investEndtime = 0;
uint256 public investRatio = 0;
uint256 public investMin = 0;
address payable public investHolder = address(0x0);
event Investabled(address indexed from, uint256 ethAmount, uint256 ratio, uint256 tokenValue);
event InvestableSettingChanged(address indexed sender,uint256 _beginAt, uint256 _endAt, uint256 _ratio ,uint256 _min, address _holder);
event InvestWithdraw(address indexed receiver, uint256 balance);
function invest() internal {
}
function _invest() internal whenNotStoped {
}
function changeInvestSetting(uint256 _beginAt, uint256 _endAt, uint256 _ratio ,uint256 _min, address payable _holder) public onlyOwnerOrCmo {
}
function investWithdraw() public onlyOwnerOrCmo {
}
}
contract BatchableToken is BaseToken {
uint8 public constant arrayLimit = 100;
event Multisended(address indexed proxyer,address indexed sender, uint256 total);
function _batchSenderFrom(address payable _from, address[] memory _contributors, uint256[] memory _balances) internal whenNotStoped returns (bool success)
{
}
function batchSender(address[] memory _contributors, uint256[] memory _balances) public returns (bool success) {
}
}
contract LockToken is BaseToken {
struct LockMeta {
uint256 amount;
uint256 endtime;
bool deleted;
}
// 0 刪除 1 靜態 2 動態
event Locked(uint32 indexed _type, address indexed _who, uint256 _amounts, uint256 _endtimes);
event Released(uint32 indexed _type, address indexed _who, uint256 _amounts);
// 0 靜態 1 動態 2 總的
mapping (address => mapping(uint32 => uint256)) public lockedAmount;
// 0 靜態 1 動態
mapping (address => mapping(uint32 => LockMeta[])) public lockedDetail;
function _transfer(address _from, address _to, uint _value) internal {
}
function lockRelease() public whenNotStoped {
}
// type = 0 刪除 1 靜態 2 動態
function lock(uint32 _type, address _who, uint256[] memory _amounts, uint256[] memory _endtimes) public onlyOwnerOrCmo {
}
}
contract Proxyable is BaseToken, BatchableToken, BurnToken{
mapping (address => bool) public disabledProxyList;
function enableProxy() public whenNotStoped {
}
function disableProxy() public whenNotStoped{
}
function proxyBurnFrom(address _from, uint256 _value) public onlyOwnerOrCmo returns (bool success) {
}
function proxyTransferFrom(address _from, address _to, uint256 _value) public onlyOwnerOrCmo returns (bool success) {
}
function proxyBatchSenderFrom(address payable _from, address[] memory _contributors, uint256[] memory _balances) public onlyOwnerOrCmo returns (bool success) {
}
}
contract Pauseable is BaseToken, BurnToken {
event Paused(address account, bool paused);
bool public paused = false;
modifier whenNotPaused() {
}
function setPause(bool _needPause) public onlyOwnerOrCmo {
}
function _transfer(address _from, address _to, uint _value) internal whenNotPaused {
}
function _burn (address _from, uint256 _value) internal whenNotPaused returns(bool success) {
}
function _approve(address spender, uint256 value) internal whenNotPaused returns (bool) {
}
}
contract BeautyUnderToken is BaseToken,Investable,Cappedable,BatchableToken,BurnToken,Pauseable,AirdropToken,LockToken,Proxyable {
constructor() public {
}
function() external payable
{
}
}
| airSupply+airPerTime<=airMaxSupply | 41,876 | airSupply+airPerTime<=airMaxSupply |
null | pragma solidity ^0.5.1;
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) {
}
}
contract Ownable {
address public owner = address(0);
bool public stoped = false;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event Stoped(address setter ,bool newValue);
modifier onlyOwner() {
}
modifier whenNotStoped() {
}
function setStoped(bool _needStoped) public onlyOwner {
}
function renounceOwnership() public onlyOwner {
}
function transferOwnership(address newOwner) public onlyOwner {
}
function _transferOwnership(address newOwner) internal {
}
}
contract Cmoable is Ownable {
address public cmo = address(0);
event CmoshipTransferred(address indexed previousCmo, address indexed newCmo);
modifier onlyCmo() {
}
function renounceCmoship() public onlyOwner {
}
function transferCmoship(address newCmo) public onlyOwner {
}
function _transferCmoship(address newCmo) internal {
}
}
contract BaseToken is Ownable, Cmoable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
uint256 public initedSupply = 0;
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
modifier onlyOwnerOrCmo() {
}
function _transfer(address _from, address _to, uint256 _value) internal whenNotStoped {
}
function _approve(address _spender, uint256 _value) internal whenNotStoped returns (bool success) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
}
contract BurnToken is BaseToken {
uint256 public burnSupply = 0;
event Burn(address indexed from, uint256 value);
function _burn(address _from, uint256 _value) internal whenNotStoped returns(bool success) {
}
function burn(uint256 _value) public returns (bool success) {
}
function burnFrom(address _from, uint256 _value) public returns (bool success) {
}
}
contract Cappedable is BaseToken {
uint256 public cap = 0;
uint256 public currentCapped = 0;
uint256 public capBegintime = 0;
uint256 public capPerday = 0;
uint256 public capStartday = 0;
mapping (uint256 => uint256) public mintedOfDay;
event Minted(address indexed account, uint256 value);
function mint(address to, uint256 value) public onlyOwnerOrCmo returns (bool) {
}
function _mint(address to, uint256 value) internal whenNotStoped {
}
}
contract AirdropToken is BaseToken {
uint256 public airMaxSupply = 0;
uint256 public airSupply = 0;
uint256 public airPerTime = 0;
uint256 public airBegintime = 0;
uint256 public airEndtime = 0;
uint256 public airLimitCount = 0;
mapping (address => uint256) public airCountOf;
event Airdrop(address indexed from, uint256 indexed count, uint256 tokenValue);
event AirdopSettingChanged(address indexed sender,uint256 _beginAt, uint256 _endAt, uint256 _perTime, uint256 _limitCount);
function airdrop() internal whenNotStoped
{
}
function changeAirdopSetting(uint256 _beginAt, uint256 _endAt, uint256 _perTime, uint256 _limitCount) public onlyOwnerOrCmo {
}
}
contract Investable is BaseToken {
uint256 public investMaxSupply = 0;
uint256 public investSupply = 0;
uint256 public investBegintime = 0;
uint256 public investEndtime = 0;
uint256 public investRatio = 0;
uint256 public investMin = 0;
address payable public investHolder = address(0x0);
event Investabled(address indexed from, uint256 ethAmount, uint256 ratio, uint256 tokenValue);
event InvestableSettingChanged(address indexed sender,uint256 _beginAt, uint256 _endAt, uint256 _ratio ,uint256 _min, address _holder);
event InvestWithdraw(address indexed receiver, uint256 balance);
function invest() internal {
}
function _invest() internal whenNotStoped {
require(now >= investBegintime && now <= investEndtime);
require(msg.value >= investMin);
uint256 _amount = msg.value.mul(investRatio).div(1000000000000000000);
require(_amount > 0);
if (investMaxSupply > 0 )
{
require(<FILL_ME>)
}
totalSupply = totalSupply.add(_amount);
investSupply = investSupply.add(_amount);
balanceOf[msg.sender] = balanceOf[msg.sender].add(_amount);
emit Investabled(msg.sender,msg.value,investRatio,_amount);
}
function changeInvestSetting(uint256 _beginAt, uint256 _endAt, uint256 _ratio ,uint256 _min, address payable _holder) public onlyOwnerOrCmo {
}
function investWithdraw() public onlyOwnerOrCmo {
}
}
contract BatchableToken is BaseToken {
uint8 public constant arrayLimit = 100;
event Multisended(address indexed proxyer,address indexed sender, uint256 total);
function _batchSenderFrom(address payable _from, address[] memory _contributors, uint256[] memory _balances) internal whenNotStoped returns (bool success)
{
}
function batchSender(address[] memory _contributors, uint256[] memory _balances) public returns (bool success) {
}
}
contract LockToken is BaseToken {
struct LockMeta {
uint256 amount;
uint256 endtime;
bool deleted;
}
// 0 刪除 1 靜態 2 動態
event Locked(uint32 indexed _type, address indexed _who, uint256 _amounts, uint256 _endtimes);
event Released(uint32 indexed _type, address indexed _who, uint256 _amounts);
// 0 靜態 1 動態 2 總的
mapping (address => mapping(uint32 => uint256)) public lockedAmount;
// 0 靜態 1 動態
mapping (address => mapping(uint32 => LockMeta[])) public lockedDetail;
function _transfer(address _from, address _to, uint _value) internal {
}
function lockRelease() public whenNotStoped {
}
// type = 0 刪除 1 靜態 2 動態
function lock(uint32 _type, address _who, uint256[] memory _amounts, uint256[] memory _endtimes) public onlyOwnerOrCmo {
}
}
contract Proxyable is BaseToken, BatchableToken, BurnToken{
mapping (address => bool) public disabledProxyList;
function enableProxy() public whenNotStoped {
}
function disableProxy() public whenNotStoped{
}
function proxyBurnFrom(address _from, uint256 _value) public onlyOwnerOrCmo returns (bool success) {
}
function proxyTransferFrom(address _from, address _to, uint256 _value) public onlyOwnerOrCmo returns (bool success) {
}
function proxyBatchSenderFrom(address payable _from, address[] memory _contributors, uint256[] memory _balances) public onlyOwnerOrCmo returns (bool success) {
}
}
contract Pauseable is BaseToken, BurnToken {
event Paused(address account, bool paused);
bool public paused = false;
modifier whenNotPaused() {
}
function setPause(bool _needPause) public onlyOwnerOrCmo {
}
function _transfer(address _from, address _to, uint _value) internal whenNotPaused {
}
function _burn (address _from, uint256 _value) internal whenNotPaused returns(bool success) {
}
function _approve(address spender, uint256 value) internal whenNotPaused returns (bool) {
}
}
contract BeautyUnderToken is BaseToken,Investable,Cappedable,BatchableToken,BurnToken,Pauseable,AirdropToken,LockToken,Proxyable {
constructor() public {
}
function() external payable
{
}
}
| _amount+investSupply<=investMaxSupply | 41,876 | _amount+investSupply<=investMaxSupply |
null | pragma solidity ^0.5.1;
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) {
}
}
contract Ownable {
address public owner = address(0);
bool public stoped = false;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event Stoped(address setter ,bool newValue);
modifier onlyOwner() {
}
modifier whenNotStoped() {
}
function setStoped(bool _needStoped) public onlyOwner {
}
function renounceOwnership() public onlyOwner {
}
function transferOwnership(address newOwner) public onlyOwner {
}
function _transferOwnership(address newOwner) internal {
}
}
contract Cmoable is Ownable {
address public cmo = address(0);
event CmoshipTransferred(address indexed previousCmo, address indexed newCmo);
modifier onlyCmo() {
}
function renounceCmoship() public onlyOwner {
}
function transferCmoship(address newCmo) public onlyOwner {
}
function _transferCmoship(address newCmo) internal {
}
}
contract BaseToken is Ownable, Cmoable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
uint256 public initedSupply = 0;
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
modifier onlyOwnerOrCmo() {
}
function _transfer(address _from, address _to, uint256 _value) internal whenNotStoped {
}
function _approve(address _spender, uint256 _value) internal whenNotStoped returns (bool success) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
}
contract BurnToken is BaseToken {
uint256 public burnSupply = 0;
event Burn(address indexed from, uint256 value);
function _burn(address _from, uint256 _value) internal whenNotStoped returns(bool success) {
}
function burn(uint256 _value) public returns (bool success) {
}
function burnFrom(address _from, uint256 _value) public returns (bool success) {
}
}
contract Cappedable is BaseToken {
uint256 public cap = 0;
uint256 public currentCapped = 0;
uint256 public capBegintime = 0;
uint256 public capPerday = 0;
uint256 public capStartday = 0;
mapping (uint256 => uint256) public mintedOfDay;
event Minted(address indexed account, uint256 value);
function mint(address to, uint256 value) public onlyOwnerOrCmo returns (bool) {
}
function _mint(address to, uint256 value) internal whenNotStoped {
}
}
contract AirdropToken is BaseToken {
uint256 public airMaxSupply = 0;
uint256 public airSupply = 0;
uint256 public airPerTime = 0;
uint256 public airBegintime = 0;
uint256 public airEndtime = 0;
uint256 public airLimitCount = 0;
mapping (address => uint256) public airCountOf;
event Airdrop(address indexed from, uint256 indexed count, uint256 tokenValue);
event AirdopSettingChanged(address indexed sender,uint256 _beginAt, uint256 _endAt, uint256 _perTime, uint256 _limitCount);
function airdrop() internal whenNotStoped
{
}
function changeAirdopSetting(uint256 _beginAt, uint256 _endAt, uint256 _perTime, uint256 _limitCount) public onlyOwnerOrCmo {
}
}
contract Investable is BaseToken {
uint256 public investMaxSupply = 0;
uint256 public investSupply = 0;
uint256 public investBegintime = 0;
uint256 public investEndtime = 0;
uint256 public investRatio = 0;
uint256 public investMin = 0;
address payable public investHolder = address(0x0);
event Investabled(address indexed from, uint256 ethAmount, uint256 ratio, uint256 tokenValue);
event InvestableSettingChanged(address indexed sender,uint256 _beginAt, uint256 _endAt, uint256 _ratio ,uint256 _min, address _holder);
event InvestWithdraw(address indexed receiver, uint256 balance);
function invest() internal {
}
function _invest() internal whenNotStoped {
}
function changeInvestSetting(uint256 _beginAt, uint256 _endAt, uint256 _ratio ,uint256 _min, address payable _holder) public onlyOwnerOrCmo {
}
function investWithdraw() public onlyOwnerOrCmo {
require(<FILL_ME>)
uint256 amount = address(this).balance;
investHolder.transfer(amount);
emit InvestWithdraw(investHolder, amount);
}
}
contract BatchableToken is BaseToken {
uint8 public constant arrayLimit = 100;
event Multisended(address indexed proxyer,address indexed sender, uint256 total);
function _batchSenderFrom(address payable _from, address[] memory _contributors, uint256[] memory _balances) internal whenNotStoped returns (bool success)
{
}
function batchSender(address[] memory _contributors, uint256[] memory _balances) public returns (bool success) {
}
}
contract LockToken is BaseToken {
struct LockMeta {
uint256 amount;
uint256 endtime;
bool deleted;
}
// 0 刪除 1 靜態 2 動態
event Locked(uint32 indexed _type, address indexed _who, uint256 _amounts, uint256 _endtimes);
event Released(uint32 indexed _type, address indexed _who, uint256 _amounts);
// 0 靜態 1 動態 2 總的
mapping (address => mapping(uint32 => uint256)) public lockedAmount;
// 0 靜態 1 動態
mapping (address => mapping(uint32 => LockMeta[])) public lockedDetail;
function _transfer(address _from, address _to, uint _value) internal {
}
function lockRelease() public whenNotStoped {
}
// type = 0 刪除 1 靜態 2 動態
function lock(uint32 _type, address _who, uint256[] memory _amounts, uint256[] memory _endtimes) public onlyOwnerOrCmo {
}
}
contract Proxyable is BaseToken, BatchableToken, BurnToken{
mapping (address => bool) public disabledProxyList;
function enableProxy() public whenNotStoped {
}
function disableProxy() public whenNotStoped{
}
function proxyBurnFrom(address _from, uint256 _value) public onlyOwnerOrCmo returns (bool success) {
}
function proxyTransferFrom(address _from, address _to, uint256 _value) public onlyOwnerOrCmo returns (bool success) {
}
function proxyBatchSenderFrom(address payable _from, address[] memory _contributors, uint256[] memory _balances) public onlyOwnerOrCmo returns (bool success) {
}
}
contract Pauseable is BaseToken, BurnToken {
event Paused(address account, bool paused);
bool public paused = false;
modifier whenNotPaused() {
}
function setPause(bool _needPause) public onlyOwnerOrCmo {
}
function _transfer(address _from, address _to, uint _value) internal whenNotPaused {
}
function _burn (address _from, uint256 _value) internal whenNotPaused returns(bool success) {
}
function _approve(address spender, uint256 value) internal whenNotPaused returns (bool) {
}
}
contract BeautyUnderToken is BaseToken,Investable,Cappedable,BatchableToken,BurnToken,Pauseable,AirdropToken,LockToken,Proxyable {
constructor() public {
}
function() external payable
{
}
}
| !stoped||msg.sender==owner | 41,876 | !stoped||msg.sender==owner |
null | pragma solidity ^0.5.1;
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) {
}
}
contract Ownable {
address public owner = address(0);
bool public stoped = false;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event Stoped(address setter ,bool newValue);
modifier onlyOwner() {
}
modifier whenNotStoped() {
}
function setStoped(bool _needStoped) public onlyOwner {
}
function renounceOwnership() public onlyOwner {
}
function transferOwnership(address newOwner) public onlyOwner {
}
function _transferOwnership(address newOwner) internal {
}
}
contract Cmoable is Ownable {
address public cmo = address(0);
event CmoshipTransferred(address indexed previousCmo, address indexed newCmo);
modifier onlyCmo() {
}
function renounceCmoship() public onlyOwner {
}
function transferCmoship(address newCmo) public onlyOwner {
}
function _transferCmoship(address newCmo) internal {
}
}
contract BaseToken is Ownable, Cmoable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
uint256 public initedSupply = 0;
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
modifier onlyOwnerOrCmo() {
}
function _transfer(address _from, address _to, uint256 _value) internal whenNotStoped {
}
function _approve(address _spender, uint256 _value) internal whenNotStoped returns (bool success) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
}
contract BurnToken is BaseToken {
uint256 public burnSupply = 0;
event Burn(address indexed from, uint256 value);
function _burn(address _from, uint256 _value) internal whenNotStoped returns(bool success) {
}
function burn(uint256 _value) public returns (bool success) {
}
function burnFrom(address _from, uint256 _value) public returns (bool success) {
}
}
contract Cappedable is BaseToken {
uint256 public cap = 0;
uint256 public currentCapped = 0;
uint256 public capBegintime = 0;
uint256 public capPerday = 0;
uint256 public capStartday = 0;
mapping (uint256 => uint256) public mintedOfDay;
event Minted(address indexed account, uint256 value);
function mint(address to, uint256 value) public onlyOwnerOrCmo returns (bool) {
}
function _mint(address to, uint256 value) internal whenNotStoped {
}
}
contract AirdropToken is BaseToken {
uint256 public airMaxSupply = 0;
uint256 public airSupply = 0;
uint256 public airPerTime = 0;
uint256 public airBegintime = 0;
uint256 public airEndtime = 0;
uint256 public airLimitCount = 0;
mapping (address => uint256) public airCountOf;
event Airdrop(address indexed from, uint256 indexed count, uint256 tokenValue);
event AirdopSettingChanged(address indexed sender,uint256 _beginAt, uint256 _endAt, uint256 _perTime, uint256 _limitCount);
function airdrop() internal whenNotStoped
{
}
function changeAirdopSetting(uint256 _beginAt, uint256 _endAt, uint256 _perTime, uint256 _limitCount) public onlyOwnerOrCmo {
}
}
contract Investable is BaseToken {
uint256 public investMaxSupply = 0;
uint256 public investSupply = 0;
uint256 public investBegintime = 0;
uint256 public investEndtime = 0;
uint256 public investRatio = 0;
uint256 public investMin = 0;
address payable public investHolder = address(0x0);
event Investabled(address indexed from, uint256 ethAmount, uint256 ratio, uint256 tokenValue);
event InvestableSettingChanged(address indexed sender,uint256 _beginAt, uint256 _endAt, uint256 _ratio ,uint256 _min, address _holder);
event InvestWithdraw(address indexed receiver, uint256 balance);
function invest() internal {
}
function _invest() internal whenNotStoped {
}
function changeInvestSetting(uint256 _beginAt, uint256 _endAt, uint256 _ratio ,uint256 _min, address payable _holder) public onlyOwnerOrCmo {
}
function investWithdraw() public onlyOwnerOrCmo {
}
}
contract BatchableToken is BaseToken {
uint8 public constant arrayLimit = 100;
event Multisended(address indexed proxyer,address indexed sender, uint256 total);
function _batchSenderFrom(address payable _from, address[] memory _contributors, uint256[] memory _balances) internal whenNotStoped returns (bool success)
{
}
function batchSender(address[] memory _contributors, uint256[] memory _balances) public returns (bool success) {
}
}
contract LockToken is BaseToken {
struct LockMeta {
uint256 amount;
uint256 endtime;
bool deleted;
}
// 0 刪除 1 靜態 2 動態
event Locked(uint32 indexed _type, address indexed _who, uint256 _amounts, uint256 _endtimes);
event Released(uint32 indexed _type, address indexed _who, uint256 _amounts);
// 0 靜態 1 動態 2 總的
mapping (address => mapping(uint32 => uint256)) public lockedAmount;
// 0 靜態 1 動態
mapping (address => mapping(uint32 => LockMeta[])) public lockedDetail;
function _transfer(address _from, address _to, uint _value) internal {
require(<FILL_ME>)
super._transfer(_from, _to, _value);
}
function lockRelease() public whenNotStoped {
}
// type = 0 刪除 1 靜態 2 動態
function lock(uint32 _type, address _who, uint256[] memory _amounts, uint256[] memory _endtimes) public onlyOwnerOrCmo {
}
}
contract Proxyable is BaseToken, BatchableToken, BurnToken{
mapping (address => bool) public disabledProxyList;
function enableProxy() public whenNotStoped {
}
function disableProxy() public whenNotStoped{
}
function proxyBurnFrom(address _from, uint256 _value) public onlyOwnerOrCmo returns (bool success) {
}
function proxyTransferFrom(address _from, address _to, uint256 _value) public onlyOwnerOrCmo returns (bool success) {
}
function proxyBatchSenderFrom(address payable _from, address[] memory _contributors, uint256[] memory _balances) public onlyOwnerOrCmo returns (bool success) {
}
}
contract Pauseable is BaseToken, BurnToken {
event Paused(address account, bool paused);
bool public paused = false;
modifier whenNotPaused() {
}
function setPause(bool _needPause) public onlyOwnerOrCmo {
}
function _transfer(address _from, address _to, uint _value) internal whenNotPaused {
}
function _burn (address _from, uint256 _value) internal whenNotPaused returns(bool success) {
}
function _approve(address spender, uint256 value) internal whenNotPaused returns (bool) {
}
}
contract BeautyUnderToken is BaseToken,Investable,Cappedable,BatchableToken,BurnToken,Pauseable,AirdropToken,LockToken,Proxyable {
constructor() public {
}
function() external payable
{
}
}
| balanceOf[_from]>=_value+lockedAmount[_from][2] | 41,876 | balanceOf[_from]>=_value+lockedAmount[_from][2] |
null | pragma solidity ^0.5.1;
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) {
}
}
contract Ownable {
address public owner = address(0);
bool public stoped = false;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event Stoped(address setter ,bool newValue);
modifier onlyOwner() {
}
modifier whenNotStoped() {
}
function setStoped(bool _needStoped) public onlyOwner {
}
function renounceOwnership() public onlyOwner {
}
function transferOwnership(address newOwner) public onlyOwner {
}
function _transferOwnership(address newOwner) internal {
}
}
contract Cmoable is Ownable {
address public cmo = address(0);
event CmoshipTransferred(address indexed previousCmo, address indexed newCmo);
modifier onlyCmo() {
}
function renounceCmoship() public onlyOwner {
}
function transferCmoship(address newCmo) public onlyOwner {
}
function _transferCmoship(address newCmo) internal {
}
}
contract BaseToken is Ownable, Cmoable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
uint256 public initedSupply = 0;
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
modifier onlyOwnerOrCmo() {
}
function _transfer(address _from, address _to, uint256 _value) internal whenNotStoped {
}
function _approve(address _spender, uint256 _value) internal whenNotStoped returns (bool success) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
}
contract BurnToken is BaseToken {
uint256 public burnSupply = 0;
event Burn(address indexed from, uint256 value);
function _burn(address _from, uint256 _value) internal whenNotStoped returns(bool success) {
}
function burn(uint256 _value) public returns (bool success) {
}
function burnFrom(address _from, uint256 _value) public returns (bool success) {
}
}
contract Cappedable is BaseToken {
uint256 public cap = 0;
uint256 public currentCapped = 0;
uint256 public capBegintime = 0;
uint256 public capPerday = 0;
uint256 public capStartday = 0;
mapping (uint256 => uint256) public mintedOfDay;
event Minted(address indexed account, uint256 value);
function mint(address to, uint256 value) public onlyOwnerOrCmo returns (bool) {
}
function _mint(address to, uint256 value) internal whenNotStoped {
}
}
contract AirdropToken is BaseToken {
uint256 public airMaxSupply = 0;
uint256 public airSupply = 0;
uint256 public airPerTime = 0;
uint256 public airBegintime = 0;
uint256 public airEndtime = 0;
uint256 public airLimitCount = 0;
mapping (address => uint256) public airCountOf;
event Airdrop(address indexed from, uint256 indexed count, uint256 tokenValue);
event AirdopSettingChanged(address indexed sender,uint256 _beginAt, uint256 _endAt, uint256 _perTime, uint256 _limitCount);
function airdrop() internal whenNotStoped
{
}
function changeAirdopSetting(uint256 _beginAt, uint256 _endAt, uint256 _perTime, uint256 _limitCount) public onlyOwnerOrCmo {
}
}
contract Investable is BaseToken {
uint256 public investMaxSupply = 0;
uint256 public investSupply = 0;
uint256 public investBegintime = 0;
uint256 public investEndtime = 0;
uint256 public investRatio = 0;
uint256 public investMin = 0;
address payable public investHolder = address(0x0);
event Investabled(address indexed from, uint256 ethAmount, uint256 ratio, uint256 tokenValue);
event InvestableSettingChanged(address indexed sender,uint256 _beginAt, uint256 _endAt, uint256 _ratio ,uint256 _min, address _holder);
event InvestWithdraw(address indexed receiver, uint256 balance);
function invest() internal {
}
function _invest() internal whenNotStoped {
}
function changeInvestSetting(uint256 _beginAt, uint256 _endAt, uint256 _ratio ,uint256 _min, address payable _holder) public onlyOwnerOrCmo {
}
function investWithdraw() public onlyOwnerOrCmo {
}
}
contract BatchableToken is BaseToken {
uint8 public constant arrayLimit = 100;
event Multisended(address indexed proxyer,address indexed sender, uint256 total);
function _batchSenderFrom(address payable _from, address[] memory _contributors, uint256[] memory _balances) internal whenNotStoped returns (bool success)
{
}
function batchSender(address[] memory _contributors, uint256[] memory _balances) public returns (bool success) {
}
}
contract LockToken is BaseToken {
struct LockMeta {
uint256 amount;
uint256 endtime;
bool deleted;
}
// 0 刪除 1 靜態 2 動態
event Locked(uint32 indexed _type, address indexed _who, uint256 _amounts, uint256 _endtimes);
event Released(uint32 indexed _type, address indexed _who, uint256 _amounts);
// 0 靜態 1 動態 2 總的
mapping (address => mapping(uint32 => uint256)) public lockedAmount;
// 0 靜態 1 動態
mapping (address => mapping(uint32 => LockMeta[])) public lockedDetail;
function _transfer(address _from, address _to, uint _value) internal {
}
function lockRelease() public whenNotStoped {
require(<FILL_ME>)
uint256 fronzed_released = 0;
uint256 dynamic_released = 0;
if ( lockedAmount[msg.sender][0] != 0 )
{
for (uint256 i = 0; i < lockedDetail[msg.sender][0].length; i++) {
LockMeta storage _meta = lockedDetail[msg.sender][0][i];
if ( !_meta.deleted && _meta.endtime <= now)
{
_meta.deleted = true;
fronzed_released = fronzed_released.add(_meta.amount);
emit Released(1, msg.sender, _meta.amount);
}
}
}
if ( lockedAmount[msg.sender][1] != 0 )
{
for (uint256 i = 0; i < lockedDetail[msg.sender][1].length; i++) {
LockMeta storage _meta = lockedDetail[msg.sender][0][i];
if ( !_meta.deleted && _meta.endtime <= now)
{
_meta.deleted = true;
dynamic_released = dynamic_released.add(_meta.amount);
emit Released(2, msg.sender, _meta.amount);
}
}
}
if ( fronzed_released > 0 || dynamic_released > 0 ) {
lockedAmount[msg.sender][0] = lockedAmount[msg.sender][0].sub(fronzed_released);
lockedAmount[msg.sender][1] = lockedAmount[msg.sender][1].sub(dynamic_released);
lockedAmount[msg.sender][2] = lockedAmount[msg.sender][2].sub(dynamic_released).sub(fronzed_released);
}
}
// type = 0 刪除 1 靜態 2 動態
function lock(uint32 _type, address _who, uint256[] memory _amounts, uint256[] memory _endtimes) public onlyOwnerOrCmo {
}
}
contract Proxyable is BaseToken, BatchableToken, BurnToken{
mapping (address => bool) public disabledProxyList;
function enableProxy() public whenNotStoped {
}
function disableProxy() public whenNotStoped{
}
function proxyBurnFrom(address _from, uint256 _value) public onlyOwnerOrCmo returns (bool success) {
}
function proxyTransferFrom(address _from, address _to, uint256 _value) public onlyOwnerOrCmo returns (bool success) {
}
function proxyBatchSenderFrom(address payable _from, address[] memory _contributors, uint256[] memory _balances) public onlyOwnerOrCmo returns (bool success) {
}
}
contract Pauseable is BaseToken, BurnToken {
event Paused(address account, bool paused);
bool public paused = false;
modifier whenNotPaused() {
}
function setPause(bool _needPause) public onlyOwnerOrCmo {
}
function _transfer(address _from, address _to, uint _value) internal whenNotPaused {
}
function _burn (address _from, uint256 _value) internal whenNotPaused returns(bool success) {
}
function _approve(address spender, uint256 value) internal whenNotPaused returns (bool) {
}
}
contract BeautyUnderToken is BaseToken,Investable,Cappedable,BatchableToken,BurnToken,Pauseable,AirdropToken,LockToken,Proxyable {
constructor() public {
}
function() external payable
{
}
}
| lockedAmount[msg.sender][3]!=0 | 41,876 | lockedAmount[msg.sender][3]!=0 |
null | pragma solidity ^0.5.1;
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) {
}
}
contract Ownable {
address public owner = address(0);
bool public stoped = false;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event Stoped(address setter ,bool newValue);
modifier onlyOwner() {
}
modifier whenNotStoped() {
}
function setStoped(bool _needStoped) public onlyOwner {
}
function renounceOwnership() public onlyOwner {
}
function transferOwnership(address newOwner) public onlyOwner {
}
function _transferOwnership(address newOwner) internal {
}
}
contract Cmoable is Ownable {
address public cmo = address(0);
event CmoshipTransferred(address indexed previousCmo, address indexed newCmo);
modifier onlyCmo() {
}
function renounceCmoship() public onlyOwner {
}
function transferCmoship(address newCmo) public onlyOwner {
}
function _transferCmoship(address newCmo) internal {
}
}
contract BaseToken is Ownable, Cmoable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
uint256 public initedSupply = 0;
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
modifier onlyOwnerOrCmo() {
}
function _transfer(address _from, address _to, uint256 _value) internal whenNotStoped {
}
function _approve(address _spender, uint256 _value) internal whenNotStoped returns (bool success) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
}
contract BurnToken is BaseToken {
uint256 public burnSupply = 0;
event Burn(address indexed from, uint256 value);
function _burn(address _from, uint256 _value) internal whenNotStoped returns(bool success) {
}
function burn(uint256 _value) public returns (bool success) {
}
function burnFrom(address _from, uint256 _value) public returns (bool success) {
}
}
contract Cappedable is BaseToken {
uint256 public cap = 0;
uint256 public currentCapped = 0;
uint256 public capBegintime = 0;
uint256 public capPerday = 0;
uint256 public capStartday = 0;
mapping (uint256 => uint256) public mintedOfDay;
event Minted(address indexed account, uint256 value);
function mint(address to, uint256 value) public onlyOwnerOrCmo returns (bool) {
}
function _mint(address to, uint256 value) internal whenNotStoped {
}
}
contract AirdropToken is BaseToken {
uint256 public airMaxSupply = 0;
uint256 public airSupply = 0;
uint256 public airPerTime = 0;
uint256 public airBegintime = 0;
uint256 public airEndtime = 0;
uint256 public airLimitCount = 0;
mapping (address => uint256) public airCountOf;
event Airdrop(address indexed from, uint256 indexed count, uint256 tokenValue);
event AirdopSettingChanged(address indexed sender,uint256 _beginAt, uint256 _endAt, uint256 _perTime, uint256 _limitCount);
function airdrop() internal whenNotStoped
{
}
function changeAirdopSetting(uint256 _beginAt, uint256 _endAt, uint256 _perTime, uint256 _limitCount) public onlyOwnerOrCmo {
}
}
contract Investable is BaseToken {
uint256 public investMaxSupply = 0;
uint256 public investSupply = 0;
uint256 public investBegintime = 0;
uint256 public investEndtime = 0;
uint256 public investRatio = 0;
uint256 public investMin = 0;
address payable public investHolder = address(0x0);
event Investabled(address indexed from, uint256 ethAmount, uint256 ratio, uint256 tokenValue);
event InvestableSettingChanged(address indexed sender,uint256 _beginAt, uint256 _endAt, uint256 _ratio ,uint256 _min, address _holder);
event InvestWithdraw(address indexed receiver, uint256 balance);
function invest() internal {
}
function _invest() internal whenNotStoped {
}
function changeInvestSetting(uint256 _beginAt, uint256 _endAt, uint256 _ratio ,uint256 _min, address payable _holder) public onlyOwnerOrCmo {
}
function investWithdraw() public onlyOwnerOrCmo {
}
}
contract BatchableToken is BaseToken {
uint8 public constant arrayLimit = 100;
event Multisended(address indexed proxyer,address indexed sender, uint256 total);
function _batchSenderFrom(address payable _from, address[] memory _contributors, uint256[] memory _balances) internal whenNotStoped returns (bool success)
{
}
function batchSender(address[] memory _contributors, uint256[] memory _balances) public returns (bool success) {
}
}
contract LockToken is BaseToken {
struct LockMeta {
uint256 amount;
uint256 endtime;
bool deleted;
}
// 0 刪除 1 靜態 2 動態
event Locked(uint32 indexed _type, address indexed _who, uint256 _amounts, uint256 _endtimes);
event Released(uint32 indexed _type, address indexed _who, uint256 _amounts);
// 0 靜態 1 動態 2 總的
mapping (address => mapping(uint32 => uint256)) public lockedAmount;
// 0 靜態 1 動態
mapping (address => mapping(uint32 => LockMeta[])) public lockedDetail;
function _transfer(address _from, address _to, uint _value) internal {
}
function lockRelease() public whenNotStoped {
}
// type = 0 刪除 1 靜態 2 動態
function lock(uint32 _type, address _who, uint256[] memory _amounts, uint256[] memory _endtimes) public onlyOwnerOrCmo {
}
}
contract Proxyable is BaseToken, BatchableToken, BurnToken{
mapping (address => bool) public disabledProxyList;
function enableProxy() public whenNotStoped {
}
function disableProxy() public whenNotStoped{
}
function proxyBurnFrom(address _from, uint256 _value) public onlyOwnerOrCmo returns (bool success) {
require(<FILL_ME>)
super._burn(_from, _value);
return true;
}
function proxyTransferFrom(address _from, address _to, uint256 _value) public onlyOwnerOrCmo returns (bool success) {
}
function proxyBatchSenderFrom(address payable _from, address[] memory _contributors, uint256[] memory _balances) public onlyOwnerOrCmo returns (bool success) {
}
}
contract Pauseable is BaseToken, BurnToken {
event Paused(address account, bool paused);
bool public paused = false;
modifier whenNotPaused() {
}
function setPause(bool _needPause) public onlyOwnerOrCmo {
}
function _transfer(address _from, address _to, uint _value) internal whenNotPaused {
}
function _burn (address _from, uint256 _value) internal whenNotPaused returns(bool success) {
}
function _approve(address spender, uint256 value) internal whenNotPaused returns (bool) {
}
}
contract BeautyUnderToken is BaseToken,Investable,Cappedable,BatchableToken,BurnToken,Pauseable,AirdropToken,LockToken,Proxyable {
constructor() public {
}
function() external payable
{
}
}
| !disabledProxyList[_from] | 41,876 | !disabledProxyList[_from] |
"Address not mapped" | // SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.7.5;
interface IBond {
function paySubsidy() external returns ( uint );
}
// Immutable contract routes between Olympus Pro bonds and subsidy controllers
// Allows for subsidies on bonds offered through bond contracts
contract OPSubsidyRouter is Ownable {
mapping( address => address ) public bondForController; // maps bond contract managed by subsidy controller
/**
* @notice subsidy controller fetches and resets payout counter
* @return uint
*/
function getSubsidyInfo() external returns ( uint ) {
require(<FILL_ME>)
return IBond( bondForController[ msg.sender ] ).paySubsidy();
}
/**
* @notice add new subsidy controller for bond contract
* @param _bond address
* @param _subsidyController address
*/
function addSubsidyController( address _bond, address _subsidyController ) external onlyPolicy() {
}
/**
* @notice remove subsidy controller for bond contract
* @param _subsidyController address
*/
function removeSubsidyController( address _subsidyController ) external onlyPolicy() {
}
}
| bondForController[msg.sender]!=address(0),"Address not mapped" | 41,929 | bondForController[msg.sender]!=address(0) |
null | pragma solidity ^0.4.24;
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipRenounced(address previousOwner);
event OwnershipTransferred(
address previousOwner,
address newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to relinquish control of the contract.
* @notice Renouncing to ownership will leave the contract without an owner.
* It will not be possible to call the functions with the `onlyOwner`
* modifier anymore.
*/
function renounceOwnership() public onlyOwner {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function transferOwnership(address _newOwner) public onlyOwner {
}
/**
* @dev Transfers control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function _transferOwnership(address _newOwner) internal {
}
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 _a, uint256 _b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 _a, uint256 _b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender)
external view returns (uint256);
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value)
external returns (bool);
function transferFrom(address from, address to, uint256 value)
external returns (bool);
event Transfer(
address from,
address to,
uint256 value
);
event Approval(
address owner,
address spender,
uint256 value
);
}
contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
bool public isPaused;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
}
/**
* @dev Gets the balance of the specified address.
* @param owner The address to query the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address owner) public view returns (uint256) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param owner address The address which owns the funds.
* @param spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(
address owner,
address spender
)
public
view
returns (uint256)
{
}
/**
* @dev 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 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 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 Increase the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed_[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param spender The address which will spend the funds.
* @param addedValue The amount of tokens to increase the allowance by.
*/
function increaseAllowance(
address spender,
uint256 addedValue
)
public
returns (bool)
{
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed_[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param spender The address which will spend the funds.
* @param subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseAllowance(
address spender,
uint256 subtractedValue
)
public
returns (bool)
{
}
/**
* @dev Transfer token for a specified addresses
* @param from The address to transfer from.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function _transfer(address from, address to, uint256 value) internal {
}
/**
* @dev Internal function that mints an amount of the token and assigns it to
* an account. This encapsulates the modification of balances such that the
* proper events are emitted.
* @param account The account that will receive the created tokens.
* @param value The amount that will be created.
*/
function _mint(address account, uint256 value) internal {
}
/**
* @dev Internal function that burns an amount of the token of a given
* account.
* @param account The account whose tokens will be burnt.
* @param value The amount that will be burnt.
*/
function _burn(address account, uint256 value) internal {
}
/**
* @dev Internal function that burns an amount of the token of a given
* account, deducting from the sender's allowance for said account. Uses the
* internal burn function.
* @param account The account whose tokens will be burnt.
* @param value The amount that will be burnt.
*/
function _burnFrom(address account, uint256 value) internal {
}
}
contract FabgCoin is ERC20, Ownable {
string public name;
string public symbol;
uint8 public decimals;
//tokens per one eth
uint256 public rate;
uint256 public minimalPayment;
bool public isBuyBlocked;
address saleAgent;
uint256 public totalEarnings;
event TokensCreatedWithoutPayment(address Receiver, uint256 Amount);
event BoughtTokens(address Receiver, uint256 Amount, uint256 sentWei);
event BuyPaused();
event BuyUnpaused();
event UsagePaused();
event UsageUnpaused();
event Payment(address payer, uint256 weiAmount);
modifier onlySaleAgent() {
}
function changeRate(uint256 _rate) public onlyOwner {
}
function pauseCustomBuying() public onlyOwner {
}
function resumeCustomBuy() public onlyOwner {
}
function pauseUsage() public onlyOwner {
}
function resumeUsage() public onlyOwner {
}
function setSaleAgent(address _saleAgent) public onlyOwner {
}
function createTokenWithoutPayment(address _receiver, uint256 _amount) public onlyOwner {
}
function createTokenViaSaleAgent(address _receiver, uint256 _amount) public onlySaleAgent {
}
function buyTokens() public payable {
}
}
contract FabgCoinMarketPack is FabgCoin {
using SafeMath for uint256;
bool isPausedForSale;
/**
* maping for store amount of tokens to amount of wei per that pack
*/
mapping(uint256 => uint256) packsToWei;
uint256[] packs;
uint256 public totalEarningsForPackSale;
address adminsWallet;
event MarketPaused();
event MarketUnpaused();
event PackCreated(uint256 TokensAmount, uint256 WeiAmount);
event PackDeleted(uint256 TokensAmount);
event PackBought(address Buyer, uint256 TokensAmount, uint256 WeiAmount);
event Withdrawal(address receiver, uint256 weiAmount);
constructor() public {
}
/**
* @dev set address for wallet for withdrawal
* @param _newMultisig new address for withdrawals
*/
function setAddressForPayment(address _newMultisig) public onlyOwner {
}
/**
* @dev fallback function which can receive ether with no actions
*/
function() public payable {
}
/**
* @dev pause possibility of buying pack of tokens
*/
function pausePackSelling() public onlyOwner {
}
/**
* @dev return possibility of buying pack of tokens
*/
function unpausePackSelling() public onlyOwner {
}
/**
* @dev add pack to list of possible to buy
* @param _amountOfTokens amount of tokens in pack
* @param _amountOfWei amount of wei for buying 1 pack
*/
function addPack(uint256 _amountOfTokens, uint256 _amountOfWei) public onlyOwner {
require(<FILL_ME>)
require(_amountOfTokens != 0);
require(_amountOfWei != 0);
packs.push(_amountOfTokens);
packsToWei[_amountOfTokens] = _amountOfWei;
emit PackCreated(_amountOfTokens, _amountOfWei);
}
/**
* @dev buying existing pack of tokens
* @param _amountOfTokens amount of tokens in pack for buying
*/
function buyPack(uint256 _amountOfTokens) public payable {
}
/**
* @dev withdraw all ether from this contract to sender's wallet
*/
function withdraw() public onlyOwner {
}
/**
* @dev delete pack from selling
* @param _amountOfTokens which pack delete
*/
function deletePack(uint256 _amountOfTokens) public onlyOwner {
}
/**
* @dev get list of all available packs
* @return uint256 array of packs
*/
function getAllPacks() public view returns (uint256[]) {
}
/**
* @dev get price of current pack in wei
* @param _amountOfTokens current pack for price
* @return uint256 amount of wei for buying
*/
function getPackPrice(uint256 _amountOfTokens) public view returns (uint256) {
}
}
| packsToWei[_amountOfTokens]==0 | 41,933 | packsToWei[_amountOfTokens]==0 |
null | pragma solidity ^0.4.24;
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipRenounced(address previousOwner);
event OwnershipTransferred(
address previousOwner,
address newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to relinquish control of the contract.
* @notice Renouncing to ownership will leave the contract without an owner.
* It will not be possible to call the functions with the `onlyOwner`
* modifier anymore.
*/
function renounceOwnership() public onlyOwner {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function transferOwnership(address _newOwner) public onlyOwner {
}
/**
* @dev Transfers control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function _transferOwnership(address _newOwner) internal {
}
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 _a, uint256 _b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 _a, uint256 _b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender)
external view returns (uint256);
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value)
external returns (bool);
function transferFrom(address from, address to, uint256 value)
external returns (bool);
event Transfer(
address from,
address to,
uint256 value
);
event Approval(
address owner,
address spender,
uint256 value
);
}
contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
bool public isPaused;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
}
/**
* @dev Gets the balance of the specified address.
* @param owner The address to query the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address owner) public view returns (uint256) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param owner address The address which owns the funds.
* @param spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(
address owner,
address spender
)
public
view
returns (uint256)
{
}
/**
* @dev 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 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 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 Increase the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed_[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param spender The address which will spend the funds.
* @param addedValue The amount of tokens to increase the allowance by.
*/
function increaseAllowance(
address spender,
uint256 addedValue
)
public
returns (bool)
{
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed_[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param spender The address which will spend the funds.
* @param subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseAllowance(
address spender,
uint256 subtractedValue
)
public
returns (bool)
{
}
/**
* @dev Transfer token for a specified addresses
* @param from The address to transfer from.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function _transfer(address from, address to, uint256 value) internal {
}
/**
* @dev Internal function that mints an amount of the token and assigns it to
* an account. This encapsulates the modification of balances such that the
* proper events are emitted.
* @param account The account that will receive the created tokens.
* @param value The amount that will be created.
*/
function _mint(address account, uint256 value) internal {
}
/**
* @dev Internal function that burns an amount of the token of a given
* account.
* @param account The account whose tokens will be burnt.
* @param value The amount that will be burnt.
*/
function _burn(address account, uint256 value) internal {
}
/**
* @dev Internal function that burns an amount of the token of a given
* account, deducting from the sender's allowance for said account. Uses the
* internal burn function.
* @param account The account whose tokens will be burnt.
* @param value The amount that will be burnt.
*/
function _burnFrom(address account, uint256 value) internal {
}
}
contract FabgCoin is ERC20, Ownable {
string public name;
string public symbol;
uint8 public decimals;
//tokens per one eth
uint256 public rate;
uint256 public minimalPayment;
bool public isBuyBlocked;
address saleAgent;
uint256 public totalEarnings;
event TokensCreatedWithoutPayment(address Receiver, uint256 Amount);
event BoughtTokens(address Receiver, uint256 Amount, uint256 sentWei);
event BuyPaused();
event BuyUnpaused();
event UsagePaused();
event UsageUnpaused();
event Payment(address payer, uint256 weiAmount);
modifier onlySaleAgent() {
}
function changeRate(uint256 _rate) public onlyOwner {
}
function pauseCustomBuying() public onlyOwner {
}
function resumeCustomBuy() public onlyOwner {
}
function pauseUsage() public onlyOwner {
}
function resumeUsage() public onlyOwner {
}
function setSaleAgent(address _saleAgent) public onlyOwner {
}
function createTokenWithoutPayment(address _receiver, uint256 _amount) public onlyOwner {
}
function createTokenViaSaleAgent(address _receiver, uint256 _amount) public onlySaleAgent {
}
function buyTokens() public payable {
}
}
contract FabgCoinMarketPack is FabgCoin {
using SafeMath for uint256;
bool isPausedForSale;
/**
* maping for store amount of tokens to amount of wei per that pack
*/
mapping(uint256 => uint256) packsToWei;
uint256[] packs;
uint256 public totalEarningsForPackSale;
address adminsWallet;
event MarketPaused();
event MarketUnpaused();
event PackCreated(uint256 TokensAmount, uint256 WeiAmount);
event PackDeleted(uint256 TokensAmount);
event PackBought(address Buyer, uint256 TokensAmount, uint256 WeiAmount);
event Withdrawal(address receiver, uint256 weiAmount);
constructor() public {
}
/**
* @dev set address for wallet for withdrawal
* @param _newMultisig new address for withdrawals
*/
function setAddressForPayment(address _newMultisig) public onlyOwner {
}
/**
* @dev fallback function which can receive ether with no actions
*/
function() public payable {
}
/**
* @dev pause possibility of buying pack of tokens
*/
function pausePackSelling() public onlyOwner {
}
/**
* @dev return possibility of buying pack of tokens
*/
function unpausePackSelling() public onlyOwner {
}
/**
* @dev add pack to list of possible to buy
* @param _amountOfTokens amount of tokens in pack
* @param _amountOfWei amount of wei for buying 1 pack
*/
function addPack(uint256 _amountOfTokens, uint256 _amountOfWei) public onlyOwner {
}
/**
* @dev buying existing pack of tokens
* @param _amountOfTokens amount of tokens in pack for buying
*/
function buyPack(uint256 _amountOfTokens) public payable {
require(<FILL_ME>)
require(msg.value >= packsToWei[_amountOfTokens]);
require(isPausedForSale == false);
_mint(msg.sender, _amountOfTokens * 1 ether);
(msg.sender).transfer(msg.value.sub(packsToWei[_amountOfTokens]));
totalEarnings = totalEarnings.add(packsToWei[_amountOfTokens]);
totalEarningsForPackSale = totalEarningsForPackSale.add(packsToWei[_amountOfTokens]);
emit PackBought(msg.sender, _amountOfTokens, packsToWei[_amountOfTokens]);
}
/**
* @dev withdraw all ether from this contract to sender's wallet
*/
function withdraw() public onlyOwner {
}
/**
* @dev delete pack from selling
* @param _amountOfTokens which pack delete
*/
function deletePack(uint256 _amountOfTokens) public onlyOwner {
}
/**
* @dev get list of all available packs
* @return uint256 array of packs
*/
function getAllPacks() public view returns (uint256[]) {
}
/**
* @dev get price of current pack in wei
* @param _amountOfTokens current pack for price
* @return uint256 amount of wei for buying
*/
function getPackPrice(uint256 _amountOfTokens) public view returns (uint256) {
}
}
| packsToWei[_amountOfTokens]>0 | 41,933 | packsToWei[_amountOfTokens]>0 |
null | pragma solidity ^0.4.24;
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipRenounced(address previousOwner);
event OwnershipTransferred(
address previousOwner,
address newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to relinquish control of the contract.
* @notice Renouncing to ownership will leave the contract without an owner.
* It will not be possible to call the functions with the `onlyOwner`
* modifier anymore.
*/
function renounceOwnership() public onlyOwner {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function transferOwnership(address _newOwner) public onlyOwner {
}
/**
* @dev Transfers control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function _transferOwnership(address _newOwner) internal {
}
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 _a, uint256 _b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 _a, uint256 _b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender)
external view returns (uint256);
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value)
external returns (bool);
function transferFrom(address from, address to, uint256 value)
external returns (bool);
event Transfer(
address from,
address to,
uint256 value
);
event Approval(
address owner,
address spender,
uint256 value
);
}
contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
uint256 private _totalSupply;
bool public isPaused;
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
}
/**
* @dev Gets the balance of the specified address.
* @param owner The address to query the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address owner) public view returns (uint256) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param owner address The address which owns the funds.
* @param spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(
address owner,
address spender
)
public
view
returns (uint256)
{
}
/**
* @dev 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 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 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 Increase the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed_[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param spender The address which will spend the funds.
* @param addedValue The amount of tokens to increase the allowance by.
*/
function increaseAllowance(
address spender,
uint256 addedValue
)
public
returns (bool)
{
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
* approve should be called when allowed_[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param spender The address which will spend the funds.
* @param subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseAllowance(
address spender,
uint256 subtractedValue
)
public
returns (bool)
{
}
/**
* @dev Transfer token for a specified addresses
* @param from The address to transfer from.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function _transfer(address from, address to, uint256 value) internal {
}
/**
* @dev Internal function that mints an amount of the token and assigns it to
* an account. This encapsulates the modification of balances such that the
* proper events are emitted.
* @param account The account that will receive the created tokens.
* @param value The amount that will be created.
*/
function _mint(address account, uint256 value) internal {
}
/**
* @dev Internal function that burns an amount of the token of a given
* account.
* @param account The account whose tokens will be burnt.
* @param value The amount that will be burnt.
*/
function _burn(address account, uint256 value) internal {
}
/**
* @dev Internal function that burns an amount of the token of a given
* account, deducting from the sender's allowance for said account. Uses the
* internal burn function.
* @param account The account whose tokens will be burnt.
* @param value The amount that will be burnt.
*/
function _burnFrom(address account, uint256 value) internal {
}
}
contract FabgCoin is ERC20, Ownable {
string public name;
string public symbol;
uint8 public decimals;
//tokens per one eth
uint256 public rate;
uint256 public minimalPayment;
bool public isBuyBlocked;
address saleAgent;
uint256 public totalEarnings;
event TokensCreatedWithoutPayment(address Receiver, uint256 Amount);
event BoughtTokens(address Receiver, uint256 Amount, uint256 sentWei);
event BuyPaused();
event BuyUnpaused();
event UsagePaused();
event UsageUnpaused();
event Payment(address payer, uint256 weiAmount);
modifier onlySaleAgent() {
}
function changeRate(uint256 _rate) public onlyOwner {
}
function pauseCustomBuying() public onlyOwner {
}
function resumeCustomBuy() public onlyOwner {
}
function pauseUsage() public onlyOwner {
}
function resumeUsage() public onlyOwner {
}
function setSaleAgent(address _saleAgent) public onlyOwner {
}
function createTokenWithoutPayment(address _receiver, uint256 _amount) public onlyOwner {
}
function createTokenViaSaleAgent(address _receiver, uint256 _amount) public onlySaleAgent {
}
function buyTokens() public payable {
}
}
contract FabgCoinMarketPack is FabgCoin {
using SafeMath for uint256;
bool isPausedForSale;
/**
* maping for store amount of tokens to amount of wei per that pack
*/
mapping(uint256 => uint256) packsToWei;
uint256[] packs;
uint256 public totalEarningsForPackSale;
address adminsWallet;
event MarketPaused();
event MarketUnpaused();
event PackCreated(uint256 TokensAmount, uint256 WeiAmount);
event PackDeleted(uint256 TokensAmount);
event PackBought(address Buyer, uint256 TokensAmount, uint256 WeiAmount);
event Withdrawal(address receiver, uint256 weiAmount);
constructor() public {
}
/**
* @dev set address for wallet for withdrawal
* @param _newMultisig new address for withdrawals
*/
function setAddressForPayment(address _newMultisig) public onlyOwner {
}
/**
* @dev fallback function which can receive ether with no actions
*/
function() public payable {
}
/**
* @dev pause possibility of buying pack of tokens
*/
function pausePackSelling() public onlyOwner {
}
/**
* @dev return possibility of buying pack of tokens
*/
function unpausePackSelling() public onlyOwner {
}
/**
* @dev add pack to list of possible to buy
* @param _amountOfTokens amount of tokens in pack
* @param _amountOfWei amount of wei for buying 1 pack
*/
function addPack(uint256 _amountOfTokens, uint256 _amountOfWei) public onlyOwner {
}
/**
* @dev buying existing pack of tokens
* @param _amountOfTokens amount of tokens in pack for buying
*/
function buyPack(uint256 _amountOfTokens) public payable {
}
/**
* @dev withdraw all ether from this contract to sender's wallet
*/
function withdraw() public onlyOwner {
}
/**
* @dev delete pack from selling
* @param _amountOfTokens which pack delete
*/
function deletePack(uint256 _amountOfTokens) public onlyOwner {
require(<FILL_ME>)
require(_amountOfTokens != 0);
packsToWei[_amountOfTokens] = 0;
uint256 index;
for(uint256 i = 0; i < packs.length; i++) {
if(packs[i] == _amountOfTokens) {
index = i;
break;
}
}
for(i = index; i < packs.length - 1; i++) {
packs[i] = packs[i + 1];
}
packs.length--;
emit PackDeleted(_amountOfTokens);
}
/**
* @dev get list of all available packs
* @return uint256 array of packs
*/
function getAllPacks() public view returns (uint256[]) {
}
/**
* @dev get price of current pack in wei
* @param _amountOfTokens current pack for price
* @return uint256 amount of wei for buying
*/
function getPackPrice(uint256 _amountOfTokens) public view returns (uint256) {
}
}
| packsToWei[_amountOfTokens]!=0 | 41,933 | packsToWei[_amountOfTokens]!=0 |
null | pragma solidity 0.5.15;
import "./AssetSwap.sol";
contract Oracle {
constructor (uint ethPrice, uint spxPrice, uint btcPrice) public {
}
address[3] public assetSwaps;
uint[6][3] private prices;
uint public lastUpdateTime;
uint public lastSettleTime;
int[3] public levRatio;
uint8 public currentDay;
bool public nextUpdateSettle;
mapping(address => bool) public admins;
mapping(address => bool) public readers;
event PriceUpdated(
uint ethPrice,
uint spxPrice,
uint btcPrice,
uint eUTCTime,
uint eDayNumber,
bool eisCorrection
);
modifier onlyAdmin() {
}
/** Grant write priviledges to a user,
* mainly intended for when the admin wants to switch accounts, ie, paired with a removal
*/
function addAdmin(address newAdmin)
external
onlyAdmin
{
}
/** Grant priviledges to a user accessing price data on the blockchain
* @param newReader the address. Any reader is thus approved by the oracle/admin
* useful for new contracts that use this oracle, in that the oracle would not
* need to create a new oracle contract for ETH prices
*/
function addReaders(address newReader)
external
onlyAdmin
{
}
/** this can only be done once, so this oracle is solely for working with
* three AssetSwap contracts
* assetswap 0 is the ETH, at 2.5 leverage
* assetswap 1 is the SPX, at 10x leverage
* assetswap 2 is the BTC, at 2.5 leverage
*/
function addAssetSwaps(address newAS0, address newAS1, address newAS2)
external
onlyAdmin
{
require(<FILL_ME>)
assetSwaps[0] = newAS0;
assetSwaps[1] = newAS1;
assetSwaps[2] = newAS2;
readers[newAS0] = true;
readers[newAS1] = true;
readers[newAS2] = true;
}
function removeAdmin(address toRemove)
external
onlyAdmin
{
}
/** Quickly fix an erroneous price, or correct the fact that 50% movements are
* not allowed in the standard price input
* this must be called within 60 minutes of the initial price update occurence
*/
function editPrice(uint _ethprice, uint _spxprice, uint _btcprice)
external
onlyAdmin
{
}
function updatePrices(uint ethp, uint spxp, uint btcp, bool _newFinalDay)
external
onlyAdmin
{
}
function settlePrice(uint ethp, uint spxp, uint btcp)
external
onlyAdmin
{
}
/** Return the entire current price array for a given asset
* @param _assetID the asset id of the desired asset
* @return _priceHist the price array in USD for the asset
* @dev only the admin and addresses granted readership may call this function
* While only an admin or reader can access this within the EVM
* anyone can access these prices outside the EVM
* eg, in javascript: OracleAddress.methods.getUsdPrices.cacheCall(0, { 'from': 'AdminAddress' }
*/
function getUsdPrices(uint _assetID)
public
view
returns (uint[6] memory _priceHist)
{
}
/** Return only the latest prices
* @param _assetID the asset id of the desired asset
* @return _price the latest price of the given asset
* @dev only the admin or a designated reader may call this function within the EVM
*/
function getCurrentPrice(uint _assetID)
public
view
returns (uint _price)
{
}
/**
* @return startDay relevant for trades done now
* pulls the day relevant for new AssetSwap subcontracts
* startDay 2 means the 2 slot (ie, the third) of prices will be the initial
* price for the subcontract. As 5 is the top slot, and rolls into slot 0
* the next week, the next pricing day is 1 when the current day == 5
* (this would be a weekend or Monday morning)
*/
function getStartDay()
public
view
returns (uint8 _startDay)
{
}
function updatePriceSingle(uint _assetID, uint _price)
internal
{
}
function bound(int a, int b)
internal
pure
returns (int)
{
}
}
| assetSwaps[0]==address(0) | 41,948 | assetSwaps[0]==address(0) |
null | pragma solidity 0.5.15;
import "./AssetSwap.sol";
contract Oracle {
constructor (uint ethPrice, uint spxPrice, uint btcPrice) public {
}
address[3] public assetSwaps;
uint[6][3] private prices;
uint public lastUpdateTime;
uint public lastSettleTime;
int[3] public levRatio;
uint8 public currentDay;
bool public nextUpdateSettle;
mapping(address => bool) public admins;
mapping(address => bool) public readers;
event PriceUpdated(
uint ethPrice,
uint spxPrice,
uint btcPrice,
uint eUTCTime,
uint eDayNumber,
bool eisCorrection
);
modifier onlyAdmin() {
}
/** Grant write priviledges to a user,
* mainly intended for when the admin wants to switch accounts, ie, paired with a removal
*/
function addAdmin(address newAdmin)
external
onlyAdmin
{
}
/** Grant priviledges to a user accessing price data on the blockchain
* @param newReader the address. Any reader is thus approved by the oracle/admin
* useful for new contracts that use this oracle, in that the oracle would not
* need to create a new oracle contract for ETH prices
*/
function addReaders(address newReader)
external
onlyAdmin
{
}
/** this can only be done once, so this oracle is solely for working with
* three AssetSwap contracts
* assetswap 0 is the ETH, at 2.5 leverage
* assetswap 1 is the SPX, at 10x leverage
* assetswap 2 is the BTC, at 2.5 leverage
*/
function addAssetSwaps(address newAS0, address newAS1, address newAS2)
external
onlyAdmin
{
}
function removeAdmin(address toRemove)
external
onlyAdmin
{
}
/** Quickly fix an erroneous price, or correct the fact that 50% movements are
* not allowed in the standard price input
* this must be called within 60 minutes of the initial price update occurence
*/
function editPrice(uint _ethprice, uint _spxprice, uint _btcprice)
external
onlyAdmin
{
}
function updatePrices(uint ethp, uint spxp, uint btcp, bool _newFinalDay)
external
onlyAdmin
{
/// no updates within 20 hours per day
require(now > lastUpdateTime + 20 hours);
/** can't be executed if the next price should be a settlement price
* settlement prices are special because they need to update the asset returns
* and sent to the AssetSwap contracts
*/
require(<FILL_ME>)
/// after settlement update, at least 48 hours until new prices are posted
require(now > lastSettleTime + 48 hours, "too soon after last settle");
/// prevents faulty prices, as stale prices are a common source of bad prices.
require(ethp != prices[0][currentDay] && spxp != prices[1][currentDay] && btcp != prices[2][currentDay]);
/// extreme price movements are probably mistakes. They can be posted
/// but only via a 'price edit' that must be done within 60 minutes of the initial update
require((ethp * 10 < prices[0][currentDay] * 15) && (ethp * 10 > prices[0][currentDay] * 5));
require((spxp * 10 < prices[1][currentDay] * 15) && (spxp * 10 > prices[1][currentDay] * 5));
require((btcp * 10 < prices[2][currentDay] * 15) && (btcp * 10 > prices[2][currentDay] * 5));
if (currentDay == 5) {
currentDay = 1;
nextUpdateSettle = false;
} else {
currentDay += 1;
nextUpdateSettle = _newFinalDay;
}
if (currentDay == 4)
nextUpdateSettle = true;
updatePriceSingle(0, ethp);
updatePriceSingle(1, spxp);
updatePriceSingle(2, btcp);
emit PriceUpdated(ethp, spxp, btcp, now, currentDay, false);
lastUpdateTime = now;
}
function settlePrice(uint ethp, uint spxp, uint btcp)
external
onlyAdmin
{
}
/** Return the entire current price array for a given asset
* @param _assetID the asset id of the desired asset
* @return _priceHist the price array in USD for the asset
* @dev only the admin and addresses granted readership may call this function
* While only an admin or reader can access this within the EVM
* anyone can access these prices outside the EVM
* eg, in javascript: OracleAddress.methods.getUsdPrices.cacheCall(0, { 'from': 'AdminAddress' }
*/
function getUsdPrices(uint _assetID)
public
view
returns (uint[6] memory _priceHist)
{
}
/** Return only the latest prices
* @param _assetID the asset id of the desired asset
* @return _price the latest price of the given asset
* @dev only the admin or a designated reader may call this function within the EVM
*/
function getCurrentPrice(uint _assetID)
public
view
returns (uint _price)
{
}
/**
* @return startDay relevant for trades done now
* pulls the day relevant for new AssetSwap subcontracts
* startDay 2 means the 2 slot (ie, the third) of prices will be the initial
* price for the subcontract. As 5 is the top slot, and rolls into slot 0
* the next week, the next pricing day is 1 when the current day == 5
* (this would be a weekend or Monday morning)
*/
function getStartDay()
public
view
returns (uint8 _startDay)
{
}
function updatePriceSingle(uint _assetID, uint _price)
internal
{
}
function bound(int a, int b)
internal
pure
returns (int)
{
}
}
| !nextUpdateSettle | 41,948 | !nextUpdateSettle |
null | pragma solidity 0.5.15;
import "./AssetSwap.sol";
contract Oracle {
constructor (uint ethPrice, uint spxPrice, uint btcPrice) public {
}
address[3] public assetSwaps;
uint[6][3] private prices;
uint public lastUpdateTime;
uint public lastSettleTime;
int[3] public levRatio;
uint8 public currentDay;
bool public nextUpdateSettle;
mapping(address => bool) public admins;
mapping(address => bool) public readers;
event PriceUpdated(
uint ethPrice,
uint spxPrice,
uint btcPrice,
uint eUTCTime,
uint eDayNumber,
bool eisCorrection
);
modifier onlyAdmin() {
}
/** Grant write priviledges to a user,
* mainly intended for when the admin wants to switch accounts, ie, paired with a removal
*/
function addAdmin(address newAdmin)
external
onlyAdmin
{
}
/** Grant priviledges to a user accessing price data on the blockchain
* @param newReader the address. Any reader is thus approved by the oracle/admin
* useful for new contracts that use this oracle, in that the oracle would not
* need to create a new oracle contract for ETH prices
*/
function addReaders(address newReader)
external
onlyAdmin
{
}
/** this can only be done once, so this oracle is solely for working with
* three AssetSwap contracts
* assetswap 0 is the ETH, at 2.5 leverage
* assetswap 1 is the SPX, at 10x leverage
* assetswap 2 is the BTC, at 2.5 leverage
*/
function addAssetSwaps(address newAS0, address newAS1, address newAS2)
external
onlyAdmin
{
}
function removeAdmin(address toRemove)
external
onlyAdmin
{
}
/** Quickly fix an erroneous price, or correct the fact that 50% movements are
* not allowed in the standard price input
* this must be called within 60 minutes of the initial price update occurence
*/
function editPrice(uint _ethprice, uint _spxprice, uint _btcprice)
external
onlyAdmin
{
}
function updatePrices(uint ethp, uint spxp, uint btcp, bool _newFinalDay)
external
onlyAdmin
{
/// no updates within 20 hours per day
require(now > lastUpdateTime + 20 hours);
/** can't be executed if the next price should be a settlement price
* settlement prices are special because they need to update the asset returns
* and sent to the AssetSwap contracts
*/
require(!nextUpdateSettle);
/// after settlement update, at least 48 hours until new prices are posted
require(now > lastSettleTime + 48 hours, "too soon after last settle");
/// prevents faulty prices, as stale prices are a common source of bad prices.
require(ethp != prices[0][currentDay] && spxp != prices[1][currentDay] && btcp != prices[2][currentDay]);
/// extreme price movements are probably mistakes. They can be posted
/// but only via a 'price edit' that must be done within 60 minutes of the initial update
require(<FILL_ME>)
require((spxp * 10 < prices[1][currentDay] * 15) && (spxp * 10 > prices[1][currentDay] * 5));
require((btcp * 10 < prices[2][currentDay] * 15) && (btcp * 10 > prices[2][currentDay] * 5));
if (currentDay == 5) {
currentDay = 1;
nextUpdateSettle = false;
} else {
currentDay += 1;
nextUpdateSettle = _newFinalDay;
}
if (currentDay == 4)
nextUpdateSettle = true;
updatePriceSingle(0, ethp);
updatePriceSingle(1, spxp);
updatePriceSingle(2, btcp);
emit PriceUpdated(ethp, spxp, btcp, now, currentDay, false);
lastUpdateTime = now;
}
function settlePrice(uint ethp, uint spxp, uint btcp)
external
onlyAdmin
{
}
/** Return the entire current price array for a given asset
* @param _assetID the asset id of the desired asset
* @return _priceHist the price array in USD for the asset
* @dev only the admin and addresses granted readership may call this function
* While only an admin or reader can access this within the EVM
* anyone can access these prices outside the EVM
* eg, in javascript: OracleAddress.methods.getUsdPrices.cacheCall(0, { 'from': 'AdminAddress' }
*/
function getUsdPrices(uint _assetID)
public
view
returns (uint[6] memory _priceHist)
{
}
/** Return only the latest prices
* @param _assetID the asset id of the desired asset
* @return _price the latest price of the given asset
* @dev only the admin or a designated reader may call this function within the EVM
*/
function getCurrentPrice(uint _assetID)
public
view
returns (uint _price)
{
}
/**
* @return startDay relevant for trades done now
* pulls the day relevant for new AssetSwap subcontracts
* startDay 2 means the 2 slot (ie, the third) of prices will be the initial
* price for the subcontract. As 5 is the top slot, and rolls into slot 0
* the next week, the next pricing day is 1 when the current day == 5
* (this would be a weekend or Monday morning)
*/
function getStartDay()
public
view
returns (uint8 _startDay)
{
}
function updatePriceSingle(uint _assetID, uint _price)
internal
{
}
function bound(int a, int b)
internal
pure
returns (int)
{
}
}
| (ethp*10<prices[0][currentDay]*15)&&(ethp*10>prices[0][currentDay]*5) | 41,948 | (ethp*10<prices[0][currentDay]*15)&&(ethp*10>prices[0][currentDay]*5) |
null | pragma solidity 0.5.15;
import "./AssetSwap.sol";
contract Oracle {
constructor (uint ethPrice, uint spxPrice, uint btcPrice) public {
}
address[3] public assetSwaps;
uint[6][3] private prices;
uint public lastUpdateTime;
uint public lastSettleTime;
int[3] public levRatio;
uint8 public currentDay;
bool public nextUpdateSettle;
mapping(address => bool) public admins;
mapping(address => bool) public readers;
event PriceUpdated(
uint ethPrice,
uint spxPrice,
uint btcPrice,
uint eUTCTime,
uint eDayNumber,
bool eisCorrection
);
modifier onlyAdmin() {
}
/** Grant write priviledges to a user,
* mainly intended for when the admin wants to switch accounts, ie, paired with a removal
*/
function addAdmin(address newAdmin)
external
onlyAdmin
{
}
/** Grant priviledges to a user accessing price data on the blockchain
* @param newReader the address. Any reader is thus approved by the oracle/admin
* useful for new contracts that use this oracle, in that the oracle would not
* need to create a new oracle contract for ETH prices
*/
function addReaders(address newReader)
external
onlyAdmin
{
}
/** this can only be done once, so this oracle is solely for working with
* three AssetSwap contracts
* assetswap 0 is the ETH, at 2.5 leverage
* assetswap 1 is the SPX, at 10x leverage
* assetswap 2 is the BTC, at 2.5 leverage
*/
function addAssetSwaps(address newAS0, address newAS1, address newAS2)
external
onlyAdmin
{
}
function removeAdmin(address toRemove)
external
onlyAdmin
{
}
/** Quickly fix an erroneous price, or correct the fact that 50% movements are
* not allowed in the standard price input
* this must be called within 60 minutes of the initial price update occurence
*/
function editPrice(uint _ethprice, uint _spxprice, uint _btcprice)
external
onlyAdmin
{
}
function updatePrices(uint ethp, uint spxp, uint btcp, bool _newFinalDay)
external
onlyAdmin
{
/// no updates within 20 hours per day
require(now > lastUpdateTime + 20 hours);
/** can't be executed if the next price should be a settlement price
* settlement prices are special because they need to update the asset returns
* and sent to the AssetSwap contracts
*/
require(!nextUpdateSettle);
/// after settlement update, at least 48 hours until new prices are posted
require(now > lastSettleTime + 48 hours, "too soon after last settle");
/// prevents faulty prices, as stale prices are a common source of bad prices.
require(ethp != prices[0][currentDay] && spxp != prices[1][currentDay] && btcp != prices[2][currentDay]);
/// extreme price movements are probably mistakes. They can be posted
/// but only via a 'price edit' that must be done within 60 minutes of the initial update
require((ethp * 10 < prices[0][currentDay] * 15) && (ethp * 10 > prices[0][currentDay] * 5));
require(<FILL_ME>)
require((btcp * 10 < prices[2][currentDay] * 15) && (btcp * 10 > prices[2][currentDay] * 5));
if (currentDay == 5) {
currentDay = 1;
nextUpdateSettle = false;
} else {
currentDay += 1;
nextUpdateSettle = _newFinalDay;
}
if (currentDay == 4)
nextUpdateSettle = true;
updatePriceSingle(0, ethp);
updatePriceSingle(1, spxp);
updatePriceSingle(2, btcp);
emit PriceUpdated(ethp, spxp, btcp, now, currentDay, false);
lastUpdateTime = now;
}
function settlePrice(uint ethp, uint spxp, uint btcp)
external
onlyAdmin
{
}
/** Return the entire current price array for a given asset
* @param _assetID the asset id of the desired asset
* @return _priceHist the price array in USD for the asset
* @dev only the admin and addresses granted readership may call this function
* While only an admin or reader can access this within the EVM
* anyone can access these prices outside the EVM
* eg, in javascript: OracleAddress.methods.getUsdPrices.cacheCall(0, { 'from': 'AdminAddress' }
*/
function getUsdPrices(uint _assetID)
public
view
returns (uint[6] memory _priceHist)
{
}
/** Return only the latest prices
* @param _assetID the asset id of the desired asset
* @return _price the latest price of the given asset
* @dev only the admin or a designated reader may call this function within the EVM
*/
function getCurrentPrice(uint _assetID)
public
view
returns (uint _price)
{
}
/**
* @return startDay relevant for trades done now
* pulls the day relevant for new AssetSwap subcontracts
* startDay 2 means the 2 slot (ie, the third) of prices will be the initial
* price for the subcontract. As 5 is the top slot, and rolls into slot 0
* the next week, the next pricing day is 1 when the current day == 5
* (this would be a weekend or Monday morning)
*/
function getStartDay()
public
view
returns (uint8 _startDay)
{
}
function updatePriceSingle(uint _assetID, uint _price)
internal
{
}
function bound(int a, int b)
internal
pure
returns (int)
{
}
}
| (spxp*10<prices[1][currentDay]*15)&&(spxp*10>prices[1][currentDay]*5) | 41,948 | (spxp*10<prices[1][currentDay]*15)&&(spxp*10>prices[1][currentDay]*5) |
null | pragma solidity 0.5.15;
import "./AssetSwap.sol";
contract Oracle {
constructor (uint ethPrice, uint spxPrice, uint btcPrice) public {
}
address[3] public assetSwaps;
uint[6][3] private prices;
uint public lastUpdateTime;
uint public lastSettleTime;
int[3] public levRatio;
uint8 public currentDay;
bool public nextUpdateSettle;
mapping(address => bool) public admins;
mapping(address => bool) public readers;
event PriceUpdated(
uint ethPrice,
uint spxPrice,
uint btcPrice,
uint eUTCTime,
uint eDayNumber,
bool eisCorrection
);
modifier onlyAdmin() {
}
/** Grant write priviledges to a user,
* mainly intended for when the admin wants to switch accounts, ie, paired with a removal
*/
function addAdmin(address newAdmin)
external
onlyAdmin
{
}
/** Grant priviledges to a user accessing price data on the blockchain
* @param newReader the address. Any reader is thus approved by the oracle/admin
* useful for new contracts that use this oracle, in that the oracle would not
* need to create a new oracle contract for ETH prices
*/
function addReaders(address newReader)
external
onlyAdmin
{
}
/** this can only be done once, so this oracle is solely for working with
* three AssetSwap contracts
* assetswap 0 is the ETH, at 2.5 leverage
* assetswap 1 is the SPX, at 10x leverage
* assetswap 2 is the BTC, at 2.5 leverage
*/
function addAssetSwaps(address newAS0, address newAS1, address newAS2)
external
onlyAdmin
{
}
function removeAdmin(address toRemove)
external
onlyAdmin
{
}
/** Quickly fix an erroneous price, or correct the fact that 50% movements are
* not allowed in the standard price input
* this must be called within 60 minutes of the initial price update occurence
*/
function editPrice(uint _ethprice, uint _spxprice, uint _btcprice)
external
onlyAdmin
{
}
function updatePrices(uint ethp, uint spxp, uint btcp, bool _newFinalDay)
external
onlyAdmin
{
/// no updates within 20 hours per day
require(now > lastUpdateTime + 20 hours);
/** can't be executed if the next price should be a settlement price
* settlement prices are special because they need to update the asset returns
* and sent to the AssetSwap contracts
*/
require(!nextUpdateSettle);
/// after settlement update, at least 48 hours until new prices are posted
require(now > lastSettleTime + 48 hours, "too soon after last settle");
/// prevents faulty prices, as stale prices are a common source of bad prices.
require(ethp != prices[0][currentDay] && spxp != prices[1][currentDay] && btcp != prices[2][currentDay]);
/// extreme price movements are probably mistakes. They can be posted
/// but only via a 'price edit' that must be done within 60 minutes of the initial update
require((ethp * 10 < prices[0][currentDay] * 15) && (ethp * 10 > prices[0][currentDay] * 5));
require((spxp * 10 < prices[1][currentDay] * 15) && (spxp * 10 > prices[1][currentDay] * 5));
require(<FILL_ME>)
if (currentDay == 5) {
currentDay = 1;
nextUpdateSettle = false;
} else {
currentDay += 1;
nextUpdateSettle = _newFinalDay;
}
if (currentDay == 4)
nextUpdateSettle = true;
updatePriceSingle(0, ethp);
updatePriceSingle(1, spxp);
updatePriceSingle(2, btcp);
emit PriceUpdated(ethp, spxp, btcp, now, currentDay, false);
lastUpdateTime = now;
}
function settlePrice(uint ethp, uint spxp, uint btcp)
external
onlyAdmin
{
}
/** Return the entire current price array for a given asset
* @param _assetID the asset id of the desired asset
* @return _priceHist the price array in USD for the asset
* @dev only the admin and addresses granted readership may call this function
* While only an admin or reader can access this within the EVM
* anyone can access these prices outside the EVM
* eg, in javascript: OracleAddress.methods.getUsdPrices.cacheCall(0, { 'from': 'AdminAddress' }
*/
function getUsdPrices(uint _assetID)
public
view
returns (uint[6] memory _priceHist)
{
}
/** Return only the latest prices
* @param _assetID the asset id of the desired asset
* @return _price the latest price of the given asset
* @dev only the admin or a designated reader may call this function within the EVM
*/
function getCurrentPrice(uint _assetID)
public
view
returns (uint _price)
{
}
/**
* @return startDay relevant for trades done now
* pulls the day relevant for new AssetSwap subcontracts
* startDay 2 means the 2 slot (ie, the third) of prices will be the initial
* price for the subcontract. As 5 is the top slot, and rolls into slot 0
* the next week, the next pricing day is 1 when the current day == 5
* (this would be a weekend or Monday morning)
*/
function getStartDay()
public
view
returns (uint8 _startDay)
{
}
function updatePriceSingle(uint _assetID, uint _price)
internal
{
}
function bound(int a, int b)
internal
pure
returns (int)
{
}
}
| (btcp*10<prices[2][currentDay]*15)&&(btcp*10>prices[2][currentDay]*5) | 41,948 | (btcp*10<prices[2][currentDay]*15)&&(btcp*10>prices[2][currentDay]*5) |
null | pragma solidity 0.5.15;
import "./AssetSwap.sol";
contract Oracle {
constructor (uint ethPrice, uint spxPrice, uint btcPrice) public {
}
address[3] public assetSwaps;
uint[6][3] private prices;
uint public lastUpdateTime;
uint public lastSettleTime;
int[3] public levRatio;
uint8 public currentDay;
bool public nextUpdateSettle;
mapping(address => bool) public admins;
mapping(address => bool) public readers;
event PriceUpdated(
uint ethPrice,
uint spxPrice,
uint btcPrice,
uint eUTCTime,
uint eDayNumber,
bool eisCorrection
);
modifier onlyAdmin() {
}
/** Grant write priviledges to a user,
* mainly intended for when the admin wants to switch accounts, ie, paired with a removal
*/
function addAdmin(address newAdmin)
external
onlyAdmin
{
}
/** Grant priviledges to a user accessing price data on the blockchain
* @param newReader the address. Any reader is thus approved by the oracle/admin
* useful for new contracts that use this oracle, in that the oracle would not
* need to create a new oracle contract for ETH prices
*/
function addReaders(address newReader)
external
onlyAdmin
{
}
/** this can only be done once, so this oracle is solely for working with
* three AssetSwap contracts
* assetswap 0 is the ETH, at 2.5 leverage
* assetswap 1 is the SPX, at 10x leverage
* assetswap 2 is the BTC, at 2.5 leverage
*/
function addAssetSwaps(address newAS0, address newAS1, address newAS2)
external
onlyAdmin
{
}
function removeAdmin(address toRemove)
external
onlyAdmin
{
}
/** Quickly fix an erroneous price, or correct the fact that 50% movements are
* not allowed in the standard price input
* this must be called within 60 minutes of the initial price update occurence
*/
function editPrice(uint _ethprice, uint _spxprice, uint _btcprice)
external
onlyAdmin
{
}
function updatePrices(uint ethp, uint spxp, uint btcp, bool _newFinalDay)
external
onlyAdmin
{
}
function settlePrice(uint ethp, uint spxp, uint btcp)
external
onlyAdmin
{
}
/** Return the entire current price array for a given asset
* @param _assetID the asset id of the desired asset
* @return _priceHist the price array in USD for the asset
* @dev only the admin and addresses granted readership may call this function
* While only an admin or reader can access this within the EVM
* anyone can access these prices outside the EVM
* eg, in javascript: OracleAddress.methods.getUsdPrices.cacheCall(0, { 'from': 'AdminAddress' }
*/
function getUsdPrices(uint _assetID)
public
view
returns (uint[6] memory _priceHist)
{
require(<FILL_ME>)
_priceHist = prices[_assetID];
}
/** Return only the latest prices
* @param _assetID the asset id of the desired asset
* @return _price the latest price of the given asset
* @dev only the admin or a designated reader may call this function within the EVM
*/
function getCurrentPrice(uint _assetID)
public
view
returns (uint _price)
{
}
/**
* @return startDay relevant for trades done now
* pulls the day relevant for new AssetSwap subcontracts
* startDay 2 means the 2 slot (ie, the third) of prices will be the initial
* price for the subcontract. As 5 is the top slot, and rolls into slot 0
* the next week, the next pricing day is 1 when the current day == 5
* (this would be a weekend or Monday morning)
*/
function getStartDay()
public
view
returns (uint8 _startDay)
{
}
function updatePriceSingle(uint _assetID, uint _price)
internal
{
}
function bound(int a, int b)
internal
pure
returns (int)
{
}
}
| admins[msg.sender]||readers[msg.sender] | 41,948 | admins[msg.sender]||readers[msg.sender] |
"BridgePool: Invalid signer" | // SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <=0.8.0;
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "../common/signature/SigCheckable.sol";
import "../common/SafeAmount.sol";
import "../taxing/IGeneralTaxDistributor.sol";
contract BridgePool is SigCheckable, Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
event TransferBySignature(address signer,
address receiver,
address token,
uint256 amount,
uint256 fee);
event BridgeLiquidityAdded(address actor, address token, uint256 amount);
event BridgeLiquidityRemoved(address actor, address token, uint256 amount);
event BridgeSwap(address from,
address indexed token,
uint256 targetNetwork,
address targetToken,
address targetAddrdess,
uint256 amount);
string constant NAME = "FERRUM_TOKEN_BRIDGE_POOL";
string constant VERSION = "000.002";
bytes32 constant WITHDRAW_SIGNED_METHOD =
keccak256("WithdrawSigned(address token,address payee,uint256 amount,bytes32 salt)");
mapping(address => bool) public signers;
mapping(address=>mapping(address=>uint256)) private liquidities;
mapping(address=>uint256) public fees;
address public feeDistributor;
constructor () EIP712(NAME, VERSION) { }
function addSigner(address _signer) external onlyOwner() {
}
function removeSigner(address _signer) external onlyOwner() {
}
function setFee(address token, uint256 fee10000) external onlyOwner() {
}
function setFeeDistributor(address _feeDistributor) external onlyOwner() {
}
function swap(address token, uint256 amount, uint256 targetNetwork, address targetToken)
external returns(uint256) {
}
function swapToAddress(address token,
uint256 amount,
uint256 targetNetwork,
address targetToken,
address targetAddress)
external returns(uint256) {
}
function _swap(address from, address token, uint256 amount, uint256 targetNetwork,
address targetToken, address targetAddress) internal returns(uint256) {
}
function withdrawSigned(
address token,
address payee,
uint256 amount,
bytes32 salt,
bytes memory signature)
external returns(uint256) {
bytes32 message = withdrawSignedMessage(token, payee, amount, salt);
address _signer = signerUnique(message, signature);
require(<FILL_ME>)
uint256 fee = 0;
address _feeDistributor = feeDistributor;
if (_feeDistributor != address(0)) {
fee = amount.mul(fees[token]).div(10000);
amount = amount.sub(fee);
if (fee != 0) {
IERC20(token).safeTransfer(_feeDistributor, fee);
IGeneralTaxDistributor(_feeDistributor).distributeTax(token, msg.sender);
}
}
IERC20(token).safeTransfer(payee, amount);
emit TransferBySignature(_signer, payee, token, amount, fee);
return amount;
}
function withdrawSignedVerify(
address token,
address payee,
uint256 amount,
bytes32 salt,
bytes calldata signature)
external view returns (bytes32, address) {
}
function withdrawSignedMessage(
address token,
address payee,
uint256 amount,
bytes32 salt)
internal pure returns (bytes32) {
}
// function withdrawSigned(
// address token,
// address payee,
// uint256 amount,
// bytes32 salt,
// bytes calldata signature) external {
// (bytes32 digest, address _signer) = _withdrawSignedGetSignature(token, payee, amount, salt, signature);
// require(!usedHashes[digest], "Message already used");
// require(_signer == signer, "BridgePool: Invalid signer");
// usedHashes[digest] = true;
// IERC20(token).safeTransfer(payee, amount);
// emit TransferBySignature(digest, _signer, payee, token, amount);
// }
// function _withdrawSignedGetSignature(
// address token,
// address payee,
// uint256 amount,
// bytes32 salt,
// bytes calldata signature) internal view returns (bytes32, address) {
// bytes32 message = withdrawSignedMessage(token, payee, amount, salt);
// (bytes32 digest, address _signer) = signer(message, signature);
// return (digest, _signer);
// }
function addLiquidity(address token, uint256 amount) external {
}
function removeLiquidityIfPossible(address token, uint256 amount) external returns (uint256) {
}
function liquidity(address token, address liquidityAdder) public view returns (uint256) {
}
}
| signers[_signer],"BridgePool: Invalid signer" | 41,997 | signers[_signer] |
"Redeem: window is not open" | pragma solidity ^0.8.4;
/*
* @title ERC721 token for Scrambles
*
* @author original logic by Niftydude, extended by @bitcoinski, extended again by @georgefatlion
*/
contract Scrambles is IScrambles, ERC721Enumerable, ERC721Pausable, ERC721Burnable, Ownable, VRFConsumerBase {
using Strings for uint256;
using Strings for uint8;
using SafeMath for uint256;
using Counters for Counters.Counter;
Counters.Counter private generalCounter;
uint public constant MAX_MINT = 963;
// VRF stuff
address public VRFCoordinator;
address public LinkToken;
bytes32 internal keyHash;
uint256 public baseSeed;
struct RedemptionWindow {
bool open;
uint8 maxRedeemPerWallet;
bytes32 merkleRoot;
}
mapping(uint8 => RedemptionWindow) public redemptionWindows;
mapping(address => uint8) public mintedTotal;
mapping(uint8 => string[]) colours;
// links
string public _contractURI;
bool public revealed;
event Minted(address indexed account, string tokens);
/**
* @notice Constructor to create Scrambles contract
*
* @param _name the token name
* @param _symbol the token symbol
* @param _maxRedeemPerWallet the max mint per redemption by index
* @param _merkleRoots the merkle root for redemption window by index
* @param _contractMetaDataURI the respective contract meta data URI
* @param _VRFCoordinator the address of the vrf coordinator
* @param _LinkToken link token
* @param _keyHash chainlink keyhash
*/
constructor (
string memory _name,
string memory _symbol,
uint8[] memory _maxRedeemPerWallet,
bytes32[] memory _merkleRoots,
string memory _contractMetaDataURI,
address _VRFCoordinator,
address _LinkToken,
bytes32 _keyHash
)
VRFConsumerBase(_VRFCoordinator, _LinkToken)
ERC721(_name, _symbol) {
}
/**
* @notice Pause redeems until unpause is called. this pauses the whole contract.
*/
function pause() external override onlyOwner {
}
/**
* @notice Unpause redeems until pause is called. this unpauses the whole contract.
*/
function unpause() external override onlyOwner {
}
/**
* @notice Set revealed to true.
*/
function reveal(bool state) external onlyOwner {
}
/**
* @notice edit a redemption window. only writes value if it is different.
*
* @param _windowID the index of the claim window to set.
* @param _merkleRoot the window merkleRoot.
* @param _open the window open state.
* @param _maxPerWallet the window maximum per wallet.
*/
function editRedemptionWindow(
uint8 _windowID,
bytes32 _merkleRoot,
bool _open,
uint8 _maxPerWallet
) external override onlyOwner {
}
/**
* @notice Widthdraw Ether from contract.
*
* @param _to the address to send to
* @param _amount the amount to withdraw
*/
function withdrawEther(address payable _to, uint256 _amount) public onlyOwner
{
}
/**
* @notice Mint a Scramble.
*
* @param windowIndex the index of the claim window to use.
* @param amount the amount of tokens to mint
* @param merkleProof the hash proving they are on the list for a given window. only applies to windows 0, 1 and 2.
*/
function mint(uint8 windowIndex, uint8 amount, bytes32[] calldata merkleProof) external override{
// checks
require(<FILL_ME>)
require(amount > 0, "Redeem: amount cannot be zero");
require(amount < 11, "Redeem: amount cannot be more than 10");
require(generalCounter.current() + amount <= MAX_MINT, "Max limit");
if(windowIndex != 3)
{
// limit number that can be claimed for given presale window.
require(mintedTotal[msg.sender] + amount <= redemptionWindows[windowIndex].maxRedeemPerWallet, "Too many for presale window");
// check the merkle proof
require(verifyMerkleProof(merkleProof, redemptionWindows[windowIndex].merkleRoot),"Invalid proof");
}
string memory tokens = "";
for(uint8 j = 0; j < amount; j++) {
_safeMint(msg.sender, generalCounter.current());
tokens = string(abi.encodePacked(tokens, generalCounter.current().toString(), ","));
generalCounter.increment();
}
mintedTotal[msg.sender] = mintedTotal[msg.sender] + amount;
emit Minted(msg.sender, tokens);
}
/**
* @notice Verify the merkle proof for a given root.
*
* @param proof vrf keyhash value
* @param root vrf keyhash value
*/
function verifyMerkleProof(bytes32[] memory proof, bytes32 root) public view returns (bool)
{
}
/**
* @notice assign the returned chainlink vrf random number to baseSeed variable.
*
* @param requestId the id of the request - unused.
* @param randomness the random number from chainlink vrf.
*/
function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721, ERC721Enumerable) returns (bool) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) {
}
function setContractURI(string memory uri) external onlyOwner{
}
function contractURI() public view returns (string memory) {
}
/**
* @notice returns the base64 encoded json metadata for a token.
*
* @param tokenId the token to return data for.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
/**
* @notice returns the core numbers for the token. the palette index range:0-2 followed by the 9 colour indexes range: 0-5.
*
* @param tokenId the tokenId to return numbers for.
*/
function getCoreNumbers(uint256 tokenId) public view virtual override returns (string memory){
}
/**
* @notice checks if two indexes in a colour array match, if they do return 1 otherwise return 0.
*
* @param cols array of colours.
* @param a first index to check.
* @param b second index to check.
*/
function checkConnection(string[9] memory cols, uint8 a, uint8 b) internal pure returns(uint8)
{
}
/**
* @notice returns the attributes part of the json string.
*
* @param tokenId the token to generate traits for.
*/
function getTraits(uint256 tokenId) public view returns (string memory)
{
}
/**
* @notice create a property string with value encased in quotes.
*
* @param traitName the name of the trait
* @param value the value of the trait
*/
function getPropertyString(string memory traitName, uint256 value) internal pure returns (string memory)
{
}
/**
* @notice create a level string with value not encased in quotes.
*
* @param traitName the name of the trait
* @param value the value of the trait
*/
function getLevelString(string memory traitName, uint256 value) internal pure returns (string memory)
{
}
/**
* @notice Return the svg string for a given token.
*
* @param tokenId the token to return.
*/
function getSVGString(uint256 tokenId) public view returns (string memory)
{
}
/**
* @notice Return the palette index based on a seed.
*
* @param colourIndex used to expand the random number.
* @param seed the seed for the token.
*/
function getColour(uint8 colourIndex, uint256 seed) internal view returns (string memory)
{
}
/**
* @notice Return the palette index based on a seed.
*
* @param colourIndex used to expand the random number.
* @param seed the seed for the token.
* @param percentage used to create the shadows.
*/
function getGrey(uint8 colourIndex, uint256 seed, uint256 percentage) public pure returns (string memory)
{
}
/**
* @notice Return the palette index based on a seed.
*
* @param seed the seed for the token.
*/
function getPaletteIndex(uint256 seed) internal pure returns (uint8)
{
}
/**
* @notice Call chainlink to get a random number to use as the base for the random seeds.
*
* @param fee the link fee.
*/
function scramble(uint256 fee) public onlyOwner returns (bytes32 requestId) {
}
/**
* @notice Get the random seed for a given token, expanded from the baseSeed from Chainlink VRF.
*
* @param tokenId the token id
*/
function getSeed(uint256 tokenId) public view returns (uint256)
{
}
/**
* @notice Get the random seed for a given token, expanded from the baseSeed from Chainlink VRF.
*
* @param random the base random number
* @param expansion the expansion number
*/
function expandRandom(uint256 random, uint256 expansion) internal pure returns (uint256)
{
}
}
| redemptionWindows[windowIndex].open,"Redeem: window is not open" | 42,091 | redemptionWindows[windowIndex].open |
"Max limit" | pragma solidity ^0.8.4;
/*
* @title ERC721 token for Scrambles
*
* @author original logic by Niftydude, extended by @bitcoinski, extended again by @georgefatlion
*/
contract Scrambles is IScrambles, ERC721Enumerable, ERC721Pausable, ERC721Burnable, Ownable, VRFConsumerBase {
using Strings for uint256;
using Strings for uint8;
using SafeMath for uint256;
using Counters for Counters.Counter;
Counters.Counter private generalCounter;
uint public constant MAX_MINT = 963;
// VRF stuff
address public VRFCoordinator;
address public LinkToken;
bytes32 internal keyHash;
uint256 public baseSeed;
struct RedemptionWindow {
bool open;
uint8 maxRedeemPerWallet;
bytes32 merkleRoot;
}
mapping(uint8 => RedemptionWindow) public redemptionWindows;
mapping(address => uint8) public mintedTotal;
mapping(uint8 => string[]) colours;
// links
string public _contractURI;
bool public revealed;
event Minted(address indexed account, string tokens);
/**
* @notice Constructor to create Scrambles contract
*
* @param _name the token name
* @param _symbol the token symbol
* @param _maxRedeemPerWallet the max mint per redemption by index
* @param _merkleRoots the merkle root for redemption window by index
* @param _contractMetaDataURI the respective contract meta data URI
* @param _VRFCoordinator the address of the vrf coordinator
* @param _LinkToken link token
* @param _keyHash chainlink keyhash
*/
constructor (
string memory _name,
string memory _symbol,
uint8[] memory _maxRedeemPerWallet,
bytes32[] memory _merkleRoots,
string memory _contractMetaDataURI,
address _VRFCoordinator,
address _LinkToken,
bytes32 _keyHash
)
VRFConsumerBase(_VRFCoordinator, _LinkToken)
ERC721(_name, _symbol) {
}
/**
* @notice Pause redeems until unpause is called. this pauses the whole contract.
*/
function pause() external override onlyOwner {
}
/**
* @notice Unpause redeems until pause is called. this unpauses the whole contract.
*/
function unpause() external override onlyOwner {
}
/**
* @notice Set revealed to true.
*/
function reveal(bool state) external onlyOwner {
}
/**
* @notice edit a redemption window. only writes value if it is different.
*
* @param _windowID the index of the claim window to set.
* @param _merkleRoot the window merkleRoot.
* @param _open the window open state.
* @param _maxPerWallet the window maximum per wallet.
*/
function editRedemptionWindow(
uint8 _windowID,
bytes32 _merkleRoot,
bool _open,
uint8 _maxPerWallet
) external override onlyOwner {
}
/**
* @notice Widthdraw Ether from contract.
*
* @param _to the address to send to
* @param _amount the amount to withdraw
*/
function withdrawEther(address payable _to, uint256 _amount) public onlyOwner
{
}
/**
* @notice Mint a Scramble.
*
* @param windowIndex the index of the claim window to use.
* @param amount the amount of tokens to mint
* @param merkleProof the hash proving they are on the list for a given window. only applies to windows 0, 1 and 2.
*/
function mint(uint8 windowIndex, uint8 amount, bytes32[] calldata merkleProof) external override{
// checks
require(redemptionWindows[windowIndex].open, "Redeem: window is not open");
require(amount > 0, "Redeem: amount cannot be zero");
require(amount < 11, "Redeem: amount cannot be more than 10");
require(<FILL_ME>)
if(windowIndex != 3)
{
// limit number that can be claimed for given presale window.
require(mintedTotal[msg.sender] + amount <= redemptionWindows[windowIndex].maxRedeemPerWallet, "Too many for presale window");
// check the merkle proof
require(verifyMerkleProof(merkleProof, redemptionWindows[windowIndex].merkleRoot),"Invalid proof");
}
string memory tokens = "";
for(uint8 j = 0; j < amount; j++) {
_safeMint(msg.sender, generalCounter.current());
tokens = string(abi.encodePacked(tokens, generalCounter.current().toString(), ","));
generalCounter.increment();
}
mintedTotal[msg.sender] = mintedTotal[msg.sender] + amount;
emit Minted(msg.sender, tokens);
}
/**
* @notice Verify the merkle proof for a given root.
*
* @param proof vrf keyhash value
* @param root vrf keyhash value
*/
function verifyMerkleProof(bytes32[] memory proof, bytes32 root) public view returns (bool)
{
}
/**
* @notice assign the returned chainlink vrf random number to baseSeed variable.
*
* @param requestId the id of the request - unused.
* @param randomness the random number from chainlink vrf.
*/
function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721, ERC721Enumerable) returns (bool) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) {
}
function setContractURI(string memory uri) external onlyOwner{
}
function contractURI() public view returns (string memory) {
}
/**
* @notice returns the base64 encoded json metadata for a token.
*
* @param tokenId the token to return data for.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
/**
* @notice returns the core numbers for the token. the palette index range:0-2 followed by the 9 colour indexes range: 0-5.
*
* @param tokenId the tokenId to return numbers for.
*/
function getCoreNumbers(uint256 tokenId) public view virtual override returns (string memory){
}
/**
* @notice checks if two indexes in a colour array match, if they do return 1 otherwise return 0.
*
* @param cols array of colours.
* @param a first index to check.
* @param b second index to check.
*/
function checkConnection(string[9] memory cols, uint8 a, uint8 b) internal pure returns(uint8)
{
}
/**
* @notice returns the attributes part of the json string.
*
* @param tokenId the token to generate traits for.
*/
function getTraits(uint256 tokenId) public view returns (string memory)
{
}
/**
* @notice create a property string with value encased in quotes.
*
* @param traitName the name of the trait
* @param value the value of the trait
*/
function getPropertyString(string memory traitName, uint256 value) internal pure returns (string memory)
{
}
/**
* @notice create a level string with value not encased in quotes.
*
* @param traitName the name of the trait
* @param value the value of the trait
*/
function getLevelString(string memory traitName, uint256 value) internal pure returns (string memory)
{
}
/**
* @notice Return the svg string for a given token.
*
* @param tokenId the token to return.
*/
function getSVGString(uint256 tokenId) public view returns (string memory)
{
}
/**
* @notice Return the palette index based on a seed.
*
* @param colourIndex used to expand the random number.
* @param seed the seed for the token.
*/
function getColour(uint8 colourIndex, uint256 seed) internal view returns (string memory)
{
}
/**
* @notice Return the palette index based on a seed.
*
* @param colourIndex used to expand the random number.
* @param seed the seed for the token.
* @param percentage used to create the shadows.
*/
function getGrey(uint8 colourIndex, uint256 seed, uint256 percentage) public pure returns (string memory)
{
}
/**
* @notice Return the palette index based on a seed.
*
* @param seed the seed for the token.
*/
function getPaletteIndex(uint256 seed) internal pure returns (uint8)
{
}
/**
* @notice Call chainlink to get a random number to use as the base for the random seeds.
*
* @param fee the link fee.
*/
function scramble(uint256 fee) public onlyOwner returns (bytes32 requestId) {
}
/**
* @notice Get the random seed for a given token, expanded from the baseSeed from Chainlink VRF.
*
* @param tokenId the token id
*/
function getSeed(uint256 tokenId) public view returns (uint256)
{
}
/**
* @notice Get the random seed for a given token, expanded from the baseSeed from Chainlink VRF.
*
* @param random the base random number
* @param expansion the expansion number
*/
function expandRandom(uint256 random, uint256 expansion) internal pure returns (uint256)
{
}
}
| generalCounter.current()+amount<=MAX_MINT,"Max limit" | 42,091 | generalCounter.current()+amount<=MAX_MINT |
"Too many for presale window" | pragma solidity ^0.8.4;
/*
* @title ERC721 token for Scrambles
*
* @author original logic by Niftydude, extended by @bitcoinski, extended again by @georgefatlion
*/
contract Scrambles is IScrambles, ERC721Enumerable, ERC721Pausable, ERC721Burnable, Ownable, VRFConsumerBase {
using Strings for uint256;
using Strings for uint8;
using SafeMath for uint256;
using Counters for Counters.Counter;
Counters.Counter private generalCounter;
uint public constant MAX_MINT = 963;
// VRF stuff
address public VRFCoordinator;
address public LinkToken;
bytes32 internal keyHash;
uint256 public baseSeed;
struct RedemptionWindow {
bool open;
uint8 maxRedeemPerWallet;
bytes32 merkleRoot;
}
mapping(uint8 => RedemptionWindow) public redemptionWindows;
mapping(address => uint8) public mintedTotal;
mapping(uint8 => string[]) colours;
// links
string public _contractURI;
bool public revealed;
event Minted(address indexed account, string tokens);
/**
* @notice Constructor to create Scrambles contract
*
* @param _name the token name
* @param _symbol the token symbol
* @param _maxRedeemPerWallet the max mint per redemption by index
* @param _merkleRoots the merkle root for redemption window by index
* @param _contractMetaDataURI the respective contract meta data URI
* @param _VRFCoordinator the address of the vrf coordinator
* @param _LinkToken link token
* @param _keyHash chainlink keyhash
*/
constructor (
string memory _name,
string memory _symbol,
uint8[] memory _maxRedeemPerWallet,
bytes32[] memory _merkleRoots,
string memory _contractMetaDataURI,
address _VRFCoordinator,
address _LinkToken,
bytes32 _keyHash
)
VRFConsumerBase(_VRFCoordinator, _LinkToken)
ERC721(_name, _symbol) {
}
/**
* @notice Pause redeems until unpause is called. this pauses the whole contract.
*/
function pause() external override onlyOwner {
}
/**
* @notice Unpause redeems until pause is called. this unpauses the whole contract.
*/
function unpause() external override onlyOwner {
}
/**
* @notice Set revealed to true.
*/
function reveal(bool state) external onlyOwner {
}
/**
* @notice edit a redemption window. only writes value if it is different.
*
* @param _windowID the index of the claim window to set.
* @param _merkleRoot the window merkleRoot.
* @param _open the window open state.
* @param _maxPerWallet the window maximum per wallet.
*/
function editRedemptionWindow(
uint8 _windowID,
bytes32 _merkleRoot,
bool _open,
uint8 _maxPerWallet
) external override onlyOwner {
}
/**
* @notice Widthdraw Ether from contract.
*
* @param _to the address to send to
* @param _amount the amount to withdraw
*/
function withdrawEther(address payable _to, uint256 _amount) public onlyOwner
{
}
/**
* @notice Mint a Scramble.
*
* @param windowIndex the index of the claim window to use.
* @param amount the amount of tokens to mint
* @param merkleProof the hash proving they are on the list for a given window. only applies to windows 0, 1 and 2.
*/
function mint(uint8 windowIndex, uint8 amount, bytes32[] calldata merkleProof) external override{
// checks
require(redemptionWindows[windowIndex].open, "Redeem: window is not open");
require(amount > 0, "Redeem: amount cannot be zero");
require(amount < 11, "Redeem: amount cannot be more than 10");
require(generalCounter.current() + amount <= MAX_MINT, "Max limit");
if(windowIndex != 3)
{
// limit number that can be claimed for given presale window.
require(<FILL_ME>)
// check the merkle proof
require(verifyMerkleProof(merkleProof, redemptionWindows[windowIndex].merkleRoot),"Invalid proof");
}
string memory tokens = "";
for(uint8 j = 0; j < amount; j++) {
_safeMint(msg.sender, generalCounter.current());
tokens = string(abi.encodePacked(tokens, generalCounter.current().toString(), ","));
generalCounter.increment();
}
mintedTotal[msg.sender] = mintedTotal[msg.sender] + amount;
emit Minted(msg.sender, tokens);
}
/**
* @notice Verify the merkle proof for a given root.
*
* @param proof vrf keyhash value
* @param root vrf keyhash value
*/
function verifyMerkleProof(bytes32[] memory proof, bytes32 root) public view returns (bool)
{
}
/**
* @notice assign the returned chainlink vrf random number to baseSeed variable.
*
* @param requestId the id of the request - unused.
* @param randomness the random number from chainlink vrf.
*/
function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721, ERC721Enumerable) returns (bool) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) {
}
function setContractURI(string memory uri) external onlyOwner{
}
function contractURI() public view returns (string memory) {
}
/**
* @notice returns the base64 encoded json metadata for a token.
*
* @param tokenId the token to return data for.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
/**
* @notice returns the core numbers for the token. the palette index range:0-2 followed by the 9 colour indexes range: 0-5.
*
* @param tokenId the tokenId to return numbers for.
*/
function getCoreNumbers(uint256 tokenId) public view virtual override returns (string memory){
}
/**
* @notice checks if two indexes in a colour array match, if they do return 1 otherwise return 0.
*
* @param cols array of colours.
* @param a first index to check.
* @param b second index to check.
*/
function checkConnection(string[9] memory cols, uint8 a, uint8 b) internal pure returns(uint8)
{
}
/**
* @notice returns the attributes part of the json string.
*
* @param tokenId the token to generate traits for.
*/
function getTraits(uint256 tokenId) public view returns (string memory)
{
}
/**
* @notice create a property string with value encased in quotes.
*
* @param traitName the name of the trait
* @param value the value of the trait
*/
function getPropertyString(string memory traitName, uint256 value) internal pure returns (string memory)
{
}
/**
* @notice create a level string with value not encased in quotes.
*
* @param traitName the name of the trait
* @param value the value of the trait
*/
function getLevelString(string memory traitName, uint256 value) internal pure returns (string memory)
{
}
/**
* @notice Return the svg string for a given token.
*
* @param tokenId the token to return.
*/
function getSVGString(uint256 tokenId) public view returns (string memory)
{
}
/**
* @notice Return the palette index based on a seed.
*
* @param colourIndex used to expand the random number.
* @param seed the seed for the token.
*/
function getColour(uint8 colourIndex, uint256 seed) internal view returns (string memory)
{
}
/**
* @notice Return the palette index based on a seed.
*
* @param colourIndex used to expand the random number.
* @param seed the seed for the token.
* @param percentage used to create the shadows.
*/
function getGrey(uint8 colourIndex, uint256 seed, uint256 percentage) public pure returns (string memory)
{
}
/**
* @notice Return the palette index based on a seed.
*
* @param seed the seed for the token.
*/
function getPaletteIndex(uint256 seed) internal pure returns (uint8)
{
}
/**
* @notice Call chainlink to get a random number to use as the base for the random seeds.
*
* @param fee the link fee.
*/
function scramble(uint256 fee) public onlyOwner returns (bytes32 requestId) {
}
/**
* @notice Get the random seed for a given token, expanded from the baseSeed from Chainlink VRF.
*
* @param tokenId the token id
*/
function getSeed(uint256 tokenId) public view returns (uint256)
{
}
/**
* @notice Get the random seed for a given token, expanded from the baseSeed from Chainlink VRF.
*
* @param random the base random number
* @param expansion the expansion number
*/
function expandRandom(uint256 random, uint256 expansion) internal pure returns (uint256)
{
}
}
| mintedTotal[msg.sender]+amount<=redemptionWindows[windowIndex].maxRedeemPerWallet,"Too many for presale window" | 42,091 | mintedTotal[msg.sender]+amount<=redemptionWindows[windowIndex].maxRedeemPerWallet |
"Invalid proof" | pragma solidity ^0.8.4;
/*
* @title ERC721 token for Scrambles
*
* @author original logic by Niftydude, extended by @bitcoinski, extended again by @georgefatlion
*/
contract Scrambles is IScrambles, ERC721Enumerable, ERC721Pausable, ERC721Burnable, Ownable, VRFConsumerBase {
using Strings for uint256;
using Strings for uint8;
using SafeMath for uint256;
using Counters for Counters.Counter;
Counters.Counter private generalCounter;
uint public constant MAX_MINT = 963;
// VRF stuff
address public VRFCoordinator;
address public LinkToken;
bytes32 internal keyHash;
uint256 public baseSeed;
struct RedemptionWindow {
bool open;
uint8 maxRedeemPerWallet;
bytes32 merkleRoot;
}
mapping(uint8 => RedemptionWindow) public redemptionWindows;
mapping(address => uint8) public mintedTotal;
mapping(uint8 => string[]) colours;
// links
string public _contractURI;
bool public revealed;
event Minted(address indexed account, string tokens);
/**
* @notice Constructor to create Scrambles contract
*
* @param _name the token name
* @param _symbol the token symbol
* @param _maxRedeemPerWallet the max mint per redemption by index
* @param _merkleRoots the merkle root for redemption window by index
* @param _contractMetaDataURI the respective contract meta data URI
* @param _VRFCoordinator the address of the vrf coordinator
* @param _LinkToken link token
* @param _keyHash chainlink keyhash
*/
constructor (
string memory _name,
string memory _symbol,
uint8[] memory _maxRedeemPerWallet,
bytes32[] memory _merkleRoots,
string memory _contractMetaDataURI,
address _VRFCoordinator,
address _LinkToken,
bytes32 _keyHash
)
VRFConsumerBase(_VRFCoordinator, _LinkToken)
ERC721(_name, _symbol) {
}
/**
* @notice Pause redeems until unpause is called. this pauses the whole contract.
*/
function pause() external override onlyOwner {
}
/**
* @notice Unpause redeems until pause is called. this unpauses the whole contract.
*/
function unpause() external override onlyOwner {
}
/**
* @notice Set revealed to true.
*/
function reveal(bool state) external onlyOwner {
}
/**
* @notice edit a redemption window. only writes value if it is different.
*
* @param _windowID the index of the claim window to set.
* @param _merkleRoot the window merkleRoot.
* @param _open the window open state.
* @param _maxPerWallet the window maximum per wallet.
*/
function editRedemptionWindow(
uint8 _windowID,
bytes32 _merkleRoot,
bool _open,
uint8 _maxPerWallet
) external override onlyOwner {
}
/**
* @notice Widthdraw Ether from contract.
*
* @param _to the address to send to
* @param _amount the amount to withdraw
*/
function withdrawEther(address payable _to, uint256 _amount) public onlyOwner
{
}
/**
* @notice Mint a Scramble.
*
* @param windowIndex the index of the claim window to use.
* @param amount the amount of tokens to mint
* @param merkleProof the hash proving they are on the list for a given window. only applies to windows 0, 1 and 2.
*/
function mint(uint8 windowIndex, uint8 amount, bytes32[] calldata merkleProof) external override{
// checks
require(redemptionWindows[windowIndex].open, "Redeem: window is not open");
require(amount > 0, "Redeem: amount cannot be zero");
require(amount < 11, "Redeem: amount cannot be more than 10");
require(generalCounter.current() + amount <= MAX_MINT, "Max limit");
if(windowIndex != 3)
{
// limit number that can be claimed for given presale window.
require(mintedTotal[msg.sender] + amount <= redemptionWindows[windowIndex].maxRedeemPerWallet, "Too many for presale window");
// check the merkle proof
require(<FILL_ME>)
}
string memory tokens = "";
for(uint8 j = 0; j < amount; j++) {
_safeMint(msg.sender, generalCounter.current());
tokens = string(abi.encodePacked(tokens, generalCounter.current().toString(), ","));
generalCounter.increment();
}
mintedTotal[msg.sender] = mintedTotal[msg.sender] + amount;
emit Minted(msg.sender, tokens);
}
/**
* @notice Verify the merkle proof for a given root.
*
* @param proof vrf keyhash value
* @param root vrf keyhash value
*/
function verifyMerkleProof(bytes32[] memory proof, bytes32 root) public view returns (bool)
{
}
/**
* @notice assign the returned chainlink vrf random number to baseSeed variable.
*
* @param requestId the id of the request - unused.
* @param randomness the random number from chainlink vrf.
*/
function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721, ERC721Enumerable) returns (bool) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) {
}
function setContractURI(string memory uri) external onlyOwner{
}
function contractURI() public view returns (string memory) {
}
/**
* @notice returns the base64 encoded json metadata for a token.
*
* @param tokenId the token to return data for.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
/**
* @notice returns the core numbers for the token. the palette index range:0-2 followed by the 9 colour indexes range: 0-5.
*
* @param tokenId the tokenId to return numbers for.
*/
function getCoreNumbers(uint256 tokenId) public view virtual override returns (string memory){
}
/**
* @notice checks if two indexes in a colour array match, if they do return 1 otherwise return 0.
*
* @param cols array of colours.
* @param a first index to check.
* @param b second index to check.
*/
function checkConnection(string[9] memory cols, uint8 a, uint8 b) internal pure returns(uint8)
{
}
/**
* @notice returns the attributes part of the json string.
*
* @param tokenId the token to generate traits for.
*/
function getTraits(uint256 tokenId) public view returns (string memory)
{
}
/**
* @notice create a property string with value encased in quotes.
*
* @param traitName the name of the trait
* @param value the value of the trait
*/
function getPropertyString(string memory traitName, uint256 value) internal pure returns (string memory)
{
}
/**
* @notice create a level string with value not encased in quotes.
*
* @param traitName the name of the trait
* @param value the value of the trait
*/
function getLevelString(string memory traitName, uint256 value) internal pure returns (string memory)
{
}
/**
* @notice Return the svg string for a given token.
*
* @param tokenId the token to return.
*/
function getSVGString(uint256 tokenId) public view returns (string memory)
{
}
/**
* @notice Return the palette index based on a seed.
*
* @param colourIndex used to expand the random number.
* @param seed the seed for the token.
*/
function getColour(uint8 colourIndex, uint256 seed) internal view returns (string memory)
{
}
/**
* @notice Return the palette index based on a seed.
*
* @param colourIndex used to expand the random number.
* @param seed the seed for the token.
* @param percentage used to create the shadows.
*/
function getGrey(uint8 colourIndex, uint256 seed, uint256 percentage) public pure returns (string memory)
{
}
/**
* @notice Return the palette index based on a seed.
*
* @param seed the seed for the token.
*/
function getPaletteIndex(uint256 seed) internal pure returns (uint8)
{
}
/**
* @notice Call chainlink to get a random number to use as the base for the random seeds.
*
* @param fee the link fee.
*/
function scramble(uint256 fee) public onlyOwner returns (bytes32 requestId) {
}
/**
* @notice Get the random seed for a given token, expanded from the baseSeed from Chainlink VRF.
*
* @param tokenId the token id
*/
function getSeed(uint256 tokenId) public view returns (uint256)
{
}
/**
* @notice Get the random seed for a given token, expanded from the baseSeed from Chainlink VRF.
*
* @param random the base random number
* @param expansion the expansion number
*/
function expandRandom(uint256 random, uint256 expansion) internal pure returns (uint256)
{
}
}
| verifyMerkleProof(merkleProof,redemptionWindows[windowIndex].merkleRoot),"Invalid proof" | 42,091 | verifyMerkleProof(merkleProof,redemptionWindows[windowIndex].merkleRoot) |
"Not enough LINK" | pragma solidity ^0.8.4;
/*
* @title ERC721 token for Scrambles
*
* @author original logic by Niftydude, extended by @bitcoinski, extended again by @georgefatlion
*/
contract Scrambles is IScrambles, ERC721Enumerable, ERC721Pausable, ERC721Burnable, Ownable, VRFConsumerBase {
using Strings for uint256;
using Strings for uint8;
using SafeMath for uint256;
using Counters for Counters.Counter;
Counters.Counter private generalCounter;
uint public constant MAX_MINT = 963;
// VRF stuff
address public VRFCoordinator;
address public LinkToken;
bytes32 internal keyHash;
uint256 public baseSeed;
struct RedemptionWindow {
bool open;
uint8 maxRedeemPerWallet;
bytes32 merkleRoot;
}
mapping(uint8 => RedemptionWindow) public redemptionWindows;
mapping(address => uint8) public mintedTotal;
mapping(uint8 => string[]) colours;
// links
string public _contractURI;
bool public revealed;
event Minted(address indexed account, string tokens);
/**
* @notice Constructor to create Scrambles contract
*
* @param _name the token name
* @param _symbol the token symbol
* @param _maxRedeemPerWallet the max mint per redemption by index
* @param _merkleRoots the merkle root for redemption window by index
* @param _contractMetaDataURI the respective contract meta data URI
* @param _VRFCoordinator the address of the vrf coordinator
* @param _LinkToken link token
* @param _keyHash chainlink keyhash
*/
constructor (
string memory _name,
string memory _symbol,
uint8[] memory _maxRedeemPerWallet,
bytes32[] memory _merkleRoots,
string memory _contractMetaDataURI,
address _VRFCoordinator,
address _LinkToken,
bytes32 _keyHash
)
VRFConsumerBase(_VRFCoordinator, _LinkToken)
ERC721(_name, _symbol) {
}
/**
* @notice Pause redeems until unpause is called. this pauses the whole contract.
*/
function pause() external override onlyOwner {
}
/**
* @notice Unpause redeems until pause is called. this unpauses the whole contract.
*/
function unpause() external override onlyOwner {
}
/**
* @notice Set revealed to true.
*/
function reveal(bool state) external onlyOwner {
}
/**
* @notice edit a redemption window. only writes value if it is different.
*
* @param _windowID the index of the claim window to set.
* @param _merkleRoot the window merkleRoot.
* @param _open the window open state.
* @param _maxPerWallet the window maximum per wallet.
*/
function editRedemptionWindow(
uint8 _windowID,
bytes32 _merkleRoot,
bool _open,
uint8 _maxPerWallet
) external override onlyOwner {
}
/**
* @notice Widthdraw Ether from contract.
*
* @param _to the address to send to
* @param _amount the amount to withdraw
*/
function withdrawEther(address payable _to, uint256 _amount) public onlyOwner
{
}
/**
* @notice Mint a Scramble.
*
* @param windowIndex the index of the claim window to use.
* @param amount the amount of tokens to mint
* @param merkleProof the hash proving they are on the list for a given window. only applies to windows 0, 1 and 2.
*/
function mint(uint8 windowIndex, uint8 amount, bytes32[] calldata merkleProof) external override{
}
/**
* @notice Verify the merkle proof for a given root.
*
* @param proof vrf keyhash value
* @param root vrf keyhash value
*/
function verifyMerkleProof(bytes32[] memory proof, bytes32 root) public view returns (bool)
{
}
/**
* @notice assign the returned chainlink vrf random number to baseSeed variable.
*
* @param requestId the id of the request - unused.
* @param randomness the random number from chainlink vrf.
*/
function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721, ERC721Enumerable) returns (bool) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) {
}
function setContractURI(string memory uri) external onlyOwner{
}
function contractURI() public view returns (string memory) {
}
/**
* @notice returns the base64 encoded json metadata for a token.
*
* @param tokenId the token to return data for.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
/**
* @notice returns the core numbers for the token. the palette index range:0-2 followed by the 9 colour indexes range: 0-5.
*
* @param tokenId the tokenId to return numbers for.
*/
function getCoreNumbers(uint256 tokenId) public view virtual override returns (string memory){
}
/**
* @notice checks if two indexes in a colour array match, if they do return 1 otherwise return 0.
*
* @param cols array of colours.
* @param a first index to check.
* @param b second index to check.
*/
function checkConnection(string[9] memory cols, uint8 a, uint8 b) internal pure returns(uint8)
{
}
/**
* @notice returns the attributes part of the json string.
*
* @param tokenId the token to generate traits for.
*/
function getTraits(uint256 tokenId) public view returns (string memory)
{
}
/**
* @notice create a property string with value encased in quotes.
*
* @param traitName the name of the trait
* @param value the value of the trait
*/
function getPropertyString(string memory traitName, uint256 value) internal pure returns (string memory)
{
}
/**
* @notice create a level string with value not encased in quotes.
*
* @param traitName the name of the trait
* @param value the value of the trait
*/
function getLevelString(string memory traitName, uint256 value) internal pure returns (string memory)
{
}
/**
* @notice Return the svg string for a given token.
*
* @param tokenId the token to return.
*/
function getSVGString(uint256 tokenId) public view returns (string memory)
{
}
/**
* @notice Return the palette index based on a seed.
*
* @param colourIndex used to expand the random number.
* @param seed the seed for the token.
*/
function getColour(uint8 colourIndex, uint256 seed) internal view returns (string memory)
{
}
/**
* @notice Return the palette index based on a seed.
*
* @param colourIndex used to expand the random number.
* @param seed the seed for the token.
* @param percentage used to create the shadows.
*/
function getGrey(uint8 colourIndex, uint256 seed, uint256 percentage) public pure returns (string memory)
{
}
/**
* @notice Return the palette index based on a seed.
*
* @param seed the seed for the token.
*/
function getPaletteIndex(uint256 seed) internal pure returns (uint8)
{
}
/**
* @notice Call chainlink to get a random number to use as the base for the random seeds.
*
* @param fee the link fee.
*/
function scramble(uint256 fee) public onlyOwner returns (bytes32 requestId) {
require(<FILL_ME>)
return requestRandomness(keyHash, fee);
}
/**
* @notice Get the random seed for a given token, expanded from the baseSeed from Chainlink VRF.
*
* @param tokenId the token id
*/
function getSeed(uint256 tokenId) public view returns (uint256)
{
}
/**
* @notice Get the random seed for a given token, expanded from the baseSeed from Chainlink VRF.
*
* @param random the base random number
* @param expansion the expansion number
*/
function expandRandom(uint256 random, uint256 expansion) internal pure returns (uint256)
{
}
}
| LINK.balanceOf(address(this))>=fee,"Not enough LINK" | 42,091 | LINK.balanceOf(address(this))>=fee |
"Token Not Found" | pragma solidity ^0.8.4;
/*
* @title ERC721 token for Scrambles
*
* @author original logic by Niftydude, extended by @bitcoinski, extended again by @georgefatlion
*/
contract Scrambles is IScrambles, ERC721Enumerable, ERC721Pausable, ERC721Burnable, Ownable, VRFConsumerBase {
using Strings for uint256;
using Strings for uint8;
using SafeMath for uint256;
using Counters for Counters.Counter;
Counters.Counter private generalCounter;
uint public constant MAX_MINT = 963;
// VRF stuff
address public VRFCoordinator;
address public LinkToken;
bytes32 internal keyHash;
uint256 public baseSeed;
struct RedemptionWindow {
bool open;
uint8 maxRedeemPerWallet;
bytes32 merkleRoot;
}
mapping(uint8 => RedemptionWindow) public redemptionWindows;
mapping(address => uint8) public mintedTotal;
mapping(uint8 => string[]) colours;
// links
string public _contractURI;
bool public revealed;
event Minted(address indexed account, string tokens);
/**
* @notice Constructor to create Scrambles contract
*
* @param _name the token name
* @param _symbol the token symbol
* @param _maxRedeemPerWallet the max mint per redemption by index
* @param _merkleRoots the merkle root for redemption window by index
* @param _contractMetaDataURI the respective contract meta data URI
* @param _VRFCoordinator the address of the vrf coordinator
* @param _LinkToken link token
* @param _keyHash chainlink keyhash
*/
constructor (
string memory _name,
string memory _symbol,
uint8[] memory _maxRedeemPerWallet,
bytes32[] memory _merkleRoots,
string memory _contractMetaDataURI,
address _VRFCoordinator,
address _LinkToken,
bytes32 _keyHash
)
VRFConsumerBase(_VRFCoordinator, _LinkToken)
ERC721(_name, _symbol) {
}
/**
* @notice Pause redeems until unpause is called. this pauses the whole contract.
*/
function pause() external override onlyOwner {
}
/**
* @notice Unpause redeems until pause is called. this unpauses the whole contract.
*/
function unpause() external override onlyOwner {
}
/**
* @notice Set revealed to true.
*/
function reveal(bool state) external onlyOwner {
}
/**
* @notice edit a redemption window. only writes value if it is different.
*
* @param _windowID the index of the claim window to set.
* @param _merkleRoot the window merkleRoot.
* @param _open the window open state.
* @param _maxPerWallet the window maximum per wallet.
*/
function editRedemptionWindow(
uint8 _windowID,
bytes32 _merkleRoot,
bool _open,
uint8 _maxPerWallet
) external override onlyOwner {
}
/**
* @notice Widthdraw Ether from contract.
*
* @param _to the address to send to
* @param _amount the amount to withdraw
*/
function withdrawEther(address payable _to, uint256 _amount) public onlyOwner
{
}
/**
* @notice Mint a Scramble.
*
* @param windowIndex the index of the claim window to use.
* @param amount the amount of tokens to mint
* @param merkleProof the hash proving they are on the list for a given window. only applies to windows 0, 1 and 2.
*/
function mint(uint8 windowIndex, uint8 amount, bytes32[] calldata merkleProof) external override{
}
/**
* @notice Verify the merkle proof for a given root.
*
* @param proof vrf keyhash value
* @param root vrf keyhash value
*/
function verifyMerkleProof(bytes32[] memory proof, bytes32 root) public view returns (bool)
{
}
/**
* @notice assign the returned chainlink vrf random number to baseSeed variable.
*
* @param requestId the id of the request - unused.
* @param randomness the random number from chainlink vrf.
*/
function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721, ERC721Enumerable) returns (bool) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) {
}
function setContractURI(string memory uri) external onlyOwner{
}
function contractURI() public view returns (string memory) {
}
/**
* @notice returns the base64 encoded json metadata for a token.
*
* @param tokenId the token to return data for.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
/**
* @notice returns the core numbers for the token. the palette index range:0-2 followed by the 9 colour indexes range: 0-5.
*
* @param tokenId the tokenId to return numbers for.
*/
function getCoreNumbers(uint256 tokenId) public view virtual override returns (string memory){
}
/**
* @notice checks if two indexes in a colour array match, if they do return 1 otherwise return 0.
*
* @param cols array of colours.
* @param a first index to check.
* @param b second index to check.
*/
function checkConnection(string[9] memory cols, uint8 a, uint8 b) internal pure returns(uint8)
{
}
/**
* @notice returns the attributes part of the json string.
*
* @param tokenId the token to generate traits for.
*/
function getTraits(uint256 tokenId) public view returns (string memory)
{
}
/**
* @notice create a property string with value encased in quotes.
*
* @param traitName the name of the trait
* @param value the value of the trait
*/
function getPropertyString(string memory traitName, uint256 value) internal pure returns (string memory)
{
}
/**
* @notice create a level string with value not encased in quotes.
*
* @param traitName the name of the trait
* @param value the value of the trait
*/
function getLevelString(string memory traitName, uint256 value) internal pure returns (string memory)
{
}
/**
* @notice Return the svg string for a given token.
*
* @param tokenId the token to return.
*/
function getSVGString(uint256 tokenId) public view returns (string memory)
{
}
/**
* @notice Return the palette index based on a seed.
*
* @param colourIndex used to expand the random number.
* @param seed the seed for the token.
*/
function getColour(uint8 colourIndex, uint256 seed) internal view returns (string memory)
{
}
/**
* @notice Return the palette index based on a seed.
*
* @param colourIndex used to expand the random number.
* @param seed the seed for the token.
* @param percentage used to create the shadows.
*/
function getGrey(uint8 colourIndex, uint256 seed, uint256 percentage) public pure returns (string memory)
{
}
/**
* @notice Return the palette index based on a seed.
*
* @param seed the seed for the token.
*/
function getPaletteIndex(uint256 seed) internal pure returns (uint8)
{
}
/**
* @notice Call chainlink to get a random number to use as the base for the random seeds.
*
* @param fee the link fee.
*/
function scramble(uint256 fee) public onlyOwner returns (bytes32 requestId) {
}
/**
* @notice Get the random seed for a given token, expanded from the baseSeed from Chainlink VRF.
*
* @param tokenId the token id
*/
function getSeed(uint256 tokenId) public view returns (uint256)
{
require(<FILL_ME>)
if (baseSeed == 0){
return 0;
}
else{
return expandRandom(baseSeed, tokenId);
}
}
/**
* @notice Get the random seed for a given token, expanded from the baseSeed from Chainlink VRF.
*
* @param random the base random number
* @param expansion the expansion number
*/
function expandRandom(uint256 random, uint256 expansion) internal pure returns (uint256)
{
}
}
| totalSupply()>tokenId,"Token Not Found" | 42,091 | totalSupply()>tokenId |
"Invalid ticket value/count" | pragma solidity ^0.5.2;
/**
* @title ERC20 interface
* @dev see https://eips.ethereum.org/EIPS/eip-20
*/
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);
event EtherTransfer(address toAddress, uint256 amount);
}
// ----------------------------------------------------------------------------
// Safe maths
// ----------------------------------------------------------------------------
/**
* @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 MYLPowerball {
using SafeMath for uint256;
address private _owner; // Variable for Owner of the Contract.
uint256 private _ticketPrice; // Variable for price of each ticket (set as 0.01 eth)
uint256 private _purchaseTokenAmount; // variable for Amount of tokens per ticket purchase (set as 10 lotto)
// address private _buyerPoolAddress; // Variable for pool address for tokens for ticket purchase
IERC20 lottoCoin;
constructor (uint256 ticketPrice, uint256 purchaseTokenAmount, address owner, address _poolToken) public {
}
/*----------------------------------------------------------------------------
* Functions for owner
*----------------------------------------------------------------------------
*/
/**
* @dev get address of smart contract owner
* @return address of owner
*/
function getowner() public view returns (address) {
}
/**
* @dev modifier to check if the message sender is owner
*/
modifier onlyOwner() {
}
// modifier onlyairdropAddress(){
// require(_airdropETHAddress,"");
// _;
// }
/**
* @dev Internal function for modifier
*/
function isOwner() internal view returns (bool) {
}
/**
* @dev Transfer ownership of the smart contract. For owner only
* @return request status
*/
function transferOwnership(address newOwner) public onlyOwner returns (bool){
}
//Contract for managing business logic for this application
mapping (uint256 => address[]) private allAddressList; //list of all address participating in a saleId
mapping (uint256 => address[]) private winner; //winner address for a saleId
mapping (uint256 => uint256) private winningPowerBallNumber; //winning powerball number by saleId
mapping (uint256 => mapping (address => uint256[])) private ticketNumberByAddress; //user ticket number for a saleId
mapping (uint256 => mapping (uint256 => address[])) private addressesByTicketNumber; //list of addresses for ticketId
mapping (uint256 => mapping (address => uint256)) private totalSaleAmountByAddAndSaleID; //list of addresses for ticketId
mapping (uint256 => uint256) private totalSaleAmount; //total collection for a saleId
mapping (uint256 => uint256[]) private winningAmount; //winning price for a saleId
mapping (uint256 => uint256) private saleStartTimeStamp; //start timestamp for a saleId
mapping (uint256 => uint256) private saleEndTimeStamp; //end timestamp for a saleId
mapping (uint256 => uint256) private saleRunningStatus; //sale running status for a saleId
mapping (uint256 => uint256[]) private winningNumber; //winning lottery number for a saleId
mapping (uint256 => uint256) private saleParticipants; //total number sales per sale session
uint256 private elapsedTime; //variable to set time for powerball winning
uint256 private saleIdNow = 1; //saleIdNow for sale now
address[] private AllParticipantAddresses; //list of all participants participated in the sale
uint256 private totalSaleAmountForAllSales; //total amount including all sales
uint256 private totalDonation; //total donated amount
uint256[] public checkerEmpty;
// //Internal function for checking values for purchaseTicket
// function getNumber(uint256 _number) internal pure returns(uint256){
// return _number.div(6);
// }
/**
* @dev InitiateSmartContractValue
*/
function initiateSmartContractValue(uint256 _elapseTime) public onlyOwner returns(bool){
}
/**
* @dev perform purchase
* @param _ticketNumbers ticket number from the list in application
*/
function purchaseTicket(uint256 _ticketNumbers, uint256 ticketCount) external payable returns(bool){
if(_ticketNumbers == 0){
totalDonation = totalDonation + 1;
return true;
}
require(msg.value >= ticketCount.mul(_ticketPrice), "Insufficient eth value");
require(<FILL_ME>)
uint256 saleId;
if((saleStartTimeStamp[saleIdNow] + elapsedTime) > now){
saleId = saleIdNow;
} else {
saleId = saleIdNow.add(1);
}
AllParticipantAddresses.push(msg.sender);
totalSaleAmount[saleId] = totalSaleAmount[saleId] + msg.value;
totalSaleAmountForAllSales = totalSaleAmountForAllSales + msg.value;
totalSaleAmountByAddAndSaleID[saleId][msg.sender] = totalSaleAmountByAddAndSaleID[saleId][msg.sender] + msg.value;
ticketNumberByAddress[saleId][msg.sender].push(_ticketNumbers);
if(ticketCount == 5){
lottoCoin.transfer(msg.sender,_purchaseTokenAmount);
allAddressList[saleId].push(msg.sender);
saleParticipants[saleId] = saleParticipants[saleId] + 1;
return true;
}
}
/**
* @dev declare winner for a sale session
*/
function declareWinner(uint256[] calldata _winningSequence, uint256 _powerballNumber, address payable[] calldata _winnerAddressArray, uint256[] calldata _winnerPositions, uint256[] calldata _winnerAmountInWei) external payable onlyOwner returns(bool){
}
/**
* @dev set elapsed time for powerball
*/
function setElapsedTime(uint256 time) public onlyOwner returns(bool){
}
/**
* @dev get elapsed time for powerball
*/
function getElapsedTime() external view returns(uint256){
}
/**
* @dev get winning powerball number
*/
function getWinningPowerballNumberBySaleId(uint256 _saleId) external view returns(uint256){
}
/**
* @dev get current saleId for this session
*/
function getSaleIdNow() external view returns(uint256){
}
/**
* @dev withdraw all eth from the smart contract
*/
function withdrawETHFromContract(uint256 _savingsValue,address payable _savingsReceiver, uint256 _opexValue, address payable _opexReceiver) external onlyOwner returns(bool){
}
function withdrawTokenFromContract(address tokenAddress, uint256 amount, address receiver) external onlyOwner {
}
/**
* @dev get end timeStamp by sale session
*/
function getEndTime(uint256 _saleId) external view returns(uint256){
}
/**
* @dev get start timeStamp by sale session
*/
function getStartTime(uint256 _saleId) external view returns(uint256){
}
/**
* @dev get winning number by sale ID
*/
function getWinningNumber(uint256 _saleId) external view returns(uint256[] memory){
}
/**
* @dev get winning amount by sale ID
*/
function getWinningAmount(uint256 _saleId) external view returns(uint256[] memory){
}
/**
* @dev get winning address by sale ID
*/
function getWinningAddress(uint256 _saleId) external view returns(address[] memory){
}
/**
* @dev get list of all addresses in the Sale
*/
function getAllSaleAddressesBySaleID(uint256 _saleId) external view returns(address[] memory){
}
/**
* @dev get list of all addresses in the contract
*/
function getAllParticipantAddresses() external view returns(address[] memory){
}
/**
* @dev get total sale amount for a sale session
*/
function getTotalSaleAmountBySaleID(uint256 _saleId) external view returns(uint256){
}
/**
* @dev get total sale amount for all sale session
*/
function getTotalSaleAmountForAllSale() external view returns(uint256){
}
/**
* @dev get total number of participants by saleId
*/
function getParticipantCountBySaleId(uint256 _saleId) external view returns(uint256){
}
/**
* @dev get price of one ticket
*/
function getPriceOfOneTicket() external view returns(uint256){
}
/**
* @dev set price of one ticket by owner only
* @param _newPrice New price of each token
*/
function setPriceOfOneTicket(uint256 _newPrice) external onlyOwner returns(bool){
}
/**
* @dev get ticket number for the given address
* @param _saleId Sale id for the sale session
* @param _add New price of each token
*/
function getticketNumberByAddress(uint256 _saleId, address _add) external view returns(uint256[] memory){
}
/**
* @dev get amount of token sent per ticket purchase
*/
function getpurchaseTokenAmount() external view returns(uint256){
}
/**
* @dev set amount of token sent per ticket purchase
*/
function setpurchaseTokenAmount(uint256 purchaseTokenAmount) external onlyOwner returns(bool){
}
/**
* @dev get total eth by user address and saleId
*/
function getTotalSaleAmountByAddAndSaleID(uint256 _saleId, address _userAddress) external view returns(uint256){
}
}
| _ticketNumbers.div(10**(ticketCount.mul(12)))==0&&_ticketNumbers.div(10**(ticketCount.mul(12).sub(2)))>0,"Invalid ticket value/count" | 42,128 | _ticketNumbers.div(10**(ticketCount.mul(12)))==0&&_ticketNumbers.div(10**(ticketCount.mul(12).sub(2)))>0 |
"Insufficient amount to transfer" | pragma solidity ^0.5.2;
/**
* @title ERC20 interface
* @dev see https://eips.ethereum.org/EIPS/eip-20
*/
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);
event EtherTransfer(address toAddress, uint256 amount);
}
// ----------------------------------------------------------------------------
// Safe maths
// ----------------------------------------------------------------------------
/**
* @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 MYLPowerball {
using SafeMath for uint256;
address private _owner; // Variable for Owner of the Contract.
uint256 private _ticketPrice; // Variable for price of each ticket (set as 0.01 eth)
uint256 private _purchaseTokenAmount; // variable for Amount of tokens per ticket purchase (set as 10 lotto)
// address private _buyerPoolAddress; // Variable for pool address for tokens for ticket purchase
IERC20 lottoCoin;
constructor (uint256 ticketPrice, uint256 purchaseTokenAmount, address owner, address _poolToken) public {
}
/*----------------------------------------------------------------------------
* Functions for owner
*----------------------------------------------------------------------------
*/
/**
* @dev get address of smart contract owner
* @return address of owner
*/
function getowner() public view returns (address) {
}
/**
* @dev modifier to check if the message sender is owner
*/
modifier onlyOwner() {
}
// modifier onlyairdropAddress(){
// require(_airdropETHAddress,"");
// _;
// }
/**
* @dev Internal function for modifier
*/
function isOwner() internal view returns (bool) {
}
/**
* @dev Transfer ownership of the smart contract. For owner only
* @return request status
*/
function transferOwnership(address newOwner) public onlyOwner returns (bool){
}
//Contract for managing business logic for this application
mapping (uint256 => address[]) private allAddressList; //list of all address participating in a saleId
mapping (uint256 => address[]) private winner; //winner address for a saleId
mapping (uint256 => uint256) private winningPowerBallNumber; //winning powerball number by saleId
mapping (uint256 => mapping (address => uint256[])) private ticketNumberByAddress; //user ticket number for a saleId
mapping (uint256 => mapping (uint256 => address[])) private addressesByTicketNumber; //list of addresses for ticketId
mapping (uint256 => mapping (address => uint256)) private totalSaleAmountByAddAndSaleID; //list of addresses for ticketId
mapping (uint256 => uint256) private totalSaleAmount; //total collection for a saleId
mapping (uint256 => uint256[]) private winningAmount; //winning price for a saleId
mapping (uint256 => uint256) private saleStartTimeStamp; //start timestamp for a saleId
mapping (uint256 => uint256) private saleEndTimeStamp; //end timestamp for a saleId
mapping (uint256 => uint256) private saleRunningStatus; //sale running status for a saleId
mapping (uint256 => uint256[]) private winningNumber; //winning lottery number for a saleId
mapping (uint256 => uint256) private saleParticipants; //total number sales per sale session
uint256 private elapsedTime; //variable to set time for powerball winning
uint256 private saleIdNow = 1; //saleIdNow for sale now
address[] private AllParticipantAddresses; //list of all participants participated in the sale
uint256 private totalSaleAmountForAllSales; //total amount including all sales
uint256 private totalDonation; //total donated amount
uint256[] public checkerEmpty;
// //Internal function for checking values for purchaseTicket
// function getNumber(uint256 _number) internal pure returns(uint256){
// return _number.div(6);
// }
/**
* @dev InitiateSmartContractValue
*/
function initiateSmartContractValue(uint256 _elapseTime) public onlyOwner returns(bool){
}
/**
* @dev perform purchase
* @param _ticketNumbers ticket number from the list in application
*/
function purchaseTicket(uint256 _ticketNumbers, uint256 ticketCount) external payable returns(bool){
}
/**
* @dev declare winner for a sale session
*/
function declareWinner(uint256[] calldata _winningSequence, uint256 _powerballNumber, address payable[] calldata _winnerAddressArray, uint256[] calldata _winnerPositions, uint256[] calldata _winnerAmountInWei) external payable onlyOwner returns(bool){
}
/**
* @dev set elapsed time for powerball
*/
function setElapsedTime(uint256 time) public onlyOwner returns(bool){
}
/**
* @dev get elapsed time for powerball
*/
function getElapsedTime() external view returns(uint256){
}
/**
* @dev get winning powerball number
*/
function getWinningPowerballNumberBySaleId(uint256 _saleId) external view returns(uint256){
}
/**
* @dev get current saleId for this session
*/
function getSaleIdNow() external view returns(uint256){
}
/**
* @dev withdraw all eth from the smart contract
*/
function withdrawETHFromContract(uint256 _savingsValue,address payable _savingsReceiver, uint256 _opexValue, address payable _opexReceiver) external onlyOwner returns(bool){
}
function withdrawTokenFromContract(address tokenAddress, uint256 amount, address receiver) external onlyOwner {
require(<FILL_ME>)
IERC20(tokenAddress).transfer(receiver,amount);
}
/**
* @dev get end timeStamp by sale session
*/
function getEndTime(uint256 _saleId) external view returns(uint256){
}
/**
* @dev get start timeStamp by sale session
*/
function getStartTime(uint256 _saleId) external view returns(uint256){
}
/**
* @dev get winning number by sale ID
*/
function getWinningNumber(uint256 _saleId) external view returns(uint256[] memory){
}
/**
* @dev get winning amount by sale ID
*/
function getWinningAmount(uint256 _saleId) external view returns(uint256[] memory){
}
/**
* @dev get winning address by sale ID
*/
function getWinningAddress(uint256 _saleId) external view returns(address[] memory){
}
/**
* @dev get list of all addresses in the Sale
*/
function getAllSaleAddressesBySaleID(uint256 _saleId) external view returns(address[] memory){
}
/**
* @dev get list of all addresses in the contract
*/
function getAllParticipantAddresses() external view returns(address[] memory){
}
/**
* @dev get total sale amount for a sale session
*/
function getTotalSaleAmountBySaleID(uint256 _saleId) external view returns(uint256){
}
/**
* @dev get total sale amount for all sale session
*/
function getTotalSaleAmountForAllSale() external view returns(uint256){
}
/**
* @dev get total number of participants by saleId
*/
function getParticipantCountBySaleId(uint256 _saleId) external view returns(uint256){
}
/**
* @dev get price of one ticket
*/
function getPriceOfOneTicket() external view returns(uint256){
}
/**
* @dev set price of one ticket by owner only
* @param _newPrice New price of each token
*/
function setPriceOfOneTicket(uint256 _newPrice) external onlyOwner returns(bool){
}
/**
* @dev get ticket number for the given address
* @param _saleId Sale id for the sale session
* @param _add New price of each token
*/
function getticketNumberByAddress(uint256 _saleId, address _add) external view returns(uint256[] memory){
}
/**
* @dev get amount of token sent per ticket purchase
*/
function getpurchaseTokenAmount() external view returns(uint256){
}
/**
* @dev set amount of token sent per ticket purchase
*/
function setpurchaseTokenAmount(uint256 purchaseTokenAmount) external onlyOwner returns(bool){
}
/**
* @dev get total eth by user address and saleId
*/
function getTotalSaleAmountByAddAndSaleID(uint256 _saleId, address _userAddress) external view returns(uint256){
}
}
| IERC20(tokenAddress).balanceOf(address(this))>=amount,"Insufficient amount to transfer" | 42,128 | IERC20(tokenAddress).balanceOf(address(this))>=amount |
"GelatoExecutors.unstakeExecutor: msg.sender still assigned" | // "SPDX-License-Identifier: UNLICENSED"
pragma solidity ^0.6.10;
pragma experimental ABIEncoderV2;
import {IGelatoExecutors} from "./interfaces/IGelatoExecutors.sol";
import {GelatoProviders} from "./GelatoProviders.sol";
import {Address} from "../external/Address.sol";
import {SafeMath} from "../external/SafeMath.sol";
import {Math} from "../external/Math.sol";
/// @title GelatoExecutors
/// @author Luis Schliesske & Hilmar Orth
/// @notice Stake Management of executors & batch Unproving providers
/// @dev Find all NatSpecs inside IGelatoExecutors
abstract contract GelatoExecutors is IGelatoExecutors, GelatoProviders {
using Address for address payable; /// for sendValue method
using SafeMath for uint256;
// Executor De/Registrations and Staking
function stakeExecutor() external payable override {
}
function unstakeExecutor() external override {
require(<FILL_ME>)
uint256 unbondedStake = executorStake[msg.sender];
require(
unbondedStake != 0,
"GelatoExecutors.unstakeExecutor: already unstaked"
);
delete executorStake[msg.sender];
msg.sender.sendValue(unbondedStake);
emit LogExecutorUnstaked(msg.sender);
}
function withdrawExcessExecutorStake(uint256 _withdrawAmount)
external
override
returns(uint256 realWithdrawAmount)
{
}
// To unstake, Executors must reassign ALL their Providers to another staked Executor
function multiReassignProviders(address[] calldata _providers, address _newExecutor)
external
override
{
}
}
| !isExecutorAssigned(msg.sender),"GelatoExecutors.unstakeExecutor: msg.sender still assigned" | 42,311 | !isExecutorAssigned(msg.sender) |
"GelatoExecutors.withdrawExcessExecutorStake: not minStaked" | // "SPDX-License-Identifier: UNLICENSED"
pragma solidity ^0.6.10;
pragma experimental ABIEncoderV2;
import {IGelatoExecutors} from "./interfaces/IGelatoExecutors.sol";
import {GelatoProviders} from "./GelatoProviders.sol";
import {Address} from "../external/Address.sol";
import {SafeMath} from "../external/SafeMath.sol";
import {Math} from "../external/Math.sol";
/// @title GelatoExecutors
/// @author Luis Schliesske & Hilmar Orth
/// @notice Stake Management of executors & batch Unproving providers
/// @dev Find all NatSpecs inside IGelatoExecutors
abstract contract GelatoExecutors is IGelatoExecutors, GelatoProviders {
using Address for address payable; /// for sendValue method
using SafeMath for uint256;
// Executor De/Registrations and Staking
function stakeExecutor() external payable override {
}
function unstakeExecutor() external override {
}
function withdrawExcessExecutorStake(uint256 _withdrawAmount)
external
override
returns(uint256 realWithdrawAmount)
{
require(<FILL_ME>)
uint256 currentExecutorStake = executorStake[msg.sender];
uint256 excessExecutorStake = currentExecutorStake - minExecutorStake;
realWithdrawAmount = Math.min(_withdrawAmount, excessExecutorStake);
uint256 newExecutorStake = currentExecutorStake - realWithdrawAmount;
// Effects
executorStake[msg.sender] = newExecutorStake;
// Interaction
msg.sender.sendValue(realWithdrawAmount);
emit LogExecutorBalanceWithdrawn(msg.sender, realWithdrawAmount);
}
// To unstake, Executors must reassign ALL their Providers to another staked Executor
function multiReassignProviders(address[] calldata _providers, address _newExecutor)
external
override
{
}
}
| isExecutorMinStaked(msg.sender),"GelatoExecutors.withdrawExcessExecutorStake: not minStaked" | 42,311 | isExecutorMinStaked(msg.sender) |
"None Left!" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract MetaBrawlers is ERC721Enumerable, Ownable {
using Strings for uint;
using SafeMath for uint256;
using Counters for Counters.Counter;
uint256 public constant MAX_ELEMENTS = 500;
uint256 public constant WLPRICE = 14 * 10**16;
uint256 public constant PRICE = 16 * 10**16;
uint256 public nftPerAddressLimit = 2;
bytes32 public merkleRoot;
address public constant artistAddress = 0x31F1e7284db96D01397f202C6638396Baf08068a;
address public constant devAddress = 0x070D57F47c8Acced103B215692b72C102A672E72;
bool public onlyWhiteListed = true;
bool public revealed;
bool private PAUSE = true;
mapping(address => bool) public whitelistClaimed;
Counters.Counter private _tokenIdTracker;
string public baseTokenURI;
string public notRevealedURI;
string public baseExtension;
event brawlerBirth(uint256 indexed id);
event pauseEvent(bool pause);
constructor(string memory _baseURI, string memory _baseExtension, string memory _notRevealedURI) ERC721("MetaBrawlers","BRAWL"){
}
modifier saleIsOpen {
require(<FILL_ME>)
require(!PAUSE, "Sale paused");
_;
}
modifier publicSale {
}
function setNftPerAddressLimit(uint256 _limit) public onlyOwner() {
}
function setBaseURI(string memory _baseURI, string memory _baseExtension) public onlyOwner {
}
function tokenCount() public view returns (uint256) {
}
function _generateMerkleLeaf(address account) internal pure returns (bytes32) {
}
function whitelistMint(bytes32[] calldata proof) public payable saleIsOpen {
}
function mint(uint256 _count) public payable saleIsOpen publicSale {
}
function _mintNFT(address _to, uint256 _tokenId) private {
}
function price(uint256 _count) public pure returns (uint256) {
}
function wlprice() public pure returns (uint256) {
}
function walletOfOwner(address _owner) external view returns (uint256[] memory) {
}
function setOnlyWhitelisted(bool _state) public onlyOwner{
}
function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner{
}
function pause(bool _pause) public onlyOwner{
}
function withdrawAll() public onlyOwner {
}
function _withdraw(address _address, uint256 _amount) private {
}
function tokenURI(uint tokenId) public view virtual override returns (string memory) {
}
function setRevealed(bool _revealed) public onlyOwner() {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function mintUnsoldTokens(uint256 mintCount) public onlyOwner {
}
}
| tokenCount()<=MAX_ELEMENTS,"None Left!" | 42,362 | tokenCount()<=MAX_ELEMENTS |
"Sale paused" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract MetaBrawlers is ERC721Enumerable, Ownable {
using Strings for uint;
using SafeMath for uint256;
using Counters for Counters.Counter;
uint256 public constant MAX_ELEMENTS = 500;
uint256 public constant WLPRICE = 14 * 10**16;
uint256 public constant PRICE = 16 * 10**16;
uint256 public nftPerAddressLimit = 2;
bytes32 public merkleRoot;
address public constant artistAddress = 0x31F1e7284db96D01397f202C6638396Baf08068a;
address public constant devAddress = 0x070D57F47c8Acced103B215692b72C102A672E72;
bool public onlyWhiteListed = true;
bool public revealed;
bool private PAUSE = true;
mapping(address => bool) public whitelistClaimed;
Counters.Counter private _tokenIdTracker;
string public baseTokenURI;
string public notRevealedURI;
string public baseExtension;
event brawlerBirth(uint256 indexed id);
event pauseEvent(bool pause);
constructor(string memory _baseURI, string memory _baseExtension, string memory _notRevealedURI) ERC721("MetaBrawlers","BRAWL"){
}
modifier saleIsOpen {
require(tokenCount() <= MAX_ELEMENTS, "None Left!");
require(<FILL_ME>)
_;
}
modifier publicSale {
}
function setNftPerAddressLimit(uint256 _limit) public onlyOwner() {
}
function setBaseURI(string memory _baseURI, string memory _baseExtension) public onlyOwner {
}
function tokenCount() public view returns (uint256) {
}
function _generateMerkleLeaf(address account) internal pure returns (bytes32) {
}
function whitelistMint(bytes32[] calldata proof) public payable saleIsOpen {
}
function mint(uint256 _count) public payable saleIsOpen publicSale {
}
function _mintNFT(address _to, uint256 _tokenId) private {
}
function price(uint256 _count) public pure returns (uint256) {
}
function wlprice() public pure returns (uint256) {
}
function walletOfOwner(address _owner) external view returns (uint256[] memory) {
}
function setOnlyWhitelisted(bool _state) public onlyOwner{
}
function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner{
}
function pause(bool _pause) public onlyOwner{
}
function withdrawAll() public onlyOwner {
}
function _withdraw(address _address, uint256 _amount) private {
}
function tokenURI(uint tokenId) public view virtual override returns (string memory) {
}
function setRevealed(bool _revealed) public onlyOwner() {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function mintUnsoldTokens(uint256 mintCount) public onlyOwner {
}
}
| !PAUSE,"Sale paused" | 42,362 | !PAUSE |
"Mint is currently whitelist only" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract MetaBrawlers is ERC721Enumerable, Ownable {
using Strings for uint;
using SafeMath for uint256;
using Counters for Counters.Counter;
uint256 public constant MAX_ELEMENTS = 500;
uint256 public constant WLPRICE = 14 * 10**16;
uint256 public constant PRICE = 16 * 10**16;
uint256 public nftPerAddressLimit = 2;
bytes32 public merkleRoot;
address public constant artistAddress = 0x31F1e7284db96D01397f202C6638396Baf08068a;
address public constant devAddress = 0x070D57F47c8Acced103B215692b72C102A672E72;
bool public onlyWhiteListed = true;
bool public revealed;
bool private PAUSE = true;
mapping(address => bool) public whitelistClaimed;
Counters.Counter private _tokenIdTracker;
string public baseTokenURI;
string public notRevealedURI;
string public baseExtension;
event brawlerBirth(uint256 indexed id);
event pauseEvent(bool pause);
constructor(string memory _baseURI, string memory _baseExtension, string memory _notRevealedURI) ERC721("MetaBrawlers","BRAWL"){
}
modifier saleIsOpen {
}
modifier publicSale {
require(<FILL_ME>)
_;
}
function setNftPerAddressLimit(uint256 _limit) public onlyOwner() {
}
function setBaseURI(string memory _baseURI, string memory _baseExtension) public onlyOwner {
}
function tokenCount() public view returns (uint256) {
}
function _generateMerkleLeaf(address account) internal pure returns (bytes32) {
}
function whitelistMint(bytes32[] calldata proof) public payable saleIsOpen {
}
function mint(uint256 _count) public payable saleIsOpen publicSale {
}
function _mintNFT(address _to, uint256 _tokenId) private {
}
function price(uint256 _count) public pure returns (uint256) {
}
function wlprice() public pure returns (uint256) {
}
function walletOfOwner(address _owner) external view returns (uint256[] memory) {
}
function setOnlyWhitelisted(bool _state) public onlyOwner{
}
function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner{
}
function pause(bool _pause) public onlyOwner{
}
function withdrawAll() public onlyOwner {
}
function _withdraw(address _address, uint256 _amount) private {
}
function tokenURI(uint tokenId) public view virtual override returns (string memory) {
}
function setRevealed(bool _revealed) public onlyOwner() {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function mintUnsoldTokens(uint256 mintCount) public onlyOwner {
}
}
| !onlyWhiteListed,"Mint is currently whitelist only" | 42,362 | !onlyWhiteListed |
"Whitelist address has already claimed." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract MetaBrawlers is ERC721Enumerable, Ownable {
using Strings for uint;
using SafeMath for uint256;
using Counters for Counters.Counter;
uint256 public constant MAX_ELEMENTS = 500;
uint256 public constant WLPRICE = 14 * 10**16;
uint256 public constant PRICE = 16 * 10**16;
uint256 public nftPerAddressLimit = 2;
bytes32 public merkleRoot;
address public constant artistAddress = 0x31F1e7284db96D01397f202C6638396Baf08068a;
address public constant devAddress = 0x070D57F47c8Acced103B215692b72C102A672E72;
bool public onlyWhiteListed = true;
bool public revealed;
bool private PAUSE = true;
mapping(address => bool) public whitelistClaimed;
Counters.Counter private _tokenIdTracker;
string public baseTokenURI;
string public notRevealedURI;
string public baseExtension;
event brawlerBirth(uint256 indexed id);
event pauseEvent(bool pause);
constructor(string memory _baseURI, string memory _baseExtension, string memory _notRevealedURI) ERC721("MetaBrawlers","BRAWL"){
}
modifier saleIsOpen {
}
modifier publicSale {
}
function setNftPerAddressLimit(uint256 _limit) public onlyOwner() {
}
function setBaseURI(string memory _baseURI, string memory _baseExtension) public onlyOwner {
}
function tokenCount() public view returns (uint256) {
}
function _generateMerkleLeaf(address account) internal pure returns (bytes32) {
}
function whitelistMint(bytes32[] calldata proof) public payable saleIsOpen {
uint256 total = tokenCount() + 1;
require(<FILL_ME>)
require(1 + balanceOf(msg.sender) <= nftPerAddressLimit, "Exceeds personal limit");
require(total + 1 <= MAX_ELEMENTS, "Over Supply Limit");
require(msg.value >= WLPRICE, "Insufficient funds");
require(MerkleProof.verify(proof, merkleRoot, _generateMerkleLeaf(msg.sender)), "Address does not exist in whitelist");
address wallet = _msgSender();
whitelistClaimed[msg.sender] = true;
_mintNFT(wallet, total);
}
function mint(uint256 _count) public payable saleIsOpen publicSale {
}
function _mintNFT(address _to, uint256 _tokenId) private {
}
function price(uint256 _count) public pure returns (uint256) {
}
function wlprice() public pure returns (uint256) {
}
function walletOfOwner(address _owner) external view returns (uint256[] memory) {
}
function setOnlyWhitelisted(bool _state) public onlyOwner{
}
function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner{
}
function pause(bool _pause) public onlyOwner{
}
function withdrawAll() public onlyOwner {
}
function _withdraw(address _address, uint256 _amount) private {
}
function tokenURI(uint tokenId) public view virtual override returns (string memory) {
}
function setRevealed(bool _revealed) public onlyOwner() {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function mintUnsoldTokens(uint256 mintCount) public onlyOwner {
}
}
| !whitelistClaimed[msg.sender],"Whitelist address has already claimed." | 42,362 | !whitelistClaimed[msg.sender] |
"Exceeds personal limit" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract MetaBrawlers is ERC721Enumerable, Ownable {
using Strings for uint;
using SafeMath for uint256;
using Counters for Counters.Counter;
uint256 public constant MAX_ELEMENTS = 500;
uint256 public constant WLPRICE = 14 * 10**16;
uint256 public constant PRICE = 16 * 10**16;
uint256 public nftPerAddressLimit = 2;
bytes32 public merkleRoot;
address public constant artistAddress = 0x31F1e7284db96D01397f202C6638396Baf08068a;
address public constant devAddress = 0x070D57F47c8Acced103B215692b72C102A672E72;
bool public onlyWhiteListed = true;
bool public revealed;
bool private PAUSE = true;
mapping(address => bool) public whitelistClaimed;
Counters.Counter private _tokenIdTracker;
string public baseTokenURI;
string public notRevealedURI;
string public baseExtension;
event brawlerBirth(uint256 indexed id);
event pauseEvent(bool pause);
constructor(string memory _baseURI, string memory _baseExtension, string memory _notRevealedURI) ERC721("MetaBrawlers","BRAWL"){
}
modifier saleIsOpen {
}
modifier publicSale {
}
function setNftPerAddressLimit(uint256 _limit) public onlyOwner() {
}
function setBaseURI(string memory _baseURI, string memory _baseExtension) public onlyOwner {
}
function tokenCount() public view returns (uint256) {
}
function _generateMerkleLeaf(address account) internal pure returns (bytes32) {
}
function whitelistMint(bytes32[] calldata proof) public payable saleIsOpen {
uint256 total = tokenCount() + 1;
require(!whitelistClaimed[msg.sender], "Whitelist address has already claimed.");
require(<FILL_ME>)
require(total + 1 <= MAX_ELEMENTS, "Over Supply Limit");
require(msg.value >= WLPRICE, "Insufficient funds");
require(MerkleProof.verify(proof, merkleRoot, _generateMerkleLeaf(msg.sender)), "Address does not exist in whitelist");
address wallet = _msgSender();
whitelistClaimed[msg.sender] = true;
_mintNFT(wallet, total);
}
function mint(uint256 _count) public payable saleIsOpen publicSale {
}
function _mintNFT(address _to, uint256 _tokenId) private {
}
function price(uint256 _count) public pure returns (uint256) {
}
function wlprice() public pure returns (uint256) {
}
function walletOfOwner(address _owner) external view returns (uint256[] memory) {
}
function setOnlyWhitelisted(bool _state) public onlyOwner{
}
function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner{
}
function pause(bool _pause) public onlyOwner{
}
function withdrawAll() public onlyOwner {
}
function _withdraw(address _address, uint256 _amount) private {
}
function tokenURI(uint tokenId) public view virtual override returns (string memory) {
}
function setRevealed(bool _revealed) public onlyOwner() {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function mintUnsoldTokens(uint256 mintCount) public onlyOwner {
}
}
| 1+balanceOf(msg.sender)<=nftPerAddressLimit,"Exceeds personal limit" | 42,362 | 1+balanceOf(msg.sender)<=nftPerAddressLimit |
"Over Supply Limit" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract MetaBrawlers is ERC721Enumerable, Ownable {
using Strings for uint;
using SafeMath for uint256;
using Counters for Counters.Counter;
uint256 public constant MAX_ELEMENTS = 500;
uint256 public constant WLPRICE = 14 * 10**16;
uint256 public constant PRICE = 16 * 10**16;
uint256 public nftPerAddressLimit = 2;
bytes32 public merkleRoot;
address public constant artistAddress = 0x31F1e7284db96D01397f202C6638396Baf08068a;
address public constant devAddress = 0x070D57F47c8Acced103B215692b72C102A672E72;
bool public onlyWhiteListed = true;
bool public revealed;
bool private PAUSE = true;
mapping(address => bool) public whitelistClaimed;
Counters.Counter private _tokenIdTracker;
string public baseTokenURI;
string public notRevealedURI;
string public baseExtension;
event brawlerBirth(uint256 indexed id);
event pauseEvent(bool pause);
constructor(string memory _baseURI, string memory _baseExtension, string memory _notRevealedURI) ERC721("MetaBrawlers","BRAWL"){
}
modifier saleIsOpen {
}
modifier publicSale {
}
function setNftPerAddressLimit(uint256 _limit) public onlyOwner() {
}
function setBaseURI(string memory _baseURI, string memory _baseExtension) public onlyOwner {
}
function tokenCount() public view returns (uint256) {
}
function _generateMerkleLeaf(address account) internal pure returns (bytes32) {
}
function whitelistMint(bytes32[] calldata proof) public payable saleIsOpen {
uint256 total = tokenCount() + 1;
require(!whitelistClaimed[msg.sender], "Whitelist address has already claimed.");
require(1 + balanceOf(msg.sender) <= nftPerAddressLimit, "Exceeds personal limit");
require(<FILL_ME>)
require(msg.value >= WLPRICE, "Insufficient funds");
require(MerkleProof.verify(proof, merkleRoot, _generateMerkleLeaf(msg.sender)), "Address does not exist in whitelist");
address wallet = _msgSender();
whitelistClaimed[msg.sender] = true;
_mintNFT(wallet, total);
}
function mint(uint256 _count) public payable saleIsOpen publicSale {
}
function _mintNFT(address _to, uint256 _tokenId) private {
}
function price(uint256 _count) public pure returns (uint256) {
}
function wlprice() public pure returns (uint256) {
}
function walletOfOwner(address _owner) external view returns (uint256[] memory) {
}
function setOnlyWhitelisted(bool _state) public onlyOwner{
}
function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner{
}
function pause(bool _pause) public onlyOwner{
}
function withdrawAll() public onlyOwner {
}
function _withdraw(address _address, uint256 _amount) private {
}
function tokenURI(uint tokenId) public view virtual override returns (string memory) {
}
function setRevealed(bool _revealed) public onlyOwner() {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function mintUnsoldTokens(uint256 mintCount) public onlyOwner {
}
}
| total+1<=MAX_ELEMENTS,"Over Supply Limit" | 42,362 | total+1<=MAX_ELEMENTS |
"Address does not exist in whitelist" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract MetaBrawlers is ERC721Enumerable, Ownable {
using Strings for uint;
using SafeMath for uint256;
using Counters for Counters.Counter;
uint256 public constant MAX_ELEMENTS = 500;
uint256 public constant WLPRICE = 14 * 10**16;
uint256 public constant PRICE = 16 * 10**16;
uint256 public nftPerAddressLimit = 2;
bytes32 public merkleRoot;
address public constant artistAddress = 0x31F1e7284db96D01397f202C6638396Baf08068a;
address public constant devAddress = 0x070D57F47c8Acced103B215692b72C102A672E72;
bool public onlyWhiteListed = true;
bool public revealed;
bool private PAUSE = true;
mapping(address => bool) public whitelistClaimed;
Counters.Counter private _tokenIdTracker;
string public baseTokenURI;
string public notRevealedURI;
string public baseExtension;
event brawlerBirth(uint256 indexed id);
event pauseEvent(bool pause);
constructor(string memory _baseURI, string memory _baseExtension, string memory _notRevealedURI) ERC721("MetaBrawlers","BRAWL"){
}
modifier saleIsOpen {
}
modifier publicSale {
}
function setNftPerAddressLimit(uint256 _limit) public onlyOwner() {
}
function setBaseURI(string memory _baseURI, string memory _baseExtension) public onlyOwner {
}
function tokenCount() public view returns (uint256) {
}
function _generateMerkleLeaf(address account) internal pure returns (bytes32) {
}
function whitelistMint(bytes32[] calldata proof) public payable saleIsOpen {
uint256 total = tokenCount() + 1;
require(!whitelistClaimed[msg.sender], "Whitelist address has already claimed.");
require(1 + balanceOf(msg.sender) <= nftPerAddressLimit, "Exceeds personal limit");
require(total + 1 <= MAX_ELEMENTS, "Over Supply Limit");
require(msg.value >= WLPRICE, "Insufficient funds");
require(<FILL_ME>)
address wallet = _msgSender();
whitelistClaimed[msg.sender] = true;
_mintNFT(wallet, total);
}
function mint(uint256 _count) public payable saleIsOpen publicSale {
}
function _mintNFT(address _to, uint256 _tokenId) private {
}
function price(uint256 _count) public pure returns (uint256) {
}
function wlprice() public pure returns (uint256) {
}
function walletOfOwner(address _owner) external view returns (uint256[] memory) {
}
function setOnlyWhitelisted(bool _state) public onlyOwner{
}
function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner{
}
function pause(bool _pause) public onlyOwner{
}
function withdrawAll() public onlyOwner {
}
function _withdraw(address _address, uint256 _amount) private {
}
function tokenURI(uint tokenId) public view virtual override returns (string memory) {
}
function setRevealed(bool _revealed) public onlyOwner() {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function mintUnsoldTokens(uint256 mintCount) public onlyOwner {
}
}
| MerkleProof.verify(proof,merkleRoot,_generateMerkleLeaf(msg.sender)),"Address does not exist in whitelist" | 42,362 | MerkleProof.verify(proof,merkleRoot,_generateMerkleLeaf(msg.sender)) |
"Exceeds personal limit" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract MetaBrawlers is ERC721Enumerable, Ownable {
using Strings for uint;
using SafeMath for uint256;
using Counters for Counters.Counter;
uint256 public constant MAX_ELEMENTS = 500;
uint256 public constant WLPRICE = 14 * 10**16;
uint256 public constant PRICE = 16 * 10**16;
uint256 public nftPerAddressLimit = 2;
bytes32 public merkleRoot;
address public constant artistAddress = 0x31F1e7284db96D01397f202C6638396Baf08068a;
address public constant devAddress = 0x070D57F47c8Acced103B215692b72C102A672E72;
bool public onlyWhiteListed = true;
bool public revealed;
bool private PAUSE = true;
mapping(address => bool) public whitelistClaimed;
Counters.Counter private _tokenIdTracker;
string public baseTokenURI;
string public notRevealedURI;
string public baseExtension;
event brawlerBirth(uint256 indexed id);
event pauseEvent(bool pause);
constructor(string memory _baseURI, string memory _baseExtension, string memory _notRevealedURI) ERC721("MetaBrawlers","BRAWL"){
}
modifier saleIsOpen {
}
modifier publicSale {
}
function setNftPerAddressLimit(uint256 _limit) public onlyOwner() {
}
function setBaseURI(string memory _baseURI, string memory _baseExtension) public onlyOwner {
}
function tokenCount() public view returns (uint256) {
}
function _generateMerkleLeaf(address account) internal pure returns (bytes32) {
}
function whitelistMint(bytes32[] calldata proof) public payable saleIsOpen {
}
function mint(uint256 _count) public payable saleIsOpen publicSale {
uint256 total = tokenCount() + 1;
require(<FILL_ME>)
require(total + _count <= MAX_ELEMENTS, "Over Supply Limit");
require(msg.value >= price(_count), "Insufficient funds");
address wallet = _msgSender();
for(uint256 i=0; i < _count; i++){
_mintNFT(wallet, total + i);
}
}
function _mintNFT(address _to, uint256 _tokenId) private {
}
function price(uint256 _count) public pure returns (uint256) {
}
function wlprice() public pure returns (uint256) {
}
function walletOfOwner(address _owner) external view returns (uint256[] memory) {
}
function setOnlyWhitelisted(bool _state) public onlyOwner{
}
function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner{
}
function pause(bool _pause) public onlyOwner{
}
function withdrawAll() public onlyOwner {
}
function _withdraw(address _address, uint256 _amount) private {
}
function tokenURI(uint tokenId) public view virtual override returns (string memory) {
}
function setRevealed(bool _revealed) public onlyOwner() {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function mintUnsoldTokens(uint256 mintCount) public onlyOwner {
}
}
| _count+balanceOf(msg.sender)<=nftPerAddressLimit,"Exceeds personal limit" | 42,362 | _count+balanceOf(msg.sender)<=nftPerAddressLimit |
"Over Supply Limit" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract MetaBrawlers is ERC721Enumerable, Ownable {
using Strings for uint;
using SafeMath for uint256;
using Counters for Counters.Counter;
uint256 public constant MAX_ELEMENTS = 500;
uint256 public constant WLPRICE = 14 * 10**16;
uint256 public constant PRICE = 16 * 10**16;
uint256 public nftPerAddressLimit = 2;
bytes32 public merkleRoot;
address public constant artistAddress = 0x31F1e7284db96D01397f202C6638396Baf08068a;
address public constant devAddress = 0x070D57F47c8Acced103B215692b72C102A672E72;
bool public onlyWhiteListed = true;
bool public revealed;
bool private PAUSE = true;
mapping(address => bool) public whitelistClaimed;
Counters.Counter private _tokenIdTracker;
string public baseTokenURI;
string public notRevealedURI;
string public baseExtension;
event brawlerBirth(uint256 indexed id);
event pauseEvent(bool pause);
constructor(string memory _baseURI, string memory _baseExtension, string memory _notRevealedURI) ERC721("MetaBrawlers","BRAWL"){
}
modifier saleIsOpen {
}
modifier publicSale {
}
function setNftPerAddressLimit(uint256 _limit) public onlyOwner() {
}
function setBaseURI(string memory _baseURI, string memory _baseExtension) public onlyOwner {
}
function tokenCount() public view returns (uint256) {
}
function _generateMerkleLeaf(address account) internal pure returns (bytes32) {
}
function whitelistMint(bytes32[] calldata proof) public payable saleIsOpen {
}
function mint(uint256 _count) public payable saleIsOpen publicSale {
}
function _mintNFT(address _to, uint256 _tokenId) private {
}
function price(uint256 _count) public pure returns (uint256) {
}
function wlprice() public pure returns (uint256) {
}
function walletOfOwner(address _owner) external view returns (uint256[] memory) {
}
function setOnlyWhitelisted(bool _state) public onlyOwner{
}
function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner{
}
function pause(bool _pause) public onlyOwner{
}
function withdrawAll() public onlyOwner {
}
function _withdraw(address _address, uint256 _amount) private {
}
function tokenURI(uint tokenId) public view virtual override returns (string memory) {
}
function setRevealed(bool _revealed) public onlyOwner() {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function mintUnsoldTokens(uint256 mintCount) public onlyOwner {
require(PAUSE, "Not paused");
uint256 total = tokenCount() + 1;
require(<FILL_ME>)
address wallet = _msgSender();
for(uint256 i=0; i < mintCount; i++){
_mintNFT(wallet, total + i);
}
}
}
| total+mintCount<=MAX_ELEMENTS,"Over Supply Limit" | 42,362 | total+mintCount<=MAX_ELEMENTS |
null | pragma solidity 0.4.25; /*
________________________________________________________________
// 'KewCover' Token contract with following functionalities:
// => In-built ICO functionality
// => ERC20 Compliance
// => Higher control of ICO by owner
// => selfdestruct functionality
// => SafeMath implementation
// => Air-drop
// => User whitelisting
// => Minting/Burning tokens by owner
//
// Name : KewCover
// Symbol : KEW
// Total supply : 500,000,000 (500 Million)
// Reserved for ICO : 350,000,000 (350 Million)
// Decimals : 8
//
// Copyright (c) 2019 KewCover Inc. (https://KewCover.com) The MIT Licence.
// ----------------------------------------------------------------------------
*/
//*******************************************************************//
//------------------------ SafeMath Library -------------------------//
//*******************************************************************//
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
//*******************************************************************//
//------------------ Contract to Manage Ownership -------------------//
//*******************************************************************//
contract owned {
address public owner;
constructor () public {
}
modifier onlyOwner {
}
function transferOwnership(address newOwner) onlyOwner public {
}
}
interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) external; }
//***************************************************************//
//------------------ ERC20 Standard Template -------------------//
//***************************************************************//
contract TokenERC20 {
// Public variables of the token
using SafeMath for uint256;
string public name;
string public symbol;
uint256 public decimals = 8;
uint256 public totalSupply;
uint256 public reservedForICO;
bool public safeguard = false; //putting safeguard on will halt all non-owner functions
// This creates an array with all balances
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
// This generates a public event on the blockchain that will notify clients
event Transfer(address indexed from, address indexed to, uint256 value);
// This notifies clients about the amount burnt
event Burn(address indexed from, uint256 value);
/**
* Constrctor function
*
* Initializes contract with initial supply tokens to the creator of the contract
*/
constructor (
uint256 initialSupply,
uint256 allocatedForICO,
string tokenName,
string tokenSymbol
) public {
}
/**
* Internal transfer, only can be called by this contract
*/
function _transfer(address _from, address _to, uint _value) internal {
}
/**
* Transfer tokens
*
* Send `_value` tokens to `_to` from your account
*
* @param _to The address of the recipient
* @param _value the amount to send
*/
function transfer(address _to, uint256 _value) public returns (bool success) {
}
/**
* Transfer tokens from other address
*
* Send `_value` tokens to `_to` in behalf of `_from`
*
* @param _from The address of the sender
* @param _to The address of the recipient
* @param _value the amount to send
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
/**
* Set allowance for other address
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
*/
function approve(address _spender, uint256 _value) public
returns (bool success) {
}
/**
* Set allowance for other address and notify
*
* Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it
*
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
* @param _extraData some extra information to send to the approved contract
*/
function approveAndCall(address _spender, uint256 _value, bytes _extraData)
public
returns (bool success) {
}
/**
* Destroy tokens
*
* Remove `_value` tokens from the system irreversibly
*
* @param _value the amount of money to burn
*/
function burn(uint256 _value) public returns (bool success) {
}
/**
* Destroy tokens from other account
*
* Remove `_value` tokens from the system irreversibly on behalf of `_from`.
*
* @param _from the address of the sender
* @param _value the amount of money to burn
*/
function burnFrom(address _from, uint256 _value) public returns (bool success) {
}
}
//************************************************************************//
//--------------------- KEWCOVER MAIN CODE STARTS HERE --------------------//
//************************************************************************//
contract KewCover is owned, TokenERC20 {
/*************************************/
/* User whitelisting functionality */
/*************************************/
bool public whitelistingStatus = false;
mapping (address => bool) public whitelisted;
/**
* Change whitelisting status on or off
*
* When whitelisting is true, then crowdsale will only accept investors who are whitelisted.
*/
function changeWhitelistingStatus() onlyOwner public{
}
/**
* Whitelist any user address - only Owner can do this
*
* It will add user address in whitelisted mapping
*/
function whitelistUser(address userAddress) onlyOwner public{
}
/**
* Whitelist Many user address at once - only Owner can do this
* It will require maximum of 150 addresses to prevent block gas limit max-out and DoS attack
* It will add user address in whitelisted mapping
*/
function whitelistManyUsers(address[] userAddresses) onlyOwner public{
require(whitelistingStatus == true);
uint256 addressCount = userAddresses.length;
require(addressCount <= 150);
for(uint256 i = 0; i < addressCount; i++){
require(<FILL_ME>)
whitelisted[userAddresses[i]] = true;
}
}
/********************************/
/* Code for the ERC20 KEW Token */
/********************************/
/* Public variables of the token */
string private tokenName = "KewCover";
string private tokenSymbol = "KEW";
uint256 private initialSupply = 500000000; // 500 Million
uint256 private allocatedForICO = 350000000; // 350 Million
/* Records for the fronzen accounts */
mapping (address => bool) public frozenAccount;
/* This generates a public event on the blockchain that will notify clients */
event FrozenFunds(address target, bool frozen);
/* Initializes contract with initial supply tokens to the creator of the contract */
constructor () TokenERC20(initialSupply, allocatedForICO, tokenName, tokenSymbol) public {}
/* Internal transfer, only can be called by this contract */
function _transfer(address _from, address _to, uint _value) internal {
}
/// @notice Create `mintedAmount` tokens and send it to `target`
/// @param target Address to receive the tokens
/// @param mintedAmount the amount of tokens it will receive
function mintToken(address target, uint256 mintedAmount) onlyOwner public {
}
/// @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens
/// @param target Address to be frozen
/// @param freeze either to freeze it or not
function freezeAccount(address target, bool freeze) onlyOwner public {
}
/******************************/
/* Code for the Crowdsale */
/******************************/
/* TECHNICAL SPECIFICATIONS:
=> ICO starts : Will be specified by owner
=> ICO Ends : Will be specified by owner
=> Token Exchange Rate : 1 ETH = 40,000 Tokens
=> Bonus : 25%
=> Coins reserved for ICO : 350,000,000 (350 Million)
=> Contribution Limits : No minimum or maximum Contribution
=> Ether Withdrawal : Ether can only be transfered after ICO is over
*/
//public variables for the Crowdsale
uint256 public icoStartDate = 123 ; // ICO start timestamp will be updated by owner after contract deployment
uint256 public icoEndDate = 999999999999; // ICO end timestamp will be updated by owner after contract deployment
uint256 public exchangeRate = 50000; // 1 ETH = 50,000 Tokens
uint256 public tokensSold = 0; // How many tokens sold through crowdsale
uint256 public purchaseBonus = 25; // Purchase Bonus purcentage - 25%
//@dev fallback function, only accepts ether if pre-sale or ICO is running or Reject
function () payable external {
}
//calculating purchase bonus
//SafeMath library is not used here at some places intentionally, as overflow is impossible here
//And thus it saves gas cost if we avoid using SafeMath in such cases
function calculatePurchaseBonus(uint256 token) internal view returns(uint256){
}
//Function to update an ICO parameter.
//It requires: timestamp of start and end date, exchange rate (1 ETH = ? Tokens)
//Owner need to make sure the contract has enough tokens for ICO.
//If not enough, then he needs to transfer some tokens into contract addresss from his wallet
//If there are no tokens in smart contract address, then ICO will not work.
function updateCrowdsale(uint256 icoStartDateNew, uint256 icoEndDateNew, uint256 exchangeRateNew) onlyOwner public {
}
//Stops an ICO.
//It will just set the ICO end date to zero and thus it will stop an ICO
function stopICO() onlyOwner public{
}
//function to check wheter ICO is running or not.
//It will return current state of the crowdsale
function icoStatus() public view returns(string){
}
//Function to set ICO Exchange rate.
//1 ETH = How many Tokens ?
function setICOExchangeRate(uint256 newExchangeRate) onlyOwner public {
}
//Function to update ICO Purchase Bonus.
//Enter percentage of the bonus. eg, 25 for 25% bonus
function updatePurchaseBonus(uint256 newPurchaseBonus) onlyOwner public {
}
//Just in case, owner wants to transfer Tokens from contract to owner address
function manualWithdrawToken(uint256 _amount) onlyOwner public {
}
//When owner wants to transfer Ether from contract to owner address
//ICO must be over in order to do the ether transfer
//Entire Ether balance will be transfered to owner address
function manualWithdrawEther() onlyOwner public{
}
//selfdestruct function. just in case owner decided to destruct this contract.
function destructContract() onlyOwner public{
}
/**
* Change safeguard status on or off
*
* When safeguard is true, then all the non-owner functions will stop working.
* When safeguard is false, then all the functions will resume working back again!
*/
function changeSafeguardStatus() onlyOwner public{
}
/********************************/
/* Code for the Air drop of KEW */
/********************************/
/**
* Run an Air-Drop
*
* It requires an array of all the addresses and amount of tokens to distribute
* It will only process first 150 recipients. That limit is fixed to prevent gas limit
*/
function airdrop(address[] recipients,uint tokenAmount) public onlyOwner {
}
}
| userAddresses[i]!=0x0 | 42,363 | userAddresses[i]!=0x0 |
"TICKET CANCELED" | /// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./Balladr.sol";
import "../node_modules/@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol";
import "../node_modules/@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
struct Ticket {
// Ticket ID issued by backend
bytes32 ticketId;
// Token ID to mint
uint256 tokenId;
// Price for each token in wei
uint256 price;
// Max supply
uint256 supply;
// Uri of the token
string uri;
// Original creator of the token
address payable minter;
// minting only available after this date (timestamp in second)
uint256 availableAfter;
// minting only available after this date (timestamp in second)
uint256 availableBefore;
// Signature issued by backend
bytes signature;
// fees amount in wei for each token
uint256 fees;
// if true, then the tokenUri cannot be modified
bool isFrozen;
// id of the collection
uint256 collectionId;
// Number signed by original creator
uint256 requestId;
// Signature of original creator
bytes requestSignature;
}
contract BalladrMinter is EIP712 {
// Owner of the contract
address payable public owner;
// This contract will manage the ERC1155 contract
Balladr private ERC_target;
// Address of the backend ticket signer
address private signer;
// Signature domain
string private constant SIGNING_DOMAIN = "Balladr";
// Signature version
string private constant SIGNATURE_VERSION = "1";
// List of canceled tickets
mapping(bytes32 => bool) private ticketCanceled;
/**
* @notice Only the contract owner or token creator can use the modified function
*/
modifier onlyOwnerOrCreator(uint256 _tokenId) {
}
/**
* @notice Only the contract owner or collection owner can use the modified function
*/
modifier onlyOwnerOrCollectionCreator(uint256 _collectionId) {
}
/**
* @notice Cancel a ticket. Minting with a canceled ticketId will be forbidden
*/
function cancelTicket(Ticket calldata ticket) public {
}
/**
* @notice Withdraw fund for Contract owner
*/
function withdraw(uint256 amount) public payable {
}
/**
* @notice Freeze tokenUri
* Logic can be found in ERC1155 contract
*/
function freezeTokenUri(uint256 _tokenId) public onlyOwnerOrCreator(_tokenId) {
}
/**
* @notice Set the Uri for a given token
* Logic can be found in ERC1155 contract
*/
function setTokenUri(uint256 _tokenId, string memory _uri) public onlyOwnerOrCreator(_tokenId) {
}
/**
* @notice Close a collection
* Logic can be found in ERC1155 contract
*/
function closeCollection(uint256 _collectionId) public onlyOwnerOrCollectionCreator(_collectionId) {
}
/**
* @notice Update Collection Owner
* Logic can be found in ERC1155 contract
*/
function setCollectionOwner(uint256 _collectionId, address newOwner) public onlyOwnerOrCollectionCreator(_collectionId) {
}
/**
* @notice Set Collection Alternative Payment Address
* Logic can be found in ERC1155 contract
*/
function setCollectionPaymentAddress(uint256 _collectionId, address _paymentAddress) public onlyOwnerOrCollectionCreator(_collectionId) {
}
/**
* @notice Set Collection Custom Royalties
* Logic can be found in ERC1155 contract
*/
function setCollectionCustomRoyalties(uint256 _collectionId, uint256 _royalties) public onlyOwnerOrCollectionCreator(_collectionId) {
}
/**
* @notice Mint with a ticket issued by Balladr's backend
*/
function mint(
// Ticket
Ticket calldata ticket,
// Amount of tokens to mint
uint256 amount,
// Address that will receive the token
address to
) public payable {
// Verify if backend signature is right
address _signer = _verifyTicket(ticket);
require(_signer == signer, "BAD TICKET");
// Verify if original creator signature is right
address _sellerSigner = _verifyRequestId(ticket);
require(_sellerSigner == ticket.minter, "BAD SELLER TICKET");
// Verify if ticket has been canceled
require(<FILL_ME>)
// Verify if enough eth were sent
require(msg.value >= (ticket.price * amount), "BAD PRICE");
// Verify if token availability dates are correct
require(block.timestamp >= ticket.availableAfter, "NOT FOR SALE YET");
require(block.timestamp <= ticket.availableBefore, "SALE OVER");
// Use the mintWrapper to mint token
ERC_target.mintWrapper(
ticket.minter,
to,
ticket.tokenId,
amount,
ticket.uri,
ticket.supply,
ticket.isFrozen,
ticket.collectionId,
""
);
/// Transfer fund to the creator of the token
ticket.minter.transfer((ticket.price - ticket.fees) * amount);
}
/**
* @notice Verify the EIP712 signature issued by the creator of the token
*/
function _verifyRequestId(Ticket calldata ticket)
internal
view
returns (address)
{
}
/**
* @notice Hash the EIP712 signature issued by the creator of the token
*/
function _hashrequestId(Ticket calldata ticket)
internal
view
returns (bytes32)
{
}
/**
* @notice Verify the EIP712 signature issued by Balladr's backend
*/
function _verifyTicket(Ticket calldata ticket)
internal
view
returns (address)
{
}
/**
* @notice Hash the EIP712 signature issued by Balladr's backend
*/
function _hashTicket(Ticket calldata ticket)
internal
view
returns (bytes32)
{
}
/**
* @notice Set a new owner for the Minter contract
*/
function setOwner(address payable _owner) public {
}
/**
* @notice Set a new back signer for this contract
*/
function setSigner(address payable _signer) public {
}
constructor(address _contractTarget, address _signer)
EIP712(SIGNING_DOMAIN, SIGNATURE_VERSION)
{
}
}
| ticketCanceled[ticket.ticketId]==false,"TICKET CANCELED" | 42,384 | ticketCanceled[ticket.ticketId]==false |
"BAD PRICE" | /// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./Balladr.sol";
import "../node_modules/@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol";
import "../node_modules/@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
struct Ticket {
// Ticket ID issued by backend
bytes32 ticketId;
// Token ID to mint
uint256 tokenId;
// Price for each token in wei
uint256 price;
// Max supply
uint256 supply;
// Uri of the token
string uri;
// Original creator of the token
address payable minter;
// minting only available after this date (timestamp in second)
uint256 availableAfter;
// minting only available after this date (timestamp in second)
uint256 availableBefore;
// Signature issued by backend
bytes signature;
// fees amount in wei for each token
uint256 fees;
// if true, then the tokenUri cannot be modified
bool isFrozen;
// id of the collection
uint256 collectionId;
// Number signed by original creator
uint256 requestId;
// Signature of original creator
bytes requestSignature;
}
contract BalladrMinter is EIP712 {
// Owner of the contract
address payable public owner;
// This contract will manage the ERC1155 contract
Balladr private ERC_target;
// Address of the backend ticket signer
address private signer;
// Signature domain
string private constant SIGNING_DOMAIN = "Balladr";
// Signature version
string private constant SIGNATURE_VERSION = "1";
// List of canceled tickets
mapping(bytes32 => bool) private ticketCanceled;
/**
* @notice Only the contract owner or token creator can use the modified function
*/
modifier onlyOwnerOrCreator(uint256 _tokenId) {
}
/**
* @notice Only the contract owner or collection owner can use the modified function
*/
modifier onlyOwnerOrCollectionCreator(uint256 _collectionId) {
}
/**
* @notice Cancel a ticket. Minting with a canceled ticketId will be forbidden
*/
function cancelTicket(Ticket calldata ticket) public {
}
/**
* @notice Withdraw fund for Contract owner
*/
function withdraw(uint256 amount) public payable {
}
/**
* @notice Freeze tokenUri
* Logic can be found in ERC1155 contract
*/
function freezeTokenUri(uint256 _tokenId) public onlyOwnerOrCreator(_tokenId) {
}
/**
* @notice Set the Uri for a given token
* Logic can be found in ERC1155 contract
*/
function setTokenUri(uint256 _tokenId, string memory _uri) public onlyOwnerOrCreator(_tokenId) {
}
/**
* @notice Close a collection
* Logic can be found in ERC1155 contract
*/
function closeCollection(uint256 _collectionId) public onlyOwnerOrCollectionCreator(_collectionId) {
}
/**
* @notice Update Collection Owner
* Logic can be found in ERC1155 contract
*/
function setCollectionOwner(uint256 _collectionId, address newOwner) public onlyOwnerOrCollectionCreator(_collectionId) {
}
/**
* @notice Set Collection Alternative Payment Address
* Logic can be found in ERC1155 contract
*/
function setCollectionPaymentAddress(uint256 _collectionId, address _paymentAddress) public onlyOwnerOrCollectionCreator(_collectionId) {
}
/**
* @notice Set Collection Custom Royalties
* Logic can be found in ERC1155 contract
*/
function setCollectionCustomRoyalties(uint256 _collectionId, uint256 _royalties) public onlyOwnerOrCollectionCreator(_collectionId) {
}
/**
* @notice Mint with a ticket issued by Balladr's backend
*/
function mint(
// Ticket
Ticket calldata ticket,
// Amount of tokens to mint
uint256 amount,
// Address that will receive the token
address to
) public payable {
// Verify if backend signature is right
address _signer = _verifyTicket(ticket);
require(_signer == signer, "BAD TICKET");
// Verify if original creator signature is right
address _sellerSigner = _verifyRequestId(ticket);
require(_sellerSigner == ticket.minter, "BAD SELLER TICKET");
// Verify if ticket has been canceled
require(ticketCanceled[ticket.ticketId] == false, "TICKET CANCELED");
// Verify if enough eth were sent
require(<FILL_ME>)
// Verify if token availability dates are correct
require(block.timestamp >= ticket.availableAfter, "NOT FOR SALE YET");
require(block.timestamp <= ticket.availableBefore, "SALE OVER");
// Use the mintWrapper to mint token
ERC_target.mintWrapper(
ticket.minter,
to,
ticket.tokenId,
amount,
ticket.uri,
ticket.supply,
ticket.isFrozen,
ticket.collectionId,
""
);
/// Transfer fund to the creator of the token
ticket.minter.transfer((ticket.price - ticket.fees) * amount);
}
/**
* @notice Verify the EIP712 signature issued by the creator of the token
*/
function _verifyRequestId(Ticket calldata ticket)
internal
view
returns (address)
{
}
/**
* @notice Hash the EIP712 signature issued by the creator of the token
*/
function _hashrequestId(Ticket calldata ticket)
internal
view
returns (bytes32)
{
}
/**
* @notice Verify the EIP712 signature issued by Balladr's backend
*/
function _verifyTicket(Ticket calldata ticket)
internal
view
returns (address)
{
}
/**
* @notice Hash the EIP712 signature issued by Balladr's backend
*/
function _hashTicket(Ticket calldata ticket)
internal
view
returns (bytes32)
{
}
/**
* @notice Set a new owner for the Minter contract
*/
function setOwner(address payable _owner) public {
}
/**
* @notice Set a new back signer for this contract
*/
function setSigner(address payable _signer) public {
}
constructor(address _contractTarget, address _signer)
EIP712(SIGNING_DOMAIN, SIGNATURE_VERSION)
{
}
}
| msg.value>=(ticket.price*amount),"BAD PRICE" | 42,384 | msg.value>=(ticket.price*amount) |
"Contract reached the max balance allowed" | // SPDX-License-Identifier: MIT
pragma solidity 0.7.3;
contract BridgeDeposit {
address private owner;
uint256 private maxDepositAmount;
uint256 private maxBalance;
bool private canReceiveDeposit;
constructor(
uint256 _maxDepositAmount,
uint256 _maxBalance,
bool _canReceiveDeposit
) {
}
// Send the contract's balance to the owner
function withdrawBalance() public isOwner {
}
function destroy() public isOwner {
}
// Receive function which reverts if amount > maxDepositAmount and canReceiveDeposit = false
receive() external payable isLowerThanMaxDepositAmount canReceive isLowerThanMaxBalance {
}
// Setters
function setMaxAmount(uint256 _maxDepositAmount) public isOwner {
}
function setOwner(address newOwner) public isOwner {
}
function setCanReceiveDeposit(bool _canReceiveDeposit) public isOwner {
}
function setMaxBalance(uint256 _maxBalance) public isOwner {
}
// Getters
function getMaxDepositAmount() external view returns (uint256) {
}
function getMaxBalance() external view returns (uint256) {
}
function getOwner() external view returns (address) {
}
function getCanReceiveDeposit() external view returns (bool) {
}
// Modifiers
modifier isLowerThanMaxDepositAmount() {
}
modifier isOwner() {
}
modifier canReceive() {
}
modifier isLowerThanMaxBalance() {
require(<FILL_ME>)
_;
}
// Events
event OwnerSet(address indexed oldOwner, address indexed newOwner);
event MaxDepositAmountSet(uint256 previousAmount, uint256 newAmount);
event CanReceiveDepositSet(bool canReceiveDeposit);
event MaxBalanceSet(uint256 previousBalance, uint256 newBalance);
event BalanceWithdrawn(address indexed owner, uint256 balance);
event EtherReceived(address indexed emitter, uint256 amount);
event Destructed(address indexed owner, uint256 amount);
}
| address(this).balance<=maxBalance,"Contract reached the max balance allowed" | 42,504 | address(this).balance<=maxBalance |
"RarityRegisterAdminAccessControl: Only rarity manager role" | pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/AccessControlEnumerable.sol";
contract RarityRegisterAdminAccessControl is AccessControlEnumerable {
bytes32 public constant RARITY_MANAGER_ROLE = keccak256("RARITY_MANAGER_ROLE");
address public managerOf;
event RarityRegisterManagerAdded(address indexed account, address managerOf);
event RarityRegisterManagerRemoved(address indexed account, address managerOf);
event RarityManagerAdded(address indexed account, address managerOf);
event RarityManagerRemoved(address indexed account, address managerOf);
/**
* @dev Constructor Add the given account both as the main Admin of the smart contract and a checkpoint admin
* @param owner The account that will be added as owner
*/
constructor (address owner, address _managerOf) {
}
modifier onlyAdmin() {
}
modifier onlyRarityManager() {
require(<FILL_ME>)
_;
}
/**
* @dev checks if the given account is a prizeManager
* @param account The account that will be checked
*/
function isRarityManager(address account) public view returns (bool) {
}
/**
* @dev Adds a new account to the prizeManager role
* @param account The account that will have the prizeManager role
*/
function addRarityManager(address account) public onlyAdmin virtual {
}
/**
* @dev Removes the sender from the list the prizeManager role
*/
function renounceRarityManager() public {
}
/**
* @dev Removes the given account from the prizeManager role, if msg.sender is admin
* @param prizeManager The account that will have the prizeManager role removed
*/
function removeRarityManager(address prizeManager) onlyAdmin public {
}
}
| hasRole(RARITY_MANAGER_ROLE,msg.sender),"RarityRegisterAdminAccessControl: Only rarity manager role" | 42,592 | hasRole(RARITY_MANAGER_ROLE,msg.sender) |
"Contract sealed." | //SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;
import "hardhat/console.sol";
import "./PublicCryptopunksData.sol";
import "./IOtherPunksConfiguration.sol";
import "./ERC721.sol";
import "./Ownable.sol";
contract OtherPunks is ERC721, Ownable {
event BurnOriginalPunk (
uint16 originalPunkId
);
PublicCryptopunksData public punksData;
IOtherPunksConfiguration public otherPunksConfiguration;
bool public contractSealed = false;
// Punks
uint256 public constant firstPunkId = 10000;
uint256 public nextPunkId = firstPunkId;
mapping(uint256 => uint96) public punkIdToAssets;
mapping(uint96 => uint256) public punkAssetsToId;
mapping(uint96 => bool) public blockedAssets;
// Mining
uint88 public difficultyTarget = 0;
uint32 public numMined = 0;
uint96 public lastMinedPunkAssets = 0x0;
// Base
uint16 public constant baseRangeMax = 9997;
uint16[][] public baseRanges;
uint256 public constant baseMask = 0xffff << 240;
uint8 public constant baseShift = 240;
mapping(uint8 => uint8) public baseToGender;
// Slots
uint16[][] public genderToSlotMaxes;
uint16[][][][] public genderToSlotToAttributeRanges;
uint256[] public slotMasks;
uint16[] public slotShifts;
// Misc
mapping(uint8 => bool) public disallowedOnAlienOrApe;
modifier unsealed() {
require(<FILL_ME>)
_;
}
modifier mustBeSealed() {
}
constructor(
PublicCryptopunksData _punksData,
IOtherPunksConfiguration _otherPunksConfiguration
) ERC721("OtherPunks", "OPUNKS") Ownable() {
}
/*
When I try to remove this function, only with the optimizer enabled, I get:
CompilerError: Stack too deep when compiling inline assembly: Variable tail is 3 slot(s) too deep inside the stack.
Error HH600: Compilation failed
*/
function getSlotShifts() public view returns (uint16[] memory) {
}
function _baseURI() internal pure override returns (string memory) {
}
function seedToPunkAssets(uint256 seed) external view returns (uint96) {
}
function render(uint256 punkId) public view returns (bytes memory) {
}
function renderSvg(uint256 punkId) public view returns (string memory) {
}
function isValidNonce(uint256 nonce) public view returns (bool) {
}
// Non-view functions
function addAttributeRanges(
uint16[] memory slotMaxes,
uint16[][][] memory slotRanges
) external onlyOwner unsealed {
}
function mint(uint256 _nonce) external mustBeSealed {
}
function removeTrainingWheels() public {
}
function blockUnminedOriginalPunk(
uint96 punkAssets,
uint16 originalPunkIndex
) public {
}
function burnAlreadyMinedOriginalPunk(
uint256 punkId,
uint16 originalPunkIndex
) public {
}
}
| !contractSealed,"Contract sealed." | 42,606 | !contractSealed |
"PunkId does not exist." | //SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;
import "hardhat/console.sol";
import "./PublicCryptopunksData.sol";
import "./IOtherPunksConfiguration.sol";
import "./ERC721.sol";
import "./Ownable.sol";
contract OtherPunks is ERC721, Ownable {
event BurnOriginalPunk (
uint16 originalPunkId
);
PublicCryptopunksData public punksData;
IOtherPunksConfiguration public otherPunksConfiguration;
bool public contractSealed = false;
// Punks
uint256 public constant firstPunkId = 10000;
uint256 public nextPunkId = firstPunkId;
mapping(uint256 => uint96) public punkIdToAssets;
mapping(uint96 => uint256) public punkAssetsToId;
mapping(uint96 => bool) public blockedAssets;
// Mining
uint88 public difficultyTarget = 0;
uint32 public numMined = 0;
uint96 public lastMinedPunkAssets = 0x0;
// Base
uint16 public constant baseRangeMax = 9997;
uint16[][] public baseRanges;
uint256 public constant baseMask = 0xffff << 240;
uint8 public constant baseShift = 240;
mapping(uint8 => uint8) public baseToGender;
// Slots
uint16[][] public genderToSlotMaxes;
uint16[][][][] public genderToSlotToAttributeRanges;
uint256[] public slotMasks;
uint16[] public slotShifts;
// Misc
mapping(uint8 => bool) public disallowedOnAlienOrApe;
modifier unsealed() {
}
modifier mustBeSealed() {
}
constructor(
PublicCryptopunksData _punksData,
IOtherPunksConfiguration _otherPunksConfiguration
) ERC721("OtherPunks", "OPUNKS") Ownable() {
}
/*
When I try to remove this function, only with the optimizer enabled, I get:
CompilerError: Stack too deep when compiling inline assembly: Variable tail is 3 slot(s) too deep inside the stack.
Error HH600: Compilation failed
*/
function getSlotShifts() public view returns (uint16[] memory) {
}
function _baseURI() internal pure override returns (string memory) {
}
function seedToPunkAssets(uint256 seed) external view returns (uint96) {
}
function render(uint256 punkId) public view returns (bytes memory) {
require(<FILL_ME>)
return punksData.render(punkIdToAssets[punkId]);
}
function renderSvg(uint256 punkId) public view returns (string memory) {
}
function isValidNonce(uint256 nonce) public view returns (bool) {
}
// Non-view functions
function addAttributeRanges(
uint16[] memory slotMaxes,
uint16[][][] memory slotRanges
) external onlyOwner unsealed {
}
function mint(uint256 _nonce) external mustBeSealed {
}
function removeTrainingWheels() public {
}
function blockUnminedOriginalPunk(
uint96 punkAssets,
uint16 originalPunkIndex
) public {
}
function burnAlreadyMinedOriginalPunk(
uint256 punkId,
uint16 originalPunkIndex
) public {
}
}
| ERC721._exists(punkId),"PunkId does not exist." | 42,606 | ERC721._exists(punkId) |
null | //SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;
import "hardhat/console.sol";
import "./PublicCryptopunksData.sol";
import "./IOtherPunksConfiguration.sol";
import "./ERC721.sol";
import "./Ownable.sol";
contract OtherPunks is ERC721, Ownable {
event BurnOriginalPunk (
uint16 originalPunkId
);
PublicCryptopunksData public punksData;
IOtherPunksConfiguration public otherPunksConfiguration;
bool public contractSealed = false;
// Punks
uint256 public constant firstPunkId = 10000;
uint256 public nextPunkId = firstPunkId;
mapping(uint256 => uint96) public punkIdToAssets;
mapping(uint96 => uint256) public punkAssetsToId;
mapping(uint96 => bool) public blockedAssets;
// Mining
uint88 public difficultyTarget = 0;
uint32 public numMined = 0;
uint96 public lastMinedPunkAssets = 0x0;
// Base
uint16 public constant baseRangeMax = 9997;
uint16[][] public baseRanges;
uint256 public constant baseMask = 0xffff << 240;
uint8 public constant baseShift = 240;
mapping(uint8 => uint8) public baseToGender;
// Slots
uint16[][] public genderToSlotMaxes;
uint16[][][][] public genderToSlotToAttributeRanges;
uint256[] public slotMasks;
uint16[] public slotShifts;
// Misc
mapping(uint8 => bool) public disallowedOnAlienOrApe;
modifier unsealed() {
}
modifier mustBeSealed() {
}
constructor(
PublicCryptopunksData _punksData,
IOtherPunksConfiguration _otherPunksConfiguration
) ERC721("OtherPunks", "OPUNKS") Ownable() {
}
/*
When I try to remove this function, only with the optimizer enabled, I get:
CompilerError: Stack too deep when compiling inline assembly: Variable tail is 3 slot(s) too deep inside the stack.
Error HH600: Compilation failed
*/
function getSlotShifts() public view returns (uint16[] memory) {
}
function _baseURI() internal pure override returns (string memory) {
}
function seedToPunkAssets(uint256 seed) external view returns (uint96) {
}
function render(uint256 punkId) public view returns (bytes memory) {
}
function renderSvg(uint256 punkId) public view returns (string memory) {
}
function isValidNonce(uint256 nonce) public view returns (bool) {
}
// Non-view functions
function addAttributeRanges(
uint16[] memory slotMaxes,
uint16[][][] memory slotRanges
) external onlyOwner unsealed {
}
function mint(uint256 _nonce) external mustBeSealed {
}
function removeTrainingWheels() public {
require(<FILL_ME>)
difficultyTarget = otherPunksConfiguration.getHardDifficultyTarget();
}
function blockUnminedOriginalPunk(
uint96 punkAssets,
uint16 originalPunkIndex
) public {
}
function burnAlreadyMinedOriginalPunk(
uint256 punkId,
uint16 originalPunkIndex
) public {
}
}
| otherPunksConfiguration.getBlockNumber()>=otherPunksConfiguration.getHardDifficultyBlockNumberDeadline()&&difficultyTarget>otherPunksConfiguration.getHardDifficultyTarget() | 42,606 | otherPunksConfiguration.getBlockNumber()>=otherPunksConfiguration.getHardDifficultyBlockNumberDeadline()&&difficultyTarget>otherPunksConfiguration.getHardDifficultyTarget() |
null | //SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;
import "hardhat/console.sol";
import "./PublicCryptopunksData.sol";
import "./IOtherPunksConfiguration.sol";
import "./ERC721.sol";
import "./Ownable.sol";
contract OtherPunks is ERC721, Ownable {
event BurnOriginalPunk (
uint16 originalPunkId
);
PublicCryptopunksData public punksData;
IOtherPunksConfiguration public otherPunksConfiguration;
bool public contractSealed = false;
// Punks
uint256 public constant firstPunkId = 10000;
uint256 public nextPunkId = firstPunkId;
mapping(uint256 => uint96) public punkIdToAssets;
mapping(uint96 => uint256) public punkAssetsToId;
mapping(uint96 => bool) public blockedAssets;
// Mining
uint88 public difficultyTarget = 0;
uint32 public numMined = 0;
uint96 public lastMinedPunkAssets = 0x0;
// Base
uint16 public constant baseRangeMax = 9997;
uint16[][] public baseRanges;
uint256 public constant baseMask = 0xffff << 240;
uint8 public constant baseShift = 240;
mapping(uint8 => uint8) public baseToGender;
// Slots
uint16[][] public genderToSlotMaxes;
uint16[][][][] public genderToSlotToAttributeRanges;
uint256[] public slotMasks;
uint16[] public slotShifts;
// Misc
mapping(uint8 => bool) public disallowedOnAlienOrApe;
modifier unsealed() {
}
modifier mustBeSealed() {
}
constructor(
PublicCryptopunksData _punksData,
IOtherPunksConfiguration _otherPunksConfiguration
) ERC721("OtherPunks", "OPUNKS") Ownable() {
}
/*
When I try to remove this function, only with the optimizer enabled, I get:
CompilerError: Stack too deep when compiling inline assembly: Variable tail is 3 slot(s) too deep inside the stack.
Error HH600: Compilation failed
*/
function getSlotShifts() public view returns (uint16[] memory) {
}
function _baseURI() internal pure override returns (string memory) {
}
function seedToPunkAssets(uint256 seed) external view returns (uint96) {
}
function render(uint256 punkId) public view returns (bytes memory) {
}
function renderSvg(uint256 punkId) public view returns (string memory) {
}
function isValidNonce(uint256 nonce) public view returns (bool) {
}
// Non-view functions
function addAttributeRanges(
uint16[] memory slotMaxes,
uint16[][][] memory slotRanges
) external onlyOwner unsealed {
}
function mint(uint256 _nonce) external mustBeSealed {
}
function removeTrainingWheels() public {
}
function blockUnminedOriginalPunk(
uint96 punkAssets,
uint16 originalPunkIndex
) public {
require(<FILL_ME>)
require(
punksData.isPackedEqualToOriginalPunkIndex(
punkAssets,
originalPunkIndex
)
);
blockedAssets[punkAssets] = true;
emit BurnOriginalPunk(originalPunkIndex);
}
function burnAlreadyMinedOriginalPunk(
uint256 punkId,
uint16 originalPunkIndex
) public {
}
}
| punkAssetsToId[punkAssets]==0 | 42,606 | punkAssetsToId[punkAssets]==0 |
null | //SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;
import "hardhat/console.sol";
import "./PublicCryptopunksData.sol";
import "./IOtherPunksConfiguration.sol";
import "./ERC721.sol";
import "./Ownable.sol";
contract OtherPunks is ERC721, Ownable {
event BurnOriginalPunk (
uint16 originalPunkId
);
PublicCryptopunksData public punksData;
IOtherPunksConfiguration public otherPunksConfiguration;
bool public contractSealed = false;
// Punks
uint256 public constant firstPunkId = 10000;
uint256 public nextPunkId = firstPunkId;
mapping(uint256 => uint96) public punkIdToAssets;
mapping(uint96 => uint256) public punkAssetsToId;
mapping(uint96 => bool) public blockedAssets;
// Mining
uint88 public difficultyTarget = 0;
uint32 public numMined = 0;
uint96 public lastMinedPunkAssets = 0x0;
// Base
uint16 public constant baseRangeMax = 9997;
uint16[][] public baseRanges;
uint256 public constant baseMask = 0xffff << 240;
uint8 public constant baseShift = 240;
mapping(uint8 => uint8) public baseToGender;
// Slots
uint16[][] public genderToSlotMaxes;
uint16[][][][] public genderToSlotToAttributeRanges;
uint256[] public slotMasks;
uint16[] public slotShifts;
// Misc
mapping(uint8 => bool) public disallowedOnAlienOrApe;
modifier unsealed() {
}
modifier mustBeSealed() {
}
constructor(
PublicCryptopunksData _punksData,
IOtherPunksConfiguration _otherPunksConfiguration
) ERC721("OtherPunks", "OPUNKS") Ownable() {
}
/*
When I try to remove this function, only with the optimizer enabled, I get:
CompilerError: Stack too deep when compiling inline assembly: Variable tail is 3 slot(s) too deep inside the stack.
Error HH600: Compilation failed
*/
function getSlotShifts() public view returns (uint16[] memory) {
}
function _baseURI() internal pure override returns (string memory) {
}
function seedToPunkAssets(uint256 seed) external view returns (uint96) {
}
function render(uint256 punkId) public view returns (bytes memory) {
}
function renderSvg(uint256 punkId) public view returns (string memory) {
}
function isValidNonce(uint256 nonce) public view returns (bool) {
}
// Non-view functions
function addAttributeRanges(
uint16[] memory slotMaxes,
uint16[][][] memory slotRanges
) external onlyOwner unsealed {
}
function mint(uint256 _nonce) external mustBeSealed {
}
function removeTrainingWheels() public {
}
function blockUnminedOriginalPunk(
uint96 punkAssets,
uint16 originalPunkIndex
) public {
require(punkAssetsToId[punkAssets] == 0);
require(<FILL_ME>)
blockedAssets[punkAssets] = true;
emit BurnOriginalPunk(originalPunkIndex);
}
function burnAlreadyMinedOriginalPunk(
uint256 punkId,
uint16 originalPunkIndex
) public {
}
}
| punksData.isPackedEqualToOriginalPunkIndex(punkAssets,originalPunkIndex) | 42,606 | punksData.isPackedEqualToOriginalPunkIndex(punkAssets,originalPunkIndex) |
null | pragma solidity ^0.4.24;
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public constant returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public constant returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) 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 constant returns (uint256 balance) {
}
}
/**
* @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)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amout of tokens to be transfered
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender.
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) 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 specifing the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
}
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
}
/**
* @title Mintable token
* @dev Simple ERC20 Token example, with mintable token creation
* @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120
* Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol
*/
contract MintableToken is StandardToken, Ownable {
event Mint(address indexed to, uint256 amount);
event MintFinished();
bool public mintingFinished = false;
modifier canMint() {
}
/**
* @dev Function to mint tokens
* @param _to The address that will recieve the minted tokens.
* @param _amount The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/
function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
}
/**
* @dev Function to stop minting new tokens.
* @return True if the operation was successful.
*/
function finishMinting() onlyOwner public returns (bool) {
}
}
contract SMAR is MintableToken {
string public constant name = "SmartRetail ICO";
string public constant symbol = "SMAR";
uint32 public constant decimals = 18;
}
contract Crowdsale is Ownable {
using SafeMath for uint;
address public multisig = 0xF15eE43d0345089625050c08b482C3f2285e4F12;
uint dec = 1000000000000000000;
SMAR public token = new SMAR();
uint public icoStartP1 = 1528675200; // GMT: Mon, 11 Jun 2018 00:00:00 GMT
uint public icoStartP2 = 1531267200; // Wed, 11 Jul 2018 00:00:00 GMT
uint public icoStartP3 = 1533945600; // GMT: Sat, 11 Aug 2018 00:00:00 GMT
uint public icoStartP4 = 1536624000; // Tue, 11 Sep 2018 00:00:00 GMT
uint public icoStartP5 = 1539216000; // GMT: Thu, 11 Oct 2018 00:00:00 GMT
uint public icoStartP6 = 1541894400; // GMT: Sun, 11 Nov 2018 00:00:00 GMT
uint public icoEnd = 1544486400; // Tue, 11 Dec 2018 00:00:00 GMT
uint public icoSoftcap = 35000*dec; // 35 000 SMAR
uint public icoHardcap = 1000000*dec; // 1 000 000 SMAR
//----
uint public tokensFor1EthP6 = 50*dec; //0.02 ETH for 1 token
uint public tokensFor1EthP1 = tokensFor1EthP6*125/100; //0,016 ETH for 1 token
uint public tokensFor1EthP2 = tokensFor1EthP6*120/100; //0,01667 ETH for 1 token
uint public tokensFor1EthP3 = tokensFor1EthP6*115/100; //0,01739 ETH for 1 token
uint public tokensFor1EthP4 = tokensFor1EthP6*110/100; //0,01818 ETH for 1 token
uint public tokensFor1EthP5 = tokensFor1EthP6*105/100; //0,01905 ETH for 1 token
//----
mapping(address => uint) public balances;
constructor() public {
}
function refund() public {
require(<FILL_ME>)
uint value = balances[msg.sender];
balances[msg.sender] = 0;
msg.sender.transfer(value);
}
function refundToWallet(address _wallet) public {
}
function withdraw() public onlyOwner {
}
function finishMinting() public onlyOwner {
}
function createTokens() payable public {
}
function() external payable {
}
}
| (now>icoEnd)&&(token.totalSupply()<icoSoftcap) | 42,621 | (now>icoEnd)&&(token.totalSupply()<icoSoftcap) |
null | pragma solidity ^0.4.24;
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public constant returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public constant returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) 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 constant returns (uint256 balance) {
}
}
/**
* @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)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amout of tokens to be transfered
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender.
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) 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 specifing the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
}
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
}
/**
* @title Mintable token
* @dev Simple ERC20 Token example, with mintable token creation
* @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120
* Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol
*/
contract MintableToken is StandardToken, Ownable {
event Mint(address indexed to, uint256 amount);
event MintFinished();
bool public mintingFinished = false;
modifier canMint() {
}
/**
* @dev Function to mint tokens
* @param _to The address that will recieve the minted tokens.
* @param _amount The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/
function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
}
/**
* @dev Function to stop minting new tokens.
* @return True if the operation was successful.
*/
function finishMinting() onlyOwner public returns (bool) {
}
}
contract SMAR is MintableToken {
string public constant name = "SmartRetail ICO";
string public constant symbol = "SMAR";
uint32 public constant decimals = 18;
}
contract Crowdsale is Ownable {
using SafeMath for uint;
address public multisig = 0xF15eE43d0345089625050c08b482C3f2285e4F12;
uint dec = 1000000000000000000;
SMAR public token = new SMAR();
uint public icoStartP1 = 1528675200; // GMT: Mon, 11 Jun 2018 00:00:00 GMT
uint public icoStartP2 = 1531267200; // Wed, 11 Jul 2018 00:00:00 GMT
uint public icoStartP3 = 1533945600; // GMT: Sat, 11 Aug 2018 00:00:00 GMT
uint public icoStartP4 = 1536624000; // Tue, 11 Sep 2018 00:00:00 GMT
uint public icoStartP5 = 1539216000; // GMT: Thu, 11 Oct 2018 00:00:00 GMT
uint public icoStartP6 = 1541894400; // GMT: Sun, 11 Nov 2018 00:00:00 GMT
uint public icoEnd = 1544486400; // Tue, 11 Dec 2018 00:00:00 GMT
uint public icoSoftcap = 35000*dec; // 35 000 SMAR
uint public icoHardcap = 1000000*dec; // 1 000 000 SMAR
//----
uint public tokensFor1EthP6 = 50*dec; //0.02 ETH for 1 token
uint public tokensFor1EthP1 = tokensFor1EthP6*125/100; //0,016 ETH for 1 token
uint public tokensFor1EthP2 = tokensFor1EthP6*120/100; //0,01667 ETH for 1 token
uint public tokensFor1EthP3 = tokensFor1EthP6*115/100; //0,01739 ETH for 1 token
uint public tokensFor1EthP4 = tokensFor1EthP6*110/100; //0,01818 ETH for 1 token
uint public tokensFor1EthP5 = tokensFor1EthP6*105/100; //0,01905 ETH for 1 token
//----
mapping(address => uint) public balances;
constructor() public {
}
function refund() public {
}
function refundToWallet(address _wallet) public {
}
function withdraw() public onlyOwner {
require(<FILL_ME>)
multisig.transfer(address(this).balance);
}
function finishMinting() public onlyOwner {
}
function createTokens() payable public {
}
function() external payable {
}
}
| token.totalSupply()>=icoSoftcap | 42,621 | token.totalSupply()>=icoSoftcap |
null | pragma solidity ^0.4.24;
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public constant returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public constant returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) 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 constant returns (uint256 balance) {
}
}
/**
* @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)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amout of tokens to be transfered
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender.
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) 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 specifing the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
}
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
}
/**
* @title Mintable token
* @dev Simple ERC20 Token example, with mintable token creation
* @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120
* Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol
*/
contract MintableToken is StandardToken, Ownable {
event Mint(address indexed to, uint256 amount);
event MintFinished();
bool public mintingFinished = false;
modifier canMint() {
}
/**
* @dev Function to mint tokens
* @param _to The address that will recieve the minted tokens.
* @param _amount The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/
function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
}
/**
* @dev Function to stop minting new tokens.
* @return True if the operation was successful.
*/
function finishMinting() onlyOwner public returns (bool) {
}
}
contract SMAR is MintableToken {
string public constant name = "SmartRetail ICO";
string public constant symbol = "SMAR";
uint32 public constant decimals = 18;
}
contract Crowdsale is Ownable {
using SafeMath for uint;
address public multisig = 0xF15eE43d0345089625050c08b482C3f2285e4F12;
uint dec = 1000000000000000000;
SMAR public token = new SMAR();
uint public icoStartP1 = 1528675200; // GMT: Mon, 11 Jun 2018 00:00:00 GMT
uint public icoStartP2 = 1531267200; // Wed, 11 Jul 2018 00:00:00 GMT
uint public icoStartP3 = 1533945600; // GMT: Sat, 11 Aug 2018 00:00:00 GMT
uint public icoStartP4 = 1536624000; // Tue, 11 Sep 2018 00:00:00 GMT
uint public icoStartP5 = 1539216000; // GMT: Thu, 11 Oct 2018 00:00:00 GMT
uint public icoStartP6 = 1541894400; // GMT: Sun, 11 Nov 2018 00:00:00 GMT
uint public icoEnd = 1544486400; // Tue, 11 Dec 2018 00:00:00 GMT
uint public icoSoftcap = 35000*dec; // 35 000 SMAR
uint public icoHardcap = 1000000*dec; // 1 000 000 SMAR
//----
uint public tokensFor1EthP6 = 50*dec; //0.02 ETH for 1 token
uint public tokensFor1EthP1 = tokensFor1EthP6*125/100; //0,016 ETH for 1 token
uint public tokensFor1EthP2 = tokensFor1EthP6*120/100; //0,01667 ETH for 1 token
uint public tokensFor1EthP3 = tokensFor1EthP6*115/100; //0,01739 ETH for 1 token
uint public tokensFor1EthP4 = tokensFor1EthP6*110/100; //0,01818 ETH for 1 token
uint public tokensFor1EthP5 = tokensFor1EthP6*105/100; //0,01905 ETH for 1 token
//----
mapping(address => uint) public balances;
constructor() public {
}
function refund() public {
}
function refundToWallet(address _wallet) public {
}
function withdraw() public onlyOwner {
}
function finishMinting() public onlyOwner {
}
function createTokens() payable public {
require(<FILL_ME>)
require(token.totalSupply()<icoHardcap);
uint tokens = 0;
uint sum = msg.value;
uint tokensFor1EthCurr = tokensFor1EthP6;
uint rest = 0;
if(now < icoStartP2) {
tokensFor1EthCurr = tokensFor1EthP1;
} else if(now >= icoStartP2 && now < icoStartP3) {
tokensFor1EthCurr = tokensFor1EthP2;
} else if(now >= icoStartP3 && now < icoStartP4) {
tokensFor1EthCurr = tokensFor1EthP3;
} else if(now >= icoStartP4 && now < icoStartP5) {
tokensFor1EthCurr = tokensFor1EthP4;
} else if(now >= icoStartP5 && now < icoStartP6) {
tokensFor1EthCurr = tokensFor1EthP5;
}
tokens = sum.mul(tokensFor1EthCurr).div(1000000000000000000);
if(token.totalSupply().add(tokens) > icoHardcap){
tokens = icoHardcap.sub(token.totalSupply());
rest = sum.sub(tokens.mul(1000000000000000000).div(tokensFor1EthCurr));
}
token.mint(msg.sender, tokens);
if(rest!=0){
msg.sender.transfer(rest);
}
balances[msg.sender] = balances[msg.sender].add(sum.sub(rest));
if(token.totalSupply()>=icoSoftcap){
multisig.transfer(address(this).balance);
}
}
function() external payable {
}
}
| (now>=icoStartP1)&&(now<icoEnd) | 42,621 | (now>=icoStartP1)&&(now<icoEnd) |
null | pragma solidity ^0.4.24;
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public constant returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public constant returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) 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 constant returns (uint256 balance) {
}
}
/**
* @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)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amout of tokens to be transfered
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender.
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) 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 specifing the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
}
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
}
/**
* @title Mintable token
* @dev Simple ERC20 Token example, with mintable token creation
* @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120
* Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol
*/
contract MintableToken is StandardToken, Ownable {
event Mint(address indexed to, uint256 amount);
event MintFinished();
bool public mintingFinished = false;
modifier canMint() {
}
/**
* @dev Function to mint tokens
* @param _to The address that will recieve the minted tokens.
* @param _amount The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/
function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
}
/**
* @dev Function to stop minting new tokens.
* @return True if the operation was successful.
*/
function finishMinting() onlyOwner public returns (bool) {
}
}
contract SMAR is MintableToken {
string public constant name = "SmartRetail ICO";
string public constant symbol = "SMAR";
uint32 public constant decimals = 18;
}
contract Crowdsale is Ownable {
using SafeMath for uint;
address public multisig = 0xF15eE43d0345089625050c08b482C3f2285e4F12;
uint dec = 1000000000000000000;
SMAR public token = new SMAR();
uint public icoStartP1 = 1528675200; // GMT: Mon, 11 Jun 2018 00:00:00 GMT
uint public icoStartP2 = 1531267200; // Wed, 11 Jul 2018 00:00:00 GMT
uint public icoStartP3 = 1533945600; // GMT: Sat, 11 Aug 2018 00:00:00 GMT
uint public icoStartP4 = 1536624000; // Tue, 11 Sep 2018 00:00:00 GMT
uint public icoStartP5 = 1539216000; // GMT: Thu, 11 Oct 2018 00:00:00 GMT
uint public icoStartP6 = 1541894400; // GMT: Sun, 11 Nov 2018 00:00:00 GMT
uint public icoEnd = 1544486400; // Tue, 11 Dec 2018 00:00:00 GMT
uint public icoSoftcap = 35000*dec; // 35 000 SMAR
uint public icoHardcap = 1000000*dec; // 1 000 000 SMAR
//----
uint public tokensFor1EthP6 = 50*dec; //0.02 ETH for 1 token
uint public tokensFor1EthP1 = tokensFor1EthP6*125/100; //0,016 ETH for 1 token
uint public tokensFor1EthP2 = tokensFor1EthP6*120/100; //0,01667 ETH for 1 token
uint public tokensFor1EthP3 = tokensFor1EthP6*115/100; //0,01739 ETH for 1 token
uint public tokensFor1EthP4 = tokensFor1EthP6*110/100; //0,01818 ETH for 1 token
uint public tokensFor1EthP5 = tokensFor1EthP6*105/100; //0,01905 ETH for 1 token
//----
mapping(address => uint) public balances;
constructor() public {
}
function refund() public {
}
function refundToWallet(address _wallet) public {
}
function withdraw() public onlyOwner {
}
function finishMinting() public onlyOwner {
}
function createTokens() payable public {
require( (now>=icoStartP1)&&(now<icoEnd) );
require(<FILL_ME>)
uint tokens = 0;
uint sum = msg.value;
uint tokensFor1EthCurr = tokensFor1EthP6;
uint rest = 0;
if(now < icoStartP2) {
tokensFor1EthCurr = tokensFor1EthP1;
} else if(now >= icoStartP2 && now < icoStartP3) {
tokensFor1EthCurr = tokensFor1EthP2;
} else if(now >= icoStartP3 && now < icoStartP4) {
tokensFor1EthCurr = tokensFor1EthP3;
} else if(now >= icoStartP4 && now < icoStartP5) {
tokensFor1EthCurr = tokensFor1EthP4;
} else if(now >= icoStartP5 && now < icoStartP6) {
tokensFor1EthCurr = tokensFor1EthP5;
}
tokens = sum.mul(tokensFor1EthCurr).div(1000000000000000000);
if(token.totalSupply().add(tokens) > icoHardcap){
tokens = icoHardcap.sub(token.totalSupply());
rest = sum.sub(tokens.mul(1000000000000000000).div(tokensFor1EthCurr));
}
token.mint(msg.sender, tokens);
if(rest!=0){
msg.sender.transfer(rest);
}
balances[msg.sender] = balances[msg.sender].add(sum.sub(rest));
if(token.totalSupply()>=icoSoftcap){
multisig.transfer(address(this).balance);
}
}
function() external payable {
}
}
| token.totalSupply()<icoHardcap | 42,621 | token.totalSupply()<icoHardcap |
"Divisor should not be 0" | // SPDX-License-Identifier: MIT
pragma solidity 0.7.6;
pragma experimental ABIEncoderV2;
import {SafeMath} from "@openzeppelin/contracts/math/SafeMath.sol";
import {Address} from "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@chainlink/contracts/src/v0.6/interfaces/AggregatorV3Interface.sol";
import {IERC20} from "./interfaces/IERC20.sol";
import "./lib/FixedPoint.sol";
import "./interfaces/IEtherCollateral.sol";
/// @author Conjure Finance Team
/// @title Conjure
/// @notice Contract to define and track the price of an arbitrary synth
contract Conjure is IERC20, ReentrancyGuard {
// using Openzeppelin contracts for SafeMath and Address
using SafeMath for uint256;
using Address for address;
using FixedPoint for FixedPoint.uq112x112;
using FixedPoint for FixedPoint.uq144x112;
// presenting the total supply
uint256 internal _totalSupply;
// representing the name of the token
string internal _name;
// representing the symbol of the token
string internal _symbol;
// representing the decimals of the token
uint8 internal constant DECIMALS = 18;
// a record of balance of a specific account by address
mapping(address => uint256) private _balances;
// a record of allowances for a specific address by address to address mapping
mapping(address => mapping(address => uint256)) private _allowances;
// the owner of the contract
address payable public _owner;
// the type of the arb asset (single asset, arb asset)
// 0... single asset (uses median price)
// 1... basket asset (uses weighted average price)
// 2... index asset (uses token address and oracle to get supply and price and calculates supply * price / divisor)
// 3 .. sqrt index asset (uses token address and oracle to get supply and price and calculates sqrt(supply * price) / divisor)
uint256 public _assetType;
// the address of the collateral contract factory
address public _factoryContract;
// the address of the collateral contract
address public _collateralContract;
// struct for oracles
struct _oracleStruct {
address oracleaddress;
address tokenaddress;
// 0... chainLink, 1... UniSwap T-wap, 2... custom
uint256 oracleType;
string signature;
bytes calldatas;
uint256 weight;
uint256 decimals;
uint256 values;
}
// array for oracles
_oracleStruct[] public _oracleData;
// number of oracles
uint256 public _numoracles;
// the latest observed price
uint256 internal _latestobservedprice;
// the latest observed price timestamp
uint256 internal _latestobservedtime;
// the divisor for the index
uint256 public _indexdivisor;
// the modifier if the asset type is an inverse type
bool public _inverse;
// shows the init state of the contract
bool public _inited;
// the modifier if the asset type is an inverse type
uint256 public _deploymentPrice;
// maximum decimal size for the used prices
uint256 private constant MAXIMUM_DECIMALS = 18;
// The number representing 1.0
uint256 private constant UNIT = 10**18;
// chainLink aggregator decimals to give back
uint256 private constant CHAINLINK_RETURN_DECIMALS = 8;
// the eth usd price feed chainLink oracle address
address public ethUsdChainLinkOracle;
// ========== EVENTS ==========
event NewOwner(address newOwner);
event Issued(address indexed account, uint256 value);
event Burned(address indexed account, uint256 value);
event AssetTypeSet(uint256 value);
event IndexDivisorSet(uint256 value);
// only owner modifier
modifier onlyOwner {
}
// only owner view
function _onlyOwner() private view {
}
constructor() {
}
/**
* @dev initializes the clone implementation and the Conjure contract
*
* @param nameSymbol array holding the name and the symbol of the asset
* @param conjureAddresses array holding the owner, indexed UniSwap oracle and ethUsdChainLinkOracle address
* @param factoryAddress_ the address of the factory
* @param collateralContract the EtherCollateral contract of the asset
*/
function initialize(
string[2] memory nameSymbol,
address[] memory conjureAddresses,
address factoryAddress_,
address collateralContract
) external
{
}
/**
* @dev inits the conjure asset can only be called by the factory address
*
* @param inverse_ indicated it the asset is an inverse asset or not
* @param divisorAssetType array containing the divisor and the asset type
* @param oracleAddresses_ the array holding the oracle addresses 1. address to call,
* 2. address of the token for supply if needed
* @param oracleTypesValuesWeightsDecimals array holding the oracle types,values,weights and decimals
* @param signatures_ array holding the oracle signatures
* @param callData_ array holding the oracle callData
*/
function init(
bool inverse_,
uint256[2] memory divisorAssetType,
address[][2] memory oracleAddresses_,
uint256[][4] memory oracleTypesValuesWeightsDecimals,
string[] memory signatures_,
bytes[] memory callData_
) external {
require(msg.sender == _factoryContract, "can only be called by factory contract");
require(_inited == false, "Contract already inited");
require(<FILL_ME>)
_assetType = divisorAssetType[1];
_numoracles = oracleAddresses_[0].length;
_indexdivisor = divisorAssetType[0];
_inverse = inverse_;
emit AssetTypeSet(_assetType);
emit IndexDivisorSet(_indexdivisor);
uint256 weightCheck;
// push the values into the oracle struct for further processing
for (uint i = 0; i < oracleAddresses_[0].length; i++) {
require(oracleTypesValuesWeightsDecimals[3][i] <= 18, "Decimals too high");
_oracleData.push(_oracleStruct({
oracleaddress: oracleAddresses_[0][i],
tokenaddress: oracleAddresses_[1][i],
oracleType: oracleTypesValuesWeightsDecimals[0][i],
signature: signatures_[i],
calldatas: callData_[i],
weight: oracleTypesValuesWeightsDecimals[2][i],
values: oracleTypesValuesWeightsDecimals[1][i],
decimals: oracleTypesValuesWeightsDecimals[3][i]
}));
weightCheck += oracleTypesValuesWeightsDecimals[2][i];
}
// for basket assets weights must add up to 100
if (_assetType == 1) {
require(weightCheck == 100, "Weights not 100");
}
updatePrice();
_deploymentPrice = getLatestPrice();
_inited = true;
}
/**
* @dev lets the EtherCollateral contract instance burn synths
*
* @param account the account address where the synths should be burned to
* @param amount the amount to be burned
*/
function burn(address account, uint amount) external {
}
/**
* @dev lets the EtherCollateral contract instance mint new synths
*
* @param account the account address where the synths should be minted to
* @param amount the amount to be minted
*/
function mint(address account, uint amount) external {
}
/**
* @dev Internal function to mint new synths
*
* @param account the account address where the synths should be minted to
* @param amount the amount to be minted
*/
function _internalIssue(address account, uint amount) internal {
}
/**
* @dev Internal function to burn synths
*
* @param account the account address where the synths should be burned to
* @param amount the amount to be burned
*/
function _internalBurn(address account, uint amount) internal {
}
/**
* @dev lets the owner change the contract owner
*
* @param _newOwner the new owner address of the contract
*/
function changeOwner(address payable _newOwner) external onlyOwner {
}
/**
* @dev lets the owner collect the fees accrued
*/
function collectFees() external onlyOwner {
}
/**
* @dev gets the latest price of an oracle asset
* uses chainLink oracles to get the price
*
* @return the current asset price
*/
function getLatestPrice(AggregatorV3Interface priceFeed) internal view returns (uint) {
}
/**
* @dev gets the latest ETH USD Price from the given oracle
*
* @return the current eth usd price
*/
function getLatestETHUSDPrice() public view returns (uint) {
}
/**
* @dev implementation of a quicksort algorithm
*
* @param arr the array to be sorted
* @param left the left outer bound element to start the sort
* @param right the right outer bound element to stop the sort
*/
function quickSort(uint[] memory arr, int left, int right) internal pure {
}
/**
* @dev implementation to get the average value of an array
*
* @param arr the array to be averaged
* @return the (weighted) average price of an asset
*/
function getAverage(uint[] memory arr) internal view returns (uint) {
}
/**
* @dev sort implementation which calls the quickSort function
*
* @param data the array to be sorted
* @return the sorted array
*/
function sort(uint[] memory data) internal pure returns (uint[] memory) {
}
/**
* @dev implementation of a square rooting algorithm
* babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method)
*
* @param y the value to be square rooted
* @return z the square rooted value
*/
function sqrt(uint256 y) internal pure returns (uint256 z) {
}
/**
* @dev gets the latest recorded price of the synth in USD
*
* @return the last recorded synths price
*/
function getLatestPrice() public view returns (uint) {
}
/**
* @dev gets the latest recorded price time
*
* @return the last recorded time of a synths price
*/
function getLatestPriceTime() external view returns (uint) {
}
/**
* @dev gets the latest price of the synth in USD by calculation and write the checkpoints for view functions
*/
function updatePrice() public {
}
/**
* @dev gets the latest price of the synth in USD by calculation --> internal calculation
*
* @return the current synths price
*/
function updateInternalPrice() internal returns (uint) {
}
/**
* ERC 20 Specific Functions
*/
/**
* receive function to receive funds
*/
receive() external payable {}
/**
* @dev Returns the name of the token.
*/
function name() external override view returns (string memory) {
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() external override view returns (string memory) {
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`.
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() external override pure returns (uint8) {
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() external override view returns (uint256) {
}
/**
* @dev See {IERC20-balanceOf}. Uses burn abstraction for balance updates without gas and universally.
*/
function balanceOf(address account) external override view returns (uint256) {
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address dst, uint256 rawAmount) external override returns (bool) {
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender)
external
override
view
returns (uint256)
{
}
/**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount)
external
override
returns (bool)
{
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20};
*
* Requirements:
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
* - the caller must have allowance for ``sender``'s tokens of at least
* `amount`.
*/
function transferFrom(address src, address dst, uint256 rawAmount) external override returns (bool) {
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
*
* This is internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(
address owner,
address spender,
uint256 amount
)
internal
{
}
function _transfer(
address sender,
address recipient,
uint256 amount
)
internal
{
}
}
| divisorAssetType[0]!=0,"Divisor should not be 0" | 42,624 | divisorAssetType[0]!=0 |
"Decimals too high" | // SPDX-License-Identifier: MIT
pragma solidity 0.7.6;
pragma experimental ABIEncoderV2;
import {SafeMath} from "@openzeppelin/contracts/math/SafeMath.sol";
import {Address} from "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@chainlink/contracts/src/v0.6/interfaces/AggregatorV3Interface.sol";
import {IERC20} from "./interfaces/IERC20.sol";
import "./lib/FixedPoint.sol";
import "./interfaces/IEtherCollateral.sol";
/// @author Conjure Finance Team
/// @title Conjure
/// @notice Contract to define and track the price of an arbitrary synth
contract Conjure is IERC20, ReentrancyGuard {
// using Openzeppelin contracts for SafeMath and Address
using SafeMath for uint256;
using Address for address;
using FixedPoint for FixedPoint.uq112x112;
using FixedPoint for FixedPoint.uq144x112;
// presenting the total supply
uint256 internal _totalSupply;
// representing the name of the token
string internal _name;
// representing the symbol of the token
string internal _symbol;
// representing the decimals of the token
uint8 internal constant DECIMALS = 18;
// a record of balance of a specific account by address
mapping(address => uint256) private _balances;
// a record of allowances for a specific address by address to address mapping
mapping(address => mapping(address => uint256)) private _allowances;
// the owner of the contract
address payable public _owner;
// the type of the arb asset (single asset, arb asset)
// 0... single asset (uses median price)
// 1... basket asset (uses weighted average price)
// 2... index asset (uses token address and oracle to get supply and price and calculates supply * price / divisor)
// 3 .. sqrt index asset (uses token address and oracle to get supply and price and calculates sqrt(supply * price) / divisor)
uint256 public _assetType;
// the address of the collateral contract factory
address public _factoryContract;
// the address of the collateral contract
address public _collateralContract;
// struct for oracles
struct _oracleStruct {
address oracleaddress;
address tokenaddress;
// 0... chainLink, 1... UniSwap T-wap, 2... custom
uint256 oracleType;
string signature;
bytes calldatas;
uint256 weight;
uint256 decimals;
uint256 values;
}
// array for oracles
_oracleStruct[] public _oracleData;
// number of oracles
uint256 public _numoracles;
// the latest observed price
uint256 internal _latestobservedprice;
// the latest observed price timestamp
uint256 internal _latestobservedtime;
// the divisor for the index
uint256 public _indexdivisor;
// the modifier if the asset type is an inverse type
bool public _inverse;
// shows the init state of the contract
bool public _inited;
// the modifier if the asset type is an inverse type
uint256 public _deploymentPrice;
// maximum decimal size for the used prices
uint256 private constant MAXIMUM_DECIMALS = 18;
// The number representing 1.0
uint256 private constant UNIT = 10**18;
// chainLink aggregator decimals to give back
uint256 private constant CHAINLINK_RETURN_DECIMALS = 8;
// the eth usd price feed chainLink oracle address
address public ethUsdChainLinkOracle;
// ========== EVENTS ==========
event NewOwner(address newOwner);
event Issued(address indexed account, uint256 value);
event Burned(address indexed account, uint256 value);
event AssetTypeSet(uint256 value);
event IndexDivisorSet(uint256 value);
// only owner modifier
modifier onlyOwner {
}
// only owner view
function _onlyOwner() private view {
}
constructor() {
}
/**
* @dev initializes the clone implementation and the Conjure contract
*
* @param nameSymbol array holding the name and the symbol of the asset
* @param conjureAddresses array holding the owner, indexed UniSwap oracle and ethUsdChainLinkOracle address
* @param factoryAddress_ the address of the factory
* @param collateralContract the EtherCollateral contract of the asset
*/
function initialize(
string[2] memory nameSymbol,
address[] memory conjureAddresses,
address factoryAddress_,
address collateralContract
) external
{
}
/**
* @dev inits the conjure asset can only be called by the factory address
*
* @param inverse_ indicated it the asset is an inverse asset or not
* @param divisorAssetType array containing the divisor and the asset type
* @param oracleAddresses_ the array holding the oracle addresses 1. address to call,
* 2. address of the token for supply if needed
* @param oracleTypesValuesWeightsDecimals array holding the oracle types,values,weights and decimals
* @param signatures_ array holding the oracle signatures
* @param callData_ array holding the oracle callData
*/
function init(
bool inverse_,
uint256[2] memory divisorAssetType,
address[][2] memory oracleAddresses_,
uint256[][4] memory oracleTypesValuesWeightsDecimals,
string[] memory signatures_,
bytes[] memory callData_
) external {
require(msg.sender == _factoryContract, "can only be called by factory contract");
require(_inited == false, "Contract already inited");
require(divisorAssetType[0] != 0, "Divisor should not be 0");
_assetType = divisorAssetType[1];
_numoracles = oracleAddresses_[0].length;
_indexdivisor = divisorAssetType[0];
_inverse = inverse_;
emit AssetTypeSet(_assetType);
emit IndexDivisorSet(_indexdivisor);
uint256 weightCheck;
// push the values into the oracle struct for further processing
for (uint i = 0; i < oracleAddresses_[0].length; i++) {
require(<FILL_ME>)
_oracleData.push(_oracleStruct({
oracleaddress: oracleAddresses_[0][i],
tokenaddress: oracleAddresses_[1][i],
oracleType: oracleTypesValuesWeightsDecimals[0][i],
signature: signatures_[i],
calldatas: callData_[i],
weight: oracleTypesValuesWeightsDecimals[2][i],
values: oracleTypesValuesWeightsDecimals[1][i],
decimals: oracleTypesValuesWeightsDecimals[3][i]
}));
weightCheck += oracleTypesValuesWeightsDecimals[2][i];
}
// for basket assets weights must add up to 100
if (_assetType == 1) {
require(weightCheck == 100, "Weights not 100");
}
updatePrice();
_deploymentPrice = getLatestPrice();
_inited = true;
}
/**
* @dev lets the EtherCollateral contract instance burn synths
*
* @param account the account address where the synths should be burned to
* @param amount the amount to be burned
*/
function burn(address account, uint amount) external {
}
/**
* @dev lets the EtherCollateral contract instance mint new synths
*
* @param account the account address where the synths should be minted to
* @param amount the amount to be minted
*/
function mint(address account, uint amount) external {
}
/**
* @dev Internal function to mint new synths
*
* @param account the account address where the synths should be minted to
* @param amount the amount to be minted
*/
function _internalIssue(address account, uint amount) internal {
}
/**
* @dev Internal function to burn synths
*
* @param account the account address where the synths should be burned to
* @param amount the amount to be burned
*/
function _internalBurn(address account, uint amount) internal {
}
/**
* @dev lets the owner change the contract owner
*
* @param _newOwner the new owner address of the contract
*/
function changeOwner(address payable _newOwner) external onlyOwner {
}
/**
* @dev lets the owner collect the fees accrued
*/
function collectFees() external onlyOwner {
}
/**
* @dev gets the latest price of an oracle asset
* uses chainLink oracles to get the price
*
* @return the current asset price
*/
function getLatestPrice(AggregatorV3Interface priceFeed) internal view returns (uint) {
}
/**
* @dev gets the latest ETH USD Price from the given oracle
*
* @return the current eth usd price
*/
function getLatestETHUSDPrice() public view returns (uint) {
}
/**
* @dev implementation of a quicksort algorithm
*
* @param arr the array to be sorted
* @param left the left outer bound element to start the sort
* @param right the right outer bound element to stop the sort
*/
function quickSort(uint[] memory arr, int left, int right) internal pure {
}
/**
* @dev implementation to get the average value of an array
*
* @param arr the array to be averaged
* @return the (weighted) average price of an asset
*/
function getAverage(uint[] memory arr) internal view returns (uint) {
}
/**
* @dev sort implementation which calls the quickSort function
*
* @param data the array to be sorted
* @return the sorted array
*/
function sort(uint[] memory data) internal pure returns (uint[] memory) {
}
/**
* @dev implementation of a square rooting algorithm
* babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method)
*
* @param y the value to be square rooted
* @return z the square rooted value
*/
function sqrt(uint256 y) internal pure returns (uint256 z) {
}
/**
* @dev gets the latest recorded price of the synth in USD
*
* @return the last recorded synths price
*/
function getLatestPrice() public view returns (uint) {
}
/**
* @dev gets the latest recorded price time
*
* @return the last recorded time of a synths price
*/
function getLatestPriceTime() external view returns (uint) {
}
/**
* @dev gets the latest price of the synth in USD by calculation and write the checkpoints for view functions
*/
function updatePrice() public {
}
/**
* @dev gets the latest price of the synth in USD by calculation --> internal calculation
*
* @return the current synths price
*/
function updateInternalPrice() internal returns (uint) {
}
/**
* ERC 20 Specific Functions
*/
/**
* receive function to receive funds
*/
receive() external payable {}
/**
* @dev Returns the name of the token.
*/
function name() external override view returns (string memory) {
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() external override view returns (string memory) {
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`.
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() external override pure returns (uint8) {
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() external override view returns (uint256) {
}
/**
* @dev See {IERC20-balanceOf}. Uses burn abstraction for balance updates without gas and universally.
*/
function balanceOf(address account) external override view returns (uint256) {
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address dst, uint256 rawAmount) external override returns (bool) {
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender)
external
override
view
returns (uint256)
{
}
/**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount)
external
override
returns (bool)
{
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20};
*
* Requirements:
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
* - the caller must have allowance for ``sender``'s tokens of at least
* `amount`.
*/
function transferFrom(address src, address dst, uint256 rawAmount) external override returns (bool) {
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
*
* This is internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(
address owner,
address spender,
uint256 amount
)
internal
{
}
function _transfer(
address sender,
address recipient,
uint256 amount
)
internal
{
}
}
| oracleTypesValuesWeightsDecimals[3][i]<=18,"Decimals too high" | 42,624 | oracleTypesValuesWeightsDecimals[3][i]<=18 |
"Only cat owner is allowed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.7.6;
// -----------------------------------------------------------------------------------------------
// Wrapped CryptoCat
//
// Wrapper contract for minting ERC721 for vintage 8-bit NFT project CryptoCats (cryptocats.thetwentysix.io)
//
// Community built with feedback and contributions from
// https://github.com/surfer77
// https://github.com/abcoathup
// https://github.com/bokkypoobah
// https://github.com/catmaestro
// ----------------------------------------------------------------------------------------------
interface ICryptoCats {
function totalSupply() external view returns (uint256);
function balanceOf(address tokenOwner) external view returns (uint256 balance);
function transfer(address _to, uint256 _value) external returns (bool success);
function catIndexToAddress(uint256 tokenId) external view returns (address owner);
function buyCat(uint256 catIndex) external payable;
function getCatOwner(uint256 catIndex) external returns (address);
}
contract WrappedCryptoCat is
ERC721,
Ownable,
ReentrancyGuard,
Pausable
{
ICryptoCats private cryptoCatsCore = ICryptoCats(0x088C6Ad962812b5Aa905BA6F3c5c145f9D4C079f);
mapping(uint256 => bool) private catIsDepositedInContract;
event BurnTokenAndWithdrawCat(uint256 catId);
event DepositCatAndMintToken(uint256 catId);
constructor(
string memory _name,
string memory _symbol,
string memory _baseURI
) ERC721(_name, _symbol) {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function setBaseURI(string memory baseURI_) public onlyOwner {
}
function depositCatAndMintToken(uint256 _catId)
external
payable
nonReentrant
whenNotPaused
{
require(<FILL_ME>)
address sender = _msgSender();
// pay 0 ETH to get a cat
// precondition that owner has called offerCatForSaleToAddress to sell to this wrapper contract for 0 ETH
cryptoCatsCore.buyCat(_catId);
// verify that ownership of cat already transferred to contract
require(
cryptoCatsCore.getCatOwner(_catId) == address(this),
"Cat cannot be transferred"
);
catIsDepositedInContract[_catId] = true;
_mint(sender, _catId);
emit DepositCatAndMintToken(_catId);
}
function unwrap(uint256 _tokenId) external nonReentrant {
}
}
| cryptoCatsCore.getCatOwner(_catId)==msg.sender,"Only cat owner is allowed" | 42,635 | cryptoCatsCore.getCatOwner(_catId)==msg.sender |
"Cat cannot be transferred" | // SPDX-License-Identifier: MIT
pragma solidity ^0.7.6;
// -----------------------------------------------------------------------------------------------
// Wrapped CryptoCat
//
// Wrapper contract for minting ERC721 for vintage 8-bit NFT project CryptoCats (cryptocats.thetwentysix.io)
//
// Community built with feedback and contributions from
// https://github.com/surfer77
// https://github.com/abcoathup
// https://github.com/bokkypoobah
// https://github.com/catmaestro
// ----------------------------------------------------------------------------------------------
interface ICryptoCats {
function totalSupply() external view returns (uint256);
function balanceOf(address tokenOwner) external view returns (uint256 balance);
function transfer(address _to, uint256 _value) external returns (bool success);
function catIndexToAddress(uint256 tokenId) external view returns (address owner);
function buyCat(uint256 catIndex) external payable;
function getCatOwner(uint256 catIndex) external returns (address);
}
contract WrappedCryptoCat is
ERC721,
Ownable,
ReentrancyGuard,
Pausable
{
ICryptoCats private cryptoCatsCore = ICryptoCats(0x088C6Ad962812b5Aa905BA6F3c5c145f9D4C079f);
mapping(uint256 => bool) private catIsDepositedInContract;
event BurnTokenAndWithdrawCat(uint256 catId);
event DepositCatAndMintToken(uint256 catId);
constructor(
string memory _name,
string memory _symbol,
string memory _baseURI
) ERC721(_name, _symbol) {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function setBaseURI(string memory baseURI_) public onlyOwner {
}
function depositCatAndMintToken(uint256 _catId)
external
payable
nonReentrant
whenNotPaused
{
require(
cryptoCatsCore.getCatOwner(_catId) == msg.sender,
"Only cat owner is allowed"
);
address sender = _msgSender();
// pay 0 ETH to get a cat
// precondition that owner has called offerCatForSaleToAddress to sell to this wrapper contract for 0 ETH
cryptoCatsCore.buyCat(_catId);
// verify that ownership of cat already transferred to contract
require(<FILL_ME>)
catIsDepositedInContract[_catId] = true;
_mint(sender, _catId);
emit DepositCatAndMintToken(_catId);
}
function unwrap(uint256 _tokenId) external nonReentrant {
}
}
| cryptoCatsCore.getCatOwner(_catId)==address(this),"Cat cannot be transferred" | 42,635 | cryptoCatsCore.getCatOwner(_catId)==address(this) |
"Caller is not owner nor approved" | // SPDX-License-Identifier: MIT
pragma solidity ^0.7.6;
// -----------------------------------------------------------------------------------------------
// Wrapped CryptoCat
//
// Wrapper contract for minting ERC721 for vintage 8-bit NFT project CryptoCats (cryptocats.thetwentysix.io)
//
// Community built with feedback and contributions from
// https://github.com/surfer77
// https://github.com/abcoathup
// https://github.com/bokkypoobah
// https://github.com/catmaestro
// ----------------------------------------------------------------------------------------------
interface ICryptoCats {
function totalSupply() external view returns (uint256);
function balanceOf(address tokenOwner) external view returns (uint256 balance);
function transfer(address _to, uint256 _value) external returns (bool success);
function catIndexToAddress(uint256 tokenId) external view returns (address owner);
function buyCat(uint256 catIndex) external payable;
function getCatOwner(uint256 catIndex) external returns (address);
}
contract WrappedCryptoCat is
ERC721,
Ownable,
ReentrancyGuard,
Pausable
{
ICryptoCats private cryptoCatsCore = ICryptoCats(0x088C6Ad962812b5Aa905BA6F3c5c145f9D4C079f);
mapping(uint256 => bool) private catIsDepositedInContract;
event BurnTokenAndWithdrawCat(uint256 catId);
event DepositCatAndMintToken(uint256 catId);
constructor(
string memory _name,
string memory _symbol,
string memory _baseURI
) ERC721(_name, _symbol) {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function setBaseURI(string memory baseURI_) public onlyOwner {
}
function depositCatAndMintToken(uint256 _catId)
external
payable
nonReentrant
whenNotPaused
{
}
function unwrap(uint256 _tokenId) external nonReentrant {
require(<FILL_ME>)
require(
catIsDepositedInContract[_tokenId],
"Cat not found in contract"
);
require(
cryptoCatsCore.transfer(msg.sender, _tokenId),
"Cat cannot be transferred"
);
_burn(_tokenId);
catIsDepositedInContract[_tokenId] = false;
emit BurnTokenAndWithdrawCat(_tokenId);
}
}
| _isApprovedOrOwner(msg.sender,_tokenId),"Caller is not owner nor approved" | 42,635 | _isApprovedOrOwner(msg.sender,_tokenId) |
"Cat not found in contract" | // SPDX-License-Identifier: MIT
pragma solidity ^0.7.6;
// -----------------------------------------------------------------------------------------------
// Wrapped CryptoCat
//
// Wrapper contract for minting ERC721 for vintage 8-bit NFT project CryptoCats (cryptocats.thetwentysix.io)
//
// Community built with feedback and contributions from
// https://github.com/surfer77
// https://github.com/abcoathup
// https://github.com/bokkypoobah
// https://github.com/catmaestro
// ----------------------------------------------------------------------------------------------
interface ICryptoCats {
function totalSupply() external view returns (uint256);
function balanceOf(address tokenOwner) external view returns (uint256 balance);
function transfer(address _to, uint256 _value) external returns (bool success);
function catIndexToAddress(uint256 tokenId) external view returns (address owner);
function buyCat(uint256 catIndex) external payable;
function getCatOwner(uint256 catIndex) external returns (address);
}
contract WrappedCryptoCat is
ERC721,
Ownable,
ReentrancyGuard,
Pausable
{
ICryptoCats private cryptoCatsCore = ICryptoCats(0x088C6Ad962812b5Aa905BA6F3c5c145f9D4C079f);
mapping(uint256 => bool) private catIsDepositedInContract;
event BurnTokenAndWithdrawCat(uint256 catId);
event DepositCatAndMintToken(uint256 catId);
constructor(
string memory _name,
string memory _symbol,
string memory _baseURI
) ERC721(_name, _symbol) {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function setBaseURI(string memory baseURI_) public onlyOwner {
}
function depositCatAndMintToken(uint256 _catId)
external
payable
nonReentrant
whenNotPaused
{
}
function unwrap(uint256 _tokenId) external nonReentrant {
require(_isApprovedOrOwner(msg.sender, _tokenId), "Caller is not owner nor approved");
require(<FILL_ME>)
require(
cryptoCatsCore.transfer(msg.sender, _tokenId),
"Cat cannot be transferred"
);
_burn(_tokenId);
catIsDepositedInContract[_tokenId] = false;
emit BurnTokenAndWithdrawCat(_tokenId);
}
}
| catIsDepositedInContract[_tokenId],"Cat not found in contract" | 42,635 | catIsDepositedInContract[_tokenId] |
"Cat cannot be transferred" | // SPDX-License-Identifier: MIT
pragma solidity ^0.7.6;
// -----------------------------------------------------------------------------------------------
// Wrapped CryptoCat
//
// Wrapper contract for minting ERC721 for vintage 8-bit NFT project CryptoCats (cryptocats.thetwentysix.io)
//
// Community built with feedback and contributions from
// https://github.com/surfer77
// https://github.com/abcoathup
// https://github.com/bokkypoobah
// https://github.com/catmaestro
// ----------------------------------------------------------------------------------------------
interface ICryptoCats {
function totalSupply() external view returns (uint256);
function balanceOf(address tokenOwner) external view returns (uint256 balance);
function transfer(address _to, uint256 _value) external returns (bool success);
function catIndexToAddress(uint256 tokenId) external view returns (address owner);
function buyCat(uint256 catIndex) external payable;
function getCatOwner(uint256 catIndex) external returns (address);
}
contract WrappedCryptoCat is
ERC721,
Ownable,
ReentrancyGuard,
Pausable
{
ICryptoCats private cryptoCatsCore = ICryptoCats(0x088C6Ad962812b5Aa905BA6F3c5c145f9D4C079f);
mapping(uint256 => bool) private catIsDepositedInContract;
event BurnTokenAndWithdrawCat(uint256 catId);
event DepositCatAndMintToken(uint256 catId);
constructor(
string memory _name,
string memory _symbol,
string memory _baseURI
) ERC721(_name, _symbol) {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function setBaseURI(string memory baseURI_) public onlyOwner {
}
function depositCatAndMintToken(uint256 _catId)
external
payable
nonReentrant
whenNotPaused
{
}
function unwrap(uint256 _tokenId) external nonReentrant {
require(_isApprovedOrOwner(msg.sender, _tokenId), "Caller is not owner nor approved");
require(
catIsDepositedInContract[_tokenId],
"Cat not found in contract"
);
require(<FILL_ME>)
_burn(_tokenId);
catIsDepositedInContract[_tokenId] = false;
emit BurnTokenAndWithdrawCat(_tokenId);
}
}
| cryptoCatsCore.transfer(msg.sender,_tokenId),"Cat cannot be transferred" | 42,635 | cryptoCatsCore.transfer(msg.sender,_tokenId) |
'Sale not approved' | pragma solidity ^ 0.4 .26;
contract ERC20 {
function transfer(address receiver, uint amount) public;
function balanceOf(address tokenOwner) public constant returns(uint balance);
}
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns(uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns(uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns(uint256) {
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns(uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns(uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns(uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns(uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns(uint256) {
}
}
interface IDSDS {
function epoch() external view returns(uint256);
function transferCoupons(address sender, address recipient, uint256 epoch, uint256 amount) external;
function balanceOfCoupons(address account, uint256 epoch) external view returns(uint256);
function allowanceCoupons(address owner, address spender) external view returns(uint256); //check address has enabled selling (>1)
}
contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() internal {
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and make it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
}
}
contract TradeDSDCoupons is ReentrancyGuard {
using SafeMath
for uint;
IDSDS public DSDS = IDSDS(0x6Bf977ED1A09214E6209F4EA5f525261f1A2690a);
function DSDperUSDC() public view returns(uint) {
} //to 3 decimals
function USDCperETH() public view returns(uint) {
} //zero decimals
function DSDperETH() public view returns(uint) {
}
address[] addressList; //each time an initial sellRate is set, address is added here
mapping(address => uint) public sellRate;
mapping(address => uint256) public ETHbalances; // records amounts invested
function setRate(uint rate) external nonReentrant {
}
function uint2str(uint i) internal pure returns(string) {
}
function address2ShortString(address _address) public pure returns(string memory) {
}
function showAvailableCoupons(uint maxPrice, uint addressListLocation) public view returns(string memory) {
}
function buyCoupons(uint epoch, uint addressListLocation) payable external nonReentrant {
uint buyRate = sellRate[addressList[addressListLocation]];
address buyFrom = addressList[addressListLocation];
uint refund;
require(buyRate > 0, "Invalid address");
require(<FILL_ME>) //require seller to have approved sale
uint DSDETH = DSDperETH();
uint couponAmount = msg.value.mul(DSDETH).mul(1e2).div(buyRate);
uint couponBalance = DSDS.balanceOfCoupons(buyFrom, epoch);
if (couponAmount > couponBalance) {refund = (couponAmount - couponBalance).mul(buyRate).div(DSDETH).div(1e2); couponAmount = couponBalance;}
if (refund > msg.value) refund = msg.value;
ETHbalances[msg.sender] += refund;
ETHbalances[buyFrom] += msg.value.sub(refund);
DSDS.transferCoupons(buyFrom, msg.sender, epoch, couponAmount);
}
function approvedToSell(address addressToCheck) public view returns (uint) {
}
function currentEpoch() public view returns (uint) {
}
function claimETH() external nonReentrant {
}
}
| approvedToSell(buyFrom)>1,'Sale not approved' | 42,650 | approvedToSell(buyFrom)>1 |
"Day name must be less than 36 chars" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./DateTime.sol";
contract CommonCalendar is ERC721, ERC721Enumerable, ERC721URIStorage, Pausable, Ownable {
using Counters for Counters.Counter;
using SafeMath for uint256;
address public steward;
address public auction;
address dateLibrary;
mapping (uint8 => mapping (uint8 => bool)) internal mintedDates; // month -> day -> was minted bool
mapping (uint8 => mapping (uint8 => string)) internal dayNames; // User set names
mapping (uint8 => mapping (uint8 => uint256)) internal daySellPrices; // User set forced sale prices
mapping (uint8 => mapping (uint8 => bool)) internal auctionedDates; // month -> day -> was minted bool
mapping (uint8 => mapping (uint8 => bool)) internal foreCloseDates; // month -> day -> was minted bool
event AuctionAdded(uint8 month, uint8 day);
function setSteward(address _steward) public {
}
// Day Name methods
function setDayName(uint8 _monthNumber, uint8 _dayOfMonth, string memory newName) public {
require(<FILL_ME>) // Move to DAO
dayNames[_monthNumber][_dayOfMonth] = newName;
}
function getDayName(uint8 _monthNumber, uint8 _dayOfMonth) public view returns (string memory) {
}
function getTodayName() public view returns (string memory) {
}
function getMintedDay(uint8 _monthNumber, uint8 _dayOfMonth) public view returns(bool) {
}
modifier onlyMintOnDay(uint8 _monthNumber, uint8 _dayOfMonth) {
}
modifier notToday(uint8 _monthNumber, uint8 _dayOfMonth) {
}
modifier notAlreadyMinted(uint8 _monthNumber, uint8 _dayOfMonth) {
}
modifier onlyValidInputs(uint8 _monthNumber, uint8 _dayOfMonth) {
}
modifier notAlreadyAuctioned(uint8 _monthNumber, uint8 _dayOfMonth, bool status) {
}
function calculateTokenID(uint8 month, uint8 dayOfMonth) public returns (uint256 tokenID) {
}
//onlyMintOnDay(month, dayOfMonth)
function mintItem(address to, uint8 month, uint8 dayOfMonth)
public
notAlreadyMinted(month, dayOfMonth)
onlyValidInputs(month, dayOfMonth)
returns (uint256)
{
}
// function foreClosedDay(uint8 month, uint8 day) public {
// foreCloseDates[month][day] = true;
// }
// Override methods
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function _baseURI() internal pure override returns (string memory) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
whenNotPaused
override(ERC721, ERC721Enumerable)
{
}
function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
function _isApprovedOrOwner(address spender, uint256 tokenId)
internal
view
override(ERC721)
returns (bool)
{
}
constructor(address _dateLibrary) ERC721("CommonCalendar", "CC") {
}
function uint2str(
uint256 _i
)
internal
pure
returns (string memory str)
{
}
}
| bytes(newName).length<=36,"Day name must be less than 36 chars" | 42,669 | bytes(newName).length<=36 |
'Cannot change name on the day itself' | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./DateTime.sol";
contract CommonCalendar is ERC721, ERC721Enumerable, ERC721URIStorage, Pausable, Ownable {
using Counters for Counters.Counter;
using SafeMath for uint256;
address public steward;
address public auction;
address dateLibrary;
mapping (uint8 => mapping (uint8 => bool)) internal mintedDates; // month -> day -> was minted bool
mapping (uint8 => mapping (uint8 => string)) internal dayNames; // User set names
mapping (uint8 => mapping (uint8 => uint256)) internal daySellPrices; // User set forced sale prices
mapping (uint8 => mapping (uint8 => bool)) internal auctionedDates; // month -> day -> was minted bool
mapping (uint8 => mapping (uint8 => bool)) internal foreCloseDates; // month -> day -> was minted bool
event AuctionAdded(uint8 month, uint8 day);
function setSteward(address _steward) public {
}
// Day Name methods
function setDayName(uint8 _monthNumber, uint8 _dayOfMonth, string memory newName) public {
}
function getDayName(uint8 _monthNumber, uint8 _dayOfMonth) public view returns (string memory) {
}
function getTodayName() public view returns (string memory) {
}
function getMintedDay(uint8 _monthNumber, uint8 _dayOfMonth) public view returns(bool) {
}
modifier onlyMintOnDay(uint8 _monthNumber, uint8 _dayOfMonth) {
}
modifier notToday(uint8 _monthNumber, uint8 _dayOfMonth) {
DateTime datetimelib = DateTime(dateLibrary);
uint8 monthNumber = datetimelib.getMonth(block.timestamp);
uint8 dayOfMonth = datetimelib.getDay(block.timestamp);
bool isToday = monthNumber == _monthNumber && dayOfMonth == _dayOfMonth;
require(<FILL_ME>)
_;
}
modifier notAlreadyMinted(uint8 _monthNumber, uint8 _dayOfMonth) {
}
modifier onlyValidInputs(uint8 _monthNumber, uint8 _dayOfMonth) {
}
modifier notAlreadyAuctioned(uint8 _monthNumber, uint8 _dayOfMonth, bool status) {
}
function calculateTokenID(uint8 month, uint8 dayOfMonth) public returns (uint256 tokenID) {
}
//onlyMintOnDay(month, dayOfMonth)
function mintItem(address to, uint8 month, uint8 dayOfMonth)
public
notAlreadyMinted(month, dayOfMonth)
onlyValidInputs(month, dayOfMonth)
returns (uint256)
{
}
// function foreClosedDay(uint8 month, uint8 day) public {
// foreCloseDates[month][day] = true;
// }
// Override methods
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function _baseURI() internal pure override returns (string memory) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
whenNotPaused
override(ERC721, ERC721Enumerable)
{
}
function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
function _isApprovedOrOwner(address spender, uint256 tokenId)
internal
view
override(ERC721)
returns (bool)
{
}
constructor(address _dateLibrary) ERC721("CommonCalendar", "CC") {
}
function uint2str(
uint256 _i
)
internal
pure
returns (string memory str)
{
}
}
| !isToday,'Cannot change name on the day itself' | 42,669 | !isToday |
"This NFT was already minted" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./DateTime.sol";
contract CommonCalendar is ERC721, ERC721Enumerable, ERC721URIStorage, Pausable, Ownable {
using Counters for Counters.Counter;
using SafeMath for uint256;
address public steward;
address public auction;
address dateLibrary;
mapping (uint8 => mapping (uint8 => bool)) internal mintedDates; // month -> day -> was minted bool
mapping (uint8 => mapping (uint8 => string)) internal dayNames; // User set names
mapping (uint8 => mapping (uint8 => uint256)) internal daySellPrices; // User set forced sale prices
mapping (uint8 => mapping (uint8 => bool)) internal auctionedDates; // month -> day -> was minted bool
mapping (uint8 => mapping (uint8 => bool)) internal foreCloseDates; // month -> day -> was minted bool
event AuctionAdded(uint8 month, uint8 day);
function setSteward(address _steward) public {
}
// Day Name methods
function setDayName(uint8 _monthNumber, uint8 _dayOfMonth, string memory newName) public {
}
function getDayName(uint8 _monthNumber, uint8 _dayOfMonth) public view returns (string memory) {
}
function getTodayName() public view returns (string memory) {
}
function getMintedDay(uint8 _monthNumber, uint8 _dayOfMonth) public view returns(bool) {
}
modifier onlyMintOnDay(uint8 _monthNumber, uint8 _dayOfMonth) {
}
modifier notToday(uint8 _monthNumber, uint8 _dayOfMonth) {
}
modifier notAlreadyMinted(uint8 _monthNumber, uint8 _dayOfMonth) {
require(<FILL_ME>)
_;
}
modifier onlyValidInputs(uint8 _monthNumber, uint8 _dayOfMonth) {
}
modifier notAlreadyAuctioned(uint8 _monthNumber, uint8 _dayOfMonth, bool status) {
}
function calculateTokenID(uint8 month, uint8 dayOfMonth) public returns (uint256 tokenID) {
}
//onlyMintOnDay(month, dayOfMonth)
function mintItem(address to, uint8 month, uint8 dayOfMonth)
public
notAlreadyMinted(month, dayOfMonth)
onlyValidInputs(month, dayOfMonth)
returns (uint256)
{
}
// function foreClosedDay(uint8 month, uint8 day) public {
// foreCloseDates[month][day] = true;
// }
// Override methods
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function _baseURI() internal pure override returns (string memory) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
whenNotPaused
override(ERC721, ERC721Enumerable)
{
}
function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
function _isApprovedOrOwner(address spender, uint256 tokenId)
internal
view
override(ERC721)
returns (bool)
{
}
constructor(address _dateLibrary) ERC721("CommonCalendar", "CC") {
}
function uint2str(
uint256 _i
)
internal
pure
returns (string memory str)
{
}
}
| mintedDates[_monthNumber][_dayOfMonth]==false,"This NFT was already minted" | 42,669 | mintedDates[_monthNumber][_dayOfMonth]==false |
"This NFT was already auctioned" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./DateTime.sol";
contract CommonCalendar is ERC721, ERC721Enumerable, ERC721URIStorage, Pausable, Ownable {
using Counters for Counters.Counter;
using SafeMath for uint256;
address public steward;
address public auction;
address dateLibrary;
mapping (uint8 => mapping (uint8 => bool)) internal mintedDates; // month -> day -> was minted bool
mapping (uint8 => mapping (uint8 => string)) internal dayNames; // User set names
mapping (uint8 => mapping (uint8 => uint256)) internal daySellPrices; // User set forced sale prices
mapping (uint8 => mapping (uint8 => bool)) internal auctionedDates; // month -> day -> was minted bool
mapping (uint8 => mapping (uint8 => bool)) internal foreCloseDates; // month -> day -> was minted bool
event AuctionAdded(uint8 month, uint8 day);
function setSteward(address _steward) public {
}
// Day Name methods
function setDayName(uint8 _monthNumber, uint8 _dayOfMonth, string memory newName) public {
}
function getDayName(uint8 _monthNumber, uint8 _dayOfMonth) public view returns (string memory) {
}
function getTodayName() public view returns (string memory) {
}
function getMintedDay(uint8 _monthNumber, uint8 _dayOfMonth) public view returns(bool) {
}
modifier onlyMintOnDay(uint8 _monthNumber, uint8 _dayOfMonth) {
}
modifier notToday(uint8 _monthNumber, uint8 _dayOfMonth) {
}
modifier notAlreadyMinted(uint8 _monthNumber, uint8 _dayOfMonth) {
}
modifier onlyValidInputs(uint8 _monthNumber, uint8 _dayOfMonth) {
}
modifier notAlreadyAuctioned(uint8 _monthNumber, uint8 _dayOfMonth, bool status) {
if(!status) {
require(<FILL_ME>)
}
_;
}
function calculateTokenID(uint8 month, uint8 dayOfMonth) public returns (uint256 tokenID) {
}
//onlyMintOnDay(month, dayOfMonth)
function mintItem(address to, uint8 month, uint8 dayOfMonth)
public
notAlreadyMinted(month, dayOfMonth)
onlyValidInputs(month, dayOfMonth)
returns (uint256)
{
}
// function foreClosedDay(uint8 month, uint8 day) public {
// foreCloseDates[month][day] = true;
// }
// Override methods
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function _baseURI() internal pure override returns (string memory) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
whenNotPaused
override(ERC721, ERC721Enumerable)
{
}
function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
function _isApprovedOrOwner(address spender, uint256 tokenId)
internal
view
override(ERC721)
returns (bool)
{
}
constructor(address _dateLibrary) ERC721("CommonCalendar", "CC") {
}
function uint2str(
uint256 _i
)
internal
pure
returns (string memory str)
{
}
}
| auctionedDates[_monthNumber][_dayOfMonth]==false,"This NFT was already auctioned" | 42,669 | auctionedDates[_monthNumber][_dayOfMonth]==false |
"Cannot downgrade level or same level" | pragma solidity ^0.6.0;
contract LPTokenWrapper {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Token to be staked
IERC20 public stakingToken = IERC20(address(0));
uint256 private _totalSupply;
mapping(address => uint256) private _balances;
function totalSupply() public view returns (uint256) {
}
function balanceOf(address account) public view returns (uint256) {
}
function stake(uint256 amount) public virtual {
}
function withdraw(uint256 amount) public virtual{
}
function setBPT(address BPTAddress) internal {
}
}
interface MultiplierInterface {
function getTotalMultiplier(address account) external view returns (uint256);
}
interface CalculateCycle {
function calculate(uint256 deployedTime,uint256 currentTime,uint256 duration) external view returns(uint256);
}
contract Snoozer is LPTokenWrapper, IRewardDistributionRecipient {
// Token to be rewarded
IERC20 public rewardToken = IERC20(address(0));
IERC20 public multiplierToken = IERC20(address(0));
MultiplierInterface public multiplier = MultiplierInterface(address(0));
CalculateCycle public calculateCycle = CalculateCycle(address(0));
uint256 public DURATION = 4 weeks;
uint256 public periodFinish = 0;
uint256 public rewardRate = 0;
uint256 public lastUpdateTime;
uint256 public rewardPerTokenStored;
uint256 public deployedTime;
uint256 public constant napsDiscountRange = 8 hours;
uint256 public constant napsLevelOneCost = 10000000000000000000000;
uint256 public constant napsLevelTwoCost = 20000000000000000000000;
uint256 public constant napsLevelThreeCost = 30000000000000000000000;
uint256 public constant TenPercentBonus = 1 * 10 ** 17;
uint256 public constant TwentyPercentBonus = 2 * 10 ** 17;
uint256 public constant ThirtyPercentBonus = 3 * 10 ** 17;
uint256 public constant FourtyPercentBonus = 4 * 10 ** 17;
mapping(address => uint256) public userRewardPerTokenPaid;
mapping(address => uint256) public rewards;
mapping(address => uint256) public spentNAPS;
mapping(address => uint256) public NAPSlevel;
event RewardAdded(uint256 reward);
event Staked(address indexed user, uint256 amount);
event Withdrawn(address indexed user, uint256 amount);
event RewardPaid(address indexed user, uint256 reward);
event Boost(uint256 level);
modifier updateReward(address account) {
}
constructor(address _stakingToken,address _rewardToken,address _multiplierToken,address _calculateCycleAddr,address _multiplierAddr) public{
}
function lastTimeRewardApplicable() public view returns (uint256) {
}
function rewardPerToken() public view returns (uint256) {
}
function earned(address account) public view returns (uint256) {
}
// stake visibility is public as overriding LPTokenWrapper's stake() function
function stake(uint256 amount) public override updateReward(msg.sender) {
}
function withdraw(uint256 amount) public override updateReward(msg.sender) {
}
function exit() external {
}
function getReward() public updateReward(msg.sender) {
}
function notifyRewardAmount(uint256 reward)
external
override
onlyRewardDistribution
updateReward(address(0))
{
}
function setCycleContract(address _cycleContract) public onlyRewardDistribution {
}
// naps stuff
function getLevel(address account) external view returns (uint256) {
}
function getSpent(address account) external view returns (uint256) {
}
// Returns the number of naps token to boost
function calculateCost(uint256 level) public view returns(uint256) {
}
function purchase(uint256 level) external {
require(<FILL_ME>)
uint256 cost = calculateCost(level);
uint256 finalCost = cost.sub(spentNAPS[msg.sender]);
// Owner dev fund
rewardToken.safeTransferFrom(msg.sender,0xB8b485b42A456Df5201EAa86565614c40bA7fb4E,finalCost);
spentNAPS[msg.sender] = spentNAPS[msg.sender].add(finalCost);
NAPSlevel[msg.sender] = level;
emit Boost(level);
}
function setMultiplierAddress(address multiplierAddress) external onlyRewardDistribution {
}
function getTotalMultiplier(address account) public view returns (uint256) {
}
function eject() external onlyRewardDistribution {
}
}
| NAPSlevel[msg.sender]<=level,"Cannot downgrade level or same level" | 42,797 | NAPSlevel[msg.sender]<=level |
"Insufficient Token Allowance" | pragma solidity 0.6.12;
// SPDX-License-Identifier: MIT
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the ordering.
*
* ```
* contract Example {
* // Add the library methods
* using EnumerableSet for EnumerableSet.AddressSet;
*
* // Declare a set state variable
* EnumerableSet.AddressSet private mySet;
* }
* ```
*
* As of v3.0.0, only sets of type `address` (`AddressSet`) and `uint256`
* (`UintSet`) are supported.
*/
library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just wrappers around the
// underlying Set.
// This means that we can only create new EnumerableSets for types that fit
// in bytes32.
struct Set {
// Storage of set values
bytes32[] _values;
// Position of the value in the `values` array, plus 1 because index 0
// means a value is not in the set.
mapping (bytes32 => uint256) _indexes;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function _add(Set storage set, bytes32 value) private returns (bool) {
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function _remove(Set storage set, bytes32 value) private returns (bool) {
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function _contains(Set storage set, bytes32 value) private view returns (bool) {
}
/**
* @dev Returns the number of values on the set. O(1).
*/
function _length(Set storage set) private view returns (uint256) {
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function _at(Set storage set, uint256 index) private view returns (bytes32) {
}
// AddressSet
struct AddressSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(AddressSet storage set, address value) internal returns (bool) {
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(AddressSet storage set, address value) internal returns (bool) {
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(AddressSet storage set, address value) internal view returns (bool) {
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(AddressSet storage set) internal view returns (uint256) {
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(AddressSet storage set, uint256 index) internal view returns (address) {
}
// UintSet
struct UintSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(UintSet storage set, uint256 value) internal returns (bool) {
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(UintSet storage set, uint256 value) internal returns (bool) {
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(UintSet storage set, uint256 value) internal view returns (bool) {
}
/**
* @dev Returns the number of values on the set. O(1).
*/
function length(UintSet storage set) internal view returns (uint256) {
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(UintSet storage set, uint256 index) internal view returns (uint256) {
}
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) onlyOwner public {
}
}
interface Token {
function transferFrom(address, address, uint256) external returns (bool);
function transfer(address, uint256) external returns (bool);
}
contract Pool_1 is Ownable {
using SafeMath for uint256;
using EnumerableSet for EnumerableSet.AddressSet;
event RewardsTransferred(address holder, uint256 amount);
// YPro token contract address
address public tokenAddress = 0xAc9C0F1bFD12cf5c4daDbeAb943473c4C45263A0;
// LP token contract address
address public LPtokenAddress = 0xE79644F9bE698c8C7a94df66Abb7D7CA04C553F5;
// reward rate 100 % per year
uint256 public rewardRate = 4380;
uint256 public rewardInterval = 365 days;
// staking fee 0%
uint256 public stakingFeeRate = 0;
// unstaking fee 0%
uint256 public unstakingFeeRate = 0;
// unstaking possible after 0 days
uint256 public cliffTime = 0 days;
uint256 public farmEnableat;
uint256 public totalClaimedRewards = 0;
uint256 private stakingAndDaoTokens = 100000e18;
bool public farmEnabled = false;
EnumerableSet.AddressSet private holders;
mapping (address => uint256) public depositedTokens;
mapping (address => uint256) public stakingTime;
mapping (address => uint256) public lastClaimedTime;
mapping (address => uint256) public totalEarnedTokens;
function updateAccount(address account) private {
}
function getPendingDivs(address _holder) public view returns (uint256) {
}
function getNumberOfHolders() public view returns (uint256) {
}
function deposit(uint256 amountToStake) public {
require(amountToStake > 0, "Cannot deposit 0 Tokens");
require(farmEnabled, "Farming is not enabled");
require(<FILL_ME>)
updateAccount(msg.sender);
uint256 fee = amountToStake.mul(stakingFeeRate).div(1e4);
uint256 amountAfterFee = amountToStake.sub(fee);
require(Token(LPtokenAddress).transfer(owner, fee), "Could not transfer deposit fee.");
depositedTokens[msg.sender] = depositedTokens[msg.sender].add(amountAfterFee);
if (!holders.contains(msg.sender)) {
holders.add(msg.sender);
stakingTime[msg.sender] = now;
}
}
function withdraw(uint256 amountToWithdraw) public {
}
function claimDivs() public {
}
function getStakingAndDaoAmount() public view returns (uint256) {
}
function setTokenAddress(address _tokenAddressess) public onlyOwner {
}
function setLPTokenAddress(address _LPtokenAddressess) public onlyOwner {
}
function setCliffTime(uint256 _time) public onlyOwner {
}
function setRewardInterval(uint256 _rewardInterval) public onlyOwner {
}
function setStakingAndDaoTokens(uint256 _stakingAndDaoTokens) public onlyOwner {
}
function setStakingFeeRate(uint256 _Fee) public onlyOwner {
}
function setUnstakingFeeRate(uint256 _Fee) public onlyOwner {
}
function setRewardRate(uint256 _rewardRate) public onlyOwner {
}
function enableFarming() external onlyOwner() {
}
// function to allow admin to claim *any* ERC20 tokens sent to this contract
function transferAnyERC20Tokens(address _tokenAddress, address _to, uint256 _amount) public onlyOwner {
}
}
| Token(LPtokenAddress).transferFrom(msg.sender,address(this),amountToStake),"Insufficient Token Allowance" | 42,998 | Token(LPtokenAddress).transferFrom(msg.sender,address(this),amountToStake) |
"Could not transfer deposit fee." | pragma solidity 0.6.12;
// SPDX-License-Identifier: MIT
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the ordering.
*
* ```
* contract Example {
* // Add the library methods
* using EnumerableSet for EnumerableSet.AddressSet;
*
* // Declare a set state variable
* EnumerableSet.AddressSet private mySet;
* }
* ```
*
* As of v3.0.0, only sets of type `address` (`AddressSet`) and `uint256`
* (`UintSet`) are supported.
*/
library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just wrappers around the
// underlying Set.
// This means that we can only create new EnumerableSets for types that fit
// in bytes32.
struct Set {
// Storage of set values
bytes32[] _values;
// Position of the value in the `values` array, plus 1 because index 0
// means a value is not in the set.
mapping (bytes32 => uint256) _indexes;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function _add(Set storage set, bytes32 value) private returns (bool) {
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function _remove(Set storage set, bytes32 value) private returns (bool) {
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function _contains(Set storage set, bytes32 value) private view returns (bool) {
}
/**
* @dev Returns the number of values on the set. O(1).
*/
function _length(Set storage set) private view returns (uint256) {
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function _at(Set storage set, uint256 index) private view returns (bytes32) {
}
// AddressSet
struct AddressSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(AddressSet storage set, address value) internal returns (bool) {
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(AddressSet storage set, address value) internal returns (bool) {
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(AddressSet storage set, address value) internal view returns (bool) {
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(AddressSet storage set) internal view returns (uint256) {
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(AddressSet storage set, uint256 index) internal view returns (address) {
}
// UintSet
struct UintSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(UintSet storage set, uint256 value) internal returns (bool) {
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(UintSet storage set, uint256 value) internal returns (bool) {
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(UintSet storage set, uint256 value) internal view returns (bool) {
}
/**
* @dev Returns the number of values on the set. O(1).
*/
function length(UintSet storage set) internal view returns (uint256) {
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(UintSet storage set, uint256 index) internal view returns (uint256) {
}
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) onlyOwner public {
}
}
interface Token {
function transferFrom(address, address, uint256) external returns (bool);
function transfer(address, uint256) external returns (bool);
}
contract Pool_1 is Ownable {
using SafeMath for uint256;
using EnumerableSet for EnumerableSet.AddressSet;
event RewardsTransferred(address holder, uint256 amount);
// YPro token contract address
address public tokenAddress = 0xAc9C0F1bFD12cf5c4daDbeAb943473c4C45263A0;
// LP token contract address
address public LPtokenAddress = 0xE79644F9bE698c8C7a94df66Abb7D7CA04C553F5;
// reward rate 100 % per year
uint256 public rewardRate = 4380;
uint256 public rewardInterval = 365 days;
// staking fee 0%
uint256 public stakingFeeRate = 0;
// unstaking fee 0%
uint256 public unstakingFeeRate = 0;
// unstaking possible after 0 days
uint256 public cliffTime = 0 days;
uint256 public farmEnableat;
uint256 public totalClaimedRewards = 0;
uint256 private stakingAndDaoTokens = 100000e18;
bool public farmEnabled = false;
EnumerableSet.AddressSet private holders;
mapping (address => uint256) public depositedTokens;
mapping (address => uint256) public stakingTime;
mapping (address => uint256) public lastClaimedTime;
mapping (address => uint256) public totalEarnedTokens;
function updateAccount(address account) private {
}
function getPendingDivs(address _holder) public view returns (uint256) {
}
function getNumberOfHolders() public view returns (uint256) {
}
function deposit(uint256 amountToStake) public {
require(amountToStake > 0, "Cannot deposit 0 Tokens");
require(farmEnabled, "Farming is not enabled");
require(Token(LPtokenAddress).transferFrom(msg.sender, address(this), amountToStake), "Insufficient Token Allowance");
updateAccount(msg.sender);
uint256 fee = amountToStake.mul(stakingFeeRate).div(1e4);
uint256 amountAfterFee = amountToStake.sub(fee);
require(<FILL_ME>)
depositedTokens[msg.sender] = depositedTokens[msg.sender].add(amountAfterFee);
if (!holders.contains(msg.sender)) {
holders.add(msg.sender);
stakingTime[msg.sender] = now;
}
}
function withdraw(uint256 amountToWithdraw) public {
}
function claimDivs() public {
}
function getStakingAndDaoAmount() public view returns (uint256) {
}
function setTokenAddress(address _tokenAddressess) public onlyOwner {
}
function setLPTokenAddress(address _LPtokenAddressess) public onlyOwner {
}
function setCliffTime(uint256 _time) public onlyOwner {
}
function setRewardInterval(uint256 _rewardInterval) public onlyOwner {
}
function setStakingAndDaoTokens(uint256 _stakingAndDaoTokens) public onlyOwner {
}
function setStakingFeeRate(uint256 _Fee) public onlyOwner {
}
function setUnstakingFeeRate(uint256 _Fee) public onlyOwner {
}
function setRewardRate(uint256 _rewardRate) public onlyOwner {
}
function enableFarming() external onlyOwner() {
}
// function to allow admin to claim *any* ERC20 tokens sent to this contract
function transferAnyERC20Tokens(address _tokenAddress, address _to, uint256 _amount) public onlyOwner {
}
}
| Token(LPtokenAddress).transfer(owner,fee),"Could not transfer deposit fee." | 42,998 | Token(LPtokenAddress).transfer(owner,fee) |
"Could not transfer tokens." | pragma solidity 0.6.12;
// SPDX-License-Identifier: MIT
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the ordering.
*
* ```
* contract Example {
* // Add the library methods
* using EnumerableSet for EnumerableSet.AddressSet;
*
* // Declare a set state variable
* EnumerableSet.AddressSet private mySet;
* }
* ```
*
* As of v3.0.0, only sets of type `address` (`AddressSet`) and `uint256`
* (`UintSet`) are supported.
*/
library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just wrappers around the
// underlying Set.
// This means that we can only create new EnumerableSets for types that fit
// in bytes32.
struct Set {
// Storage of set values
bytes32[] _values;
// Position of the value in the `values` array, plus 1 because index 0
// means a value is not in the set.
mapping (bytes32 => uint256) _indexes;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function _add(Set storage set, bytes32 value) private returns (bool) {
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function _remove(Set storage set, bytes32 value) private returns (bool) {
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function _contains(Set storage set, bytes32 value) private view returns (bool) {
}
/**
* @dev Returns the number of values on the set. O(1).
*/
function _length(Set storage set) private view returns (uint256) {
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function _at(Set storage set, uint256 index) private view returns (bytes32) {
}
// AddressSet
struct AddressSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(AddressSet storage set, address value) internal returns (bool) {
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(AddressSet storage set, address value) internal returns (bool) {
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(AddressSet storage set, address value) internal view returns (bool) {
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(AddressSet storage set) internal view returns (uint256) {
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(AddressSet storage set, uint256 index) internal view returns (address) {
}
// UintSet
struct UintSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(UintSet storage set, uint256 value) internal returns (bool) {
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(UintSet storage set, uint256 value) internal returns (bool) {
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(UintSet storage set, uint256 value) internal view returns (bool) {
}
/**
* @dev Returns the number of values on the set. O(1).
*/
function length(UintSet storage set) internal view returns (uint256) {
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(UintSet storage set, uint256 index) internal view returns (uint256) {
}
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) onlyOwner public {
}
}
interface Token {
function transferFrom(address, address, uint256) external returns (bool);
function transfer(address, uint256) external returns (bool);
}
contract Pool_1 is Ownable {
using SafeMath for uint256;
using EnumerableSet for EnumerableSet.AddressSet;
event RewardsTransferred(address holder, uint256 amount);
// YPro token contract address
address public tokenAddress = 0xAc9C0F1bFD12cf5c4daDbeAb943473c4C45263A0;
// LP token contract address
address public LPtokenAddress = 0xE79644F9bE698c8C7a94df66Abb7D7CA04C553F5;
// reward rate 100 % per year
uint256 public rewardRate = 4380;
uint256 public rewardInterval = 365 days;
// staking fee 0%
uint256 public stakingFeeRate = 0;
// unstaking fee 0%
uint256 public unstakingFeeRate = 0;
// unstaking possible after 0 days
uint256 public cliffTime = 0 days;
uint256 public farmEnableat;
uint256 public totalClaimedRewards = 0;
uint256 private stakingAndDaoTokens = 100000e18;
bool public farmEnabled = false;
EnumerableSet.AddressSet private holders;
mapping (address => uint256) public depositedTokens;
mapping (address => uint256) public stakingTime;
mapping (address => uint256) public lastClaimedTime;
mapping (address => uint256) public totalEarnedTokens;
function updateAccount(address account) private {
}
function getPendingDivs(address _holder) public view returns (uint256) {
}
function getNumberOfHolders() public view returns (uint256) {
}
function deposit(uint256 amountToStake) public {
}
function withdraw(uint256 amountToWithdraw) public {
require(depositedTokens[msg.sender] >= amountToWithdraw, "Invalid amount to withdraw");
require(now.sub(stakingTime[msg.sender]) > cliffTime, "You recently staked, please wait before withdrawing.");
updateAccount(msg.sender);
uint256 fee = amountToWithdraw.mul(unstakingFeeRate).div(1e4);
uint256 amountAfterFee = amountToWithdraw.sub(fee);
require(Token(LPtokenAddress).transfer(owner, fee), "Could not transfer deposit fee.");
require(<FILL_ME>)
depositedTokens[msg.sender] = depositedTokens[msg.sender].sub(amountToWithdraw);
if (holders.contains(msg.sender) && depositedTokens[msg.sender] == 0) {
holders.remove(msg.sender);
}
}
function claimDivs() public {
}
function getStakingAndDaoAmount() public view returns (uint256) {
}
function setTokenAddress(address _tokenAddressess) public onlyOwner {
}
function setLPTokenAddress(address _LPtokenAddressess) public onlyOwner {
}
function setCliffTime(uint256 _time) public onlyOwner {
}
function setRewardInterval(uint256 _rewardInterval) public onlyOwner {
}
function setStakingAndDaoTokens(uint256 _stakingAndDaoTokens) public onlyOwner {
}
function setStakingFeeRate(uint256 _Fee) public onlyOwner {
}
function setUnstakingFeeRate(uint256 _Fee) public onlyOwner {
}
function setRewardRate(uint256 _rewardRate) public onlyOwner {
}
function enableFarming() external onlyOwner() {
}
// function to allow admin to claim *any* ERC20 tokens sent to this contract
function transferAnyERC20Tokens(address _tokenAddress, address _to, uint256 _amount) public onlyOwner {
}
}
| Token(LPtokenAddress).transfer(msg.sender,amountAfterFee),"Could not transfer tokens." | 42,998 | Token(LPtokenAddress).transfer(msg.sender,amountAfterFee) |
null | interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeERC20 {
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
}
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(IERC20 token, address spender, uint256 value) internal {
}
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
}
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
}
}
pragma solidity 0.7.6;
contract MillionUSDTHomepageAdNFT is ERC721 {
// Global Variables
string[401] public imageHash; // To store image Hash for each token
string[401] public link; // To store image Link for each token
uint256 public currentPrice; // Price at which the current Available token will be minted
uint256 public currentAvailableToken; // Next available token for mint
uint256[401] public mtokens; // To store token IDs
mapping(uint => bool) _tokenExists; // mapping to check if a token is already minted
address public owner; // Owner Of the contract
using SafeERC20 for IERC20; // Using SafeERC20 interface for
event TransferSuccessful(address indexed from_, address indexed to_, uint256 amount_);
event TransferFailed(address indexed from_, address indexed to_, uint256 amount_);
// constructor
constructor() ERC721("Million USDT Homepage Ad NFT", "AdNFT") public {
}
// calls _mint of ERC-721 token
function mint(address tokenPayer,uint256 _token) internal {
require(<FILL_ME>) // cheking if the token does not already exist
uint256 _id = _token; // id of token to be minted
mtokens[_token] = _token; // setting value in mtokens array
_mint(tokenPayer, _id); // calling ERC-721 mint function
_tokenExists[_token] = true; // marking the token of token id _token as minted
}
function tokenMint( uint256 amount_) public returns (uint256){
}
// Function which converts uint256 to string type
function uint2str(uint _i) internal pure returns (string memory _uintAsString) {
}
// function which returns a string of tokenIDs owned by address sent as param
function address_TokenHold(address ath)public view returns (string memory){
}
// Function to determine if the caller address of the contract is the owner of the tokenID sent as param
function callContr(uint256 tid) internal view {
}
// Function to set the imageHash and imageLink to the imageHash[tokenId] and imageLink[tokenId]
function setImage(uint256 Tokenid,string memory ihash, string memory ilink) public {
}
// Function returns back a stringified JSON array with tokenIDs between lower bound and upper bound token data including both the bounds
function getImages(uint256 lowerBound, uint256 upperBound) public view returns (string memory){
}
}
| !_tokenExists[_token] | 43,015 | !_tokenExists[_token] |
null | pragma solidity ^0.4.17;
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner(){
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) onlyOwner public {
}
}
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public constant returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public constant returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) 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 constant returns (uint256 balance) {
}
}
/**
* @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 amout of tokens to be transfered
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender.
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) 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 specifing the amount of tokens still avaible for the spender.
*/
function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
}
}
/**
* @title Mintable token
* @dev Simple ERC20 Token example, with mintable token creation
* @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120
* Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol
*/
contract MintableToken is StandardToken, Ownable {
event Mint(address indexed to, uint256 amount);
event MintFinished();
bool public mintingFinished = false;
modifier canMint() {
}
/**
* @dev Function to mint tokens
* @param _to The address that will recieve the minted tokens.
* @param _amount The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/
function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
}
/**
* @dev Function to stop minting new tokens.
* @return True if the operation was successful.
*/
function finishMinting() onlyOwner public returns (bool) {
}
}
contract MITx_Token is MintableToken {
string public name = "Morpheus Infrastructure Token";
string public symbol = "MITx";
uint256 public decimals = 18;
bool public tradingStarted = false;
/**
* @dev modifier that throws if trading has not started yet
*/
modifier hasStartedTrading() {
}
/**
* @dev Allows the owner to enable the trading. This can not be undone
*/
function startTrading() public onlyOwner {
}
/**
* @dev Allows anyone to transfer the MiT tokens once trading has started
* @param _to the recipient address of the tokens.
* @param _value number of tokens to be transfered.
*/
function transfer(address _to, uint _value) hasStartedTrading public returns (bool) {
}
/**
* @dev Allows anyone to transfer the MiT tokens once trading has started
* @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 uint the amout of tokens to be transfered
*/
function transferFrom(address _from, address _to, uint _value) hasStartedTrading public returns (bool) {
}
function emergencyERC20Drain( ERC20 oddToken, uint amount ) public {
}
}
contract MITx_TokenSale is Ownable {
using SafeMath for uint256;
// The token being sold
MITx_Token public token;
uint256 public decimals;
uint256 public oneCoin;
// start and end block where investments are allowed (both inclusive)
uint256 public startTimestamp;
uint256 public endTimestamp;
// timestamps for tiers
uint256 public tier1Timestamp;
uint256 public tier2Timestamp;
uint256 public tier3Timestamp;
// address where funds are collected
address public multiSig;
function setWallet(address _newWallet) public onlyOwner {
}
// These will be set by setTier()
uint256 public rate; // how many token units a buyer gets per wei
uint256 public minContribution = 0.0001 ether; // minimum contributio to participate in tokensale
uint256 public maxContribution = 200000 ether; // default limit to tokens that the users can buy
// ***************************
// amount of raised money in wei
uint256 public weiRaised;
// amount of raised tokens
uint256 public tokenRaised;
// maximum amount of tokens being created
uint256 public maxTokens;
// maximum amount of tokens for sale
uint256 public tokensForSale;
// number of participants in presale
uint256 public numberOfPurchasers = 0;
// for whitelist
address public cs;
// switch on/off the authorisation , default: true
bool public freeForAll = true;
mapping (address => bool) public authorised; // just to annoy the heck out of americans
event TokenPurchase(address indexed beneficiary, uint256 value, uint256 amount);
event SaleClosed();
function MITx_TokenSale() public {
}
/**
* @dev Calculates the amount of bonus coins the buyer gets
*/
function setTier() internal {
}
// @return true if crowdsale event has ended
function hasEnded() public constant returns (bool) {
}
/**
* @dev throws if person sending is not contract owner or cs role
*/
modifier onlyCSorOwner() {
require(<FILL_ME>)
_;
}
modifier onlyCS() {
}
/**
* @dev throws if person sending is not authorised or sends nothing
*/
modifier onlyAuthorised() {
}
/**
* @dev authorise an account to participate
*/
function authoriseAccount(address whom) onlyCSorOwner public {
}
/**
* @dev authorise a lot of accounts in one go
*/
function authoriseManyAccounts(address[] many) onlyCSorOwner public {
}
/**
* @dev ban an account from participation (default)
*/
function blockAccount(address whom) onlyCSorOwner public {
}
/**
* @dev set a new CS representative
*/
function setCS(address newCS) onlyOwner public {
}
/**
* @dev set a freeForAll to true ( in case you leave to anybody to send ethers)
*/
function switchONfreeForAll() onlyCSorOwner public {
}
/**
* @dev set a freeForAll to false ( in case you need to authorise the acconts)
*/
function switchOFFfreeForAll() onlyCSorOwner public {
}
function placeTokens(address beneficiary, uint256 _tokens) onlyCS public {
}
// low level token purchase function
function buyTokens(address beneficiary, uint256 amount) onlyAuthorised internal {
}
// transfer ownership of the token to the owner of the presale contract
function finishSale() public onlyOwner {
}
// fallback function can be used to buy tokens
function () public payable {
}
function emergencyERC20Drain( ERC20 oddToken, uint amount ) public {
}
}
| (msg.sender==owner)||(msg.sender==cs) | 43,038 | (msg.sender==owner)||(msg.sender==cs) |
Subsets and Splits