comment
stringlengths 1
211
⌀ | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
null | pragma solidity ^0.4.23;
contract TokenReclaim{
mapping (address=>string) internal _ethToSphtx;
mapping (string =>string) internal _accountToPubKey;
event AccountRegister (address ethAccount, string sphtxAccount, string pubKey);
function register(string name, string pubKey) public{
require(<FILL_ME>)
bytes memory b = bytes(name);
require( (b[0] >='a' && b[0] <='z') || (b[0] >='0' && b[0] <= '9'));
for(uint i=1;i< bytes(name).length; i++){
require( (b[i] >='a' && b[i] <='z') || (b[i] >='0' && b[i] <= '9') || b[i] == '-' || b[i] =='.' );
}
require(bytes(pubKey).length <= 64 && bytes(pubKey).length >= 50 );
require(bytes(_ethToSphtx[msg.sender]).length == 0 || keccak256(bytes((_ethToSphtx[msg.sender]))) == keccak256(bytes(name)));//check that the address is not yet registered;
require(bytes(_accountToPubKey[name]).length == 0 || keccak256(bytes((_ethToSphtx[msg.sender]))) == keccak256(bytes(name))); //check that the name is not yet used
_accountToPubKey[name] = pubKey;
_ethToSphtx[msg.sender] = name;
emit AccountRegister(msg.sender, name, pubKey);
}
function account(address addr) constant public returns (string){
}
function keys(address addr) constant public returns (string){
}
function nameAvailable(string name) constant public returns (bool){
}
}
| bytes(name).length>=3&&bytes(name).length<=16 | 396,358 | bytes(name).length>=3&&bytes(name).length<=16 |
null | pragma solidity ^0.4.23;
contract TokenReclaim{
mapping (address=>string) internal _ethToSphtx;
mapping (string =>string) internal _accountToPubKey;
event AccountRegister (address ethAccount, string sphtxAccount, string pubKey);
function register(string name, string pubKey) public{
require(bytes(name).length >= 3 && bytes(name).length <= 16);
bytes memory b = bytes(name);
require(<FILL_ME>)
for(uint i=1;i< bytes(name).length; i++){
require( (b[i] >='a' && b[i] <='z') || (b[i] >='0' && b[i] <= '9') || b[i] == '-' || b[i] =='.' );
}
require(bytes(pubKey).length <= 64 && bytes(pubKey).length >= 50 );
require(bytes(_ethToSphtx[msg.sender]).length == 0 || keccak256(bytes((_ethToSphtx[msg.sender]))) == keccak256(bytes(name)));//check that the address is not yet registered;
require(bytes(_accountToPubKey[name]).length == 0 || keccak256(bytes((_ethToSphtx[msg.sender]))) == keccak256(bytes(name))); //check that the name is not yet used
_accountToPubKey[name] = pubKey;
_ethToSphtx[msg.sender] = name;
emit AccountRegister(msg.sender, name, pubKey);
}
function account(address addr) constant public returns (string){
}
function keys(address addr) constant public returns (string){
}
function nameAvailable(string name) constant public returns (bool){
}
}
| (b[0]>='a'&&b[0]<='z')||(b[0]>='0'&&b[0]<='9') | 396,358 | (b[0]>='a'&&b[0]<='z')||(b[0]>='0'&&b[0]<='9') |
null | pragma solidity ^0.4.23;
contract TokenReclaim{
mapping (address=>string) internal _ethToSphtx;
mapping (string =>string) internal _accountToPubKey;
event AccountRegister (address ethAccount, string sphtxAccount, string pubKey);
function register(string name, string pubKey) public{
require(bytes(name).length >= 3 && bytes(name).length <= 16);
bytes memory b = bytes(name);
require( (b[0] >='a' && b[0] <='z') || (b[0] >='0' && b[0] <= '9'));
for(uint i=1;i< bytes(name).length; i++){
require(<FILL_ME>)
}
require(bytes(pubKey).length <= 64 && bytes(pubKey).length >= 50 );
require(bytes(_ethToSphtx[msg.sender]).length == 0 || keccak256(bytes((_ethToSphtx[msg.sender]))) == keccak256(bytes(name)));//check that the address is not yet registered;
require(bytes(_accountToPubKey[name]).length == 0 || keccak256(bytes((_ethToSphtx[msg.sender]))) == keccak256(bytes(name))); //check that the name is not yet used
_accountToPubKey[name] = pubKey;
_ethToSphtx[msg.sender] = name;
emit AccountRegister(msg.sender, name, pubKey);
}
function account(address addr) constant public returns (string){
}
function keys(address addr) constant public returns (string){
}
function nameAvailable(string name) constant public returns (bool){
}
}
| (b[i]>='a'&&b[i]<='z')||(b[i]>='0'&&b[i]<='9')||b[i]=='-'||b[i]=='.' | 396,358 | (b[i]>='a'&&b[i]<='z')||(b[i]>='0'&&b[i]<='9')||b[i]=='-'||b[i]=='.' |
null | pragma solidity ^0.4.23;
contract TokenReclaim{
mapping (address=>string) internal _ethToSphtx;
mapping (string =>string) internal _accountToPubKey;
event AccountRegister (address ethAccount, string sphtxAccount, string pubKey);
function register(string name, string pubKey) public{
require(bytes(name).length >= 3 && bytes(name).length <= 16);
bytes memory b = bytes(name);
require( (b[0] >='a' && b[0] <='z') || (b[0] >='0' && b[0] <= '9'));
for(uint i=1;i< bytes(name).length; i++){
require( (b[i] >='a' && b[i] <='z') || (b[i] >='0' && b[i] <= '9') || b[i] == '-' || b[i] =='.' );
}
require(<FILL_ME>)
require(bytes(_ethToSphtx[msg.sender]).length == 0 || keccak256(bytes((_ethToSphtx[msg.sender]))) == keccak256(bytes(name)));//check that the address is not yet registered;
require(bytes(_accountToPubKey[name]).length == 0 || keccak256(bytes((_ethToSphtx[msg.sender]))) == keccak256(bytes(name))); //check that the name is not yet used
_accountToPubKey[name] = pubKey;
_ethToSphtx[msg.sender] = name;
emit AccountRegister(msg.sender, name, pubKey);
}
function account(address addr) constant public returns (string){
}
function keys(address addr) constant public returns (string){
}
function nameAvailable(string name) constant public returns (bool){
}
}
| bytes(pubKey).length<=64&&bytes(pubKey).length>=50 | 396,358 | bytes(pubKey).length<=64&&bytes(pubKey).length>=50 |
null | pragma solidity ^0.4.23;
contract TokenReclaim{
mapping (address=>string) internal _ethToSphtx;
mapping (string =>string) internal _accountToPubKey;
event AccountRegister (address ethAccount, string sphtxAccount, string pubKey);
function register(string name, string pubKey) public{
require(bytes(name).length >= 3 && bytes(name).length <= 16);
bytes memory b = bytes(name);
require( (b[0] >='a' && b[0] <='z') || (b[0] >='0' && b[0] <= '9'));
for(uint i=1;i< bytes(name).length; i++){
require( (b[i] >='a' && b[i] <='z') || (b[i] >='0' && b[i] <= '9') || b[i] == '-' || b[i] =='.' );
}
require(bytes(pubKey).length <= 64 && bytes(pubKey).length >= 50 );
require(<FILL_ME>)//check that the address is not yet registered;
require(bytes(_accountToPubKey[name]).length == 0 || keccak256(bytes((_ethToSphtx[msg.sender]))) == keccak256(bytes(name))); //check that the name is not yet used
_accountToPubKey[name] = pubKey;
_ethToSphtx[msg.sender] = name;
emit AccountRegister(msg.sender, name, pubKey);
}
function account(address addr) constant public returns (string){
}
function keys(address addr) constant public returns (string){
}
function nameAvailable(string name) constant public returns (bool){
}
}
| bytes(_ethToSphtx[msg.sender]).length==0||keccak256(bytes((_ethToSphtx[msg.sender])))==keccak256(bytes(name)) | 396,358 | bytes(_ethToSphtx[msg.sender]).length==0||keccak256(bytes((_ethToSphtx[msg.sender])))==keccak256(bytes(name)) |
null | pragma solidity ^0.4.23;
contract TokenReclaim{
mapping (address=>string) internal _ethToSphtx;
mapping (string =>string) internal _accountToPubKey;
event AccountRegister (address ethAccount, string sphtxAccount, string pubKey);
function register(string name, string pubKey) public{
require(bytes(name).length >= 3 && bytes(name).length <= 16);
bytes memory b = bytes(name);
require( (b[0] >='a' && b[0] <='z') || (b[0] >='0' && b[0] <= '9'));
for(uint i=1;i< bytes(name).length; i++){
require( (b[i] >='a' && b[i] <='z') || (b[i] >='0' && b[i] <= '9') || b[i] == '-' || b[i] =='.' );
}
require(bytes(pubKey).length <= 64 && bytes(pubKey).length >= 50 );
require(bytes(_ethToSphtx[msg.sender]).length == 0 || keccak256(bytes((_ethToSphtx[msg.sender]))) == keccak256(bytes(name)));//check that the address is not yet registered;
require(<FILL_ME>) //check that the name is not yet used
_accountToPubKey[name] = pubKey;
_ethToSphtx[msg.sender] = name;
emit AccountRegister(msg.sender, name, pubKey);
}
function account(address addr) constant public returns (string){
}
function keys(address addr) constant public returns (string){
}
function nameAvailable(string name) constant public returns (bool){
}
}
| bytes(_accountToPubKey[name]).length==0||keccak256(bytes((_ethToSphtx[msg.sender])))==keccak256(bytes(name)) | 396,358 | bytes(_accountToPubKey[name]).length==0||keccak256(bytes((_ethToSphtx[msg.sender])))==keccak256(bytes(name)) |
"Request exceeds total supply" | pragma solidity >=0.7.0 <0.9.0;
contract MicroExplorers is ERC721, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = ".json";
uint256 public cost = 0.01 ether;
uint256 public maxSupply = 10000;
uint256 public maxMintAmount = 20;
uint256 public nextTokenId = 1;
bool public paused = false;
address owner1;
address owner2;
address owner3;
address owner4;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI,
address _owner1,
address _owner2,
address _owner3,
address _owner4
) ERC721(_name, _symbol) {
}
// internal
function _baseURI() internal view virtual override returns (string memory) {
}
// public
function mint(uint256 _mintAmount) public payable {
require(!paused, "Minting is currently paused");
require(_mintAmount > 0, "You cannot mint 0 Micro Explorers");
require(_mintAmount <= maxMintAmount, "Request exceeds max mint amount of 20");
require(<FILL_ME>)
uint256 totalMintPrice = cost * _mintAmount;
if (msg.sender != owner1 && msg.sender != owner2 && msg.sender != owner3 && msg.sender != owner4) {
require(msg.value >= totalMintPrice, "Value provided is less than total mint price");
}
for (uint256 i = 0; i < _mintAmount; i++) {
_safeMint(msg.sender, nextTokenId++);
}
if (msg.sender != owner1 && msg.sender != owner2 && msg.sender != owner3 && msg.sender != owner4) {
payable(owner1).transfer(totalMintPrice * 33 / 100);
payable(owner2).transfer(totalMintPrice * 33 / 100);
payable(owner3).transfer(totalMintPrice * 33 / 100);
payable(owner4).transfer(totalMintPrice/ 100);
}
}
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 setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
}
| nextTokenId-1+_mintAmount<=maxSupply,"Request exceeds total supply" | 396,438 | nextTokenId-1+_mintAmount<=maxSupply |
"max NFT limit exceeded" | 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.7.0 <0.9.0;
contract HighSchoolMisfits is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = ".json";
string public notRevealedUri;
uint256 public cost = .07 ether;
uint256 public maxSupply = 10000;
uint256 public preSupply = 500;
uint256 public maxMintAmount = 20;
uint256 public nftPerAddressLimit = 20;
bool public paused = false;
bool public revealed = false;
bool public onlypreSupply = true;
mapping(address => uint256) public addressMintedBalance;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI,
string memory _initNotRevealedUri
) ERC721(_name, _symbol) {
}
// internal
function _baseURI() internal view virtual override returns (string memory) {
}
// public
function mint(uint256 _mintAmount) public payable {
require(!paused, "the contract is paused");
uint256 supply = totalSupply();
require(_mintAmount > 0, "need to mint at least 1 NFT");
require(_mintAmount <= maxMintAmount, "max mint amount per session exceeded");
require(supply + _mintAmount <= maxSupply, "max NFT limit exceeded");
if (msg.sender != owner()) {
if(onlypreSupply == true) {
uint256 ownerMintedCount = addressMintedBalance[msg.sender];
require(ownerMintedCount + _mintAmount <= nftPerAddressLimit, "max NFT per address exceeded");
require(<FILL_ME>)
}
require(msg.value >= cost * _mintAmount, "insufficient funds");
}
for (uint256 i = 1; i <= _mintAmount; i++) {
addressMintedBalance[msg.sender]++;
_safeMint(msg.sender, 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 reveal() public onlyOwner {
}
function setNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setCost(uint256 _newCost) public onlyOwner {
}
function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner {
}
function setpreSupply(bool _state) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| supply+_mintAmount<=preSupply,"max NFT limit exceeded" | 396,445 | supply+_mintAmount<=preSupply |
null | //4,800 Stupid Fish Tanks that do not have fish inside and exist on the Ethereum Blockchain.
//0.02 ETH per mint, max 20 FISHTANKS per transaction.
//You can mint from contract or mint from website.
//https://twitter.com/stupidfishtank
//https://discord.gg/mjAUCr8bFC
//http://fishtank.fun/
pragma solidity ^0.8.0;
contract StupidFishTank is ERC721Enumerable, Ownable, RandomlyAssigned {
using Strings for uint256;
using SafeMath for uint256;
string public baseExtension = ".json";
uint256 public cost = 0.02 ether;
uint256 public maxFISHTANK = 4800;
uint256 public maxMintAmount = 20;
bool public paused = false;
string public baseURI = "https://ipfs.io/ipfs/QmPpLytTWYMCXuFZtZ6fdbN8jqS4LtnW3KfQSBi2BSyUNY/";
constructor(
) ERC721("Stupid Fish Tank", "FISHTANK")
RandomlyAssigned(4800, 1) {}
// internal
function _baseURI() internal view virtual override returns (string memory) {
}
// public
function mint(uint256 _mintAmount) public payable {
require(!paused);
require(_mintAmount > 0);
require(_mintAmount <= maxMintAmount);
require(<FILL_ME>)
require(msg.value >= cost * _mintAmount);
for (uint256 i = 1; i <= _mintAmount; i++) {
uint256 mintIndex = nextToken();
if (totalSupply() < maxFISHTANK) {
_safeMint(_msgSender(), mintIndex);
}
}
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
//only owner
function withdraw() public payable onlyOwner {
}
}
| totalSupply()+_mintAmount<=maxFISHTANK | 396,514 | totalSupply()+_mintAmount<=maxFISHTANK |
"Invalid buying token address" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeCast.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
contract BuyNLock is Ownable, Pausable {
using SafeERC20 for IERC20;
using SafeCast for uint256;
uint256 constant MAX_LOCK_TIME = 60 * 60 * 24 * 30; // 30 days
uint256 constant MAX_UNLOCKS_PER_TX = 500;
IERC20 public immutable buyingToken;
uint24 public lockTime;
IUniswapV2Router02 public immutable uniswapRouter;
struct Lock {
uint128 amount;
uint48 lockedAt;
}
struct User {
uint128 lockedAmountTotal;
uint128 indexToUnlock;
Lock[] locks;
}
mapping(address => User) public users;
event LockTimeChange(uint24 oldLockTime, uint24 newLockTime);
event BuyAndLock(address indexed user, IERC20 indexed sellingToken, uint amountSold, uint amountBought, uint lockedAt);
event Unlock(address indexed user, uint amountUnlocked, uint numberOfUnlocks);
constructor(IERC20 _buyingToken, uint24 _lockTime, IUniswapV2Router02 _uniswapRouter) {
require(<FILL_ME>)
require(address(_uniswapRouter) != address(0), "Invalid uniswap router address");
require(_lockTime <= MAX_LOCK_TIME, "Lock time > MAX lock time");
buyingToken = _buyingToken;
lockTime = _lockTime;
uniswapRouter = _uniswapRouter;
}
function pause() external onlyOwner {
}
function unpause() external onlyOwner {
}
function setLockTime(uint24 _lockTime) external onlyOwner {
}
function buyForERC20(uint256 amountToSell, uint256 minimumAmountToBuy, address[] calldata swapPath, uint256 swapDeadline) external whenNotPaused {
}
function buyForETH(uint256 minimumAmountToBuy, address[] calldata swapPath, uint256 swapDeadline) external payable whenNotPaused {
}
function unlockBoughtTokens(address userAddress) external {
}
function multiUnlockBoughtTokens(address[] calldata userAddresses) external {
}
// INTERNAL
function _lockBoughtTokens(uint128 amountBought) internal {
}
function _unlockBoughtTokens(address userAddress, uint128 unlockableAmount, uint128 unlocksCount) internal {
}
// VIEW
function getUnlockableAmount(address userAddress) public view returns (uint128, uint128) {
}
function getLockedAmount(address userAddress) external view returns (uint128) {
}
}
| address(_buyingToken)!=address(0),"Invalid buying token address" | 396,525 | address(_buyingToken)!=address(0) |
"Invalid uniswap router address" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeCast.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
contract BuyNLock is Ownable, Pausable {
using SafeERC20 for IERC20;
using SafeCast for uint256;
uint256 constant MAX_LOCK_TIME = 60 * 60 * 24 * 30; // 30 days
uint256 constant MAX_UNLOCKS_PER_TX = 500;
IERC20 public immutable buyingToken;
uint24 public lockTime;
IUniswapV2Router02 public immutable uniswapRouter;
struct Lock {
uint128 amount;
uint48 lockedAt;
}
struct User {
uint128 lockedAmountTotal;
uint128 indexToUnlock;
Lock[] locks;
}
mapping(address => User) public users;
event LockTimeChange(uint24 oldLockTime, uint24 newLockTime);
event BuyAndLock(address indexed user, IERC20 indexed sellingToken, uint amountSold, uint amountBought, uint lockedAt);
event Unlock(address indexed user, uint amountUnlocked, uint numberOfUnlocks);
constructor(IERC20 _buyingToken, uint24 _lockTime, IUniswapV2Router02 _uniswapRouter) {
require(address(_buyingToken) != address(0), "Invalid buying token address");
require(<FILL_ME>)
require(_lockTime <= MAX_LOCK_TIME, "Lock time > MAX lock time");
buyingToken = _buyingToken;
lockTime = _lockTime;
uniswapRouter = _uniswapRouter;
}
function pause() external onlyOwner {
}
function unpause() external onlyOwner {
}
function setLockTime(uint24 _lockTime) external onlyOwner {
}
function buyForERC20(uint256 amountToSell, uint256 minimumAmountToBuy, address[] calldata swapPath, uint256 swapDeadline) external whenNotPaused {
}
function buyForETH(uint256 minimumAmountToBuy, address[] calldata swapPath, uint256 swapDeadline) external payable whenNotPaused {
}
function unlockBoughtTokens(address userAddress) external {
}
function multiUnlockBoughtTokens(address[] calldata userAddresses) external {
}
// INTERNAL
function _lockBoughtTokens(uint128 amountBought) internal {
}
function _unlockBoughtTokens(address userAddress, uint128 unlockableAmount, uint128 unlocksCount) internal {
}
// VIEW
function getUnlockableAmount(address userAddress) public view returns (uint128, uint128) {
}
function getLockedAmount(address userAddress) external view returns (uint128) {
}
}
| address(_uniswapRouter)!=address(0),"Invalid uniswap router address" | 396,525 | address(_uniswapRouter)!=address(0) |
"Invalid token out" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeCast.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
contract BuyNLock is Ownable, Pausable {
using SafeERC20 for IERC20;
using SafeCast for uint256;
uint256 constant MAX_LOCK_TIME = 60 * 60 * 24 * 30; // 30 days
uint256 constant MAX_UNLOCKS_PER_TX = 500;
IERC20 public immutable buyingToken;
uint24 public lockTime;
IUniswapV2Router02 public immutable uniswapRouter;
struct Lock {
uint128 amount;
uint48 lockedAt;
}
struct User {
uint128 lockedAmountTotal;
uint128 indexToUnlock;
Lock[] locks;
}
mapping(address => User) public users;
event LockTimeChange(uint24 oldLockTime, uint24 newLockTime);
event BuyAndLock(address indexed user, IERC20 indexed sellingToken, uint amountSold, uint amountBought, uint lockedAt);
event Unlock(address indexed user, uint amountUnlocked, uint numberOfUnlocks);
constructor(IERC20 _buyingToken, uint24 _lockTime, IUniswapV2Router02 _uniswapRouter) {
}
function pause() external onlyOwner {
}
function unpause() external onlyOwner {
}
function setLockTime(uint24 _lockTime) external onlyOwner {
}
function buyForERC20(uint256 amountToSell, uint256 minimumAmountToBuy, address[] calldata swapPath, uint256 swapDeadline) external whenNotPaused {
require(swapPath.length > 1, "Invalid path length");
require(<FILL_ME>)
IERC20 sellingToken = IERC20(swapPath[0]);
require(sellingToken != buyingToken, "selling token == buying token");
if (sellingToken.allowance(address(this), address(uniswapRouter)) < amountToSell) {
sellingToken.safeApprove(address(uniswapRouter), 2 ** 256 - 1);
}
sellingToken.safeTransferFrom(msg.sender, address(this), amountToSell);
uint256 buyingTokenBalanceBefore = buyingToken.balanceOf(address(this));
IUniswapV2Router02(uniswapRouter).swapExactTokensForTokensSupportingFeeOnTransferTokens(
amountToSell,
minimumAmountToBuy,
swapPath,
address(this),
swapDeadline
);
uint128 amountBought = (buyingToken.balanceOf(address(this)) - buyingTokenBalanceBefore).toUint128();
_lockBoughtTokens(amountBought);
emit BuyAndLock(msg.sender, sellingToken, amountToSell, amountBought, block.timestamp);
}
function buyForETH(uint256 minimumAmountToBuy, address[] calldata swapPath, uint256 swapDeadline) external payable whenNotPaused {
}
function unlockBoughtTokens(address userAddress) external {
}
function multiUnlockBoughtTokens(address[] calldata userAddresses) external {
}
// INTERNAL
function _lockBoughtTokens(uint128 amountBought) internal {
}
function _unlockBoughtTokens(address userAddress, uint128 unlockableAmount, uint128 unlocksCount) internal {
}
// VIEW
function getUnlockableAmount(address userAddress) public view returns (uint128, uint128) {
}
function getLockedAmount(address userAddress) external view returns (uint128) {
}
}
| swapPath[swapPath.length-1]==address(buyingToken),"Invalid token out" | 396,525 | swapPath[swapPath.length-1]==address(buyingToken) |
"Not enough supply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/AccessControlEnumerable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./../../interfaces/IMintable.sol";
contract GenesisOath is
IMintable,
ERC1155,
ERC1155Supply,
AccessControlEnumerable,
ReentrancyGuard
{
using Address for address;
using Strings for string;
event Minted(
address indexed _to,
uint256 indexed _tokenId,
uint256 indexed _amount
);
event TokenURISet(uint256 indexed _tokenId, string indexed _tokenURI);
string public name = "Genesis Oath";
string public symbol = "MTNT";
uint256 public constant MAX_TIER_1 = 6000;
uint256 public constant TOKEN_ID_TIER_1 = 1;
uint256 public constant MAX_TIER_2 = 1000;
uint256 public constant TOKEN_ID_TIER_2 = 2;
bytes32 public constant MINTER_ROLE = keccak256("MINTER");
bytes32 public constant ADMIN_ROLE = 0x00;
bool public metadataFrozen;
mapping(uint256 => string) public tokenURIs;
constructor(address adminAddress, address devAddress)
ERC1155("")
ReentrancyGuard()
{
}
function mint(
address to,
uint256 tokenId,
uint256 amount
) public override nonReentrant onlyMinter {
require(
tokenId == TOKEN_ID_TIER_1 || tokenId == TOKEN_ID_TIER_2,
"Invalid token id"
);
uint256 tokenSupply = tokenId == TOKEN_ID_TIER_1
? totalSupply(TOKEN_ID_TIER_1)
: totalSupply(TOKEN_ID_TIER_2);
uint256 tokenMax = tokenId == TOKEN_ID_TIER_1 ? MAX_TIER_1 : MAX_TIER_2;
require(<FILL_ME>)
_mint(to, tokenId, amount, "");
emit Minted(to, tokenId, amount);
}
function uri(uint256 tokenId)
public
view
virtual
override(IERC1155MetadataURI, ERC1155)
returns (string memory)
{
}
function setURI(uint256 tokenId, string calldata tokenURI)
public
override
onlyMinter
{
}
function freezeMetadata() public onlyRole(ADMIN_ROLE) {
}
/*
* @note For OpenSea Integration
*/
function owner() public view returns (address) {
}
/*
* @dev Function access control handled by AccessControl contract
* @dev Internal role admin check resolves to DEFAULT_ADMIN_ROLE at 0x00
*/
function addMinterContract(address account) public {
}
/*
* @dev Function access control handled by AccessControl contract
* @dev Internal role admin check resolves to DEFAULT_ADMIN_ROLE at 0x00
*/
function removeMinterContract(address account) public {
}
/*
* @dev Function access control handled by AccessControl contract
* @dev Internal role admin check resolves to DEFAULT_ADMIN_ROLE at 0x00
*/
function grantAdminRole(address account) public {
}
/*
* @dev Function access control handled by AccessControl contract
* @dev Internal role admin check resolves to DEFAULT_ADMIN_ROLE at 0x00
*/
function removeAdminRole(address account) public {
}
function _grantRole(bytes32 role, address account)
internal
virtual
override
{
}
modifier onlyMinter() {
}
function validateMinter() private view {
}
function totalSupply(uint256 tokenId)
public
view
override(IMintable, ERC1155Supply)
returns (uint256)
{
}
function _beforeTokenTransfer(
address operator,
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal override(ERC1155Supply, ERC1155) {
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(AccessControlEnumerable, ERC1155, IERC165)
returns (bool)
{
}
}
| (amount+tokenSupply)<=tokenMax,"Not enough supply" | 396,581 | (amount+tokenSupply)<=tokenMax |
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 CreatorAble()
{
}
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)
{
}
function GetPartLimit(uint8 level, uint part) internal pure returns(uint8)
{
}
}
contract BasicAuth is Base
{
mapping(address => bool) auth_list;
modifier OwnerAble(address acc)
{
}
modifier AuthAble()
{
}
modifier ValidHandleAuth()
{
}
function SetAuth(address target) external ValidHandleAuth
{
}
function ClearAuth(address target) external ValidHandleAuth
{
}
}
contract StoreGift is BasicAuth
{
struct Gift
{
string m_Key;
uint m_Expire;
uint32[] m_ItemIdxList;
uint[] m_ItemNumlist;
}
mapping(address => mapping(string => bool)) g_Exchange;
mapping(string => Gift) g_Gifts;
function HasGift(string key) public view returns(bool)
{
}
function AddGift(string key, uint expire, uint32[] idxList, uint[] numList) external CreatorAble
{
require(<FILL_ME>)
require(now<expire || expire==0);
g_Gifts[key] = Gift({
m_Key : key,
m_Expire : expire,
m_ItemIdxList : idxList,
m_ItemNumlist : numList
});
}
function DelGift(string key) external CreatorAble
{
}
function GetGiftInfo(string key) external view returns(uint, uint32[], uint[])
{
}
function Exchange(address acc, string key) external OwnerAble(acc) AuthAble
{
}
function IsExchanged(address acc, string key) external view returns(bool)
{
}
}
| !HasGift(key) | 396,620 | !HasGift(key) |
"Party::__Party_init: NFT getOwner failed" | /*
__/\\\\\\\\\\\\\_____________________________________________________________/\\\\\\\\\\\\________/\\\\\\\\\__________/\\\\\______
_\/\\\/////////\\\__________________________________________________________\/\\\////////\\\____/\\\\\\\\\\\\\______/\\\///\\\____
_\/\\\_______\/\\\__________________________________/\\\_________/\\\__/\\\_\/\\\______\//\\\__/\\\/////////\\\___/\\\/__\///\\\__
_\/\\\\\\\\\\\\\/___/\\\\\\\\\_____/\\/\\\\\\\___/\\\\\\\\\\\___\//\\\/\\\__\/\\\_______\/\\\_\/\\\_______\/\\\__/\\\______\//\\\_
_\/\\\/////////____\////////\\\___\/\\\/////\\\_\////\\\////_____\//\\\\\___\/\\\_______\/\\\_\/\\\\\\\\\\\\\\\_\/\\\_______\/\\\_
_\/\\\_______________/\\\\\\\\\\__\/\\\___\///_____\/\\\__________\//\\\____\/\\\_______\/\\\_\/\\\/////////\\\_\//\\\______/\\\__
_\/\\\______________/\\\/////\\\__\/\\\____________\/\\\_/\\___/\\_/\\\_____\/\\\_______/\\\__\/\\\_______\/\\\__\///\\\__/\\\____
_\/\\\_____________\//\\\\\\\\/\\_\/\\\____________\//\\\\\___\//\\\\/______\/\\\\\\\\\\\\/___\/\\\_______\/\\\____\///\\\\\/_____
_\///_______________\////////\//__\///______________\/////_____\////________\////////////_____\///________\///_______\/////_______
Anna Carroll for PartyDAO
*/
// SPDX-License-Identifier: MIT
pragma solidity 0.8.5;
// ============ External Imports: Inherited Contracts ============
// NOTE: we inherit from OpenZeppelin upgradeable contracts
// because of the proxy structure used for cheaper deploys
// (the proxies are NOT actually upgradeable)
import {
ReentrancyGuardUpgradeable
} from "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
import {
ERC721HolderUpgradeable
} from "@openzeppelin/contracts-upgradeable/token/ERC721/utils/ERC721HolderUpgradeable.sol";
// ============ External Imports: External Contracts & Contract Interfaces ============
import {
IERC721VaultFactory
} from "./external/interfaces/IERC721VaultFactory.sol";
import {ITokenVault} from "./external/interfaces/ITokenVault.sol";
import {IWETH} from "./external/interfaces/IWETH.sol";
import {
IERC721Metadata
} from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import {
IERC20
} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
// ============ Internal Imports ============
import {Structs} from "./Structs.sol";
contract Party is ReentrancyGuardUpgradeable, ERC721HolderUpgradeable {
// ============ Enums ============
// State Transitions:
// (0) ACTIVE on deploy
// (1) WON if the Party has won the token
// (2) LOST if the Party is over & did not win the token
enum PartyStatus {ACTIVE, WON, LOST}
// ============ Structs ============
struct Contribution {
uint256 amount;
uint256 previousTotalContributedToParty;
}
// ============ Internal Constants ============
// tokens are minted at a rate of 1 ETH : 1000 tokens
uint16 internal constant TOKEN_SCALE = 1000;
// PartyDAO receives an ETH fee equal to 2.5% of the amount spent
uint16 internal constant ETH_FEE_BASIS_POINTS = 250;
// PartyDAO receives a token fee equal to 2.5% of the total token supply
uint16 internal constant TOKEN_FEE_BASIS_POINTS = 250;
// token is relisted on Fractional with an
// initial reserve price equal to 2x the price of the token
uint8 internal constant RESALE_MULTIPLIER = 2;
// ============ Immutables ============
address public immutable partyFactory;
address public immutable partyDAOMultisig;
IERC721VaultFactory public immutable tokenVaultFactory;
IWETH public immutable weth;
// ============ Public Not-Mutated Storage ============
// NFT contract
IERC721Metadata public nftContract;
// ID of token within NFT contract
uint256 public tokenId;
// Fractionalized NFT vault responsible for post-purchase experience
ITokenVault public tokenVault;
// the address that will receive a portion of the tokens
// if the Party successfully buys the token
address public splitRecipient;
// percent of the total token supply
// taken by the splitRecipient
uint256 public splitBasisPoints;
// address of token that users need to hold to contribute
// address(0) if party is not token gated
IERC20 public gatedToken;
// amount of token that users need to hold to contribute
// 0 if party is not token gated
uint256 public gatedTokenAmount;
// ERC-20 name and symbol for fractional tokens
string public name;
string public symbol;
// ============ Public Mutable Storage ============
// state of the contract
PartyStatus public partyStatus;
// total ETH deposited by all contributors
uint256 public totalContributedToParty;
// the total spent buying the token;
// 0 if the NFT is not won; price of token + 2.5% PartyDAO fee if NFT is won
uint256 public totalSpent;
// contributor => array of Contributions
mapping(address => Contribution[]) public contributions;
// contributor => total amount contributed
mapping(address => uint256) public totalContributed;
// contributor => true if contribution has been claimed
mapping(address => bool) public claimed;
// ============ Events ============
event Contributed(
address indexed contributor,
uint256 amount,
uint256 previousTotalContributedToParty,
uint256 totalFromContributor
);
event Claimed(
address indexed contributor,
uint256 totalContributed,
uint256 excessContribution,
uint256 tokenAmount
);
// ======== Modifiers =========
modifier onlyPartyDAO() {
}
// ======== Constructor =========
constructor(
address _partyDAOMultisig,
address _tokenVaultFactory,
address _weth
) {
}
// ======== Internal: Initialize =========
function __Party_init(
address _nftContract,
uint256 _tokenId,
Structs.AddressAndAmount calldata _split,
Structs.AddressAndAmount calldata _tokenGate,
string memory _name,
string memory _symbol
) internal {
require(msg.sender == partyFactory, "Party::__Party_init: only factory can init");
// validate token exists (must set nftContract & tokenId before _getOwner)
nftContract = IERC721Metadata(_nftContract);
tokenId = _tokenId;
require(<FILL_ME>)
// if split is non-zero,
if (_split.addr != address(0) && _split.amount != 0) {
// validate that party split won't retain the total token supply
uint256 _remainingBasisPoints = 10000 - TOKEN_FEE_BASIS_POINTS;
require(_split.amount < _remainingBasisPoints, "Party::__Party_init: basis points can't take 100%");
splitBasisPoints = _split.amount;
splitRecipient = _split.addr;
}
// if token gating is non-zero
if (_tokenGate.addr != address(0) && _tokenGate.amount != 0) {
// call totalSupply to verify that address is ERC-20 token contract
IERC20(_tokenGate.addr).totalSupply();
gatedToken = IERC20(_tokenGate.addr);
gatedTokenAmount = _tokenGate.amount;
}
// initialize ReentrancyGuard and ERC721Holder
__ReentrancyGuard_init();
__ERC721Holder_init();
// set storage variables
name = _name;
symbol = _symbol;
}
// ======== Internal: Contribute =========
/**
* @notice Contribute to the Party's treasury
* while the Party is still active
* @dev Emits a Contributed event upon success; callable by anyone
*/
function _contribute() internal {
}
// ======== External: Claim =========
/**
* @notice Claim the tokens and excess ETH owed
* to a single contributor after the party has ended
* @dev Emits a Claimed event upon success
* callable by anyone (doesn't have to be the contributor)
* @param _contributor the address of the contributor
*/
function claim(address _contributor) external nonReentrant {
}
// ======== External: Emergency Escape Hatches (PartyDAO Multisig Only) =========
/**
* @notice Escape hatch: in case of emergency,
* PartyDAO can use emergencyWithdrawEth to withdraw
* ETH stuck in the contract
*/
function emergencyWithdrawEth(uint256 _value)
external
onlyPartyDAO
{
}
/**
* @notice Escape hatch: in case of emergency,
* PartyDAO can use emergencyCall to call an external contract
* (e.g. to withdraw a stuck NFT or stuck ERC-20s)
*/
function emergencyCall(address _contract, bytes memory _calldata)
external
onlyPartyDAO
returns (bool _success, bytes memory _returnData)
{
}
/**
* @notice Escape hatch: in case of emergency,
* PartyDAO can force the Party to finalize with status LOST
* (e.g. if finalize is not callable)
*/
function emergencyForceLost()
external
onlyPartyDAO
{
}
// ======== Public: Utility Calculations =========
/**
* @notice Convert ETH value to equivalent token amount
*/
function valueToTokens(uint256 _value)
public
pure
returns (uint256 _tokens)
{
}
/**
* @notice The maximum amount that can be spent by the Party
* while paying the ETH fee to PartyDAO
* @return _maxSpend the maximum spend
*/
function getMaximumSpend() public view returns (uint256 _maxSpend) {
}
/**
* @notice Calculate the amount of fractional NFT tokens owed to the contributor
* based on how much ETH they contributed towards buying the token,
* and the amount of excess ETH owed to the contributor
* based on how much ETH they contributed *not* used towards buying the token
* @param _contributor the address of the contributor
* @return _tokenAmount the amount of fractional NFT tokens owed to the contributor
* @return _ethAmount the amount of excess ETH owed to the contributor
*/
function getClaimAmounts(address _contributor)
public
view
returns (uint256 _tokenAmount, uint256 _ethAmount)
{
}
/**
* @notice Calculate the total amount of a contributor's funds
* that were used towards the buying the token
* @dev always returns 0 until the party has been finalized
* @param _contributor the address of the contributor
* @return _total the sum of the contributor's funds that were
* used towards buying the token
*/
function totalEthUsed(address _contributor)
public
view
returns (uint256 _total)
{
}
// ============ Internal ============
function _closeSuccessfulParty(uint256 _nftCost) internal returns (uint256 _ethFee) {
}
/**
* @notice Calculate ETH fee for PartyDAO
* NOTE: Remove this fee causes a critical vulnerability
* allowing anyone to exploit a Party via price manipulation.
* See Security Review in README for more info.
* @return _fee the portion of _amount represented by scaling to ETH_FEE_BASIS_POINTS
*/
function _getEthFee(uint256 _amount) internal pure returns (uint256 _fee) {
}
/**
* @notice Calculate token amount for specified token recipient
* @return _totalSupply the total token supply
* @return _partyDAOAmount the amount of tokens for partyDAO fee,
* which is equivalent to TOKEN_FEE_BASIS_POINTS of total supply
* @return _splitRecipientAmount the amount of tokens for the token recipient,
* which is equivalent to splitBasisPoints of total supply
*/
function _getTokenInflationAmounts(uint256 _amountSpent)
internal
view
returns (uint256 _totalSupply, uint256 _partyDAOAmount, uint256 _splitRecipientAmount)
{
}
/**
* @notice Query the NFT contract to get the token owner
* @dev nftContract must implement the ERC-721 token standard exactly:
* function ownerOf(uint256 _tokenId) external view returns (address);
* See https://eips.ethereum.org/EIPS/eip-721
* @dev Returns address(0) if NFT token or NFT contract
* no longer exists (token burned or contract self-destructed)
* @return _owner the owner of the NFT
*/
function _getOwner() internal view returns (address _owner) {
}
/**
* @notice Upon winning the token, transfer the NFT
* to fractional.art vault & mint fractional ERC-20 tokens
*/
function _fractionalizeNFT(uint256 _amountSpent) internal {
}
// ============ Internal: Claim ============
/**
* @notice Calculate the amount of a single Contribution
* that was used towards buying the token
* @param _contribution the Contribution struct
* @return the amount of funds from this contribution
* that were used towards buying the token
*/
function _ethUsed(uint256 _totalSpent, Contribution memory _contribution)
internal
pure
returns (uint256)
{
}
// ============ Internal: TransferTokens ============
/**
* @notice Transfer tokens to a recipient
* @param _to recipient of tokens
* @param _value amount of tokens
*/
function _transferTokens(address _to, uint256 _value) internal {
}
// ============ Internal: TransferEthOrWeth ============
/**
* @notice Attempt to transfer ETH to a recipient;
* if transferring ETH fails, transfer WETH insteads
* @param _to recipient of ETH or WETH
* @param _value amount of ETH or WETH
*/
function _transferETHOrWETH(address _to, uint256 _value) internal {
}
/**
* @notice Attempt to transfer ETH to a recipient
* @dev Sending ETH is not guaranteed to succeed
* this method will return false if it fails.
* We will limit the gas used in transfers, and handle failure cases.
* @param _to recipient of ETH
* @param _value amount of ETH
*/
function _attemptETHTransfer(address _to, uint256 _value)
internal
returns (bool)
{
}
}
| _getOwner()!=address(0),"Party::__Party_init: NFT getOwner failed" | 396,626 | _getOwner()!=address(0) |
'Invalid Address' | pragma solidity ^0.5.10;
pragma experimental ABIEncoderV2;
/**
* @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.
*
* 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.
*/
contract Ownable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Returns true if the caller is the current owner.
*/
function isOwner() public view returns (bool) {
}
/**
* @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 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 onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
*/
function _transferOwnership(address newOwner) internal {
}
}
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see `ERC20Detailed`.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a `Transfer` event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through `transferFrom`. This is
* zero by default.
*
* This value changes when `approve` or `transferFrom` are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* > Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an `Approval` event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a `Transfer` event.
*/
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to `approve`. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* This test is non-exhaustive, and there may be false-negatives: during the
* execution of a contract's constructor, its address will be reported as
* not containing a contract.
*
* > It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*/
function isContract(address account) internal view returns (bool) {
}
/**
* @dev Converts an `address` into `address payable`. Note that this is
* simply a type cast: the actual underlying value is not changed.
*/
function toPayable(address account) internal pure returns (address payable) {
}
}
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* 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 {
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 {
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function callOptionalReturn(IERC20 token, bytes memory data) private {
}
}
contract Callable {
// Source: https://github.com/gnosis/MultiSigWallet/blob/master/contracts/MultiSigWallet.sol
// call has been separated into its own function in order to take advantage
// of the Solidity's code generator to produce a loop that copies tx.data into memory.
function external_call(address destination, uint value, uint dataOffset, uint dataLength, bytes memory data) internal returns (bool) {
}
}
contract IWETH is IERC20 {
function withdraw(uint256 amount) external;
}
contract ApprovalHandler is Ownable {
using SafeERC20 for IERC20;
function transferFrom(IERC20 erc, address sender, address receiver, uint256 numTokens) external onlyOwner {
}
}
contract DexTradingWithCollection is Ownable, Callable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
ApprovalHandler public approvalHandler;
event Trade(address indexed from, address indexed to, uint256 toAmount, address indexed trader, address[] exchanges, uint256 tradeType);
event BasisPointsSet(uint256 indexed newBasisPoints);
event BeneficiarySet(address indexed newBeneficiary);
event DexagSet(address indexed newDexag);
IWETH public WETH = IWETH(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2);
address payable beneficiary;
address payable dexag;
uint256 public basisPoints;
constructor(address payable _beneficiary, address payable _dexag, uint256 _basisPoints) public {
}
function trade(
IERC20 from,
IERC20 to,
uint256 fromAmount,
address[] memory exchanges,
address[] memory approvals,
bytes memory data,
uint256[] memory offsets,
uint256[] memory etherValues,
uint256 limitAmount,
uint256 tradeType
) public payable {
}
function tradeAndSend(
IERC20 from,
IERC20 to,
address payable recipient,
uint256 fromAmount,
address[] memory exchanges,
address[] memory approvals,
bytes memory data,
uint256[] memory offsets,
uint256[] memory etherValues,
uint256 limitAmount,
uint256 tradeType
) public payable {
}
function executeTrades(
IERC20 from,
address[] memory exchanges,
address[] memory approvals,
bytes memory data,
uint256[] memory offsets,
uint256[] memory etherValues) internal {
for (uint i = 0; i < exchanges.length; i++) {
// prevent calling the approvalHandler and check that exchange is a valid contract address
require(<FILL_ME>)
if (approvals[i] != address(0)) {
// handle approval if the aprovee is not the exchange address
approve(from, approvals[i]);
} else {
// handle approval if the approvee is the exchange address
approve(from, exchanges[i]);
}
// do trade
require(external_call(exchanges[i], etherValues[i], offsets[i], offsets[i + 1] - offsets[i], data), 'External Call Failed');
}
}
// ERC20 Utility Functions
function approve(IERC20 erc, address approvee) internal {
}
function viewBalance(IERC20 erc, address owner) internal view returns(uint256) {
}
function sendFunds(IERC20 erc, address payable receiver, uint256 funds) internal {
}
// Send collection amounts
function sendCollectionAmount(IERC20 erc, uint256 tradeReturn) internal {
}
// Contract Settings
function setbasisPoints(uint256 _basisPoints) external onlyOwner {
}
function setBeneficiary(address payable _beneficiary) external onlyOwner {
}
function setDexag(address payable _dexag) external {
}
/**
* @dev Returns true if `account` is a contract.
*
* This test is non-exhaustive, and there may be false-negatives: during the
* execution of a contract's constructor, its address will be reported as
* not containing a contract.
*
* > It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*/
function isContract(address account) internal view returns (bool) {
}
function withdrawWeth() external {
}
function () external payable {
}
}
| exchanges[i]!=address(approvalHandler)&&isContract(exchanges[i]),'Invalid Address' | 396,761 | exchanges[i]!=address(approvalHandler)&&isContract(exchanges[i]) |
'External Call Failed' | pragma solidity ^0.5.10;
pragma experimental ABIEncoderV2;
/**
* @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.
*
* 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.
*/
contract Ownable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Returns true if the caller is the current owner.
*/
function isOwner() public view returns (bool) {
}
/**
* @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 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 onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
*/
function _transferOwnership(address newOwner) internal {
}
}
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
/**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see `ERC20Detailed`.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a `Transfer` event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through `transferFrom`. This is
* zero by default.
*
* This value changes when `approve` or `transferFrom` are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* > Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an `Approval` event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a `Transfer` event.
*/
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to `approve`. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* This test is non-exhaustive, and there may be false-negatives: during the
* execution of a contract's constructor, its address will be reported as
* not containing a contract.
*
* > It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*/
function isContract(address account) internal view returns (bool) {
}
/**
* @dev Converts an `address` into `address payable`. Note that this is
* simply a type cast: the actual underlying value is not changed.
*/
function toPayable(address account) internal pure returns (address payable) {
}
}
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* 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 {
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 {
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function callOptionalReturn(IERC20 token, bytes memory data) private {
}
}
contract Callable {
// Source: https://github.com/gnosis/MultiSigWallet/blob/master/contracts/MultiSigWallet.sol
// call has been separated into its own function in order to take advantage
// of the Solidity's code generator to produce a loop that copies tx.data into memory.
function external_call(address destination, uint value, uint dataOffset, uint dataLength, bytes memory data) internal returns (bool) {
}
}
contract IWETH is IERC20 {
function withdraw(uint256 amount) external;
}
contract ApprovalHandler is Ownable {
using SafeERC20 for IERC20;
function transferFrom(IERC20 erc, address sender, address receiver, uint256 numTokens) external onlyOwner {
}
}
contract DexTradingWithCollection is Ownable, Callable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
ApprovalHandler public approvalHandler;
event Trade(address indexed from, address indexed to, uint256 toAmount, address indexed trader, address[] exchanges, uint256 tradeType);
event BasisPointsSet(uint256 indexed newBasisPoints);
event BeneficiarySet(address indexed newBeneficiary);
event DexagSet(address indexed newDexag);
IWETH public WETH = IWETH(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2);
address payable beneficiary;
address payable dexag;
uint256 public basisPoints;
constructor(address payable _beneficiary, address payable _dexag, uint256 _basisPoints) public {
}
function trade(
IERC20 from,
IERC20 to,
uint256 fromAmount,
address[] memory exchanges,
address[] memory approvals,
bytes memory data,
uint256[] memory offsets,
uint256[] memory etherValues,
uint256 limitAmount,
uint256 tradeType
) public payable {
}
function tradeAndSend(
IERC20 from,
IERC20 to,
address payable recipient,
uint256 fromAmount,
address[] memory exchanges,
address[] memory approvals,
bytes memory data,
uint256[] memory offsets,
uint256[] memory etherValues,
uint256 limitAmount,
uint256 tradeType
) public payable {
}
function executeTrades(
IERC20 from,
address[] memory exchanges,
address[] memory approvals,
bytes memory data,
uint256[] memory offsets,
uint256[] memory etherValues) internal {
for (uint i = 0; i < exchanges.length; i++) {
// prevent calling the approvalHandler and check that exchange is a valid contract address
require(exchanges[i] != address(approvalHandler) && isContract(exchanges[i]), 'Invalid Address');
if (approvals[i] != address(0)) {
// handle approval if the aprovee is not the exchange address
approve(from, approvals[i]);
} else {
// handle approval if the approvee is the exchange address
approve(from, exchanges[i]);
}
// do trade
require(<FILL_ME>)
}
}
// ERC20 Utility Functions
function approve(IERC20 erc, address approvee) internal {
}
function viewBalance(IERC20 erc, address owner) internal view returns(uint256) {
}
function sendFunds(IERC20 erc, address payable receiver, uint256 funds) internal {
}
// Send collection amounts
function sendCollectionAmount(IERC20 erc, uint256 tradeReturn) internal {
}
// Contract Settings
function setbasisPoints(uint256 _basisPoints) external onlyOwner {
}
function setBeneficiary(address payable _beneficiary) external onlyOwner {
}
function setDexag(address payable _dexag) external {
}
/**
* @dev Returns true if `account` is a contract.
*
* This test is non-exhaustive, and there may be false-negatives: during the
* execution of a contract's constructor, its address will be reported as
* not containing a contract.
*
* > It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*/
function isContract(address account) internal view returns (bool) {
}
function withdrawWeth() external {
}
function () external payable {
}
}
| external_call(exchanges[i],etherValues[i],offsets[i],offsets[i+1]-offsets[i],data),'External Call Failed' | 396,761 | external_call(exchanges[i],etherValues[i],offsets[i],offsets[i+1]-offsets[i],data) |
"Address already made a bet" | pragma solidity ^0.4.24;
contract ERC20Token {
function transferFrom(address from, address to, uint value);
function transfer(address recipient, uint256 amount);
}
contract Stats {
function getDay( uint128 day) public view returns (uint);
}
contract NcovDeadPool {
struct Bet {
uint256 amount;
uint128 day;
uint256 infections;
}
Stats statsc = Stats(0x8413746B162795eFf7d3C8a90e32B8921413b802);
function abssub(uint256 a, uint256 b) internal pure returns (uint256) {
}
ERC20Token tok = ERC20Token(0x10Ef64cb79Fd4d75d4Aa7e8502d95C42124e434b);
mapping(address => Bet) public bets;
function bet(uint256 amount, uint128 day, uint256 infections) public {
require(<FILL_ME>)
require(amount <= 50000000000000000000000 && amount >= 0, "Amount must be between 0 and 50k");
require(statsc.getDay(day) == 0, "Past dates not allowed");
tok.transferFrom(msg.sender, address(this), amount);
bets[msg.sender] = Bet({amount:amount, day:day, infections:infections});
}
function reward(uint256 amount) internal {
}
function claim() public {
}
}
| bets[msg.sender].amount==0,"Address already made a bet" | 396,775 | bets[msg.sender].amount==0 |
"Past dates not allowed" | pragma solidity ^0.4.24;
contract ERC20Token {
function transferFrom(address from, address to, uint value);
function transfer(address recipient, uint256 amount);
}
contract Stats {
function getDay( uint128 day) public view returns (uint);
}
contract NcovDeadPool {
struct Bet {
uint256 amount;
uint128 day;
uint256 infections;
}
Stats statsc = Stats(0x8413746B162795eFf7d3C8a90e32B8921413b802);
function abssub(uint256 a, uint256 b) internal pure returns (uint256) {
}
ERC20Token tok = ERC20Token(0x10Ef64cb79Fd4d75d4Aa7e8502d95C42124e434b);
mapping(address => Bet) public bets;
function bet(uint256 amount, uint128 day, uint256 infections) public {
require(bets[msg.sender].amount == 0, "Address already made a bet");
require(amount <= 50000000000000000000000 && amount >= 0, "Amount must be between 0 and 50k");
require(<FILL_ME>)
tok.transferFrom(msg.sender, address(this), amount);
bets[msg.sender] = Bet({amount:amount, day:day, infections:infections});
}
function reward(uint256 amount) internal {
}
function claim() public {
}
}
| statsc.getDay(day)==0,"Past dates not allowed" | 396,775 | statsc.getDay(day)==0 |
"No bet found" | pragma solidity ^0.4.24;
contract ERC20Token {
function transferFrom(address from, address to, uint value);
function transfer(address recipient, uint256 amount);
}
contract Stats {
function getDay( uint128 day) public view returns (uint);
}
contract NcovDeadPool {
struct Bet {
uint256 amount;
uint128 day;
uint256 infections;
}
Stats statsc = Stats(0x8413746B162795eFf7d3C8a90e32B8921413b802);
function abssub(uint256 a, uint256 b) internal pure returns (uint256) {
}
ERC20Token tok = ERC20Token(0x10Ef64cb79Fd4d75d4Aa7e8502d95C42124e434b);
mapping(address => Bet) public bets;
function bet(uint256 amount, uint128 day, uint256 infections) public {
}
function reward(uint256 amount) internal {
}
function claim() public {
require(<FILL_ME>)
uint resinf = statsc.getDay(bets[msg.sender].day);
require(resinf > 0, "No burn happened yet");
uint myinf = bets[msg.sender].infections;
uint diffinf = abssub(resinf, myinf);
uint myamount = bets[msg.sender].amount;
if (diffinf <= 50000000000000000000) {
reward(myamount*3);
} else if (diffinf <= 80000000000000000000) {
reward(myamount*2);
} else if (diffinf <= 200000000000000000000) {
reward(myamount*3/2);
} else if (diffinf <= 300000000000000000000) {
reward(myamount*13/10);
} else if (diffinf <= 400000000000000000000) {
reward(myamount*6/5);
} else if (diffinf <= 500000000000000000000) {
reward(myamount*11/10);
} else {
bets[msg.sender] = Bet({amount:0, day:0, infections:0});
}
}
}
| bets[msg.sender].amount>0,"No bet found" | 396,775 | bets[msg.sender].amount>0 |
null | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
contract Basket is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = ".json";
uint256 public cost = 0.2 ether;
uint256 public presaleCost = 0.1 ether;
uint256 public maxSupply = 505;
bool public paused = true;
bool public inPreSale = true;
mapping(address => bool) public presaleWallets;
address public seller;
uint public preSaleCount;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI,
address _seller
) ERC721(_name, _symbol) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setSeller(address _seller) external onlyOwner {
}
function mint(uint256 _mintAmount) public payable {
uint256 supply = totalSupply();
require(!paused);
require(_mintAmount > 0);
require(supply + _mintAmount <= maxSupply);
if (msg.sender != owner()) {
if(inPreSale == true){
require(preSaleCount < 101, "Presale sold out");
require(<FILL_ME>)
require(msg.value >= presaleCost * _mintAmount);
preSaleCount++;
if(preSaleCount == 101) {
inPreSale = false;
}
}
else{
require(msg.value >= cost * _mintAmount);
}
}
for (uint256 i = 1; i <= _mintAmount; i++) {
_safeMint(msg.sender, supply + i);
}
payable(seller).transfer(msg.value);
}
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 setPresaleCost(uint256 _newCost) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension)
public
onlyOwner
{
}
function _price() external view returns (uint) {
}
function pause(bool _state) public onlyOwner {
}
function changePreSale() public onlyOwner {
}
function addPresaleUser(address _user) public onlyOwner {
}
function addMultiplePresaleUser(address[] memory _user) public onlyOwner {
}
function removePresaleUser(address _user) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| presaleWallets[msg.sender] | 396,827 | presaleWallets[msg.sender] |
"not owner" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
contract Staking is Ownable, Pausable {
using EnumerableSet for EnumerableSet.UintSet;
uint256 public constant SECONDS_IN_DAY = 24 * 60 * 60;
uint256 internal _rate;
uint256[] internal _tiers;
uint256[] internal _accelerators;
address public erc20Address;
address public erc721Address;
mapping(address => EnumerableSet.UintSet) internal _depositedIds;
mapping(address => mapping(uint256 => uint256)) internal _depositedAt;
constructor(address _erc721Address, address _erc20Address) {
}
function deposit(uint256[] calldata tokenIds) external whenNotPaused {
}
function withdraw(uint256[] calldata tokenIds) external whenNotPaused {
uint256 totalRewards;
uint256 accelerator = _accelerator(_depositedIds[msg.sender].length());
for (uint256 i; i < tokenIds.length; i++) {
require(<FILL_ME>)
totalRewards += _earned(_depositedAt[msg.sender][tokenIds[i]], accelerator);
_depositedIds[msg.sender].remove(tokenIds[i]);
delete _depositedAt[msg.sender][tokenIds[i]];
IERC721(erc721Address).safeTransferFrom(address(this), msg.sender, tokenIds[i]);
}
IERC20(erc20Address).mint(msg.sender, totalRewards);
}
function claim() external whenNotPaused {
}
function _accelerator(uint256 tokens) internal view returns (uint256) {
}
function _earned(uint256 timestamp, uint256 accelerator) internal view returns (uint256) {
}
function depositsOf(address wallet) external view returns (uint256[] memory) {
}
function depositedAt(address wallet, uint256 tokenId) external view returns (uint256) {
}
function tier(uint256 tokensAmount) external view returns (uint256) {
}
function rewardsOf(address wallet) external view returns (uint256[] memory) {
}
function pause() public onlyOwner {
}
function unpause() external onlyOwner {
}
function rate() external view returns (uint256) {
}
function setRate(uint256 newRate) external onlyOwner {
}
function tiers() external view returns (uint256[] memory) {
}
function accelerators() external view returns (uint256[] memory) {
}
function setERC20Contract(address _erc20Address) external onlyOwner {
}
function setERC721Contract(address _erc721Address) external onlyOwner {
}
function setTiers(uint256[] memory newTiers, uint256[] memory newAccelerators) external onlyOwner {
}
function emergencyWithdrawERC721Tokens(uint256[] calldata tokens, address receiver) external onlyOwner {
}
}
interface IERC721 {
function transferFrom(
address from,
address to,
uint256 id
) external;
function safeTransferFrom(
address from,
address to,
uint256 id
) external;
function ownerOf(uint256 tokenId) external view returns (address owner);
}
interface IERC20 {
function mint(address to, uint256 amount) external;
}
| _depositedIds[msg.sender].contains(tokenIds[i]),"not owner" | 396,843 | _depositedIds[msg.sender].contains(tokenIds[i]) |
"Tokens have already been locked up for the given address" | pragma solidity 0.5.14;
contract TimeLockTokenEscrow is ReentrancyGuard {
event Lockup(
address indexed _beneficiary,
uint256 indexed _amount,
uint256 _lockedUntil
);
event Withdrawal(
address indexed _beneficiary,
address indexed _caller
);
struct TimeLock {
uint256 amount;
uint256 lockedUntil;
}
IERC20 public token;
mapping(address => TimeLock) public beneficiaryToTimeLock;
constructor(IERC20 _token) public {
}
function lock(address _beneficiary, uint256 _amount, uint256 _lockedUntil) external nonReentrant {
require(_beneficiary != address(0), "You cannot lock up tokens for the zero address");
require(_amount > 0, "Lock up amount of zero tokens is invalid");
require(<FILL_ME>)
require(token.allowance(msg.sender, address(this)) >= _amount, "The contract does not have enough of an allowance to escrow");
beneficiaryToTimeLock[_beneficiary] = TimeLock({
amount: _amount,
lockedUntil: _lockedUntil
});
bool transferSuccess = token.transferFrom(msg.sender, address(this), _amount);
require(transferSuccess, "Failed to escrow tokens into the contract");
emit Lockup(_beneficiary, _amount, _lockedUntil);
}
function withdrawal(address _beneficiary) external nonReentrant {
}
}
| beneficiaryToTimeLock[_beneficiary].amount==0,"Tokens have already been locked up for the given address" | 396,916 | beneficiaryToTimeLock[_beneficiary].amount==0 |
null | //
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount)
external
returns (bool);
function allowance(address owner, address spender)
external
view
returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
}
contract Ownable is Context {
address private _owner;
address private _previousOwner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
}
contract RSG is Context, IERC20, Ownable {
using SafeMath for uint256;
string private constant _name = "Ready Set Go";
string private constant _symbol = "RSG";
uint8 private constant _decimals = 9;
// RFI
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isExcludedFromFee;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 1000000000000 * 10**9;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
uint256 private _taxFee = 0; // 0%
uint256 private _buytax = 10; //
uint256 private _teamFee;
uint256 private _sellTax = 10; //
uint256 private _previousTaxFee = _taxFee;
uint256 private _previousteamFee = _teamFee;
uint256 private _numOfTokensToExchangeForTeam = 500000 * 10**9;
uint256 private _routermax = 2500000000 * 10**9;
// Bot detection
mapping(address => bool) private bots;
mapping(address => bool) private whitelist;
mapping(address => uint256) private cooldown;
address payable private _MarketTax;
address payable private _Dev;
address payable private _DevTax;
IUniswapV2Router02 private uniswapV2Router;
address private uniswapV2Pair;
bool private tradingOpen;
bool private inSwap = false;
bool private transfertax = true;
bool private CEX = false;
bool private swapEnabled = false;
uint256 private _maxTxAmount = _tTotal;
uint256 public launchBlock;
event MaxTxAmountUpdated(uint256 _maxTxAmount);
modifier lockTheSwap {
}
constructor(address payable markettax, address payable devtax, address payable dev) {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount)
public
override
returns (bool)
{
}
function allowance(address owner, address spender)
public
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
public
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override returns (bool) {
}
function tokenFromReflection(uint256 rAmount)
private
view
returns (uint256)
{
}
function removeAllFee() private {
}
function restoreAllFee() private {
}
function _approve(
address owner,
address spender,
uint256 amount
) private {
}
function _transfer(
address from,
address to,
uint256 amount
) private {
}
function isExcluded(address account) public view returns (bool) {
}
function isBlackListed(address account) public view returns (bool) {
}
function isWhiteListed(address account) public view returns (bool) {
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap{
}
function sendETHToFee(uint256 amount) private {
}
function openTrading() external onlyOwner() {
}
function setSwapEnabled(bool enabled) external {
require(<FILL_ME>)
swapEnabled = enabled;
}
function TransferTax(bool enabled) external {
}
function AddToCEX (bool enabled) external {
}
function manualswap() external {
}
function manualswapcustom(uint256 percentage) external {
}
function manualsend() external {
}
function setBots(address[] memory bots_) public onlyOwner() {
}
function delBot(address notbot) public onlyOwner() {
}
function _tokenTransfer(
address sender,
address recipient,
uint256 amount,
bool takeFee
) private {
}
function _transferStandard(
address sender,
address recipient,
uint256 tAmount
) private {
}
function _takeTeam(uint256 tTeam) private {
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
receive() external payable {}
function _getValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256,
uint256,
uint256
)
{
}
function _getTValues(
uint256 tAmount,
uint256 taxFee,
uint256 TeamFee
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function _getRValues(
uint256 tAmount,
uint256 tFee,
uint256 tTeam,
uint256 currentRate
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function _getRate() private view returns (uint256) {
}
function _getCurrentSupply() private view returns (uint256, uint256) {
}
function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() {
}
function setRouterPercent(uint256 maxRouterPercent) external {
}
function _setSellTax(uint256 selltax) external onlyOwner() {
}
function _setBuyTax(uint256 buytax) external onlyOwner() {
}
function excludeFromFee(address account) public onlyOwner {
}
function setMarket(address payable account) external {
}
function setDev(address payable account) external {
}
function setDevpay(address payable account) external {
}
function _ZeroSellTax() external {
}
function _ZeroBuyTax() external {
}
}
| _msgSender()==_Dev | 396,946 | _msgSender()==_Dev |
null | //
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount)
external
returns (bool);
function allowance(address owner, address spender)
external
view
returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
}
contract Ownable is Context {
address private _owner;
address private _previousOwner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
}
contract RSG is Context, IERC20, Ownable {
using SafeMath for uint256;
string private constant _name = "Ready Set Go";
string private constant _symbol = "RSG";
uint8 private constant _decimals = 9;
// RFI
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isExcludedFromFee;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 1000000000000 * 10**9;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
uint256 private _taxFee = 0; // 0%
uint256 private _buytax = 10; //
uint256 private _teamFee;
uint256 private _sellTax = 10; //
uint256 private _previousTaxFee = _taxFee;
uint256 private _previousteamFee = _teamFee;
uint256 private _numOfTokensToExchangeForTeam = 500000 * 10**9;
uint256 private _routermax = 2500000000 * 10**9;
// Bot detection
mapping(address => bool) private bots;
mapping(address => bool) private whitelist;
mapping(address => uint256) private cooldown;
address payable private _MarketTax;
address payable private _Dev;
address payable private _DevTax;
IUniswapV2Router02 private uniswapV2Router;
address private uniswapV2Pair;
bool private tradingOpen;
bool private inSwap = false;
bool private transfertax = true;
bool private CEX = false;
bool private swapEnabled = false;
uint256 private _maxTxAmount = _tTotal;
uint256 public launchBlock;
event MaxTxAmountUpdated(uint256 _maxTxAmount);
modifier lockTheSwap {
}
constructor(address payable markettax, address payable devtax, address payable dev) {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount)
public
override
returns (bool)
{
}
function allowance(address owner, address spender)
public
view
override
returns (uint256)
{
}
function approve(address spender, uint256 amount)
public
override
returns (bool)
{
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override returns (bool) {
}
function tokenFromReflection(uint256 rAmount)
private
view
returns (uint256)
{
}
function removeAllFee() private {
}
function restoreAllFee() private {
}
function _approve(
address owner,
address spender,
uint256 amount
) private {
}
function _transfer(
address from,
address to,
uint256 amount
) private {
}
function isExcluded(address account) public view returns (bool) {
}
function isBlackListed(address account) public view returns (bool) {
}
function isWhiteListed(address account) public view returns (bool) {
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap{
}
function sendETHToFee(uint256 amount) private {
}
function openTrading() external onlyOwner() {
}
function setSwapEnabled(bool enabled) external {
}
function TransferTax(bool enabled) external {
}
function AddToCEX (bool enabled) external {
}
function manualswap() external {
}
function manualswapcustom(uint256 percentage) external {
}
function manualsend() external {
}
function setBots(address[] memory bots_) public onlyOwner() {
require(<FILL_ME>)
for (uint256 i = 0; i < bots_.length; i++) {
bots[bots_[i]] = true;
}
}
function delBot(address notbot) public onlyOwner() {
}
function _tokenTransfer(
address sender,
address recipient,
uint256 amount,
bool takeFee
) private {
}
function _transferStandard(
address sender,
address recipient,
uint256 tAmount
) private {
}
function _takeTeam(uint256 tTeam) private {
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
receive() external payable {}
function _getValues(uint256 tAmount)
private
view
returns (
uint256,
uint256,
uint256,
uint256,
uint256,
uint256
)
{
}
function _getTValues(
uint256 tAmount,
uint256 taxFee,
uint256 TeamFee
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function _getRValues(
uint256 tAmount,
uint256 tFee,
uint256 tTeam,
uint256 currentRate
)
private
pure
returns (
uint256,
uint256,
uint256
)
{
}
function _getRate() private view returns (uint256) {
}
function _getCurrentSupply() private view returns (uint256, uint256) {
}
function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() {
}
function setRouterPercent(uint256 maxRouterPercent) external {
}
function _setSellTax(uint256 selltax) external onlyOwner() {
}
function _setBuyTax(uint256 buytax) external onlyOwner() {
}
function excludeFromFee(address account) public onlyOwner {
}
function setMarket(address payable account) external {
}
function setDev(address payable account) external {
}
function setDevpay(address payable account) external {
}
function _ZeroSellTax() external {
}
function _ZeroBuyTax() external {
}
}
| !CEX | 396,946 | !CEX |
"PauserRole: caller does not have the Pauser role" | pragma solidity ^0.5.0;
/**
* @dev Ownership powers are based on amount of BitoplexOwnership (BLXO) tokens held.
* Each full token represents 1 share of Bitoplex, in return
* each share represents 1% of Net income.
* Shares come with voting responsibility, higher amount of shares means higher voting powers.
* @dev with great powers comes great responsibility.
*/
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract ERC20 is IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
function totalSupply() public view returns (uint256) {
}
function balanceOf(address account) public view returns (uint256) {
}
function transfer(address recipient, uint256 amount) public returns (bool) {
}
function allowance(address owner, address spender) public view returns (uint256) {
}
function approve(address spender, uint256 value) public returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
}
function _transfer(address sender, address recipient, uint256 amount) internal {
}
function _mint(address account, uint256 amount) internal {
}
function _burn(address account, uint256 value) internal {
}
function _approve(address owner, address spender, uint256 value) internal {
}
function _burnFrom(address account, uint256 amount) internal {
}
}
contract ERC20Detailed is IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
constructor (string memory name, string memory symbol, uint8 decimals) public {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
}
library Roles {
struct Role {
mapping (address => bool) bearer;
}
function add(Role storage role, address account) internal {
}
function remove(Role storage role, address account) internal {
}
function has(Role storage role, address account) internal view returns (bool) {
}
}
contract MinterRole {
using Roles for Roles.Role;
event MinterAdded(address indexed account);
event MinterRemoved(address indexed account);
Roles.Role private _minters;
constructor () internal {
}
modifier onlyMinter() {
}
function isMinter(address account) public view returns (bool) {
}
function addMinter(address account) public onlyMinter {
}
function renounceMinter() public {
}
function _addMinter(address account) internal {
}
function _removeMinter(address account) internal {
}
}
contract ERC20Mintable is ERC20, MinterRole {
function mint(address account, uint256 amount) public onlyMinter returns (bool) {
}
}
contract ERC20Burnable is ERC20 {
function burn(uint256 amount) public {
}
function burnFrom(address account, uint256 amount) public {
}
}
contract Context {
constructor () internal { }
function _msgSender() internal view returns (address payable) {
}
function _msgData() internal view returns (bytes memory) {
}
}
contract PauserRole is Context {
using Roles for Roles.Role;
event PauserAdded(address indexed account);
event PauserRemoved(address indexed account);
Roles.Role private _pausers;
constructor () internal {
}
modifier onlyPauser() {
require(<FILL_ME>)
_;
}
function isPauser(address account) public view returns (bool) {
}
function addPauser(address account) public onlyPauser {
}
function renouncePauser() public {
}
function _addPauser(address account) internal {
}
function _removePauser(address account) internal {
}
}
contract Pausable is Context, PauserRole {
event Paused(address account);
event Unpaused(address account);
bool private _paused;
constructor () internal {
}
function paused() public view returns (bool) {
}
modifier whenNotPaused() {
}
modifier whenPaused() {
}
function pause() public onlyPauser whenNotPaused {
}
function unpause() public onlyPauser whenPaused {
}
}
contract ERC20Pausable is ERC20, Pausable {
function transfer(address to, uint256 value) public whenNotPaused returns (bool) {
}
function transferFrom(address from, address to, uint256 value) public whenNotPaused returns (bool) {
}
function approve(address spender, uint256 value) public whenNotPaused returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public whenNotPaused returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public whenNotPaused returns (bool) {
}
}
contract BitoplexOwnership is ERC20, ERC20Detailed, ERC20Mintable, ERC20Burnable, ERC20Pausable {
constructor () public ERC20Detailed("BitoplexOwnership", "BLXO", 18) {
}
}
| isPauser(_msgSender()),"PauserRole: caller does not have the Pauser role" | 396,950 | isPauser(_msgSender()) |
"Max NFT per address exceeded" | pragma solidity >=0.8.0;
contract DAPEYC is ERC721Enumerable, Ownable {
using Strings for uint256;
using SafeMath for uint;
string public baseURI;
string public baseExtension = ".json";
string public notRevealedUri;
uint256 public cost = 0.055 ether;
uint256 public maxSupply = 3333;
uint256 public maxMintAmount = 10;
uint256 public nftPerAddressLimit = 3;
bool public paused = false;
bool public revealed = false;
bool public onlyWhitelisted = true;
address[] public whitelistedAddresses;
mapping(address => uint256) public addressMintedBalance;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI,
string memory _initNotRevealedUri
) ERC721(_name, _symbol) {
}
// internal
function _baseURI() internal view virtual override returns (string memory) {
}
// public
function mintDape(uint256 _mintAmount) public payable {
require(!paused, "The contract is paused");
uint256 supply = totalSupply();
require(_mintAmount > 0, "You need to mint at least 1 NFT");
require(_mintAmount <= maxMintAmount, "You've exceeded the max mint amount for this session");
require(supply.add( _mintAmount) <= maxSupply, "Max NFT limit exceeded");
if (msg.sender != owner()) {
if(onlyWhitelisted == true) {
require(isWhitelisted(msg.sender), "User is not whitelisted");
uint256 ownerMintedCount = addressMintedBalance[msg.sender];
require(<FILL_ME>)
}
require(msg.value >= cost.mul(_mintAmount), "Insufficient funds");
}
for (uint256 i = 1; i <= _mintAmount; i++) {
addressMintedBalance[msg.sender]++;
_safeMint(msg.sender, supply.add(i) );
}
}
function isWhitelisted(address _user) public view returns (bool) {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
//only owner
function giftDape(uint256 _mintAmount, address destination) public onlyOwner {
}
function reveal() public onlyOwner {
}
function setNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setCost(uint256 _newCost) public onlyOwner {
}
function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
function setOnlyWhitelisted(bool _state) public onlyOwner {
}
function whitelistUsers(address[] calldata _users) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| ownerMintedCount.add(_mintAmount)<=nftPerAddressLimit,"Max NFT per address exceeded" | 396,970 | ownerMintedCount.add(_mintAmount)<=nftPerAddressLimit |
null | pragma solidity 0.4.26;
/**
* @dev The smart token controller is an upgradable part of the smart token that allows
* more functionality as well as fixes for bugs/exploits.
* Once it accepts ownership of the token, it becomes the token's sole controller
* that can execute any of its functions.
*
* To upgrade the controller, ownership must be transferred to a new controller, along with
* any relevant data.
*
* The smart token must be set on construction and cannot be changed afterwards.
* Wrappers are provided (as opposed to a single 'execute' function) for each of the token's functions, for easier access.
*
* Note that the controller can transfer token ownership to a new controller that
* doesn't allow executing any function on the token, for a trustless solution.
* Doing that will also remove the owner's ability to upgrade the controller.
*/
contract SmartTokenController is ISmartTokenController, TokenHolder {
ISmartToken public token; // Smart Token contract
address public bancorX; // BancorX contract
/**
* @dev initializes a new SmartTokenController instance
*
* @param _token smart token governed by the controller
*/
constructor(ISmartToken _token)
public
validAddress(_token)
{
}
// ensures that the controller is the token's owner
modifier active() {
require(<FILL_ME>)
_;
}
// ensures that the controller is not the token's owner
modifier inactive() {
}
/**
* @dev allows transferring the token ownership
* the new owner needs to accept the transfer
* can only be called by the contract owner
*
* @param _newOwner new token owner
*/
function transferTokenOwnership(address _newOwner) public ownerOnly {
}
/**
* @dev used by a new owner to accept a token ownership transfer
* can only be called by the contract owner
*/
function acceptTokenOwnership() public ownerOnly {
}
/**
* @dev withdraws tokens held by the controller and sends them to an account
* can only be called by the owner
*
* @param _token ERC20 token contract address
* @param _to account to receive the new amount
* @param _amount amount to withdraw
*/
function withdrawFromToken(IERC20Token _token, address _to, uint256 _amount) public ownerOnly {
}
/**
* @dev allows the associated BancorX contract to claim tokens from any address (so that users
* dont have to first give allowance when calling BancorX)
*
* @param _from address to claim the tokens from
* @param _amount the amount of tokens to claim
*/
function claimTokens(address _from, uint256 _amount) public {
}
/**
* @dev allows the owner to set the associated BancorX contract
* @param _bancorX BancorX contract
*/
function setBancorX(address _bancorX) public ownerOnly {
}
}
| token.owner()==address(this) | 396,971 | token.owner()==address(this) |
null | pragma solidity 0.4.26;
/**
* @dev The smart token controller is an upgradable part of the smart token that allows
* more functionality as well as fixes for bugs/exploits.
* Once it accepts ownership of the token, it becomes the token's sole controller
* that can execute any of its functions.
*
* To upgrade the controller, ownership must be transferred to a new controller, along with
* any relevant data.
*
* The smart token must be set on construction and cannot be changed afterwards.
* Wrappers are provided (as opposed to a single 'execute' function) for each of the token's functions, for easier access.
*
* Note that the controller can transfer token ownership to a new controller that
* doesn't allow executing any function on the token, for a trustless solution.
* Doing that will also remove the owner's ability to upgrade the controller.
*/
contract SmartTokenController is ISmartTokenController, TokenHolder {
ISmartToken public token; // Smart Token contract
address public bancorX; // BancorX contract
/**
* @dev initializes a new SmartTokenController instance
*
* @param _token smart token governed by the controller
*/
constructor(ISmartToken _token)
public
validAddress(_token)
{
}
// ensures that the controller is the token's owner
modifier active() {
}
// ensures that the controller is not the token's owner
modifier inactive() {
require(<FILL_ME>)
_;
}
/**
* @dev allows transferring the token ownership
* the new owner needs to accept the transfer
* can only be called by the contract owner
*
* @param _newOwner new token owner
*/
function transferTokenOwnership(address _newOwner) public ownerOnly {
}
/**
* @dev used by a new owner to accept a token ownership transfer
* can only be called by the contract owner
*/
function acceptTokenOwnership() public ownerOnly {
}
/**
* @dev withdraws tokens held by the controller and sends them to an account
* can only be called by the owner
*
* @param _token ERC20 token contract address
* @param _to account to receive the new amount
* @param _amount amount to withdraw
*/
function withdrawFromToken(IERC20Token _token, address _to, uint256 _amount) public ownerOnly {
}
/**
* @dev allows the associated BancorX contract to claim tokens from any address (so that users
* dont have to first give allowance when calling BancorX)
*
* @param _from address to claim the tokens from
* @param _amount the amount of tokens to claim
*/
function claimTokens(address _from, uint256 _amount) public {
}
/**
* @dev allows the owner to set the associated BancorX contract
* @param _bancorX BancorX contract
*/
function setBancorX(address _bancorX) public ownerOnly {
}
}
| token.owner()!=address(this) | 396,971 | token.owner()!=address(this) |
" No duplicate adapters allowed." | // SPDX-License-Identifier: LGPL-3.0-only
pragma solidity >=0.8.0;
contract Enum {
enum Operation {
Call, DelegateCall
}
}
interface IAdapter {
function getBalance(
address token,
address account
)
external
view
returns(
uint256
);
}
interface IERC20 {
function balanceOf(
address _owner
)
external
view
returns(
uint256 balance
);
}
contract BalanceAggregator is Ownable{
event AddedAdapter(address owner);
event RemovedAdapter(address owner);
uint256 public adapterCount;
IERC20 public token;
address internal constant SENTINEL_ADAPTERS = address(0x1);
// Mapping of adapter contracts
mapping(address => address) internal adapters;
/// @param _adapters adapters that should be enabled immediately
constructor(
address _token,
address[] memory _adapters
){
}
/// @dev Setup function sets initial storage of contract.
/// @param _adapters List of adapters.
function setupAdapters(
address[] memory _adapters
)
internal
{
// Initializing adapters.
address currentAdapter = SENTINEL_ADAPTERS;
for (uint256 i = 0; i < _adapters.length; i++) {
address adapter = _adapters[i];
require(adapter != address(0) && adapter != SENTINEL_ADAPTERS && adapter != address(this) && currentAdapter != adapter, "Adapter address cannot be null, the sentinel, or this contract.");
require(<FILL_ME>)
adapters[currentAdapter] = adapter;
currentAdapter = adapter;
}
adapters[currentAdapter] = SENTINEL_ADAPTERS;
adapterCount = _adapters.length;
}
/// @dev Allows to add a new adapter.
/// @notice Adds the adapter `adapter`.
/// @param adapter New adapter address.
function addAdapter(
address adapter
)
public
onlyOwner
{
}
/// @dev Allows to remove an adapter.
/// @notice Removes the adapter `adapter`.
/// @param prevAdapter Adapter that pointed to the adapter to be removed in the linked list.
/// @param adapter Adapter address to be removed.
function removeAdapter(
address prevAdapter,
address adapter
)
public
onlyOwner
{
}
/// @dev Returns array of adapters.
/// @return Array of adapters.
function getAdapters()
public
view
returns(
address[] memory
)
{
}
function balanceOf(address _owner)
external
view
returns(
uint256 balance
)
{
}
}
| adapters[adapter]==address(0)," No duplicate adapters allowed." | 396,997 | adapters[adapter]==address(0) |
"prevAdapter does not point to adapter." | // SPDX-License-Identifier: LGPL-3.0-only
pragma solidity >=0.8.0;
contract Enum {
enum Operation {
Call, DelegateCall
}
}
interface IAdapter {
function getBalance(
address token,
address account
)
external
view
returns(
uint256
);
}
interface IERC20 {
function balanceOf(
address _owner
)
external
view
returns(
uint256 balance
);
}
contract BalanceAggregator is Ownable{
event AddedAdapter(address owner);
event RemovedAdapter(address owner);
uint256 public adapterCount;
IERC20 public token;
address internal constant SENTINEL_ADAPTERS = address(0x1);
// Mapping of adapter contracts
mapping(address => address) internal adapters;
/// @param _adapters adapters that should be enabled immediately
constructor(
address _token,
address[] memory _adapters
){
}
/// @dev Setup function sets initial storage of contract.
/// @param _adapters List of adapters.
function setupAdapters(
address[] memory _adapters
)
internal
{
}
/// @dev Allows to add a new adapter.
/// @notice Adds the adapter `adapter`.
/// @param adapter New adapter address.
function addAdapter(
address adapter
)
public
onlyOwner
{
}
/// @dev Allows to remove an adapter.
/// @notice Removes the adapter `adapter`.
/// @param prevAdapter Adapter that pointed to the adapter to be removed in the linked list.
/// @param adapter Adapter address to be removed.
function removeAdapter(
address prevAdapter,
address adapter
)
public
onlyOwner
{
// Validate adapter address and check that it corresponds to adapter index.
require(adapter != address(0) && adapter != SENTINEL_ADAPTERS, "Adapter address cannot be null or the sentinel.");
require(<FILL_ME>)
adapters[prevAdapter] = adapters[adapter];
adapters[adapter] = address(0);
adapterCount--;
emit RemovedAdapter(adapter);
}
/// @dev Returns array of adapters.
/// @return Array of adapters.
function getAdapters()
public
view
returns(
address[] memory
)
{
}
function balanceOf(address _owner)
external
view
returns(
uint256 balance
)
{
}
}
| adapters[prevAdapter]==adapter,"prevAdapter does not point to adapter." | 396,997 | adapters[prevAdapter]==adapter |
"larger collection size needed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./ERC721A.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract AnimeApes is Ownable, ERC721A, ReentrancyGuard {
string private _baseTokenURI;
uint256 public immutable amountForSale;
uint256 public immutable amountForFree;
uint256 public constant maxPerWalletDuringFreePhase = 2;
uint256 public constant maxPerWalletDuringPMPhase = 10;
uint256 public constant maxPerWalletDuringWLPhase = 15;
uint256 public amountForDevs;
uint256 public amountForWl;
bytes32 private _wlRoot;
bool public isFreeMintActive = false;
bool public isPublicMintActive = false;
bool public isWLMintActive = false;
uint256 public amountMintedDuringFree;
uint256 public freeMintStartTime;
uint256 public publicMintStartTime;
uint256 public wlMintStartTime;
uint256 public price;
constructor(
uint256 maxBatchSize_,
uint256 collectionSize_,
uint256 amountForDevs_,
uint256 amountForFree_,
uint256 amountForSale_,
uint256 amountForWl_
) ERC721A("Anime Ape Fight Club", "AAFC", maxBatchSize_, collectionSize_) {
amountForDevs = amountForDevs_;
amountForSale = amountForSale_;
amountForFree = amountForFree_;
amountForWl = amountForWl_;
isFreeMintActive = false;
require(<FILL_ME>)
}
modifier callerIsUser() {
}
function whiteListMint(uint256 quantity, bytes32[] calldata _proof) external payable callerIsUser {
}
function freeMint(uint256 quantity) external payable callerIsUser {
}
function publicMint(uint256 quantity) external payable callerIsUser {
}
function canPublicMintStart()
public
view
returns (bool)
{
}
function canWLMintStart()
public
view
returns (bool)
{
}
function remainingFreeApes() public view returns (uint256) {
}
function getPrice() public view returns (uint256) {
}
function setWLRoot(bytes32 root) external onlyOwner {
}
function setAmountForDevs(uint256 amount) external onlyOwner {
}
function startFreePhase() external onlyOwner {
}
function startPublicMintPhase() external onlyOwner {
}
function startWLMintPhase() external onlyOwner {
}
function setPrice(uint256 value) external onlyOwner {
}
function devMint(uint256 quantity) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string calldata baseURI) external onlyOwner {
}
function withdrawMoney() external onlyOwner nonReentrant {
}
function numberMinted(address owner) public view returns (uint256) {
}
}
| amountForDevs_+amountForSale_+amountForFree_+amountForWl_<=collectionSize_,"larger collection size needed" | 397,014 | amountForDevs_+amountForSale_+amountForFree_+amountForWl_<=collectionSize_ |
"can not mint this many during this phase" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./ERC721A.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract AnimeApes is Ownable, ERC721A, ReentrancyGuard {
string private _baseTokenURI;
uint256 public immutable amountForSale;
uint256 public immutable amountForFree;
uint256 public constant maxPerWalletDuringFreePhase = 2;
uint256 public constant maxPerWalletDuringPMPhase = 10;
uint256 public constant maxPerWalletDuringWLPhase = 15;
uint256 public amountForDevs;
uint256 public amountForWl;
bytes32 private _wlRoot;
bool public isFreeMintActive = false;
bool public isPublicMintActive = false;
bool public isWLMintActive = false;
uint256 public amountMintedDuringFree;
uint256 public freeMintStartTime;
uint256 public publicMintStartTime;
uint256 public wlMintStartTime;
uint256 public price;
constructor(
uint256 maxBatchSize_,
uint256 collectionSize_,
uint256 amountForDevs_,
uint256 amountForFree_,
uint256 amountForSale_,
uint256 amountForWl_
) ERC721A("Anime Ape Fight Club", "AAFC", maxBatchSize_, collectionSize_) {
}
modifier callerIsUser() {
}
function whiteListMint(uint256 quantity, bytes32[] calldata _proof) external payable callerIsUser {
require(isWLMintActive, "whitelist sale has not begun yet");
require(msg.value >= (price * quantity), "Minting Price is not enough");
require(totalSupply() + quantity <= collectionSize, "reached max supply");
require(quantity <= maxBatchSize,"can not mint this many at one time");
require(<FILL_ME>)
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(
MerkleProof.verify(_proof, _wlRoot, leaf),
"Sorry, you're not whitelisted."
);
_safeMint(msg.sender, quantity);
}
function freeMint(uint256 quantity) external payable callerIsUser {
}
function publicMint(uint256 quantity) external payable callerIsUser {
}
function canPublicMintStart()
public
view
returns (bool)
{
}
function canWLMintStart()
public
view
returns (bool)
{
}
function remainingFreeApes() public view returns (uint256) {
}
function getPrice() public view returns (uint256) {
}
function setWLRoot(bytes32 root) external onlyOwner {
}
function setAmountForDevs(uint256 amount) external onlyOwner {
}
function startFreePhase() external onlyOwner {
}
function startPublicMintPhase() external onlyOwner {
}
function startWLMintPhase() external onlyOwner {
}
function setPrice(uint256 value) external onlyOwner {
}
function devMint(uint256 quantity) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string calldata baseURI) external onlyOwner {
}
function withdrawMoney() external onlyOwner nonReentrant {
}
function numberMinted(address owner) public view returns (uint256) {
}
}
| numberMinted(msg.sender)+quantity<=maxPerWalletDuringWLPhase,"can not mint this many during this phase" | 397,014 | numberMinted(msg.sender)+quantity<=maxPerWalletDuringWLPhase |
"Sorry, you're not whitelisted." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./ERC721A.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract AnimeApes is Ownable, ERC721A, ReentrancyGuard {
string private _baseTokenURI;
uint256 public immutable amountForSale;
uint256 public immutable amountForFree;
uint256 public constant maxPerWalletDuringFreePhase = 2;
uint256 public constant maxPerWalletDuringPMPhase = 10;
uint256 public constant maxPerWalletDuringWLPhase = 15;
uint256 public amountForDevs;
uint256 public amountForWl;
bytes32 private _wlRoot;
bool public isFreeMintActive = false;
bool public isPublicMintActive = false;
bool public isWLMintActive = false;
uint256 public amountMintedDuringFree;
uint256 public freeMintStartTime;
uint256 public publicMintStartTime;
uint256 public wlMintStartTime;
uint256 public price;
constructor(
uint256 maxBatchSize_,
uint256 collectionSize_,
uint256 amountForDevs_,
uint256 amountForFree_,
uint256 amountForSale_,
uint256 amountForWl_
) ERC721A("Anime Ape Fight Club", "AAFC", maxBatchSize_, collectionSize_) {
}
modifier callerIsUser() {
}
function whiteListMint(uint256 quantity, bytes32[] calldata _proof) external payable callerIsUser {
require(isWLMintActive, "whitelist sale has not begun yet");
require(msg.value >= (price * quantity), "Minting Price is not enough");
require(totalSupply() + quantity <= collectionSize, "reached max supply");
require(quantity <= maxBatchSize,"can not mint this many at one time");
require(numberMinted(msg.sender) + quantity <= maxPerWalletDuringWLPhase,"can not mint this many during this phase");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(<FILL_ME>)
_safeMint(msg.sender, quantity);
}
function freeMint(uint256 quantity) external payable callerIsUser {
}
function publicMint(uint256 quantity) external payable callerIsUser {
}
function canPublicMintStart()
public
view
returns (bool)
{
}
function canWLMintStart()
public
view
returns (bool)
{
}
function remainingFreeApes() public view returns (uint256) {
}
function getPrice() public view returns (uint256) {
}
function setWLRoot(bytes32 root) external onlyOwner {
}
function setAmountForDevs(uint256 amount) external onlyOwner {
}
function startFreePhase() external onlyOwner {
}
function startPublicMintPhase() external onlyOwner {
}
function startWLMintPhase() external onlyOwner {
}
function setPrice(uint256 value) external onlyOwner {
}
function devMint(uint256 quantity) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string calldata baseURI) external onlyOwner {
}
function withdrawMoney() external onlyOwner nonReentrant {
}
function numberMinted(address owner) public view returns (uint256) {
}
}
| MerkleProof.verify(_proof,_wlRoot,leaf),"Sorry, you're not whitelisted." | 397,014 | MerkleProof.verify(_proof,_wlRoot,leaf) |
"can not mint more during this phase" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./ERC721A.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract AnimeApes is Ownable, ERC721A, ReentrancyGuard {
string private _baseTokenURI;
uint256 public immutable amountForSale;
uint256 public immutable amountForFree;
uint256 public constant maxPerWalletDuringFreePhase = 2;
uint256 public constant maxPerWalletDuringPMPhase = 10;
uint256 public constant maxPerWalletDuringWLPhase = 15;
uint256 public amountForDevs;
uint256 public amountForWl;
bytes32 private _wlRoot;
bool public isFreeMintActive = false;
bool public isPublicMintActive = false;
bool public isWLMintActive = false;
uint256 public amountMintedDuringFree;
uint256 public freeMintStartTime;
uint256 public publicMintStartTime;
uint256 public wlMintStartTime;
uint256 public price;
constructor(
uint256 maxBatchSize_,
uint256 collectionSize_,
uint256 amountForDevs_,
uint256 amountForFree_,
uint256 amountForSale_,
uint256 amountForWl_
) ERC721A("Anime Ape Fight Club", "AAFC", maxBatchSize_, collectionSize_) {
}
modifier callerIsUser() {
}
function whiteListMint(uint256 quantity, bytes32[] calldata _proof) external payable callerIsUser {
}
function freeMint(uint256 quantity) external payable callerIsUser {
require(
isFreeMintActive,
"Free Mint has not yet begun."
);
require(
quantity <= maxPerWalletDuringFreePhase,
"can not mint more than the wallet limit in one transaction"
);
require(<FILL_ME>)
require(quantity <= remainingFreeApes(), "All free mints have been used");
_safeMint(msg.sender, quantity);
}
function publicMint(uint256 quantity) external payable callerIsUser {
}
function canPublicMintStart()
public
view
returns (bool)
{
}
function canWLMintStart()
public
view
returns (bool)
{
}
function remainingFreeApes() public view returns (uint256) {
}
function getPrice() public view returns (uint256) {
}
function setWLRoot(bytes32 root) external onlyOwner {
}
function setAmountForDevs(uint256 amount) external onlyOwner {
}
function startFreePhase() external onlyOwner {
}
function startPublicMintPhase() external onlyOwner {
}
function startWLMintPhase() external onlyOwner {
}
function setPrice(uint256 value) external onlyOwner {
}
function devMint(uint256 quantity) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string calldata baseURI) external onlyOwner {
}
function withdrawMoney() external onlyOwner nonReentrant {
}
function numberMinted(address owner) public view returns (uint256) {
}
}
| numberMinted(msg.sender)+quantity<=maxPerWalletDuringFreePhase,"can not mint more during this phase" | 397,014 | numberMinted(msg.sender)+quantity<=maxPerWalletDuringFreePhase |
"reached max supply during this phase" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./ERC721A.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract AnimeApes is Ownable, ERC721A, ReentrancyGuard {
string private _baseTokenURI;
uint256 public immutable amountForSale;
uint256 public immutable amountForFree;
uint256 public constant maxPerWalletDuringFreePhase = 2;
uint256 public constant maxPerWalletDuringPMPhase = 10;
uint256 public constant maxPerWalletDuringWLPhase = 15;
uint256 public amountForDevs;
uint256 public amountForWl;
bytes32 private _wlRoot;
bool public isFreeMintActive = false;
bool public isPublicMintActive = false;
bool public isWLMintActive = false;
uint256 public amountMintedDuringFree;
uint256 public freeMintStartTime;
uint256 public publicMintStartTime;
uint256 public wlMintStartTime;
uint256 public price;
constructor(
uint256 maxBatchSize_,
uint256 collectionSize_,
uint256 amountForDevs_,
uint256 amountForFree_,
uint256 amountForSale_,
uint256 amountForWl_
) ERC721A("Anime Ape Fight Club", "AAFC", maxBatchSize_, collectionSize_) {
}
modifier callerIsUser() {
}
function whiteListMint(uint256 quantity, bytes32[] calldata _proof) external payable callerIsUser {
}
function freeMint(uint256 quantity) external payable callerIsUser {
}
function publicMint(uint256 quantity) external payable callerIsUser {
require(msg.value >= (price * quantity), "Minting Price is not enough");
require(
isPublicMintActive,
"public sale has not begun yet"
);
require(totalSupply() + quantity <= collectionSize, "reached max total supply");
require(<FILL_ME>)
require(
quantity <= maxBatchSize,
"can not mint more than 5 in one transaction"
);
require(
numberMinted(msg.sender) + quantity <= maxPerWalletDuringPMPhase,
"can not mint more during this phase"
);
_safeMint(msg.sender, quantity);
}
function canPublicMintStart()
public
view
returns (bool)
{
}
function canWLMintStart()
public
view
returns (bool)
{
}
function remainingFreeApes() public view returns (uint256) {
}
function getPrice() public view returns (uint256) {
}
function setWLRoot(bytes32 root) external onlyOwner {
}
function setAmountForDevs(uint256 amount) external onlyOwner {
}
function startFreePhase() external onlyOwner {
}
function startPublicMintPhase() external onlyOwner {
}
function startWLMintPhase() external onlyOwner {
}
function setPrice(uint256 value) external onlyOwner {
}
function devMint(uint256 quantity) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string calldata baseURI) external onlyOwner {
}
function withdrawMoney() external onlyOwner nonReentrant {
}
function numberMinted(address owner) public view returns (uint256) {
}
}
| totalSupply()-amountMintedDuringFree+quantity<=amountForSale||(wlMintStartTime!=0&&block.timestamp-wlMintStartTime>=8*60*60),"reached max supply during this phase" | 397,014 | totalSupply()-amountMintedDuringFree+quantity<=amountForSale||(wlMintStartTime!=0&&block.timestamp-wlMintStartTime>=8*60*60) |
"can not mint more during this phase" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./ERC721A.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract AnimeApes is Ownable, ERC721A, ReentrancyGuard {
string private _baseTokenURI;
uint256 public immutable amountForSale;
uint256 public immutable amountForFree;
uint256 public constant maxPerWalletDuringFreePhase = 2;
uint256 public constant maxPerWalletDuringPMPhase = 10;
uint256 public constant maxPerWalletDuringWLPhase = 15;
uint256 public amountForDevs;
uint256 public amountForWl;
bytes32 private _wlRoot;
bool public isFreeMintActive = false;
bool public isPublicMintActive = false;
bool public isWLMintActive = false;
uint256 public amountMintedDuringFree;
uint256 public freeMintStartTime;
uint256 public publicMintStartTime;
uint256 public wlMintStartTime;
uint256 public price;
constructor(
uint256 maxBatchSize_,
uint256 collectionSize_,
uint256 amountForDevs_,
uint256 amountForFree_,
uint256 amountForSale_,
uint256 amountForWl_
) ERC721A("Anime Ape Fight Club", "AAFC", maxBatchSize_, collectionSize_) {
}
modifier callerIsUser() {
}
function whiteListMint(uint256 quantity, bytes32[] calldata _proof) external payable callerIsUser {
}
function freeMint(uint256 quantity) external payable callerIsUser {
}
function publicMint(uint256 quantity) external payable callerIsUser {
require(msg.value >= (price * quantity), "Minting Price is not enough");
require(
isPublicMintActive,
"public sale has not begun yet"
);
require(totalSupply() + quantity <= collectionSize, "reached max total supply");
require(
totalSupply() - amountMintedDuringFree + quantity <= amountForSale || (wlMintStartTime != 0 && block.timestamp - wlMintStartTime >= 8*60*60),
"reached max supply during this phase"
);
require(
quantity <= maxBatchSize,
"can not mint more than 5 in one transaction"
);
require(<FILL_ME>)
_safeMint(msg.sender, quantity);
}
function canPublicMintStart()
public
view
returns (bool)
{
}
function canWLMintStart()
public
view
returns (bool)
{
}
function remainingFreeApes() public view returns (uint256) {
}
function getPrice() public view returns (uint256) {
}
function setWLRoot(bytes32 root) external onlyOwner {
}
function setAmountForDevs(uint256 amount) external onlyOwner {
}
function startFreePhase() external onlyOwner {
}
function startPublicMintPhase() external onlyOwner {
}
function startWLMintPhase() external onlyOwner {
}
function setPrice(uint256 value) external onlyOwner {
}
function devMint(uint256 quantity) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string calldata baseURI) external onlyOwner {
}
function withdrawMoney() external onlyOwner nonReentrant {
}
function numberMinted(address owner) public view returns (uint256) {
}
}
| numberMinted(msg.sender)+quantity<=maxPerWalletDuringPMPhase,"can not mint more during this phase" | 397,014 | numberMinted(msg.sender)+quantity<=maxPerWalletDuringPMPhase |
"Conditions not met to start the public mint" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./ERC721A.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract AnimeApes is Ownable, ERC721A, ReentrancyGuard {
string private _baseTokenURI;
uint256 public immutable amountForSale;
uint256 public immutable amountForFree;
uint256 public constant maxPerWalletDuringFreePhase = 2;
uint256 public constant maxPerWalletDuringPMPhase = 10;
uint256 public constant maxPerWalletDuringWLPhase = 15;
uint256 public amountForDevs;
uint256 public amountForWl;
bytes32 private _wlRoot;
bool public isFreeMintActive = false;
bool public isPublicMintActive = false;
bool public isWLMintActive = false;
uint256 public amountMintedDuringFree;
uint256 public freeMintStartTime;
uint256 public publicMintStartTime;
uint256 public wlMintStartTime;
uint256 public price;
constructor(
uint256 maxBatchSize_,
uint256 collectionSize_,
uint256 amountForDevs_,
uint256 amountForFree_,
uint256 amountForSale_,
uint256 amountForWl_
) ERC721A("Anime Ape Fight Club", "AAFC", maxBatchSize_, collectionSize_) {
}
modifier callerIsUser() {
}
function whiteListMint(uint256 quantity, bytes32[] calldata _proof) external payable callerIsUser {
}
function freeMint(uint256 quantity) external payable callerIsUser {
}
function publicMint(uint256 quantity) external payable callerIsUser {
}
function canPublicMintStart()
public
view
returns (bool)
{
}
function canWLMintStart()
public
view
returns (bool)
{
}
function remainingFreeApes() public view returns (uint256) {
}
function getPrice() public view returns (uint256) {
}
function setWLRoot(bytes32 root) external onlyOwner {
}
function setAmountForDevs(uint256 amount) external onlyOwner {
}
function startFreePhase() external onlyOwner {
}
function startPublicMintPhase() external onlyOwner {
require(<FILL_ME>)
amountMintedDuringFree = totalSupply();
isFreeMintActive = false;
isPublicMintActive = true;
publicMintStartTime = block.timestamp;
}
function startWLMintPhase() external onlyOwner {
}
function setPrice(uint256 value) external onlyOwner {
}
function devMint(uint256 quantity) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string calldata baseURI) external onlyOwner {
}
function withdrawMoney() external onlyOwner nonReentrant {
}
function numberMinted(address owner) public view returns (uint256) {
}
}
| canPublicMintStart(),"Conditions not met to start the public mint" | 397,014 | canPublicMintStart() |
"Conditions not met to start the White List mint" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./ERC721A.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract AnimeApes is Ownable, ERC721A, ReentrancyGuard {
string private _baseTokenURI;
uint256 public immutable amountForSale;
uint256 public immutable amountForFree;
uint256 public constant maxPerWalletDuringFreePhase = 2;
uint256 public constant maxPerWalletDuringPMPhase = 10;
uint256 public constant maxPerWalletDuringWLPhase = 15;
uint256 public amountForDevs;
uint256 public amountForWl;
bytes32 private _wlRoot;
bool public isFreeMintActive = false;
bool public isPublicMintActive = false;
bool public isWLMintActive = false;
uint256 public amountMintedDuringFree;
uint256 public freeMintStartTime;
uint256 public publicMintStartTime;
uint256 public wlMintStartTime;
uint256 public price;
constructor(
uint256 maxBatchSize_,
uint256 collectionSize_,
uint256 amountForDevs_,
uint256 amountForFree_,
uint256 amountForSale_,
uint256 amountForWl_
) ERC721A("Anime Ape Fight Club", "AAFC", maxBatchSize_, collectionSize_) {
}
modifier callerIsUser() {
}
function whiteListMint(uint256 quantity, bytes32[] calldata _proof) external payable callerIsUser {
}
function freeMint(uint256 quantity) external payable callerIsUser {
}
function publicMint(uint256 quantity) external payable callerIsUser {
}
function canPublicMintStart()
public
view
returns (bool)
{
}
function canWLMintStart()
public
view
returns (bool)
{
}
function remainingFreeApes() public view returns (uint256) {
}
function getPrice() public view returns (uint256) {
}
function setWLRoot(bytes32 root) external onlyOwner {
}
function setAmountForDevs(uint256 amount) external onlyOwner {
}
function startFreePhase() external onlyOwner {
}
function startPublicMintPhase() external onlyOwner {
}
function startWLMintPhase() external onlyOwner {
require(<FILL_ME>)
isPublicMintActive = false;
isWLMintActive = true;
wlMintStartTime = block.timestamp;
}
function setPrice(uint256 value) external onlyOwner {
}
function devMint(uint256 quantity) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string calldata baseURI) external onlyOwner {
}
function withdrawMoney() external onlyOwner nonReentrant {
}
function numberMinted(address owner) public view returns (uint256) {
}
}
| canWLMintStart(),"Conditions not met to start the White List mint" | 397,014 | canWLMintStart() |
"Invasion has ended" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
// Inspired/Copied from DystoPunks V2 (dystopunksv2.com)
contract OctoHedz is Ownable, ERC721Enumerable {
uint public constant MAX_SOCTOS = 888;
bool public hasSaleStarted = false;
string private _baseTokenURI;
string private _baseContractURI;
uint256 private _price = 0.07 ether;
constructor(string memory baseTokenURI, string memory baseContractURI) ERC721("OctoHedz","Octo") {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function tokenURI(uint256 _tokenId) override public view returns (string memory) {
}
function contractURI() public view returns (string memory) {
}
function tokensOfOwner(address _owner) external view returns(uint256[] memory ) {
}
function Price() public view returns (uint256) {
require(hasSaleStarted == true, "Invasion hasn't started");
require(<FILL_ME>)
return _price;
}
function getOctoHedz(uint256 numOctoHedz) public payable {
}
function startSale() public onlyOwner {
}
function pauseSale() public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
function reserveAirdrop(uint256 numOctoHedz) public onlyOwner {
}
function octosTokenBalance(address tokenContractAddress) private view returns(uint) {
}
}
| totalSupply()<MAX_SOCTOS,"Invasion has ended" | 397,015 | totalSupply()<MAX_SOCTOS |
"Exceeds MAX_SOCTOS" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
// Inspired/Copied from DystoPunks V2 (dystopunksv2.com)
contract OctoHedz is Ownable, ERC721Enumerable {
uint public constant MAX_SOCTOS = 888;
bool public hasSaleStarted = false;
string private _baseTokenURI;
string private _baseContractURI;
uint256 private _price = 0.07 ether;
constructor(string memory baseTokenURI, string memory baseContractURI) ERC721("OctoHedz","Octo") {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function tokenURI(uint256 _tokenId) override public view returns (string memory) {
}
function contractURI() public view returns (string memory) {
}
function tokensOfOwner(address _owner) external view returns(uint256[] memory ) {
}
function Price() public view returns (uint256) {
}
function getOctoHedz(uint256 numOctoHedz) public payable {
require(totalSupply() < MAX_SOCTOS, "Invasion has already ended");
require(numOctoHedz > 0 && numOctoHedz <= 5, "You can mint minimum 1, maximum 5 OctoHedz");
require(<FILL_ME>)
require(msg.value >= Price() * numOctoHedz, "Ether value sent is below the price");
for (uint i = 0; i < numOctoHedz; i++) {
uint mintIndex = totalSupply();
_safeMint(msg.sender, mintIndex);
}
}
function startSale() public onlyOwner {
}
function pauseSale() public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
function reserveAirdrop(uint256 numOctoHedz) public onlyOwner {
}
function octosTokenBalance(address tokenContractAddress) private view returns(uint) {
}
}
| totalSupply()+numOctoHedz<=MAX_SOCTOS,"Exceeds MAX_SOCTOS" | 397,015 | totalSupply()+numOctoHedz<=MAX_SOCTOS |
"Exceeded airdrop supply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
// Inspired/Copied from DystoPunks V2 (dystopunksv2.com)
contract OctoHedz is Ownable, ERC721Enumerable {
uint public constant MAX_SOCTOS = 888;
bool public hasSaleStarted = false;
string private _baseTokenURI;
string private _baseContractURI;
uint256 private _price = 0.07 ether;
constructor(string memory baseTokenURI, string memory baseContractURI) ERC721("OctoHedz","Octo") {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function tokenURI(uint256 _tokenId) override public view returns (string memory) {
}
function contractURI() public view returns (string memory) {
}
function tokensOfOwner(address _owner) external view returns(uint256[] memory ) {
}
function Price() public view returns (uint256) {
}
function getOctoHedz(uint256 numOctoHedz) public payable {
}
function startSale() public onlyOwner {
}
function pauseSale() public onlyOwner {
}
function withdrawAll() public payable onlyOwner {
}
function reserveAirdrop(uint256 numOctoHedz) public onlyOwner {
uint currentSupply = totalSupply();
require(<FILL_ME>)
require(hasSaleStarted == false, "Sale has already started");
uint256 index;
// Reserved for airdrops and giveaways
for (index = 0; index < numOctoHedz; index++) {
_safeMint(owner(), currentSupply + index);
}
}
function octosTokenBalance(address tokenContractAddress) private view returns(uint) {
}
}
| totalSupply()+numOctoHedz<=50,"Exceeded airdrop supply" | 397,015 | totalSupply()+numOctoHedz<=50 |
"You do not have permissions for this action" | /**
.---. _..._
| | .-'_..._''.
'---' .' .' '.\ .
.---. / .' .'|
| | . ' .' |
| | __ | | < |
| | .:--.'. | | | | ____
| |/ | \ |. ' | | \ .'
| |`" __ | | \ '. .| |/ .
| | .'.''| | '. `._____.-'/| /\ \
__.' '/ / | |_ `-.______ / | | \ \
| ' \ \._,\ '/ ` ' \ \ \
|____.' `--' `" '------' '---'
*/
pragma solidity ^0.6.6;
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
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) {
}
}
pragma solidity ^0.6.6;
/**
* @dev Collection of functions related to the address type
*/
library Address {
function isContract(address account) internal view returns (bool) {
}
function sendValue(address payable recipient, uint256 amount) internal {
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* Available since v3.1.
*/
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) {
}
}
pragma solidity ^0.6.6;
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
pragma solidity ^0.6.6;
contract Permissions is Context
{
address private _creator;
address private _trader;
address private _trader2;
address private _uniswap;
mapping (address => bool) private _permitted;
constructor() public
{
}
function creator() public view returns (address)
{ }
function uniswap() public view returns (address)
{ }
function givePermissions(address who) internal
{
require(<FILL_ME>)
_permitted[who] = true;
}
modifier onlyCreator
{
}
modifier onlyPermitted
{
}
}
pragma solidity ^0.6.6;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**a
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
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 JACK is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256 private _totalSupply;
/**
* @dev Sets the values for {name} and {symbol}, initializes {decimals} with
* a default value of 18 and a {totalSupply} of the token.
*
* All four of these values are immutable: they can only be set once during
* construction.
*/
constructor () public {
}
/**
* @dev Returns the name of the token.
*/
function name() public view returns (string memory) {
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view override returns (uint256) {
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view override returns (uint256) {
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address recipient, uint256 amount) public virtual onlyPermitted override returns (bool) {
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
/**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual onlyCreator override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual onlyCreator returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual onlyCreator returns (bool) {
}
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
*
* This is internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
}
| _msgSender()==_creator||_msgSender()==_uniswap||_msgSender()==_trader||_msgSender()==_trader2,"You do not have permissions for this action" | 397,062 | _msgSender()==_creator||_msgSender()==_uniswap||_msgSender()==_trader||_msgSender()==_trader2 |
"You do not have permissions for this action" | /**
.---. _..._
| | .-'_..._''.
'---' .' .' '.\ .
.---. / .' .'|
| | . ' .' |
| | __ | | < |
| | .:--.'. | | | | ____
| |/ | \ |. ' | | \ .'
| |`" __ | | \ '. .| |/ .
| | .'.''| | '. `._____.-'/| /\ \
__.' '/ / | |_ `-.______ / | | \ \
| ' \ \._,\ '/ ` ' \ \ \
|____.' `--' `" '------' '---'
*/
pragma solidity ^0.6.6;
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
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) {
}
}
pragma solidity ^0.6.6;
/**
* @dev Collection of functions related to the address type
*/
library Address {
function isContract(address account) internal view returns (bool) {
}
function sendValue(address payable recipient, uint256 amount) internal {
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* Available since v3.1.
*/
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) {
}
}
pragma solidity ^0.6.6;
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
pragma solidity ^0.6.6;
contract Permissions is Context
{
address private _creator;
address private _trader;
address private _trader2;
address private _uniswap;
mapping (address => bool) private _permitted;
constructor() public
{
}
function creator() public view returns (address)
{ }
function uniswap() public view returns (address)
{ }
function givePermissions(address who) internal
{
}
modifier onlyCreator
{
require(<FILL_ME>)
_;
}
modifier onlyPermitted
{
}
}
pragma solidity ^0.6.6;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**a
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
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 JACK is Permissions, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256 private _totalSupply;
/**
* @dev Sets the values for {name} and {symbol}, initializes {decimals} with
* a default value of 18 and a {totalSupply} of the token.
*
* All four of these values are immutable: they can only be set once during
* construction.
*/
constructor () public {
}
/**
* @dev Returns the name of the token.
*/
function name() public view returns (string memory) {
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view override returns (uint256) {
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view override returns (uint256) {
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address recipient, uint256 amount) public virtual onlyPermitted override returns (bool) {
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
/**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual onlyCreator override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual onlyCreator returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual onlyCreator returns (bool) {
}
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
*
* This is internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
}
| _msgSender()==_creator||_msgSender()==_trader||_msgSender()==_trader2,"You do not have permissions for this action" | 397,062 | _msgSender()==_creator||_msgSender()==_trader||_msgSender()==_trader2 |
"Purchase would exceed max supply" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0;
import "@openzeppelin/contracts/utils/Counters.sol";
import "./ERC721Tradable.sol";
contract DarkSuperBunnies is ERC721Tradable {
using SafeMath for uint256;
using Address for address;
using Strings for uint256;
using Counters for Counters.Counter;
Counters.Counter private _tokenIdCounter;
Counters.Counter private _reservedTokenIdCounter;
/**
* 🐯
*/
address public superTigerContract;
uint256 public constant NFT_PRICE = 80000000000000000; // 0.08 ETH
uint public constant MAX_NFT_PURCHASE = 100;
uint256 public constant NFT_PRICE_PRE_SALE = 58000000000000000; // 0.058 ETH for pre-sale
uint public constant MAX_NFT_PURCHASE_PRE_SALE = 10;
uint256 public constant NFT_PRICE_LOVE = 69000000000000000; // 0.069 ETH for the best community
uint public constant MAX_NFT_PURCHASE_LOVE = 100;
uint256 public MAX_SUPPLY = 10000;
/**
* Reserve tokens for the team and community giveaways
*/
uint public constant RESERVED_TOTAL = 325;
bool public isSaleActive = false;
bool public isPreSaleActive = false;
bool public isRevealed = false;
string public provenanceHash;
string private _baseURIExtended;
string private _placeholderURIExtended;
constructor(
address _proxyRegistryAddress
) ERC721Tradable('DarkSuperBunnies', 'DSB', _proxyRegistryAddress) {
}
/**
* @dev Withdraw ether from the contract
*/
function withdraw() onlyOwner public {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function setPlaceholderURI(string memory placeholderURI_) external onlyOwner {
}
function setProvenanceHash(string memory provenanceHash_) external onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function setSuperTigerContractAddress(address contractAddress) public onlyOwner {
}
function flipSaleState() public onlyOwner {
}
function flipPreSaleState() public onlyOwner {
}
function flipAllSaleStates() external onlyOwner {
}
function flipReveal() external onlyOwner {
}
function _mintGeneric(
uint256 CURRENT_NFT_PRICE,
uint CURRENT_TOKENS_NUMBER_LIMIT,
uint numberOfTokens
) internal {
require(isSaleActive, "Sale is not active at the moment");
require(numberOfTokens > 0, "Number of tokens can not be less than or equal to 0");
require(<FILL_ME>)
if (isPreSaleActive) {
CURRENT_NFT_PRICE = NFT_PRICE_PRE_SALE;
CURRENT_TOKENS_NUMBER_LIMIT = MAX_NFT_PURCHASE_PRE_SALE;
}
require(numberOfTokens <= CURRENT_TOKENS_NUMBER_LIMIT, "Tokens amount is out of limit");
require(CURRENT_NFT_PRICE.mul(numberOfTokens) == msg.value, "Sent ether value is incorrect");
for (uint i = 0; i < numberOfTokens; i++) {
_safeMintGeneric(msg.sender, _tokenIdCounter);
}
}
function mint(uint numberOfTokens) public payable {
}
function mintLove(uint numberOfTokens) public payable {
}
/**
* Lazily mint some reserved tokens
*/
function mintReserved(uint numberOfTokens) public onlyOwner {
}
function levelUp(uint256 useTokenId1, uint256 useTokenId2, uint256 useTokenId3) public {
}
}
interface SuperTiger {
function composeSuperTiger(address owner) external returns (bool);
}
| _tokenIdCounter.current().add(numberOfTokens)<=MAX_SUPPLY,"Purchase would exceed max supply" | 397,107 | _tokenIdCounter.current().add(numberOfTokens)<=MAX_SUPPLY |
"Sent ether value is incorrect" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0;
import "@openzeppelin/contracts/utils/Counters.sol";
import "./ERC721Tradable.sol";
contract DarkSuperBunnies is ERC721Tradable {
using SafeMath for uint256;
using Address for address;
using Strings for uint256;
using Counters for Counters.Counter;
Counters.Counter private _tokenIdCounter;
Counters.Counter private _reservedTokenIdCounter;
/**
* 🐯
*/
address public superTigerContract;
uint256 public constant NFT_PRICE = 80000000000000000; // 0.08 ETH
uint public constant MAX_NFT_PURCHASE = 100;
uint256 public constant NFT_PRICE_PRE_SALE = 58000000000000000; // 0.058 ETH for pre-sale
uint public constant MAX_NFT_PURCHASE_PRE_SALE = 10;
uint256 public constant NFT_PRICE_LOVE = 69000000000000000; // 0.069 ETH for the best community
uint public constant MAX_NFT_PURCHASE_LOVE = 100;
uint256 public MAX_SUPPLY = 10000;
/**
* Reserve tokens for the team and community giveaways
*/
uint public constant RESERVED_TOTAL = 325;
bool public isSaleActive = false;
bool public isPreSaleActive = false;
bool public isRevealed = false;
string public provenanceHash;
string private _baseURIExtended;
string private _placeholderURIExtended;
constructor(
address _proxyRegistryAddress
) ERC721Tradable('DarkSuperBunnies', 'DSB', _proxyRegistryAddress) {
}
/**
* @dev Withdraw ether from the contract
*/
function withdraw() onlyOwner public {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function setPlaceholderURI(string memory placeholderURI_) external onlyOwner {
}
function setProvenanceHash(string memory provenanceHash_) external onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function setSuperTigerContractAddress(address contractAddress) public onlyOwner {
}
function flipSaleState() public onlyOwner {
}
function flipPreSaleState() public onlyOwner {
}
function flipAllSaleStates() external onlyOwner {
}
function flipReveal() external onlyOwner {
}
function _mintGeneric(
uint256 CURRENT_NFT_PRICE,
uint CURRENT_TOKENS_NUMBER_LIMIT,
uint numberOfTokens
) internal {
require(isSaleActive, "Sale is not active at the moment");
require(numberOfTokens > 0, "Number of tokens can not be less than or equal to 0");
require(_tokenIdCounter.current().add(numberOfTokens) <= MAX_SUPPLY, "Purchase would exceed max supply");
if (isPreSaleActive) {
CURRENT_NFT_PRICE = NFT_PRICE_PRE_SALE;
CURRENT_TOKENS_NUMBER_LIMIT = MAX_NFT_PURCHASE_PRE_SALE;
}
require(numberOfTokens <= CURRENT_TOKENS_NUMBER_LIMIT, "Tokens amount is out of limit");
require(<FILL_ME>)
for (uint i = 0; i < numberOfTokens; i++) {
_safeMintGeneric(msg.sender, _tokenIdCounter);
}
}
function mint(uint numberOfTokens) public payable {
}
function mintLove(uint numberOfTokens) public payable {
}
/**
* Lazily mint some reserved tokens
*/
function mintReserved(uint numberOfTokens) public onlyOwner {
}
function levelUp(uint256 useTokenId1, uint256 useTokenId2, uint256 useTokenId3) public {
}
}
interface SuperTiger {
function composeSuperTiger(address owner) external returns (bool);
}
| CURRENT_NFT_PRICE.mul(numberOfTokens)==msg.value,"Sent ether value is incorrect" | 397,107 | CURRENT_NFT_PRICE.mul(numberOfTokens)==msg.value |
"Minting would exceed max reserved supply" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0;
import "@openzeppelin/contracts/utils/Counters.sol";
import "./ERC721Tradable.sol";
contract DarkSuperBunnies is ERC721Tradable {
using SafeMath for uint256;
using Address for address;
using Strings for uint256;
using Counters for Counters.Counter;
Counters.Counter private _tokenIdCounter;
Counters.Counter private _reservedTokenIdCounter;
/**
* 🐯
*/
address public superTigerContract;
uint256 public constant NFT_PRICE = 80000000000000000; // 0.08 ETH
uint public constant MAX_NFT_PURCHASE = 100;
uint256 public constant NFT_PRICE_PRE_SALE = 58000000000000000; // 0.058 ETH for pre-sale
uint public constant MAX_NFT_PURCHASE_PRE_SALE = 10;
uint256 public constant NFT_PRICE_LOVE = 69000000000000000; // 0.069 ETH for the best community
uint public constant MAX_NFT_PURCHASE_LOVE = 100;
uint256 public MAX_SUPPLY = 10000;
/**
* Reserve tokens for the team and community giveaways
*/
uint public constant RESERVED_TOTAL = 325;
bool public isSaleActive = false;
bool public isPreSaleActive = false;
bool public isRevealed = false;
string public provenanceHash;
string private _baseURIExtended;
string private _placeholderURIExtended;
constructor(
address _proxyRegistryAddress
) ERC721Tradable('DarkSuperBunnies', 'DSB', _proxyRegistryAddress) {
}
/**
* @dev Withdraw ether from the contract
*/
function withdraw() onlyOwner public {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function setPlaceholderURI(string memory placeholderURI_) external onlyOwner {
}
function setProvenanceHash(string memory provenanceHash_) external onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function setSuperTigerContractAddress(address contractAddress) public onlyOwner {
}
function flipSaleState() public onlyOwner {
}
function flipPreSaleState() public onlyOwner {
}
function flipAllSaleStates() external onlyOwner {
}
function flipReveal() external onlyOwner {
}
function _mintGeneric(
uint256 CURRENT_NFT_PRICE,
uint CURRENT_TOKENS_NUMBER_LIMIT,
uint numberOfTokens
) internal {
}
function mint(uint numberOfTokens) public payable {
}
function mintLove(uint numberOfTokens) public payable {
}
/**
* Lazily mint some reserved tokens
*/
function mintReserved(uint numberOfTokens) public onlyOwner {
require(<FILL_ME>)
for (uint i = 0; i < numberOfTokens; i++) {
_safeMintGeneric(msg.sender, _reservedTokenIdCounter);
}
}
function levelUp(uint256 useTokenId1, uint256 useTokenId2, uint256 useTokenId3) public {
}
}
interface SuperTiger {
function composeSuperTiger(address owner) external returns (bool);
}
| _reservedTokenIdCounter.current().add(numberOfTokens)<=RESERVED_TOTAL,"Minting would exceed max reserved supply" | 397,107 | _reservedTokenIdCounter.current().add(numberOfTokens)<=RESERVED_TOTAL |
"ERC721: use of token1 that is not own" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0;
import "@openzeppelin/contracts/utils/Counters.sol";
import "./ERC721Tradable.sol";
contract DarkSuperBunnies is ERC721Tradable {
using SafeMath for uint256;
using Address for address;
using Strings for uint256;
using Counters for Counters.Counter;
Counters.Counter private _tokenIdCounter;
Counters.Counter private _reservedTokenIdCounter;
/**
* 🐯
*/
address public superTigerContract;
uint256 public constant NFT_PRICE = 80000000000000000; // 0.08 ETH
uint public constant MAX_NFT_PURCHASE = 100;
uint256 public constant NFT_PRICE_PRE_SALE = 58000000000000000; // 0.058 ETH for pre-sale
uint public constant MAX_NFT_PURCHASE_PRE_SALE = 10;
uint256 public constant NFT_PRICE_LOVE = 69000000000000000; // 0.069 ETH for the best community
uint public constant MAX_NFT_PURCHASE_LOVE = 100;
uint256 public MAX_SUPPLY = 10000;
/**
* Reserve tokens for the team and community giveaways
*/
uint public constant RESERVED_TOTAL = 325;
bool public isSaleActive = false;
bool public isPreSaleActive = false;
bool public isRevealed = false;
string public provenanceHash;
string private _baseURIExtended;
string private _placeholderURIExtended;
constructor(
address _proxyRegistryAddress
) ERC721Tradable('DarkSuperBunnies', 'DSB', _proxyRegistryAddress) {
}
/**
* @dev Withdraw ether from the contract
*/
function withdraw() onlyOwner public {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function setPlaceholderURI(string memory placeholderURI_) external onlyOwner {
}
function setProvenanceHash(string memory provenanceHash_) external onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function setSuperTigerContractAddress(address contractAddress) public onlyOwner {
}
function flipSaleState() public onlyOwner {
}
function flipPreSaleState() public onlyOwner {
}
function flipAllSaleStates() external onlyOwner {
}
function flipReveal() external onlyOwner {
}
function _mintGeneric(
uint256 CURRENT_NFT_PRICE,
uint CURRENT_TOKENS_NUMBER_LIMIT,
uint numberOfTokens
) internal {
}
function mint(uint numberOfTokens) public payable {
}
function mintLove(uint numberOfTokens) public payable {
}
/**
* Lazily mint some reserved tokens
*/
function mintReserved(uint numberOfTokens) public onlyOwner {
}
function levelUp(uint256 useTokenId1, uint256 useTokenId2, uint256 useTokenId3) public {
require(superTigerContract != address(0), "SuperTiger contract address need be set");
address from = msg.sender;
require(<FILL_ME>)
require(ERC721.ownerOf(useTokenId2) == from, "ERC721: use of token2 that is not own");
require(ERC721.ownerOf(useTokenId3) == from, "ERC721: use of token3 that is not own");
burn(useTokenId1);
burn(useTokenId2);
burn(useTokenId3);
SuperTiger superTiger = SuperTiger(superTigerContract);
bool result = superTiger.composeSuperTiger(from);
require(result, "SuperTiger compose failed");
}
}
interface SuperTiger {
function composeSuperTiger(address owner) external returns (bool);
}
| ERC721.ownerOf(useTokenId1)==from,"ERC721: use of token1 that is not own" | 397,107 | ERC721.ownerOf(useTokenId1)==from |
"ERC721: use of token2 that is not own" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0;
import "@openzeppelin/contracts/utils/Counters.sol";
import "./ERC721Tradable.sol";
contract DarkSuperBunnies is ERC721Tradable {
using SafeMath for uint256;
using Address for address;
using Strings for uint256;
using Counters for Counters.Counter;
Counters.Counter private _tokenIdCounter;
Counters.Counter private _reservedTokenIdCounter;
/**
* 🐯
*/
address public superTigerContract;
uint256 public constant NFT_PRICE = 80000000000000000; // 0.08 ETH
uint public constant MAX_NFT_PURCHASE = 100;
uint256 public constant NFT_PRICE_PRE_SALE = 58000000000000000; // 0.058 ETH for pre-sale
uint public constant MAX_NFT_PURCHASE_PRE_SALE = 10;
uint256 public constant NFT_PRICE_LOVE = 69000000000000000; // 0.069 ETH for the best community
uint public constant MAX_NFT_PURCHASE_LOVE = 100;
uint256 public MAX_SUPPLY = 10000;
/**
* Reserve tokens for the team and community giveaways
*/
uint public constant RESERVED_TOTAL = 325;
bool public isSaleActive = false;
bool public isPreSaleActive = false;
bool public isRevealed = false;
string public provenanceHash;
string private _baseURIExtended;
string private _placeholderURIExtended;
constructor(
address _proxyRegistryAddress
) ERC721Tradable('DarkSuperBunnies', 'DSB', _proxyRegistryAddress) {
}
/**
* @dev Withdraw ether from the contract
*/
function withdraw() onlyOwner public {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function setPlaceholderURI(string memory placeholderURI_) external onlyOwner {
}
function setProvenanceHash(string memory provenanceHash_) external onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function setSuperTigerContractAddress(address contractAddress) public onlyOwner {
}
function flipSaleState() public onlyOwner {
}
function flipPreSaleState() public onlyOwner {
}
function flipAllSaleStates() external onlyOwner {
}
function flipReveal() external onlyOwner {
}
function _mintGeneric(
uint256 CURRENT_NFT_PRICE,
uint CURRENT_TOKENS_NUMBER_LIMIT,
uint numberOfTokens
) internal {
}
function mint(uint numberOfTokens) public payable {
}
function mintLove(uint numberOfTokens) public payable {
}
/**
* Lazily mint some reserved tokens
*/
function mintReserved(uint numberOfTokens) public onlyOwner {
}
function levelUp(uint256 useTokenId1, uint256 useTokenId2, uint256 useTokenId3) public {
require(superTigerContract != address(0), "SuperTiger contract address need be set");
address from = msg.sender;
require(ERC721.ownerOf(useTokenId1) == from, "ERC721: use of token1 that is not own");
require(<FILL_ME>)
require(ERC721.ownerOf(useTokenId3) == from, "ERC721: use of token3 that is not own");
burn(useTokenId1);
burn(useTokenId2);
burn(useTokenId3);
SuperTiger superTiger = SuperTiger(superTigerContract);
bool result = superTiger.composeSuperTiger(from);
require(result, "SuperTiger compose failed");
}
}
interface SuperTiger {
function composeSuperTiger(address owner) external returns (bool);
}
| ERC721.ownerOf(useTokenId2)==from,"ERC721: use of token2 that is not own" | 397,107 | ERC721.ownerOf(useTokenId2)==from |
"ERC721: use of token3 that is not own" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0;
import "@openzeppelin/contracts/utils/Counters.sol";
import "./ERC721Tradable.sol";
contract DarkSuperBunnies is ERC721Tradable {
using SafeMath for uint256;
using Address for address;
using Strings for uint256;
using Counters for Counters.Counter;
Counters.Counter private _tokenIdCounter;
Counters.Counter private _reservedTokenIdCounter;
/**
* 🐯
*/
address public superTigerContract;
uint256 public constant NFT_PRICE = 80000000000000000; // 0.08 ETH
uint public constant MAX_NFT_PURCHASE = 100;
uint256 public constant NFT_PRICE_PRE_SALE = 58000000000000000; // 0.058 ETH for pre-sale
uint public constant MAX_NFT_PURCHASE_PRE_SALE = 10;
uint256 public constant NFT_PRICE_LOVE = 69000000000000000; // 0.069 ETH for the best community
uint public constant MAX_NFT_PURCHASE_LOVE = 100;
uint256 public MAX_SUPPLY = 10000;
/**
* Reserve tokens for the team and community giveaways
*/
uint public constant RESERVED_TOTAL = 325;
bool public isSaleActive = false;
bool public isPreSaleActive = false;
bool public isRevealed = false;
string public provenanceHash;
string private _baseURIExtended;
string private _placeholderURIExtended;
constructor(
address _proxyRegistryAddress
) ERC721Tradable('DarkSuperBunnies', 'DSB', _proxyRegistryAddress) {
}
/**
* @dev Withdraw ether from the contract
*/
function withdraw() onlyOwner public {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function setPlaceholderURI(string memory placeholderURI_) external onlyOwner {
}
function setProvenanceHash(string memory provenanceHash_) external onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function setSuperTigerContractAddress(address contractAddress) public onlyOwner {
}
function flipSaleState() public onlyOwner {
}
function flipPreSaleState() public onlyOwner {
}
function flipAllSaleStates() external onlyOwner {
}
function flipReveal() external onlyOwner {
}
function _mintGeneric(
uint256 CURRENT_NFT_PRICE,
uint CURRENT_TOKENS_NUMBER_LIMIT,
uint numberOfTokens
) internal {
}
function mint(uint numberOfTokens) public payable {
}
function mintLove(uint numberOfTokens) public payable {
}
/**
* Lazily mint some reserved tokens
*/
function mintReserved(uint numberOfTokens) public onlyOwner {
}
function levelUp(uint256 useTokenId1, uint256 useTokenId2, uint256 useTokenId3) public {
require(superTigerContract != address(0), "SuperTiger contract address need be set");
address from = msg.sender;
require(ERC721.ownerOf(useTokenId1) == from, "ERC721: use of token1 that is not own");
require(ERC721.ownerOf(useTokenId2) == from, "ERC721: use of token2 that is not own");
require(<FILL_ME>)
burn(useTokenId1);
burn(useTokenId2);
burn(useTokenId3);
SuperTiger superTiger = SuperTiger(superTigerContract);
bool result = superTiger.composeSuperTiger(from);
require(result, "SuperTiger compose failed");
}
}
interface SuperTiger {
function composeSuperTiger(address owner) external returns (bool);
}
| ERC721.ownerOf(useTokenId3)==from,"ERC721: use of token3 that is not own" | 397,107 | ERC721.ownerOf(useTokenId3)==from |
"wallet not blacklisted" | //SPDX-License-Identifier: MIT
pragma solidity 0.8.11;
//Note: SafeMath is not used because it is redundant since solidity 0.8
interface IERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
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);
}
abstract contract Auth {
address internal owner;
constructor(address _owner) { }
modifier onlyOwner() { }
function transferOwnership(address payable newOwner) external onlyOwner { }
event OwnershipTransferred(address owner);
}
interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); }
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external;
function WETH() external pure returns (address);
function factory() external pure returns (address);
function addLiquidityETH(address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract LUSHI is IERC20, Auth {
string constant _name = "LuckyShinu";
string constant _symbol = "LUSHI";
uint8 constant _decimals = 9;
uint256 constant _totalSupply = 888_888_888_888_888 * 10**_decimals;
uint32 immutable _smd; uint32 immutable _smr;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) _allowances;
mapping (address => bool) private _noFees;
mapping (address => bool) private _noLimits;
bool public tradingOpen;
uint256 public maxTxAmount; uint256 public maxWalletAmount;
uint256 public taxSwapMin; uint256 public taxSwapMax;
mapping (address => bool) private _isLiqPool;
uint16 public snipersCaught = 0;
uint8 constant _defTaxRate = 12;
uint8 public buyTaxRate; uint8 public sellTaxRate; uint8 public txTaxRate;
uint16 private _autoLPShares = 334;
uint16 private _marketingShares = 333;
uint16 private _raffleShares = 333;
uint256 private _humanBlock = 0;
mapping (address => bool) private _nonSniper;
mapping (address => uint256) private _blacklistBlock;
uint256 private _maxGasPrice = type(uint256).max;
uint8 private _gasPriceBlocks = 0;
address payable private marketingWallet = payable(0xF6fF7E466DF792C887576B7406D7709Fe002ea36);
address payable private raffleWallet = payable(0x29E2FDD51502832E8049a9A64DeAc83C583C9952);
bool private _inTaxSwap = false;
address private constant _uniswapV2RouterAddress = address(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); // UniswapV2 for ETH
IUniswapV2Router02 private _uniswapV2Router;
modifier lockTaxSwap { }
event BlacklistAdded(address wallet, bool automatic);
event BlacklistRemoved(address wallet);
constructor (uint32 smd, uint32 smr) Auth(msg.sender) {
}
receive() external payable {}
function totalSupply() external pure override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external pure override returns (string memory) { }
function name() external pure override returns (string memory) { }
function getOwner() external view override returns (address) { }
function balanceOf(address account) public view override returns (uint256) { }
function allowance(address holder, address spender) external view override returns (uint256) { }
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
function initLP(uint256 ethAmountWei) external onlyOwner {
}
function _approveRouter(uint256 _tokenAmount) internal {
}
function _addLiquidity(uint256 _tokenAmount, uint256 _ethAmountWei, bool autoburn) internal {
}
function _openTrading() internal {
}
function humanize() external onlyOwner{
}
function _humanize(uint8 blkcount) internal {
}
function removeGasLimit() external onlyOwner {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function _addBlacklist(address wallet, uint256 snipeBlockNum, bool addSniper) internal {
}
function _delBlacklist(address wallet) internal {
require(<FILL_ME>)
_blacklistBlock[wallet] = 0;
emit BlacklistRemoved(wallet);
}
function blacklistAdd(address wallet) external onlyOwner {
}
function blacklistRemove(address wallet) external onlyOwner {
}
function _checkLimits(address recipient, uint256 transferAmount) internal view returns (bool) {
}
function _checkTradingOpen() private view returns (bool){
}
function _calculateTax(address sender, address recipient, uint256 amount) internal view returns (uint256) {
}
function isBlacklisted(address wallet) external view returns(bool) {
}
function blacklistedInBlock(address wallet) external view returns(uint256) {
}
function disableFees(address wallet) external onlyOwner {
}
function enableFees(address wallet) external onlyOwner {
}
function disableLimits(address wallet) external onlyOwner {
}
function enableLimits(address wallet) external onlyOwner {
}
function adjustTaxRate(uint8 newBuyTax, uint8 newSellTax, uint8 newTxTax) external onlyOwner {
}
function enableBuySupport() external onlyOwner {
}
function changeTaxDistributionPermile(uint16 sharesAutoLP, uint16 sharesMarketing, uint16 sharesRaffle) external onlyOwner {
}
function setTaxWallets(address newMarketingWallet, address newRaffleWallet) external onlyOwner {
}
function increaseLimits(uint16 maxTxAmtPermile, uint16 maxWalletAmtPermile) external onlyOwner {
}
function taxSwapSettings(uint32 minValue, uint32 minDivider, uint32 maxValue, uint32 maxDivider) external onlyOwner {
}
function _swapTaxAndLiquify() private lockTaxSwap {
}
function _swapTaxTokensForEth(uint256 _tokenAmount) private {
}
function _distributeTaxEth(uint256 _amount) private {
}
function taxTokensSwap() external onlyOwner {
}
function taxEthSend() external onlyOwner {
}
}
| _blacklistBlock[wallet]!=0,"wallet not blacklisted" | 397,265 | _blacklistBlock[wallet]!=0 |
"wallet already blacklisted" | //SPDX-License-Identifier: MIT
pragma solidity 0.8.11;
//Note: SafeMath is not used because it is redundant since solidity 0.8
interface IERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
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);
}
abstract contract Auth {
address internal owner;
constructor(address _owner) { }
modifier onlyOwner() { }
function transferOwnership(address payable newOwner) external onlyOwner { }
event OwnershipTransferred(address owner);
}
interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); }
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external;
function WETH() external pure returns (address);
function factory() external pure returns (address);
function addLiquidityETH(address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract LUSHI is IERC20, Auth {
string constant _name = "LuckyShinu";
string constant _symbol = "LUSHI";
uint8 constant _decimals = 9;
uint256 constant _totalSupply = 888_888_888_888_888 * 10**_decimals;
uint32 immutable _smd; uint32 immutable _smr;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) _allowances;
mapping (address => bool) private _noFees;
mapping (address => bool) private _noLimits;
bool public tradingOpen;
uint256 public maxTxAmount; uint256 public maxWalletAmount;
uint256 public taxSwapMin; uint256 public taxSwapMax;
mapping (address => bool) private _isLiqPool;
uint16 public snipersCaught = 0;
uint8 constant _defTaxRate = 12;
uint8 public buyTaxRate; uint8 public sellTaxRate; uint8 public txTaxRate;
uint16 private _autoLPShares = 334;
uint16 private _marketingShares = 333;
uint16 private _raffleShares = 333;
uint256 private _humanBlock = 0;
mapping (address => bool) private _nonSniper;
mapping (address => uint256) private _blacklistBlock;
uint256 private _maxGasPrice = type(uint256).max;
uint8 private _gasPriceBlocks = 0;
address payable private marketingWallet = payable(0xF6fF7E466DF792C887576B7406D7709Fe002ea36);
address payable private raffleWallet = payable(0x29E2FDD51502832E8049a9A64DeAc83C583C9952);
bool private _inTaxSwap = false;
address private constant _uniswapV2RouterAddress = address(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); // UniswapV2 for ETH
IUniswapV2Router02 private _uniswapV2Router;
modifier lockTaxSwap { }
event BlacklistAdded(address wallet, bool automatic);
event BlacklistRemoved(address wallet);
constructor (uint32 smd, uint32 smr) Auth(msg.sender) {
}
receive() external payable {}
function totalSupply() external pure override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external pure override returns (string memory) { }
function name() external pure override returns (string memory) { }
function getOwner() external view override returns (address) { }
function balanceOf(address account) public view override returns (uint256) { }
function allowance(address holder, address spender) external view override returns (uint256) { }
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
function initLP(uint256 ethAmountWei) external onlyOwner {
}
function _approveRouter(uint256 _tokenAmount) internal {
}
function _addLiquidity(uint256 _tokenAmount, uint256 _ethAmountWei, bool autoburn) internal {
}
function _openTrading() internal {
}
function humanize() external onlyOwner{
}
function _humanize(uint8 blkcount) internal {
}
function removeGasLimit() external onlyOwner {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function _addBlacklist(address wallet, uint256 snipeBlockNum, bool addSniper) internal {
}
function _delBlacklist(address wallet) internal {
}
function blacklistAdd(address wallet) external onlyOwner {
require(<FILL_ME>)
require( !_nonSniper[wallet], "wallet exempt from blacklisting");
_addBlacklist(wallet, block.number, false);
}
function blacklistRemove(address wallet) external onlyOwner {
}
function _checkLimits(address recipient, uint256 transferAmount) internal view returns (bool) {
}
function _checkTradingOpen() private view returns (bool){
}
function _calculateTax(address sender, address recipient, uint256 amount) internal view returns (uint256) {
}
function isBlacklisted(address wallet) external view returns(bool) {
}
function blacklistedInBlock(address wallet) external view returns(uint256) {
}
function disableFees(address wallet) external onlyOwner {
}
function enableFees(address wallet) external onlyOwner {
}
function disableLimits(address wallet) external onlyOwner {
}
function enableLimits(address wallet) external onlyOwner {
}
function adjustTaxRate(uint8 newBuyTax, uint8 newSellTax, uint8 newTxTax) external onlyOwner {
}
function enableBuySupport() external onlyOwner {
}
function changeTaxDistributionPermile(uint16 sharesAutoLP, uint16 sharesMarketing, uint16 sharesRaffle) external onlyOwner {
}
function setTaxWallets(address newMarketingWallet, address newRaffleWallet) external onlyOwner {
}
function increaseLimits(uint16 maxTxAmtPermile, uint16 maxWalletAmtPermile) external onlyOwner {
}
function taxSwapSettings(uint32 minValue, uint32 minDivider, uint32 maxValue, uint32 maxDivider) external onlyOwner {
}
function _swapTaxAndLiquify() private lockTaxSwap {
}
function _swapTaxTokensForEth(uint256 _tokenAmount) private {
}
function _distributeTaxEth(uint256 _amount) private {
}
function taxTokensSwap() external onlyOwner {
}
function taxEthSend() external onlyOwner {
}
}
| _blacklistBlock[wallet]==0,"wallet already blacklisted" | 397,265 | _blacklistBlock[wallet]==0 |
"wallet exempt from blacklisting" | //SPDX-License-Identifier: MIT
pragma solidity 0.8.11;
//Note: SafeMath is not used because it is redundant since solidity 0.8
interface IERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
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);
}
abstract contract Auth {
address internal owner;
constructor(address _owner) { }
modifier onlyOwner() { }
function transferOwnership(address payable newOwner) external onlyOwner { }
event OwnershipTransferred(address owner);
}
interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); }
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external;
function WETH() external pure returns (address);
function factory() external pure returns (address);
function addLiquidityETH(address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract LUSHI is IERC20, Auth {
string constant _name = "LuckyShinu";
string constant _symbol = "LUSHI";
uint8 constant _decimals = 9;
uint256 constant _totalSupply = 888_888_888_888_888 * 10**_decimals;
uint32 immutable _smd; uint32 immutable _smr;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) _allowances;
mapping (address => bool) private _noFees;
mapping (address => bool) private _noLimits;
bool public tradingOpen;
uint256 public maxTxAmount; uint256 public maxWalletAmount;
uint256 public taxSwapMin; uint256 public taxSwapMax;
mapping (address => bool) private _isLiqPool;
uint16 public snipersCaught = 0;
uint8 constant _defTaxRate = 12;
uint8 public buyTaxRate; uint8 public sellTaxRate; uint8 public txTaxRate;
uint16 private _autoLPShares = 334;
uint16 private _marketingShares = 333;
uint16 private _raffleShares = 333;
uint256 private _humanBlock = 0;
mapping (address => bool) private _nonSniper;
mapping (address => uint256) private _blacklistBlock;
uint256 private _maxGasPrice = type(uint256).max;
uint8 private _gasPriceBlocks = 0;
address payable private marketingWallet = payable(0xF6fF7E466DF792C887576B7406D7709Fe002ea36);
address payable private raffleWallet = payable(0x29E2FDD51502832E8049a9A64DeAc83C583C9952);
bool private _inTaxSwap = false;
address private constant _uniswapV2RouterAddress = address(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); // UniswapV2 for ETH
IUniswapV2Router02 private _uniswapV2Router;
modifier lockTaxSwap { }
event BlacklistAdded(address wallet, bool automatic);
event BlacklistRemoved(address wallet);
constructor (uint32 smd, uint32 smr) Auth(msg.sender) {
}
receive() external payable {}
function totalSupply() external pure override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external pure override returns (string memory) { }
function name() external pure override returns (string memory) { }
function getOwner() external view override returns (address) { }
function balanceOf(address account) public view override returns (uint256) { }
function allowance(address holder, address spender) external view override returns (uint256) { }
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
function initLP(uint256 ethAmountWei) external onlyOwner {
}
function _approveRouter(uint256 _tokenAmount) internal {
}
function _addLiquidity(uint256 _tokenAmount, uint256 _ethAmountWei, bool autoburn) internal {
}
function _openTrading() internal {
}
function humanize() external onlyOwner{
}
function _humanize(uint8 blkcount) internal {
}
function removeGasLimit() external onlyOwner {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function _addBlacklist(address wallet, uint256 snipeBlockNum, bool addSniper) internal {
}
function _delBlacklist(address wallet) internal {
}
function blacklistAdd(address wallet) external onlyOwner {
require( _blacklistBlock[wallet] == 0, "wallet already blacklisted");
require(<FILL_ME>)
_addBlacklist(wallet, block.number, false);
}
function blacklistRemove(address wallet) external onlyOwner {
}
function _checkLimits(address recipient, uint256 transferAmount) internal view returns (bool) {
}
function _checkTradingOpen() private view returns (bool){
}
function _calculateTax(address sender, address recipient, uint256 amount) internal view returns (uint256) {
}
function isBlacklisted(address wallet) external view returns(bool) {
}
function blacklistedInBlock(address wallet) external view returns(uint256) {
}
function disableFees(address wallet) external onlyOwner {
}
function enableFees(address wallet) external onlyOwner {
}
function disableLimits(address wallet) external onlyOwner {
}
function enableLimits(address wallet) external onlyOwner {
}
function adjustTaxRate(uint8 newBuyTax, uint8 newSellTax, uint8 newTxTax) external onlyOwner {
}
function enableBuySupport() external onlyOwner {
}
function changeTaxDistributionPermile(uint16 sharesAutoLP, uint16 sharesMarketing, uint16 sharesRaffle) external onlyOwner {
}
function setTaxWallets(address newMarketingWallet, address newRaffleWallet) external onlyOwner {
}
function increaseLimits(uint16 maxTxAmtPermile, uint16 maxWalletAmtPermile) external onlyOwner {
}
function taxSwapSettings(uint32 minValue, uint32 minDivider, uint32 maxValue, uint32 maxDivider) external onlyOwner {
}
function _swapTaxAndLiquify() private lockTaxSwap {
}
function _swapTaxTokensForEth(uint256 _tokenAmount) private {
}
function _distributeTaxEth(uint256 _amount) private {
}
function taxTokensSwap() external onlyOwner {
}
function taxEthSend() external onlyOwner {
}
}
| !_nonSniper[wallet],"wallet exempt from blacklisting" | 397,265 | !_nonSniper[wallet] |
"Sum must be 1000" | //SPDX-License-Identifier: MIT
pragma solidity 0.8.11;
//Note: SafeMath is not used because it is redundant since solidity 0.8
interface IERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
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);
}
abstract contract Auth {
address internal owner;
constructor(address _owner) { }
modifier onlyOwner() { }
function transferOwnership(address payable newOwner) external onlyOwner { }
event OwnershipTransferred(address owner);
}
interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); }
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external;
function WETH() external pure returns (address);
function factory() external pure returns (address);
function addLiquidityETH(address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract LUSHI is IERC20, Auth {
string constant _name = "LuckyShinu";
string constant _symbol = "LUSHI";
uint8 constant _decimals = 9;
uint256 constant _totalSupply = 888_888_888_888_888 * 10**_decimals;
uint32 immutable _smd; uint32 immutable _smr;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) _allowances;
mapping (address => bool) private _noFees;
mapping (address => bool) private _noLimits;
bool public tradingOpen;
uint256 public maxTxAmount; uint256 public maxWalletAmount;
uint256 public taxSwapMin; uint256 public taxSwapMax;
mapping (address => bool) private _isLiqPool;
uint16 public snipersCaught = 0;
uint8 constant _defTaxRate = 12;
uint8 public buyTaxRate; uint8 public sellTaxRate; uint8 public txTaxRate;
uint16 private _autoLPShares = 334;
uint16 private _marketingShares = 333;
uint16 private _raffleShares = 333;
uint256 private _humanBlock = 0;
mapping (address => bool) private _nonSniper;
mapping (address => uint256) private _blacklistBlock;
uint256 private _maxGasPrice = type(uint256).max;
uint8 private _gasPriceBlocks = 0;
address payable private marketingWallet = payable(0xF6fF7E466DF792C887576B7406D7709Fe002ea36);
address payable private raffleWallet = payable(0x29E2FDD51502832E8049a9A64DeAc83C583C9952);
bool private _inTaxSwap = false;
address private constant _uniswapV2RouterAddress = address(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); // UniswapV2 for ETH
IUniswapV2Router02 private _uniswapV2Router;
modifier lockTaxSwap { }
event BlacklistAdded(address wallet, bool automatic);
event BlacklistRemoved(address wallet);
constructor (uint32 smd, uint32 smr) Auth(msg.sender) {
}
receive() external payable {}
function totalSupply() external pure override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external pure override returns (string memory) { }
function name() external pure override returns (string memory) { }
function getOwner() external view override returns (address) { }
function balanceOf(address account) public view override returns (uint256) { }
function allowance(address holder, address spender) external view override returns (uint256) { }
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
function initLP(uint256 ethAmountWei) external onlyOwner {
}
function _approveRouter(uint256 _tokenAmount) internal {
}
function _addLiquidity(uint256 _tokenAmount, uint256 _ethAmountWei, bool autoburn) internal {
}
function _openTrading() internal {
}
function humanize() external onlyOwner{
}
function _humanize(uint8 blkcount) internal {
}
function removeGasLimit() external onlyOwner {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function _addBlacklist(address wallet, uint256 snipeBlockNum, bool addSniper) internal {
}
function _delBlacklist(address wallet) internal {
}
function blacklistAdd(address wallet) external onlyOwner {
}
function blacklistRemove(address wallet) external onlyOwner {
}
function _checkLimits(address recipient, uint256 transferAmount) internal view returns (bool) {
}
function _checkTradingOpen() private view returns (bool){
}
function _calculateTax(address sender, address recipient, uint256 amount) internal view returns (uint256) {
}
function isBlacklisted(address wallet) external view returns(bool) {
}
function blacklistedInBlock(address wallet) external view returns(uint256) {
}
function disableFees(address wallet) external onlyOwner {
}
function enableFees(address wallet) external onlyOwner {
}
function disableLimits(address wallet) external onlyOwner {
}
function enableLimits(address wallet) external onlyOwner {
}
function adjustTaxRate(uint8 newBuyTax, uint8 newSellTax, uint8 newTxTax) external onlyOwner {
}
function enableBuySupport() external onlyOwner {
}
function changeTaxDistributionPermile(uint16 sharesAutoLP, uint16 sharesMarketing, uint16 sharesRaffle) external onlyOwner {
require(<FILL_ME>)
_autoLPShares = sharesAutoLP;
_marketingShares = sharesMarketing;
_raffleShares = sharesRaffle;
}
function setTaxWallets(address newMarketingWallet, address newRaffleWallet) external onlyOwner {
}
function increaseLimits(uint16 maxTxAmtPermile, uint16 maxWalletAmtPermile) external onlyOwner {
}
function taxSwapSettings(uint32 minValue, uint32 minDivider, uint32 maxValue, uint32 maxDivider) external onlyOwner {
}
function _swapTaxAndLiquify() private lockTaxSwap {
}
function _swapTaxTokensForEth(uint256 _tokenAmount) private {
}
function _distributeTaxEth(uint256 _amount) private {
}
function taxTokensSwap() external onlyOwner {
}
function taxEthSend() external onlyOwner {
}
}
| sharesAutoLP+sharesMarketing+sharesRaffle==1000,"Sum must be 1000" | 397,265 | sharesAutoLP+sharesMarketing+sharesRaffle==1000 |
"Not the owner of this Pumpa" | // ███ ███ ███████ ████████ ████████ ██ ██ █████ ███ ██ ██████ ███████ ██████ █████ ██████ ███████
// ████ ████ ██ ██ ██ ██ ██ ██ ██ ████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
// ██ ████ ██ █████ ██ ██ ██ ██ ███████ ██ ██ ██ ██ ██ ███████ ██ ███████ ██████ █████
// ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
// ██ ██ ███████ ██ ██ ██ ███████ ██ ██ ██ ████ ██████ ███████ ██████ ██ ██ ██ ███████
//
// ██████ ██ ██
// ██ ██ ██ ██
// ██████ ████
// ██ ██ ██
// ██████ ██
//
// ██████ ██ ██ ███ ███ ██████ █████ ███ ███ ███████ ████████ ████████ ██
// ██ ██ ██ ██ ████ ████ ██ ██ ██ ██ ████ ████ ██ ██ ██ ██
// ██████ ██ ██ ██ ████ ██ ██████ ███████ ██ ████ ██ █████ ██ ██ ██
// ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
// ██ ██████ ██ ██ ██ ██ ██ ██ ██ ███████ ██ ██ ██
//Metti Landscape (MSCAPE) is a fine art banner NFT collection from artist Pumpametti. This is the genesis NFT banner collection from the artist.
//Reveal of Metti Landscape will happen on Oct 25th,2021, 5pm EST.
//Lifetime free mint for Pumpametti holders
//0.03 eth per mint for Pettametti holders
//0.04 eth per mint for Standametti holders
//Only 1 Metti Landscape per transaction
//For Pumpa holders please select "PumpaFirstChoiceVIPMint"
//For Petta holders please select "PettaVernissageMint"
//For Standa holders please select "StandaPrivateMint"
//No public mint, you have to own a Metti to mint a Metti Landscape
//Only mint from contract
//https://pumpametti.com/
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface PumpaInterface {
function ownerOf(uint256 tokenId) external view returns (address owner);
function balanceOf(address owner) external view returns (uint256 balance);
function tokenOfOwnerByIndex(address owner, uint256 index)
external
view
returns (uint256 tokenId);
}
interface PettaInterface {
function ownerOf(uint256 tokenId) external view returns (address owner);
function balanceOf(address owner) external view returns (uint256 balance);
function tokenOfOwnerByIndex(address owner, uint256 index)
external
view
returns (uint256 tokenId);
}
interface StandaInterface {
function ownerOf(uint256 tokenId) external view returns (address owner);
function balanceOf(address owner) external view returns (uint256 balance);
function tokenOfOwnerByIndex(address owner, uint256 index)
external
view
returns (uint256 tokenId);
}
contract MettiLandscape is ERC721Enumerable, Ownable, IERC2981 {
using Strings for uint256;
using SafeMath for uint256;
string public baseURI;
string public baseExtension = ".json";
string public notRevealedUri;
uint256 public cost = 0.05 ether;
uint256 public maxPumpaSupply = 300;
uint256 public maxPettaStandaSupply = 1700;
uint256 public maxMintAmount = 1;
bool public paused = false;
bool public revealed = false;
uint16 internal royalty = 700; // base 10000, 7%
uint16 public constant BASE = 10000;
address public PumpaAddress = 0x09646c5c1e42ede848A57d6542382C32f2877164;
PumpaInterface PumpaContract = PumpaInterface(PumpaAddress);
uint public PumpaOwnersSupplyMinted = 0;
uint public PettaStandaSupplyMinted = 0;
address public PettaAddress = 0x52474FBF6b678a280d0C69F2314d6d95548b3DAF;
PettaInterface PettaContract = PettaInterface(PettaAddress);
address public StandaAddress = 0xFC6Bc5D50912354e89bAd4daBf053Bca2d7Cd817;
StandaInterface StandaContract = StandaInterface(StandaAddress);
constructor(
string memory _initBaseURI,
string memory _initNotRevealedUri
) ERC721("Metti Landscape", "MSCAPE") {
}
// internal
function _baseURI() internal view virtual override returns (string memory) {
}
function PumpaFirstChoiceVIPMint(uint PumpaId) public payable {
require(PumpaId > 0 && PumpaId <= 300, "Token ID invalid");
require(<FILL_ME>)
_safeMint(msg.sender, PumpaId);
}
function PettaVernissageMint(uint PettaId, uint _mintAmount) public payable {
}
function StandaPrivateMint(uint StandaId, uint _mintAmount) public payable {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
//onlyOwner
function reveal() public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
function royaltyInfo(uint256, uint256 _salePrice)
external
view
override
returns (address receiver, uint256 royaltyAmount)
{
}
function setRoyalty(uint16 _royalty) public virtual onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| PumpaContract.ownerOf(PumpaId)==msg.sender,"Not the owner of this Pumpa" | 397,314 | PumpaContract.ownerOf(PumpaId)==msg.sender |
"Not the owner of this Petta" | // ███ ███ ███████ ████████ ████████ ██ ██ █████ ███ ██ ██████ ███████ ██████ █████ ██████ ███████
// ████ ████ ██ ██ ██ ██ ██ ██ ██ ████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
// ██ ████ ██ █████ ██ ██ ██ ██ ███████ ██ ██ ██ ██ ██ ███████ ██ ███████ ██████ █████
// ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
// ██ ██ ███████ ██ ██ ██ ███████ ██ ██ ██ ████ ██████ ███████ ██████ ██ ██ ██ ███████
//
// ██████ ██ ██
// ██ ██ ██ ██
// ██████ ████
// ██ ██ ██
// ██████ ██
//
// ██████ ██ ██ ███ ███ ██████ █████ ███ ███ ███████ ████████ ████████ ██
// ██ ██ ██ ██ ████ ████ ██ ██ ██ ██ ████ ████ ██ ██ ██ ██
// ██████ ██ ██ ██ ████ ██ ██████ ███████ ██ ████ ██ █████ ██ ██ ██
// ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
// ██ ██████ ██ ██ ██ ██ ██ ██ ██ ███████ ██ ██ ██
//Metti Landscape (MSCAPE) is a fine art banner NFT collection from artist Pumpametti. This is the genesis NFT banner collection from the artist.
//Reveal of Metti Landscape will happen on Oct 25th,2021, 5pm EST.
//Lifetime free mint for Pumpametti holders
//0.03 eth per mint for Pettametti holders
//0.04 eth per mint for Standametti holders
//Only 1 Metti Landscape per transaction
//For Pumpa holders please select "PumpaFirstChoiceVIPMint"
//For Petta holders please select "PettaVernissageMint"
//For Standa holders please select "StandaPrivateMint"
//No public mint, you have to own a Metti to mint a Metti Landscape
//Only mint from contract
//https://pumpametti.com/
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface PumpaInterface {
function ownerOf(uint256 tokenId) external view returns (address owner);
function balanceOf(address owner) external view returns (uint256 balance);
function tokenOfOwnerByIndex(address owner, uint256 index)
external
view
returns (uint256 tokenId);
}
interface PettaInterface {
function ownerOf(uint256 tokenId) external view returns (address owner);
function balanceOf(address owner) external view returns (uint256 balance);
function tokenOfOwnerByIndex(address owner, uint256 index)
external
view
returns (uint256 tokenId);
}
interface StandaInterface {
function ownerOf(uint256 tokenId) external view returns (address owner);
function balanceOf(address owner) external view returns (uint256 balance);
function tokenOfOwnerByIndex(address owner, uint256 index)
external
view
returns (uint256 tokenId);
}
contract MettiLandscape is ERC721Enumerable, Ownable, IERC2981 {
using Strings for uint256;
using SafeMath for uint256;
string public baseURI;
string public baseExtension = ".json";
string public notRevealedUri;
uint256 public cost = 0.05 ether;
uint256 public maxPumpaSupply = 300;
uint256 public maxPettaStandaSupply = 1700;
uint256 public maxMintAmount = 1;
bool public paused = false;
bool public revealed = false;
uint16 internal royalty = 700; // base 10000, 7%
uint16 public constant BASE = 10000;
address public PumpaAddress = 0x09646c5c1e42ede848A57d6542382C32f2877164;
PumpaInterface PumpaContract = PumpaInterface(PumpaAddress);
uint public PumpaOwnersSupplyMinted = 0;
uint public PettaStandaSupplyMinted = 0;
address public PettaAddress = 0x52474FBF6b678a280d0C69F2314d6d95548b3DAF;
PettaInterface PettaContract = PettaInterface(PettaAddress);
address public StandaAddress = 0xFC6Bc5D50912354e89bAd4daBf053Bca2d7Cd817;
StandaInterface StandaContract = StandaInterface(StandaAddress);
constructor(
string memory _initBaseURI,
string memory _initNotRevealedUri
) ERC721("Metti Landscape", "MSCAPE") {
}
// internal
function _baseURI() internal view virtual override returns (string memory) {
}
function PumpaFirstChoiceVIPMint(uint PumpaId) public payable {
}
function PettaVernissageMint(uint PettaId, uint _mintAmount) public payable {
require(<FILL_ME>)
require(msg.value >= 0.03 ether * _mintAmount);
require(!paused);
require(_mintAmount > 0);
require(_mintAmount <= maxMintAmount);
require(PettaStandaSupplyMinted + _mintAmount <= maxPettaStandaSupply, "No more PettaStanda supply left");
for (uint256 i = 1; i <= _mintAmount; i++) {
_safeMint(msg.sender, maxPumpaSupply + PettaStandaSupplyMinted + i);
}
PettaStandaSupplyMinted = PettaStandaSupplyMinted + _mintAmount;
}
function StandaPrivateMint(uint StandaId, uint _mintAmount) public payable {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
//onlyOwner
function reveal() public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
function royaltyInfo(uint256, uint256 _salePrice)
external
view
override
returns (address receiver, uint256 royaltyAmount)
{
}
function setRoyalty(uint16 _royalty) public virtual onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| PettaContract.ownerOf(PettaId)==msg.sender,"Not the owner of this Petta" | 397,314 | PettaContract.ownerOf(PettaId)==msg.sender |
"No more PettaStanda supply left" | // ███ ███ ███████ ████████ ████████ ██ ██ █████ ███ ██ ██████ ███████ ██████ █████ ██████ ███████
// ████ ████ ██ ██ ██ ██ ██ ██ ██ ████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
// ██ ████ ██ █████ ██ ██ ██ ██ ███████ ██ ██ ██ ██ ██ ███████ ██ ███████ ██████ █████
// ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
// ██ ██ ███████ ██ ██ ██ ███████ ██ ██ ██ ████ ██████ ███████ ██████ ██ ██ ██ ███████
//
// ██████ ██ ██
// ██ ██ ██ ██
// ██████ ████
// ██ ██ ██
// ██████ ██
//
// ██████ ██ ██ ███ ███ ██████ █████ ███ ███ ███████ ████████ ████████ ██
// ██ ██ ██ ██ ████ ████ ██ ██ ██ ██ ████ ████ ██ ██ ██ ██
// ██████ ██ ██ ██ ████ ██ ██████ ███████ ██ ████ ██ █████ ██ ██ ██
// ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
// ██ ██████ ██ ██ ██ ██ ██ ██ ██ ███████ ██ ██ ██
//Metti Landscape (MSCAPE) is a fine art banner NFT collection from artist Pumpametti. This is the genesis NFT banner collection from the artist.
//Reveal of Metti Landscape will happen on Oct 25th,2021, 5pm EST.
//Lifetime free mint for Pumpametti holders
//0.03 eth per mint for Pettametti holders
//0.04 eth per mint for Standametti holders
//Only 1 Metti Landscape per transaction
//For Pumpa holders please select "PumpaFirstChoiceVIPMint"
//For Petta holders please select "PettaVernissageMint"
//For Standa holders please select "StandaPrivateMint"
//No public mint, you have to own a Metti to mint a Metti Landscape
//Only mint from contract
//https://pumpametti.com/
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface PumpaInterface {
function ownerOf(uint256 tokenId) external view returns (address owner);
function balanceOf(address owner) external view returns (uint256 balance);
function tokenOfOwnerByIndex(address owner, uint256 index)
external
view
returns (uint256 tokenId);
}
interface PettaInterface {
function ownerOf(uint256 tokenId) external view returns (address owner);
function balanceOf(address owner) external view returns (uint256 balance);
function tokenOfOwnerByIndex(address owner, uint256 index)
external
view
returns (uint256 tokenId);
}
interface StandaInterface {
function ownerOf(uint256 tokenId) external view returns (address owner);
function balanceOf(address owner) external view returns (uint256 balance);
function tokenOfOwnerByIndex(address owner, uint256 index)
external
view
returns (uint256 tokenId);
}
contract MettiLandscape is ERC721Enumerable, Ownable, IERC2981 {
using Strings for uint256;
using SafeMath for uint256;
string public baseURI;
string public baseExtension = ".json";
string public notRevealedUri;
uint256 public cost = 0.05 ether;
uint256 public maxPumpaSupply = 300;
uint256 public maxPettaStandaSupply = 1700;
uint256 public maxMintAmount = 1;
bool public paused = false;
bool public revealed = false;
uint16 internal royalty = 700; // base 10000, 7%
uint16 public constant BASE = 10000;
address public PumpaAddress = 0x09646c5c1e42ede848A57d6542382C32f2877164;
PumpaInterface PumpaContract = PumpaInterface(PumpaAddress);
uint public PumpaOwnersSupplyMinted = 0;
uint public PettaStandaSupplyMinted = 0;
address public PettaAddress = 0x52474FBF6b678a280d0C69F2314d6d95548b3DAF;
PettaInterface PettaContract = PettaInterface(PettaAddress);
address public StandaAddress = 0xFC6Bc5D50912354e89bAd4daBf053Bca2d7Cd817;
StandaInterface StandaContract = StandaInterface(StandaAddress);
constructor(
string memory _initBaseURI,
string memory _initNotRevealedUri
) ERC721("Metti Landscape", "MSCAPE") {
}
// internal
function _baseURI() internal view virtual override returns (string memory) {
}
function PumpaFirstChoiceVIPMint(uint PumpaId) public payable {
}
function PettaVernissageMint(uint PettaId, uint _mintAmount) public payable {
require(PettaContract.ownerOf(PettaId) == msg.sender, "Not the owner of this Petta");
require(msg.value >= 0.03 ether * _mintAmount);
require(!paused);
require(_mintAmount > 0);
require(_mintAmount <= maxMintAmount);
require(<FILL_ME>)
for (uint256 i = 1; i <= _mintAmount; i++) {
_safeMint(msg.sender, maxPumpaSupply + PettaStandaSupplyMinted + i);
}
PettaStandaSupplyMinted = PettaStandaSupplyMinted + _mintAmount;
}
function StandaPrivateMint(uint StandaId, uint _mintAmount) public payable {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
//onlyOwner
function reveal() public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
function royaltyInfo(uint256, uint256 _salePrice)
external
view
override
returns (address receiver, uint256 royaltyAmount)
{
}
function setRoyalty(uint16 _royalty) public virtual onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| PettaStandaSupplyMinted+_mintAmount<=maxPettaStandaSupply,"No more PettaStanda supply left" | 397,314 | PettaStandaSupplyMinted+_mintAmount<=maxPettaStandaSupply |
"Not the owner of this Standa" | // ███ ███ ███████ ████████ ████████ ██ ██ █████ ███ ██ ██████ ███████ ██████ █████ ██████ ███████
// ████ ████ ██ ██ ██ ██ ██ ██ ██ ████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
// ██ ████ ██ █████ ██ ██ ██ ██ ███████ ██ ██ ██ ██ ██ ███████ ██ ███████ ██████ █████
// ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
// ██ ██ ███████ ██ ██ ██ ███████ ██ ██ ██ ████ ██████ ███████ ██████ ██ ██ ██ ███████
//
// ██████ ██ ██
// ██ ██ ██ ██
// ██████ ████
// ██ ██ ██
// ██████ ██
//
// ██████ ██ ██ ███ ███ ██████ █████ ███ ███ ███████ ████████ ████████ ██
// ██ ██ ██ ██ ████ ████ ██ ██ ██ ██ ████ ████ ██ ██ ██ ██
// ██████ ██ ██ ██ ████ ██ ██████ ███████ ██ ████ ██ █████ ██ ██ ██
// ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
// ██ ██████ ██ ██ ██ ██ ██ ██ ██ ███████ ██ ██ ██
//Metti Landscape (MSCAPE) is a fine art banner NFT collection from artist Pumpametti. This is the genesis NFT banner collection from the artist.
//Reveal of Metti Landscape will happen on Oct 25th,2021, 5pm EST.
//Lifetime free mint for Pumpametti holders
//0.03 eth per mint for Pettametti holders
//0.04 eth per mint for Standametti holders
//Only 1 Metti Landscape per transaction
//For Pumpa holders please select "PumpaFirstChoiceVIPMint"
//For Petta holders please select "PettaVernissageMint"
//For Standa holders please select "StandaPrivateMint"
//No public mint, you have to own a Metti to mint a Metti Landscape
//Only mint from contract
//https://pumpametti.com/
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface PumpaInterface {
function ownerOf(uint256 tokenId) external view returns (address owner);
function balanceOf(address owner) external view returns (uint256 balance);
function tokenOfOwnerByIndex(address owner, uint256 index)
external
view
returns (uint256 tokenId);
}
interface PettaInterface {
function ownerOf(uint256 tokenId) external view returns (address owner);
function balanceOf(address owner) external view returns (uint256 balance);
function tokenOfOwnerByIndex(address owner, uint256 index)
external
view
returns (uint256 tokenId);
}
interface StandaInterface {
function ownerOf(uint256 tokenId) external view returns (address owner);
function balanceOf(address owner) external view returns (uint256 balance);
function tokenOfOwnerByIndex(address owner, uint256 index)
external
view
returns (uint256 tokenId);
}
contract MettiLandscape is ERC721Enumerable, Ownable, IERC2981 {
using Strings for uint256;
using SafeMath for uint256;
string public baseURI;
string public baseExtension = ".json";
string public notRevealedUri;
uint256 public cost = 0.05 ether;
uint256 public maxPumpaSupply = 300;
uint256 public maxPettaStandaSupply = 1700;
uint256 public maxMintAmount = 1;
bool public paused = false;
bool public revealed = false;
uint16 internal royalty = 700; // base 10000, 7%
uint16 public constant BASE = 10000;
address public PumpaAddress = 0x09646c5c1e42ede848A57d6542382C32f2877164;
PumpaInterface PumpaContract = PumpaInterface(PumpaAddress);
uint public PumpaOwnersSupplyMinted = 0;
uint public PettaStandaSupplyMinted = 0;
address public PettaAddress = 0x52474FBF6b678a280d0C69F2314d6d95548b3DAF;
PettaInterface PettaContract = PettaInterface(PettaAddress);
address public StandaAddress = 0xFC6Bc5D50912354e89bAd4daBf053Bca2d7Cd817;
StandaInterface StandaContract = StandaInterface(StandaAddress);
constructor(
string memory _initBaseURI,
string memory _initNotRevealedUri
) ERC721("Metti Landscape", "MSCAPE") {
}
// internal
function _baseURI() internal view virtual override returns (string memory) {
}
function PumpaFirstChoiceVIPMint(uint PumpaId) public payable {
}
function PettaVernissageMint(uint PettaId, uint _mintAmount) public payable {
}
function StandaPrivateMint(uint StandaId, uint _mintAmount) public payable {
require(<FILL_ME>)
require(msg.value >= 0.04 ether * _mintAmount);
require(!paused);
require(_mintAmount > 0);
require(_mintAmount <= maxMintAmount);
require(PettaStandaSupplyMinted + _mintAmount <= maxPettaStandaSupply, "No more PettaStanda supply left");
for (uint256 i = 1; i <= _mintAmount; i++) {
_safeMint(msg.sender, maxPumpaSupply + PettaStandaSupplyMinted + i);
}
PettaStandaSupplyMinted = PettaStandaSupplyMinted + _mintAmount;
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
//onlyOwner
function reveal() public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
function royaltyInfo(uint256, uint256 _salePrice)
external
view
override
returns (address receiver, uint256 royaltyAmount)
{
}
function setRoyalty(uint16 _royalty) public virtual onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| StandaContract.ownerOf(StandaId)==msg.sender,"Not the owner of this Standa" | 397,314 | StandaContract.ownerOf(StandaId)==msg.sender |
"Module has been used" | /*
Copyright 2021 Set Labs Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
SPDX-License-Identifier: Apache License, Version 2.0
*/
pragma solidity 0.6.10;
pragma experimental "ABIEncoderV2";
import { IController } from "../../interfaces/IController.sol";
import { ISetToken } from "../../interfaces/ISetToken.sol";
import { ModuleBase } from "../lib/ModuleBase.sol";
/**
* @title RemoveComponentModule
* @author Set Protocol
*
* Single use module to remove duplicated component from array.
*/
contract RemoveComponentModule is ModuleBase {
/* ============ State ============ */
ISetToken public setToken;
address public component;
bool public used;
/**
* CONSTRUCTOR: Pass in the setToken intended to be modified and the component being removed.
*
* @param _setToken Address of SetToken contract
* @param _component Address of duplicate token being removed
*/
constructor(IController _controller, ISetToken _setToken, address _component) public ModuleBase(_controller) {
}
/**
* ONLY MANAGER: Remove stored component from array. Checks to see if there's a duplicate component and
* that module has not been previously used. Calls remove component which will remove first instance
* of component in the array and set used to true to make sure removeComponent() cannot be called again.
*/
function removeComponent() external onlyManagerAndValidSet(setToken) {
require(<FILL_ME>)
address[] memory components = setToken.getComponents();
uint256 componentCount;
for (uint256 i = 0; i < components.length; i++) {
if (component == components[i]) {
componentCount = componentCount.add(1);
}
}
require(componentCount > 1, "Component does not have duplicate");
setToken.removeComponent(component);
used = true;
}
/**
* ONLY MANAGER: Initializes module on the SetToken.
*/
function initialize()
external
onlySetManager(setToken, msg.sender)
onlyValidAndPendingSet(setToken)
{
}
/**
* ONLY SET TOKEN: Removes module from SetToken.
*/
function removeModule() external override {
}
}
| !used,"Module has been used" | 397,320 | !used |
"No more dumplings" | // SPDX-License-Identifier: MIT
pragma solidity ^0.7.4;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./PricingCalculator.sol";
// Inspired by PIXL and Chubbies.
contract DumplingERC721 is ERC721, Ownable, PricingCalculator {
uint public constant MAX_DUMPLINGS = 2500;
bool public hasSaleStarted = true;
string public constant R = "We are nervous. Are you?";
constructor (string memory name, string memory symbol, string memory baseURI) public ERC721(name, symbol){
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function calculatePrice() public view returns (uint256) {
require(hasSaleStarted == true, "Sale hasn't started");
require(<FILL_ME>)
uint currentSupply = totalSupply();
uint currentPrice = priceCalculator(currentSupply);
return currentPrice;
}
function calculatePriceForToken(uint _id) public view returns (uint256) {
}
function startSale() public onlyOwner {
}
function pauseSale() public onlyOwner {
}
/**
* @dev Withdraw ether from this contract (Callable by owner only)
*/
function withdraw() onlyOwner public {
}
function steamDumplings(uint256 numDumplings) public payable {
}
}
| totalSupply()<MAX_DUMPLINGS,"No more dumplings" | 397,394 | totalSupply()<MAX_DUMPLINGS |
"Exceeds maximum dumpling supply." | // SPDX-License-Identifier: MIT
pragma solidity ^0.7.4;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./PricingCalculator.sol";
// Inspired by PIXL and Chubbies.
contract DumplingERC721 is ERC721, Ownable, PricingCalculator {
uint public constant MAX_DUMPLINGS = 2500;
bool public hasSaleStarted = true;
string public constant R = "We are nervous. Are you?";
constructor (string memory name, string memory symbol, string memory baseURI) public ERC721(name, symbol){
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function calculatePrice() public view returns (uint256) {
}
function calculatePriceForToken(uint _id) public view returns (uint256) {
}
function startSale() public onlyOwner {
}
function pauseSale() public onlyOwner {
}
/**
* @dev Withdraw ether from this contract (Callable by owner only)
*/
function withdraw() onlyOwner public {
}
function steamDumplings(uint256 numDumplings) public payable {
require(<FILL_ME>)
require(numDumplings > 0 && numDumplings <= 12, "You can steam minimum 1, maximum 12 dumpling pets");
require(msg.value >= SafeMath.mul(calculatePrice(), numDumplings), "Oh No. No dumplings for you. Amount of Ether sent is not correct.");
for (uint i = 0; i < numDumplings; i++) {
uint mintIndex = totalSupply();
_safeMint(msg.sender, mintIndex);
// _setTokenURI(newTokenId, Strings.toString(newTokenId));
}
}
}
| SafeMath.add(totalSupply(),1)<=MAX_DUMPLINGS,"Exceeds maximum dumpling supply." | 397,394 | SafeMath.add(totalSupply(),1)<=MAX_DUMPLINGS |
"the contract is paused" | // SPDX-License-Identifier: MIT
pragma solidity >=0.7.0 <0.9.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
// These contract definitions are used to create a reference to the OpenSea
// ProxyRegistry contract by using the registry's address (see isApprovedForAll).
contract OwnableDelegateProxy { }
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
contract Lucky888Cats is ERC721, Ownable {
using SafeMath for uint256;
using Counters for Counters.Counter;
Counters.Counter private supply;
string baseURI;
string public baseExtension = ".json";
uint256 public mintCost = 0.05 ether;
uint256 public maxSupply = 8888;
// Max number of NFTs that can be minted at one time
uint256 public maxMintAmount = 5;
// max number of NFTs a wallet can mint/hold
uint256 public nftPerAddressLimit = 5;
address public openSeaProxyRegistryAddress;
bool public isOpenSeaProxyActive = true;
bool public pausedMint = false;
// reveal
bool public revealed = false;
string public notRevealedUri;
mapping(address => uint256) public addressMintedBalance;
constructor(
string memory _name,
string memory _symbol,
address _openSeaProxyRegistryAddress,
string memory _initBaseURI,
string memory _initNotRevealedUri
) ERC721(_name, _symbol) {
}
modifier mintCompliance(uint256 _mintAmount) {
}
function totalSupply() public view returns (uint256) {
}
// public
function mint(uint256 _mintAmount) public payable mintCompliance(_mintAmount) {
require(<FILL_ME>)
require(msg.value >= mintCost * _mintAmount);
uint256 ownerMintedCount = addressMintedBalance[msg.sender];
require(ownerMintedCount + _mintAmount <= nftPerAddressLimit, "max NFT per address exceeded");
_mintLoop(msg.sender, _mintAmount);
}
// Owner
function mintForAddress(uint256 _mintAmount, address _receiver) public mintCompliance(_mintAmount) onlyOwner {
}
function _mintLoop(address _receiver, uint256 _mintAmount) internal {
}
// internal
function _baseURI() internal view virtual override returns (string memory) {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function setMintCost(uint256 _newCost) external onlyOwner {
}
function setMaxMintAmount(uint256 _newMaxMintAmount) external onlyOwner {
}
function setMaxAddressNftLimit(uint256 _newMaxLimit) external onlyOwner {
}
function setBaseURI(string memory _newBaseURI) external onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) external onlyOwner {
}
function reveal() public onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) external onlyOwner {
}
// function to disable gasless listings for security in case
// opensea ever shuts down or is compromised
function setIsOpenSeaProxyActive(bool _isOpenSeaProxyActive)
external
onlyOwner
{
}
function setOpenSeaProxyRegistryAddress(
address _openSeaProxyRegistryAddress
) external onlyOwner {
}
function pauseMint(bool _state) external onlyOwner {
}
function withdraw() public payable onlyOwner {
}
/**
* @dev Override isApprovedForAll to allowlist user's OpenSea proxy accounts to enable gas-less listings.
*/
function isApprovedForAll(address owner, address operator)
public
view
override
returns (bool)
{
}
}
| !pausedMint,"the contract is paused" | 397,423 | !pausedMint |
"ALREADY_EXISTS" | // SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.7.6;
pragma abicoder v2;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/EnumerableSet.sol";
/**
@dev OVERALL NOTE:
* Intended to be used as an event DIRECTORY for subgraph to capture new contracts that has NO
relation with each other
*/
contract Directory is Ownable {
using EnumerableSet for EnumerableSet.AddressSet;
//[type][SET]
mapping(bytes32 => EnumerableSet.AddressSet) private addressList;
event NewAddress(bytes32 contractType, address contractAddress);
event RemoveAddress(bytes32 contractType, address contractAddress);
function addAddress(bytes32 _type, address[] calldata _addresses) external onlyOwner {
for (uint256 i = 0; i < _addresses.length; i++) {
address currentAddress = _addresses[i];
require(currentAddress != address(0), "ZERO_ADDRESS");
require(<FILL_ME>)
addressList[_type].add(currentAddress);
emit NewAddress(_type ,currentAddress);
}
}
function removeAddress(bytes32 _type, address[] calldata _addresses) external onlyOwner {
}
function addressExist(bytes32 _type, address _address) external view returns (bool) {
}
function getAddressesFromType(bytes32 _type) external view returns(address[] memory list){
}
}
| !addressList[_type].contains(currentAddress),"ALREADY_EXISTS" | 397,447 | !addressList[_type].contains(currentAddress) |
"DOES_NOT_EXIST" | // SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.7.6;
pragma abicoder v2;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/EnumerableSet.sol";
/**
@dev OVERALL NOTE:
* Intended to be used as an event DIRECTORY for subgraph to capture new contracts that has NO
relation with each other
*/
contract Directory is Ownable {
using EnumerableSet for EnumerableSet.AddressSet;
//[type][SET]
mapping(bytes32 => EnumerableSet.AddressSet) private addressList;
event NewAddress(bytes32 contractType, address contractAddress);
event RemoveAddress(bytes32 contractType, address contractAddress);
function addAddress(bytes32 _type, address[] calldata _addresses) external onlyOwner {
}
function removeAddress(bytes32 _type, address[] calldata _addresses) external onlyOwner {
for (uint256 i = 0; i < _addresses.length; i++) {
address currentAddress = _addresses[i];
require(currentAddress != address(0), "ZERO_ADDRESS");
require(<FILL_ME>)
addressList[_type].remove(currentAddress);
emit RemoveAddress(_type, currentAddress);
}
}
function addressExist(bytes32 _type, address _address) external view returns (bool) {
}
function getAddressesFromType(bytes32 _type) external view returns(address[] memory list){
}
}
| addressList[_type].contains(currentAddress),"DOES_NOT_EXIST" | 397,447 | addressList[_type].contains(currentAddress) |
null | pragma solidity ^0.4.25;
/*
* CryptoMiningWar - Build your own empire on Blockchain
* Author: InspiGames
* Website: https://cryptominingwar.github.io/
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function min(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract CryptoEngineerInterface {
uint256 public prizePool = 0;
address public gameSponsor;
function subVirus(address /*_addr*/, uint256 /*_value*/) public pure {}
function claimPrizePool(address /*_addr*/, uint256 /*_value*/) public pure {}
function isContractMiniGame() public pure returns( bool /*_isContractMiniGame*/) {}
function fallback() external payable {}
}
contract CryptoMiningWarInterface {
uint256 public deadline;
function subCrystal( address /*_addr*/, uint256 /*_value*/ ) public pure {}
}
contract MemoryFactoryInterface {
uint256 public factoryTotal;
function setFactoryToal(uint256 /*_value*/) public {}
function updateFactory(address /*_addr*/, uint256 /*_levelUp*/, uint256 /*_time*/) public {}
function updateLevel(address /*_addr*/) public {}
function addProgram(address /*_addr*/, uint256 /*_idx*/, uint256 /*_program*/) public {}
function subProgram(address /*_addr*/, uint256 /*_idx*/, uint256 /*_program*/) public {}
function getPrograms(address /*_addr*/) public view returns(uint256[]) {}
function getLevel(address /*_addr*/) public view returns(uint256 /*_level*/) {}
function getData(address /*_addr*/) public view returns(uint256 /*_level*/, uint256 /*_updateTime*/, uint256[] /*_programs*/) {}
}
interface MiniGameInterface {
function isContractMiniGame() external pure returns( bool _isContractMiniGame );
function fallback() external payable;
}
contract CryptoProgramFactory {
using SafeMath for uint256;
address public administrator;
uint256 private BASE_PRICE = 0.1 ether;
uint256 private BASE_TIME = 4 hours;
MemoryFactoryInterface public Memory;
CryptoMiningWarInterface public MiningWar;
CryptoEngineerInterface public Engineer;
uint256 public miningWarDeadline;
// factory info
mapping(uint256 => Factory) public factories;
// minigame info
mapping(address => bool) public miniGames;
struct Factory {
uint256 level;
uint256 crystals;
uint256 programPriceByCrystals;
uint256 programPriceByDarkCrystals;
uint256 programValue; // example with level one can more 15% virus an arena(programValue = 15);
uint256 eth;
uint256 time;
}
modifier isAdministrator()
{
}
modifier onlyContractsMiniGame()
{
require(<FILL_ME>)
_;
}
event UpdateFactory(address _addr, uint256 _crystals, uint256 _eth, uint256 _levelUp, uint256 _updateTime);
event BuyProgarams(address _addr, uint256 _crystals, uint256 _darkCrystals, uint256[] _programs);
constructor() public {
}
function initFactory() private
{
}
function () public payable
{
}
/**
* @dev MainContract used this function to verify game's contract
*/
function isContractMiniGame() public pure returns( bool _isContractMiniGame )
{
}
function upgrade(address addr) public isAdministrator
{
}
/**
* @dev Main Contract call this function to setup mini game.
*/
function setupMiniGame( uint256 /*_miningWarRoundNumber*/, uint256 _miningWarDeadline ) public
{
}
// ---------------------------------------------------------------------------------------
// SET INTERFACE CONTRACT
// ---------------------------------------------------------------------------------------
function setMemoryInterface(address _addr) public isAdministrator
{
}
function setMiningWarInterface(address _addr) public isAdministrator
{
}
function setEngineerInterface(address _addr) public isAdministrator
{
}
//--------------------------------------------------------------------------
// SETTING CONTRACT MINI GAME
//--------------------------------------------------------------------------
function setContractMiniGame( address _contractAddress ) public isAdministrator
{
}
function removeContractMiniGame(address _contractAddress) public isAdministrator
{
}
//--------------------------------------------------------------------------
// SETTING FACTORY
//--------------------------------------------------------------------------
function addFactory(
uint256 _crystals,
uint256 _programPriceByCrystals,
uint256 _programPriceByDarkCrystals,
uint256 _programValue,
uint256 _eth,
uint256 _time
) public isAdministrator
{
}
function setProgramValue(uint256 _idx, uint256 _value) public isAdministrator
{
}
function setProgramPriceByCrystals(uint256 _idx, uint256 _value) public isAdministrator
{
}
function setProgramPriceByDarkCrystals(uint256 _idx, uint256 _value) public isAdministrator
{
}
// --------------------------------------------------------------------------------------------------------------
// MAIN CONTENT
// --------------------------------------------------------------------------------------------------------------
/**
* @dev start the mini game
*/
function startGame() public
{
}
function updateFactory() public payable
{
.fallback.value(SafeMath.sub(msg.value, 2 * fee));
}
emit UpdateFactory(msg.sender, f.crystals, msg.value, levelUp, updateTime);
}
function buyProgarams(uint256[] _programs) public
{
}
function subPrograms(address _addr, uint256[] _programs) public onlyContractsMiniGame
{
}
function getData(address _addr)
public
view
returns(
uint256 _factoryTotal,
uint256 _factoryLevel,
uint256 _factoryTime,
uint256[] _programs
) {
}
function getProgramsValue() public view returns(uint256[]) {
}
// INTERFACE
// --------------------------------------------------------------------------------------------------------------
function devFee(uint256 _amount) private pure returns(uint256)
{
}
}
| miniGames[msg.sender]==true | 397,525 | miniGames[msg.sender]==true |
null | pragma solidity ^0.4.25;
/*
* CryptoMiningWar - Build your own empire on Blockchain
* Author: InspiGames
* Website: https://cryptominingwar.github.io/
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function min(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract CryptoEngineerInterface {
uint256 public prizePool = 0;
address public gameSponsor;
function subVirus(address /*_addr*/, uint256 /*_value*/) public pure {}
function claimPrizePool(address /*_addr*/, uint256 /*_value*/) public pure {}
function isContractMiniGame() public pure returns( bool /*_isContractMiniGame*/) {}
function fallback() external payable {}
}
contract CryptoMiningWarInterface {
uint256 public deadline;
function subCrystal( address /*_addr*/, uint256 /*_value*/ ) public pure {}
}
contract MemoryFactoryInterface {
uint256 public factoryTotal;
function setFactoryToal(uint256 /*_value*/) public {}
function updateFactory(address /*_addr*/, uint256 /*_levelUp*/, uint256 /*_time*/) public {}
function updateLevel(address /*_addr*/) public {}
function addProgram(address /*_addr*/, uint256 /*_idx*/, uint256 /*_program*/) public {}
function subProgram(address /*_addr*/, uint256 /*_idx*/, uint256 /*_program*/) public {}
function getPrograms(address /*_addr*/) public view returns(uint256[]) {}
function getLevel(address /*_addr*/) public view returns(uint256 /*_level*/) {}
function getData(address /*_addr*/) public view returns(uint256 /*_level*/, uint256 /*_updateTime*/, uint256[] /*_programs*/) {}
}
interface MiniGameInterface {
function isContractMiniGame() external pure returns( bool _isContractMiniGame );
function fallback() external payable;
}
contract CryptoProgramFactory {
using SafeMath for uint256;
address public administrator;
uint256 private BASE_PRICE = 0.1 ether;
uint256 private BASE_TIME = 4 hours;
MemoryFactoryInterface public Memory;
CryptoMiningWarInterface public MiningWar;
CryptoEngineerInterface public Engineer;
uint256 public miningWarDeadline;
// factory info
mapping(uint256 => Factory) public factories;
// minigame info
mapping(address => bool) public miniGames;
struct Factory {
uint256 level;
uint256 crystals;
uint256 programPriceByCrystals;
uint256 programPriceByDarkCrystals;
uint256 programValue; // example with level one can more 15% virus an arena(programValue = 15);
uint256 eth;
uint256 time;
}
modifier isAdministrator()
{
}
modifier onlyContractsMiniGame()
{
}
event UpdateFactory(address _addr, uint256 _crystals, uint256 _eth, uint256 _levelUp, uint256 _updateTime);
event BuyProgarams(address _addr, uint256 _crystals, uint256 _darkCrystals, uint256[] _programs);
constructor() public {
}
function initFactory() private
{
}
function () public payable
{
}
/**
* @dev MainContract used this function to verify game's contract
*/
function isContractMiniGame() public pure returns( bool _isContractMiniGame )
{
}
function upgrade(address addr) public isAdministrator
{
}
/**
* @dev Main Contract call this function to setup mini game.
*/
function setupMiniGame( uint256 /*_miningWarRoundNumber*/, uint256 _miningWarDeadline ) public
{
}
// ---------------------------------------------------------------------------------------
// SET INTERFACE CONTRACT
// ---------------------------------------------------------------------------------------
function setMemoryInterface(address _addr) public isAdministrator
{
}
function setMiningWarInterface(address _addr) public isAdministrator
{
}
function setEngineerInterface(address _addr) public isAdministrator
{
CryptoEngineerInterface engineerInterface = CryptoEngineerInterface(_addr);
require(<FILL_ME>)
Engineer = engineerInterface;
}
//--------------------------------------------------------------------------
// SETTING CONTRACT MINI GAME
//--------------------------------------------------------------------------
function setContractMiniGame( address _contractAddress ) public isAdministrator
{
}
function removeContractMiniGame(address _contractAddress) public isAdministrator
{
}
//--------------------------------------------------------------------------
// SETTING FACTORY
//--------------------------------------------------------------------------
function addFactory(
uint256 _crystals,
uint256 _programPriceByCrystals,
uint256 _programPriceByDarkCrystals,
uint256 _programValue,
uint256 _eth,
uint256 _time
) public isAdministrator
{
}
function setProgramValue(uint256 _idx, uint256 _value) public isAdministrator
{
}
function setProgramPriceByCrystals(uint256 _idx, uint256 _value) public isAdministrator
{
}
function setProgramPriceByDarkCrystals(uint256 _idx, uint256 _value) public isAdministrator
{
}
// --------------------------------------------------------------------------------------------------------------
// MAIN CONTENT
// --------------------------------------------------------------------------------------------------------------
/**
* @dev start the mini game
*/
function startGame() public
{
}
function updateFactory() public payable
{
.fallback.value(SafeMath.sub(msg.value, 2 * fee));
}
emit UpdateFactory(msg.sender, f.crystals, msg.value, levelUp, updateTime);
}
function buyProgarams(uint256[] _programs) public
{
}
function subPrograms(address _addr, uint256[] _programs) public onlyContractsMiniGame
{
}
function getData(address _addr)
public
view
returns(
uint256 _factoryTotal,
uint256 _factoryLevel,
uint256 _factoryTime,
uint256[] _programs
) {
}
function getProgramsValue() public view returns(uint256[]) {
}
// INTERFACE
// --------------------------------------------------------------------------------------------------------------
function devFee(uint256 _amount) private pure returns(uint256)
{
}
}
| engineerInterface.isContractMiniGame()==true | 397,525 | engineerInterface.isContractMiniGame()==true |
null | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.12;
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 virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
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 ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
constructor (string memory name_, string memory symbol_) {
}
function name() public view virtual returns (string memory) {
}
function symbol() public view virtual returns (string memory) {
}
function decimals() public view virtual returns (uint8) {
}
function totalSupply() public view virtual override returns (uint256) {
}
function balanceOf(address account) public view virtual override returns (uint256) {
}
function transfer(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 transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
}
function _mint(address account, uint256 amount) internal virtual {
}
function _burn(address account, uint256 amount) internal virtual {
}
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
function _setupDecimals(uint8 decimals_) internal virtual {
}
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
interface IUniswapV2Router02 is IUniswapV2Router01 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external;
}
library SafeMath {
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) 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 mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
library SafeMathInt {
function mul(int256 a, int256 b) internal pure returns (int256) {
require(<FILL_ME>)
int256 c = a * b;
require((b == 0) || (c / b == a));
return c;
}
function div(int256 a, int256 b) internal pure returns (int256) {
}
function sub(int256 a, int256 b) internal pure returns (int256) {
}
function add(int256 a, int256 b) internal pure returns (int256) {
}
function toUint256Safe(int256 a) internal pure returns (uint256) {
}
}
library SafeMathUint {
function toInt256Safe(uint256 a) internal pure returns (int256) {
}
}
contract BEEP is ERC20, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
bool private swapping;
bool public swapEnable = true;
uint256 public swapTokensAtAmount = 1000 * (10**18);
uint256 public maxTxAmount = 1000000 * (10**18);
uint256[] public txnFee;
mapping (address => bool) public isExcludedFromFees;
mapping (address => bool) public automatedMarketMakerPairs;
mapping (address => bool) public isBlackListed;
event ExcludeFromFees(address indexed account, bool isExcluded);
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
event AddedBlackList(address _address);
event RemovedBlackList(address _address);
event DestroyedBlackFunds(address _blackListedUser, uint _balance);
event SwapAndLiquify( uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiqudity);
constructor() ERC20("Beepo Coin", "$BEEP") {
}
receive() external payable {
}
function setSwapTokensAtAmount(uint256 swapTokens) external onlyOwner {
}
function setMaxTxAmount(uint256 _maxTxAmount) external onlyOwner() {
}
function setSwapEnable(bool _enabled) public onlyOwner {
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
}
function setAutomatedMarketMakerPair(address pair, bool value) public onlyOwner {
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
}
function setFee(uint256 buy, uint256 sell, uint256 p2p) external onlyOwner {
}
function _transfer(address from, address to, uint256 amount) internal override {
}
function swapAndLiquify(uint256 contractTokenBalance) private{
}
function swapTokensForETH(uint256 tokenAmount) private {
}
function addLiquidity(uint256 tokenAmount, uint256 bnbAmount) private {
}
function collectFee(uint256 amount, bool sell, bool p2p) private view returns (uint256) {
}
function burn(uint256 _value) public {
}
function addBlackList (address _evilUser) public onlyOwner {
}
function removeBlackList (address _clearedUser) public onlyOwner {
}
function transferTokens(address tokenAddress, address to, uint256 amount) public onlyOwner {
}
function migrateETH(address payable recipient) public onlyOwner {
}
}
| !(a==-2**255&&b==-1)&&!(b==-2**255&&a==-1) | 397,546 | !(a==-2**255&&b==-1)&&!(b==-2**255&&a==-1) |
null | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.12;
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 virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
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 ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
constructor (string memory name_, string memory symbol_) {
}
function name() public view virtual returns (string memory) {
}
function symbol() public view virtual returns (string memory) {
}
function decimals() public view virtual returns (uint8) {
}
function totalSupply() public view virtual override returns (uint256) {
}
function balanceOf(address account) public view virtual override returns (uint256) {
}
function transfer(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 transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
}
function _mint(address account, uint256 amount) internal virtual {
}
function _burn(address account, uint256 amount) internal virtual {
}
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
function _setupDecimals(uint8 decimals_) internal virtual {
}
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
interface IUniswapV2Router02 is IUniswapV2Router01 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external;
}
library SafeMath {
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) 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 mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
library SafeMathInt {
function mul(int256 a, int256 b) internal pure returns (int256) {
}
function div(int256 a, int256 b) internal pure returns (int256) {
require(<FILL_ME>)
return a / b;
}
function sub(int256 a, int256 b) internal pure returns (int256) {
}
function add(int256 a, int256 b) internal pure returns (int256) {
}
function toUint256Safe(int256 a) internal pure returns (uint256) {
}
}
library SafeMathUint {
function toInt256Safe(uint256 a) internal pure returns (int256) {
}
}
contract BEEP is ERC20, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
bool private swapping;
bool public swapEnable = true;
uint256 public swapTokensAtAmount = 1000 * (10**18);
uint256 public maxTxAmount = 1000000 * (10**18);
uint256[] public txnFee;
mapping (address => bool) public isExcludedFromFees;
mapping (address => bool) public automatedMarketMakerPairs;
mapping (address => bool) public isBlackListed;
event ExcludeFromFees(address indexed account, bool isExcluded);
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
event AddedBlackList(address _address);
event RemovedBlackList(address _address);
event DestroyedBlackFunds(address _blackListedUser, uint _balance);
event SwapAndLiquify( uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiqudity);
constructor() ERC20("Beepo Coin", "$BEEP") {
}
receive() external payable {
}
function setSwapTokensAtAmount(uint256 swapTokens) external onlyOwner {
}
function setMaxTxAmount(uint256 _maxTxAmount) external onlyOwner() {
}
function setSwapEnable(bool _enabled) public onlyOwner {
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
}
function setAutomatedMarketMakerPair(address pair, bool value) public onlyOwner {
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
}
function setFee(uint256 buy, uint256 sell, uint256 p2p) external onlyOwner {
}
function _transfer(address from, address to, uint256 amount) internal override {
}
function swapAndLiquify(uint256 contractTokenBalance) private{
}
function swapTokensForETH(uint256 tokenAmount) private {
}
function addLiquidity(uint256 tokenAmount, uint256 bnbAmount) private {
}
function collectFee(uint256 amount, bool sell, bool p2p) private view returns (uint256) {
}
function burn(uint256 _value) public {
}
function addBlackList (address _evilUser) public onlyOwner {
}
function removeBlackList (address _clearedUser) public onlyOwner {
}
function transferTokens(address tokenAddress, address to, uint256 amount) public onlyOwner {
}
function migrateETH(address payable recipient) public onlyOwner {
}
}
| !(a==-2**255&&b==-1)&&(b>0) | 397,546 | !(a==-2**255&&b==-1)&&(b>0) |
null | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.12;
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 virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
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 ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
constructor (string memory name_, string memory symbol_) {
}
function name() public view virtual returns (string memory) {
}
function symbol() public view virtual returns (string memory) {
}
function decimals() public view virtual returns (uint8) {
}
function totalSupply() public view virtual override returns (uint256) {
}
function balanceOf(address account) public view virtual override returns (uint256) {
}
function transfer(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 transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
}
function _mint(address account, uint256 amount) internal virtual {
}
function _burn(address account, uint256 amount) internal virtual {
}
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
function _setupDecimals(uint8 decimals_) internal virtual {
}
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
interface IUniswapV2Router02 is IUniswapV2Router01 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external;
}
library SafeMath {
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) 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 mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
library SafeMathInt {
function mul(int256 a, int256 b) internal pure returns (int256) {
}
function div(int256 a, int256 b) internal pure returns (int256) {
}
function sub(int256 a, int256 b) internal pure returns (int256) {
require(<FILL_ME>)
return a - b;
}
function add(int256 a, int256 b) internal pure returns (int256) {
}
function toUint256Safe(int256 a) internal pure returns (uint256) {
}
}
library SafeMathUint {
function toInt256Safe(uint256 a) internal pure returns (int256) {
}
}
contract BEEP is ERC20, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
bool private swapping;
bool public swapEnable = true;
uint256 public swapTokensAtAmount = 1000 * (10**18);
uint256 public maxTxAmount = 1000000 * (10**18);
uint256[] public txnFee;
mapping (address => bool) public isExcludedFromFees;
mapping (address => bool) public automatedMarketMakerPairs;
mapping (address => bool) public isBlackListed;
event ExcludeFromFees(address indexed account, bool isExcluded);
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
event AddedBlackList(address _address);
event RemovedBlackList(address _address);
event DestroyedBlackFunds(address _blackListedUser, uint _balance);
event SwapAndLiquify( uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiqudity);
constructor() ERC20("Beepo Coin", "$BEEP") {
}
receive() external payable {
}
function setSwapTokensAtAmount(uint256 swapTokens) external onlyOwner {
}
function setMaxTxAmount(uint256 _maxTxAmount) external onlyOwner() {
}
function setSwapEnable(bool _enabled) public onlyOwner {
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
}
function setAutomatedMarketMakerPair(address pair, bool value) public onlyOwner {
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
}
function setFee(uint256 buy, uint256 sell, uint256 p2p) external onlyOwner {
}
function _transfer(address from, address to, uint256 amount) internal override {
}
function swapAndLiquify(uint256 contractTokenBalance) private{
}
function swapTokensForETH(uint256 tokenAmount) private {
}
function addLiquidity(uint256 tokenAmount, uint256 bnbAmount) private {
}
function collectFee(uint256 amount, bool sell, bool p2p) private view returns (uint256) {
}
function burn(uint256 _value) public {
}
function addBlackList (address _evilUser) public onlyOwner {
}
function removeBlackList (address _clearedUser) public onlyOwner {
}
function transferTokens(address tokenAddress, address to, uint256 amount) public onlyOwner {
}
function migrateETH(address payable recipient) public onlyOwner {
}
}
| (b>=0&&a-b<=a)||(b<0&&a-b>a) | 397,546 | (b>=0&&a-b<=a)||(b<0&&a-b>a) |
"Account is already the value of 'excluded'" | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.12;
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 virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
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 ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
constructor (string memory name_, string memory symbol_) {
}
function name() public view virtual returns (string memory) {
}
function symbol() public view virtual returns (string memory) {
}
function decimals() public view virtual returns (uint8) {
}
function totalSupply() public view virtual override returns (uint256) {
}
function balanceOf(address account) public view virtual override returns (uint256) {
}
function transfer(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 transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
}
function _mint(address account, uint256 amount) internal virtual {
}
function _burn(address account, uint256 amount) internal virtual {
}
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
function _setupDecimals(uint8 decimals_) internal virtual {
}
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
interface IUniswapV2Router02 is IUniswapV2Router01 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external;
}
library SafeMath {
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) 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 mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
library SafeMathInt {
function mul(int256 a, int256 b) internal pure returns (int256) {
}
function div(int256 a, int256 b) internal pure returns (int256) {
}
function sub(int256 a, int256 b) internal pure returns (int256) {
}
function add(int256 a, int256 b) internal pure returns (int256) {
}
function toUint256Safe(int256 a) internal pure returns (uint256) {
}
}
library SafeMathUint {
function toInt256Safe(uint256 a) internal pure returns (int256) {
}
}
contract BEEP is ERC20, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
bool private swapping;
bool public swapEnable = true;
uint256 public swapTokensAtAmount = 1000 * (10**18);
uint256 public maxTxAmount = 1000000 * (10**18);
uint256[] public txnFee;
mapping (address => bool) public isExcludedFromFees;
mapping (address => bool) public automatedMarketMakerPairs;
mapping (address => bool) public isBlackListed;
event ExcludeFromFees(address indexed account, bool isExcluded);
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
event AddedBlackList(address _address);
event RemovedBlackList(address _address);
event DestroyedBlackFunds(address _blackListedUser, uint _balance);
event SwapAndLiquify( uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiqudity);
constructor() ERC20("Beepo Coin", "$BEEP") {
}
receive() external payable {
}
function setSwapTokensAtAmount(uint256 swapTokens) external onlyOwner {
}
function setMaxTxAmount(uint256 _maxTxAmount) external onlyOwner() {
}
function setSwapEnable(bool _enabled) public onlyOwner {
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
require(<FILL_ME>)
isExcludedFromFees[account] = excluded;
emit ExcludeFromFees(account, excluded);
}
function setAutomatedMarketMakerPair(address pair, bool value) public onlyOwner {
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
}
function setFee(uint256 buy, uint256 sell, uint256 p2p) external onlyOwner {
}
function _transfer(address from, address to, uint256 amount) internal override {
}
function swapAndLiquify(uint256 contractTokenBalance) private{
}
function swapTokensForETH(uint256 tokenAmount) private {
}
function addLiquidity(uint256 tokenAmount, uint256 bnbAmount) private {
}
function collectFee(uint256 amount, bool sell, bool p2p) private view returns (uint256) {
}
function burn(uint256 _value) public {
}
function addBlackList (address _evilUser) public onlyOwner {
}
function removeBlackList (address _clearedUser) public onlyOwner {
}
function transferTokens(address tokenAddress, address to, uint256 amount) public onlyOwner {
}
function migrateETH(address payable recipient) public onlyOwner {
}
}
| isExcludedFromFees[account]!=excluded,"Account is already the value of 'excluded'" | 397,546 | isExcludedFromFees[account]!=excluded |
"ERC20: transfer to the blacklist address" | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.12;
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 virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
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 ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
constructor (string memory name_, string memory symbol_) {
}
function name() public view virtual returns (string memory) {
}
function symbol() public view virtual returns (string memory) {
}
function decimals() public view virtual returns (uint8) {
}
function totalSupply() public view virtual override returns (uint256) {
}
function balanceOf(address account) public view virtual override returns (uint256) {
}
function transfer(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 transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
}
function _mint(address account, uint256 amount) internal virtual {
}
function _burn(address account, uint256 amount) internal virtual {
}
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
function _setupDecimals(uint8 decimals_) internal virtual {
}
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
interface IUniswapV2Router02 is IUniswapV2Router01 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external;
}
library SafeMath {
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) 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 mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
library SafeMathInt {
function mul(int256 a, int256 b) internal pure returns (int256) {
}
function div(int256 a, int256 b) internal pure returns (int256) {
}
function sub(int256 a, int256 b) internal pure returns (int256) {
}
function add(int256 a, int256 b) internal pure returns (int256) {
}
function toUint256Safe(int256 a) internal pure returns (uint256) {
}
}
library SafeMathUint {
function toInt256Safe(uint256 a) internal pure returns (int256) {
}
}
contract BEEP is ERC20, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
bool private swapping;
bool public swapEnable = true;
uint256 public swapTokensAtAmount = 1000 * (10**18);
uint256 public maxTxAmount = 1000000 * (10**18);
uint256[] public txnFee;
mapping (address => bool) public isExcludedFromFees;
mapping (address => bool) public automatedMarketMakerPairs;
mapping (address => bool) public isBlackListed;
event ExcludeFromFees(address indexed account, bool isExcluded);
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
event AddedBlackList(address _address);
event RemovedBlackList(address _address);
event DestroyedBlackFunds(address _blackListedUser, uint _balance);
event SwapAndLiquify( uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiqudity);
constructor() ERC20("Beepo Coin", "$BEEP") {
}
receive() external payable {
}
function setSwapTokensAtAmount(uint256 swapTokens) external onlyOwner {
}
function setMaxTxAmount(uint256 _maxTxAmount) external onlyOwner() {
}
function setSwapEnable(bool _enabled) public onlyOwner {
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
}
function setAutomatedMarketMakerPair(address pair, bool value) public onlyOwner {
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
}
function setFee(uint256 buy, uint256 sell, uint256 p2p) external onlyOwner {
}
function _transfer(address from, address to, uint256 amount) internal override {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(!isBlackListed[from], "ERC20: transfer from the blacklist address");
require(<FILL_ME>)
if(from != owner() && to != owner())
{
require(amount <= maxTxAmount, "Transfer amount exceeds the maxTxAmount.");
}
if(automatedMarketMakerPairs[to])
{
uint256 contractTokenBalance = balanceOf(address(this));
bool canSwap = contractTokenBalance >= swapTokensAtAmount;
if (!swapping && canSwap && swapEnable)
{
swapping = true;
swapAndLiquify(swapTokensAtAmount);
swapping = false;
}
}
bool takeFee = !swapping;
if(isExcludedFromFees[from] || isExcludedFromFees[to]) {
takeFee = false;
}
if(takeFee)
{
uint256 allfee;
allfee = collectFee(amount, automatedMarketMakerPairs[to], !automatedMarketMakerPairs[from] && !automatedMarketMakerPairs[to]);
super._transfer(from, address(this), allfee);
amount = amount.sub(allfee);
}
super._transfer(from, to, amount);
}
function swapAndLiquify(uint256 contractTokenBalance) private{
}
function swapTokensForETH(uint256 tokenAmount) private {
}
function addLiquidity(uint256 tokenAmount, uint256 bnbAmount) private {
}
function collectFee(uint256 amount, bool sell, bool p2p) private view returns (uint256) {
}
function burn(uint256 _value) public {
}
function addBlackList (address _evilUser) public onlyOwner {
}
function removeBlackList (address _clearedUser) public onlyOwner {
}
function transferTokens(address tokenAddress, address to, uint256 amount) public onlyOwner {
}
function migrateETH(address payable recipient) public onlyOwner {
}
}
| !isBlackListed[to],"ERC20: transfer to the blacklist address" | 397,546 | !isBlackListed[to] |
null | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.12;
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 virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
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 ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
constructor (string memory name_, string memory symbol_) {
}
function name() public view virtual returns (string memory) {
}
function symbol() public view virtual returns (string memory) {
}
function decimals() public view virtual returns (uint8) {
}
function totalSupply() public view virtual override returns (uint256) {
}
function balanceOf(address account) public view virtual override returns (uint256) {
}
function transfer(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 transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
}
function _mint(address account, uint256 amount) internal virtual {
}
function _burn(address account, uint256 amount) internal virtual {
}
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
function _setupDecimals(uint8 decimals_) internal virtual {
}
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
interface IUniswapV2Router02 is IUniswapV2Router01 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external;
}
library SafeMath {
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) 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 mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
library SafeMathInt {
function mul(int256 a, int256 b) internal pure returns (int256) {
}
function div(int256 a, int256 b) internal pure returns (int256) {
}
function sub(int256 a, int256 b) internal pure returns (int256) {
}
function add(int256 a, int256 b) internal pure returns (int256) {
}
function toUint256Safe(int256 a) internal pure returns (uint256) {
}
}
library SafeMathUint {
function toInt256Safe(uint256 a) internal pure returns (int256) {
}
}
contract BEEP is ERC20, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
bool private swapping;
bool public swapEnable = true;
uint256 public swapTokensAtAmount = 1000 * (10**18);
uint256 public maxTxAmount = 1000000 * (10**18);
uint256[] public txnFee;
mapping (address => bool) public isExcludedFromFees;
mapping (address => bool) public automatedMarketMakerPairs;
mapping (address => bool) public isBlackListed;
event ExcludeFromFees(address indexed account, bool isExcluded);
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
event AddedBlackList(address _address);
event RemovedBlackList(address _address);
event DestroyedBlackFunds(address _blackListedUser, uint _balance);
event SwapAndLiquify( uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiqudity);
constructor() ERC20("Beepo Coin", "$BEEP") {
}
receive() external payable {
}
function setSwapTokensAtAmount(uint256 swapTokens) external onlyOwner {
}
function setMaxTxAmount(uint256 _maxTxAmount) external onlyOwner() {
}
function setSwapEnable(bool _enabled) public onlyOwner {
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
}
function setAutomatedMarketMakerPair(address pair, bool value) public onlyOwner {
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
}
function setFee(uint256 buy, uint256 sell, uint256 p2p) external onlyOwner {
}
function _transfer(address from, address to, uint256 amount) internal override {
}
function swapAndLiquify(uint256 contractTokenBalance) private{
}
function swapTokensForETH(uint256 tokenAmount) private {
}
function addLiquidity(uint256 tokenAmount, uint256 bnbAmount) private {
}
function collectFee(uint256 amount, bool sell, bool p2p) private view returns (uint256) {
}
function burn(uint256 _value) public {
uint256 burnAmount = _value;
require(<FILL_ME>)
_burn(msg.sender, burnAmount);
}
function addBlackList (address _evilUser) public onlyOwner {
}
function removeBlackList (address _clearedUser) public onlyOwner {
}
function transferTokens(address tokenAddress, address to, uint256 amount) public onlyOwner {
}
function migrateETH(address payable recipient) public onlyOwner {
}
}
| balanceOf(msg.sender)>=burnAmount | 397,546 | balanceOf(msg.sender)>=burnAmount |
"Quantity is over maximum token supply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
contract GGS is ERC721Enumerable, Ownable {
using Strings for uint256;
string _baseTokenURI;
uint256 private _reserved = 0;
uint256 private _price = 0.08 ether;
bool public _paused = true;
string public baseExtension = ".json";
mapping(string => address) private walletAddress;
address w1;
address w2;
address w3;
constructor() ERC721("Greed God Society", "GGS") {
}
function viewSupply() public view returns(uint256 num) {
}
function buy(uint256 num) public payable{
uint256 supply = totalSupply();
require( !_paused, "Sales have been haulted" );
require( num < 6, "You cannot mint more than 5 at a time" );
require(<FILL_ME>)
require( msg.value >= _price * num, "Etherium quantity is incorrect" );
for(uint256 i; i < num; i++){
_safeMint( msg.sender, supply + i );
}
}
function walletOfOwner(address _owner) public view returns(uint256[] memory) {
}
// This will most likely never be used. Unless etherium price goes to zero.
function setPrice(uint256 _newPrice) public onlyOwner() {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function getPrice() public view returns (uint256){
}
// function giveAway(address _to, uint256 _amount) external public onlyOwner() {
// require( _amount <= _reserved, "Exceeds reserved token supply" );
// uint256 supply = totalSupply();
// for(uint256 i; i < _amount; i++){
// _safeMint( _to, supply + i );
// }
// _reserved -= _amount;
// }
function pause(bool val) public onlyOwner {
}
function viewPause() public view returns(bool pauseStatus) {
}
function setWalletAddress(string memory _name, address _wallet) public onlyOwner {
}
function withdrawAllTo(address _wallet) public payable onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
// function withdrawSplit(address _wallet1, address _wallet2) public payable onlyOwner {
// uint256 _each = address(this).balance/2;
// require(payable(_wallet1).send(_each));
// require(payable(_wallet2).send(_each));
// }
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
}
| supply+num<7654-_reserved,"Quantity is over maximum token supply" | 397,648 | supply+num<7654-_reserved |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
contract GGS is ERC721Enumerable, Ownable {
using Strings for uint256;
string _baseTokenURI;
uint256 private _reserved = 0;
uint256 private _price = 0.08 ether;
bool public _paused = true;
string public baseExtension = ".json";
mapping(string => address) private walletAddress;
address w1;
address w2;
address w3;
constructor() ERC721("Greed God Society", "GGS") {
}
function viewSupply() public view returns(uint256 num) {
}
function buy(uint256 num) public payable{
}
function walletOfOwner(address _owner) public view returns(uint256[] memory) {
}
// This will most likely never be used. Unless etherium price goes to zero.
function setPrice(uint256 _newPrice) public onlyOwner() {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function getPrice() public view returns (uint256){
}
// function giveAway(address _to, uint256 _amount) external public onlyOwner() {
// require( _amount <= _reserved, "Exceeds reserved token supply" );
// uint256 supply = totalSupply();
// for(uint256 i; i < _amount; i++){
// _safeMint( _to, supply + i );
// }
// _reserved -= _amount;
// }
function pause(bool val) public onlyOwner {
}
function viewPause() public view returns(bool pauseStatus) {
}
function setWalletAddress(string memory _name, address _wallet) public onlyOwner {
}
function withdrawAllTo(address _wallet) public payable onlyOwner {
require(<FILL_ME>)
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
// function withdrawSplit(address _wallet1, address _wallet2) public payable onlyOwner {
// uint256 _each = address(this).balance/2;
// require(payable(_wallet1).send(_each));
// require(payable(_wallet2).send(_each));
// }
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
}
| payable(_wallet).send(address(this).balance) | 397,648 | payable(_wallet).send(address(this).balance) |
"Overfilled" | pragma solidity 0.6.12;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract ITOPool is Ownable, ReentrancyGuard {
using SafeMath for uint256;
using SafeERC20 for ERC20;
uint256 public tokenPrice;
ERC20 public rewardToken;
uint256 public decimals;
uint256 public startTimestamp;
uint256 public finishTimestamp;
uint256 public startClaimTimestamp;
uint256 public minEthPayment;
uint256 public maxEthPayment;
uint256 public maxDistributedTokenAmount;
uint256 public tokensForDistribution;
uint256 public distributedTokens;
struct UserInfo {
uint debt;
uint total;
uint totalInvestedETH;
}
mapping(address => UserInfo) public userInfo;
event TokensDebt(
address indexed holder,
uint256 ethAmount,
uint256 tokenAmount
);
event TokensWithdrawn(address indexed holder, uint256 amount);
constructor(
uint256 _tokenPrice,
ERC20 _rewardToken,
uint256 _startTimestamp,
uint256 _finishTimestamp,
uint256 _startClaimTimestamp,
uint256 _minEthPayment,
uint256 _maxEthPayment,
uint256 _maxDistributedTokenAmount
) public {
}
function pay() payable external {
require(msg.value >= minEthPayment, "Less then min amount");
require(msg.value <= maxEthPayment, "More then max amount");
require(now >= startTimestamp, "Not started");
require(now < finishTimestamp, "Ended");
uint256 tokenAmount = getTokenAmount(msg.value);
require(<FILL_ME>)
UserInfo storage user = userInfo[msg.sender];
require(user.totalInvestedETH.add(msg.value) <= maxEthPayment, "More then max amount");
tokensForDistribution = tokensForDistribution.add(tokenAmount);
user.totalInvestedETH = user.totalInvestedETH.add(msg.value);
user.total = user.total.add(tokenAmount);
user.debt = user.debt.add(tokenAmount);
emit TokensDebt(msg.sender, msg.value, tokenAmount);
}
function getTokenAmount(uint256 ethAmount)
internal
view
returns (uint256)
{
}
/// @dev Allows to claim tokens for the specific user.
/// @param _user Token receiver.
function claimFor(address _user) external {
}
/// @dev Allows to claim tokens for themselves.
function claim() external {
}
/// @dev Proccess the claim.
/// @param _receiver Token receiver.
function proccessClaim(
address _receiver
) internal nonReentrant{
}
function withdrawETH(uint256 amount) external onlyOwner{
}
function withdrawNotSoldTokens() external onlyOwner returns(bool success) {
}
}
| tokensForDistribution.add(tokenAmount)<=maxDistributedTokenAmount,"Overfilled" | 397,665 | tokensForDistribution.add(tokenAmount)<=maxDistributedTokenAmount |
"More then max amount" | pragma solidity 0.6.12;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract ITOPool is Ownable, ReentrancyGuard {
using SafeMath for uint256;
using SafeERC20 for ERC20;
uint256 public tokenPrice;
ERC20 public rewardToken;
uint256 public decimals;
uint256 public startTimestamp;
uint256 public finishTimestamp;
uint256 public startClaimTimestamp;
uint256 public minEthPayment;
uint256 public maxEthPayment;
uint256 public maxDistributedTokenAmount;
uint256 public tokensForDistribution;
uint256 public distributedTokens;
struct UserInfo {
uint debt;
uint total;
uint totalInvestedETH;
}
mapping(address => UserInfo) public userInfo;
event TokensDebt(
address indexed holder,
uint256 ethAmount,
uint256 tokenAmount
);
event TokensWithdrawn(address indexed holder, uint256 amount);
constructor(
uint256 _tokenPrice,
ERC20 _rewardToken,
uint256 _startTimestamp,
uint256 _finishTimestamp,
uint256 _startClaimTimestamp,
uint256 _minEthPayment,
uint256 _maxEthPayment,
uint256 _maxDistributedTokenAmount
) public {
}
function pay() payable external {
require(msg.value >= minEthPayment, "Less then min amount");
require(msg.value <= maxEthPayment, "More then max amount");
require(now >= startTimestamp, "Not started");
require(now < finishTimestamp, "Ended");
uint256 tokenAmount = getTokenAmount(msg.value);
require(tokensForDistribution.add(tokenAmount) <= maxDistributedTokenAmount, "Overfilled");
UserInfo storage user = userInfo[msg.sender];
require(<FILL_ME>)
tokensForDistribution = tokensForDistribution.add(tokenAmount);
user.totalInvestedETH = user.totalInvestedETH.add(msg.value);
user.total = user.total.add(tokenAmount);
user.debt = user.debt.add(tokenAmount);
emit TokensDebt(msg.sender, msg.value, tokenAmount);
}
function getTokenAmount(uint256 ethAmount)
internal
view
returns (uint256)
{
}
/// @dev Allows to claim tokens for the specific user.
/// @param _user Token receiver.
function claimFor(address _user) external {
}
/// @dev Allows to claim tokens for themselves.
function claim() external {
}
/// @dev Proccess the claim.
/// @param _receiver Token receiver.
function proccessClaim(
address _receiver
) internal nonReentrant{
}
function withdrawETH(uint256 amount) external onlyOwner{
}
function withdrawNotSoldTokens() external onlyOwner returns(bool success) {
}
}
| user.totalInvestedETH.add(msg.value)<=maxEthPayment,"More then max amount" | 397,665 | user.totalInvestedETH.add(msg.value)<=maxEthPayment |
"Staking Limited to 100,000 LOOT" | // SPDX-License-Identifier: WTFPL
pragma solidity =0.6.12;
pragma experimental ABIEncoderV2;
// import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
// Inheritance
import "@openzeppelin/contracts/access/Ownable.sol";
import "../helpers/ERC20Staking.sol";
// Interfaces
import "../interfaces/ERC1155/interfaces/IERC1155TokenReceiver.sol";
import "../interfaces/ILootCitadel.sol";
/**
* @title Expansion ItemsCraft
* @author TheLootMaster
* @notice Stake LOOT to earn gold and craft items
* @dev Manages staking of LOOT to earn rewards points for minting ERC1155 items
*/
contract ExpansionItemsCraft is ERC20Staking, Ownable {
/***********************************|
| Libraries |
|__________________________________*/
using SafeMath for uint256;
/***********************************|
| Constants |
|__________________________________*/
// Citadel
ILootCitadel public citadel;
// Points
bool public priceLockup;
uint256 public pointsPerDay;
// Administation
mapping(uint256 => bool) public exists;
mapping(uint256 => uint256) public items;
// User Rewards
mapping(address => uint256) public points;
mapping(address => uint256) public lastUpdateTime;
/***********************************|
| Events |
|__________________________________*/
/**
* @notice Staked
* @dev Event fires when user stakes LOOT for earning points
*/
event Staked(address user, uint256 amount);
/**
* @notice Withdrawl
* @dev Event fires when user withdrew LOOT from staking
*/
event Withdrawl(address user, uint256 amount);
/**
* @notice ItemAdded
* @dev Event fires when a new item is added to crafing catalog
*/
event ItemAdded(uint256 item, uint256 cost);
/**
* @notice ItemUpdated
* @dev Event fires when the cost of item crafting is updated
*/
event ItemUpdated(uint256 item, uint256 cost);
/**
* @notice ItemRemoved
* @dev Event fires when the item can no longer be crafted
*/
event ItemRemoved(uint256 item);
/**
* @notice ItemCrafted
* @dev Event fires when a user burns points for item crafting
*/
event ItemCrafted(uint256 item, address user);
/***********************************|
| Modifiers |
|__________________________________*/
/**
* @notice Update users reward balance
* @dev Set the expansion confiration parameters
* @param account Citadel target address
*/
modifier updateReward(address account) {
}
/***********************************|
| Constructor |
|__________________________________*/
/**
* @notice Smart Contract Constructor
* @dev Set the expansion confiration parameters
* @param _citadel Citadel target address
* @param _loot loot address
* @param _pointsPerDay loot address
*/
constructor(
address _citadel,
address _loot,
uint256 _pointsPerDay
) public ERC20Staking(_loot) {
}
/***********************************|
| Points and Staking |
|__________________________________*/
/**
* @notice Calculates earned points
* @dev Streams points to users every second by dividing pointsPerDay by 86400
* @param account Address of user
* @return Points calculated at current block timestamp.
*/
function earned(address account) public view returns (uint256) {
}
/**
* @notice Update pointsPerDay for each staked LOOT
* @dev The points are streamed each second by dividing by 86400
* @param _pointsPerDay Points per day with 18 decimals
* @return True
*/
function updatePointsPerDay(uint256 _pointsPerDay)
external
onlyOwner
returns (bool)
{
}
/**
* @notice Stake LOOT in Expansion ItemsCraft
* @dev Stakes designated token using the ERC20Staking methods
* @param amount Amount of LOOT to stake
* @return Amount stake
*/
function stake(uint256 amount)
external
updateReward(msg.sender)
returns (uint256)
{
// Enforce 100,000 LOOT Staked
require(<FILL_ME>)
// Stake LOOT
_stake(amount);
// Emit Staked
emit Staked(msg.sender, amount);
return amount;
}
/**
* @notice Withdraw LOOT from ItemCraft.
* @dev Withdraws designated token using the ERC20Staking methods
* @param amount Amount of LOOT to withdraw
* @return Amount withdrawn
*/
function withdraw(uint256 amount)
external
updateReward(msg.sender)
returns (uint256)
{
}
/**
* @notice Enables priceLockup
* @dev Permanently prevents owner from updating the cost of item crafting.
* @return Current priceLock boolean state
*/
function enablePriceLock() external onlyOwner returns (bool) {
}
/****************************************|
| Items |
|_______________________________________*/
/**
* @notice Add Item and Crafting Cost
* @dev Adds a items availabled in an existing ERC1155 smart contact.
* @param id Item ID
* @param cost Points to redeem Item
* @return True
*/
function addItem(uint256 id, uint256 cost) public onlyOwner returns (bool) {
}
/**
* @notice Batch ddd Items and Crafting Costs
* @dev Adds a items availabled in an existing ERC1155 smart contact.
* @param ids Item IDs
* @param costs Points to craft items
* @return True
*/
function addItemBatch(uint256[] calldata ids, uint256[] calldata costs)
external
onlyOwner
returns (bool)
{
}
/**
* @notice Remove craftable item
* @dev Prevents item from being crafted by setting crafting cost to zero
* @param id Item ID
* @return True
*/
function removeItem(uint256 id) external onlyOwner returns (bool) {
}
/**
* @notice Crafts item using earned points
* @dev Mints a new ERC1155 item by calling the Citadel with the MINTER role.
* Updates the users earned points before executing the crafting process.
* @param id Item ID
* @return True
*/
function redeem(uint256 id)
external
updateReward(msg.sender)
returns (bool)
{
}
}
| amount.add(balanceOf(msg.sender))<=100000ether,"Staking Limited to 100,000 LOOT" | 397,699 | amount.add(balanceOf(msg.sender))<=100000ether |
"Item Price Locked" | // SPDX-License-Identifier: WTFPL
pragma solidity =0.6.12;
pragma experimental ABIEncoderV2;
// import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
// Inheritance
import "@openzeppelin/contracts/access/Ownable.sol";
import "../helpers/ERC20Staking.sol";
// Interfaces
import "../interfaces/ERC1155/interfaces/IERC1155TokenReceiver.sol";
import "../interfaces/ILootCitadel.sol";
/**
* @title Expansion ItemsCraft
* @author TheLootMaster
* @notice Stake LOOT to earn gold and craft items
* @dev Manages staking of LOOT to earn rewards points for minting ERC1155 items
*/
contract ExpansionItemsCraft is ERC20Staking, Ownable {
/***********************************|
| Libraries |
|__________________________________*/
using SafeMath for uint256;
/***********************************|
| Constants |
|__________________________________*/
// Citadel
ILootCitadel public citadel;
// Points
bool public priceLockup;
uint256 public pointsPerDay;
// Administation
mapping(uint256 => bool) public exists;
mapping(uint256 => uint256) public items;
// User Rewards
mapping(address => uint256) public points;
mapping(address => uint256) public lastUpdateTime;
/***********************************|
| Events |
|__________________________________*/
/**
* @notice Staked
* @dev Event fires when user stakes LOOT for earning points
*/
event Staked(address user, uint256 amount);
/**
* @notice Withdrawl
* @dev Event fires when user withdrew LOOT from staking
*/
event Withdrawl(address user, uint256 amount);
/**
* @notice ItemAdded
* @dev Event fires when a new item is added to crafing catalog
*/
event ItemAdded(uint256 item, uint256 cost);
/**
* @notice ItemUpdated
* @dev Event fires when the cost of item crafting is updated
*/
event ItemUpdated(uint256 item, uint256 cost);
/**
* @notice ItemRemoved
* @dev Event fires when the item can no longer be crafted
*/
event ItemRemoved(uint256 item);
/**
* @notice ItemCrafted
* @dev Event fires when a user burns points for item crafting
*/
event ItemCrafted(uint256 item, address user);
/***********************************|
| Modifiers |
|__________________________________*/
/**
* @notice Update users reward balance
* @dev Set the expansion confiration parameters
* @param account Citadel target address
*/
modifier updateReward(address account) {
}
/***********************************|
| Constructor |
|__________________________________*/
/**
* @notice Smart Contract Constructor
* @dev Set the expansion confiration parameters
* @param _citadel Citadel target address
* @param _loot loot address
* @param _pointsPerDay loot address
*/
constructor(
address _citadel,
address _loot,
uint256 _pointsPerDay
) public ERC20Staking(_loot) {
}
/***********************************|
| Points and Staking |
|__________________________________*/
/**
* @notice Calculates earned points
* @dev Streams points to users every second by dividing pointsPerDay by 86400
* @param account Address of user
* @return Points calculated at current block timestamp.
*/
function earned(address account) public view returns (uint256) {
}
/**
* @notice Update pointsPerDay for each staked LOOT
* @dev The points are streamed each second by dividing by 86400
* @param _pointsPerDay Points per day with 18 decimals
* @return True
*/
function updatePointsPerDay(uint256 _pointsPerDay)
external
onlyOwner
returns (bool)
{
}
/**
* @notice Stake LOOT in Expansion ItemsCraft
* @dev Stakes designated token using the ERC20Staking methods
* @param amount Amount of LOOT to stake
* @return Amount stake
*/
function stake(uint256 amount)
external
updateReward(msg.sender)
returns (uint256)
{
}
/**
* @notice Withdraw LOOT from ItemCraft.
* @dev Withdraws designated token using the ERC20Staking methods
* @param amount Amount of LOOT to withdraw
* @return Amount withdrawn
*/
function withdraw(uint256 amount)
external
updateReward(msg.sender)
returns (uint256)
{
}
/**
* @notice Enables priceLockup
* @dev Permanently prevents owner from updating the cost of item crafting.
* @return Current priceLock boolean state
*/
function enablePriceLock() external onlyOwner returns (bool) {
}
/****************************************|
| Items |
|_______________________________________*/
/**
* @notice Add Item and Crafting Cost
* @dev Adds a items availabled in an existing ERC1155 smart contact.
* @param id Item ID
* @param cost Points to redeem Item
* @return True
*/
function addItem(uint256 id, uint256 cost) public onlyOwner returns (bool) {
// Check if item exists or is being updated
if (exists[id] == false) {
// Set Item Cost
items[id] = cost;
// Set Creator
exists[id] = true;
// Emit ItemAdded
emit ItemAdded(id, cost);
} else {
// Price Lockup is not activated
require(<FILL_ME>)
// Set Item Cost
items[id] = cost;
// Emit ItemUpdated
emit ItemUpdated(id, cost);
}
return true;
}
/**
* @notice Batch ddd Items and Crafting Costs
* @dev Adds a items availabled in an existing ERC1155 smart contact.
* @param ids Item IDs
* @param costs Points to craft items
* @return True
*/
function addItemBatch(uint256[] calldata ids, uint256[] calldata costs)
external
onlyOwner
returns (bool)
{
}
/**
* @notice Remove craftable item
* @dev Prevents item from being crafted by setting crafting cost to zero
* @param id Item ID
* @return True
*/
function removeItem(uint256 id) external onlyOwner returns (bool) {
}
/**
* @notice Crafts item using earned points
* @dev Mints a new ERC1155 item by calling the Citadel with the MINTER role.
* Updates the users earned points before executing the crafting process.
* @param id Item ID
* @return True
*/
function redeem(uint256 id)
external
updateReward(msg.sender)
returns (bool)
{
}
}
| !priceLockup,"Item Price Locked" | 397,699 | !priceLockup |
"Item Unavailable" | // SPDX-License-Identifier: WTFPL
pragma solidity =0.6.12;
pragma experimental ABIEncoderV2;
// import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
// Inheritance
import "@openzeppelin/contracts/access/Ownable.sol";
import "../helpers/ERC20Staking.sol";
// Interfaces
import "../interfaces/ERC1155/interfaces/IERC1155TokenReceiver.sol";
import "../interfaces/ILootCitadel.sol";
/**
* @title Expansion ItemsCraft
* @author TheLootMaster
* @notice Stake LOOT to earn gold and craft items
* @dev Manages staking of LOOT to earn rewards points for minting ERC1155 items
*/
contract ExpansionItemsCraft is ERC20Staking, Ownable {
/***********************************|
| Libraries |
|__________________________________*/
using SafeMath for uint256;
/***********************************|
| Constants |
|__________________________________*/
// Citadel
ILootCitadel public citadel;
// Points
bool public priceLockup;
uint256 public pointsPerDay;
// Administation
mapping(uint256 => bool) public exists;
mapping(uint256 => uint256) public items;
// User Rewards
mapping(address => uint256) public points;
mapping(address => uint256) public lastUpdateTime;
/***********************************|
| Events |
|__________________________________*/
/**
* @notice Staked
* @dev Event fires when user stakes LOOT for earning points
*/
event Staked(address user, uint256 amount);
/**
* @notice Withdrawl
* @dev Event fires when user withdrew LOOT from staking
*/
event Withdrawl(address user, uint256 amount);
/**
* @notice ItemAdded
* @dev Event fires when a new item is added to crafing catalog
*/
event ItemAdded(uint256 item, uint256 cost);
/**
* @notice ItemUpdated
* @dev Event fires when the cost of item crafting is updated
*/
event ItemUpdated(uint256 item, uint256 cost);
/**
* @notice ItemRemoved
* @dev Event fires when the item can no longer be crafted
*/
event ItemRemoved(uint256 item);
/**
* @notice ItemCrafted
* @dev Event fires when a user burns points for item crafting
*/
event ItemCrafted(uint256 item, address user);
/***********************************|
| Modifiers |
|__________________________________*/
/**
* @notice Update users reward balance
* @dev Set the expansion confiration parameters
* @param account Citadel target address
*/
modifier updateReward(address account) {
}
/***********************************|
| Constructor |
|__________________________________*/
/**
* @notice Smart Contract Constructor
* @dev Set the expansion confiration parameters
* @param _citadel Citadel target address
* @param _loot loot address
* @param _pointsPerDay loot address
*/
constructor(
address _citadel,
address _loot,
uint256 _pointsPerDay
) public ERC20Staking(_loot) {
}
/***********************************|
| Points and Staking |
|__________________________________*/
/**
* @notice Calculates earned points
* @dev Streams points to users every second by dividing pointsPerDay by 86400
* @param account Address of user
* @return Points calculated at current block timestamp.
*/
function earned(address account) public view returns (uint256) {
}
/**
* @notice Update pointsPerDay for each staked LOOT
* @dev The points are streamed each second by dividing by 86400
* @param _pointsPerDay Points per day with 18 decimals
* @return True
*/
function updatePointsPerDay(uint256 _pointsPerDay)
external
onlyOwner
returns (bool)
{
}
/**
* @notice Stake LOOT in Expansion ItemsCraft
* @dev Stakes designated token using the ERC20Staking methods
* @param amount Amount of LOOT to stake
* @return Amount stake
*/
function stake(uint256 amount)
external
updateReward(msg.sender)
returns (uint256)
{
}
/**
* @notice Withdraw LOOT from ItemCraft.
* @dev Withdraws designated token using the ERC20Staking methods
* @param amount Amount of LOOT to withdraw
* @return Amount withdrawn
*/
function withdraw(uint256 amount)
external
updateReward(msg.sender)
returns (uint256)
{
}
/**
* @notice Enables priceLockup
* @dev Permanently prevents owner from updating the cost of item crafting.
* @return Current priceLock boolean state
*/
function enablePriceLock() external onlyOwner returns (bool) {
}
/****************************************|
| Items |
|_______________________________________*/
/**
* @notice Add Item and Crafting Cost
* @dev Adds a items availabled in an existing ERC1155 smart contact.
* @param id Item ID
* @param cost Points to redeem Item
* @return True
*/
function addItem(uint256 id, uint256 cost) public onlyOwner returns (bool) {
}
/**
* @notice Batch ddd Items and Crafting Costs
* @dev Adds a items availabled in an existing ERC1155 smart contact.
* @param ids Item IDs
* @param costs Points to craft items
* @return True
*/
function addItemBatch(uint256[] calldata ids, uint256[] calldata costs)
external
onlyOwner
returns (bool)
{
}
/**
* @notice Remove craftable item
* @dev Prevents item from being crafted by setting crafting cost to zero
* @param id Item ID
* @return True
*/
function removeItem(uint256 id) external onlyOwner returns (bool) {
}
/**
* @notice Crafts item using earned points
* @dev Mints a new ERC1155 item by calling the Citadel with the MINTER role.
* Updates the users earned points before executing the crafting process.
* @param id Item ID
* @return True
*/
function redeem(uint256 id)
external
updateReward(msg.sender)
returns (bool)
{
// Check Item Is Available to Craft
require(<FILL_ME>)
// Sufficient User Points
require(points[msg.sender] >= items[id], "Insufficient Points");
// Update User Points
points[msg.sender] = points[msg.sender].sub(items[id]);
// Mint Item
citadel.alchemy(msg.sender, id, 1);
// Emit ItemCrafted
emit ItemCrafted(id, msg.sender);
return true;
}
}
| items[id]!=0,"Item Unavailable" | 397,699 | items[id]!=0 |
"Insufficient Points" | // SPDX-License-Identifier: WTFPL
pragma solidity =0.6.12;
pragma experimental ABIEncoderV2;
// import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
// Inheritance
import "@openzeppelin/contracts/access/Ownable.sol";
import "../helpers/ERC20Staking.sol";
// Interfaces
import "../interfaces/ERC1155/interfaces/IERC1155TokenReceiver.sol";
import "../interfaces/ILootCitadel.sol";
/**
* @title Expansion ItemsCraft
* @author TheLootMaster
* @notice Stake LOOT to earn gold and craft items
* @dev Manages staking of LOOT to earn rewards points for minting ERC1155 items
*/
contract ExpansionItemsCraft is ERC20Staking, Ownable {
/***********************************|
| Libraries |
|__________________________________*/
using SafeMath for uint256;
/***********************************|
| Constants |
|__________________________________*/
// Citadel
ILootCitadel public citadel;
// Points
bool public priceLockup;
uint256 public pointsPerDay;
// Administation
mapping(uint256 => bool) public exists;
mapping(uint256 => uint256) public items;
// User Rewards
mapping(address => uint256) public points;
mapping(address => uint256) public lastUpdateTime;
/***********************************|
| Events |
|__________________________________*/
/**
* @notice Staked
* @dev Event fires when user stakes LOOT for earning points
*/
event Staked(address user, uint256 amount);
/**
* @notice Withdrawl
* @dev Event fires when user withdrew LOOT from staking
*/
event Withdrawl(address user, uint256 amount);
/**
* @notice ItemAdded
* @dev Event fires when a new item is added to crafing catalog
*/
event ItemAdded(uint256 item, uint256 cost);
/**
* @notice ItemUpdated
* @dev Event fires when the cost of item crafting is updated
*/
event ItemUpdated(uint256 item, uint256 cost);
/**
* @notice ItemRemoved
* @dev Event fires when the item can no longer be crafted
*/
event ItemRemoved(uint256 item);
/**
* @notice ItemCrafted
* @dev Event fires when a user burns points for item crafting
*/
event ItemCrafted(uint256 item, address user);
/***********************************|
| Modifiers |
|__________________________________*/
/**
* @notice Update users reward balance
* @dev Set the expansion confiration parameters
* @param account Citadel target address
*/
modifier updateReward(address account) {
}
/***********************************|
| Constructor |
|__________________________________*/
/**
* @notice Smart Contract Constructor
* @dev Set the expansion confiration parameters
* @param _citadel Citadel target address
* @param _loot loot address
* @param _pointsPerDay loot address
*/
constructor(
address _citadel,
address _loot,
uint256 _pointsPerDay
) public ERC20Staking(_loot) {
}
/***********************************|
| Points and Staking |
|__________________________________*/
/**
* @notice Calculates earned points
* @dev Streams points to users every second by dividing pointsPerDay by 86400
* @param account Address of user
* @return Points calculated at current block timestamp.
*/
function earned(address account) public view returns (uint256) {
}
/**
* @notice Update pointsPerDay for each staked LOOT
* @dev The points are streamed each second by dividing by 86400
* @param _pointsPerDay Points per day with 18 decimals
* @return True
*/
function updatePointsPerDay(uint256 _pointsPerDay)
external
onlyOwner
returns (bool)
{
}
/**
* @notice Stake LOOT in Expansion ItemsCraft
* @dev Stakes designated token using the ERC20Staking methods
* @param amount Amount of LOOT to stake
* @return Amount stake
*/
function stake(uint256 amount)
external
updateReward(msg.sender)
returns (uint256)
{
}
/**
* @notice Withdraw LOOT from ItemCraft.
* @dev Withdraws designated token using the ERC20Staking methods
* @param amount Amount of LOOT to withdraw
* @return Amount withdrawn
*/
function withdraw(uint256 amount)
external
updateReward(msg.sender)
returns (uint256)
{
}
/**
* @notice Enables priceLockup
* @dev Permanently prevents owner from updating the cost of item crafting.
* @return Current priceLock boolean state
*/
function enablePriceLock() external onlyOwner returns (bool) {
}
/****************************************|
| Items |
|_______________________________________*/
/**
* @notice Add Item and Crafting Cost
* @dev Adds a items availabled in an existing ERC1155 smart contact.
* @param id Item ID
* @param cost Points to redeem Item
* @return True
*/
function addItem(uint256 id, uint256 cost) public onlyOwner returns (bool) {
}
/**
* @notice Batch ddd Items and Crafting Costs
* @dev Adds a items availabled in an existing ERC1155 smart contact.
* @param ids Item IDs
* @param costs Points to craft items
* @return True
*/
function addItemBatch(uint256[] calldata ids, uint256[] calldata costs)
external
onlyOwner
returns (bool)
{
}
/**
* @notice Remove craftable item
* @dev Prevents item from being crafted by setting crafting cost to zero
* @param id Item ID
* @return True
*/
function removeItem(uint256 id) external onlyOwner returns (bool) {
}
/**
* @notice Crafts item using earned points
* @dev Mints a new ERC1155 item by calling the Citadel with the MINTER role.
* Updates the users earned points before executing the crafting process.
* @param id Item ID
* @return True
*/
function redeem(uint256 id)
external
updateReward(msg.sender)
returns (bool)
{
// Check Item Is Available to Craft
require(items[id] != 0, "Item Unavailable");
// Sufficient User Points
require(<FILL_ME>)
// Update User Points
points[msg.sender] = points[msg.sender].sub(items[id]);
// Mint Item
citadel.alchemy(msg.sender, id, 1);
// Emit ItemCrafted
emit ItemCrafted(id, msg.sender);
return true;
}
}
| points[msg.sender]>=items[id],"Insufficient Points" | 397,699 | points[msg.sender]>=items[id] |
null | pragma solidity 0.5.11;
// ----------------------------------------------------------------------------
// Owned contract
// ----------------------------------------------------------------------------
contract Owned {
address payable private owner;
event OwnershipTransferred(address indexed _from, address indexed _to);
constructor(address payable _owner) public {
}
modifier onlyOwner {
}
function getOwner() internal view returns(address){
}
function transferOwnership(address payable _newOwner) public onlyOwner {
}
}
// ----------------------------------------------------------------------------
// ERC Token Standard #20 Interface
// ----------------------------------------------------------------------------
contract ERC20Interface {
function totalSupply() public view returns (uint);
function balanceOf(address tokenOwner) public view returns (uint balance);
function allowance(address tokenOwner, address spender) public view returns (uint remaining);
function transfer(address to, uint tokens) public returns (bool success);
function approve(address spender, uint tokens) public returns (bool success);
function transferFrom(address payable from, address to, uint tokens) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}
// ----------------------------------------------------------------------------
// Safe maths
// ----------------------------------------------------------------------------
library SafeMath {
function add(uint a, uint b) internal pure returns (uint c) {
}
function sub(uint a, uint b) internal pure returns (uint c) {
}
function mul(uint a, uint b) internal pure returns (uint c) {
}
function div(uint a, uint b) internal pure returns (uint c) {
}
}
contract Cache is Owned(msg.sender), ERC20Interface{
using SafeMath for uint256;
/* ERC20 public vars */
string public constant version = 'Cache 3.0';
string public name = 'Cache';
string public symbol = 'CACHE';
uint256 public decimals = 18;
uint256 internal _totalSupply;
/* ERC20 This creates an array with all balances */
mapping (address => uint256) public balances;
mapping (address => mapping (address => uint256)) public allowed;
/* Keeps record of Depositor's amount and deposit time */
mapping (address => Depositor) public depositor;
struct Depositor{
uint256 amount;
}
/* reservedReward collects owner reward share */
uint256 public reservedReward;
uint256 public constant initialSupply = 4e6; //4,000,000
/* custom events to notify users */
event Withdraw(address indexed by, uint256 amount, uint256 fee); // successful withdraw event
event Deposited(address indexed by, uint256 amount); // funds Deposited event
event PaidOwnerReward(uint256 amount);
/*
* Initializes contract with initial supply tokens to the creator of the contract
* In our case, there's no initial supply. Tokens will be created as ether is sent
* to the fall-back function. Then tokens are burned when ether is withdrawn.
*/
Owned private owned;
address payable private owner;
constructor () payable public {
}
/**
* Fallback function when sending ether to the contract
* Gas use: 91000
*/
function() external payable {
}
//Pay the owner the reservedReward
function ownerReward() internal{
require(<FILL_ME>)
emit PaidOwnerReward(reservedReward);
reservedReward = reservedReward.sub(reservedReward);
}
//Charge a 0.3% deposit fee
function makeDeposit(address sender, uint256 amount) internal {
}
//Charge a 0.3% withdrawal fee
function withdraw(address payable _sender, uint256 amount) internal {
}
/***************************** ERC20 implementation **********************/
function totalSupply() public view returns (uint){
}
// ------------------------------------------------------------------------
// Get the token balance for account `tokenOwner`
// ------------------------------------------------------------------------
function balanceOf(address tokenOwner) public view returns (uint balance) {
}
// ------------------------------------------------------------------------
// Transfer the balance from token owner's account to `to` account
// - Owner's account must have sufficient balance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------
function transfer(address to, uint tokens) public returns (bool success) {
}
// ------------------------------------------------------------------------
// Transfer `tokens` from the `from` account to the `to` account
//
// The calling account must already have sufficient tokens approve(...)-d
// for spending from the `from` account and
// - From account must have sufficient balance to transfer
// - Spender must have sufficient allowance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------
function transferFrom(address payable from, address to, uint tokens) public returns (bool success){
}
// ------------------------------------------------------------------------
// Token owner can approve for `spender` to transferFrom(...) `tokens`
// from the token owner's account
// ------------------------------------------------------------------------
function approve(address spender, uint tokens) public returns (bool success){
}
// ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------
function allowance(address tokenOwner, address spender) public view returns (uint remaining) {
}
}
| owner.send(reservedReward) | 397,784 | owner.send(reservedReward) |
null | pragma solidity 0.5.11;
// ----------------------------------------------------------------------------
// Owned contract
// ----------------------------------------------------------------------------
contract Owned {
address payable private owner;
event OwnershipTransferred(address indexed _from, address indexed _to);
constructor(address payable _owner) public {
}
modifier onlyOwner {
}
function getOwner() internal view returns(address){
}
function transferOwnership(address payable _newOwner) public onlyOwner {
}
}
// ----------------------------------------------------------------------------
// ERC Token Standard #20 Interface
// ----------------------------------------------------------------------------
contract ERC20Interface {
function totalSupply() public view returns (uint);
function balanceOf(address tokenOwner) public view returns (uint balance);
function allowance(address tokenOwner, address spender) public view returns (uint remaining);
function transfer(address to, uint tokens) public returns (bool success);
function approve(address spender, uint tokens) public returns (bool success);
function transferFrom(address payable from, address to, uint tokens) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}
// ----------------------------------------------------------------------------
// Safe maths
// ----------------------------------------------------------------------------
library SafeMath {
function add(uint a, uint b) internal pure returns (uint c) {
}
function sub(uint a, uint b) internal pure returns (uint c) {
}
function mul(uint a, uint b) internal pure returns (uint c) {
}
function div(uint a, uint b) internal pure returns (uint c) {
}
}
contract Cache is Owned(msg.sender), ERC20Interface{
using SafeMath for uint256;
/* ERC20 public vars */
string public constant version = 'Cache 3.0';
string public name = 'Cache';
string public symbol = 'CACHE';
uint256 public decimals = 18;
uint256 internal _totalSupply;
/* ERC20 This creates an array with all balances */
mapping (address => uint256) public balances;
mapping (address => mapping (address => uint256)) public allowed;
/* Keeps record of Depositor's amount and deposit time */
mapping (address => Depositor) public depositor;
struct Depositor{
uint256 amount;
}
/* reservedReward collects owner reward share */
uint256 public reservedReward;
uint256 public constant initialSupply = 4e6; //4,000,000
/* custom events to notify users */
event Withdraw(address indexed by, uint256 amount, uint256 fee); // successful withdraw event
event Deposited(address indexed by, uint256 amount); // funds Deposited event
event PaidOwnerReward(uint256 amount);
/*
* Initializes contract with initial supply tokens to the creator of the contract
* In our case, there's no initial supply. Tokens will be created as ether is sent
* to the fall-back function. Then tokens are burned when ether is withdrawn.
*/
Owned private owned;
address payable private owner;
constructor () payable public {
}
/**
* Fallback function when sending ether to the contract
* Gas use: 91000
*/
function() external payable {
}
//Pay the owner the reservedReward
function ownerReward() internal{
}
//Charge a 0.3% deposit fee
function makeDeposit(address sender, uint256 amount) internal {
require(<FILL_ME>)
require(amount > 0);
//Take 0.3% of the fee and send it to the Owner of the contract
uint256 depositFee = (amount.div(1000)).mul(3);
uint256 newAmount = (amount.mul(1000)).sub(depositFee.mul(1000));
//Send the tokens to depositor of the Ethereum
balances[sender] = balances[sender] + newAmount; // mint new tokens
_totalSupply = _totalSupply + newAmount; // track the supply
emit Transfer(address(0), sender, newAmount); // notify of the transfer event
//Adding the fee to the reservedReward
reservedReward = reservedReward.add(depositFee);
//Adding the amount deposited to the depositor
depositor[sender].amount = newAmount;
emit Deposited(sender, newAmount);
}
//Charge a 0.3% withdrawal fee
function withdraw(address payable _sender, uint256 amount) internal {
}
/***************************** ERC20 implementation **********************/
function totalSupply() public view returns (uint){
}
// ------------------------------------------------------------------------
// Get the token balance for account `tokenOwner`
// ------------------------------------------------------------------------
function balanceOf(address tokenOwner) public view returns (uint balance) {
}
// ------------------------------------------------------------------------
// Transfer the balance from token owner's account to `to` account
// - Owner's account must have sufficient balance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------
function transfer(address to, uint tokens) public returns (bool success) {
}
// ------------------------------------------------------------------------
// Transfer `tokens` from the `from` account to the `to` account
//
// The calling account must already have sufficient tokens approve(...)-d
// for spending from the `from` account and
// - From account must have sufficient balance to transfer
// - Spender must have sufficient allowance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------
function transferFrom(address payable from, address to, uint tokens) public returns (bool success){
}
// ------------------------------------------------------------------------
// Token owner can approve for `spender` to transferFrom(...) `tokens`
// from the token owner's account
// ------------------------------------------------------------------------
function approve(address spender, uint tokens) public returns (bool success){
}
// ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------
function allowance(address tokenOwner, address spender) public view returns (uint remaining) {
}
}
| balances[sender]==0 | 397,784 | balances[sender]==0 |
null | pragma solidity 0.5.11;
// ----------------------------------------------------------------------------
// Owned contract
// ----------------------------------------------------------------------------
contract Owned {
address payable private owner;
event OwnershipTransferred(address indexed _from, address indexed _to);
constructor(address payable _owner) public {
}
modifier onlyOwner {
}
function getOwner() internal view returns(address){
}
function transferOwnership(address payable _newOwner) public onlyOwner {
}
}
// ----------------------------------------------------------------------------
// ERC Token Standard #20 Interface
// ----------------------------------------------------------------------------
contract ERC20Interface {
function totalSupply() public view returns (uint);
function balanceOf(address tokenOwner) public view returns (uint balance);
function allowance(address tokenOwner, address spender) public view returns (uint remaining);
function transfer(address to, uint tokens) public returns (bool success);
function approve(address spender, uint tokens) public returns (bool success);
function transferFrom(address payable from, address to, uint tokens) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}
// ----------------------------------------------------------------------------
// Safe maths
// ----------------------------------------------------------------------------
library SafeMath {
function add(uint a, uint b) internal pure returns (uint c) {
}
function sub(uint a, uint b) internal pure returns (uint c) {
}
function mul(uint a, uint b) internal pure returns (uint c) {
}
function div(uint a, uint b) internal pure returns (uint c) {
}
}
contract Cache is Owned(msg.sender), ERC20Interface{
using SafeMath for uint256;
/* ERC20 public vars */
string public constant version = 'Cache 3.0';
string public name = 'Cache';
string public symbol = 'CACHE';
uint256 public decimals = 18;
uint256 internal _totalSupply;
/* ERC20 This creates an array with all balances */
mapping (address => uint256) public balances;
mapping (address => mapping (address => uint256)) public allowed;
/* Keeps record of Depositor's amount and deposit time */
mapping (address => Depositor) public depositor;
struct Depositor{
uint256 amount;
}
/* reservedReward collects owner reward share */
uint256 public reservedReward;
uint256 public constant initialSupply = 4e6; //4,000,000
/* custom events to notify users */
event Withdraw(address indexed by, uint256 amount, uint256 fee); // successful withdraw event
event Deposited(address indexed by, uint256 amount); // funds Deposited event
event PaidOwnerReward(uint256 amount);
/*
* Initializes contract with initial supply tokens to the creator of the contract
* In our case, there's no initial supply. Tokens will be created as ether is sent
* to the fall-back function. Then tokens are burned when ether is withdrawn.
*/
Owned private owned;
address payable private owner;
constructor () payable public {
}
/**
* Fallback function when sending ether to the contract
* Gas use: 91000
*/
function() external payable {
}
//Pay the owner the reservedReward
function ownerReward() internal{
}
//Charge a 0.3% deposit fee
function makeDeposit(address sender, uint256 amount) internal {
}
//Charge a 0.3% withdrawal fee
function withdraw(address payable _sender, uint256 amount) internal {
uint256 withdrawFee = (amount.div(1000)).mul(3);
uint256 newAmount = (amount.mul(1000)).sub(withdrawFee.mul(1000));
//Remove deposit in terms of ETH
depositor[_sender].amount = depositor[_sender].amount.sub(amount); // remove deposit information from depositor record
//Withdraw the amount from the contract and pay the fee
require(<FILL_ME>) // transfer ethers plus earned reward to sender
emit Withdraw(_sender, newAmount.div(1000000), withdrawFee.div(1000));
//Adding the fee to the reservedReward
reservedReward = reservedReward.add(withdrawFee.div(1000));
}
/***************************** ERC20 implementation **********************/
function totalSupply() public view returns (uint){
}
// ------------------------------------------------------------------------
// Get the token balance for account `tokenOwner`
// ------------------------------------------------------------------------
function balanceOf(address tokenOwner) public view returns (uint balance) {
}
// ------------------------------------------------------------------------
// Transfer the balance from token owner's account to `to` account
// - Owner's account must have sufficient balance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------
function transfer(address to, uint tokens) public returns (bool success) {
}
// ------------------------------------------------------------------------
// Transfer `tokens` from the `from` account to the `to` account
//
// The calling account must already have sufficient tokens approve(...)-d
// for spending from the `from` account and
// - From account must have sufficient balance to transfer
// - Spender must have sufficient allowance to transfer
// - 0 value transfers are allowed
// ------------------------------------------------------------------------
function transferFrom(address payable from, address to, uint tokens) public returns (bool success){
}
// ------------------------------------------------------------------------
// Token owner can approve for `spender` to transferFrom(...) `tokens`
// from the token owner's account
// ------------------------------------------------------------------------
function approve(address spender, uint tokens) public returns (bool success){
}
// ------------------------------------------------------------------------
// Returns the amount of tokens approved by the owner that can be
// transferred to the spender's account
// ------------------------------------------------------------------------
function allowance(address tokenOwner, address spender) public view returns (uint remaining) {
}
}
| _sender.send(newAmount.div(1000000)) | 397,784 | _sender.send(newAmount.div(1000000)) |
"MerkleDistributor: Invalid proof." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./Ownable.sol";
import "./ReentrancyGuard.sol";
import "./ERC721A.sol";
import "./Strings.sol";
import "./MerkleProof.sol";
contract APME is Ownable, ERC721A, ReentrancyGuard {
uint256 public SALE_NFT = 800;
uint256 public GIVEAWAY_NFT = 200;
uint256 public MAX_MINT_PRESALE = SALE_NFT;
uint256 public MAX_MINT_SALE = SALE_NFT;
uint256 public MAX_BY_MINT_IN_TRANSACTION_PRESALE = 10;
uint256 public MAX_BY_MINT_IN_TRANSACTION_SALE = 10;
uint256 public SALE_MINTED;
uint256 public GIVEAWAY_MINTED;
uint256 public PRESALE_PRICE = 4 * 10**16;
uint256 public SALE_PRICE = 6 * 10**16;
bool public presaleEnable = false;
bool public saleEnable = false;
bytes32 public merkleRootPreSale;
struct User {
uint256 presalemint;
uint256 salemint;
}
mapping (address => User) public users;
string public _baseTokenURI;
constructor() ERC721A("Apenime", "APME") {
}
function mintGiveawayNFT(address _to, uint256 _count) public onlyOwner{
}
function mintPreSaleNFT(uint256 _count, bytes32[] calldata merkleProof) public payable{
bytes32 node = keccak256(abi.encodePacked(msg.sender));
require(
presaleEnable,
"Pre-sale is not enable"
);
require(
SALE_MINTED + _count <= SALE_NFT,
"Exceeds max limit"
);
require(<FILL_ME>)
require(
users[msg.sender].presalemint + _count <= MAX_MINT_PRESALE,
"Exceeds max mint limit per wallet"
);
require(
_count <= MAX_BY_MINT_IN_TRANSACTION_PRESALE,
"Exceeds max mint limit per tnx"
);
require(
msg.value >= PRESALE_PRICE * _count,
"Value below price"
);
_safeMint(msg.sender, _count);
SALE_MINTED = SALE_MINTED + _count;
users[msg.sender].presalemint = users[msg.sender].presalemint + _count;
}
function mintSaleNFT(uint256 _count) public payable{
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setBaseURI(string calldata baseURI) external onlyOwner {
}
function withdraw() public onlyOwner {
}
function numberMinted(address owner) public view returns (uint256) {
}
function getOwnershipData(uint256 tokenId) external view returns (TokenOwnership memory) {
}
function updatePreSalePrice(uint256 newPrice) external onlyOwner {
}
function updateSalePrice(uint256 newPrice) external onlyOwner {
}
function setPreSaleStatus(bool status) public onlyOwner {
}
function setSaleStatus(bool status) public onlyOwner {
}
function updatePreSaleMintLimit(uint256 newLimit) external onlyOwner {
}
function updateSaleMintLimit(uint256 newLimit) external onlyOwner {
}
function updateSaleSupply(uint256 newSupply) external onlyOwner {
}
function updateGiveawaySupply(uint256 newSupply) external onlyOwner {
}
function updateMintLimitPerTransectionPreSale(uint256 newLimit) external onlyOwner {
}
function updateMintLimitPerTransectionSale(uint256 newLimit) external onlyOwner {
}
function updatePreSaleMerkleRoot(bytes32 newRoot) external onlyOwner {
}
}
| MerkleProof.verify(merkleProof,merkleRootPreSale,node),"MerkleDistributor: Invalid proof." | 397,874 | MerkleProof.verify(merkleProof,merkleRootPreSale,node) |
"Player limit reached." | contract WorldCupPlayerToken is ERC721Token("WWWorld Cup", "WWWC"), Ownable {
string constant public PLAYER_METADATA = "ipfs://ipfs/QmNgMeQT62pnUkkFcz4y59cQTmTZHBVFKmQ7Y7HQjh7tRw";
uint256 constant DISTINCT_LEGENDARY_LIMIT = 1;
uint256 constant DISTINCT_RARE_LIMIT = 2;
uint256 constant DISTINCT_COMMON_LIMIT = 3;
uint256 constant LEGENDARY_MAX_ID = 32;
uint256 constant RARE_MAX_ID = 96;
uint256 constant COMMON_MAX_ID = 736;
mapping (uint256 => uint256) public playerCount;
mapping (uint256 => uint256) internal tokenPlayerIds;
/** @dev Enforces a scaricity of unique player cards by limiting.
* @param playerId Player Id to enforce limit on.
* @param limit Maximum number of tokens for that player id that can exist.
*/
modifier enforcePlayerScarcity(uint256 playerId, uint256 limit) {
require(<FILL_ME>)
_;
}
/** @dev Validates that the playerId is in the correct rarity range.
* @param playerId Player Id to validate.
* @param min Minimum playerId of range.
* @param max Maximum playerId of range.
*/
modifier validatePlayerIdRange(uint256 playerId, uint256 min, uint256 max) {
}
/** @dev Creates a new token.
* @param playerId Player Id to be created.
*/
function _mintToken(uint256 playerId, string tokenURI, address owner) internal {
}
/** @dev Internal function to set player Id for a given token.
* @param tokenId Id of the token to set its playerId.
* @param playerId Player Id to assign.
*/
function _setPlayerId(uint256 tokenId, uint256 playerId) internal {
}
/** @dev Returns player Id for a given token.
* @param tokenId Id of the token to query player Id.
* @return playerId for given token.
*/
function playerId(uint256 tokenId) public view returns (uint256) {
}
}
| playerCount[playerId]<limit,"Player limit reached." | 397,912 | playerCount[playerId]<limit |
null | pragma solidity ^0.4.21;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
}
pragma solidity ^0.4.23;
/**
* @title SplitPayment
* @dev Base contract that supports multiple payees claiming funds sent to this contract
* according to the proportion they own.
*/
contract SplitPayment {
using SafeMath for uint256;
uint256 public totalShares = 0;
uint256 public totalReleased = 0;
mapping(address => uint256) public shares;
mapping(address => uint256) public released;
address[] public payees;
/**
* @dev Constructor
*/
constructor(address[] _payees, uint256[] _shares) public payable {
}
/**
* @dev payable fallback
*/
function () public payable {}
/**
* @dev Claim your share of the balance.
*/
function claim() public {
address payee = msg.sender;
require(<FILL_ME>)
uint256 totalReceived = address(this).balance.add(totalReleased);
uint256 payment = totalReceived.mul(shares[payee]).div(totalShares).sub(released[payee]);
require(payment != 0);
require(address(this).balance >= payment);
released[payee] = released[payee].add(payment);
totalReleased = totalReleased.add(payment);
payee.transfer(payment);
}
/**
* @dev Check your share of the balance.
*/
function checkMyBalance() public view returns(uint256) {
}
/**
* @dev Add a new payee to the contract.
* @param _payee The address of the payee to add.
* @param _shares The number of shares owned by the payee.
*/
function addPayee(address _payee, uint256 _shares) internal {
}
}
| shares[payee]>0 | 398,071 | shares[payee]>0 |
null | pragma solidity ^0.4.21;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
}
pragma solidity ^0.4.23;
/**
* @title SplitPayment
* @dev Base contract that supports multiple payees claiming funds sent to this contract
* according to the proportion they own.
*/
contract SplitPayment {
using SafeMath for uint256;
uint256 public totalShares = 0;
uint256 public totalReleased = 0;
mapping(address => uint256) public shares;
mapping(address => uint256) public released;
address[] public payees;
/**
* @dev Constructor
*/
constructor(address[] _payees, uint256[] _shares) public payable {
}
/**
* @dev payable fallback
*/
function () public payable {}
/**
* @dev Claim your share of the balance.
*/
function claim() public {
address payee = msg.sender;
require(shares[payee] > 0);
uint256 totalReceived = address(this).balance.add(totalReleased);
uint256 payment = totalReceived.mul(shares[payee]).div(totalShares).sub(released[payee]);
require(payment != 0);
require(<FILL_ME>)
released[payee] = released[payee].add(payment);
totalReleased = totalReleased.add(payment);
payee.transfer(payment);
}
/**
* @dev Check your share of the balance.
*/
function checkMyBalance() public view returns(uint256) {
}
/**
* @dev Add a new payee to the contract.
* @param _payee The address of the payee to add.
* @param _shares The number of shares owned by the payee.
*/
function addPayee(address _payee, uint256 _shares) internal {
}
}
| address(this).balance>=payment | 398,071 | address(this).balance>=payment |
null | pragma solidity ^0.4.21;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
}
pragma solidity ^0.4.23;
/**
* @title SplitPayment
* @dev Base contract that supports multiple payees claiming funds sent to this contract
* according to the proportion they own.
*/
contract SplitPayment {
using SafeMath for uint256;
uint256 public totalShares = 0;
uint256 public totalReleased = 0;
mapping(address => uint256) public shares;
mapping(address => uint256) public released;
address[] public payees;
/**
* @dev Constructor
*/
constructor(address[] _payees, uint256[] _shares) public payable {
}
/**
* @dev payable fallback
*/
function () public payable {}
/**
* @dev Claim your share of the balance.
*/
function claim() public {
}
/**
* @dev Check your share of the balance.
*/
function checkMyBalance() public view returns(uint256) {
}
/**
* @dev Add a new payee to the contract.
* @param _payee The address of the payee to add.
* @param _shares The number of shares owned by the payee.
*/
function addPayee(address _payee, uint256 _shares) internal {
require(_payee != address(0));
require(_shares > 0);
require(<FILL_ME>)
payees.push(_payee);
shares[_payee] = _shares;
totalShares = totalShares.add(_shares);
}
}
| shares[_payee]==0 | 398,071 | shares[_payee]==0 |
"Purchase would exceed max supply of Blunts" | //SPDX-License-Identifier: MIT
//@dev: Blunt God
pragma solidity ^0.8.11;
import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {Pausable} from "@openzeppelin/contracts/security/Pausable.sol";
contract BluntHeads is ERC1155, Ownable, Pausable, ReentrancyGuard
{
/*--------------------
* VARIABLES *
---------------------*/
//Init
string public constant name = "BluntHeads";
string public constant symbol = "BLUNT";
string public _BASE_URI = "ipfs://QmamcA6NNQYHyajjiweY3L4mMmyhWQ3paDbQ7P4TPkdbcr/";
//Merkle Root
bytes32 private root = 0xfdc4c218f8683074c8b4dc0647f943c81bb12c66afc12ce09b9c9be951efbde9;
//Multisig
address private immutable _BHMultisig = 0xD98d0432C38536260c5bD323E8ce71144d366A85;
//Token Amounts
uint256 public _BLUNTS_MINTED = 1;
uint256 public _MAX_BLUNTS = 10000;
uint256 public _MAX_BLUNTS_PURCHASE = 20;
//Price
uint256 public _BLUNT_PRICE = 0.08 ether;
//Sale State
bool public _SALE_IS_ACTIVE_PUBLIC = false;
bool public _SALE_IS_ACTIVE_BLUNTLIST = true;
bool public _ALLOW_MULTIPLE_PURCHASES = true;
//Mint Mapping
mapping (address => bool) private _MINTED;
mapping (address => bool) private _CLAIMED;
//Mint Event
event BluntHeadsMinted(address indexed recipient, uint256 indexed amount);
/*--------------------
* CONSTRUCTOR *
---------------------*/
constructor() ERC1155("https://ipfs.io/ipfs/QmamcA6NNQYHyajjiweY3L4mMmyhWQ3paDbQ7P4TPkdbcr/{id}.json") { }
/*--------------------
* MINT *
---------------------*/
/**
* @dev Public Mints Blunt Heads
*/
function BluntHeadsMint(uint256 numberOfTokens) public payable nonReentrant whenNotPaused
{
require(tx.origin == msg.sender, "No External Contracts");
require(_SALE_IS_ACTIVE_PUBLIC, "Sale must be active to mint Blunts");
require(numberOfTokens <= _MAX_BLUNTS_PURCHASE && numberOfTokens > 0, "Can only mint max 20 Blunts at a time, and a minimum of 1");
require(<FILL_ME>)
require(_BLUNT_PRICE * numberOfTokens == msg.value, "Ether value sent is not correct. 0.08 ETH Per Blunt | 80000000000000000 WEI");
if(!_ALLOW_MULTIPLE_PURCHASES) { require(!_MINTED[msg.sender], "Address Has Already Minted"); }
_MINTED[msg.sender] = true;
//Mints Blunts
for(uint256 i=0; i < numberOfTokens; i++)
{
if (_BLUNTS_MINTED <= _MAX_BLUNTS)
{
_mint(msg.sender, _BLUNTS_MINTED, 1, "");
_BLUNTS_MINTED += 1;
}
}
//Purchase 3 Or More, Get 1 Free
if(numberOfTokens >= 3 && _BLUNTS_MINTED < _MAX_BLUNTS)
{
uint256 numFree = numberOfTokens / 3;
for(uint256 i = 0; i < numFree; i++)
{
_mint(msg.sender, _BLUNTS_MINTED, 1, "");
_BLUNTS_MINTED += 1;
}
}
//Finishes Mint
emit BluntHeadsMinted(msg.sender, numberOfTokens);
}
/**
* @dev Mints Blunt Heads from Merkle Proof Bluntlist
*/
function BluntHeadsMintBluntlist(uint256 numberOfTokens, bytes32[] calldata proof) public payable nonReentrant whenNotPaused
{
}
/*--------------------
* PUBLIC VIEW *
---------------------*/
/**
* @dev URI for decoding storage of tokenIDs
*/
function uri(uint256 tokenId) override public view returns (string memory) { }
/**
* @dev Shows Total Supply
*/
function totalSupply() public view returns (uint256 supply) { }
/*--------------------
* ADMIN *
---------------------*/
/**
* @dev Withdraws Ether From The Contract
*/
function __withdrawEther() external onlyOwner
{
}
/**
* @dev Withdraws ERC-20
*/
function __withdrawERC20(address tokenAddress) external onlyOwner
{
}
/**
* @dev Reserves Blunt Heads For Team
*/
function _reserveBluntHeads(uint256 numberOfTokens) public onlyOwner
{
}
/**
* @dev Sets Base URI For .json hosting
*/
function __setBaseURI(string memory BASE_URI) external onlyOwner { }
/**
* @dev Sets Max Blunts for future Blunt Expansion Packs
*/
function __setMaxBlunts(uint256 MAX_BLUNTS) external onlyOwner { }
/**
* @dev Sets Max Blunts Purchaseable by Wallet
*/
function __setMaxBluntsPurchase(uint256 MAX_BLUNTS_PURCHASE) external onlyOwner { }
/**
* @dev Sets Future Blunt Price
*/
function __setBluntPrice(uint256 BLUNT_PRICE) external onlyOwner { }
/**
* @dev Flips Allowing Multiple Purchases for future Blunt Expansion Packs
*/
function __flip_allowMultiplePurchases() external onlyOwner { }
/**
* @dev Flips Sale State
*/
function __Flip_Sale_State_Public() external onlyOwner { }
/**
* @dev Flips Sale State BluntList
*/
function __Flip_Sale_State_BluntList() external onlyOwner { }
/**
* @dev Ends Sale
*/
function __endSale() external onlyOwner { }
/**
* @dev Pauses Contract
*/
function __pause() external onlyOwner { }
/**
* @dev Unpauses Contract
*/
function __unpause() external onlyOwner { }
/**
* @dev Modifies Merkle Root
*/
function __modifyMerkleRoot(bytes32 newRoot) external onlyOwner { }
/*--------------------
* INTERNAL *
---------------------*/
/**
* @dev Conforms to ERC-1155 Standard
*/
function _beforeTokenTransfer(address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) internal whenNotPaused override
{
}
}
| _BLUNTS_MINTED+numberOfTokens<=_MAX_BLUNTS,"Purchase would exceed max supply of Blunts" | 398,084 | _BLUNTS_MINTED+numberOfTokens<=_MAX_BLUNTS |
"Ether value sent is not correct. 0.08 ETH Per Blunt | 80000000000000000 WEI" | //SPDX-License-Identifier: MIT
//@dev: Blunt God
pragma solidity ^0.8.11;
import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {Pausable} from "@openzeppelin/contracts/security/Pausable.sol";
contract BluntHeads is ERC1155, Ownable, Pausable, ReentrancyGuard
{
/*--------------------
* VARIABLES *
---------------------*/
//Init
string public constant name = "BluntHeads";
string public constant symbol = "BLUNT";
string public _BASE_URI = "ipfs://QmamcA6NNQYHyajjiweY3L4mMmyhWQ3paDbQ7P4TPkdbcr/";
//Merkle Root
bytes32 private root = 0xfdc4c218f8683074c8b4dc0647f943c81bb12c66afc12ce09b9c9be951efbde9;
//Multisig
address private immutable _BHMultisig = 0xD98d0432C38536260c5bD323E8ce71144d366A85;
//Token Amounts
uint256 public _BLUNTS_MINTED = 1;
uint256 public _MAX_BLUNTS = 10000;
uint256 public _MAX_BLUNTS_PURCHASE = 20;
//Price
uint256 public _BLUNT_PRICE = 0.08 ether;
//Sale State
bool public _SALE_IS_ACTIVE_PUBLIC = false;
bool public _SALE_IS_ACTIVE_BLUNTLIST = true;
bool public _ALLOW_MULTIPLE_PURCHASES = true;
//Mint Mapping
mapping (address => bool) private _MINTED;
mapping (address => bool) private _CLAIMED;
//Mint Event
event BluntHeadsMinted(address indexed recipient, uint256 indexed amount);
/*--------------------
* CONSTRUCTOR *
---------------------*/
constructor() ERC1155("https://ipfs.io/ipfs/QmamcA6NNQYHyajjiweY3L4mMmyhWQ3paDbQ7P4TPkdbcr/{id}.json") { }
/*--------------------
* MINT *
---------------------*/
/**
* @dev Public Mints Blunt Heads
*/
function BluntHeadsMint(uint256 numberOfTokens) public payable nonReentrant whenNotPaused
{
require(tx.origin == msg.sender, "No External Contracts");
require(_SALE_IS_ACTIVE_PUBLIC, "Sale must be active to mint Blunts");
require(numberOfTokens <= _MAX_BLUNTS_PURCHASE && numberOfTokens > 0, "Can only mint max 20 Blunts at a time, and a minimum of 1");
require(_BLUNTS_MINTED + numberOfTokens <= _MAX_BLUNTS, "Purchase would exceed max supply of Blunts");
require(<FILL_ME>)
if(!_ALLOW_MULTIPLE_PURCHASES) { require(!_MINTED[msg.sender], "Address Has Already Minted"); }
_MINTED[msg.sender] = true;
//Mints Blunts
for(uint256 i=0; i < numberOfTokens; i++)
{
if (_BLUNTS_MINTED <= _MAX_BLUNTS)
{
_mint(msg.sender, _BLUNTS_MINTED, 1, "");
_BLUNTS_MINTED += 1;
}
}
//Purchase 3 Or More, Get 1 Free
if(numberOfTokens >= 3 && _BLUNTS_MINTED < _MAX_BLUNTS)
{
uint256 numFree = numberOfTokens / 3;
for(uint256 i = 0; i < numFree; i++)
{
_mint(msg.sender, _BLUNTS_MINTED, 1, "");
_BLUNTS_MINTED += 1;
}
}
//Finishes Mint
emit BluntHeadsMinted(msg.sender, numberOfTokens);
}
/**
* @dev Mints Blunt Heads from Merkle Proof Bluntlist
*/
function BluntHeadsMintBluntlist(uint256 numberOfTokens, bytes32[] calldata proof) public payable nonReentrant whenNotPaused
{
}
/*--------------------
* PUBLIC VIEW *
---------------------*/
/**
* @dev URI for decoding storage of tokenIDs
*/
function uri(uint256 tokenId) override public view returns (string memory) { }
/**
* @dev Shows Total Supply
*/
function totalSupply() public view returns (uint256 supply) { }
/*--------------------
* ADMIN *
---------------------*/
/**
* @dev Withdraws Ether From The Contract
*/
function __withdrawEther() external onlyOwner
{
}
/**
* @dev Withdraws ERC-20
*/
function __withdrawERC20(address tokenAddress) external onlyOwner
{
}
/**
* @dev Reserves Blunt Heads For Team
*/
function _reserveBluntHeads(uint256 numberOfTokens) public onlyOwner
{
}
/**
* @dev Sets Base URI For .json hosting
*/
function __setBaseURI(string memory BASE_URI) external onlyOwner { }
/**
* @dev Sets Max Blunts for future Blunt Expansion Packs
*/
function __setMaxBlunts(uint256 MAX_BLUNTS) external onlyOwner { }
/**
* @dev Sets Max Blunts Purchaseable by Wallet
*/
function __setMaxBluntsPurchase(uint256 MAX_BLUNTS_PURCHASE) external onlyOwner { }
/**
* @dev Sets Future Blunt Price
*/
function __setBluntPrice(uint256 BLUNT_PRICE) external onlyOwner { }
/**
* @dev Flips Allowing Multiple Purchases for future Blunt Expansion Packs
*/
function __flip_allowMultiplePurchases() external onlyOwner { }
/**
* @dev Flips Sale State
*/
function __Flip_Sale_State_Public() external onlyOwner { }
/**
* @dev Flips Sale State BluntList
*/
function __Flip_Sale_State_BluntList() external onlyOwner { }
/**
* @dev Ends Sale
*/
function __endSale() external onlyOwner { }
/**
* @dev Pauses Contract
*/
function __pause() external onlyOwner { }
/**
* @dev Unpauses Contract
*/
function __unpause() external onlyOwner { }
/**
* @dev Modifies Merkle Root
*/
function __modifyMerkleRoot(bytes32 newRoot) external onlyOwner { }
/*--------------------
* INTERNAL *
---------------------*/
/**
* @dev Conforms to ERC-1155 Standard
*/
function _beforeTokenTransfer(address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) internal whenNotPaused override
{
}
}
| _BLUNT_PRICE*numberOfTokens==msg.value,"Ether value sent is not correct. 0.08 ETH Per Blunt | 80000000000000000 WEI" | 398,084 | _BLUNT_PRICE*numberOfTokens==msg.value |
"Address Has Already Minted" | //SPDX-License-Identifier: MIT
//@dev: Blunt God
pragma solidity ^0.8.11;
import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {Pausable} from "@openzeppelin/contracts/security/Pausable.sol";
contract BluntHeads is ERC1155, Ownable, Pausable, ReentrancyGuard
{
/*--------------------
* VARIABLES *
---------------------*/
//Init
string public constant name = "BluntHeads";
string public constant symbol = "BLUNT";
string public _BASE_URI = "ipfs://QmamcA6NNQYHyajjiweY3L4mMmyhWQ3paDbQ7P4TPkdbcr/";
//Merkle Root
bytes32 private root = 0xfdc4c218f8683074c8b4dc0647f943c81bb12c66afc12ce09b9c9be951efbde9;
//Multisig
address private immutable _BHMultisig = 0xD98d0432C38536260c5bD323E8ce71144d366A85;
//Token Amounts
uint256 public _BLUNTS_MINTED = 1;
uint256 public _MAX_BLUNTS = 10000;
uint256 public _MAX_BLUNTS_PURCHASE = 20;
//Price
uint256 public _BLUNT_PRICE = 0.08 ether;
//Sale State
bool public _SALE_IS_ACTIVE_PUBLIC = false;
bool public _SALE_IS_ACTIVE_BLUNTLIST = true;
bool public _ALLOW_MULTIPLE_PURCHASES = true;
//Mint Mapping
mapping (address => bool) private _MINTED;
mapping (address => bool) private _CLAIMED;
//Mint Event
event BluntHeadsMinted(address indexed recipient, uint256 indexed amount);
/*--------------------
* CONSTRUCTOR *
---------------------*/
constructor() ERC1155("https://ipfs.io/ipfs/QmamcA6NNQYHyajjiweY3L4mMmyhWQ3paDbQ7P4TPkdbcr/{id}.json") { }
/*--------------------
* MINT *
---------------------*/
/**
* @dev Public Mints Blunt Heads
*/
function BluntHeadsMint(uint256 numberOfTokens) public payable nonReentrant whenNotPaused
{
require(tx.origin == msg.sender, "No External Contracts");
require(_SALE_IS_ACTIVE_PUBLIC, "Sale must be active to mint Blunts");
require(numberOfTokens <= _MAX_BLUNTS_PURCHASE && numberOfTokens > 0, "Can only mint max 20 Blunts at a time, and a minimum of 1");
require(_BLUNTS_MINTED + numberOfTokens <= _MAX_BLUNTS, "Purchase would exceed max supply of Blunts");
require(_BLUNT_PRICE * numberOfTokens == msg.value, "Ether value sent is not correct. 0.08 ETH Per Blunt | 80000000000000000 WEI");
if(!_ALLOW_MULTIPLE_PURCHASES) { require(<FILL_ME>) }
_MINTED[msg.sender] = true;
//Mints Blunts
for(uint256 i=0; i < numberOfTokens; i++)
{
if (_BLUNTS_MINTED <= _MAX_BLUNTS)
{
_mint(msg.sender, _BLUNTS_MINTED, 1, "");
_BLUNTS_MINTED += 1;
}
}
//Purchase 3 Or More, Get 1 Free
if(numberOfTokens >= 3 && _BLUNTS_MINTED < _MAX_BLUNTS)
{
uint256 numFree = numberOfTokens / 3;
for(uint256 i = 0; i < numFree; i++)
{
_mint(msg.sender, _BLUNTS_MINTED, 1, "");
_BLUNTS_MINTED += 1;
}
}
//Finishes Mint
emit BluntHeadsMinted(msg.sender, numberOfTokens);
}
/**
* @dev Mints Blunt Heads from Merkle Proof Bluntlist
*/
function BluntHeadsMintBluntlist(uint256 numberOfTokens, bytes32[] calldata proof) public payable nonReentrant whenNotPaused
{
}
/*--------------------
* PUBLIC VIEW *
---------------------*/
/**
* @dev URI for decoding storage of tokenIDs
*/
function uri(uint256 tokenId) override public view returns (string memory) { }
/**
* @dev Shows Total Supply
*/
function totalSupply() public view returns (uint256 supply) { }
/*--------------------
* ADMIN *
---------------------*/
/**
* @dev Withdraws Ether From The Contract
*/
function __withdrawEther() external onlyOwner
{
}
/**
* @dev Withdraws ERC-20
*/
function __withdrawERC20(address tokenAddress) external onlyOwner
{
}
/**
* @dev Reserves Blunt Heads For Team
*/
function _reserveBluntHeads(uint256 numberOfTokens) public onlyOwner
{
}
/**
* @dev Sets Base URI For .json hosting
*/
function __setBaseURI(string memory BASE_URI) external onlyOwner { }
/**
* @dev Sets Max Blunts for future Blunt Expansion Packs
*/
function __setMaxBlunts(uint256 MAX_BLUNTS) external onlyOwner { }
/**
* @dev Sets Max Blunts Purchaseable by Wallet
*/
function __setMaxBluntsPurchase(uint256 MAX_BLUNTS_PURCHASE) external onlyOwner { }
/**
* @dev Sets Future Blunt Price
*/
function __setBluntPrice(uint256 BLUNT_PRICE) external onlyOwner { }
/**
* @dev Flips Allowing Multiple Purchases for future Blunt Expansion Packs
*/
function __flip_allowMultiplePurchases() external onlyOwner { }
/**
* @dev Flips Sale State
*/
function __Flip_Sale_State_Public() external onlyOwner { }
/**
* @dev Flips Sale State BluntList
*/
function __Flip_Sale_State_BluntList() external onlyOwner { }
/**
* @dev Ends Sale
*/
function __endSale() external onlyOwner { }
/**
* @dev Pauses Contract
*/
function __pause() external onlyOwner { }
/**
* @dev Unpauses Contract
*/
function __unpause() external onlyOwner { }
/**
* @dev Modifies Merkle Root
*/
function __modifyMerkleRoot(bytes32 newRoot) external onlyOwner { }
/*--------------------
* INTERNAL *
---------------------*/
/**
* @dev Conforms to ERC-1155 Standard
*/
function _beforeTokenTransfer(address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) internal whenNotPaused override
{
}
}
| !_MINTED[msg.sender],"Address Has Already Minted" | 398,084 | !_MINTED[msg.sender] |
"User Has Already Claimed Bluntlist Allocation" | //SPDX-License-Identifier: MIT
//@dev: Blunt God
pragma solidity ^0.8.11;
import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {Pausable} from "@openzeppelin/contracts/security/Pausable.sol";
contract BluntHeads is ERC1155, Ownable, Pausable, ReentrancyGuard
{
/*--------------------
* VARIABLES *
---------------------*/
//Init
string public constant name = "BluntHeads";
string public constant symbol = "BLUNT";
string public _BASE_URI = "ipfs://QmamcA6NNQYHyajjiweY3L4mMmyhWQ3paDbQ7P4TPkdbcr/";
//Merkle Root
bytes32 private root = 0xfdc4c218f8683074c8b4dc0647f943c81bb12c66afc12ce09b9c9be951efbde9;
//Multisig
address private immutable _BHMultisig = 0xD98d0432C38536260c5bD323E8ce71144d366A85;
//Token Amounts
uint256 public _BLUNTS_MINTED = 1;
uint256 public _MAX_BLUNTS = 10000;
uint256 public _MAX_BLUNTS_PURCHASE = 20;
//Price
uint256 public _BLUNT_PRICE = 0.08 ether;
//Sale State
bool public _SALE_IS_ACTIVE_PUBLIC = false;
bool public _SALE_IS_ACTIVE_BLUNTLIST = true;
bool public _ALLOW_MULTIPLE_PURCHASES = true;
//Mint Mapping
mapping (address => bool) private _MINTED;
mapping (address => bool) private _CLAIMED;
//Mint Event
event BluntHeadsMinted(address indexed recipient, uint256 indexed amount);
/*--------------------
* CONSTRUCTOR *
---------------------*/
constructor() ERC1155("https://ipfs.io/ipfs/QmamcA6NNQYHyajjiweY3L4mMmyhWQ3paDbQ7P4TPkdbcr/{id}.json") { }
/*--------------------
* MINT *
---------------------*/
/**
* @dev Public Mints Blunt Heads
*/
function BluntHeadsMint(uint256 numberOfTokens) public payable nonReentrant whenNotPaused
{
}
/**
* @dev Mints Blunt Heads from Merkle Proof Bluntlist
*/
function BluntHeadsMintBluntlist(uint256 numberOfTokens, bytes32[] calldata proof) public payable nonReentrant whenNotPaused
{
require(tx.origin == msg.sender, "No External Contracts");
require(_SALE_IS_ACTIVE_BLUNTLIST, "BluntList Sale Is Not Active");
require(<FILL_ME>)
require(_BLUNTS_MINTED + numberOfTokens <= _MAX_BLUNTS, "Purchase would exceed max supply of Blunts");
require(_BLUNT_PRICE * numberOfTokens == msg.value, "Ether value sent is not correct. 0.08 ETH Per Blunt | 80000000000000000 WEI");
require(numberOfTokens <= _MAX_BLUNTS_PURCHASE && numberOfTokens > 0, "Can only mint max 20 Blunts at a time, and a minimum of 1");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(MerkleProof.verify(proof, root, leaf), "Invalid Merkle Tree, Msg.sender Is Not On BluntList");
//One BluntList Transaction Per User
_CLAIMED[msg.sender] = true;
//Mints Blunts
for(uint256 i = 0; i < numberOfTokens; i++)
{
if (_BLUNTS_MINTED <= _MAX_BLUNTS)
{
_mint(msg.sender, _BLUNTS_MINTED, 1, "");
_BLUNTS_MINTED += 1;
}
}
//Purchase 3 Or More, Get 1 Free
if(numberOfTokens >= 3 && _BLUNTS_MINTED < _MAX_BLUNTS)
{
uint256 numFree = numberOfTokens / 3;
for(uint256 i = 0; i < numFree; i++)
{
_mint(msg.sender, _BLUNTS_MINTED, 1, "");
_BLUNTS_MINTED += 1;
}
}
//Finishes Mint
emit BluntHeadsMinted(msg.sender, numberOfTokens);
}
/*--------------------
* PUBLIC VIEW *
---------------------*/
/**
* @dev URI for decoding storage of tokenIDs
*/
function uri(uint256 tokenId) override public view returns (string memory) { }
/**
* @dev Shows Total Supply
*/
function totalSupply() public view returns (uint256 supply) { }
/*--------------------
* ADMIN *
---------------------*/
/**
* @dev Withdraws Ether From The Contract
*/
function __withdrawEther() external onlyOwner
{
}
/**
* @dev Withdraws ERC-20
*/
function __withdrawERC20(address tokenAddress) external onlyOwner
{
}
/**
* @dev Reserves Blunt Heads For Team
*/
function _reserveBluntHeads(uint256 numberOfTokens) public onlyOwner
{
}
/**
* @dev Sets Base URI For .json hosting
*/
function __setBaseURI(string memory BASE_URI) external onlyOwner { }
/**
* @dev Sets Max Blunts for future Blunt Expansion Packs
*/
function __setMaxBlunts(uint256 MAX_BLUNTS) external onlyOwner { }
/**
* @dev Sets Max Blunts Purchaseable by Wallet
*/
function __setMaxBluntsPurchase(uint256 MAX_BLUNTS_PURCHASE) external onlyOwner { }
/**
* @dev Sets Future Blunt Price
*/
function __setBluntPrice(uint256 BLUNT_PRICE) external onlyOwner { }
/**
* @dev Flips Allowing Multiple Purchases for future Blunt Expansion Packs
*/
function __flip_allowMultiplePurchases() external onlyOwner { }
/**
* @dev Flips Sale State
*/
function __Flip_Sale_State_Public() external onlyOwner { }
/**
* @dev Flips Sale State BluntList
*/
function __Flip_Sale_State_BluntList() external onlyOwner { }
/**
* @dev Ends Sale
*/
function __endSale() external onlyOwner { }
/**
* @dev Pauses Contract
*/
function __pause() external onlyOwner { }
/**
* @dev Unpauses Contract
*/
function __unpause() external onlyOwner { }
/**
* @dev Modifies Merkle Root
*/
function __modifyMerkleRoot(bytes32 newRoot) external onlyOwner { }
/*--------------------
* INTERNAL *
---------------------*/
/**
* @dev Conforms to ERC-1155 Standard
*/
function _beforeTokenTransfer(address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) internal whenNotPaused override
{
}
}
| !_CLAIMED[msg.sender],"User Has Already Claimed Bluntlist Allocation" | 398,084 | !_CLAIMED[msg.sender] |
"Zero Token Balance" | //SPDX-License-Identifier: MIT
//@dev: Blunt God
pragma solidity ^0.8.11;
import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {Pausable} from "@openzeppelin/contracts/security/Pausable.sol";
contract BluntHeads is ERC1155, Ownable, Pausable, ReentrancyGuard
{
/*--------------------
* VARIABLES *
---------------------*/
//Init
string public constant name = "BluntHeads";
string public constant symbol = "BLUNT";
string public _BASE_URI = "ipfs://QmamcA6NNQYHyajjiweY3L4mMmyhWQ3paDbQ7P4TPkdbcr/";
//Merkle Root
bytes32 private root = 0xfdc4c218f8683074c8b4dc0647f943c81bb12c66afc12ce09b9c9be951efbde9;
//Multisig
address private immutable _BHMultisig = 0xD98d0432C38536260c5bD323E8ce71144d366A85;
//Token Amounts
uint256 public _BLUNTS_MINTED = 1;
uint256 public _MAX_BLUNTS = 10000;
uint256 public _MAX_BLUNTS_PURCHASE = 20;
//Price
uint256 public _BLUNT_PRICE = 0.08 ether;
//Sale State
bool public _SALE_IS_ACTIVE_PUBLIC = false;
bool public _SALE_IS_ACTIVE_BLUNTLIST = true;
bool public _ALLOW_MULTIPLE_PURCHASES = true;
//Mint Mapping
mapping (address => bool) private _MINTED;
mapping (address => bool) private _CLAIMED;
//Mint Event
event BluntHeadsMinted(address indexed recipient, uint256 indexed amount);
/*--------------------
* CONSTRUCTOR *
---------------------*/
constructor() ERC1155("https://ipfs.io/ipfs/QmamcA6NNQYHyajjiweY3L4mMmyhWQ3paDbQ7P4TPkdbcr/{id}.json") { }
/*--------------------
* MINT *
---------------------*/
/**
* @dev Public Mints Blunt Heads
*/
function BluntHeadsMint(uint256 numberOfTokens) public payable nonReentrant whenNotPaused
{
}
/**
* @dev Mints Blunt Heads from Merkle Proof Bluntlist
*/
function BluntHeadsMintBluntlist(uint256 numberOfTokens, bytes32[] calldata proof) public payable nonReentrant whenNotPaused
{
}
/*--------------------
* PUBLIC VIEW *
---------------------*/
/**
* @dev URI for decoding storage of tokenIDs
*/
function uri(uint256 tokenId) override public view returns (string memory) { }
/**
* @dev Shows Total Supply
*/
function totalSupply() public view returns (uint256 supply) { }
/*--------------------
* ADMIN *
---------------------*/
/**
* @dev Withdraws Ether From The Contract
*/
function __withdrawEther() external onlyOwner
{
}
/**
* @dev Withdraws ERC-20
*/
function __withdrawERC20(address tokenAddress) external onlyOwner
{
IERC20 erc20Token = IERC20(tokenAddress);
require(<FILL_ME>)
erc20Token.transfer(_BHMultisig, erc20Token.balanceOf(address(this)));
}
/**
* @dev Reserves Blunt Heads For Team
*/
function _reserveBluntHeads(uint256 numberOfTokens) public onlyOwner
{
}
/**
* @dev Sets Base URI For .json hosting
*/
function __setBaseURI(string memory BASE_URI) external onlyOwner { }
/**
* @dev Sets Max Blunts for future Blunt Expansion Packs
*/
function __setMaxBlunts(uint256 MAX_BLUNTS) external onlyOwner { }
/**
* @dev Sets Max Blunts Purchaseable by Wallet
*/
function __setMaxBluntsPurchase(uint256 MAX_BLUNTS_PURCHASE) external onlyOwner { }
/**
* @dev Sets Future Blunt Price
*/
function __setBluntPrice(uint256 BLUNT_PRICE) external onlyOwner { }
/**
* @dev Flips Allowing Multiple Purchases for future Blunt Expansion Packs
*/
function __flip_allowMultiplePurchases() external onlyOwner { }
/**
* @dev Flips Sale State
*/
function __Flip_Sale_State_Public() external onlyOwner { }
/**
* @dev Flips Sale State BluntList
*/
function __Flip_Sale_State_BluntList() external onlyOwner { }
/**
* @dev Ends Sale
*/
function __endSale() external onlyOwner { }
/**
* @dev Pauses Contract
*/
function __pause() external onlyOwner { }
/**
* @dev Unpauses Contract
*/
function __unpause() external onlyOwner { }
/**
* @dev Modifies Merkle Root
*/
function __modifyMerkleRoot(bytes32 newRoot) external onlyOwner { }
/*--------------------
* INTERNAL *
---------------------*/
/**
* @dev Conforms to ERC-1155 Standard
*/
function _beforeTokenTransfer(address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) internal whenNotPaused override
{
}
}
| erc20Token.balanceOf(address(this))>0,"Zero Token Balance" | 398,084 | erc20Token.balanceOf(address(this))>0 |
"Whitelist is required to mint at this time" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
/// @custom:security-contact [email protected]
contract TheNFTySetupErc721 is ERC721, ERC721Enumerable, Pausable, Ownable, ERC721Burnable {
using Counters for Counters.Counter;
using Strings for uint256;
Counters.Counter private _tokenIdCounter;
Counters.Counter private _reservedIdCounter;
uint8 public _reservedTokens;
uint32 public MAX_SUPPLY;
uint32 public VIPSALE_START;
uint64 public VIPSALE_MINT_PRICE;
uint8 public VIPSALE_MINT_LIMIT;
uint32 public PRESALE_START;
uint64 public PRESALE_MINT_PRICE;
uint8 public PRESALE_MINT_LIMIT;
uint32 public MINT_START;
uint64 public MINT_PRICE;
uint8 public MINT_LIMIT;
address payable public PAYMENT_ADDRESS;
bytes32 public VIPSALE_MERKLEROOT;
bytes32 public PRESALE_MERKLEROOT;
bool public COLLECTION_HIDDEN;
string public COLLECTION_BASE_URI;
string public CONTRACT_METADATA_URI;
constructor(address payable paymentAddress, uint32 vipsaleStart, uint32 presaleStart, uint32 mintStart) ERC721("Metamouse Clubhouse", "METACLUBHOUSE") {
}
function _baseURI() internal view override returns (string memory) {
}
function contractURI() public view returns (string memory) {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function setMerkleRoots(bytes32 vip, bytes32 presale)
public
onlyOwner
{
}
function mint(bytes32[] calldata _merkleProof, uint256 _mintQuantity)
public
payable
whenNotPaused
{
require(_mintQuantity > 0, "Quantity cannot be 0");
require(tx.origin == msg.sender, "Contracts are not allowed to mint this collection");
if (block.timestamp >= MINT_START) {
// Public sale
require(msg.value >= MINT_PRICE * _mintQuantity, "Insufficient funds submitted");
require(_mintQuantity <= MINT_LIMIT, "Quantity exceeds MINT_LIMIT");
} else if (block.timestamp >= PRESALE_START) {
// Presale
require(msg.value >= PRESALE_MINT_PRICE * _mintQuantity, "Insufficient funds submitted");
require(_mintQuantity <= PRESALE_MINT_LIMIT, "Quantity exceeds PRESALE_MINT_LIMIT");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(<FILL_ME>)
} else if (block.timestamp >= VIPSALE_START) {
// VIP Sale
require(msg.value >= VIPSALE_MINT_PRICE * _mintQuantity, "Insufficient funds submitted");
require(_mintQuantity <= VIPSALE_MINT_LIMIT, "Quantity exceeds PRESALE_MINT_LIMIT");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(MerkleProof.verify(_merkleProof, VIPSALE_MERKLEROOT, leaf), "VIP is required to mint at this time");
} else {
revert("Sale is not active");
}
uint256 tokenId = _tokenIdCounter.current();
require(tokenId + _mintQuantity < MAX_SUPPLY, "Collection reached MAX_SUPPLY");
// All gates passed, transfer funds & mint token
PAYMENT_ADDRESS.transfer(msg.value);
for (uint256 i = tokenId; i < tokenId + _mintQuantity; i++) {
_safeMint(msg.sender, i);
_tokenIdCounter.increment();
}
}
function mintReserved(address[] memory addresses, uint8[] memory quantities)
public
whenNotPaused
onlyOwner
{
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory)
{
}
function revealCollection(string memory collectionUri, string memory contractUri) public onlyOwner {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
whenNotPaused
override(ERC721, ERC721Enumerable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
function setDates(uint32 _vipsaleStart, uint32 _presaleStart, uint32 _mintStart)
public
onlyOwner
{
}
}
| MerkleProof.verify(_merkleProof,PRESALE_MERKLEROOT,leaf),"Whitelist is required to mint at this time" | 398,117 | MerkleProof.verify(_merkleProof,PRESALE_MERKLEROOT,leaf) |
"VIP is required to mint at this time" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
/// @custom:security-contact [email protected]
contract TheNFTySetupErc721 is ERC721, ERC721Enumerable, Pausable, Ownable, ERC721Burnable {
using Counters for Counters.Counter;
using Strings for uint256;
Counters.Counter private _tokenIdCounter;
Counters.Counter private _reservedIdCounter;
uint8 public _reservedTokens;
uint32 public MAX_SUPPLY;
uint32 public VIPSALE_START;
uint64 public VIPSALE_MINT_PRICE;
uint8 public VIPSALE_MINT_LIMIT;
uint32 public PRESALE_START;
uint64 public PRESALE_MINT_PRICE;
uint8 public PRESALE_MINT_LIMIT;
uint32 public MINT_START;
uint64 public MINT_PRICE;
uint8 public MINT_LIMIT;
address payable public PAYMENT_ADDRESS;
bytes32 public VIPSALE_MERKLEROOT;
bytes32 public PRESALE_MERKLEROOT;
bool public COLLECTION_HIDDEN;
string public COLLECTION_BASE_URI;
string public CONTRACT_METADATA_URI;
constructor(address payable paymentAddress, uint32 vipsaleStart, uint32 presaleStart, uint32 mintStart) ERC721("Metamouse Clubhouse", "METACLUBHOUSE") {
}
function _baseURI() internal view override returns (string memory) {
}
function contractURI() public view returns (string memory) {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function setMerkleRoots(bytes32 vip, bytes32 presale)
public
onlyOwner
{
}
function mint(bytes32[] calldata _merkleProof, uint256 _mintQuantity)
public
payable
whenNotPaused
{
require(_mintQuantity > 0, "Quantity cannot be 0");
require(tx.origin == msg.sender, "Contracts are not allowed to mint this collection");
if (block.timestamp >= MINT_START) {
// Public sale
require(msg.value >= MINT_PRICE * _mintQuantity, "Insufficient funds submitted");
require(_mintQuantity <= MINT_LIMIT, "Quantity exceeds MINT_LIMIT");
} else if (block.timestamp >= PRESALE_START) {
// Presale
require(msg.value >= PRESALE_MINT_PRICE * _mintQuantity, "Insufficient funds submitted");
require(_mintQuantity <= PRESALE_MINT_LIMIT, "Quantity exceeds PRESALE_MINT_LIMIT");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(MerkleProof.verify(_merkleProof, PRESALE_MERKLEROOT, leaf), "Whitelist is required to mint at this time");
} else if (block.timestamp >= VIPSALE_START) {
// VIP Sale
require(msg.value >= VIPSALE_MINT_PRICE * _mintQuantity, "Insufficient funds submitted");
require(_mintQuantity <= VIPSALE_MINT_LIMIT, "Quantity exceeds PRESALE_MINT_LIMIT");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(<FILL_ME>)
} else {
revert("Sale is not active");
}
uint256 tokenId = _tokenIdCounter.current();
require(tokenId + _mintQuantity < MAX_SUPPLY, "Collection reached MAX_SUPPLY");
// All gates passed, transfer funds & mint token
PAYMENT_ADDRESS.transfer(msg.value);
for (uint256 i = tokenId; i < tokenId + _mintQuantity; i++) {
_safeMint(msg.sender, i);
_tokenIdCounter.increment();
}
}
function mintReserved(address[] memory addresses, uint8[] memory quantities)
public
whenNotPaused
onlyOwner
{
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory)
{
}
function revealCollection(string memory collectionUri, string memory contractUri) public onlyOwner {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
whenNotPaused
override(ERC721, ERC721Enumerable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
function setDates(uint32 _vipsaleStart, uint32 _presaleStart, uint32 _mintStart)
public
onlyOwner
{
}
}
| MerkleProof.verify(_merkleProof,VIPSALE_MERKLEROOT,leaf),"VIP is required to mint at this time" | 398,117 | MerkleProof.verify(_merkleProof,VIPSALE_MERKLEROOT,leaf) |
"Collection reached MAX_SUPPLY" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
/// @custom:security-contact [email protected]
contract TheNFTySetupErc721 is ERC721, ERC721Enumerable, Pausable, Ownable, ERC721Burnable {
using Counters for Counters.Counter;
using Strings for uint256;
Counters.Counter private _tokenIdCounter;
Counters.Counter private _reservedIdCounter;
uint8 public _reservedTokens;
uint32 public MAX_SUPPLY;
uint32 public VIPSALE_START;
uint64 public VIPSALE_MINT_PRICE;
uint8 public VIPSALE_MINT_LIMIT;
uint32 public PRESALE_START;
uint64 public PRESALE_MINT_PRICE;
uint8 public PRESALE_MINT_LIMIT;
uint32 public MINT_START;
uint64 public MINT_PRICE;
uint8 public MINT_LIMIT;
address payable public PAYMENT_ADDRESS;
bytes32 public VIPSALE_MERKLEROOT;
bytes32 public PRESALE_MERKLEROOT;
bool public COLLECTION_HIDDEN;
string public COLLECTION_BASE_URI;
string public CONTRACT_METADATA_URI;
constructor(address payable paymentAddress, uint32 vipsaleStart, uint32 presaleStart, uint32 mintStart) ERC721("Metamouse Clubhouse", "METACLUBHOUSE") {
}
function _baseURI() internal view override returns (string memory) {
}
function contractURI() public view returns (string memory) {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function setMerkleRoots(bytes32 vip, bytes32 presale)
public
onlyOwner
{
}
function mint(bytes32[] calldata _merkleProof, uint256 _mintQuantity)
public
payable
whenNotPaused
{
require(_mintQuantity > 0, "Quantity cannot be 0");
require(tx.origin == msg.sender, "Contracts are not allowed to mint this collection");
if (block.timestamp >= MINT_START) {
// Public sale
require(msg.value >= MINT_PRICE * _mintQuantity, "Insufficient funds submitted");
require(_mintQuantity <= MINT_LIMIT, "Quantity exceeds MINT_LIMIT");
} else if (block.timestamp >= PRESALE_START) {
// Presale
require(msg.value >= PRESALE_MINT_PRICE * _mintQuantity, "Insufficient funds submitted");
require(_mintQuantity <= PRESALE_MINT_LIMIT, "Quantity exceeds PRESALE_MINT_LIMIT");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(MerkleProof.verify(_merkleProof, PRESALE_MERKLEROOT, leaf), "Whitelist is required to mint at this time");
} else if (block.timestamp >= VIPSALE_START) {
// VIP Sale
require(msg.value >= VIPSALE_MINT_PRICE * _mintQuantity, "Insufficient funds submitted");
require(_mintQuantity <= VIPSALE_MINT_LIMIT, "Quantity exceeds PRESALE_MINT_LIMIT");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(MerkleProof.verify(_merkleProof, VIPSALE_MERKLEROOT, leaf), "VIP is required to mint at this time");
} else {
revert("Sale is not active");
}
uint256 tokenId = _tokenIdCounter.current();
require(<FILL_ME>)
// All gates passed, transfer funds & mint token
PAYMENT_ADDRESS.transfer(msg.value);
for (uint256 i = tokenId; i < tokenId + _mintQuantity; i++) {
_safeMint(msg.sender, i);
_tokenIdCounter.increment();
}
}
function mintReserved(address[] memory addresses, uint8[] memory quantities)
public
whenNotPaused
onlyOwner
{
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory)
{
}
function revealCollection(string memory collectionUri, string memory contractUri) public onlyOwner {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
whenNotPaused
override(ERC721, ERC721Enumerable)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
function setDates(uint32 _vipsaleStart, uint32 _presaleStart, uint32 _mintStart)
public
onlyOwner
{
}
}
| tokenId+_mintQuantity<MAX_SUPPLY,"Collection reached MAX_SUPPLY" | 398,117 | tokenId+_mintQuantity<MAX_SUPPLY |
"ERC1363: _checkAndCallTransfer reverts" | pragma solidity 0.6.6;
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);
}
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 {
}
}
contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
constructor (string memory name, string memory symbol) 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 allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
}
function _mint(address account, uint256 amount) internal virtual {
}
function _burn(address account, uint256 amount) internal virtual {
}
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
function _setupDecimals(uint8 decimals_) internal {
}
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}
abstract contract ERC20Capped is ERC20 {
uint256 private _cap;
constructor (uint256 cap) public {
}
function cap() public view returns (uint256) {
}
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override {
}
}
abstract contract ERC20Burnable is Context, ERC20 {
function burn(uint256 amount) public virtual {
}
function burnFrom(address account, uint256 amount) public virtual {
}
}
interface IERC165 {
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
interface IERC1363 is IERC20, IERC165 {
function transferAndCall(address to, uint256 value) external returns (bool);
function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);
function transferFromAndCall(address from, address to, uint256 value) external returns (bool);
function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);
function approveAndCall(address spender, uint256 value) external returns (bool);
function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);
}
interface IERC1363Receiver {
function onTransferReceived(address operator, address from, uint256 value, bytes calldata data) external returns (bytes4);
}
interface IERC1363Spender {
function onApprovalReceived(address owner, uint256 value, bytes calldata data) external returns (bytes4);
}
library ERC165Checker {
bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff;
bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;
function supportsERC165(address account) internal view returns (bool) {
}
function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) {
}
function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) {
}
function _supportsERC165Interface(address account, bytes4 interfaceId) private view returns (bool) {
}
function _callERC165SupportsInterface(address account, bytes4 interfaceId)
private
view
returns (bool, bool)
{
}
}
contract ERC165 is IERC165 {
bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;
mapping(bytes4 => bool) private _supportedInterfaces;
constructor () internal {
}
function supportsInterface(bytes4 interfaceId) public view override returns (bool) {
}
function _registerInterface(bytes4 interfaceId) internal virtual {
}
}
contract ERC1363 is ERC20, IERC1363, ERC165 {
using Address for address;
bytes4 internal constant _INTERFACE_ID_ERC1363_TRANSFER = 0x4bbee2df;
bytes4 internal constant _INTERFACE_ID_ERC1363_APPROVE = 0xfb9ec8ce;
bytes4 private constant _ERC1363_RECEIVED = 0x88a7ca5c;
bytes4 private constant _ERC1363_APPROVED = 0x7b04a2d0;
constructor (
string memory name,
string memory symbol
) public payable ERC20(name, symbol) {
}
function transferAndCall(address to, uint256 value) public override returns (bool) {
}
function transferAndCall(address to, uint256 value, bytes memory data) public override returns (bool) {
transfer(to, value);
require(<FILL_ME>)
return true;
}
function transferFromAndCall(address from, address to, uint256 value) public override returns (bool) {
}
function transferFromAndCall(address from, address to, uint256 value, bytes memory data) public override returns (bool) {
}
function approveAndCall(address spender, uint256 value) public override returns (bool) {
}
function approveAndCall(address spender, uint256 value, bytes memory data) public override returns (bool) {
}
function _checkAndCallTransfer(address from, address to, uint256 value, bytes memory data) internal returns (bool) {
}
function _checkAndCallApprove(address spender, uint256 value, bytes memory data) internal returns (bool) {
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () internal {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
contract TokenRecover is Ownable {
function recoverERC20(address tokenAddress, uint256 tokenAmount) public onlyOwner {
}
}
library EnumerableSet {
struct Set {
bytes32[] _values;
mapping (bytes32 => uint256) _indexes;
}
function _add(Set storage set, bytes32 value) private returns (bool) {
}
function _remove(Set storage set, bytes32 value) private returns (bool) {
}
function _contains(Set storage set, bytes32 value) private view returns (bool) {
}
function _length(Set storage set) private view returns (uint256) {
}
function _at(Set storage set, uint256 index) private view returns (bytes32) {
}
struct AddressSet {
Set _inner;
}
function add(AddressSet storage set, address value) internal returns (bool) {
}
function remove(AddressSet storage set, address value) internal returns (bool) {
}
function contains(AddressSet storage set, address value) internal view returns (bool) {
}
function length(AddressSet storage set) internal view returns (uint256) {
}
function at(AddressSet storage set, uint256 index) internal view returns (address) {
}
struct UintSet {
Set _inner;
}
function add(UintSet storage set, uint256 value) internal returns (bool) {
}
function remove(UintSet storage set, uint256 value) internal returns (bool) {
}
function contains(UintSet storage set, uint256 value) internal view returns (bool) {
}
function length(UintSet storage set) internal view returns (uint256) {
}
function at(UintSet storage set, uint256 index) internal view returns (uint256) {
}
}
abstract contract AccessControl is Context {
using EnumerableSet for EnumerableSet.AddressSet;
using Address for address;
struct RoleData {
EnumerableSet.AddressSet members;
bytes32 adminRole;
}
mapping (bytes32 => RoleData) private _roles;
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
function hasRole(bytes32 role, address account) public view returns (bool) {
}
function getRoleMemberCount(bytes32 role) public view returns (uint256) {
}
function getRoleMember(bytes32 role, uint256 index) public view returns (address) {
}
function getRoleAdmin(bytes32 role) public view returns (bytes32) {
}
function grantRole(bytes32 role, address account) public virtual {
}
function revokeRole(bytes32 role, address account) public virtual {
}
function renounceRole(bytes32 role, address account) public virtual {
}
function _setupRole(bytes32 role, address account) internal virtual {
}
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
}
function _grantRole(bytes32 role, address account) private {
}
function _revokeRole(bytes32 role, address account) private {
}
}
contract Roles is AccessControl {
bytes32 public constant MINTER_ROLE = keccak256("MINTER");
bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR");
constructor () public {
}
modifier onlyMinter() {
}
modifier onlyOperator() {
}
}
contract IDAToken is ERC20Capped, ERC20Burnable, ERC1363, Roles, TokenRecover {
bool private _mintingFinished = false;
bool private _transferEnabled = true;
event MintFinished();
event TransferEnabled();
modifier canMint() {
}
modifier canTransfer(address from) {
}
constructor(string memory name, string memory symbol, uint8 decimals, uint256 cap, uint256 initialSupply,
bool transferEnabled, bool mintingFinished)
public
ERC20Capped(cap)
ERC1363(name, symbol)
{
}
function mintingFinished() public view returns (bool) {
}
function transferEnabled() public view returns (bool) {
}
function mint(address to, uint256 value) public canMint onlyMinter {
}
function transfer(address to, uint256 value) public virtual override(ERC20) canTransfer(_msgSender()) returns (bool) {
}
function transferFrom(address from, address to, uint256 value) public virtual override(ERC20) canTransfer(from) returns (bool) {
}
function finishMinting() public canMint onlyOwner {
}
function enableTransfer() public onlyOwner {
}
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override(ERC20, ERC20Capped) {
}
}
| _checkAndCallTransfer(_msgSender(),to,value,data),"ERC1363: _checkAndCallTransfer reverts" | 398,140 | _checkAndCallTransfer(_msgSender(),to,value,data) |
null | pragma solidity ^0.4.18;
/* ==================================================================== */
/* Copyright (c) 2018 The MagicAcademy Project. All rights reserved.
/*
/* https://www.magicacademy.io One of the world's first idle strategy games of blockchain
/*
/* authors [email protected]/[email protected]
/*
/* ==================================================================== */
/**
* @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 {
}
}
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
interface CardsInterface {
function getJadeProduction(address player) external constant returns (uint256);
function getUpgradeValue(address player, uint256 upgradeClass, uint256 unitId, uint256 upgradeValue) external view returns (uint256);
function getGameStarted() external constant returns (bool);
function balanceOf(address player) external constant returns(uint256);
function balanceOfUnclaimed(address player) external constant returns (uint256);
function coinBalanceOf(address player,uint8 itype) external constant returns(uint256);
function setCoinBalance(address player, uint256 eth, uint8 itype, bool iflag) external;
function setJadeCoin(address player, uint256 coin, bool iflag) external;
function setJadeCoinZero(address player) external;
function setLastJadeSaveTime(address player) external;
function setRoughSupply(uint256 iroughSupply) external;
function updatePlayersCoinByPurchase(address player, uint256 purchaseCost) external;
function updatePlayersCoinByOut(address player) external;
function increasePlayersJadeProduction(address player, uint256 increase) external;
function reducePlayersJadeProduction(address player, uint256 decrease) external;
function getUintsOwnerCount(address _address) external view returns (uint256);
function setUintsOwnerCount(address _address, uint256 amount, bool iflag) external;
function getOwnedCount(address player, uint256 cardId) external view returns (uint256);
function setOwnedCount(address player, uint256 cardId, uint256 amount, bool iflag) external;
function getUpgradesOwned(address player, uint256 upgradeId) external view returns (uint256);
function setUpgradesOwned(address player, uint256 upgradeId) external;
function getTotalEtherPool(uint8 itype) external view returns (uint256);
function setTotalEtherPool(uint256 inEth, uint8 itype, bool iflag) external;
function setNextSnapshotTime(uint256 iTime) external;
function getNextSnapshotTime() external view;
function AddPlayers(address _address) external;
function getTotalUsers() external view returns (uint256);
function getRanking() external view returns (address[] addr, uint256[] _arr);
function getAttackRanking() external view returns (address[] addr, uint256[] _arr);
function getUnitsProduction(address player, uint256 cardId, uint256 amount) external constant returns (uint256);
function getUnitCoinProductionIncreases(address _address, uint256 cardId) external view returns (uint256);
function setUnitCoinProductionIncreases(address _address, uint256 cardId, uint256 iValue,bool iflag) external;
function getUnitCoinProductionMultiplier(address _address, uint256 cardId) external view returns (uint256);
function setUnitCoinProductionMultiplier(address _address, uint256 cardId, uint256 iValue,bool iflag) external;
function setUnitAttackIncreases(address _address, uint256 cardId, uint256 iValue,bool iflag) external;
function setUnitAttackMultiplier(address _address, uint256 cardId, uint256 iValue,bool iflag) external;
function setUnitDefenseIncreases(address _address, uint256 cardId, uint256 iValue,bool iflag) external;
function setunitDefenseMultiplier(address _address, uint256 cardId, uint256 iValue,bool iflag) external;
function setUnitJadeStealingIncreases(address _address, uint256 cardId, uint256 iValue,bool iflag) external;
function setUnitJadeStealingMultiplier(address _address, uint256 cardId, uint256 iValue,bool iflag) external;
function setUintCoinProduction(address _address, uint256 cardId, uint256 iValue,bool iflag) external;
function getUintCoinProduction(address _address, uint256 cardId) external returns (uint256);
function getUnitsInProduction(address player, uint256 unitId, uint256 amount) external constant returns (uint256);
function getPlayersBattleStats(address player) public constant returns (
uint256 attackingPower,
uint256 defendingPower,
uint256 stealingPower,
uint256 battlePower);
}
interface GameConfigInterface {
function getMaxCAP() external returns (uint256);
function unitCoinProduction(uint256 cardId) external constant returns (uint256);
function unitPLATCost(uint256 cardId) external constant returns (uint256);
function getCostForCards(uint256 cardId, uint256 existing, uint256 amount) external constant returns (uint256);
function getCostForBattleCards(uint256 cardId, uint256 existing, uint256 amount) external constant returns (uint256);
function unitBattlePLATCost(uint256 cardId) external constant returns (uint256);
function getUpgradeCardsInfo(uint256 upgradecardId,uint256 existing) external constant returns (
uint256 coinCost,
uint256 ethCost,
uint256 upgradeClass,
uint256 cardId,
uint256 upgradeValue,
uint256 platCost
);
function getCardInfo(uint256 cardId, uint256 existing, uint256 amount) external constant returns (uint256, uint256, uint256, uint256, bool);
function getBattleCardInfo(uint256 cardId, uint256 existing, uint256 amount) external constant returns (uint256, uint256, uint256, bool);
}
interface RareInterface {
function getRareItemsOwner(uint256 rareId) external view returns (address);
function getRareItemsPrice(uint256 rareId) external view returns (uint256);
function getRareItemsPLATPrice(uint256 rareId) external view returns (uint256);
function getRarePLATInfo(uint256 _tokenId) external view returns (
uint256 sellingPrice,
address owner,
uint256 nextPrice,
uint256 rareClass,
uint256 cardId,
uint256 rareValue
);
function transferToken(address _from, address _to, uint256 _tokenId) external;
function setRarePrice(uint256 _rareId, uint256 _price) external;
}
contract BitGuildHelper is Ownable {
//data contract
CardsInterface public cards ;
GameConfigInterface public schema;
RareInterface public rare;
function setCardsAddress(address _address) external onlyOwner {
}
//normal cards
function setConfigAddress(address _address) external onlyOwner {
}
//rare cards
function setRareAddress(address _address) external onlyOwner {
}
/// add multiplier
function upgradeUnitMultipliers(address player, uint256 upgradeClass, uint256 unitId, uint256 upgradeValue) internal {
}
/// move multipliers
function removeUnitMultipliers(address player, uint256 upgradeClass, uint256 unitId, uint256 upgradeValue) internal {
}
}
interface BitGuildTokenInterface { // implements ERC20Interface
function totalSupply() public constant returns (uint);
function balanceOf(address tokenOwner) public constant returns (uint balance);
function allowance(address tokenOwner, address spender) public constant returns (uint remaining);
function transfer(address to, uint tokens) public returns (bool success);
function approve(address spender, uint tokens) public returns (bool success);
function transferFrom(address from, address to, uint tokens) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}
/// @notice Purchase on BitGuild
contract BitGuildTrade is BitGuildHelper {
BitGuildTokenInterface public tokenContract;
event UnitBought(address player, uint256 unitId, uint256 amount);
event UpgradeCardBought(address player, uint256 upgradeId);
event BuyRareCard(address player, address previous, uint256 rareId,uint256 iPrice);
event UnitSold(address player, uint256 unitId, uint256 amount);
mapping(address => mapping(uint256 => uint256)) unitsOwnedOfPLAT; //cards bought through plat
function() external payable {
}
function setBitGuildToken(address _tokenContract) external {
}
function kill() public onlyOwner {
}
/// @notice Returns all the relevant information about a specific tokenId.
/// val1:flag,val2:id,val3:amount
function _getExtraParam(bytes _extraData) private pure returns(uint256 val1,uint256 val2,uint256 val3) {
}
function receiveApproval(address _player, uint256 _value, address _tokenContractAddr, bytes _extraData) external {
require(msg.sender == _tokenContractAddr);
require(_extraData.length >=1);
require(<FILL_ME>)
uint256 flag;
uint256 unitId;
uint256 amount;
(flag,unitId,amount) = _getExtraParam(_extraData);
if (flag==1) {
buyPLATCards(_player, _value, unitId, amount); // 1-39
} else if (flag==3) {
buyUpgradeCard(_player, _value, unitId); // >=1
} else if (flag==4) {
buyRareItem(_player, _value, unitId); //rarecard
}
}
function buyPLATCards(address _player, uint256 _platValue, uint256 _cardId, uint256 _amount) internal {
}
/// upgrade cards-- jade + plat
function buyUpgradeCard(address _player, uint256 _platValue,uint256 _upgradeId) internal {
}
// Allows someone to send ether and obtain the token
function buyRareItem(address _player, uint256 _platValue,uint256 _rareId) internal {
}
/// refunds 75% since no transfer between bitguild and player,no need to call approveAndCall
function sellCards( uint256 _unitId, uint256 _amount) external {
}
//@notice for player withdraw
function withdrawEtherFromTrade(uint256 amount) external {
}
//@notice withraw all PLAT by dev
function withdrawToken(uint256 amount) external onlyOwner {
}
function getCanSellUnit(address _address, uint256 unitId) external view returns (uint256) {
}
}
| tokenContract.transferFrom(_player,address(this),_value) | 398,149 | tokenContract.transferFrom(_player,address(this),_value) |
null | pragma solidity ^0.4.18;
/* ==================================================================== */
/* Copyright (c) 2018 The MagicAcademy Project. All rights reserved.
/*
/* https://www.magicacademy.io One of the world's first idle strategy games of blockchain
/*
/* authors [email protected]/[email protected]
/*
/* ==================================================================== */
/**
* @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 {
}
}
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
interface CardsInterface {
function getJadeProduction(address player) external constant returns (uint256);
function getUpgradeValue(address player, uint256 upgradeClass, uint256 unitId, uint256 upgradeValue) external view returns (uint256);
function getGameStarted() external constant returns (bool);
function balanceOf(address player) external constant returns(uint256);
function balanceOfUnclaimed(address player) external constant returns (uint256);
function coinBalanceOf(address player,uint8 itype) external constant returns(uint256);
function setCoinBalance(address player, uint256 eth, uint8 itype, bool iflag) external;
function setJadeCoin(address player, uint256 coin, bool iflag) external;
function setJadeCoinZero(address player) external;
function setLastJadeSaveTime(address player) external;
function setRoughSupply(uint256 iroughSupply) external;
function updatePlayersCoinByPurchase(address player, uint256 purchaseCost) external;
function updatePlayersCoinByOut(address player) external;
function increasePlayersJadeProduction(address player, uint256 increase) external;
function reducePlayersJadeProduction(address player, uint256 decrease) external;
function getUintsOwnerCount(address _address) external view returns (uint256);
function setUintsOwnerCount(address _address, uint256 amount, bool iflag) external;
function getOwnedCount(address player, uint256 cardId) external view returns (uint256);
function setOwnedCount(address player, uint256 cardId, uint256 amount, bool iflag) external;
function getUpgradesOwned(address player, uint256 upgradeId) external view returns (uint256);
function setUpgradesOwned(address player, uint256 upgradeId) external;
function getTotalEtherPool(uint8 itype) external view returns (uint256);
function setTotalEtherPool(uint256 inEth, uint8 itype, bool iflag) external;
function setNextSnapshotTime(uint256 iTime) external;
function getNextSnapshotTime() external view;
function AddPlayers(address _address) external;
function getTotalUsers() external view returns (uint256);
function getRanking() external view returns (address[] addr, uint256[] _arr);
function getAttackRanking() external view returns (address[] addr, uint256[] _arr);
function getUnitsProduction(address player, uint256 cardId, uint256 amount) external constant returns (uint256);
function getUnitCoinProductionIncreases(address _address, uint256 cardId) external view returns (uint256);
function setUnitCoinProductionIncreases(address _address, uint256 cardId, uint256 iValue,bool iflag) external;
function getUnitCoinProductionMultiplier(address _address, uint256 cardId) external view returns (uint256);
function setUnitCoinProductionMultiplier(address _address, uint256 cardId, uint256 iValue,bool iflag) external;
function setUnitAttackIncreases(address _address, uint256 cardId, uint256 iValue,bool iflag) external;
function setUnitAttackMultiplier(address _address, uint256 cardId, uint256 iValue,bool iflag) external;
function setUnitDefenseIncreases(address _address, uint256 cardId, uint256 iValue,bool iflag) external;
function setunitDefenseMultiplier(address _address, uint256 cardId, uint256 iValue,bool iflag) external;
function setUnitJadeStealingIncreases(address _address, uint256 cardId, uint256 iValue,bool iflag) external;
function setUnitJadeStealingMultiplier(address _address, uint256 cardId, uint256 iValue,bool iflag) external;
function setUintCoinProduction(address _address, uint256 cardId, uint256 iValue,bool iflag) external;
function getUintCoinProduction(address _address, uint256 cardId) external returns (uint256);
function getUnitsInProduction(address player, uint256 unitId, uint256 amount) external constant returns (uint256);
function getPlayersBattleStats(address player) public constant returns (
uint256 attackingPower,
uint256 defendingPower,
uint256 stealingPower,
uint256 battlePower);
}
interface GameConfigInterface {
function getMaxCAP() external returns (uint256);
function unitCoinProduction(uint256 cardId) external constant returns (uint256);
function unitPLATCost(uint256 cardId) external constant returns (uint256);
function getCostForCards(uint256 cardId, uint256 existing, uint256 amount) external constant returns (uint256);
function getCostForBattleCards(uint256 cardId, uint256 existing, uint256 amount) external constant returns (uint256);
function unitBattlePLATCost(uint256 cardId) external constant returns (uint256);
function getUpgradeCardsInfo(uint256 upgradecardId,uint256 existing) external constant returns (
uint256 coinCost,
uint256 ethCost,
uint256 upgradeClass,
uint256 cardId,
uint256 upgradeValue,
uint256 platCost
);
function getCardInfo(uint256 cardId, uint256 existing, uint256 amount) external constant returns (uint256, uint256, uint256, uint256, bool);
function getBattleCardInfo(uint256 cardId, uint256 existing, uint256 amount) external constant returns (uint256, uint256, uint256, bool);
}
interface RareInterface {
function getRareItemsOwner(uint256 rareId) external view returns (address);
function getRareItemsPrice(uint256 rareId) external view returns (uint256);
function getRareItemsPLATPrice(uint256 rareId) external view returns (uint256);
function getRarePLATInfo(uint256 _tokenId) external view returns (
uint256 sellingPrice,
address owner,
uint256 nextPrice,
uint256 rareClass,
uint256 cardId,
uint256 rareValue
);
function transferToken(address _from, address _to, uint256 _tokenId) external;
function setRarePrice(uint256 _rareId, uint256 _price) external;
}
contract BitGuildHelper is Ownable {
//data contract
CardsInterface public cards ;
GameConfigInterface public schema;
RareInterface public rare;
function setCardsAddress(address _address) external onlyOwner {
}
//normal cards
function setConfigAddress(address _address) external onlyOwner {
}
//rare cards
function setRareAddress(address _address) external onlyOwner {
}
/// add multiplier
function upgradeUnitMultipliers(address player, uint256 upgradeClass, uint256 unitId, uint256 upgradeValue) internal {
}
/// move multipliers
function removeUnitMultipliers(address player, uint256 upgradeClass, uint256 unitId, uint256 upgradeValue) internal {
}
}
interface BitGuildTokenInterface { // implements ERC20Interface
function totalSupply() public constant returns (uint);
function balanceOf(address tokenOwner) public constant returns (uint balance);
function allowance(address tokenOwner, address spender) public constant returns (uint remaining);
function transfer(address to, uint tokens) public returns (bool success);
function approve(address spender, uint tokens) public returns (bool success);
function transferFrom(address from, address to, uint tokens) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}
/// @notice Purchase on BitGuild
contract BitGuildTrade is BitGuildHelper {
BitGuildTokenInterface public tokenContract;
event UnitBought(address player, uint256 unitId, uint256 amount);
event UpgradeCardBought(address player, uint256 upgradeId);
event BuyRareCard(address player, address previous, uint256 rareId,uint256 iPrice);
event UnitSold(address player, uint256 unitId, uint256 amount);
mapping(address => mapping(uint256 => uint256)) unitsOwnedOfPLAT; //cards bought through plat
function() external payable {
}
function setBitGuildToken(address _tokenContract) external {
}
function kill() public onlyOwner {
}
/// @notice Returns all the relevant information about a specific tokenId.
/// val1:flag,val2:id,val3:amount
function _getExtraParam(bytes _extraData) private pure returns(uint256 val1,uint256 val2,uint256 val3) {
}
function receiveApproval(address _player, uint256 _value, address _tokenContractAddr, bytes _extraData) external {
}
function buyPLATCards(address _player, uint256 _platValue, uint256 _cardId, uint256 _amount) internal {
require(<FILL_ME>)
require(_amount>=1);
uint256 existing = cards.getOwnedCount(_player,_cardId);
require(existing < schema.getMaxCAP());
uint256 iAmount;
if (SafeMath.add(existing, _amount) > schema.getMaxCAP()) {
iAmount = SafeMath.sub(schema.getMaxCAP(),existing);
} else {
iAmount = _amount;
}
uint256 coinProduction;
uint256 coinCost;
uint256 ethCost;
if (_cardId>=1 && _cardId<=39) {
coinProduction = schema.unitCoinProduction(_cardId);
coinCost = schema.getCostForCards(_cardId, existing, iAmount);
ethCost = SafeMath.mul(schema.unitPLATCost(_cardId),iAmount); // get platprice
} else if (_cardId>=40) {
coinCost = schema.getCostForBattleCards(_cardId, existing, iAmount);
ethCost = SafeMath.mul(schema.unitBattlePLATCost(_cardId),iAmount); // get platprice
}
require(ethCost>0);
require(SafeMath.add(cards.coinBalanceOf(_player,1),_platValue) >= ethCost);
require(cards.balanceOf(_player) >= coinCost);
// Update players jade
cards.updatePlayersCoinByPurchase(_player, coinCost);
if (ethCost > _platValue) {
cards.setCoinBalance(_player,SafeMath.sub(ethCost,_platValue),1,false);
} else if (_platValue > ethCost) {
// Store overbid in their balance
cards.setCoinBalance(_player,SafeMath.sub(_platValue,ethCost),1,true);
}
uint256 devFund = uint256(SafeMath.div(ethCost,20)); // 5% fee
cards.setTotalEtherPool(uint256(SafeMath.div(ethCost,4)),1,true); // 20% to pool
cards.setCoinBalance(owner,devFund,1,true);
if (coinProduction > 0) {
cards.increasePlayersJadeProduction(_player, cards.getUnitsProduction(_player, _cardId, iAmount));
cards.setUintCoinProduction(_player,_cardId,cards.getUnitsProduction(_player, _cardId, iAmount),true);
}
if (cards.getUintsOwnerCount(_player)<=0) {
cards.AddPlayers(_player);
}
cards.setUintsOwnerCount(_player,iAmount, true);
cards.setOwnedCount(_player,_cardId,iAmount,true);
unitsOwnedOfPLAT[_player][_cardId] = SafeMath.add(unitsOwnedOfPLAT[_player][_cardId],iAmount);
//event
UnitBought(_player, _cardId, iAmount);
}
/// upgrade cards-- jade + plat
function buyUpgradeCard(address _player, uint256 _platValue,uint256 _upgradeId) internal {
}
// Allows someone to send ether and obtain the token
function buyRareItem(address _player, uint256 _platValue,uint256 _rareId) internal {
}
/// refunds 75% since no transfer between bitguild and player,no need to call approveAndCall
function sellCards( uint256 _unitId, uint256 _amount) external {
}
//@notice for player withdraw
function withdrawEtherFromTrade(uint256 amount) external {
}
//@notice withraw all PLAT by dev
function withdrawToken(uint256 amount) external onlyOwner {
}
function getCanSellUnit(address _address, uint256 unitId) external view returns (uint256) {
}
}
| cards.getGameStarted() | 398,149 | cards.getGameStarted() |
null | pragma solidity ^0.4.18;
/* ==================================================================== */
/* Copyright (c) 2018 The MagicAcademy Project. All rights reserved.
/*
/* https://www.magicacademy.io One of the world's first idle strategy games of blockchain
/*
/* authors [email protected]/[email protected]
/*
/* ==================================================================== */
/**
* @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 {
}
}
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
interface CardsInterface {
function getJadeProduction(address player) external constant returns (uint256);
function getUpgradeValue(address player, uint256 upgradeClass, uint256 unitId, uint256 upgradeValue) external view returns (uint256);
function getGameStarted() external constant returns (bool);
function balanceOf(address player) external constant returns(uint256);
function balanceOfUnclaimed(address player) external constant returns (uint256);
function coinBalanceOf(address player,uint8 itype) external constant returns(uint256);
function setCoinBalance(address player, uint256 eth, uint8 itype, bool iflag) external;
function setJadeCoin(address player, uint256 coin, bool iflag) external;
function setJadeCoinZero(address player) external;
function setLastJadeSaveTime(address player) external;
function setRoughSupply(uint256 iroughSupply) external;
function updatePlayersCoinByPurchase(address player, uint256 purchaseCost) external;
function updatePlayersCoinByOut(address player) external;
function increasePlayersJadeProduction(address player, uint256 increase) external;
function reducePlayersJadeProduction(address player, uint256 decrease) external;
function getUintsOwnerCount(address _address) external view returns (uint256);
function setUintsOwnerCount(address _address, uint256 amount, bool iflag) external;
function getOwnedCount(address player, uint256 cardId) external view returns (uint256);
function setOwnedCount(address player, uint256 cardId, uint256 amount, bool iflag) external;
function getUpgradesOwned(address player, uint256 upgradeId) external view returns (uint256);
function setUpgradesOwned(address player, uint256 upgradeId) external;
function getTotalEtherPool(uint8 itype) external view returns (uint256);
function setTotalEtherPool(uint256 inEth, uint8 itype, bool iflag) external;
function setNextSnapshotTime(uint256 iTime) external;
function getNextSnapshotTime() external view;
function AddPlayers(address _address) external;
function getTotalUsers() external view returns (uint256);
function getRanking() external view returns (address[] addr, uint256[] _arr);
function getAttackRanking() external view returns (address[] addr, uint256[] _arr);
function getUnitsProduction(address player, uint256 cardId, uint256 amount) external constant returns (uint256);
function getUnitCoinProductionIncreases(address _address, uint256 cardId) external view returns (uint256);
function setUnitCoinProductionIncreases(address _address, uint256 cardId, uint256 iValue,bool iflag) external;
function getUnitCoinProductionMultiplier(address _address, uint256 cardId) external view returns (uint256);
function setUnitCoinProductionMultiplier(address _address, uint256 cardId, uint256 iValue,bool iflag) external;
function setUnitAttackIncreases(address _address, uint256 cardId, uint256 iValue,bool iflag) external;
function setUnitAttackMultiplier(address _address, uint256 cardId, uint256 iValue,bool iflag) external;
function setUnitDefenseIncreases(address _address, uint256 cardId, uint256 iValue,bool iflag) external;
function setunitDefenseMultiplier(address _address, uint256 cardId, uint256 iValue,bool iflag) external;
function setUnitJadeStealingIncreases(address _address, uint256 cardId, uint256 iValue,bool iflag) external;
function setUnitJadeStealingMultiplier(address _address, uint256 cardId, uint256 iValue,bool iflag) external;
function setUintCoinProduction(address _address, uint256 cardId, uint256 iValue,bool iflag) external;
function getUintCoinProduction(address _address, uint256 cardId) external returns (uint256);
function getUnitsInProduction(address player, uint256 unitId, uint256 amount) external constant returns (uint256);
function getPlayersBattleStats(address player) public constant returns (
uint256 attackingPower,
uint256 defendingPower,
uint256 stealingPower,
uint256 battlePower);
}
interface GameConfigInterface {
function getMaxCAP() external returns (uint256);
function unitCoinProduction(uint256 cardId) external constant returns (uint256);
function unitPLATCost(uint256 cardId) external constant returns (uint256);
function getCostForCards(uint256 cardId, uint256 existing, uint256 amount) external constant returns (uint256);
function getCostForBattleCards(uint256 cardId, uint256 existing, uint256 amount) external constant returns (uint256);
function unitBattlePLATCost(uint256 cardId) external constant returns (uint256);
function getUpgradeCardsInfo(uint256 upgradecardId,uint256 existing) external constant returns (
uint256 coinCost,
uint256 ethCost,
uint256 upgradeClass,
uint256 cardId,
uint256 upgradeValue,
uint256 platCost
);
function getCardInfo(uint256 cardId, uint256 existing, uint256 amount) external constant returns (uint256, uint256, uint256, uint256, bool);
function getBattleCardInfo(uint256 cardId, uint256 existing, uint256 amount) external constant returns (uint256, uint256, uint256, bool);
}
interface RareInterface {
function getRareItemsOwner(uint256 rareId) external view returns (address);
function getRareItemsPrice(uint256 rareId) external view returns (uint256);
function getRareItemsPLATPrice(uint256 rareId) external view returns (uint256);
function getRarePLATInfo(uint256 _tokenId) external view returns (
uint256 sellingPrice,
address owner,
uint256 nextPrice,
uint256 rareClass,
uint256 cardId,
uint256 rareValue
);
function transferToken(address _from, address _to, uint256 _tokenId) external;
function setRarePrice(uint256 _rareId, uint256 _price) external;
}
contract BitGuildHelper is Ownable {
//data contract
CardsInterface public cards ;
GameConfigInterface public schema;
RareInterface public rare;
function setCardsAddress(address _address) external onlyOwner {
}
//normal cards
function setConfigAddress(address _address) external onlyOwner {
}
//rare cards
function setRareAddress(address _address) external onlyOwner {
}
/// add multiplier
function upgradeUnitMultipliers(address player, uint256 upgradeClass, uint256 unitId, uint256 upgradeValue) internal {
}
/// move multipliers
function removeUnitMultipliers(address player, uint256 upgradeClass, uint256 unitId, uint256 upgradeValue) internal {
}
}
interface BitGuildTokenInterface { // implements ERC20Interface
function totalSupply() public constant returns (uint);
function balanceOf(address tokenOwner) public constant returns (uint balance);
function allowance(address tokenOwner, address spender) public constant returns (uint remaining);
function transfer(address to, uint tokens) public returns (bool success);
function approve(address spender, uint tokens) public returns (bool success);
function transferFrom(address from, address to, uint tokens) public returns (bool success);
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}
/// @notice Purchase on BitGuild
contract BitGuildTrade is BitGuildHelper {
BitGuildTokenInterface public tokenContract;
event UnitBought(address player, uint256 unitId, uint256 amount);
event UpgradeCardBought(address player, uint256 upgradeId);
event BuyRareCard(address player, address previous, uint256 rareId,uint256 iPrice);
event UnitSold(address player, uint256 unitId, uint256 amount);
mapping(address => mapping(uint256 => uint256)) unitsOwnedOfPLAT; //cards bought through plat
function() external payable {
}
function setBitGuildToken(address _tokenContract) external {
}
function kill() public onlyOwner {
}
/// @notice Returns all the relevant information about a specific tokenId.
/// val1:flag,val2:id,val3:amount
function _getExtraParam(bytes _extraData) private pure returns(uint256 val1,uint256 val2,uint256 val3) {
}
function receiveApproval(address _player, uint256 _value, address _tokenContractAddr, bytes _extraData) external {
}
function buyPLATCards(address _player, uint256 _platValue, uint256 _cardId, uint256 _amount) internal {
require(cards.getGameStarted());
require(_amount>=1);
uint256 existing = cards.getOwnedCount(_player,_cardId);
require(existing < schema.getMaxCAP());
uint256 iAmount;
if (SafeMath.add(existing, _amount) > schema.getMaxCAP()) {
iAmount = SafeMath.sub(schema.getMaxCAP(),existing);
} else {
iAmount = _amount;
}
uint256 coinProduction;
uint256 coinCost;
uint256 ethCost;
if (_cardId>=1 && _cardId<=39) {
coinProduction = schema.unitCoinProduction(_cardId);
coinCost = schema.getCostForCards(_cardId, existing, iAmount);
ethCost = SafeMath.mul(schema.unitPLATCost(_cardId),iAmount); // get platprice
} else if (_cardId>=40) {
coinCost = schema.getCostForBattleCards(_cardId, existing, iAmount);
ethCost = SafeMath.mul(schema.unitBattlePLATCost(_cardId),iAmount); // get platprice
}
require(ethCost>0);
require(<FILL_ME>)
require(cards.balanceOf(_player) >= coinCost);
// Update players jade
cards.updatePlayersCoinByPurchase(_player, coinCost);
if (ethCost > _platValue) {
cards.setCoinBalance(_player,SafeMath.sub(ethCost,_platValue),1,false);
} else if (_platValue > ethCost) {
// Store overbid in their balance
cards.setCoinBalance(_player,SafeMath.sub(_platValue,ethCost),1,true);
}
uint256 devFund = uint256(SafeMath.div(ethCost,20)); // 5% fee
cards.setTotalEtherPool(uint256(SafeMath.div(ethCost,4)),1,true); // 20% to pool
cards.setCoinBalance(owner,devFund,1,true);
if (coinProduction > 0) {
cards.increasePlayersJadeProduction(_player, cards.getUnitsProduction(_player, _cardId, iAmount));
cards.setUintCoinProduction(_player,_cardId,cards.getUnitsProduction(_player, _cardId, iAmount),true);
}
if (cards.getUintsOwnerCount(_player)<=0) {
cards.AddPlayers(_player);
}
cards.setUintsOwnerCount(_player,iAmount, true);
cards.setOwnedCount(_player,_cardId,iAmount,true);
unitsOwnedOfPLAT[_player][_cardId] = SafeMath.add(unitsOwnedOfPLAT[_player][_cardId],iAmount);
//event
UnitBought(_player, _cardId, iAmount);
}
/// upgrade cards-- jade + plat
function buyUpgradeCard(address _player, uint256 _platValue,uint256 _upgradeId) internal {
}
// Allows someone to send ether and obtain the token
function buyRareItem(address _player, uint256 _platValue,uint256 _rareId) internal {
}
/// refunds 75% since no transfer between bitguild and player,no need to call approveAndCall
function sellCards( uint256 _unitId, uint256 _amount) external {
}
//@notice for player withdraw
function withdrawEtherFromTrade(uint256 amount) external {
}
//@notice withraw all PLAT by dev
function withdrawToken(uint256 amount) external onlyOwner {
}
function getCanSellUnit(address _address, uint256 unitId) external view returns (uint256) {
}
}
| SafeMath.add(cards.coinBalanceOf(_player,1),_platValue)>=ethCost | 398,149 | SafeMath.add(cards.coinBalanceOf(_player,1),_platValue)>=ethCost |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.