comment
stringlengths 1
211
⌀ | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
"This cat is already renting a fortress" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
interface Realms {
function ownerOf(uint256 tokenId) external returns (address);
}
interface MoonCats {
function ownerOf(uint256 tokenId) external returns (address);
}
interface MistCoin {
function balanceOf(address account) external returns (uint256);
function allowance(address owner, address spender) external returns (uint256);
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}
contract FortCats {
event FortOffered(uint256 indexed fortID, uint256 indexed price);
event FortRented(uint256 indexed catID, uint256 indexed fortID);
event FortCleared(uint256 indexed fortID);
Realms realms = Realms(0x8479277AaCFF4663Aa4241085a7E27934A0b0840);
MoonCats moonCats = MoonCats(0xc3f733ca98E0daD0386979Eb96fb1722A1A05E69);
MistCoin mistCoin = MistCoin(0x7Fd4d7737597E7b4ee22AcbF8D94362343ae0a79);
uint256 constant DURATION = 220000;
struct Fort {
uint256 price;
uint256 renter;
uint256 checkout;
}
mapping (uint256 => Fort) public forts;
mapping (uint256 => uint256) public fortRented;
constructor() {}
function isFortClear(uint256 fortID) public view returns (bool) {
}
function offerFort(uint256 fortID, uint256 price) external {
}
function rentFort(uint256 catID, uint256 fortID) external {
require(catID != 0, "Cat number zero is not allowed to rent");
require(msg.sender == moonCats.ownerOf(catID), "You do not own this cat");
require(<FILL_ME>)
require(forts[fortID].price != 0, "This fortress is not available to rent");
require(mistCoin.balanceOf(msg.sender) >= forts[fortID].price, "You do not have enough MistCoin");
require(mistCoin.allowance(msg.sender, address(this)) >= forts[fortID].price,
"You must increase the MistCoin allowance for this contract to the price of rent");
mistCoin.transferFrom(msg.sender, realms.ownerOf(fortID), forts[fortID].price);
fortRented[catID] = fortID;
forts[fortID].price = 0;
forts[fortID].renter = catID;
forts[fortID].checkout = block.number + DURATION;
emit FortRented(catID, fortID);
}
function clearFort(uint256 fortID) external {
}
}
| fortRented[catID]==0,"This cat is already renting a fortress" | 193,445 | fortRented[catID]==0 |
"This fortress is not available to rent" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
interface Realms {
function ownerOf(uint256 tokenId) external returns (address);
}
interface MoonCats {
function ownerOf(uint256 tokenId) external returns (address);
}
interface MistCoin {
function balanceOf(address account) external returns (uint256);
function allowance(address owner, address spender) external returns (uint256);
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}
contract FortCats {
event FortOffered(uint256 indexed fortID, uint256 indexed price);
event FortRented(uint256 indexed catID, uint256 indexed fortID);
event FortCleared(uint256 indexed fortID);
Realms realms = Realms(0x8479277AaCFF4663Aa4241085a7E27934A0b0840);
MoonCats moonCats = MoonCats(0xc3f733ca98E0daD0386979Eb96fb1722A1A05E69);
MistCoin mistCoin = MistCoin(0x7Fd4d7737597E7b4ee22AcbF8D94362343ae0a79);
uint256 constant DURATION = 220000;
struct Fort {
uint256 price;
uint256 renter;
uint256 checkout;
}
mapping (uint256 => Fort) public forts;
mapping (uint256 => uint256) public fortRented;
constructor() {}
function isFortClear(uint256 fortID) public view returns (bool) {
}
function offerFort(uint256 fortID, uint256 price) external {
}
function rentFort(uint256 catID, uint256 fortID) external {
require(catID != 0, "Cat number zero is not allowed to rent");
require(msg.sender == moonCats.ownerOf(catID), "You do not own this cat");
require(fortRented[catID] == 0, "This cat is already renting a fortress");
require(<FILL_ME>)
require(mistCoin.balanceOf(msg.sender) >= forts[fortID].price, "You do not have enough MistCoin");
require(mistCoin.allowance(msg.sender, address(this)) >= forts[fortID].price,
"You must increase the MistCoin allowance for this contract to the price of rent");
mistCoin.transferFrom(msg.sender, realms.ownerOf(fortID), forts[fortID].price);
fortRented[catID] = fortID;
forts[fortID].price = 0;
forts[fortID].renter = catID;
forts[fortID].checkout = block.number + DURATION;
emit FortRented(catID, fortID);
}
function clearFort(uint256 fortID) external {
}
}
| forts[fortID].price!=0,"This fortress is not available to rent" | 193,445 | forts[fortID].price!=0 |
"You do not have enough MistCoin" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
interface Realms {
function ownerOf(uint256 tokenId) external returns (address);
}
interface MoonCats {
function ownerOf(uint256 tokenId) external returns (address);
}
interface MistCoin {
function balanceOf(address account) external returns (uint256);
function allowance(address owner, address spender) external returns (uint256);
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}
contract FortCats {
event FortOffered(uint256 indexed fortID, uint256 indexed price);
event FortRented(uint256 indexed catID, uint256 indexed fortID);
event FortCleared(uint256 indexed fortID);
Realms realms = Realms(0x8479277AaCFF4663Aa4241085a7E27934A0b0840);
MoonCats moonCats = MoonCats(0xc3f733ca98E0daD0386979Eb96fb1722A1A05E69);
MistCoin mistCoin = MistCoin(0x7Fd4d7737597E7b4ee22AcbF8D94362343ae0a79);
uint256 constant DURATION = 220000;
struct Fort {
uint256 price;
uint256 renter;
uint256 checkout;
}
mapping (uint256 => Fort) public forts;
mapping (uint256 => uint256) public fortRented;
constructor() {}
function isFortClear(uint256 fortID) public view returns (bool) {
}
function offerFort(uint256 fortID, uint256 price) external {
}
function rentFort(uint256 catID, uint256 fortID) external {
require(catID != 0, "Cat number zero is not allowed to rent");
require(msg.sender == moonCats.ownerOf(catID), "You do not own this cat");
require(fortRented[catID] == 0, "This cat is already renting a fortress");
require(forts[fortID].price != 0, "This fortress is not available to rent");
require(<FILL_ME>)
require(mistCoin.allowance(msg.sender, address(this)) >= forts[fortID].price,
"You must increase the MistCoin allowance for this contract to the price of rent");
mistCoin.transferFrom(msg.sender, realms.ownerOf(fortID), forts[fortID].price);
fortRented[catID] = fortID;
forts[fortID].price = 0;
forts[fortID].renter = catID;
forts[fortID].checkout = block.number + DURATION;
emit FortRented(catID, fortID);
}
function clearFort(uint256 fortID) external {
}
}
| mistCoin.balanceOf(msg.sender)>=forts[fortID].price,"You do not have enough MistCoin" | 193,445 | mistCoin.balanceOf(msg.sender)>=forts[fortID].price |
"You must increase the MistCoin allowance for this contract to the price of rent" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
interface Realms {
function ownerOf(uint256 tokenId) external returns (address);
}
interface MoonCats {
function ownerOf(uint256 tokenId) external returns (address);
}
interface MistCoin {
function balanceOf(address account) external returns (uint256);
function allowance(address owner, address spender) external returns (uint256);
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}
contract FortCats {
event FortOffered(uint256 indexed fortID, uint256 indexed price);
event FortRented(uint256 indexed catID, uint256 indexed fortID);
event FortCleared(uint256 indexed fortID);
Realms realms = Realms(0x8479277AaCFF4663Aa4241085a7E27934A0b0840);
MoonCats moonCats = MoonCats(0xc3f733ca98E0daD0386979Eb96fb1722A1A05E69);
MistCoin mistCoin = MistCoin(0x7Fd4d7737597E7b4ee22AcbF8D94362343ae0a79);
uint256 constant DURATION = 220000;
struct Fort {
uint256 price;
uint256 renter;
uint256 checkout;
}
mapping (uint256 => Fort) public forts;
mapping (uint256 => uint256) public fortRented;
constructor() {}
function isFortClear(uint256 fortID) public view returns (bool) {
}
function offerFort(uint256 fortID, uint256 price) external {
}
function rentFort(uint256 catID, uint256 fortID) external {
require(catID != 0, "Cat number zero is not allowed to rent");
require(msg.sender == moonCats.ownerOf(catID), "You do not own this cat");
require(fortRented[catID] == 0, "This cat is already renting a fortress");
require(forts[fortID].price != 0, "This fortress is not available to rent");
require(mistCoin.balanceOf(msg.sender) >= forts[fortID].price, "You do not have enough MistCoin");
require(<FILL_ME>)
mistCoin.transferFrom(msg.sender, realms.ownerOf(fortID), forts[fortID].price);
fortRented[catID] = fortID;
forts[fortID].price = 0;
forts[fortID].renter = catID;
forts[fortID].checkout = block.number + DURATION;
emit FortRented(catID, fortID);
}
function clearFort(uint256 fortID) external {
}
}
| mistCoin.allowance(msg.sender,address(this))>=forts[fortID].price,"You must increase the MistCoin allowance for this contract to the price of rent" | 193,445 | mistCoin.allowance(msg.sender,address(this))>=forts[fortID].price |
"Not the tax removal wallet" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.22;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor(address _newOwner) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
}
}
contract GTAVIETFToken is Context, IERC20Metadata, Ownable {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private constant _decimals = 18;
uint256 public burnPercentage = 2;
uint256 public constant hardCap = 100_000_000 ether;
bool public tradingEnabled;
address public taxRemovalWallet;
event BurnPercentageRemoved(uint256 timestamp);
event TradingEnabled(uint256 timestamp);
/**
* @dev Contract constructor.
* @param name_ The name of the token.
* @param symbol_ The symbol of the token.
*/
constructor(string memory name_, string memory symbol_, address newOwner_, address taxRemovalWallet_) Ownable(newOwner_) {
}
/**
* @dev Decreases the burn percentage to 0
*/
function decreaseBurnPercentage() external {
require(<FILL_ME>)
burnPercentage = 0;
emit BurnPercentageRemoved(block.timestamp);
}
/**
* @dev Decreases the burn percentage to 0
*/
function enableTrading() external onlyOwner {
}
/**
* @dev Returns the name of the token.
* @return The name of the token.
*/
function name() public view virtual override returns (string memory) {
}
/**
* @dev Returns the symbol of the token.
* @return The symbol of the token.
*/
function symbol() public view virtual override returns (string memory) {
}
/**
* @dev Returns the number of decimals used for token display.
* @return The number of decimals.
*/
function decimals() public view virtual override returns (uint8) {
}
/**
* @dev Returns the total supply of the token.
* @return The total supply.
*/
function totalSupply() public view virtual override returns (uint256) {
}
/**
* @dev Returns the balance of the specified account.
* @param account The address to check the balance for.
* @return The balance of the account.
*/
function balanceOf(address account) public view virtual override returns (uint256) {
}
/**
* @dev Transfers tokens from the caller to a specified recipient.
* @param recipient The address to transfer tokens to.
* @param amount The amount of tokens to transfer.
* @return A boolean value indicating whether the transfer was successful.
*/
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
}
/**
* @dev Returns the amount of tokens that the spender is allowed to spend on behalf of the owner.
* @param from The address that approves the spending.
* @param to The address that is allowed to spend.
* @return The remaining allowance for the spender.
*/
function allowance(address from, address to) public view virtual override returns (uint256) {
}
/**
* @dev Approves the specified address to spend the specified amount of tokens on behalf of the caller.
* @param to The address to approve the spending for.
* @param amount The amount of tokens to approve.
* @return A boolean value indicating whether the approval was successful.
*/
function approve(address to, uint256 amount) public virtual override returns (bool) {
}
/**
* @dev Transfers tokens from one address to another.
* @param sender The address to transfer tokens from.
* @param recipient The address to transfer tokens to.
* @param amount The amount of tokens to transfer.
* @return A boolean value indicating whether the transfer was successful.
*/
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
/**
* @dev Increases the allowance of the specified address to spend tokens on behalf of the caller.
* @param to The address to increase the allowance for.
* @param addedValue The amount of tokens to increase the allowance by.
* @return A boolean value indicating whether the increase was successful.
*/
function increaseAllowance(address to, uint256 addedValue) public virtual returns (bool) {
}
/**
* @dev Decreases the allowance granted by the owner of the tokens to `to` account.
* @param to The account allowed to spend the tokens.
* @param subtractedValue The amount of tokens to decrease the allowance by.
* @return A boolean value indicating whether the operation succeeded.
*/
function decreaseAllowance(address to, uint256 subtractedValue) public virtual returns (bool) {
}
/**
* @dev Transfers `amount` tokens from `sender` to `recipient`.
* @param sender The account to transfer tokens from.
* @param recipient The account to transfer tokens to.
* @param amount The amount of tokens to transfer.
*/
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
}
/**
* @dev Creates `amount` tokens and assigns them to `account`.
* @param account The account to assign the newly created tokens to.
* @param amount The amount of tokens to create.
*/
function _mint(address account, uint256 amount) internal virtual {
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the total supply.
* @param account The account to burn tokens from.
* @param amount The amount of tokens to burn.
*/
function _burn(address account, uint256 amount) internal virtual {
}
/**
* @dev Destroys `amount` tokens from the caller's account, reducing the total supply.
* @param amount The amount of tokens to burn.
*/
function burn(uint256 amount) external {
}
/**
* @dev Sets `amount` as the allowance of `to` over the caller's tokens.
* @param from The account granting the allowance.
* @param to The account allowed to spend the tokens.
* @param amount The amount of tokens to allow.
*/
function _approve(address from, address to, uint256 amount) internal virtual {
}
}
| _msgSender()==taxRemovalWallet,"Not the tax removal wallet" | 193,453 | _msgSender()==taxRemovalWallet |
"Trading not enabled" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.22;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor(address _newOwner) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
}
}
contract GTAVIETFToken is Context, IERC20Metadata, Ownable {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private constant _decimals = 18;
uint256 public burnPercentage = 2;
uint256 public constant hardCap = 100_000_000 ether;
bool public tradingEnabled;
address public taxRemovalWallet;
event BurnPercentageRemoved(uint256 timestamp);
event TradingEnabled(uint256 timestamp);
/**
* @dev Contract constructor.
* @param name_ The name of the token.
* @param symbol_ The symbol of the token.
*/
constructor(string memory name_, string memory symbol_, address newOwner_, address taxRemovalWallet_) Ownable(newOwner_) {
}
/**
* @dev Decreases the burn percentage to 0
*/
function decreaseBurnPercentage() external {
}
/**
* @dev Decreases the burn percentage to 0
*/
function enableTrading() external onlyOwner {
}
/**
* @dev Returns the name of the token.
* @return The name of the token.
*/
function name() public view virtual override returns (string memory) {
}
/**
* @dev Returns the symbol of the token.
* @return The symbol of the token.
*/
function symbol() public view virtual override returns (string memory) {
}
/**
* @dev Returns the number of decimals used for token display.
* @return The number of decimals.
*/
function decimals() public view virtual override returns (uint8) {
}
/**
* @dev Returns the total supply of the token.
* @return The total supply.
*/
function totalSupply() public view virtual override returns (uint256) {
}
/**
* @dev Returns the balance of the specified account.
* @param account The address to check the balance for.
* @return The balance of the account.
*/
function balanceOf(address account) public view virtual override returns (uint256) {
}
/**
* @dev Transfers tokens from the caller to a specified recipient.
* @param recipient The address to transfer tokens to.
* @param amount The amount of tokens to transfer.
* @return A boolean value indicating whether the transfer was successful.
*/
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
require(<FILL_ME>)
uint256 burnTax;
if(_msgSender() != owner() && recipient != owner()) {
burnTax = ((amount * burnPercentage) / 100);
}
if (burnTax > 0) _burn(_msgSender(), burnTax);
_transfer(_msgSender(), recipient, amount - burnTax);
return true;
}
/**
* @dev Returns the amount of tokens that the spender is allowed to spend on behalf of the owner.
* @param from The address that approves the spending.
* @param to The address that is allowed to spend.
* @return The remaining allowance for the spender.
*/
function allowance(address from, address to) public view virtual override returns (uint256) {
}
/**
* @dev Approves the specified address to spend the specified amount of tokens on behalf of the caller.
* @param to The address to approve the spending for.
* @param amount The amount of tokens to approve.
* @return A boolean value indicating whether the approval was successful.
*/
function approve(address to, uint256 amount) public virtual override returns (bool) {
}
/**
* @dev Transfers tokens from one address to another.
* @param sender The address to transfer tokens from.
* @param recipient The address to transfer tokens to.
* @param amount The amount of tokens to transfer.
* @return A boolean value indicating whether the transfer was successful.
*/
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
/**
* @dev Increases the allowance of the specified address to spend tokens on behalf of the caller.
* @param to The address to increase the allowance for.
* @param addedValue The amount of tokens to increase the allowance by.
* @return A boolean value indicating whether the increase was successful.
*/
function increaseAllowance(address to, uint256 addedValue) public virtual returns (bool) {
}
/**
* @dev Decreases the allowance granted by the owner of the tokens to `to` account.
* @param to The account allowed to spend the tokens.
* @param subtractedValue The amount of tokens to decrease the allowance by.
* @return A boolean value indicating whether the operation succeeded.
*/
function decreaseAllowance(address to, uint256 subtractedValue) public virtual returns (bool) {
}
/**
* @dev Transfers `amount` tokens from `sender` to `recipient`.
* @param sender The account to transfer tokens from.
* @param recipient The account to transfer tokens to.
* @param amount The amount of tokens to transfer.
*/
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
}
/**
* @dev Creates `amount` tokens and assigns them to `account`.
* @param account The account to assign the newly created tokens to.
* @param amount The amount of tokens to create.
*/
function _mint(address account, uint256 amount) internal virtual {
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the total supply.
* @param account The account to burn tokens from.
* @param amount The amount of tokens to burn.
*/
function _burn(address account, uint256 amount) internal virtual {
}
/**
* @dev Destroys `amount` tokens from the caller's account, reducing the total supply.
* @param amount The amount of tokens to burn.
*/
function burn(uint256 amount) external {
}
/**
* @dev Sets `amount` as the allowance of `to` over the caller's tokens.
* @param from The account granting the allowance.
* @param to The account allowed to spend the tokens.
* @param amount The amount of tokens to allow.
*/
function _approve(address from, address to, uint256 amount) internal virtual {
}
}
| tradingEnabled||_msgSender()==owner()||recipient==owner(),"Trading not enabled" | 193,453 | tradingEnabled||_msgSender()==owner()||recipient==owner() |
"Insufficient reward tokens" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @author Brewlabs
* This contract has been developed by brewlabs.info
*/
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import {IERC20, IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {IERC1155} from "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import {ERC1155Receiver} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Receiver.sol";
contract WagmiNftStaking is Ownable, ERC1155Receiver, ReentrancyGuard {
using SafeERC20 for IERC20;
uint256 private constant BLOCKS_PER_DAY = 6426;
uint256 private PRECISION_FACTOR;
// Whether it is initialized
bool public isInitialized;
uint256 public duration = 365; // 365 days
// The block number when staking starts.
uint256 public startBlock;
// The block number when staking ends.
uint256 public bonusEndBlock;
// tokens created per block.
uint256 public rewardPerBlock;
// The block number of the last pool update
uint256 public lastRewardBlock;
address public treasury = 0x64961Ffd0d84b2355eC2B5d35B0d8D8825A774dc;
uint256 public performanceFee = 0.0064 ether;
// The staked token
IERC1155 public stakingNft;
// The earned token
IERC20 public earnedToken;
// Accrued token per share
uint256 public accTokenPerShare;
uint256 public oneTimeLimit = 40;
bool public autoAdjustableForRewardRate = true;
uint256 public totalStaked;
uint256 private totalEarned;
uint256 private paidRewards;
uint256 private shouldTotalPaid;
struct UserInfo {
uint256 amount; // number of staked NFTs
uint256[] tokenIds; // staked tokenIds
uint256 rewardDebt; // Reward debt
}
// Info of each user that stakes tokenIds
mapping(address => UserInfo) public userInfo;
event Deposit(address indexed user, uint256[] tokenIds);
event Withdraw(address indexed user, uint256[] tokenIds);
event Claim(address indexed user, uint256 amount);
event EmergencyWithdraw(address indexed user, uint256[] tokenIds);
event AdminTokenRecovered(address tokenRecovered, uint256 amount);
event NewStartAndEndBlocks(uint256 startBlock, uint256 endBlock);
event NewRewardPerBlock(uint256 rewardPerBlock);
event RewardsStop(uint256 blockNumber);
event EndBlockUpdated(uint256 blockNumber);
event ServiceInfoUpadted(address _addr, uint256 _fee);
event DurationUpdated(uint256 _duration);
event SetAutoAdjustableForRewardRate(bool status);
constructor() {}
/*
* @notice Initialize the contract
* @param _stakingNft: nft address to stake
* @param _earnedToken: earned token address
* @param _rewardPerBlock: reward per block (in earnedToken)
*/
function initialize(IERC1155 _stakingNft, IERC20 _earnedToken, uint256 _rewardPerBlock) external onlyOwner {
}
/*
* @notice Deposit staked tokens and collect reward tokens (if any)
* @param _amount: amount to withdraw (in earnedToken)
*/
function deposit(uint256[] memory _tokenIds) external payable nonReentrant {
}
/*
* @notice Withdraw staked tokenIds and collect reward tokens
* @param _amount: number of tokenIds to unstake
*/
function withdraw(uint256 _amount) external payable nonReentrant {
}
function claimReward() external payable nonReentrant {
}
/*
* @notice Withdraw staked NFTs without caring about rewards
* @dev Needs to be for emergency.
*/
function emergencyWithdraw() external nonReentrant {
}
function stakedInfo(address _user) external view returns (uint256, uint256[] memory) {
}
/**
* @notice Available amount of reward token
*/
function availableRewardTokens() public view returns (uint256) {
}
function insufficientRewards() external view returns (uint256) {
}
/*
* @notice View function to see pending reward on frontend.
* @param _user: user address
* @return Pending reward for a given user
*/
function pendingReward(address _user) external view returns (uint256) {
}
/**
* Admin Methods
*/
function increaseEmissionRate(uint256 _amount) external onlyOwner {
}
function _updateRewardRate() internal {
}
/*
* @notice Withdraw reward token
* @dev Only callable by owner. Needs to be for emergency.
*/
function emergencyRewardWithdraw(uint256 _amount) external onlyOwner {
require(block.number > bonusEndBlock, "Pool is running");
require(<FILL_ME>)
if (_amount == 0) _amount = availableRewardTokens();
earnedToken.safeTransfer(address(msg.sender), _amount);
}
function startReward() external onlyOwner {
}
function stopReward() external onlyOwner {
}
function updateEndBlock(uint256 _endBlock) external onlyOwner {
}
/*
* @notice Update reward per block
* @dev Only callable by owner.
* @param _rewardPerBlock: the reward per block
*/
function updateRewardPerBlock(uint256 _rewardPerBlock) external onlyOwner {
}
function setDuration(uint256 _duration) external onlyOwner {
}
function setAutoAdjustableForRewardRate(bool _status) external onlyOwner {
}
function setServiceInfo(address _treasury, uint256 _fee) external {
}
/**
* @notice It allows the admin to recover wrong tokens sent to the contract
* @param _token: the address of the token to withdraw
* @dev This function is only callable by admin.
*/
function rescueTokens(address _token) external onlyOwner {
}
/*
* @notice Update reward variables of the given pool to be up-to-date.
*/
function _updatePool() internal {
}
/*
* @notice Return reward multiplier over the given _from to _to block.
* @param _from: block to start
* @param _to: block to finish
*/
function _getMultiplier(uint256 _from, uint256 _to) internal view returns (uint256) {
}
function _transferPerformanceFee() internal {
}
/**
* onERC1155Received(address operator,address from,uint256 tokenId,uint256 amount,bytes data) → bytes4
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
*/
function onERC1155Received(address, address, uint256, uint256, bytes memory)
public
virtual
override
returns (bytes4)
{
}
function onERC1155BatchReceived(address, address, uint256[] memory, uint256[] memory, bytes memory)
external
virtual
override
returns (bytes4)
{
}
receive() external payable {}
}
| availableRewardTokens()>=_amount,"Insufficient reward tokens" | 193,473 | availableRewardTokens()>=_amount |
"Tax cannot be more than 24%" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.12;
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 ERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address _owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
abstract contract Auth {
address internal owner;
mapping (address => bool) internal authorizations;
constructor(address _owner) {
}
modifier onlyOwner() {
}
modifier authorized() {
}
function authorize(address adr) public onlyOwner {
}
function unauthorize(address adr) public onlyOwner {
}
function isOwner(address account) public view returns (bool) {
}
function isAuthorized(address adr) public view returns (bool) {
}
function transferOwnership(address payable adr, uint256 confirm) public onlyOwner {
}
event OwnershipTransferred(address owner);
}
interface IDEXFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IDEXRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function 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;
}
contract DEMOCRACYLAND is ERC20, Auth {
using SafeMath for uint256;
address WETH;
address DEAD = 0x000000000000000000000000000000000000dEaD;
address ZERO = 0x0000000000000000000000000000000000000000;
string constant _name = "Democracy Land";
string constant _symbol = "DLAND";
uint8 constant _decimals = 4;
uint256 _totalSupply = 100 * 10**6 * 10**_decimals;
uint256 public _maxTxAmount = _totalSupply / 200;
uint256 public _maxWalletToken = _totalSupply / 100;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) _allowances;
bool public blacklistMode = true;
mapping (address => bool) public isBlacklisted;
mapping (address => bool) public isFeeExempt;
mapping (address => bool) public isTxLimitExempt;
mapping (address => bool) public isWalletLimitExempt;
uint256 public liquidityFee = 2;
uint256 public presidentFee = 1;
uint256 public marketingFee = 3;
uint256 public teamFee = 3;
uint256 public devFee = 1;
uint256 public totalFee = marketingFee + liquidityFee + teamFee + devFee + presidentFee;
uint256 public constant feeDenominator = 100;
uint256 sellMultiplier = 200;
uint256 buyMultiplier = 100;
uint256 transferMultiplier = 200;
address public autoLiquidityReceiver;
address public marketingFeeReceiver;
address public teamFeeReceiver;
address public devFeeReceiver;
address public presidentFeeReceiver;
IDEXRouter public router;
address public pair;
bool public tradingOpen = false;
bool public launchMode = true;
bool public swapEnabled = true;
uint256 public swapThreshold = _totalSupply * 1 / 1000;
bool inSwap;
modifier swapping() { }
constructor () Auth(msg.sender) {
}
receive() external payable { }
function totalSupply() external view override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external pure override returns (string memory) { }
function name() external pure override returns (string memory) { }
function getOwner() external view override returns (address) { }
function balanceOf(address account) public view override returns (uint256) { }
function allowance(address holder, address spender) external view override returns (uint256) { }
function approve(address spender, uint256 amount) public override returns (bool) {
}
function approveMax(address spender) external 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 setMaxWalletPercent_base1000(uint256 maxWallPercent_base1000) external onlyOwner {
}
function setMaxTxPercent_base1000(uint256 maxTXPercentage_base1000) external onlyOwner {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function takeFee(address sender, uint256 amount, address recipient) internal returns (uint256) {
}
function shouldSwapBack() internal view returns (bool) {
}
function clearStuckBalance(uint256 amountPercentage) external onlyOwner {
}
function clearStuckToken(address tokenAddress, uint256 tokens) external onlyOwner returns (bool success) {
}
function setMultipliers(uint256 _buy, uint256 _sell, uint256 _trans) external authorized {
sellMultiplier = _sell;
buyMultiplier = _buy;
transferMultiplier = _trans;
require(<FILL_ME>)
require(totalFee.mul(sellMultiplier).div(100) < 25, "Tax cannot be more than 24%");
}
// switch Trading
function tradingStatus(bool _status) external onlyOwner {
}
function tradingStatus_launchmode(uint256 confirm) external onlyOwner {
}
function swapBack() internal swapping {
}
function manage_blacklist_status(bool _status) external onlyOwner {
}
function manage_blacklist(address[] calldata addresses, bool status) external onlyOwner {
}
function manage_FeeExempt(address[] calldata addresses, bool status) external authorized {
}
function manage_TxLimitExempt(address[] calldata addresses, bool status) external authorized {
}
function manage_WalletLimitExempt(address[] calldata addresses, bool status) external authorized {
}
function setFees(uint256 _liquidityFee, uint256 _marketingFee, uint256 _teamFee, uint256 _devFee, uint256 _presidentFee) external onlyOwner {
}
function setFeeReceivers(address _autoLiquidityReceiver, address _marketingFeeReceiver, address _teamFeeReceiver, address _devFeeReceiver, address _presidentFeeReceiver) external onlyOwner {
}
function setSwapBackSettings(bool _enabled, uint256 _amount) external onlyOwner {
}
function getCirculatingSupply() public view returns (uint256) {
}
function multiTransfer(address from, address[] calldata addresses, uint256[] calldata tokens) external onlyOwner {
}
event AutoLiquify(uint256 amountETH, uint256 amountTokens);
}
| totalFee.mul(buyMultiplier).div(100)<25,"Tax cannot be more than 24%" | 193,602 | totalFee.mul(buyMultiplier).div(100)<25 |
"Tax cannot be more than 24%" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.12;
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 ERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address _owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
abstract contract Auth {
address internal owner;
mapping (address => bool) internal authorizations;
constructor(address _owner) {
}
modifier onlyOwner() {
}
modifier authorized() {
}
function authorize(address adr) public onlyOwner {
}
function unauthorize(address adr) public onlyOwner {
}
function isOwner(address account) public view returns (bool) {
}
function isAuthorized(address adr) public view returns (bool) {
}
function transferOwnership(address payable adr, uint256 confirm) public onlyOwner {
}
event OwnershipTransferred(address owner);
}
interface IDEXFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IDEXRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function 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;
}
contract DEMOCRACYLAND is ERC20, Auth {
using SafeMath for uint256;
address WETH;
address DEAD = 0x000000000000000000000000000000000000dEaD;
address ZERO = 0x0000000000000000000000000000000000000000;
string constant _name = "Democracy Land";
string constant _symbol = "DLAND";
uint8 constant _decimals = 4;
uint256 _totalSupply = 100 * 10**6 * 10**_decimals;
uint256 public _maxTxAmount = _totalSupply / 200;
uint256 public _maxWalletToken = _totalSupply / 100;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) _allowances;
bool public blacklistMode = true;
mapping (address => bool) public isBlacklisted;
mapping (address => bool) public isFeeExempt;
mapping (address => bool) public isTxLimitExempt;
mapping (address => bool) public isWalletLimitExempt;
uint256 public liquidityFee = 2;
uint256 public presidentFee = 1;
uint256 public marketingFee = 3;
uint256 public teamFee = 3;
uint256 public devFee = 1;
uint256 public totalFee = marketingFee + liquidityFee + teamFee + devFee + presidentFee;
uint256 public constant feeDenominator = 100;
uint256 sellMultiplier = 200;
uint256 buyMultiplier = 100;
uint256 transferMultiplier = 200;
address public autoLiquidityReceiver;
address public marketingFeeReceiver;
address public teamFeeReceiver;
address public devFeeReceiver;
address public presidentFeeReceiver;
IDEXRouter public router;
address public pair;
bool public tradingOpen = false;
bool public launchMode = true;
bool public swapEnabled = true;
uint256 public swapThreshold = _totalSupply * 1 / 1000;
bool inSwap;
modifier swapping() { }
constructor () Auth(msg.sender) {
}
receive() external payable { }
function totalSupply() external view override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external pure override returns (string memory) { }
function name() external pure override returns (string memory) { }
function getOwner() external view override returns (address) { }
function balanceOf(address account) public view override returns (uint256) { }
function allowance(address holder, address spender) external view override returns (uint256) { }
function approve(address spender, uint256 amount) public override returns (bool) {
}
function approveMax(address spender) external 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 setMaxWalletPercent_base1000(uint256 maxWallPercent_base1000) external onlyOwner {
}
function setMaxTxPercent_base1000(uint256 maxTXPercentage_base1000) external onlyOwner {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function takeFee(address sender, uint256 amount, address recipient) internal returns (uint256) {
}
function shouldSwapBack() internal view returns (bool) {
}
function clearStuckBalance(uint256 amountPercentage) external onlyOwner {
}
function clearStuckToken(address tokenAddress, uint256 tokens) external onlyOwner returns (bool success) {
}
function setMultipliers(uint256 _buy, uint256 _sell, uint256 _trans) external authorized {
sellMultiplier = _sell;
buyMultiplier = _buy;
transferMultiplier = _trans;
require(totalFee.mul(buyMultiplier).div(100) < 25, "Tax cannot be more than 24%");
require(<FILL_ME>)
}
// switch Trading
function tradingStatus(bool _status) external onlyOwner {
}
function tradingStatus_launchmode(uint256 confirm) external onlyOwner {
}
function swapBack() internal swapping {
}
function manage_blacklist_status(bool _status) external onlyOwner {
}
function manage_blacklist(address[] calldata addresses, bool status) external onlyOwner {
}
function manage_FeeExempt(address[] calldata addresses, bool status) external authorized {
}
function manage_TxLimitExempt(address[] calldata addresses, bool status) external authorized {
}
function manage_WalletLimitExempt(address[] calldata addresses, bool status) external authorized {
}
function setFees(uint256 _liquidityFee, uint256 _marketingFee, uint256 _teamFee, uint256 _devFee, uint256 _presidentFee) external onlyOwner {
}
function setFeeReceivers(address _autoLiquidityReceiver, address _marketingFeeReceiver, address _teamFeeReceiver, address _devFeeReceiver, address _presidentFeeReceiver) external onlyOwner {
}
function setSwapBackSettings(bool _enabled, uint256 _amount) external onlyOwner {
}
function getCirculatingSupply() public view returns (uint256) {
}
function multiTransfer(address from, address[] calldata addresses, uint256[] calldata tokens) external onlyOwner {
}
event AutoLiquify(uint256 amountETH, uint256 amountTokens);
}
| totalFee.mul(sellMultiplier).div(100)<25,"Tax cannot be more than 24%" | 193,602 | totalFee.mul(sellMultiplier).div(100)<25 |
"Up to 3 mints allowed" | /*
#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&--&------&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&-----------&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&-----------------&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&&&&&&--------------------------&&&&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&&&--------------------------------&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&-------------------------------------------&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&-----------------------------------------------&&&&&&&&&&&
(&&&&&&&&&&&&&&&-----------------------------------------------------&&&&&&&&&&&
(&&&&&&&&&&&&--------------------------------------------------------&&&&&&&&&&&
(&&&&&&&&&&&&&&-----------------------------------------------------&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&------------------------------------------------&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&-------------------------------------------------&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&------------------------------------------------&&&&&&&&&&&&&&
(%%%%%%%%%%%%%%%%%------------------------------------------------%%%%%%%%%%%%%%
(%%%%%%%%%%%%%%%%%%%---------------------------------------------%%%%%%%%%%%%%%%
(%%%%%%%%%%%%%%%%%%%%-------------------------------------------%%%%%%%%%%%%%%%%
(%%%%%%%%%%%%%%%%%%%%%%---------------------------------------%%%%%%%%%%%%%%%%%%
(%%%%%%%%%%%%%%%%%%%%%%%%%%-------------------------------%%%%%%%%%%%%%%%%%%%%%%
(%%%%%%%%%%%%-----%%%%%%%%%%%%%%%-----------------------%%%%%%%%%%%%%%%%%%%%%%%%
(%%%%%%%----------------%%%%%%%%-------------------------%%%%%%%%%%%%%%%%%%%%%%%
(%%%%&------%%%%%%%--------%%%%--------------------------%%%%%%%%%%%%%%%%%%%%%%%
(%%%-----&%%%%%%%%%%%%%-----%%---------------------------%%%%%%%%%%%%%%%%%%%%%%%
/%%%-----%%%%%%%%%%%%%%%%---------------------------------%%%%%%%%%%%%%%%%%%%%%%
/%%%-----%%---%%%%%%%%%%%%--------------------------------%%%%%%%%%%%%%%%%%%%%%%
/%%%%----------%%%%%%%%%%%--------------------------------%%%%%%%%%%%%%%%%%%%%%%
/%%%%%%%------%%%%%%%%%%%---------------------------------%%%%%%%%%%%%%%%%%%%%%%
/%%%%%%%%%%%%%%%%%%%%%%%%----------------------------------%%%%%%%%%%%%%%%%%%%%%
/%%%%%%%%%%%%%%%%%%%%%% @creator: BapezNFT %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
/%%%%%%%%%%%%%%%%%%%%% @author: debugger, twitter.com/debuggerguy %%%%%%%%%%%%%%
*/
pragma solidity ^0.8.0;
contract Bapez is ERC721A, Ownable, Pausable
{
uint256 private constant TRIO_PRICE = 0.15 ether; //Price of 3 on presale
uint256 private constant PRESALE_LIMIT = 3 ;
uint256 public mintPrice = 0.055 ether;
uint256 public totalColSize = 5555;
uint256 private publicLimit = 5 ;
bytes32 public bapezListMerkleRoot = 0x9bfbe7d1b76465602a0dd613a1349e376fcddd3e7031bfcc9f6e77278fdbc9b0;
bytes32 public vibListMerkleRoot = 0xb72627c9af7cc26c6d5227e2ad9569d6055a386f9043c458e14ce0f19927a616;
string private _baseTokenURI;
bool public publicSaleActive;
bool public bapezListSaleActive;
bool public vibListSaleActive;
mapping(address => uint256) public bapezMintList;
mapping(address => uint256) public vibMintList;
mapping(address => uint256) public publicMintList;
address public mdProvider;
constructor
(
string memory _name,
string memory _symbol,
address _mdProvider
) ERC721A(_name, _symbol)
{
}
modifier callerIsUser()
{
}
modifier onlyPublicSaleActive() {
}
modifier onlyBapezListSaleActive() {
}
modifier onlyVibListSaleActive() {
}
function setMdProvider(address _mdProvider) external onlyOwner {
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
function _startTokenId() internal pure override returns (uint256) {
}
function vibListMint(bytes32[] calldata _merkleProof, uint256 quantity)
external
payable
onlyVibListSaleActive
callerIsUser
{
require(<FILL_ME>)
require(msg.value >= ( quantity == 3 ? TRIO_PRICE : mintPrice * quantity ), "Insufficient funds");
require(totalSupply() + quantity <= totalColSize, "EXCEED_COL_SIZE");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(
MerkleProof.verify(_merkleProof, vibListMerkleRoot, leaf),
"Merkle proof invalid"
);
vibMintList[msg.sender] += quantity;
_safeMint(msg.sender, quantity);
}
function bapezListMint(bytes32[] calldata _merkleProof, uint256 quantity)
external
payable
onlyBapezListSaleActive
callerIsUser
{
}
function publicMint(uint256 quantity)
external
payable
onlyPublicSaleActive
callerIsUser
{
}
//owner can mint just during public sale not to affect high prioritized levels.
function ownerMint(uint256 quantity)
external
payable
onlyPublicSaleActive
onlyOwner
{
}
function toggleVibListSale()
external
onlyOwner {
}
function toggleBapezListSale()
external
onlyOwner
{
}
function togglePublicSale()
external
onlyOwner
{
}
function setVibListMerkleRoot(bytes32 _vibListMerkleRoot)
external
onlyOwner {
}
function setBapezListMerkleRoot(bytes32 _bapezListMerkleRoot)
external
onlyOwner
{
}
function pause() external onlyOwner {
}
function unpause() external onlyOwner {
}
//stop transfer on pause
function _beforeTokenTransfers(
address from,
address to,
uint256 tokenId,
uint256 quantity
) internal override(ERC721A) whenNotPaused {
}
function withdraw()
external
onlyOwner
{
}
//this can be used only for reduction.
function reduceSupply(uint256 _burnAmount)
external
onlyOwner
{
}
//this can be used only for reduction during public-sale.
function changeMintPrice(uint256 _mintPrice)
external
onlyPublicSaleActive
onlyOwner
{
}
function changePublicMintLimit(uint256 _newLimit)
external
onlyPublicSaleActive
onlyOwner
{
}
}
| vibMintList[msg.sender]+quantity<=PRESALE_LIMIT,"Up to 3 mints allowed" | 193,718 | vibMintList[msg.sender]+quantity<=PRESALE_LIMIT |
"Insufficient funds" | /*
#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&--&------&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&-----------&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&-----------------&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&&&&&&--------------------------&&&&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&&&--------------------------------&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&-------------------------------------------&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&-----------------------------------------------&&&&&&&&&&&
(&&&&&&&&&&&&&&&-----------------------------------------------------&&&&&&&&&&&
(&&&&&&&&&&&&--------------------------------------------------------&&&&&&&&&&&
(&&&&&&&&&&&&&&-----------------------------------------------------&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&------------------------------------------------&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&-------------------------------------------------&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&------------------------------------------------&&&&&&&&&&&&&&
(%%%%%%%%%%%%%%%%%------------------------------------------------%%%%%%%%%%%%%%
(%%%%%%%%%%%%%%%%%%%---------------------------------------------%%%%%%%%%%%%%%%
(%%%%%%%%%%%%%%%%%%%%-------------------------------------------%%%%%%%%%%%%%%%%
(%%%%%%%%%%%%%%%%%%%%%%---------------------------------------%%%%%%%%%%%%%%%%%%
(%%%%%%%%%%%%%%%%%%%%%%%%%%-------------------------------%%%%%%%%%%%%%%%%%%%%%%
(%%%%%%%%%%%%-----%%%%%%%%%%%%%%%-----------------------%%%%%%%%%%%%%%%%%%%%%%%%
(%%%%%%%----------------%%%%%%%%-------------------------%%%%%%%%%%%%%%%%%%%%%%%
(%%%%&------%%%%%%%--------%%%%--------------------------%%%%%%%%%%%%%%%%%%%%%%%
(%%%-----&%%%%%%%%%%%%%-----%%---------------------------%%%%%%%%%%%%%%%%%%%%%%%
/%%%-----%%%%%%%%%%%%%%%%---------------------------------%%%%%%%%%%%%%%%%%%%%%%
/%%%-----%%---%%%%%%%%%%%%--------------------------------%%%%%%%%%%%%%%%%%%%%%%
/%%%%----------%%%%%%%%%%%--------------------------------%%%%%%%%%%%%%%%%%%%%%%
/%%%%%%%------%%%%%%%%%%%---------------------------------%%%%%%%%%%%%%%%%%%%%%%
/%%%%%%%%%%%%%%%%%%%%%%%%----------------------------------%%%%%%%%%%%%%%%%%%%%%
/%%%%%%%%%%%%%%%%%%%%%% @creator: BapezNFT %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
/%%%%%%%%%%%%%%%%%%%%% @author: debugger, twitter.com/debuggerguy %%%%%%%%%%%%%%
*/
pragma solidity ^0.8.0;
contract Bapez is ERC721A, Ownable, Pausable
{
uint256 private constant TRIO_PRICE = 0.15 ether; //Price of 3 on presale
uint256 private constant PRESALE_LIMIT = 3 ;
uint256 public mintPrice = 0.055 ether;
uint256 public totalColSize = 5555;
uint256 private publicLimit = 5 ;
bytes32 public bapezListMerkleRoot = 0x9bfbe7d1b76465602a0dd613a1349e376fcddd3e7031bfcc9f6e77278fdbc9b0;
bytes32 public vibListMerkleRoot = 0xb72627c9af7cc26c6d5227e2ad9569d6055a386f9043c458e14ce0f19927a616;
string private _baseTokenURI;
bool public publicSaleActive;
bool public bapezListSaleActive;
bool public vibListSaleActive;
mapping(address => uint256) public bapezMintList;
mapping(address => uint256) public vibMintList;
mapping(address => uint256) public publicMintList;
address public mdProvider;
constructor
(
string memory _name,
string memory _symbol,
address _mdProvider
) ERC721A(_name, _symbol)
{
}
modifier callerIsUser()
{
}
modifier onlyPublicSaleActive() {
}
modifier onlyBapezListSaleActive() {
}
modifier onlyVibListSaleActive() {
}
function setMdProvider(address _mdProvider) external onlyOwner {
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
function _startTokenId() internal pure override returns (uint256) {
}
function vibListMint(bytes32[] calldata _merkleProof, uint256 quantity)
external
payable
onlyVibListSaleActive
callerIsUser
{
require(vibMintList[msg.sender] + quantity <= PRESALE_LIMIT, "Up to 3 mints allowed");
require(<FILL_ME>)
require(totalSupply() + quantity <= totalColSize, "EXCEED_COL_SIZE");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(
MerkleProof.verify(_merkleProof, vibListMerkleRoot, leaf),
"Merkle proof invalid"
);
vibMintList[msg.sender] += quantity;
_safeMint(msg.sender, quantity);
}
function bapezListMint(bytes32[] calldata _merkleProof, uint256 quantity)
external
payable
onlyBapezListSaleActive
callerIsUser
{
}
function publicMint(uint256 quantity)
external
payable
onlyPublicSaleActive
callerIsUser
{
}
//owner can mint just during public sale not to affect high prioritized levels.
function ownerMint(uint256 quantity)
external
payable
onlyPublicSaleActive
onlyOwner
{
}
function toggleVibListSale()
external
onlyOwner {
}
function toggleBapezListSale()
external
onlyOwner
{
}
function togglePublicSale()
external
onlyOwner
{
}
function setVibListMerkleRoot(bytes32 _vibListMerkleRoot)
external
onlyOwner {
}
function setBapezListMerkleRoot(bytes32 _bapezListMerkleRoot)
external
onlyOwner
{
}
function pause() external onlyOwner {
}
function unpause() external onlyOwner {
}
//stop transfer on pause
function _beforeTokenTransfers(
address from,
address to,
uint256 tokenId,
uint256 quantity
) internal override(ERC721A) whenNotPaused {
}
function withdraw()
external
onlyOwner
{
}
//this can be used only for reduction.
function reduceSupply(uint256 _burnAmount)
external
onlyOwner
{
}
//this can be used only for reduction during public-sale.
function changeMintPrice(uint256 _mintPrice)
external
onlyPublicSaleActive
onlyOwner
{
}
function changePublicMintLimit(uint256 _newLimit)
external
onlyPublicSaleActive
onlyOwner
{
}
}
| msg.value>=(quantity==3?TRIO_PRICE:mintPrice*quantity),"Insufficient funds" | 193,718 | msg.value>=(quantity==3?TRIO_PRICE:mintPrice*quantity) |
"EXCEED_COL_SIZE" | /*
#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&--&------&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&-----------&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&-----------------&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&&&&&&--------------------------&&&&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&&&--------------------------------&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&-------------------------------------------&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&-----------------------------------------------&&&&&&&&&&&
(&&&&&&&&&&&&&&&-----------------------------------------------------&&&&&&&&&&&
(&&&&&&&&&&&&--------------------------------------------------------&&&&&&&&&&&
(&&&&&&&&&&&&&&-----------------------------------------------------&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&------------------------------------------------&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&-------------------------------------------------&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&------------------------------------------------&&&&&&&&&&&&&&
(%%%%%%%%%%%%%%%%%------------------------------------------------%%%%%%%%%%%%%%
(%%%%%%%%%%%%%%%%%%%---------------------------------------------%%%%%%%%%%%%%%%
(%%%%%%%%%%%%%%%%%%%%-------------------------------------------%%%%%%%%%%%%%%%%
(%%%%%%%%%%%%%%%%%%%%%%---------------------------------------%%%%%%%%%%%%%%%%%%
(%%%%%%%%%%%%%%%%%%%%%%%%%%-------------------------------%%%%%%%%%%%%%%%%%%%%%%
(%%%%%%%%%%%%-----%%%%%%%%%%%%%%%-----------------------%%%%%%%%%%%%%%%%%%%%%%%%
(%%%%%%%----------------%%%%%%%%-------------------------%%%%%%%%%%%%%%%%%%%%%%%
(%%%%&------%%%%%%%--------%%%%--------------------------%%%%%%%%%%%%%%%%%%%%%%%
(%%%-----&%%%%%%%%%%%%%-----%%---------------------------%%%%%%%%%%%%%%%%%%%%%%%
/%%%-----%%%%%%%%%%%%%%%%---------------------------------%%%%%%%%%%%%%%%%%%%%%%
/%%%-----%%---%%%%%%%%%%%%--------------------------------%%%%%%%%%%%%%%%%%%%%%%
/%%%%----------%%%%%%%%%%%--------------------------------%%%%%%%%%%%%%%%%%%%%%%
/%%%%%%%------%%%%%%%%%%%---------------------------------%%%%%%%%%%%%%%%%%%%%%%
/%%%%%%%%%%%%%%%%%%%%%%%%----------------------------------%%%%%%%%%%%%%%%%%%%%%
/%%%%%%%%%%%%%%%%%%%%%% @creator: BapezNFT %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
/%%%%%%%%%%%%%%%%%%%%% @author: debugger, twitter.com/debuggerguy %%%%%%%%%%%%%%
*/
pragma solidity ^0.8.0;
contract Bapez is ERC721A, Ownable, Pausable
{
uint256 private constant TRIO_PRICE = 0.15 ether; //Price of 3 on presale
uint256 private constant PRESALE_LIMIT = 3 ;
uint256 public mintPrice = 0.055 ether;
uint256 public totalColSize = 5555;
uint256 private publicLimit = 5 ;
bytes32 public bapezListMerkleRoot = 0x9bfbe7d1b76465602a0dd613a1349e376fcddd3e7031bfcc9f6e77278fdbc9b0;
bytes32 public vibListMerkleRoot = 0xb72627c9af7cc26c6d5227e2ad9569d6055a386f9043c458e14ce0f19927a616;
string private _baseTokenURI;
bool public publicSaleActive;
bool public bapezListSaleActive;
bool public vibListSaleActive;
mapping(address => uint256) public bapezMintList;
mapping(address => uint256) public vibMintList;
mapping(address => uint256) public publicMintList;
address public mdProvider;
constructor
(
string memory _name,
string memory _symbol,
address _mdProvider
) ERC721A(_name, _symbol)
{
}
modifier callerIsUser()
{
}
modifier onlyPublicSaleActive() {
}
modifier onlyBapezListSaleActive() {
}
modifier onlyVibListSaleActive() {
}
function setMdProvider(address _mdProvider) external onlyOwner {
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
function _startTokenId() internal pure override returns (uint256) {
}
function vibListMint(bytes32[] calldata _merkleProof, uint256 quantity)
external
payable
onlyVibListSaleActive
callerIsUser
{
require(vibMintList[msg.sender] + quantity <= PRESALE_LIMIT, "Up to 3 mints allowed");
require(msg.value >= ( quantity == 3 ? TRIO_PRICE : mintPrice * quantity ), "Insufficient funds");
require(<FILL_ME>)
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(
MerkleProof.verify(_merkleProof, vibListMerkleRoot, leaf),
"Merkle proof invalid"
);
vibMintList[msg.sender] += quantity;
_safeMint(msg.sender, quantity);
}
function bapezListMint(bytes32[] calldata _merkleProof, uint256 quantity)
external
payable
onlyBapezListSaleActive
callerIsUser
{
}
function publicMint(uint256 quantity)
external
payable
onlyPublicSaleActive
callerIsUser
{
}
//owner can mint just during public sale not to affect high prioritized levels.
function ownerMint(uint256 quantity)
external
payable
onlyPublicSaleActive
onlyOwner
{
}
function toggleVibListSale()
external
onlyOwner {
}
function toggleBapezListSale()
external
onlyOwner
{
}
function togglePublicSale()
external
onlyOwner
{
}
function setVibListMerkleRoot(bytes32 _vibListMerkleRoot)
external
onlyOwner {
}
function setBapezListMerkleRoot(bytes32 _bapezListMerkleRoot)
external
onlyOwner
{
}
function pause() external onlyOwner {
}
function unpause() external onlyOwner {
}
//stop transfer on pause
function _beforeTokenTransfers(
address from,
address to,
uint256 tokenId,
uint256 quantity
) internal override(ERC721A) whenNotPaused {
}
function withdraw()
external
onlyOwner
{
}
//this can be used only for reduction.
function reduceSupply(uint256 _burnAmount)
external
onlyOwner
{
}
//this can be used only for reduction during public-sale.
function changeMintPrice(uint256 _mintPrice)
external
onlyPublicSaleActive
onlyOwner
{
}
function changePublicMintLimit(uint256 _newLimit)
external
onlyPublicSaleActive
onlyOwner
{
}
}
| totalSupply()+quantity<=totalColSize,"EXCEED_COL_SIZE" | 193,718 | totalSupply()+quantity<=totalColSize |
"Merkle proof invalid" | /*
#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&--&------&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&-----------&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&-----------------&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&&&&&&--------------------------&&&&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&&&--------------------------------&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&-------------------------------------------&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&-----------------------------------------------&&&&&&&&&&&
(&&&&&&&&&&&&&&&-----------------------------------------------------&&&&&&&&&&&
(&&&&&&&&&&&&--------------------------------------------------------&&&&&&&&&&&
(&&&&&&&&&&&&&&-----------------------------------------------------&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&------------------------------------------------&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&-------------------------------------------------&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&------------------------------------------------&&&&&&&&&&&&&&
(%%%%%%%%%%%%%%%%%------------------------------------------------%%%%%%%%%%%%%%
(%%%%%%%%%%%%%%%%%%%---------------------------------------------%%%%%%%%%%%%%%%
(%%%%%%%%%%%%%%%%%%%%-------------------------------------------%%%%%%%%%%%%%%%%
(%%%%%%%%%%%%%%%%%%%%%%---------------------------------------%%%%%%%%%%%%%%%%%%
(%%%%%%%%%%%%%%%%%%%%%%%%%%-------------------------------%%%%%%%%%%%%%%%%%%%%%%
(%%%%%%%%%%%%-----%%%%%%%%%%%%%%%-----------------------%%%%%%%%%%%%%%%%%%%%%%%%
(%%%%%%%----------------%%%%%%%%-------------------------%%%%%%%%%%%%%%%%%%%%%%%
(%%%%&------%%%%%%%--------%%%%--------------------------%%%%%%%%%%%%%%%%%%%%%%%
(%%%-----&%%%%%%%%%%%%%-----%%---------------------------%%%%%%%%%%%%%%%%%%%%%%%
/%%%-----%%%%%%%%%%%%%%%%---------------------------------%%%%%%%%%%%%%%%%%%%%%%
/%%%-----%%---%%%%%%%%%%%%--------------------------------%%%%%%%%%%%%%%%%%%%%%%
/%%%%----------%%%%%%%%%%%--------------------------------%%%%%%%%%%%%%%%%%%%%%%
/%%%%%%%------%%%%%%%%%%%---------------------------------%%%%%%%%%%%%%%%%%%%%%%
/%%%%%%%%%%%%%%%%%%%%%%%%----------------------------------%%%%%%%%%%%%%%%%%%%%%
/%%%%%%%%%%%%%%%%%%%%%% @creator: BapezNFT %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
/%%%%%%%%%%%%%%%%%%%%% @author: debugger, twitter.com/debuggerguy %%%%%%%%%%%%%%
*/
pragma solidity ^0.8.0;
contract Bapez is ERC721A, Ownable, Pausable
{
uint256 private constant TRIO_PRICE = 0.15 ether; //Price of 3 on presale
uint256 private constant PRESALE_LIMIT = 3 ;
uint256 public mintPrice = 0.055 ether;
uint256 public totalColSize = 5555;
uint256 private publicLimit = 5 ;
bytes32 public bapezListMerkleRoot = 0x9bfbe7d1b76465602a0dd613a1349e376fcddd3e7031bfcc9f6e77278fdbc9b0;
bytes32 public vibListMerkleRoot = 0xb72627c9af7cc26c6d5227e2ad9569d6055a386f9043c458e14ce0f19927a616;
string private _baseTokenURI;
bool public publicSaleActive;
bool public bapezListSaleActive;
bool public vibListSaleActive;
mapping(address => uint256) public bapezMintList;
mapping(address => uint256) public vibMintList;
mapping(address => uint256) public publicMintList;
address public mdProvider;
constructor
(
string memory _name,
string memory _symbol,
address _mdProvider
) ERC721A(_name, _symbol)
{
}
modifier callerIsUser()
{
}
modifier onlyPublicSaleActive() {
}
modifier onlyBapezListSaleActive() {
}
modifier onlyVibListSaleActive() {
}
function setMdProvider(address _mdProvider) external onlyOwner {
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
function _startTokenId() internal pure override returns (uint256) {
}
function vibListMint(bytes32[] calldata _merkleProof, uint256 quantity)
external
payable
onlyVibListSaleActive
callerIsUser
{
require(vibMintList[msg.sender] + quantity <= PRESALE_LIMIT, "Up to 3 mints allowed");
require(msg.value >= ( quantity == 3 ? TRIO_PRICE : mintPrice * quantity ), "Insufficient funds");
require(totalSupply() + quantity <= totalColSize, "EXCEED_COL_SIZE");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(<FILL_ME>)
vibMintList[msg.sender] += quantity;
_safeMint(msg.sender, quantity);
}
function bapezListMint(bytes32[] calldata _merkleProof, uint256 quantity)
external
payable
onlyBapezListSaleActive
callerIsUser
{
}
function publicMint(uint256 quantity)
external
payable
onlyPublicSaleActive
callerIsUser
{
}
//owner can mint just during public sale not to affect high prioritized levels.
function ownerMint(uint256 quantity)
external
payable
onlyPublicSaleActive
onlyOwner
{
}
function toggleVibListSale()
external
onlyOwner {
}
function toggleBapezListSale()
external
onlyOwner
{
}
function togglePublicSale()
external
onlyOwner
{
}
function setVibListMerkleRoot(bytes32 _vibListMerkleRoot)
external
onlyOwner {
}
function setBapezListMerkleRoot(bytes32 _bapezListMerkleRoot)
external
onlyOwner
{
}
function pause() external onlyOwner {
}
function unpause() external onlyOwner {
}
//stop transfer on pause
function _beforeTokenTransfers(
address from,
address to,
uint256 tokenId,
uint256 quantity
) internal override(ERC721A) whenNotPaused {
}
function withdraw()
external
onlyOwner
{
}
//this can be used only for reduction.
function reduceSupply(uint256 _burnAmount)
external
onlyOwner
{
}
//this can be used only for reduction during public-sale.
function changeMintPrice(uint256 _mintPrice)
external
onlyPublicSaleActive
onlyOwner
{
}
function changePublicMintLimit(uint256 _newLimit)
external
onlyPublicSaleActive
onlyOwner
{
}
}
| MerkleProof.verify(_merkleProof,vibListMerkleRoot,leaf),"Merkle proof invalid" | 193,718 | MerkleProof.verify(_merkleProof,vibListMerkleRoot,leaf) |
"Up to 3 mints allowed" | /*
#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&--&------&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&-----------&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&-----------------&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&&&&&&--------------------------&&&&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&&&--------------------------------&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&-------------------------------------------&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&-----------------------------------------------&&&&&&&&&&&
(&&&&&&&&&&&&&&&-----------------------------------------------------&&&&&&&&&&&
(&&&&&&&&&&&&--------------------------------------------------------&&&&&&&&&&&
(&&&&&&&&&&&&&&-----------------------------------------------------&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&------------------------------------------------&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&-------------------------------------------------&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&------------------------------------------------&&&&&&&&&&&&&&
(%%%%%%%%%%%%%%%%%------------------------------------------------%%%%%%%%%%%%%%
(%%%%%%%%%%%%%%%%%%%---------------------------------------------%%%%%%%%%%%%%%%
(%%%%%%%%%%%%%%%%%%%%-------------------------------------------%%%%%%%%%%%%%%%%
(%%%%%%%%%%%%%%%%%%%%%%---------------------------------------%%%%%%%%%%%%%%%%%%
(%%%%%%%%%%%%%%%%%%%%%%%%%%-------------------------------%%%%%%%%%%%%%%%%%%%%%%
(%%%%%%%%%%%%-----%%%%%%%%%%%%%%%-----------------------%%%%%%%%%%%%%%%%%%%%%%%%
(%%%%%%%----------------%%%%%%%%-------------------------%%%%%%%%%%%%%%%%%%%%%%%
(%%%%&------%%%%%%%--------%%%%--------------------------%%%%%%%%%%%%%%%%%%%%%%%
(%%%-----&%%%%%%%%%%%%%-----%%---------------------------%%%%%%%%%%%%%%%%%%%%%%%
/%%%-----%%%%%%%%%%%%%%%%---------------------------------%%%%%%%%%%%%%%%%%%%%%%
/%%%-----%%---%%%%%%%%%%%%--------------------------------%%%%%%%%%%%%%%%%%%%%%%
/%%%%----------%%%%%%%%%%%--------------------------------%%%%%%%%%%%%%%%%%%%%%%
/%%%%%%%------%%%%%%%%%%%---------------------------------%%%%%%%%%%%%%%%%%%%%%%
/%%%%%%%%%%%%%%%%%%%%%%%%----------------------------------%%%%%%%%%%%%%%%%%%%%%
/%%%%%%%%%%%%%%%%%%%%%% @creator: BapezNFT %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
/%%%%%%%%%%%%%%%%%%%%% @author: debugger, twitter.com/debuggerguy %%%%%%%%%%%%%%
*/
pragma solidity ^0.8.0;
contract Bapez is ERC721A, Ownable, Pausable
{
uint256 private constant TRIO_PRICE = 0.15 ether; //Price of 3 on presale
uint256 private constant PRESALE_LIMIT = 3 ;
uint256 public mintPrice = 0.055 ether;
uint256 public totalColSize = 5555;
uint256 private publicLimit = 5 ;
bytes32 public bapezListMerkleRoot = 0x9bfbe7d1b76465602a0dd613a1349e376fcddd3e7031bfcc9f6e77278fdbc9b0;
bytes32 public vibListMerkleRoot = 0xb72627c9af7cc26c6d5227e2ad9569d6055a386f9043c458e14ce0f19927a616;
string private _baseTokenURI;
bool public publicSaleActive;
bool public bapezListSaleActive;
bool public vibListSaleActive;
mapping(address => uint256) public bapezMintList;
mapping(address => uint256) public vibMintList;
mapping(address => uint256) public publicMintList;
address public mdProvider;
constructor
(
string memory _name,
string memory _symbol,
address _mdProvider
) ERC721A(_name, _symbol)
{
}
modifier callerIsUser()
{
}
modifier onlyPublicSaleActive() {
}
modifier onlyBapezListSaleActive() {
}
modifier onlyVibListSaleActive() {
}
function setMdProvider(address _mdProvider) external onlyOwner {
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
function _startTokenId() internal pure override returns (uint256) {
}
function vibListMint(bytes32[] calldata _merkleProof, uint256 quantity)
external
payable
onlyVibListSaleActive
callerIsUser
{
}
function bapezListMint(bytes32[] calldata _merkleProof, uint256 quantity)
external
payable
onlyBapezListSaleActive
callerIsUser
{
require(<FILL_ME>)
require(msg.value >= (quantity == 3 ? TRIO_PRICE : mintPrice * quantity), "Insufficient funds");
require(totalSupply() + quantity <= totalColSize, "EXCEED_COL_SIZE");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(
MerkleProof.verify(_merkleProof, bapezListMerkleRoot, leaf),
"Merkle Proof Invalid"
);
bapezMintList[msg.sender] += quantity;
_safeMint(msg.sender, quantity);
}
function publicMint(uint256 quantity)
external
payable
onlyPublicSaleActive
callerIsUser
{
}
//owner can mint just during public sale not to affect high prioritized levels.
function ownerMint(uint256 quantity)
external
payable
onlyPublicSaleActive
onlyOwner
{
}
function toggleVibListSale()
external
onlyOwner {
}
function toggleBapezListSale()
external
onlyOwner
{
}
function togglePublicSale()
external
onlyOwner
{
}
function setVibListMerkleRoot(bytes32 _vibListMerkleRoot)
external
onlyOwner {
}
function setBapezListMerkleRoot(bytes32 _bapezListMerkleRoot)
external
onlyOwner
{
}
function pause() external onlyOwner {
}
function unpause() external onlyOwner {
}
//stop transfer on pause
function _beforeTokenTransfers(
address from,
address to,
uint256 tokenId,
uint256 quantity
) internal override(ERC721A) whenNotPaused {
}
function withdraw()
external
onlyOwner
{
}
//this can be used only for reduction.
function reduceSupply(uint256 _burnAmount)
external
onlyOwner
{
}
//this can be used only for reduction during public-sale.
function changeMintPrice(uint256 _mintPrice)
external
onlyPublicSaleActive
onlyOwner
{
}
function changePublicMintLimit(uint256 _newLimit)
external
onlyPublicSaleActive
onlyOwner
{
}
}
| bapezMintList[msg.sender]+quantity<=PRESALE_LIMIT,"Up to 3 mints allowed" | 193,718 | bapezMintList[msg.sender]+quantity<=PRESALE_LIMIT |
"Merkle Proof Invalid" | /*
#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&--&------&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&-----------&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&-----------------&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&&&&&&--------------------------&&&&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&&&--------------------------------&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&-------------------------------------------&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&-----------------------------------------------&&&&&&&&&&&
(&&&&&&&&&&&&&&&-----------------------------------------------------&&&&&&&&&&&
(&&&&&&&&&&&&--------------------------------------------------------&&&&&&&&&&&
(&&&&&&&&&&&&&&-----------------------------------------------------&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&------------------------------------------------&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&-------------------------------------------------&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&------------------------------------------------&&&&&&&&&&&&&&
(%%%%%%%%%%%%%%%%%------------------------------------------------%%%%%%%%%%%%%%
(%%%%%%%%%%%%%%%%%%%---------------------------------------------%%%%%%%%%%%%%%%
(%%%%%%%%%%%%%%%%%%%%-------------------------------------------%%%%%%%%%%%%%%%%
(%%%%%%%%%%%%%%%%%%%%%%---------------------------------------%%%%%%%%%%%%%%%%%%
(%%%%%%%%%%%%%%%%%%%%%%%%%%-------------------------------%%%%%%%%%%%%%%%%%%%%%%
(%%%%%%%%%%%%-----%%%%%%%%%%%%%%%-----------------------%%%%%%%%%%%%%%%%%%%%%%%%
(%%%%%%%----------------%%%%%%%%-------------------------%%%%%%%%%%%%%%%%%%%%%%%
(%%%%&------%%%%%%%--------%%%%--------------------------%%%%%%%%%%%%%%%%%%%%%%%
(%%%-----&%%%%%%%%%%%%%-----%%---------------------------%%%%%%%%%%%%%%%%%%%%%%%
/%%%-----%%%%%%%%%%%%%%%%---------------------------------%%%%%%%%%%%%%%%%%%%%%%
/%%%-----%%---%%%%%%%%%%%%--------------------------------%%%%%%%%%%%%%%%%%%%%%%
/%%%%----------%%%%%%%%%%%--------------------------------%%%%%%%%%%%%%%%%%%%%%%
/%%%%%%%------%%%%%%%%%%%---------------------------------%%%%%%%%%%%%%%%%%%%%%%
/%%%%%%%%%%%%%%%%%%%%%%%%----------------------------------%%%%%%%%%%%%%%%%%%%%%
/%%%%%%%%%%%%%%%%%%%%%% @creator: BapezNFT %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
/%%%%%%%%%%%%%%%%%%%%% @author: debugger, twitter.com/debuggerguy %%%%%%%%%%%%%%
*/
pragma solidity ^0.8.0;
contract Bapez is ERC721A, Ownable, Pausable
{
uint256 private constant TRIO_PRICE = 0.15 ether; //Price of 3 on presale
uint256 private constant PRESALE_LIMIT = 3 ;
uint256 public mintPrice = 0.055 ether;
uint256 public totalColSize = 5555;
uint256 private publicLimit = 5 ;
bytes32 public bapezListMerkleRoot = 0x9bfbe7d1b76465602a0dd613a1349e376fcddd3e7031bfcc9f6e77278fdbc9b0;
bytes32 public vibListMerkleRoot = 0xb72627c9af7cc26c6d5227e2ad9569d6055a386f9043c458e14ce0f19927a616;
string private _baseTokenURI;
bool public publicSaleActive;
bool public bapezListSaleActive;
bool public vibListSaleActive;
mapping(address => uint256) public bapezMintList;
mapping(address => uint256) public vibMintList;
mapping(address => uint256) public publicMintList;
address public mdProvider;
constructor
(
string memory _name,
string memory _symbol,
address _mdProvider
) ERC721A(_name, _symbol)
{
}
modifier callerIsUser()
{
}
modifier onlyPublicSaleActive() {
}
modifier onlyBapezListSaleActive() {
}
modifier onlyVibListSaleActive() {
}
function setMdProvider(address _mdProvider) external onlyOwner {
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
function _startTokenId() internal pure override returns (uint256) {
}
function vibListMint(bytes32[] calldata _merkleProof, uint256 quantity)
external
payable
onlyVibListSaleActive
callerIsUser
{
}
function bapezListMint(bytes32[] calldata _merkleProof, uint256 quantity)
external
payable
onlyBapezListSaleActive
callerIsUser
{
require(bapezMintList[msg.sender] + quantity <= PRESALE_LIMIT, "Up to 3 mints allowed");
require(msg.value >= (quantity == 3 ? TRIO_PRICE : mintPrice * quantity), "Insufficient funds");
require(totalSupply() + quantity <= totalColSize, "EXCEED_COL_SIZE");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(<FILL_ME>)
bapezMintList[msg.sender] += quantity;
_safeMint(msg.sender, quantity);
}
function publicMint(uint256 quantity)
external
payable
onlyPublicSaleActive
callerIsUser
{
}
//owner can mint just during public sale not to affect high prioritized levels.
function ownerMint(uint256 quantity)
external
payable
onlyPublicSaleActive
onlyOwner
{
}
function toggleVibListSale()
external
onlyOwner {
}
function toggleBapezListSale()
external
onlyOwner
{
}
function togglePublicSale()
external
onlyOwner
{
}
function setVibListMerkleRoot(bytes32 _vibListMerkleRoot)
external
onlyOwner {
}
function setBapezListMerkleRoot(bytes32 _bapezListMerkleRoot)
external
onlyOwner
{
}
function pause() external onlyOwner {
}
function unpause() external onlyOwner {
}
//stop transfer on pause
function _beforeTokenTransfers(
address from,
address to,
uint256 tokenId,
uint256 quantity
) internal override(ERC721A) whenNotPaused {
}
function withdraw()
external
onlyOwner
{
}
//this can be used only for reduction.
function reduceSupply(uint256 _burnAmount)
external
onlyOwner
{
}
//this can be used only for reduction during public-sale.
function changeMintPrice(uint256 _mintPrice)
external
onlyPublicSaleActive
onlyOwner
{
}
function changePublicMintLimit(uint256 _newLimit)
external
onlyPublicSaleActive
onlyOwner
{
}
}
| MerkleProof.verify(_merkleProof,bapezListMerkleRoot,leaf),"Merkle Proof Invalid" | 193,718 | MerkleProof.verify(_merkleProof,bapezListMerkleRoot,leaf) |
"Up to 5 mints allowed" | /*
#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&--&------&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&-----------&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&-----------------&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&&&&&&--------------------------&&&&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&&&--------------------------------&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&-------------------------------------------&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&-----------------------------------------------&&&&&&&&&&&
(&&&&&&&&&&&&&&&-----------------------------------------------------&&&&&&&&&&&
(&&&&&&&&&&&&--------------------------------------------------------&&&&&&&&&&&
(&&&&&&&&&&&&&&-----------------------------------------------------&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&------------------------------------------------&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&-------------------------------------------------&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&------------------------------------------------&&&&&&&&&&&&&&
(%%%%%%%%%%%%%%%%%------------------------------------------------%%%%%%%%%%%%%%
(%%%%%%%%%%%%%%%%%%%---------------------------------------------%%%%%%%%%%%%%%%
(%%%%%%%%%%%%%%%%%%%%-------------------------------------------%%%%%%%%%%%%%%%%
(%%%%%%%%%%%%%%%%%%%%%%---------------------------------------%%%%%%%%%%%%%%%%%%
(%%%%%%%%%%%%%%%%%%%%%%%%%%-------------------------------%%%%%%%%%%%%%%%%%%%%%%
(%%%%%%%%%%%%-----%%%%%%%%%%%%%%%-----------------------%%%%%%%%%%%%%%%%%%%%%%%%
(%%%%%%%----------------%%%%%%%%-------------------------%%%%%%%%%%%%%%%%%%%%%%%
(%%%%&------%%%%%%%--------%%%%--------------------------%%%%%%%%%%%%%%%%%%%%%%%
(%%%-----&%%%%%%%%%%%%%-----%%---------------------------%%%%%%%%%%%%%%%%%%%%%%%
/%%%-----%%%%%%%%%%%%%%%%---------------------------------%%%%%%%%%%%%%%%%%%%%%%
/%%%-----%%---%%%%%%%%%%%%--------------------------------%%%%%%%%%%%%%%%%%%%%%%
/%%%%----------%%%%%%%%%%%--------------------------------%%%%%%%%%%%%%%%%%%%%%%
/%%%%%%%------%%%%%%%%%%%---------------------------------%%%%%%%%%%%%%%%%%%%%%%
/%%%%%%%%%%%%%%%%%%%%%%%%----------------------------------%%%%%%%%%%%%%%%%%%%%%
/%%%%%%%%%%%%%%%%%%%%%% @creator: BapezNFT %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
/%%%%%%%%%%%%%%%%%%%%% @author: debugger, twitter.com/debuggerguy %%%%%%%%%%%%%%
*/
pragma solidity ^0.8.0;
contract Bapez is ERC721A, Ownable, Pausable
{
uint256 private constant TRIO_PRICE = 0.15 ether; //Price of 3 on presale
uint256 private constant PRESALE_LIMIT = 3 ;
uint256 public mintPrice = 0.055 ether;
uint256 public totalColSize = 5555;
uint256 private publicLimit = 5 ;
bytes32 public bapezListMerkleRoot = 0x9bfbe7d1b76465602a0dd613a1349e376fcddd3e7031bfcc9f6e77278fdbc9b0;
bytes32 public vibListMerkleRoot = 0xb72627c9af7cc26c6d5227e2ad9569d6055a386f9043c458e14ce0f19927a616;
string private _baseTokenURI;
bool public publicSaleActive;
bool public bapezListSaleActive;
bool public vibListSaleActive;
mapping(address => uint256) public bapezMintList;
mapping(address => uint256) public vibMintList;
mapping(address => uint256) public publicMintList;
address public mdProvider;
constructor
(
string memory _name,
string memory _symbol,
address _mdProvider
) ERC721A(_name, _symbol)
{
}
modifier callerIsUser()
{
}
modifier onlyPublicSaleActive() {
}
modifier onlyBapezListSaleActive() {
}
modifier onlyVibListSaleActive() {
}
function setMdProvider(address _mdProvider) external onlyOwner {
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
function _startTokenId() internal pure override returns (uint256) {
}
function vibListMint(bytes32[] calldata _merkleProof, uint256 quantity)
external
payable
onlyVibListSaleActive
callerIsUser
{
}
function bapezListMint(bytes32[] calldata _merkleProof, uint256 quantity)
external
payable
onlyBapezListSaleActive
callerIsUser
{
}
function publicMint(uint256 quantity)
external
payable
onlyPublicSaleActive
callerIsUser
{
require(<FILL_ME>)
require(msg.value >= mintPrice * quantity, "Insufficient funds");
require(totalSupply() + quantity <= totalColSize, "EXCEED_COL_SIZE");
publicMintList[msg.sender] += quantity;
_safeMint(msg.sender, quantity);
}
//owner can mint just during public sale not to affect high prioritized levels.
function ownerMint(uint256 quantity)
external
payable
onlyPublicSaleActive
onlyOwner
{
}
function toggleVibListSale()
external
onlyOwner {
}
function toggleBapezListSale()
external
onlyOwner
{
}
function togglePublicSale()
external
onlyOwner
{
}
function setVibListMerkleRoot(bytes32 _vibListMerkleRoot)
external
onlyOwner {
}
function setBapezListMerkleRoot(bytes32 _bapezListMerkleRoot)
external
onlyOwner
{
}
function pause() external onlyOwner {
}
function unpause() external onlyOwner {
}
//stop transfer on pause
function _beforeTokenTransfers(
address from,
address to,
uint256 tokenId,
uint256 quantity
) internal override(ERC721A) whenNotPaused {
}
function withdraw()
external
onlyOwner
{
}
//this can be used only for reduction.
function reduceSupply(uint256 _burnAmount)
external
onlyOwner
{
}
//this can be used only for reduction during public-sale.
function changeMintPrice(uint256 _mintPrice)
external
onlyPublicSaleActive
onlyOwner
{
}
function changePublicMintLimit(uint256 _newLimit)
external
onlyPublicSaleActive
onlyOwner
{
}
}
| publicMintList[msg.sender]+quantity<=publicLimit,"Up to 5 mints allowed" | 193,718 | publicMintList[msg.sender]+quantity<=publicLimit |
"Too late" | /*
#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&--&------&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&-----------&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&-----------------&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&&&&&&--------------------------&&&&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&&&--------------------------------&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&-------------------------------------------&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&-----------------------------------------------&&&&&&&&&&&
(&&&&&&&&&&&&&&&-----------------------------------------------------&&&&&&&&&&&
(&&&&&&&&&&&&--------------------------------------------------------&&&&&&&&&&&
(&&&&&&&&&&&&&&-----------------------------------------------------&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&------------------------------------------------&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&-------------------------------------------------&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&------------------------------------------------&&&&&&&&&&&&&&
(%%%%%%%%%%%%%%%%%------------------------------------------------%%%%%%%%%%%%%%
(%%%%%%%%%%%%%%%%%%%---------------------------------------------%%%%%%%%%%%%%%%
(%%%%%%%%%%%%%%%%%%%%-------------------------------------------%%%%%%%%%%%%%%%%
(%%%%%%%%%%%%%%%%%%%%%%---------------------------------------%%%%%%%%%%%%%%%%%%
(%%%%%%%%%%%%%%%%%%%%%%%%%%-------------------------------%%%%%%%%%%%%%%%%%%%%%%
(%%%%%%%%%%%%-----%%%%%%%%%%%%%%%-----------------------%%%%%%%%%%%%%%%%%%%%%%%%
(%%%%%%%----------------%%%%%%%%-------------------------%%%%%%%%%%%%%%%%%%%%%%%
(%%%%&------%%%%%%%--------%%%%--------------------------%%%%%%%%%%%%%%%%%%%%%%%
(%%%-----&%%%%%%%%%%%%%-----%%---------------------------%%%%%%%%%%%%%%%%%%%%%%%
/%%%-----%%%%%%%%%%%%%%%%---------------------------------%%%%%%%%%%%%%%%%%%%%%%
/%%%-----%%---%%%%%%%%%%%%--------------------------------%%%%%%%%%%%%%%%%%%%%%%
/%%%%----------%%%%%%%%%%%--------------------------------%%%%%%%%%%%%%%%%%%%%%%
/%%%%%%%------%%%%%%%%%%%---------------------------------%%%%%%%%%%%%%%%%%%%%%%
/%%%%%%%%%%%%%%%%%%%%%%%%----------------------------------%%%%%%%%%%%%%%%%%%%%%
/%%%%%%%%%%%%%%%%%%%%%% @creator: BapezNFT %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
/%%%%%%%%%%%%%%%%%%%%% @author: debugger, twitter.com/debuggerguy %%%%%%%%%%%%%%
*/
pragma solidity ^0.8.0;
contract Bapez is ERC721A, Ownable, Pausable
{
uint256 private constant TRIO_PRICE = 0.15 ether; //Price of 3 on presale
uint256 private constant PRESALE_LIMIT = 3 ;
uint256 public mintPrice = 0.055 ether;
uint256 public totalColSize = 5555;
uint256 private publicLimit = 5 ;
bytes32 public bapezListMerkleRoot = 0x9bfbe7d1b76465602a0dd613a1349e376fcddd3e7031bfcc9f6e77278fdbc9b0;
bytes32 public vibListMerkleRoot = 0xb72627c9af7cc26c6d5227e2ad9569d6055a386f9043c458e14ce0f19927a616;
string private _baseTokenURI;
bool public publicSaleActive;
bool public bapezListSaleActive;
bool public vibListSaleActive;
mapping(address => uint256) public bapezMintList;
mapping(address => uint256) public vibMintList;
mapping(address => uint256) public publicMintList;
address public mdProvider;
constructor
(
string memory _name,
string memory _symbol,
address _mdProvider
) ERC721A(_name, _symbol)
{
}
modifier callerIsUser()
{
}
modifier onlyPublicSaleActive() {
}
modifier onlyBapezListSaleActive() {
}
modifier onlyVibListSaleActive() {
}
function setMdProvider(address _mdProvider) external onlyOwner {
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
function _startTokenId() internal pure override returns (uint256) {
}
function vibListMint(bytes32[] calldata _merkleProof, uint256 quantity)
external
payable
onlyVibListSaleActive
callerIsUser
{
}
function bapezListMint(bytes32[] calldata _merkleProof, uint256 quantity)
external
payable
onlyBapezListSaleActive
callerIsUser
{
}
function publicMint(uint256 quantity)
external
payable
onlyPublicSaleActive
callerIsUser
{
}
//owner can mint just during public sale not to affect high prioritized levels.
function ownerMint(uint256 quantity)
external
payable
onlyPublicSaleActive
onlyOwner
{
}
function toggleVibListSale()
external
onlyOwner {
}
function toggleBapezListSale()
external
onlyOwner
{
}
function togglePublicSale()
external
onlyOwner
{
}
function setVibListMerkleRoot(bytes32 _vibListMerkleRoot)
external
onlyOwner {
}
function setBapezListMerkleRoot(bytes32 _bapezListMerkleRoot)
external
onlyOwner
{
}
function pause() external onlyOwner {
}
function unpause() external onlyOwner {
}
//stop transfer on pause
function _beforeTokenTransfers(
address from,
address to,
uint256 tokenId,
uint256 quantity
) internal override(ERC721A) whenNotPaused {
}
function withdraw()
external
onlyOwner
{
}
//this can be used only for reduction.
function reduceSupply(uint256 _burnAmount)
external
onlyOwner
{
require(_burnAmount > 0 ,"Just for reduction");
require(<FILL_ME>)
require(totalColSize - _burnAmount >= totalSupply() ,"Insufficient amount" );
totalColSize -= _burnAmount;
}
//this can be used only for reduction during public-sale.
function changeMintPrice(uint256 _mintPrice)
external
onlyPublicSaleActive
onlyOwner
{
}
function changePublicMintLimit(uint256 _newLimit)
external
onlyPublicSaleActive
onlyOwner
{
}
}
| totalSupply()<totalColSize,"Too late" | 193,718 | totalSupply()<totalColSize |
"Insufficient amount" | /*
#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&--&------&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&-----------&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&-----------------&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&&&&&&--------------------------&&&&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&&&--------------------------------&&&&&&&&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&&&-------------------------------------------&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&&&&&-----------------------------------------------&&&&&&&&&&&
(&&&&&&&&&&&&&&&-----------------------------------------------------&&&&&&&&&&&
(&&&&&&&&&&&&--------------------------------------------------------&&&&&&&&&&&
(&&&&&&&&&&&&&&-----------------------------------------------------&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&------------------------------------------------&&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&-------------------------------------------------&&&&&&&&&&&&&&
(&&&&&&&&&&&&&&&&&------------------------------------------------&&&&&&&&&&&&&&
(%%%%%%%%%%%%%%%%%------------------------------------------------%%%%%%%%%%%%%%
(%%%%%%%%%%%%%%%%%%%---------------------------------------------%%%%%%%%%%%%%%%
(%%%%%%%%%%%%%%%%%%%%-------------------------------------------%%%%%%%%%%%%%%%%
(%%%%%%%%%%%%%%%%%%%%%%---------------------------------------%%%%%%%%%%%%%%%%%%
(%%%%%%%%%%%%%%%%%%%%%%%%%%-------------------------------%%%%%%%%%%%%%%%%%%%%%%
(%%%%%%%%%%%%-----%%%%%%%%%%%%%%%-----------------------%%%%%%%%%%%%%%%%%%%%%%%%
(%%%%%%%----------------%%%%%%%%-------------------------%%%%%%%%%%%%%%%%%%%%%%%
(%%%%&------%%%%%%%--------%%%%--------------------------%%%%%%%%%%%%%%%%%%%%%%%
(%%%-----&%%%%%%%%%%%%%-----%%---------------------------%%%%%%%%%%%%%%%%%%%%%%%
/%%%-----%%%%%%%%%%%%%%%%---------------------------------%%%%%%%%%%%%%%%%%%%%%%
/%%%-----%%---%%%%%%%%%%%%--------------------------------%%%%%%%%%%%%%%%%%%%%%%
/%%%%----------%%%%%%%%%%%--------------------------------%%%%%%%%%%%%%%%%%%%%%%
/%%%%%%%------%%%%%%%%%%%---------------------------------%%%%%%%%%%%%%%%%%%%%%%
/%%%%%%%%%%%%%%%%%%%%%%%%----------------------------------%%%%%%%%%%%%%%%%%%%%%
/%%%%%%%%%%%%%%%%%%%%%% @creator: BapezNFT %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
/%%%%%%%%%%%%%%%%%%%%% @author: debugger, twitter.com/debuggerguy %%%%%%%%%%%%%%
*/
pragma solidity ^0.8.0;
contract Bapez is ERC721A, Ownable, Pausable
{
uint256 private constant TRIO_PRICE = 0.15 ether; //Price of 3 on presale
uint256 private constant PRESALE_LIMIT = 3 ;
uint256 public mintPrice = 0.055 ether;
uint256 public totalColSize = 5555;
uint256 private publicLimit = 5 ;
bytes32 public bapezListMerkleRoot = 0x9bfbe7d1b76465602a0dd613a1349e376fcddd3e7031bfcc9f6e77278fdbc9b0;
bytes32 public vibListMerkleRoot = 0xb72627c9af7cc26c6d5227e2ad9569d6055a386f9043c458e14ce0f19927a616;
string private _baseTokenURI;
bool public publicSaleActive;
bool public bapezListSaleActive;
bool public vibListSaleActive;
mapping(address => uint256) public bapezMintList;
mapping(address => uint256) public vibMintList;
mapping(address => uint256) public publicMintList;
address public mdProvider;
constructor
(
string memory _name,
string memory _symbol,
address _mdProvider
) ERC721A(_name, _symbol)
{
}
modifier callerIsUser()
{
}
modifier onlyPublicSaleActive() {
}
modifier onlyBapezListSaleActive() {
}
modifier onlyVibListSaleActive() {
}
function setMdProvider(address _mdProvider) external onlyOwner {
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
function _startTokenId() internal pure override returns (uint256) {
}
function vibListMint(bytes32[] calldata _merkleProof, uint256 quantity)
external
payable
onlyVibListSaleActive
callerIsUser
{
}
function bapezListMint(bytes32[] calldata _merkleProof, uint256 quantity)
external
payable
onlyBapezListSaleActive
callerIsUser
{
}
function publicMint(uint256 quantity)
external
payable
onlyPublicSaleActive
callerIsUser
{
}
//owner can mint just during public sale not to affect high prioritized levels.
function ownerMint(uint256 quantity)
external
payable
onlyPublicSaleActive
onlyOwner
{
}
function toggleVibListSale()
external
onlyOwner {
}
function toggleBapezListSale()
external
onlyOwner
{
}
function togglePublicSale()
external
onlyOwner
{
}
function setVibListMerkleRoot(bytes32 _vibListMerkleRoot)
external
onlyOwner {
}
function setBapezListMerkleRoot(bytes32 _bapezListMerkleRoot)
external
onlyOwner
{
}
function pause() external onlyOwner {
}
function unpause() external onlyOwner {
}
//stop transfer on pause
function _beforeTokenTransfers(
address from,
address to,
uint256 tokenId,
uint256 quantity
) internal override(ERC721A) whenNotPaused {
}
function withdraw()
external
onlyOwner
{
}
//this can be used only for reduction.
function reduceSupply(uint256 _burnAmount)
external
onlyOwner
{
require(_burnAmount > 0 ,"Just for reduction");
require(totalSupply() < totalColSize ,"Too late" );
require(<FILL_ME>)
totalColSize -= _burnAmount;
}
//this can be used only for reduction during public-sale.
function changeMintPrice(uint256 _mintPrice)
external
onlyPublicSaleActive
onlyOwner
{
}
function changePublicMintLimit(uint256 _newLimit)
external
onlyPublicSaleActive
onlyOwner
{
}
}
| totalColSize-_burnAmount>=totalSupply(),"Insufficient amount" | 193,718 | totalColSize-_burnAmount>=totalSupply() |
"Amount exceeds supply." | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
/// @author no-op.eth (nft-lab.xyz)
/// @title DomainPlug Membership Pass
contract DomainPlugPass is ERC1155, Ownable {
/** Name of collection */
string public constant name = "DomainPlug Membership Pass";
/** Symbol of collection */
string public constant symbol = "DMP";
/** Maximum amount of tokens in collection */
uint256 public constant MAX_SUPPLY = 1000;
/** Maximum amount of tokens mintable per tx */
uint256 public constant MAX_TX = 4;
/** Cost per mint */
uint256 public cost = 0.25 ether;
/** URI for the contract metadata */
string public contractURI;
/** Funds recipient */
address public recipient;
/** Total supply */
uint256 private _supply = 0;
/** Sale state */
bool public saleActive = false;
/** Notify on sale state change */
event SaleStateChanged(bool _val);
/** Notify on total supply change */
event TotalSupplyChanged(uint256 _val);
/** For URI conversions */
using Strings for uint256;
constructor(string memory _uri) ERC1155(_uri) {}
/// @notice Sets public sale state
/// @param _val The new value
function setSaleState(bool _val) external onlyOwner {
}
/// @notice Sets cost per mint
/// @param _val New price
/// @dev Send in WEI
function setCost(uint256 _val) external onlyOwner {
}
/// @notice Sets a new funds recipient
/// @param _val New address
function setRecipient(address _val) external onlyOwner {
}
/// @notice Sets the base metadata URI
/// @param _val The new URI
function setBaseURI(string memory _val) external onlyOwner {
}
/// @notice Sets the contract metadata URI
/// @param _val The new URI
function setContractURI(string memory _val) external onlyOwner {
}
/// @notice Returns the amount of tokens sold
/// @return supply The number of tokens sold
function totalSupply() public view returns (uint256) {
}
/// @notice Returns the URI for a given token ID
/// @param _id The ID to return URI for
/// @return Token URI
function uri(uint256 _id) public view override returns (string memory) {
}
/// @notice Withdraws contract funds
function withdraw() public payable onlyOwner {
}
/// @notice Reserves a set of NFTs for collection owner (giveaways, etc)
/// @param _amt The amount to reserve
function reserve(uint256 _amt) external onlyOwner {
require(<FILL_ME>)
_supply += _amt;
_mint(msg.sender, 0, _amt, "0x0000");
emit TotalSupplyChanged(totalSupply());
}
/// @notice Mints a new token in public sale
/// @param _quantity Amount to be minted
/// @dev Must send COST * amt in wei
function mint(uint256 _quantity) external payable {
}
}
| _supply+_amt<=MAX_SUPPLY,"Amount exceeds supply." | 193,726 | _supply+_amt<=MAX_SUPPLY |
"Amount exceeds supply." | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
/// @author no-op.eth (nft-lab.xyz)
/// @title DomainPlug Membership Pass
contract DomainPlugPass is ERC1155, Ownable {
/** Name of collection */
string public constant name = "DomainPlug Membership Pass";
/** Symbol of collection */
string public constant symbol = "DMP";
/** Maximum amount of tokens in collection */
uint256 public constant MAX_SUPPLY = 1000;
/** Maximum amount of tokens mintable per tx */
uint256 public constant MAX_TX = 4;
/** Cost per mint */
uint256 public cost = 0.25 ether;
/** URI for the contract metadata */
string public contractURI;
/** Funds recipient */
address public recipient;
/** Total supply */
uint256 private _supply = 0;
/** Sale state */
bool public saleActive = false;
/** Notify on sale state change */
event SaleStateChanged(bool _val);
/** Notify on total supply change */
event TotalSupplyChanged(uint256 _val);
/** For URI conversions */
using Strings for uint256;
constructor(string memory _uri) ERC1155(_uri) {}
/// @notice Sets public sale state
/// @param _val The new value
function setSaleState(bool _val) external onlyOwner {
}
/// @notice Sets cost per mint
/// @param _val New price
/// @dev Send in WEI
function setCost(uint256 _val) external onlyOwner {
}
/// @notice Sets a new funds recipient
/// @param _val New address
function setRecipient(address _val) external onlyOwner {
}
/// @notice Sets the base metadata URI
/// @param _val The new URI
function setBaseURI(string memory _val) external onlyOwner {
}
/// @notice Sets the contract metadata URI
/// @param _val The new URI
function setContractURI(string memory _val) external onlyOwner {
}
/// @notice Returns the amount of tokens sold
/// @return supply The number of tokens sold
function totalSupply() public view returns (uint256) {
}
/// @notice Returns the URI for a given token ID
/// @param _id The ID to return URI for
/// @return Token URI
function uri(uint256 _id) public view override returns (string memory) {
}
/// @notice Withdraws contract funds
function withdraw() public payable onlyOwner {
}
/// @notice Reserves a set of NFTs for collection owner (giveaways, etc)
/// @param _amt The amount to reserve
function reserve(uint256 _amt) external onlyOwner {
}
/// @notice Mints a new token in public sale
/// @param _quantity Amount to be minted
/// @dev Must send COST * amt in wei
function mint(uint256 _quantity) external payable {
require(saleActive, "Sale is not yet active.");
require(_quantity <= MAX_TX, "Amount of tokens exceeds transaction limit.");
require(<FILL_ME>)
require(cost * _quantity == msg.value, "ETH sent not equal to cost.");
_supply += _quantity;
_mint(msg.sender, 0, _quantity, "0x0000");
emit TotalSupplyChanged(totalSupply());
}
}
| _supply+_quantity<=MAX_SUPPLY,"Amount exceeds supply." | 193,726 | _supply+_quantity<=MAX_SUPPLY |
"ETH sent not equal to cost." | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
/// @author no-op.eth (nft-lab.xyz)
/// @title DomainPlug Membership Pass
contract DomainPlugPass is ERC1155, Ownable {
/** Name of collection */
string public constant name = "DomainPlug Membership Pass";
/** Symbol of collection */
string public constant symbol = "DMP";
/** Maximum amount of tokens in collection */
uint256 public constant MAX_SUPPLY = 1000;
/** Maximum amount of tokens mintable per tx */
uint256 public constant MAX_TX = 4;
/** Cost per mint */
uint256 public cost = 0.25 ether;
/** URI for the contract metadata */
string public contractURI;
/** Funds recipient */
address public recipient;
/** Total supply */
uint256 private _supply = 0;
/** Sale state */
bool public saleActive = false;
/** Notify on sale state change */
event SaleStateChanged(bool _val);
/** Notify on total supply change */
event TotalSupplyChanged(uint256 _val);
/** For URI conversions */
using Strings for uint256;
constructor(string memory _uri) ERC1155(_uri) {}
/// @notice Sets public sale state
/// @param _val The new value
function setSaleState(bool _val) external onlyOwner {
}
/// @notice Sets cost per mint
/// @param _val New price
/// @dev Send in WEI
function setCost(uint256 _val) external onlyOwner {
}
/// @notice Sets a new funds recipient
/// @param _val New address
function setRecipient(address _val) external onlyOwner {
}
/// @notice Sets the base metadata URI
/// @param _val The new URI
function setBaseURI(string memory _val) external onlyOwner {
}
/// @notice Sets the contract metadata URI
/// @param _val The new URI
function setContractURI(string memory _val) external onlyOwner {
}
/// @notice Returns the amount of tokens sold
/// @return supply The number of tokens sold
function totalSupply() public view returns (uint256) {
}
/// @notice Returns the URI for a given token ID
/// @param _id The ID to return URI for
/// @return Token URI
function uri(uint256 _id) public view override returns (string memory) {
}
/// @notice Withdraws contract funds
function withdraw() public payable onlyOwner {
}
/// @notice Reserves a set of NFTs for collection owner (giveaways, etc)
/// @param _amt The amount to reserve
function reserve(uint256 _amt) external onlyOwner {
}
/// @notice Mints a new token in public sale
/// @param _quantity Amount to be minted
/// @dev Must send COST * amt in wei
function mint(uint256 _quantity) external payable {
require(saleActive, "Sale is not yet active.");
require(_quantity <= MAX_TX, "Amount of tokens exceeds transaction limit.");
require(_supply + _quantity <= MAX_SUPPLY, "Amount exceeds supply.");
require(<FILL_ME>)
_supply += _quantity;
_mint(msg.sender, 0, _quantity, "0x0000");
emit TotalSupplyChanged(totalSupply());
}
}
| cost*_quantity==msg.value,"ETH sent not equal to cost." | 193,726 | cost*_quantity==msg.value |
CronErrors.EXISTING_POOL | // SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.7.6;
import { IERC20 } from "../balancer-core-v2/lib/openzeppelin/IERC20.sol";
import { IVault } from "../balancer-core-v2/vault/interfaces/IVault.sol";
import { BasePoolFactory } from "../balancer-core-v2/pools/factories/BasePoolFactory.sol";
import { ICronV1PoolFactory } from "../interfaces/ICronV1PoolFactory.sol";
import { ICronV1PoolEnums } from "../interfaces/pool/ICronV1PoolEnums.sol";
import { CronV1Pool } from "../CronV1Pool.sol";
import { requireErrCode, CronErrors } from "../miscellany/Errors.sol";
/// @author Cron Finance
/// @title Cron V1 Pool Factory
contract CronV1PoolFactory is ICronV1PoolFactory, BasePoolFactory {
address public override owner;
address public override pendingOwner;
mapping(address => mapping(address => mapping(uint256 => address))) internal poolMap;
/// @notice Only allows the `owner` to execute the function.
modifier onlyOwner() {
}
/// @notice This function constructs the pool
/// @param _vault The balancer v2 vault
constructor(IVault _vault) BasePoolFactory(_vault) {
}
/// @notice Deploys a new `CronV1Pool`
/// @param _token0 The asset which is converged to ie "base'
/// @param _token1 The asset which converges to the underlying
/// @param _poolType The type of pool (stable, liquid, volatile)
/// @param _name The name of the balancer v2 lp token for this pool
/// @param _symbol The symbol of the balancer v2 lp token for this pool
/// @return The new pool address
function create(
address _token0,
address _token1,
string memory _name,
string memory _symbol,
uint256 _poolType
) external override(ICronV1PoolFactory) returns (address) {
ICronV1PoolEnums.PoolType poolType = ICronV1PoolEnums.PoolType(_poolType);
requireErrCode(_token0 != _token1, CronErrors.IDENTICAL_TOKEN_ADDRESSES);
(address token0, address token1) = _token0 < _token1 ? (_token0, _token1) : (_token1, _token0);
requireErrCode(token0 != address(0), CronErrors.ZERO_TOKEN_ADDRESSES);
require(<FILL_ME>)
address pool = address(new CronV1Pool(IERC20(token0), IERC20(token1), getVault(), _name, _symbol, poolType));
// Register the pool with the vault
_register(pool);
// Stores pool information to prevent duplicates
poolMap[token0][token1][_poolType] = pool;
// Emit a creation event
emit CronV1PoolCreated(pool, _token0, _token1, poolType);
return pool;
}
/// @notice Sets `CronV1Pool` address in the mapping
/// @param _token0 address of token0
/// @param _token1 address of token1
/// @param _poolType type of pool (stable, liquid, volatile)
/// @param _pool address of pool to set in the mapping
function set(
address _token0,
address _token1,
uint256 _poolType,
address _pool
) external override(ICronV1PoolFactory) onlyOwner {
}
/// @notice Removes an already deployed `CronV1Pool` from the mapping
/// WARNING - Best practice to disable Cron-Fi fees before
/// removing it from the factory pool mapping. Also advisable
/// to notify LPs / LT swappers in some way that this is
/// occurring.
/// @param _token0 address of token0
/// @param _token1 address of token1
/// @param _poolType type of pool (stable, liquid, volatile)
function remove(
address _token0,
address _token1,
uint256 _poolType
) external override(ICronV1PoolFactory) onlyOwner {
}
/// @notice Transfers ownership to `_newOwner`. Either directly or claimable by the new pending owner.
/// Can only be invoked by the current `owner`.
/// @param _newOwner Address of the new owner.
/// @param _direct True if `_newOwner` should be set immediately. False if `_newOwner` needs to use `claimOwnership`.
/// @param _renounce Allows the `_newOwner` to be `address(0)` if `_direct` and `_renounce` is True. Has no effect otherwise.
function transferOwnership(
address _newOwner,
bool _direct,
bool _renounce
) external override(ICronV1PoolFactory) onlyOwner {
}
/// @notice Needs to be called by `pendingOwner` to claim ownership.
function claimOwnership() external override(ICronV1PoolFactory) {
}
/// @notice Gets existing pool for given address pair post sort and pool type
/// @param _token0 address of token 0
/// @param _token1 address of token 1
/// @param _poolType type of pool
function getPool(
address _token0,
address _token1,
uint256 _poolType
) external view override(ICronV1PoolFactory) returns (address) {
}
}
| rrCode(poolMap[token0][token1][_poolType]==address(0),CronErrors.EXISTING_POOL | 193,740 | poolMap[token0][token1][_poolType]==address(0) |
"All tokens have been minted" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract CnRDrop001 is ERC721, Ownable {
using Strings for uint256;
using Counters for Counters.Counter;
using MerkleProof for bytes32[];
Counters.Counter private _tokenIdCounter;
uint256 public constant MAX_MINT = 1000;
uint256 public PRICE = 0.375 ether;
uint256 public MAX_RESERVE = 44;
bool public isActive = false;
bool public isAllowListActive = true;
bool public isRedeemable = false;
uint256 public purchaseLimit = 1;
uint256 public totalPublicSupply;
bytes32 private merkleRoot;
mapping(address => uint256) private _claimed;
mapping(uint256 => address) private _redeemed;
uint256[] private _gifted;
string private _contractURI = "";
string private _tokenBaseURI = "";
constructor(bytes32 initialRoot) ERC721("CULTandRAIN DROP 001", "CnR001") {
}
function tokensOfOwner(address _owner)
external
view
returns (uint256[] memory ownerTokens)
{
}
function howManyClaimed(address _address) external view returns (uint256) {
}
function onAllowList(address addr,bytes32[] calldata _merkleProof) external view returns (bool) {
}
function buyNFT(bytes32[] calldata _merkleProof) external payable {
require(isActive, "Contract is not active");
require(<FILL_ME>)
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(
isAllowListActive ? MerkleProof.verify(_merkleProof,merkleRoot,leaf) : true,
"You are not on the Allow List"
);
require(
msg.value > 0 && msg.value % PRICE == 0,
"Amount must be a multiple of price"
);
uint256 amount = msg.value / PRICE;
require(
amount >= 1 && amount <= purchaseLimit,
"Amount should be at least 1"
);
require(
(_claimed[msg.sender] + amount) <= purchaseLimit,
"Purchase exceeds purchase limit"
);
uint256 reached = amount + _tokenIdCounter.current();
require(
reached <= (MAX_MINT - MAX_RESERVE),
"Purchase would exceed public supply"
);
_claimed[msg.sender] += amount;
totalPublicSupply += amount;
for (uint256 i = 0; i < amount; i++) {
_tokenIdCounter.increment();
uint256 newTokenId = _tokenIdCounter.current();
_mint(msg.sender, newTokenId);
}
}
function gift(address to) external onlyOwner {
}
function setIsActive(bool _isActive) external onlyOwner {
}
function setNewPrice(uint256 _newPrice) external onlyOwner {
}
function setIsAllowListActive(bool _isAllowListActive) external onlyOwner {
}
function setPurchaseLimit(uint256 newLimit) external onlyOwner {
}
function setMaxReserve(uint256 newReserve) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function totalSupply() public view returns (uint256) {
}
function publicSupply() external view returns (uint256) {
}
function redeem(uint256 _tokenId) external returns (bool) {
}
function setRedeemable(bool _redeemable) external onlyOwner {
}
function whoRedeemed(uint256 _tokenId) external view returns (address) {
}
function setMerkleRoot(bytes32 root) external onlyOwner {
}
function setContractURI(string calldata URI) external onlyOwner {
}
function setBaseURI(string calldata URI) external onlyOwner {
}
function getGiftedTokens() public view returns (uint256[] memory) {
}
function contractURI() public view returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
}
| totalSupply()<MAX_MINT,"All tokens have been minted" | 193,748 | totalSupply()<MAX_MINT |
"You are not on the Allow List" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract CnRDrop001 is ERC721, Ownable {
using Strings for uint256;
using Counters for Counters.Counter;
using MerkleProof for bytes32[];
Counters.Counter private _tokenIdCounter;
uint256 public constant MAX_MINT = 1000;
uint256 public PRICE = 0.375 ether;
uint256 public MAX_RESERVE = 44;
bool public isActive = false;
bool public isAllowListActive = true;
bool public isRedeemable = false;
uint256 public purchaseLimit = 1;
uint256 public totalPublicSupply;
bytes32 private merkleRoot;
mapping(address => uint256) private _claimed;
mapping(uint256 => address) private _redeemed;
uint256[] private _gifted;
string private _contractURI = "";
string private _tokenBaseURI = "";
constructor(bytes32 initialRoot) ERC721("CULTandRAIN DROP 001", "CnR001") {
}
function tokensOfOwner(address _owner)
external
view
returns (uint256[] memory ownerTokens)
{
}
function howManyClaimed(address _address) external view returns (uint256) {
}
function onAllowList(address addr,bytes32[] calldata _merkleProof) external view returns (bool) {
}
function buyNFT(bytes32[] calldata _merkleProof) external payable {
require(isActive, "Contract is not active");
require(totalSupply() < MAX_MINT, "All tokens have been minted");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(<FILL_ME>)
require(
msg.value > 0 && msg.value % PRICE == 0,
"Amount must be a multiple of price"
);
uint256 amount = msg.value / PRICE;
require(
amount >= 1 && amount <= purchaseLimit,
"Amount should be at least 1"
);
require(
(_claimed[msg.sender] + amount) <= purchaseLimit,
"Purchase exceeds purchase limit"
);
uint256 reached = amount + _tokenIdCounter.current();
require(
reached <= (MAX_MINT - MAX_RESERVE),
"Purchase would exceed public supply"
);
_claimed[msg.sender] += amount;
totalPublicSupply += amount;
for (uint256 i = 0; i < amount; i++) {
_tokenIdCounter.increment();
uint256 newTokenId = _tokenIdCounter.current();
_mint(msg.sender, newTokenId);
}
}
function gift(address to) external onlyOwner {
}
function setIsActive(bool _isActive) external onlyOwner {
}
function setNewPrice(uint256 _newPrice) external onlyOwner {
}
function setIsAllowListActive(bool _isAllowListActive) external onlyOwner {
}
function setPurchaseLimit(uint256 newLimit) external onlyOwner {
}
function setMaxReserve(uint256 newReserve) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function totalSupply() public view returns (uint256) {
}
function publicSupply() external view returns (uint256) {
}
function redeem(uint256 _tokenId) external returns (bool) {
}
function setRedeemable(bool _redeemable) external onlyOwner {
}
function whoRedeemed(uint256 _tokenId) external view returns (address) {
}
function setMerkleRoot(bytes32 root) external onlyOwner {
}
function setContractURI(string calldata URI) external onlyOwner {
}
function setBaseURI(string calldata URI) external onlyOwner {
}
function getGiftedTokens() public view returns (uint256[] memory) {
}
function contractURI() public view returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
}
| isAllowListActive?MerkleProof.verify(_merkleProof,merkleRoot,leaf):true,"You are not on the Allow List" | 193,748 | isAllowListActive?MerkleProof.verify(_merkleProof,merkleRoot,leaf):true |
"Purchase exceeds purchase limit" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract CnRDrop001 is ERC721, Ownable {
using Strings for uint256;
using Counters for Counters.Counter;
using MerkleProof for bytes32[];
Counters.Counter private _tokenIdCounter;
uint256 public constant MAX_MINT = 1000;
uint256 public PRICE = 0.375 ether;
uint256 public MAX_RESERVE = 44;
bool public isActive = false;
bool public isAllowListActive = true;
bool public isRedeemable = false;
uint256 public purchaseLimit = 1;
uint256 public totalPublicSupply;
bytes32 private merkleRoot;
mapping(address => uint256) private _claimed;
mapping(uint256 => address) private _redeemed;
uint256[] private _gifted;
string private _contractURI = "";
string private _tokenBaseURI = "";
constructor(bytes32 initialRoot) ERC721("CULTandRAIN DROP 001", "CnR001") {
}
function tokensOfOwner(address _owner)
external
view
returns (uint256[] memory ownerTokens)
{
}
function howManyClaimed(address _address) external view returns (uint256) {
}
function onAllowList(address addr,bytes32[] calldata _merkleProof) external view returns (bool) {
}
function buyNFT(bytes32[] calldata _merkleProof) external payable {
require(isActive, "Contract is not active");
require(totalSupply() < MAX_MINT, "All tokens have been minted");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(
isAllowListActive ? MerkleProof.verify(_merkleProof,merkleRoot,leaf) : true,
"You are not on the Allow List"
);
require(
msg.value > 0 && msg.value % PRICE == 0,
"Amount must be a multiple of price"
);
uint256 amount = msg.value / PRICE;
require(
amount >= 1 && amount <= purchaseLimit,
"Amount should be at least 1"
);
require(<FILL_ME>)
uint256 reached = amount + _tokenIdCounter.current();
require(
reached <= (MAX_MINT - MAX_RESERVE),
"Purchase would exceed public supply"
);
_claimed[msg.sender] += amount;
totalPublicSupply += amount;
for (uint256 i = 0; i < amount; i++) {
_tokenIdCounter.increment();
uint256 newTokenId = _tokenIdCounter.current();
_mint(msg.sender, newTokenId);
}
}
function gift(address to) external onlyOwner {
}
function setIsActive(bool _isActive) external onlyOwner {
}
function setNewPrice(uint256 _newPrice) external onlyOwner {
}
function setIsAllowListActive(bool _isAllowListActive) external onlyOwner {
}
function setPurchaseLimit(uint256 newLimit) external onlyOwner {
}
function setMaxReserve(uint256 newReserve) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function totalSupply() public view returns (uint256) {
}
function publicSupply() external view returns (uint256) {
}
function redeem(uint256 _tokenId) external returns (bool) {
}
function setRedeemable(bool _redeemable) external onlyOwner {
}
function whoRedeemed(uint256 _tokenId) external view returns (address) {
}
function setMerkleRoot(bytes32 root) external onlyOwner {
}
function setContractURI(string calldata URI) external onlyOwner {
}
function setBaseURI(string calldata URI) external onlyOwner {
}
function getGiftedTokens() public view returns (uint256[] memory) {
}
function contractURI() public view returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
}
| (_claimed[msg.sender]+amount)<=purchaseLimit,"Purchase exceeds purchase limit" | 193,748 | (_claimed[msg.sender]+amount)<=purchaseLimit |
"Purchase would exceed public supply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract CnRDrop001 is ERC721, Ownable {
using Strings for uint256;
using Counters for Counters.Counter;
using MerkleProof for bytes32[];
Counters.Counter private _tokenIdCounter;
uint256 public constant MAX_MINT = 1000;
uint256 public PRICE = 0.375 ether;
uint256 public MAX_RESERVE = 44;
bool public isActive = false;
bool public isAllowListActive = true;
bool public isRedeemable = false;
uint256 public purchaseLimit = 1;
uint256 public totalPublicSupply;
bytes32 private merkleRoot;
mapping(address => uint256) private _claimed;
mapping(uint256 => address) private _redeemed;
uint256[] private _gifted;
string private _contractURI = "";
string private _tokenBaseURI = "";
constructor(bytes32 initialRoot) ERC721("CULTandRAIN DROP 001", "CnR001") {
}
function tokensOfOwner(address _owner)
external
view
returns (uint256[] memory ownerTokens)
{
}
function howManyClaimed(address _address) external view returns (uint256) {
}
function onAllowList(address addr,bytes32[] calldata _merkleProof) external view returns (bool) {
}
function buyNFT(bytes32[] calldata _merkleProof) external payable {
require(isActive, "Contract is not active");
require(totalSupply() < MAX_MINT, "All tokens have been minted");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(
isAllowListActive ? MerkleProof.verify(_merkleProof,merkleRoot,leaf) : true,
"You are not on the Allow List"
);
require(
msg.value > 0 && msg.value % PRICE == 0,
"Amount must be a multiple of price"
);
uint256 amount = msg.value / PRICE;
require(
amount >= 1 && amount <= purchaseLimit,
"Amount should be at least 1"
);
require(
(_claimed[msg.sender] + amount) <= purchaseLimit,
"Purchase exceeds purchase limit"
);
uint256 reached = amount + _tokenIdCounter.current();
require(<FILL_ME>)
_claimed[msg.sender] += amount;
totalPublicSupply += amount;
for (uint256 i = 0; i < amount; i++) {
_tokenIdCounter.increment();
uint256 newTokenId = _tokenIdCounter.current();
_mint(msg.sender, newTokenId);
}
}
function gift(address to) external onlyOwner {
}
function setIsActive(bool _isActive) external onlyOwner {
}
function setNewPrice(uint256 _newPrice) external onlyOwner {
}
function setIsAllowListActive(bool _isAllowListActive) external onlyOwner {
}
function setPurchaseLimit(uint256 newLimit) external onlyOwner {
}
function setMaxReserve(uint256 newReserve) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function totalSupply() public view returns (uint256) {
}
function publicSupply() external view returns (uint256) {
}
function redeem(uint256 _tokenId) external returns (bool) {
}
function setRedeemable(bool _redeemable) external onlyOwner {
}
function whoRedeemed(uint256 _tokenId) external view returns (address) {
}
function setMerkleRoot(bytes32 root) external onlyOwner {
}
function setContractURI(string calldata URI) external onlyOwner {
}
function setBaseURI(string calldata URI) external onlyOwner {
}
function getGiftedTokens() public view returns (uint256[] memory) {
}
function contractURI() public view returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
}
| reached<=(MAX_MINT-MAX_RESERVE),"Purchase would exceed public supply" | 193,748 | reached<=(MAX_MINT-MAX_RESERVE) |
"You already redeemed the NFT" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract CnRDrop001 is ERC721, Ownable {
using Strings for uint256;
using Counters for Counters.Counter;
using MerkleProof for bytes32[];
Counters.Counter private _tokenIdCounter;
uint256 public constant MAX_MINT = 1000;
uint256 public PRICE = 0.375 ether;
uint256 public MAX_RESERVE = 44;
bool public isActive = false;
bool public isAllowListActive = true;
bool public isRedeemable = false;
uint256 public purchaseLimit = 1;
uint256 public totalPublicSupply;
bytes32 private merkleRoot;
mapping(address => uint256) private _claimed;
mapping(uint256 => address) private _redeemed;
uint256[] private _gifted;
string private _contractURI = "";
string private _tokenBaseURI = "";
constructor(bytes32 initialRoot) ERC721("CULTandRAIN DROP 001", "CnR001") {
}
function tokensOfOwner(address _owner)
external
view
returns (uint256[] memory ownerTokens)
{
}
function howManyClaimed(address _address) external view returns (uint256) {
}
function onAllowList(address addr,bytes32[] calldata _merkleProof) external view returns (bool) {
}
function buyNFT(bytes32[] calldata _merkleProof) external payable {
}
function gift(address to) external onlyOwner {
}
function setIsActive(bool _isActive) external onlyOwner {
}
function setNewPrice(uint256 _newPrice) external onlyOwner {
}
function setIsAllowListActive(bool _isAllowListActive) external onlyOwner {
}
function setPurchaseLimit(uint256 newLimit) external onlyOwner {
}
function setMaxReserve(uint256 newReserve) external onlyOwner {
}
function withdraw() external onlyOwner {
}
function totalSupply() public view returns (uint256) {
}
function publicSupply() external view returns (uint256) {
}
function redeem(uint256 _tokenId) external returns (bool) {
require(isRedeemable, "Redeeming not available");
require(ownerOf(_tokenId) == msg.sender, "You must own the NFT");
require(<FILL_ME>)
_redeemed[_tokenId] = msg.sender;
return true;
}
function setRedeemable(bool _redeemable) external onlyOwner {
}
function whoRedeemed(uint256 _tokenId) external view returns (address) {
}
function setMerkleRoot(bytes32 root) external onlyOwner {
}
function setContractURI(string calldata URI) external onlyOwner {
}
function setBaseURI(string calldata URI) external onlyOwner {
}
function getGiftedTokens() public view returns (uint256[] memory) {
}
function contractURI() public view returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
}
| _redeemed[_tokenId]==address(0),"You already redeemed the NFT" | 193,748 | _redeemed[_tokenId]==address(0) |
null | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
pragma abicoder v2;
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import {MintParams} from "../structs/erc721/ERC721Structs.sol";
import "../interfaces/IOmniseaERC721Psi.sol";
import "../interfaces/IOmniseaDropsFactory.sol";
contract OmniseaDropsManager is ReentrancyGuard {
event Minted(address collection, address minter, uint256 quantity, uint256 value);
uint256 public fixedFee;
uint256 private _fee;
address private _revenueManager;
address private _owner;
bool private _isPaused;
IOmniseaDropsFactory private _factory;
modifier onlyOwner() {
}
constructor(address factory_) {
}
function setFee(uint256 fee) external onlyOwner {
}
function setFixedFee(uint256 fee) external onlyOwner {
}
function setRevenueManager(address _manager) external onlyOwner {
}
function mint(MintParams calldata _params) external payable nonReentrant {
require(!_isPaused);
require(<FILL_ME>)
IOmniseaERC721Psi collection = IOmniseaERC721Psi(_params.collection);
uint256 price = collection.mintPrice(_params.phaseId);
uint256 quantityPrice = price * _params.quantity;
require(msg.value == quantityPrice + fixedFee, "!=price");
if (quantityPrice > 0) {
uint256 paidToOwner = quantityPrice * (100 - _fee) / 100;
(bool p1,) = payable(collection.owner()).call{value: paidToOwner}("");
require(p1, "!p1");
(bool p2,) = payable(_revenueManager).call{value: msg.value - paidToOwner}("");
require(p2, "!p2");
} else {
(bool p3,) = payable(_revenueManager).call{value: msg.value}("");
require(p3, "!p3");
}
collection.mint(msg.sender, _params.quantity, _params.merkleProof, _params.phaseId);
emit Minted(_params.collection, msg.sender, _params.quantity, msg.value);
}
function setPause(bool isPaused_) external onlyOwner {
}
function withdraw() external onlyOwner {
}
receive() external payable {}
}
| _factory.drops(_params.collection) | 193,779 | _factory.drops(_params.collection) |
"Max Wallet" | /*
,@
@@@ @% @@
@@@@@@ &@@@@ @@@@, @
@@ *@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@%. @@@
@*#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@# @@ @@
,@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@**&@ ,** @
(@& @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&***@@ @&
,@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&*@***@@@ &@@(
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&&**@@@%*****@,
@@&@@/&&&@@@@@@@@@@@@@@&&&@@&&&&&*****|@@@@@@@@@@@%,
% @@@///@@****%&&&&&&&&&&&&&&&&&&&&&***********@@@@@@@@@@@@@@@@@@
@%(/////(%@&***&&@@&@&&********&&&@@@&&&&******%%****@@@@@@@@@@@@@@@@@@@
.@@%%%%%%@@******@*@@************@ #@@*********%%%%*******@@@@@@@@@@@@@
@@@@@@@********@@*************@@@@********#%%%@*%%%#*****%%@@@@@@@@@@@@
@@@@@@@@@@%/*****************************(@@@@@@%%%%%%%@@@@@@@@@@@@@@@@
@@@@@@@@@@@@#**************@@@@@@@@@@@************&@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@(((/((((((//(((@%%%%%%%@&(/(/((((((//((@@********|&&&@@@@@@@@@@@@@@@@@@@@@@@@@@ @,
@@@@@ .@((/(@@@(((((/(((((((/(((((((/(@@@##(/(((/&@#******&&&&@@@@@@@@@@@@@@@@@@@@ .@@@@ @@@
@@@@@@****@@ @/(((#@@@@(((((((((((/(((((((@@@@##((/((((&@@******&&&@@@@@@@@@@@@@@@@@@@@@ &@@@@@*
/@@&****|@&&&&&@ @@(((/(&@/(((/(((/(((/(((/((((@@#/(((/((/&&@/*****&&&@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@
%@%****@@&&&&@%&&@@@ @@@@@&(/((((((/&&&&&&&&&&&(((((((((((((/&&&&@%****&&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
/@**#@*&&&@&&&@@@***|@ @@@@@@@@@&&&&&&&&&&&&&&@@@@@@&&&&&&&&&&&&&&@@****%@@@@@@@@@@@@@@@@@#*****************@@@@@@@
@@**@@&&&&@@@@*******@%@@@@@@@@@@@@@@@@@@@@(*********#@@@@@@@@@@@@****@@@@@@@@@@@@@@@@@@@**********************@@@
@&***&@@@@@@@@@*****@ @@@@@@@@@@@@@@@@@************************#%%@@@@@@@@@@@@@@@@@@@@***********%&@#**********@@
@@******&&&@%%%%%&@. @@@*@@@@@@@@@@@@@@@@*******%%%%%%%%%%%%%@@@@@@@@@@@@@@@@@@@@@@@********&&&&&@@&************@.
@@*****%&&&&****@@@@***@@@@@@@@@@@@@@@@@@@@@@%%%%%%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%****%&&&&&&&&@@@&&************@@
&@&**************(@@**&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*%&&&&&&&&@@@& @@&&%***********@@
@&&**************@@*%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&&&&&&@@@@@***@ @@&&&&**********@%
@@%&&************@**&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&&%@@&@@ @****@@ @&&&&**********@
,@@&&&&&**********&&&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*@@@@@@*&&&&&&&&@@ @@***@@ @&&&&*********@@
%@@&&&&&&&&&&&&&&&@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@****@/*********&&&&@ @@****@@ (@@&&&**********@
%@@@@%&&&%@@@( @@@@@@@@@@@@@@@@@@@@@@@@@@@@@*****************&&&@* @@***@@&&&&&***********@
@@@@@@@@@@@@@@@@@@@@@@@@@@/*****************&&&@@ @@**@&&&&@%**********&@
@@@@@@@@@@@@@@@@@@@@@@******************&&&@@ @**@@&&&@&&/*&&&&&&&@@
@@*|@@@@@@@@@@@@@@@@******************&&&@@ @@***@@@@&&&&%@&%@&&@@
@@**********************************|&&&@/ @@@****@@ ,@@@@@@@@/
@@*********************************&&&%@#@@@@*******@@
.@@@@@@@@@@@@@@@@@@@@@@@@@&(*********(&&&&@@*********%@@
@@@************************************&&&&&@@*******@@@
@@(************************************&&&&&&@@%@@@@@@/
&@@************************************&&&&&&&@@@@##///@@@
,(@@&*************&&&&&&&&&&&%%##%&&&&&&&&&&&&@@@@&&&&&&&##////@@
@@@@(////////////@@***********&&&&&&&@@@@@@&&%%%&&@@@@@@@@&&&@@&&&&&&&&&##/////@@
@@/%@@@@@###/////////#***|&&&&&&&&&@@@ @@*********#&&&&&&&&&&&@@#########@
@@####@##&@@##(////###@&&&&&&@@@@ .@@********&&&&&&&&&@@@#####@@@@@@
*@@########@@####//##@@@@@* @@(******&&&&@@@ &@@@@.
@@%######@@#####%@@ (@@@@@@@@
@@@####@##@@@
The Bull
https://the-bull.fund
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
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);
}
interface IUniswapFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapRouter {
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;
function factory() external pure returns (address);
function WETH() external pure returns (address);
}
abstract contract Ownable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
}
pragma solidity ^0.8.18;
contract TheBull is IERC20, Ownable
{
mapping (address => uint) public balanceOf;
mapping (address => mapping (address => uint)) public allowance;
mapping(address => bool) _excludedFromFees;
string public constant name = 'The Bull';
string public constant symbol = 'BULL';
uint8 public constant decimals = 18;
uint public constant totalSupply= 1000000000 * 10**decimals;
address private constant UniswapRouter=0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D ;
address private _UniswapPairAddress;
IUniswapRouter private _UniswapRouter;
address public marketingWallet;
//Only marketingWallet can change marketingWallet
function ChangeMarketingWallet(address newWallet) public{
}
function taxLadder() public view returns(uint buy, uint sell){
}
constructor () {
}
function _transfer(address sender, address recipient, uint amount) private{
}
function _taxedTransfer(address sender, address recipient, uint amount) private{
uint senderBalance = balanceOf[sender];
require(senderBalance >= amount, "Transfer exceeds balance");
(uint buy, uint sell)=taxLadder();
bool isBuy=_UniswapPairAddress==sender;
bool isSell=_UniswapPairAddress==recipient;
uint tax;
if(isSell)
tax=sell;
else if(isBuy){
require(<FILL_ME>)
tax=buy;
}
if((sender!=_UniswapPairAddress)&&(!_isSwappingContractModifier))
_swapContractToken();
unchecked{
uint contractToken= amount*tax/100;
uint taxedAmount=amount-contractToken;
balanceOf[sender]-=amount;
balanceOf[address(this)] += contractToken;
balanceOf[recipient]+=taxedAmount;
}
emit Transfer(sender,recipient,amount);
}
function _feelessTransfer(address sender, address recipient, uint amount) private{
}
bool private _isSwappingContractModifier;
modifier lockTheSwap {
}
function Swapback() external onlyOwner{
}
function _swapContractToken() private lockTheSwap{
}
//swaps tokens on the contract for ETH
function _swapTokenForETH(uint amount) private {
}
uint public LaunchTimestamp=type(uint).max;
function EnableTrading() public onlyOwner{
}
function SetLaunchTimestamp(uint Timestamp) public onlyOwner{
}
receive() external payable {}
function transfer(address recipient, uint amount) external override returns (bool) {
}
function approve(address spender, uint amount) external override returns (bool) {
}
function _approve(address owner, address spender, uint amount) private {
}
function transferFrom(address sender, address recipient, uint amount) external override returns (bool) {
}
}
| (balanceOf[recipient]+amount)<=(totalSupply*2/100),"Max Wallet" | 193,808 | (balanceOf[recipient]+amount)<=(totalSupply*2/100) |
"You have already received your token" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract WeSurvived is ERC721A, Ownable {
uint256 public immutable price = 0.003 ether;
uint32 public immutable maxMint = 10;
uint32 public immutable MAX_SUPPLY = 5000;
bool public started = false;
mapping(address => uint) public addressClaimed;
string public baseURI;
constructor()
ERC721A ("WeSurvived", "WS") {
}
function _baseURI() internal view override(ERC721A) returns (string memory) {
}
function _startTokenId() internal view virtual override(ERC721A) returns (uint256) {
}
function setURI(string memory uri) public onlyOwner {
}
function mint(uint32 amount) public payable {
}
function freeClaim() public {
require(tx.origin == msg.sender, "pls don't use contract call");
require(started,"not yet started");
require(totalSupply() + 1 <= MAX_SUPPLY,"sold out");
require(<FILL_ME>)
addressClaimed[_msgSender()] += 1;
_safeMint(msg.sender, 1);
}
function enableMint(bool mintStarted) external onlyOwner {
}
function withdraw() public onlyOwner {
}
}
| addressClaimed[_msgSender()]<1,"You have already received your token" | 193,966 | addressClaimed[_msgSender()]<1 |
"Can only Mint 20" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.9 <0.9.0;
import 'erc721a/contracts/ERC721A.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
contract ThePlumberzV2 is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
bytes32 public merkleRoot;
mapping(address => bool) public whitelistClaimed;
string public uriPrefix = '';
string public uriSuffix = '.json';
string public hiddenMetadataUri;
uint256 public cost;
uint256 public maxSupply;
uint256 public maxMintAmountPerTx;
bool public paused = false;
bool public whitelistMintEnabled = false;
bool public revealed = true;
constructor(
string memory _tokenName,
string memory _tokenSymbol,
uint256 _cost,
uint256 _maxSupply,
uint256 _maxMintAmountPerTx,
string memory _hiddenMetadataUri
) ERC721A(_tokenName, _tokenSymbol) {
}
modifier mintCompliance(uint256 _mintAmount) {
}
modifier mintPriceCompliance(uint256 _mintAmount) {
}
function whitelistMint(uint256 _mintAmount, bytes32[] calldata _merkleProof) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) {
}
function mint(uint256 _mintAmount) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) {
require(!paused, 'The contract is paused!');
require(<FILL_ME>)
_safeMint(_msgSender(), _mintAmount);
}
function mintForAddress(uint256 _mintAmount, address _receiver) public mintCompliance(_mintAmount) onlyOwner {
}
function walletOfOwner(address _owner) public view returns (uint256[] memory) {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
function setRevealed(bool _state) public onlyOwner {
}
function setCost(uint256 _cost) public onlyOwner {
}
function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) public onlyOwner {
}
function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner {
}
function setWhitelistMintEnabled(bool _state) public onlyOwner {
}
function withdraw() public onlyOwner nonReentrant {
}
function _baseURI() internal view virtual override returns (string memory) {
}
}
| balanceOf(msg.sender)<19,"Can only Mint 20" | 194,061 | balanceOf(msg.sender)<19 |
"Supply exhausted, sorry we are sold out!" | // SPDX-License-Identifier: MIT
// www.nftchan.xyz - the ultimate "mint what you want" art project
// initial mint ONLY via our website! If you mint directly, you have to add 0.2 ETH for manual fixing!
pragma solidity 0.8.12;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract chanXYZContract is ERC721Enumerable, Ownable {
using Strings for uint256;
// ------------------------------------------------------------------------------
address public contractCreator;
mapping(address => uint256) public addressMintedBalance;
// ------------------------------------------------------------------------------
uint256 public constant MAXCHANS = 8888;
// ------------------------------------------------------------------------------
uint256 public nowPrice = 0.02 ether;
// ------------------------------------------------------------------------------
string public baseTokenURI;
string public baseExtension = ".json";
bool public isActive = true;
// ------------------------------------------------------------------------------
address nftchanWallet = 0x9cf2eb2151afdE498B7bc6bAEA05D4e91bcD0Ece; // founders wallet,
event mintedChan(uint256 indexed id, string localId);
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI
) ERC721(_name, _symbol) {
}
// internal return the base URI
function _baseURI() internal view virtual override returns (string memory) {
}
// ------------------------------------------------------------------------------------------------
// public mint function - mints only to sender!
function mint(address _to, uint256 _mintAmount, string calldata _localId) public payable {
uint256 supply = totalSupply();
if(msg.sender != contractCreator) {
require(isActive, "Contract paused!");
}
require(_mintAmount > 0, "We can not mint zero...");
require(<FILL_ME>)
if(msg.sender != contractCreator) {
require(msg.value >= nowPrice * _mintAmount, "You have not sent enough currency.");
}
for (uint256 i = 1; i <= _mintAmount; i++) {
_safeMint(_to, supply + i);
emit mintedChan(supply + i, _localId);
}
}
// ------------------------------------------------------------------------------------------------
// - useful needed tools
function showPrice() public view returns (uint256) {
}
// -
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function flipActive(bool newValue) public onlyOwner {
}
// give complete tokenURI back, if base is set
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
//---------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------
// config functions, if needed for updating the settings by creator
function setPrice(uint256 newPrice) public onlyOwner {
}
// ----------------------------------------------------------------- WITHDRAW
function withdraw() public onlyOwner {
}
function withdrawAllToAddress(address addr) public onlyOwner {
}
}
| supply+_mintAmount<=MAXCHANS,"Supply exhausted, sorry we are sold out!" | 194,211 | supply+_mintAmount<=MAXCHANS |
null | // SPDX-License-Identifier: MIT
// www.nftchan.xyz - the ultimate "mint what you want" art project
// initial mint ONLY via our website! If you mint directly, you have to add 0.2 ETH for manual fixing!
pragma solidity 0.8.12;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract chanXYZContract is ERC721Enumerable, Ownable {
using Strings for uint256;
// ------------------------------------------------------------------------------
address public contractCreator;
mapping(address => uint256) public addressMintedBalance;
// ------------------------------------------------------------------------------
uint256 public constant MAXCHANS = 8888;
// ------------------------------------------------------------------------------
uint256 public nowPrice = 0.02 ether;
// ------------------------------------------------------------------------------
string public baseTokenURI;
string public baseExtension = ".json";
bool public isActive = true;
// ------------------------------------------------------------------------------
address nftchanWallet = 0x9cf2eb2151afdE498B7bc6bAEA05D4e91bcD0Ece; // founders wallet,
event mintedChan(uint256 indexed id, string localId);
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI
) ERC721(_name, _symbol) {
}
// internal return the base URI
function _baseURI() internal view virtual override returns (string memory) {
}
// ------------------------------------------------------------------------------------------------
// public mint function - mints only to sender!
function mint(address _to, uint256 _mintAmount, string calldata _localId) public payable {
}
// ------------------------------------------------------------------------------------------------
// - useful needed tools
function showPrice() public view returns (uint256) {
}
// -
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function flipActive(bool newValue) public onlyOwner {
}
// give complete tokenURI back, if base is set
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
//---------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------
// config functions, if needed for updating the settings by creator
function setPrice(uint256 newPrice) public onlyOwner {
}
// ----------------------------------------------------------------- WITHDRAW
function withdraw() public onlyOwner {
}
function withdrawAllToAddress(address addr) public onlyOwner {
require(<FILL_ME>)
}
}
| payable(addr).send(address(this).balance) | 194,211 | payable(addr).send(address(this).balance) |
"ADDRESS_NOT_ELIGIBLE_FOR_WHITELIST_MINT" | // 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/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
/**
,----. ,--.,------. ,---. ,-----.
' .-./ | || .-. \ / O \ ' .-. '
| | .---.| || | \ :| .-. || | | |
' '--' || || '--' /| | | |' '-' '
`------' `--'`-------' `--' `--' `-----'
*/
contract GIFounderPass is ERC721Enumerable, Ownable {
uint256 public constant MAX_SUPPLY = 1000;
uint256 public constant RESERVE_TOKEN_AMOUNT = 200;
uint256 private constant MAX_MINTS_PER_TRANSACTION = 10;
uint256 private constant MAX_WL_MINTS = 2;
mapping(address => uint256) public whitelistMinted;
uint256 public tokenIdCounter;
string public baseTokenURI;
uint256 public publicMintPrice = 0.15 ether;
uint256 public whitelistMintPrice = 0.12 ether;
bool public isWhitelistMintActive = false;
bool public isPublicMintActive = false;
bytes32 public whitelistMerkleRoot;
constructor() ERC721("GI Founder Pass", "GIFP") {}
function whitelistMint(
uint256 numberOfMints,
bytes32[] calldata _merkleProof
) external payable {
//state
require(isWhitelistMintActive, "WHITE_LIST_MINT_NOT_ACTIVE");
//proof
require(<FILL_ME>)
//allowed amount
require(
whitelistMinted[msg.sender] + numberOfMints <= MAX_WL_MINTS,
"EXCEEDS_WHITELIST_ALLOWED_AMOUNT"
);
//price
require(
msg.value >= numberOfMints * whitelistMintPrice,
"INSUFFICIENT_PAYMENT"
);
//total supply
require(
totalSupply() + numberOfMints <= MAX_SUPPLY,
"EXCEEDS_MAX_SUPPLY"
);
for (uint32 i = 0; i < numberOfMints; i++) {
tokenIdCounter++;
_safeMint(msg.sender, tokenIdCounter);
}
whitelistMinted[msg.sender] += numberOfMints;
}
function isWhitelistEligible(address addr, bytes32[] calldata _merkleProof)
public
view
returns (bool)
{
}
function publicMint(uint256 numberOfMints) external payable {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
/** Only Owner */
function setWhitelistMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function toggleWhitelistMintActive() external onlyOwner {
}
function togglePublicMintActive() external onlyOwner {
}
function setBaseTokenURI(string memory _uri) external onlyOwner {
}
function reserveToken() public onlyOwner {
}
function withdraw() external onlyOwner {
}
}
| isWhitelistEligible(msg.sender,_merkleProof),"ADDRESS_NOT_ELIGIBLE_FOR_WHITELIST_MINT" | 194,299 | isWhitelistEligible(msg.sender,_merkleProof) |
"EXCEEDS_WHITELIST_ALLOWED_AMOUNT" | // 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/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
/**
,----. ,--.,------. ,---. ,-----.
' .-./ | || .-. \ / O \ ' .-. '
| | .---.| || | \ :| .-. || | | |
' '--' || || '--' /| | | |' '-' '
`------' `--'`-------' `--' `--' `-----'
*/
contract GIFounderPass is ERC721Enumerable, Ownable {
uint256 public constant MAX_SUPPLY = 1000;
uint256 public constant RESERVE_TOKEN_AMOUNT = 200;
uint256 private constant MAX_MINTS_PER_TRANSACTION = 10;
uint256 private constant MAX_WL_MINTS = 2;
mapping(address => uint256) public whitelistMinted;
uint256 public tokenIdCounter;
string public baseTokenURI;
uint256 public publicMintPrice = 0.15 ether;
uint256 public whitelistMintPrice = 0.12 ether;
bool public isWhitelistMintActive = false;
bool public isPublicMintActive = false;
bytes32 public whitelistMerkleRoot;
constructor() ERC721("GI Founder Pass", "GIFP") {}
function whitelistMint(
uint256 numberOfMints,
bytes32[] calldata _merkleProof
) external payable {
//state
require(isWhitelistMintActive, "WHITE_LIST_MINT_NOT_ACTIVE");
//proof
require(
isWhitelistEligible(msg.sender, _merkleProof),
"ADDRESS_NOT_ELIGIBLE_FOR_WHITELIST_MINT"
);
//allowed amount
require(<FILL_ME>)
//price
require(
msg.value >= numberOfMints * whitelistMintPrice,
"INSUFFICIENT_PAYMENT"
);
//total supply
require(
totalSupply() + numberOfMints <= MAX_SUPPLY,
"EXCEEDS_MAX_SUPPLY"
);
for (uint32 i = 0; i < numberOfMints; i++) {
tokenIdCounter++;
_safeMint(msg.sender, tokenIdCounter);
}
whitelistMinted[msg.sender] += numberOfMints;
}
function isWhitelistEligible(address addr, bytes32[] calldata _merkleProof)
public
view
returns (bool)
{
}
function publicMint(uint256 numberOfMints) external payable {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
/** Only Owner */
function setWhitelistMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function toggleWhitelistMintActive() external onlyOwner {
}
function togglePublicMintActive() external onlyOwner {
}
function setBaseTokenURI(string memory _uri) external onlyOwner {
}
function reserveToken() public onlyOwner {
}
function withdraw() external onlyOwner {
}
}
| whitelistMinted[msg.sender]+numberOfMints<=MAX_WL_MINTS,"EXCEEDS_WHITELIST_ALLOWED_AMOUNT" | 194,299 | whitelistMinted[msg.sender]+numberOfMints<=MAX_WL_MINTS |
"EXCEEDS_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/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
/**
,----. ,--.,------. ,---. ,-----.
' .-./ | || .-. \ / O \ ' .-. '
| | .---.| || | \ :| .-. || | | |
' '--' || || '--' /| | | |' '-' '
`------' `--'`-------' `--' `--' `-----'
*/
contract GIFounderPass is ERC721Enumerable, Ownable {
uint256 public constant MAX_SUPPLY = 1000;
uint256 public constant RESERVE_TOKEN_AMOUNT = 200;
uint256 private constant MAX_MINTS_PER_TRANSACTION = 10;
uint256 private constant MAX_WL_MINTS = 2;
mapping(address => uint256) public whitelistMinted;
uint256 public tokenIdCounter;
string public baseTokenURI;
uint256 public publicMintPrice = 0.15 ether;
uint256 public whitelistMintPrice = 0.12 ether;
bool public isWhitelistMintActive = false;
bool public isPublicMintActive = false;
bytes32 public whitelistMerkleRoot;
constructor() ERC721("GI Founder Pass", "GIFP") {}
function whitelistMint(
uint256 numberOfMints,
bytes32[] calldata _merkleProof
) external payable {
//state
require(isWhitelistMintActive, "WHITE_LIST_MINT_NOT_ACTIVE");
//proof
require(
isWhitelistEligible(msg.sender, _merkleProof),
"ADDRESS_NOT_ELIGIBLE_FOR_WHITELIST_MINT"
);
//allowed amount
require(
whitelistMinted[msg.sender] + numberOfMints <= MAX_WL_MINTS,
"EXCEEDS_WHITELIST_ALLOWED_AMOUNT"
);
//price
require(
msg.value >= numberOfMints * whitelistMintPrice,
"INSUFFICIENT_PAYMENT"
);
//total supply
require(<FILL_ME>)
for (uint32 i = 0; i < numberOfMints; i++) {
tokenIdCounter++;
_safeMint(msg.sender, tokenIdCounter);
}
whitelistMinted[msg.sender] += numberOfMints;
}
function isWhitelistEligible(address addr, bytes32[] calldata _merkleProof)
public
view
returns (bool)
{
}
function publicMint(uint256 numberOfMints) external payable {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
/** Only Owner */
function setWhitelistMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function toggleWhitelistMintActive() external onlyOwner {
}
function togglePublicMintActive() external onlyOwner {
}
function setBaseTokenURI(string memory _uri) external onlyOwner {
}
function reserveToken() public onlyOwner {
}
function withdraw() external onlyOwner {
}
}
| totalSupply()+numberOfMints<=MAX_SUPPLY,"EXCEEDS_MAX_SUPPLY" | 194,299 | totalSupply()+numberOfMints<=MAX_SUPPLY |
"Blacklistable: account is blacklisted" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
import "@openzeppelin/contracts/access/Ownable.sol";
contract Blacklistable is Ownable {
address public blacklister;
mapping(address => bool) internal blacklisted;
event Blacklisted(address indexed _account);
event UnBlacklisted(address indexed _account);
event BlacklisterChanged(address indexed newBlacklister);
/**
* @dev Throws if called by any account other than the blacklister
*/
modifier onlyBlacklister() {
}
/**
* @dev Throws if argument account is blacklisted
* @param _account The address to check
*/
modifier notBlacklisted(address _account) {
require(<FILL_ME>)
_;
}
/**
* @dev Checks if account is blacklisted
* @param _account The address to check
*/
function isBlacklisted(address _account) external view returns (bool) {
}
/**
* @dev Adds account to blacklist
* @param _account The address to blacklist
*/
function blacklist(address _account) external onlyBlacklister {
}
/**
* @dev Removes account from blacklist
* @param _account The address to remove from the blacklist
*/
function unBlacklist(address _account) external onlyBlacklister {
}
function updateBlacklister(address _newBlacklister) external onlyOwner {
}
}
| !blacklisted[_account],"Blacklistable: account is blacklisted" | 194,378 | !blacklisted[_account] |
"Exceeds supply!" | //SPDX-License-Identifier: Unlicense
pragma solidity >=0.7.0 <0.9.0;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract LOTRP is ERC721A, Ownable {
uint256 public extraPrice = 0.003 ether;
uint256 public freeSupply = 1000;
uint256 public maxSupply = 10000;
uint256 public maxPerTx = 12;
string public uriPrefix = "ipfs://bafybeif5ssydgwayimuegunucpe6sukceebvhsy2clldjfyeoxbazldwyq/";
string public uriSuffix = ".json";
bool public paused = false;
mapping(address => uint256) freeMinted;
uint256 MAX_FREE_PER_WALLET = 1;
constructor() ERC721A("The Lord of the Rings in Pixel", "LOTRP") {}
function mint(uint256 _quantity) external payable {
require(!paused, "Minting paused");
uint256 _totalSupply = totalSupply();
require(msg.sender == tx.origin, "The caller is another contract!");
require(<FILL_ME>)
require(_quantity > 0 && _quantity <= maxPerTx, "Invalid mint amount!");
uint256 cost;
if (_totalSupply >= freeSupply) {
if (freeMinted[msg.sender] < MAX_FREE_PER_WALLET) {
uint remains = MAX_FREE_PER_WALLET - freeMinted[msg.sender];
if (remains <= _quantity) {
freeMinted[msg.sender] += remains;
cost = extraPrice * (_quantity - remains);
} else {
freeMinted[msg.sender] += _quantity;
cost = 0;
}
} else {
cost = extraPrice * _quantity;
}
}
require(msg.value >= cost, "ETH sent not correct");
_mint(msg.sender, _quantity);
}
function setMaxFreePerWallet(uint256 _maxFreePerWallet) external onlyOwner {
}
function setPrice(uint256 price) external onlyOwner {
}
function setFreeSupply(uint256 _freeSupply) external onlyOwner {
}
function setMaxPerTx(uint256 _maxPerTx) external onlyOwner {
}
function _startTokenId() internal pure override returns (uint256) {
}
function _baseURI() internal view override returns (string memory) {
}
function setBaseURI(string calldata _newBaseUri) external onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function setPause() external onlyOwner {
}
function withdraw() external onlyOwner {
}
}
| _totalSupply+_quantity<=maxSupply,"Exceeds supply!" | 194,740 | _totalSupply+_quantity<=maxSupply |
"caller not artist" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
//------------------------------------------------------------------------------
// Dall-E Punks - Dunkz
//------------------------------------------------------------------------------
// Author: papaver (@papaver42)
//------------------------------------------------------------------------------
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./common/meta-transactions/ContentMixin.sol";
import "./common/meta-transactions/NativeMetaTransaction.sol";
import "./geneticchain/ERC721Sequential.sol";
import "./geneticchain/ERC721SeqEnumerable.sol";
import "./libraries/State.sol";
//------------------------------------------------------------------------------
// helper contracts
//------------------------------------------------------------------------------
contract OwnableDelegateProxy {}
//------------------------------------------------------------------------------
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
//------------------------------------------------------------------------------
// Dunkz721
//------------------------------------------------------------------------------
/**
* @title Dunkz
*
* ERC721 contract with various features:
* - low-gas implmentation
* - off-chain whitelist verify (secure minting)
* - public/artist/team token allocation
* - protected controlled burns
* - opensea proxy setup
* - simple funds withdrawl
*/
contract Dunkz is
ContextMixin,
ERC721SeqEnumerable,
ERC2981,
NativeMetaTransaction,
Ownable
{
using ECDSA for bytes32;
using State for State.Data;
//-------------------------------------------------------------------------
// structs
//-------------------------------------------------------------------------
struct Minted {
uint128 claim;
uint128 mint;
}
//-------------------------------------------------------------------------
// constants
//-------------------------------------------------------------------------
// erc721 metadata
string constant private __name = "Dall-E Punks";
string constant private __symbol = "DUNKZ";
// mint price
uint256 constant public memberPrice = .01 ether;
uint256 constant public publicPrice = .02 ether;
// allocations
uint256 constant public maxPublic = 5;
// artist wallets
address constant private _ataraAddress = 0xceC15d87719feDEcA61F7d11D2d205a4C0628517;
address constant private _papaverAddress = 0xa7B8a64dF4e47013C8A168945c9eb4F83BADC9C1;
address constant private _noStandingAddress = 0x6A4f0ECbBb10dFdFD010F8E7B1C7e4a358692981;
// verification address
address constant private _signer = 0xE5cb964B8b21491929414b969078CcF7FeCD4725;
// signature tags
uint256 constant private _tagClaim = 8118;
uint256 constant private _tagMember = 4224;
//-------------------------------------------------------------------------
// fields
//-------------------------------------------------------------------------
// token limits
uint256 public immutable publicMax;
uint256 public immutable artistMax;
uint256 public immutable teamMax;
// opensea proxy
address private immutable _proxyRegistryAddress;
// contract state
State.Data private _state;
// roles
mapping (address => bool) private _burnerAddress;
mapping (address => bool) private _artistAddress;
mapping (address => bool) private _teamAddress;
// track mint count per address
mapping (address => Minted) private _minted;
// token info
string private _baseUri;
string private _tokenIpfsHash;
// contract info
string private _contractUri;
//-------------------------------------------------------------------------
// modifiers
//-------------------------------------------------------------------------
modifier validTokenId(uint256 tokenId) {
}
//-------------------------------------------------------------------------
modifier approvedOrOwner(address operator, uint256 tokenId) {
}
//-------------------------------------------------------------------------
modifier isArtist() {
require(<FILL_ME>)
_;
}
//-------------------------------------------------------------------------
modifier isTeam() {
}
//-------------------------------------------------------------------------
modifier isBurner() {
}
//-------------------------------------------------------------------------
modifier notLocked() {
}
//-------------------------------------------------------------------------
// ctor
//-------------------------------------------------------------------------
constructor(
string memory baseUri_,
string memory ipfsHash_,
string memory contractUri_,
uint256[3] memory tokenMax_,
address royaltyAddress,
address proxyRegistryAddress)
ERC721Sequential(__name, __symbol)
{
}
//-------------------------------------------------------------------------
// accessors
//-------------------------------------------------------------------------
/**
* Check if public minting is live.
*/
function publicLive()
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* Check if contract is locked.
*/
function isLocked()
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* Get total team has minted.
*/
function teamMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Get total artist has minted.
*/
function artistMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Get total public has minted.
*/
function publicMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Authorize artist wallet.
*/
function registerArtistAddress(address artist)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove artist wallet.
*/
function revokeArtistAddress(address artist)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Authorize team wallet.
*/
function registerTeamAddress(address team)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove team wallet.
*/
function revokeTeamAddress(address team)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Authorize burnder contract.
*/
function registerBurnerAddress(address burner)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove burner contract.
*/
function revokeBurnerAddress(address burner)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setTokenIpfsHash(string memory hash)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setBaseTokenURI(string memory baseUri)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setTokenURI(string memory baseUri, string memory hash)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
// admin
//-------------------------------------------------------------------------
/**
* Enable/disable public/member minting.
*/
function toggleLock()
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Enable/disable public minting.
*/
function togglePublicMint()
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Get minted info for a user.
*/
function getMintInfo(address wallet)
public view
returns(Minted memory)
{
}
//-------------------------------------------------------------------------
// security
//-------------------------------------------------------------------------
/**
* Generate hash from input data.
*/
function generateHash(uint256 tag, uint256 allocation, uint256 count)
private view
returns(bytes32)
{
}
//-------------------------------------------------------------------------
/**
* Validate message was signed by signer.
*/
function validateSigner(bytes32 msgHash, bytes memory signature, address signer)
private pure
returns(bool)
{
}
//-------------------------------------------------------------------------
// minting
//-------------------------------------------------------------------------
/**
* Allow anyone to mint tokens for the right price.
*/
function mint(uint256 count)
public payable
notLocked
{
}
//-------------------------------------------------------------------------
/**
* Mint count tokens using securely signed message.
*/
function secureMint(bytes calldata signature, uint256 allocation, uint256 count)
external payable
notLocked
{
}
//-------------------------------------------------------------------------
/**
* Allow cryptopunk holders to claim.
*/
function claim(bytes calldata signature, uint256 allocation, uint256 count)
external
notLocked
{
}
//-------------------------------------------------------------------------
/**
* @dev Mints a token to an address.
* @param wallet address of the future owner of the token
*/
function teamMintTo(address wallet, uint256 count)
public
isTeam
{
}
//-------------------------------------------------------------------------
/**
* @dev Mints a token to an address.
* @param wallet address of the future owner of the token
*/
function artistMintTo(address wallet, uint256 count)
public
isArtist
{
}
//-------------------------------------------------------------------------
/**
* @dev Burns `tokenId`. See {ERC721-_burn}.
*/
function burn(uint256 tokenId)
public
isBurner
{
}
//-------------------------------------------------------------------------
// money
//-------------------------------------------------------------------------
/**
* Pull money out of this contract.
*/
function withdraw(address to, uint256 amount)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
// approval
//-------------------------------------------------------------------------
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts
* to enable gas-less listings.
*/
function isApprovedForAll(address owner, address operator)
override(ERC721Sequential, IERC721)
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* This is used instead of msg.sender as transactions won't be sent by
* the original token owner, but by OpenSea.
*/
function _msgSender()
override
internal view
returns (address sender)
{
}
//-------------------------------------------------------------------------
// ERC2981 - NFT Royalty Standard
//-------------------------------------------------------------------------
/**
* @dev Update royalty receiver + basis points.
*/
function setRoyaltyInfo(address receiver, uint96 feeBasisPoints)
external
onlyOwner
{
}
//-------------------------------------------------------------------------
// IERC165 - Introspection
//-------------------------------------------------------------------------
function supportsInterface(bytes4 interfaceId)
public view
override(ERC721SeqEnumerable, ERC2981)
returns (bool)
{
}
//-------------------------------------------------------------------------
// ERC721Metadata
//-------------------------------------------------------------------------
function baseTokenURI()
public view
returns (string memory)
{
}
//-------------------------------------------------------------------------
/**
* @dev Returns uri of a token. Not guarenteed token exists.
*/
function tokenURI(uint256 tokenId)
override
public view
returns (string memory)
{
}
//-------------------------------------------------------------------------
// OpenSea contractUri
//-------------------------------------------------------------------------
function setContractURI(string memory contractUri)
external
onlyOwner
{
}
//-------------------------------------------------------------------------
function contractURI()
public view
returns (string memory)
{
}
}
| _artistAddress[_msgSender()],"caller not artist" | 194,980 | _artistAddress[_msgSender()] |
"caller not team" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
//------------------------------------------------------------------------------
// Dall-E Punks - Dunkz
//------------------------------------------------------------------------------
// Author: papaver (@papaver42)
//------------------------------------------------------------------------------
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./common/meta-transactions/ContentMixin.sol";
import "./common/meta-transactions/NativeMetaTransaction.sol";
import "./geneticchain/ERC721Sequential.sol";
import "./geneticchain/ERC721SeqEnumerable.sol";
import "./libraries/State.sol";
//------------------------------------------------------------------------------
// helper contracts
//------------------------------------------------------------------------------
contract OwnableDelegateProxy {}
//------------------------------------------------------------------------------
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
//------------------------------------------------------------------------------
// Dunkz721
//------------------------------------------------------------------------------
/**
* @title Dunkz
*
* ERC721 contract with various features:
* - low-gas implmentation
* - off-chain whitelist verify (secure minting)
* - public/artist/team token allocation
* - protected controlled burns
* - opensea proxy setup
* - simple funds withdrawl
*/
contract Dunkz is
ContextMixin,
ERC721SeqEnumerable,
ERC2981,
NativeMetaTransaction,
Ownable
{
using ECDSA for bytes32;
using State for State.Data;
//-------------------------------------------------------------------------
// structs
//-------------------------------------------------------------------------
struct Minted {
uint128 claim;
uint128 mint;
}
//-------------------------------------------------------------------------
// constants
//-------------------------------------------------------------------------
// erc721 metadata
string constant private __name = "Dall-E Punks";
string constant private __symbol = "DUNKZ";
// mint price
uint256 constant public memberPrice = .01 ether;
uint256 constant public publicPrice = .02 ether;
// allocations
uint256 constant public maxPublic = 5;
// artist wallets
address constant private _ataraAddress = 0xceC15d87719feDEcA61F7d11D2d205a4C0628517;
address constant private _papaverAddress = 0xa7B8a64dF4e47013C8A168945c9eb4F83BADC9C1;
address constant private _noStandingAddress = 0x6A4f0ECbBb10dFdFD010F8E7B1C7e4a358692981;
// verification address
address constant private _signer = 0xE5cb964B8b21491929414b969078CcF7FeCD4725;
// signature tags
uint256 constant private _tagClaim = 8118;
uint256 constant private _tagMember = 4224;
//-------------------------------------------------------------------------
// fields
//-------------------------------------------------------------------------
// token limits
uint256 public immutable publicMax;
uint256 public immutable artistMax;
uint256 public immutable teamMax;
// opensea proxy
address private immutable _proxyRegistryAddress;
// contract state
State.Data private _state;
// roles
mapping (address => bool) private _burnerAddress;
mapping (address => bool) private _artistAddress;
mapping (address => bool) private _teamAddress;
// track mint count per address
mapping (address => Minted) private _minted;
// token info
string private _baseUri;
string private _tokenIpfsHash;
// contract info
string private _contractUri;
//-------------------------------------------------------------------------
// modifiers
//-------------------------------------------------------------------------
modifier validTokenId(uint256 tokenId) {
}
//-------------------------------------------------------------------------
modifier approvedOrOwner(address operator, uint256 tokenId) {
}
//-------------------------------------------------------------------------
modifier isArtist() {
}
//-------------------------------------------------------------------------
modifier isTeam() {
require(<FILL_ME>)
_;
}
//-------------------------------------------------------------------------
modifier isBurner() {
}
//-------------------------------------------------------------------------
modifier notLocked() {
}
//-------------------------------------------------------------------------
// ctor
//-------------------------------------------------------------------------
constructor(
string memory baseUri_,
string memory ipfsHash_,
string memory contractUri_,
uint256[3] memory tokenMax_,
address royaltyAddress,
address proxyRegistryAddress)
ERC721Sequential(__name, __symbol)
{
}
//-------------------------------------------------------------------------
// accessors
//-------------------------------------------------------------------------
/**
* Check if public minting is live.
*/
function publicLive()
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* Check if contract is locked.
*/
function isLocked()
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* Get total team has minted.
*/
function teamMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Get total artist has minted.
*/
function artistMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Get total public has minted.
*/
function publicMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Authorize artist wallet.
*/
function registerArtistAddress(address artist)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove artist wallet.
*/
function revokeArtistAddress(address artist)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Authorize team wallet.
*/
function registerTeamAddress(address team)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove team wallet.
*/
function revokeTeamAddress(address team)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Authorize burnder contract.
*/
function registerBurnerAddress(address burner)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove burner contract.
*/
function revokeBurnerAddress(address burner)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setTokenIpfsHash(string memory hash)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setBaseTokenURI(string memory baseUri)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setTokenURI(string memory baseUri, string memory hash)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
// admin
//-------------------------------------------------------------------------
/**
* Enable/disable public/member minting.
*/
function toggleLock()
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Enable/disable public minting.
*/
function togglePublicMint()
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Get minted info for a user.
*/
function getMintInfo(address wallet)
public view
returns(Minted memory)
{
}
//-------------------------------------------------------------------------
// security
//-------------------------------------------------------------------------
/**
* Generate hash from input data.
*/
function generateHash(uint256 tag, uint256 allocation, uint256 count)
private view
returns(bytes32)
{
}
//-------------------------------------------------------------------------
/**
* Validate message was signed by signer.
*/
function validateSigner(bytes32 msgHash, bytes memory signature, address signer)
private pure
returns(bool)
{
}
//-------------------------------------------------------------------------
// minting
//-------------------------------------------------------------------------
/**
* Allow anyone to mint tokens for the right price.
*/
function mint(uint256 count)
public payable
notLocked
{
}
//-------------------------------------------------------------------------
/**
* Mint count tokens using securely signed message.
*/
function secureMint(bytes calldata signature, uint256 allocation, uint256 count)
external payable
notLocked
{
}
//-------------------------------------------------------------------------
/**
* Allow cryptopunk holders to claim.
*/
function claim(bytes calldata signature, uint256 allocation, uint256 count)
external
notLocked
{
}
//-------------------------------------------------------------------------
/**
* @dev Mints a token to an address.
* @param wallet address of the future owner of the token
*/
function teamMintTo(address wallet, uint256 count)
public
isTeam
{
}
//-------------------------------------------------------------------------
/**
* @dev Mints a token to an address.
* @param wallet address of the future owner of the token
*/
function artistMintTo(address wallet, uint256 count)
public
isArtist
{
}
//-------------------------------------------------------------------------
/**
* @dev Burns `tokenId`. See {ERC721-_burn}.
*/
function burn(uint256 tokenId)
public
isBurner
{
}
//-------------------------------------------------------------------------
// money
//-------------------------------------------------------------------------
/**
* Pull money out of this contract.
*/
function withdraw(address to, uint256 amount)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
// approval
//-------------------------------------------------------------------------
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts
* to enable gas-less listings.
*/
function isApprovedForAll(address owner, address operator)
override(ERC721Sequential, IERC721)
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* This is used instead of msg.sender as transactions won't be sent by
* the original token owner, but by OpenSea.
*/
function _msgSender()
override
internal view
returns (address sender)
{
}
//-------------------------------------------------------------------------
// ERC2981 - NFT Royalty Standard
//-------------------------------------------------------------------------
/**
* @dev Update royalty receiver + basis points.
*/
function setRoyaltyInfo(address receiver, uint96 feeBasisPoints)
external
onlyOwner
{
}
//-------------------------------------------------------------------------
// IERC165 - Introspection
//-------------------------------------------------------------------------
function supportsInterface(bytes4 interfaceId)
public view
override(ERC721SeqEnumerable, ERC2981)
returns (bool)
{
}
//-------------------------------------------------------------------------
// ERC721Metadata
//-------------------------------------------------------------------------
function baseTokenURI()
public view
returns (string memory)
{
}
//-------------------------------------------------------------------------
/**
* @dev Returns uri of a token. Not guarenteed token exists.
*/
function tokenURI(uint256 tokenId)
override
public view
returns (string memory)
{
}
//-------------------------------------------------------------------------
// OpenSea contractUri
//-------------------------------------------------------------------------
function setContractURI(string memory contractUri)
external
onlyOwner
{
}
//-------------------------------------------------------------------------
function contractURI()
public view
returns (string memory)
{
}
}
| _teamAddress[_msgSender()]||owner()==_msgSender(),"caller not team" | 194,980 | _teamAddress[_msgSender()]||owner()==_msgSender() |
"caller not burner" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
//------------------------------------------------------------------------------
// Dall-E Punks - Dunkz
//------------------------------------------------------------------------------
// Author: papaver (@papaver42)
//------------------------------------------------------------------------------
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./common/meta-transactions/ContentMixin.sol";
import "./common/meta-transactions/NativeMetaTransaction.sol";
import "./geneticchain/ERC721Sequential.sol";
import "./geneticchain/ERC721SeqEnumerable.sol";
import "./libraries/State.sol";
//------------------------------------------------------------------------------
// helper contracts
//------------------------------------------------------------------------------
contract OwnableDelegateProxy {}
//------------------------------------------------------------------------------
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
//------------------------------------------------------------------------------
// Dunkz721
//------------------------------------------------------------------------------
/**
* @title Dunkz
*
* ERC721 contract with various features:
* - low-gas implmentation
* - off-chain whitelist verify (secure minting)
* - public/artist/team token allocation
* - protected controlled burns
* - opensea proxy setup
* - simple funds withdrawl
*/
contract Dunkz is
ContextMixin,
ERC721SeqEnumerable,
ERC2981,
NativeMetaTransaction,
Ownable
{
using ECDSA for bytes32;
using State for State.Data;
//-------------------------------------------------------------------------
// structs
//-------------------------------------------------------------------------
struct Minted {
uint128 claim;
uint128 mint;
}
//-------------------------------------------------------------------------
// constants
//-------------------------------------------------------------------------
// erc721 metadata
string constant private __name = "Dall-E Punks";
string constant private __symbol = "DUNKZ";
// mint price
uint256 constant public memberPrice = .01 ether;
uint256 constant public publicPrice = .02 ether;
// allocations
uint256 constant public maxPublic = 5;
// artist wallets
address constant private _ataraAddress = 0xceC15d87719feDEcA61F7d11D2d205a4C0628517;
address constant private _papaverAddress = 0xa7B8a64dF4e47013C8A168945c9eb4F83BADC9C1;
address constant private _noStandingAddress = 0x6A4f0ECbBb10dFdFD010F8E7B1C7e4a358692981;
// verification address
address constant private _signer = 0xE5cb964B8b21491929414b969078CcF7FeCD4725;
// signature tags
uint256 constant private _tagClaim = 8118;
uint256 constant private _tagMember = 4224;
//-------------------------------------------------------------------------
// fields
//-------------------------------------------------------------------------
// token limits
uint256 public immutable publicMax;
uint256 public immutable artistMax;
uint256 public immutable teamMax;
// opensea proxy
address private immutable _proxyRegistryAddress;
// contract state
State.Data private _state;
// roles
mapping (address => bool) private _burnerAddress;
mapping (address => bool) private _artistAddress;
mapping (address => bool) private _teamAddress;
// track mint count per address
mapping (address => Minted) private _minted;
// token info
string private _baseUri;
string private _tokenIpfsHash;
// contract info
string private _contractUri;
//-------------------------------------------------------------------------
// modifiers
//-------------------------------------------------------------------------
modifier validTokenId(uint256 tokenId) {
}
//-------------------------------------------------------------------------
modifier approvedOrOwner(address operator, uint256 tokenId) {
}
//-------------------------------------------------------------------------
modifier isArtist() {
}
//-------------------------------------------------------------------------
modifier isTeam() {
}
//-------------------------------------------------------------------------
modifier isBurner() {
require(<FILL_ME>)
_;
}
//-------------------------------------------------------------------------
modifier notLocked() {
}
//-------------------------------------------------------------------------
// ctor
//-------------------------------------------------------------------------
constructor(
string memory baseUri_,
string memory ipfsHash_,
string memory contractUri_,
uint256[3] memory tokenMax_,
address royaltyAddress,
address proxyRegistryAddress)
ERC721Sequential(__name, __symbol)
{
}
//-------------------------------------------------------------------------
// accessors
//-------------------------------------------------------------------------
/**
* Check if public minting is live.
*/
function publicLive()
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* Check if contract is locked.
*/
function isLocked()
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* Get total team has minted.
*/
function teamMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Get total artist has minted.
*/
function artistMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Get total public has minted.
*/
function publicMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Authorize artist wallet.
*/
function registerArtistAddress(address artist)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove artist wallet.
*/
function revokeArtistAddress(address artist)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Authorize team wallet.
*/
function registerTeamAddress(address team)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove team wallet.
*/
function revokeTeamAddress(address team)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Authorize burnder contract.
*/
function registerBurnerAddress(address burner)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove burner contract.
*/
function revokeBurnerAddress(address burner)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setTokenIpfsHash(string memory hash)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setBaseTokenURI(string memory baseUri)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setTokenURI(string memory baseUri, string memory hash)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
// admin
//-------------------------------------------------------------------------
/**
* Enable/disable public/member minting.
*/
function toggleLock()
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Enable/disable public minting.
*/
function togglePublicMint()
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Get minted info for a user.
*/
function getMintInfo(address wallet)
public view
returns(Minted memory)
{
}
//-------------------------------------------------------------------------
// security
//-------------------------------------------------------------------------
/**
* Generate hash from input data.
*/
function generateHash(uint256 tag, uint256 allocation, uint256 count)
private view
returns(bytes32)
{
}
//-------------------------------------------------------------------------
/**
* Validate message was signed by signer.
*/
function validateSigner(bytes32 msgHash, bytes memory signature, address signer)
private pure
returns(bool)
{
}
//-------------------------------------------------------------------------
// minting
//-------------------------------------------------------------------------
/**
* Allow anyone to mint tokens for the right price.
*/
function mint(uint256 count)
public payable
notLocked
{
}
//-------------------------------------------------------------------------
/**
* Mint count tokens using securely signed message.
*/
function secureMint(bytes calldata signature, uint256 allocation, uint256 count)
external payable
notLocked
{
}
//-------------------------------------------------------------------------
/**
* Allow cryptopunk holders to claim.
*/
function claim(bytes calldata signature, uint256 allocation, uint256 count)
external
notLocked
{
}
//-------------------------------------------------------------------------
/**
* @dev Mints a token to an address.
* @param wallet address of the future owner of the token
*/
function teamMintTo(address wallet, uint256 count)
public
isTeam
{
}
//-------------------------------------------------------------------------
/**
* @dev Mints a token to an address.
* @param wallet address of the future owner of the token
*/
function artistMintTo(address wallet, uint256 count)
public
isArtist
{
}
//-------------------------------------------------------------------------
/**
* @dev Burns `tokenId`. See {ERC721-_burn}.
*/
function burn(uint256 tokenId)
public
isBurner
{
}
//-------------------------------------------------------------------------
// money
//-------------------------------------------------------------------------
/**
* Pull money out of this contract.
*/
function withdraw(address to, uint256 amount)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
// approval
//-------------------------------------------------------------------------
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts
* to enable gas-less listings.
*/
function isApprovedForAll(address owner, address operator)
override(ERC721Sequential, IERC721)
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* This is used instead of msg.sender as transactions won't be sent by
* the original token owner, but by OpenSea.
*/
function _msgSender()
override
internal view
returns (address sender)
{
}
//-------------------------------------------------------------------------
// ERC2981 - NFT Royalty Standard
//-------------------------------------------------------------------------
/**
* @dev Update royalty receiver + basis points.
*/
function setRoyaltyInfo(address receiver, uint96 feeBasisPoints)
external
onlyOwner
{
}
//-------------------------------------------------------------------------
// IERC165 - Introspection
//-------------------------------------------------------------------------
function supportsInterface(bytes4 interfaceId)
public view
override(ERC721SeqEnumerable, ERC2981)
returns (bool)
{
}
//-------------------------------------------------------------------------
// ERC721Metadata
//-------------------------------------------------------------------------
function baseTokenURI()
public view
returns (string memory)
{
}
//-------------------------------------------------------------------------
/**
* @dev Returns uri of a token. Not guarenteed token exists.
*/
function tokenURI(uint256 tokenId)
override
public view
returns (string memory)
{
}
//-------------------------------------------------------------------------
// OpenSea contractUri
//-------------------------------------------------------------------------
function setContractURI(string memory contractUri)
external
onlyOwner
{
}
//-------------------------------------------------------------------------
function contractURI()
public view
returns (string memory)
{
}
}
| _burnerAddress[_msgSender()],"caller not burner" | 194,980 | _burnerAddress[_msgSender()] |
"address already registered" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
//------------------------------------------------------------------------------
// Dall-E Punks - Dunkz
//------------------------------------------------------------------------------
// Author: papaver (@papaver42)
//------------------------------------------------------------------------------
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./common/meta-transactions/ContentMixin.sol";
import "./common/meta-transactions/NativeMetaTransaction.sol";
import "./geneticchain/ERC721Sequential.sol";
import "./geneticchain/ERC721SeqEnumerable.sol";
import "./libraries/State.sol";
//------------------------------------------------------------------------------
// helper contracts
//------------------------------------------------------------------------------
contract OwnableDelegateProxy {}
//------------------------------------------------------------------------------
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
//------------------------------------------------------------------------------
// Dunkz721
//------------------------------------------------------------------------------
/**
* @title Dunkz
*
* ERC721 contract with various features:
* - low-gas implmentation
* - off-chain whitelist verify (secure minting)
* - public/artist/team token allocation
* - protected controlled burns
* - opensea proxy setup
* - simple funds withdrawl
*/
contract Dunkz is
ContextMixin,
ERC721SeqEnumerable,
ERC2981,
NativeMetaTransaction,
Ownable
{
using ECDSA for bytes32;
using State for State.Data;
//-------------------------------------------------------------------------
// structs
//-------------------------------------------------------------------------
struct Minted {
uint128 claim;
uint128 mint;
}
//-------------------------------------------------------------------------
// constants
//-------------------------------------------------------------------------
// erc721 metadata
string constant private __name = "Dall-E Punks";
string constant private __symbol = "DUNKZ";
// mint price
uint256 constant public memberPrice = .01 ether;
uint256 constant public publicPrice = .02 ether;
// allocations
uint256 constant public maxPublic = 5;
// artist wallets
address constant private _ataraAddress = 0xceC15d87719feDEcA61F7d11D2d205a4C0628517;
address constant private _papaverAddress = 0xa7B8a64dF4e47013C8A168945c9eb4F83BADC9C1;
address constant private _noStandingAddress = 0x6A4f0ECbBb10dFdFD010F8E7B1C7e4a358692981;
// verification address
address constant private _signer = 0xE5cb964B8b21491929414b969078CcF7FeCD4725;
// signature tags
uint256 constant private _tagClaim = 8118;
uint256 constant private _tagMember = 4224;
//-------------------------------------------------------------------------
// fields
//-------------------------------------------------------------------------
// token limits
uint256 public immutable publicMax;
uint256 public immutable artistMax;
uint256 public immutable teamMax;
// opensea proxy
address private immutable _proxyRegistryAddress;
// contract state
State.Data private _state;
// roles
mapping (address => bool) private _burnerAddress;
mapping (address => bool) private _artistAddress;
mapping (address => bool) private _teamAddress;
// track mint count per address
mapping (address => Minted) private _minted;
// token info
string private _baseUri;
string private _tokenIpfsHash;
// contract info
string private _contractUri;
//-------------------------------------------------------------------------
// modifiers
//-------------------------------------------------------------------------
modifier validTokenId(uint256 tokenId) {
}
//-------------------------------------------------------------------------
modifier approvedOrOwner(address operator, uint256 tokenId) {
}
//-------------------------------------------------------------------------
modifier isArtist() {
}
//-------------------------------------------------------------------------
modifier isTeam() {
}
//-------------------------------------------------------------------------
modifier isBurner() {
}
//-------------------------------------------------------------------------
modifier notLocked() {
}
//-------------------------------------------------------------------------
// ctor
//-------------------------------------------------------------------------
constructor(
string memory baseUri_,
string memory ipfsHash_,
string memory contractUri_,
uint256[3] memory tokenMax_,
address royaltyAddress,
address proxyRegistryAddress)
ERC721Sequential(__name, __symbol)
{
}
//-------------------------------------------------------------------------
// accessors
//-------------------------------------------------------------------------
/**
* Check if public minting is live.
*/
function publicLive()
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* Check if contract is locked.
*/
function isLocked()
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* Get total team has minted.
*/
function teamMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Get total artist has minted.
*/
function artistMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Get total public has minted.
*/
function publicMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Authorize artist wallet.
*/
function registerArtistAddress(address artist)
public
onlyOwner
{
require(<FILL_ME>)
_artistAddress[artist] = true;
}
//-------------------------------------------------------------------------
/**
* Remove artist wallet.
*/
function revokeArtistAddress(address artist)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Authorize team wallet.
*/
function registerTeamAddress(address team)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove team wallet.
*/
function revokeTeamAddress(address team)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Authorize burnder contract.
*/
function registerBurnerAddress(address burner)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove burner contract.
*/
function revokeBurnerAddress(address burner)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setTokenIpfsHash(string memory hash)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setBaseTokenURI(string memory baseUri)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setTokenURI(string memory baseUri, string memory hash)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
// admin
//-------------------------------------------------------------------------
/**
* Enable/disable public/member minting.
*/
function toggleLock()
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Enable/disable public minting.
*/
function togglePublicMint()
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Get minted info for a user.
*/
function getMintInfo(address wallet)
public view
returns(Minted memory)
{
}
//-------------------------------------------------------------------------
// security
//-------------------------------------------------------------------------
/**
* Generate hash from input data.
*/
function generateHash(uint256 tag, uint256 allocation, uint256 count)
private view
returns(bytes32)
{
}
//-------------------------------------------------------------------------
/**
* Validate message was signed by signer.
*/
function validateSigner(bytes32 msgHash, bytes memory signature, address signer)
private pure
returns(bool)
{
}
//-------------------------------------------------------------------------
// minting
//-------------------------------------------------------------------------
/**
* Allow anyone to mint tokens for the right price.
*/
function mint(uint256 count)
public payable
notLocked
{
}
//-------------------------------------------------------------------------
/**
* Mint count tokens using securely signed message.
*/
function secureMint(bytes calldata signature, uint256 allocation, uint256 count)
external payable
notLocked
{
}
//-------------------------------------------------------------------------
/**
* Allow cryptopunk holders to claim.
*/
function claim(bytes calldata signature, uint256 allocation, uint256 count)
external
notLocked
{
}
//-------------------------------------------------------------------------
/**
* @dev Mints a token to an address.
* @param wallet address of the future owner of the token
*/
function teamMintTo(address wallet, uint256 count)
public
isTeam
{
}
//-------------------------------------------------------------------------
/**
* @dev Mints a token to an address.
* @param wallet address of the future owner of the token
*/
function artistMintTo(address wallet, uint256 count)
public
isArtist
{
}
//-------------------------------------------------------------------------
/**
* @dev Burns `tokenId`. See {ERC721-_burn}.
*/
function burn(uint256 tokenId)
public
isBurner
{
}
//-------------------------------------------------------------------------
// money
//-------------------------------------------------------------------------
/**
* Pull money out of this contract.
*/
function withdraw(address to, uint256 amount)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
// approval
//-------------------------------------------------------------------------
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts
* to enable gas-less listings.
*/
function isApprovedForAll(address owner, address operator)
override(ERC721Sequential, IERC721)
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* This is used instead of msg.sender as transactions won't be sent by
* the original token owner, but by OpenSea.
*/
function _msgSender()
override
internal view
returns (address sender)
{
}
//-------------------------------------------------------------------------
// ERC2981 - NFT Royalty Standard
//-------------------------------------------------------------------------
/**
* @dev Update royalty receiver + basis points.
*/
function setRoyaltyInfo(address receiver, uint96 feeBasisPoints)
external
onlyOwner
{
}
//-------------------------------------------------------------------------
// IERC165 - Introspection
//-------------------------------------------------------------------------
function supportsInterface(bytes4 interfaceId)
public view
override(ERC721SeqEnumerable, ERC2981)
returns (bool)
{
}
//-------------------------------------------------------------------------
// ERC721Metadata
//-------------------------------------------------------------------------
function baseTokenURI()
public view
returns (string memory)
{
}
//-------------------------------------------------------------------------
/**
* @dev Returns uri of a token. Not guarenteed token exists.
*/
function tokenURI(uint256 tokenId)
override
public view
returns (string memory)
{
}
//-------------------------------------------------------------------------
// OpenSea contractUri
//-------------------------------------------------------------------------
function setContractURI(string memory contractUri)
external
onlyOwner
{
}
//-------------------------------------------------------------------------
function contractURI()
public view
returns (string memory)
{
}
}
| !_artistAddress[artist],"address already registered" | 194,980 | !_artistAddress[artist] |
"address not registered" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
//------------------------------------------------------------------------------
// Dall-E Punks - Dunkz
//------------------------------------------------------------------------------
// Author: papaver (@papaver42)
//------------------------------------------------------------------------------
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./common/meta-transactions/ContentMixin.sol";
import "./common/meta-transactions/NativeMetaTransaction.sol";
import "./geneticchain/ERC721Sequential.sol";
import "./geneticchain/ERC721SeqEnumerable.sol";
import "./libraries/State.sol";
//------------------------------------------------------------------------------
// helper contracts
//------------------------------------------------------------------------------
contract OwnableDelegateProxy {}
//------------------------------------------------------------------------------
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
//------------------------------------------------------------------------------
// Dunkz721
//------------------------------------------------------------------------------
/**
* @title Dunkz
*
* ERC721 contract with various features:
* - low-gas implmentation
* - off-chain whitelist verify (secure minting)
* - public/artist/team token allocation
* - protected controlled burns
* - opensea proxy setup
* - simple funds withdrawl
*/
contract Dunkz is
ContextMixin,
ERC721SeqEnumerable,
ERC2981,
NativeMetaTransaction,
Ownable
{
using ECDSA for bytes32;
using State for State.Data;
//-------------------------------------------------------------------------
// structs
//-------------------------------------------------------------------------
struct Minted {
uint128 claim;
uint128 mint;
}
//-------------------------------------------------------------------------
// constants
//-------------------------------------------------------------------------
// erc721 metadata
string constant private __name = "Dall-E Punks";
string constant private __symbol = "DUNKZ";
// mint price
uint256 constant public memberPrice = .01 ether;
uint256 constant public publicPrice = .02 ether;
// allocations
uint256 constant public maxPublic = 5;
// artist wallets
address constant private _ataraAddress = 0xceC15d87719feDEcA61F7d11D2d205a4C0628517;
address constant private _papaverAddress = 0xa7B8a64dF4e47013C8A168945c9eb4F83BADC9C1;
address constant private _noStandingAddress = 0x6A4f0ECbBb10dFdFD010F8E7B1C7e4a358692981;
// verification address
address constant private _signer = 0xE5cb964B8b21491929414b969078CcF7FeCD4725;
// signature tags
uint256 constant private _tagClaim = 8118;
uint256 constant private _tagMember = 4224;
//-------------------------------------------------------------------------
// fields
//-------------------------------------------------------------------------
// token limits
uint256 public immutable publicMax;
uint256 public immutable artistMax;
uint256 public immutable teamMax;
// opensea proxy
address private immutable _proxyRegistryAddress;
// contract state
State.Data private _state;
// roles
mapping (address => bool) private _burnerAddress;
mapping (address => bool) private _artistAddress;
mapping (address => bool) private _teamAddress;
// track mint count per address
mapping (address => Minted) private _minted;
// token info
string private _baseUri;
string private _tokenIpfsHash;
// contract info
string private _contractUri;
//-------------------------------------------------------------------------
// modifiers
//-------------------------------------------------------------------------
modifier validTokenId(uint256 tokenId) {
}
//-------------------------------------------------------------------------
modifier approvedOrOwner(address operator, uint256 tokenId) {
}
//-------------------------------------------------------------------------
modifier isArtist() {
}
//-------------------------------------------------------------------------
modifier isTeam() {
}
//-------------------------------------------------------------------------
modifier isBurner() {
}
//-------------------------------------------------------------------------
modifier notLocked() {
}
//-------------------------------------------------------------------------
// ctor
//-------------------------------------------------------------------------
constructor(
string memory baseUri_,
string memory ipfsHash_,
string memory contractUri_,
uint256[3] memory tokenMax_,
address royaltyAddress,
address proxyRegistryAddress)
ERC721Sequential(__name, __symbol)
{
}
//-------------------------------------------------------------------------
// accessors
//-------------------------------------------------------------------------
/**
* Check if public minting is live.
*/
function publicLive()
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* Check if contract is locked.
*/
function isLocked()
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* Get total team has minted.
*/
function teamMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Get total artist has minted.
*/
function artistMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Get total public has minted.
*/
function publicMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Authorize artist wallet.
*/
function registerArtistAddress(address artist)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove artist wallet.
*/
function revokeArtistAddress(address artist)
public
onlyOwner
{
require(<FILL_ME>)
delete _artistAddress[artist];
}
//-------------------------------------------------------------------------
/**
* Authorize team wallet.
*/
function registerTeamAddress(address team)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove team wallet.
*/
function revokeTeamAddress(address team)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Authorize burnder contract.
*/
function registerBurnerAddress(address burner)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove burner contract.
*/
function revokeBurnerAddress(address burner)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setTokenIpfsHash(string memory hash)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setBaseTokenURI(string memory baseUri)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setTokenURI(string memory baseUri, string memory hash)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
// admin
//-------------------------------------------------------------------------
/**
* Enable/disable public/member minting.
*/
function toggleLock()
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Enable/disable public minting.
*/
function togglePublicMint()
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Get minted info for a user.
*/
function getMintInfo(address wallet)
public view
returns(Minted memory)
{
}
//-------------------------------------------------------------------------
// security
//-------------------------------------------------------------------------
/**
* Generate hash from input data.
*/
function generateHash(uint256 tag, uint256 allocation, uint256 count)
private view
returns(bytes32)
{
}
//-------------------------------------------------------------------------
/**
* Validate message was signed by signer.
*/
function validateSigner(bytes32 msgHash, bytes memory signature, address signer)
private pure
returns(bool)
{
}
//-------------------------------------------------------------------------
// minting
//-------------------------------------------------------------------------
/**
* Allow anyone to mint tokens for the right price.
*/
function mint(uint256 count)
public payable
notLocked
{
}
//-------------------------------------------------------------------------
/**
* Mint count tokens using securely signed message.
*/
function secureMint(bytes calldata signature, uint256 allocation, uint256 count)
external payable
notLocked
{
}
//-------------------------------------------------------------------------
/**
* Allow cryptopunk holders to claim.
*/
function claim(bytes calldata signature, uint256 allocation, uint256 count)
external
notLocked
{
}
//-------------------------------------------------------------------------
/**
* @dev Mints a token to an address.
* @param wallet address of the future owner of the token
*/
function teamMintTo(address wallet, uint256 count)
public
isTeam
{
}
//-------------------------------------------------------------------------
/**
* @dev Mints a token to an address.
* @param wallet address of the future owner of the token
*/
function artistMintTo(address wallet, uint256 count)
public
isArtist
{
}
//-------------------------------------------------------------------------
/**
* @dev Burns `tokenId`. See {ERC721-_burn}.
*/
function burn(uint256 tokenId)
public
isBurner
{
}
//-------------------------------------------------------------------------
// money
//-------------------------------------------------------------------------
/**
* Pull money out of this contract.
*/
function withdraw(address to, uint256 amount)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
// approval
//-------------------------------------------------------------------------
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts
* to enable gas-less listings.
*/
function isApprovedForAll(address owner, address operator)
override(ERC721Sequential, IERC721)
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* This is used instead of msg.sender as transactions won't be sent by
* the original token owner, but by OpenSea.
*/
function _msgSender()
override
internal view
returns (address sender)
{
}
//-------------------------------------------------------------------------
// ERC2981 - NFT Royalty Standard
//-------------------------------------------------------------------------
/**
* @dev Update royalty receiver + basis points.
*/
function setRoyaltyInfo(address receiver, uint96 feeBasisPoints)
external
onlyOwner
{
}
//-------------------------------------------------------------------------
// IERC165 - Introspection
//-------------------------------------------------------------------------
function supportsInterface(bytes4 interfaceId)
public view
override(ERC721SeqEnumerable, ERC2981)
returns (bool)
{
}
//-------------------------------------------------------------------------
// ERC721Metadata
//-------------------------------------------------------------------------
function baseTokenURI()
public view
returns (string memory)
{
}
//-------------------------------------------------------------------------
/**
* @dev Returns uri of a token. Not guarenteed token exists.
*/
function tokenURI(uint256 tokenId)
override
public view
returns (string memory)
{
}
//-------------------------------------------------------------------------
// OpenSea contractUri
//-------------------------------------------------------------------------
function setContractURI(string memory contractUri)
external
onlyOwner
{
}
//-------------------------------------------------------------------------
function contractURI()
public view
returns (string memory)
{
}
}
| _artistAddress[artist],"address not registered" | 194,980 | _artistAddress[artist] |
"address already registered" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
//------------------------------------------------------------------------------
// Dall-E Punks - Dunkz
//------------------------------------------------------------------------------
// Author: papaver (@papaver42)
//------------------------------------------------------------------------------
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./common/meta-transactions/ContentMixin.sol";
import "./common/meta-transactions/NativeMetaTransaction.sol";
import "./geneticchain/ERC721Sequential.sol";
import "./geneticchain/ERC721SeqEnumerable.sol";
import "./libraries/State.sol";
//------------------------------------------------------------------------------
// helper contracts
//------------------------------------------------------------------------------
contract OwnableDelegateProxy {}
//------------------------------------------------------------------------------
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
//------------------------------------------------------------------------------
// Dunkz721
//------------------------------------------------------------------------------
/**
* @title Dunkz
*
* ERC721 contract with various features:
* - low-gas implmentation
* - off-chain whitelist verify (secure minting)
* - public/artist/team token allocation
* - protected controlled burns
* - opensea proxy setup
* - simple funds withdrawl
*/
contract Dunkz is
ContextMixin,
ERC721SeqEnumerable,
ERC2981,
NativeMetaTransaction,
Ownable
{
using ECDSA for bytes32;
using State for State.Data;
//-------------------------------------------------------------------------
// structs
//-------------------------------------------------------------------------
struct Minted {
uint128 claim;
uint128 mint;
}
//-------------------------------------------------------------------------
// constants
//-------------------------------------------------------------------------
// erc721 metadata
string constant private __name = "Dall-E Punks";
string constant private __symbol = "DUNKZ";
// mint price
uint256 constant public memberPrice = .01 ether;
uint256 constant public publicPrice = .02 ether;
// allocations
uint256 constant public maxPublic = 5;
// artist wallets
address constant private _ataraAddress = 0xceC15d87719feDEcA61F7d11D2d205a4C0628517;
address constant private _papaverAddress = 0xa7B8a64dF4e47013C8A168945c9eb4F83BADC9C1;
address constant private _noStandingAddress = 0x6A4f0ECbBb10dFdFD010F8E7B1C7e4a358692981;
// verification address
address constant private _signer = 0xE5cb964B8b21491929414b969078CcF7FeCD4725;
// signature tags
uint256 constant private _tagClaim = 8118;
uint256 constant private _tagMember = 4224;
//-------------------------------------------------------------------------
// fields
//-------------------------------------------------------------------------
// token limits
uint256 public immutable publicMax;
uint256 public immutable artistMax;
uint256 public immutable teamMax;
// opensea proxy
address private immutable _proxyRegistryAddress;
// contract state
State.Data private _state;
// roles
mapping (address => bool) private _burnerAddress;
mapping (address => bool) private _artistAddress;
mapping (address => bool) private _teamAddress;
// track mint count per address
mapping (address => Minted) private _minted;
// token info
string private _baseUri;
string private _tokenIpfsHash;
// contract info
string private _contractUri;
//-------------------------------------------------------------------------
// modifiers
//-------------------------------------------------------------------------
modifier validTokenId(uint256 tokenId) {
}
//-------------------------------------------------------------------------
modifier approvedOrOwner(address operator, uint256 tokenId) {
}
//-------------------------------------------------------------------------
modifier isArtist() {
}
//-------------------------------------------------------------------------
modifier isTeam() {
}
//-------------------------------------------------------------------------
modifier isBurner() {
}
//-------------------------------------------------------------------------
modifier notLocked() {
}
//-------------------------------------------------------------------------
// ctor
//-------------------------------------------------------------------------
constructor(
string memory baseUri_,
string memory ipfsHash_,
string memory contractUri_,
uint256[3] memory tokenMax_,
address royaltyAddress,
address proxyRegistryAddress)
ERC721Sequential(__name, __symbol)
{
}
//-------------------------------------------------------------------------
// accessors
//-------------------------------------------------------------------------
/**
* Check if public minting is live.
*/
function publicLive()
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* Check if contract is locked.
*/
function isLocked()
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* Get total team has minted.
*/
function teamMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Get total artist has minted.
*/
function artistMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Get total public has minted.
*/
function publicMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Authorize artist wallet.
*/
function registerArtistAddress(address artist)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove artist wallet.
*/
function revokeArtistAddress(address artist)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Authorize team wallet.
*/
function registerTeamAddress(address team)
public
onlyOwner
{
require(<FILL_ME>)
_teamAddress[team] = true;
}
//-------------------------------------------------------------------------
/**
* Remove team wallet.
*/
function revokeTeamAddress(address team)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Authorize burnder contract.
*/
function registerBurnerAddress(address burner)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove burner contract.
*/
function revokeBurnerAddress(address burner)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setTokenIpfsHash(string memory hash)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setBaseTokenURI(string memory baseUri)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setTokenURI(string memory baseUri, string memory hash)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
// admin
//-------------------------------------------------------------------------
/**
* Enable/disable public/member minting.
*/
function toggleLock()
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Enable/disable public minting.
*/
function togglePublicMint()
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Get minted info for a user.
*/
function getMintInfo(address wallet)
public view
returns(Minted memory)
{
}
//-------------------------------------------------------------------------
// security
//-------------------------------------------------------------------------
/**
* Generate hash from input data.
*/
function generateHash(uint256 tag, uint256 allocation, uint256 count)
private view
returns(bytes32)
{
}
//-------------------------------------------------------------------------
/**
* Validate message was signed by signer.
*/
function validateSigner(bytes32 msgHash, bytes memory signature, address signer)
private pure
returns(bool)
{
}
//-------------------------------------------------------------------------
// minting
//-------------------------------------------------------------------------
/**
* Allow anyone to mint tokens for the right price.
*/
function mint(uint256 count)
public payable
notLocked
{
}
//-------------------------------------------------------------------------
/**
* Mint count tokens using securely signed message.
*/
function secureMint(bytes calldata signature, uint256 allocation, uint256 count)
external payable
notLocked
{
}
//-------------------------------------------------------------------------
/**
* Allow cryptopunk holders to claim.
*/
function claim(bytes calldata signature, uint256 allocation, uint256 count)
external
notLocked
{
}
//-------------------------------------------------------------------------
/**
* @dev Mints a token to an address.
* @param wallet address of the future owner of the token
*/
function teamMintTo(address wallet, uint256 count)
public
isTeam
{
}
//-------------------------------------------------------------------------
/**
* @dev Mints a token to an address.
* @param wallet address of the future owner of the token
*/
function artistMintTo(address wallet, uint256 count)
public
isArtist
{
}
//-------------------------------------------------------------------------
/**
* @dev Burns `tokenId`. See {ERC721-_burn}.
*/
function burn(uint256 tokenId)
public
isBurner
{
}
//-------------------------------------------------------------------------
// money
//-------------------------------------------------------------------------
/**
* Pull money out of this contract.
*/
function withdraw(address to, uint256 amount)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
// approval
//-------------------------------------------------------------------------
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts
* to enable gas-less listings.
*/
function isApprovedForAll(address owner, address operator)
override(ERC721Sequential, IERC721)
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* This is used instead of msg.sender as transactions won't be sent by
* the original token owner, but by OpenSea.
*/
function _msgSender()
override
internal view
returns (address sender)
{
}
//-------------------------------------------------------------------------
// ERC2981 - NFT Royalty Standard
//-------------------------------------------------------------------------
/**
* @dev Update royalty receiver + basis points.
*/
function setRoyaltyInfo(address receiver, uint96 feeBasisPoints)
external
onlyOwner
{
}
//-------------------------------------------------------------------------
// IERC165 - Introspection
//-------------------------------------------------------------------------
function supportsInterface(bytes4 interfaceId)
public view
override(ERC721SeqEnumerable, ERC2981)
returns (bool)
{
}
//-------------------------------------------------------------------------
// ERC721Metadata
//-------------------------------------------------------------------------
function baseTokenURI()
public view
returns (string memory)
{
}
//-------------------------------------------------------------------------
/**
* @dev Returns uri of a token. Not guarenteed token exists.
*/
function tokenURI(uint256 tokenId)
override
public view
returns (string memory)
{
}
//-------------------------------------------------------------------------
// OpenSea contractUri
//-------------------------------------------------------------------------
function setContractURI(string memory contractUri)
external
onlyOwner
{
}
//-------------------------------------------------------------------------
function contractURI()
public view
returns (string memory)
{
}
}
| !_teamAddress[team],"address already registered" | 194,980 | !_teamAddress[team] |
"address not registered" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
//------------------------------------------------------------------------------
// Dall-E Punks - Dunkz
//------------------------------------------------------------------------------
// Author: papaver (@papaver42)
//------------------------------------------------------------------------------
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./common/meta-transactions/ContentMixin.sol";
import "./common/meta-transactions/NativeMetaTransaction.sol";
import "./geneticchain/ERC721Sequential.sol";
import "./geneticchain/ERC721SeqEnumerable.sol";
import "./libraries/State.sol";
//------------------------------------------------------------------------------
// helper contracts
//------------------------------------------------------------------------------
contract OwnableDelegateProxy {}
//------------------------------------------------------------------------------
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
//------------------------------------------------------------------------------
// Dunkz721
//------------------------------------------------------------------------------
/**
* @title Dunkz
*
* ERC721 contract with various features:
* - low-gas implmentation
* - off-chain whitelist verify (secure minting)
* - public/artist/team token allocation
* - protected controlled burns
* - opensea proxy setup
* - simple funds withdrawl
*/
contract Dunkz is
ContextMixin,
ERC721SeqEnumerable,
ERC2981,
NativeMetaTransaction,
Ownable
{
using ECDSA for bytes32;
using State for State.Data;
//-------------------------------------------------------------------------
// structs
//-------------------------------------------------------------------------
struct Minted {
uint128 claim;
uint128 mint;
}
//-------------------------------------------------------------------------
// constants
//-------------------------------------------------------------------------
// erc721 metadata
string constant private __name = "Dall-E Punks";
string constant private __symbol = "DUNKZ";
// mint price
uint256 constant public memberPrice = .01 ether;
uint256 constant public publicPrice = .02 ether;
// allocations
uint256 constant public maxPublic = 5;
// artist wallets
address constant private _ataraAddress = 0xceC15d87719feDEcA61F7d11D2d205a4C0628517;
address constant private _papaverAddress = 0xa7B8a64dF4e47013C8A168945c9eb4F83BADC9C1;
address constant private _noStandingAddress = 0x6A4f0ECbBb10dFdFD010F8E7B1C7e4a358692981;
// verification address
address constant private _signer = 0xE5cb964B8b21491929414b969078CcF7FeCD4725;
// signature tags
uint256 constant private _tagClaim = 8118;
uint256 constant private _tagMember = 4224;
//-------------------------------------------------------------------------
// fields
//-------------------------------------------------------------------------
// token limits
uint256 public immutable publicMax;
uint256 public immutable artistMax;
uint256 public immutable teamMax;
// opensea proxy
address private immutable _proxyRegistryAddress;
// contract state
State.Data private _state;
// roles
mapping (address => bool) private _burnerAddress;
mapping (address => bool) private _artistAddress;
mapping (address => bool) private _teamAddress;
// track mint count per address
mapping (address => Minted) private _minted;
// token info
string private _baseUri;
string private _tokenIpfsHash;
// contract info
string private _contractUri;
//-------------------------------------------------------------------------
// modifiers
//-------------------------------------------------------------------------
modifier validTokenId(uint256 tokenId) {
}
//-------------------------------------------------------------------------
modifier approvedOrOwner(address operator, uint256 tokenId) {
}
//-------------------------------------------------------------------------
modifier isArtist() {
}
//-------------------------------------------------------------------------
modifier isTeam() {
}
//-------------------------------------------------------------------------
modifier isBurner() {
}
//-------------------------------------------------------------------------
modifier notLocked() {
}
//-------------------------------------------------------------------------
// ctor
//-------------------------------------------------------------------------
constructor(
string memory baseUri_,
string memory ipfsHash_,
string memory contractUri_,
uint256[3] memory tokenMax_,
address royaltyAddress,
address proxyRegistryAddress)
ERC721Sequential(__name, __symbol)
{
}
//-------------------------------------------------------------------------
// accessors
//-------------------------------------------------------------------------
/**
* Check if public minting is live.
*/
function publicLive()
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* Check if contract is locked.
*/
function isLocked()
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* Get total team has minted.
*/
function teamMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Get total artist has minted.
*/
function artistMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Get total public has minted.
*/
function publicMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Authorize artist wallet.
*/
function registerArtistAddress(address artist)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove artist wallet.
*/
function revokeArtistAddress(address artist)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Authorize team wallet.
*/
function registerTeamAddress(address team)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove team wallet.
*/
function revokeTeamAddress(address team)
public
onlyOwner
{
require(<FILL_ME>)
delete _teamAddress[team];
}
//-------------------------------------------------------------------------
/**
* Authorize burnder contract.
*/
function registerBurnerAddress(address burner)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove burner contract.
*/
function revokeBurnerAddress(address burner)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setTokenIpfsHash(string memory hash)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setBaseTokenURI(string memory baseUri)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setTokenURI(string memory baseUri, string memory hash)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
// admin
//-------------------------------------------------------------------------
/**
* Enable/disable public/member minting.
*/
function toggleLock()
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Enable/disable public minting.
*/
function togglePublicMint()
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Get minted info for a user.
*/
function getMintInfo(address wallet)
public view
returns(Minted memory)
{
}
//-------------------------------------------------------------------------
// security
//-------------------------------------------------------------------------
/**
* Generate hash from input data.
*/
function generateHash(uint256 tag, uint256 allocation, uint256 count)
private view
returns(bytes32)
{
}
//-------------------------------------------------------------------------
/**
* Validate message was signed by signer.
*/
function validateSigner(bytes32 msgHash, bytes memory signature, address signer)
private pure
returns(bool)
{
}
//-------------------------------------------------------------------------
// minting
//-------------------------------------------------------------------------
/**
* Allow anyone to mint tokens for the right price.
*/
function mint(uint256 count)
public payable
notLocked
{
}
//-------------------------------------------------------------------------
/**
* Mint count tokens using securely signed message.
*/
function secureMint(bytes calldata signature, uint256 allocation, uint256 count)
external payable
notLocked
{
}
//-------------------------------------------------------------------------
/**
* Allow cryptopunk holders to claim.
*/
function claim(bytes calldata signature, uint256 allocation, uint256 count)
external
notLocked
{
}
//-------------------------------------------------------------------------
/**
* @dev Mints a token to an address.
* @param wallet address of the future owner of the token
*/
function teamMintTo(address wallet, uint256 count)
public
isTeam
{
}
//-------------------------------------------------------------------------
/**
* @dev Mints a token to an address.
* @param wallet address of the future owner of the token
*/
function artistMintTo(address wallet, uint256 count)
public
isArtist
{
}
//-------------------------------------------------------------------------
/**
* @dev Burns `tokenId`. See {ERC721-_burn}.
*/
function burn(uint256 tokenId)
public
isBurner
{
}
//-------------------------------------------------------------------------
// money
//-------------------------------------------------------------------------
/**
* Pull money out of this contract.
*/
function withdraw(address to, uint256 amount)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
// approval
//-------------------------------------------------------------------------
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts
* to enable gas-less listings.
*/
function isApprovedForAll(address owner, address operator)
override(ERC721Sequential, IERC721)
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* This is used instead of msg.sender as transactions won't be sent by
* the original token owner, but by OpenSea.
*/
function _msgSender()
override
internal view
returns (address sender)
{
}
//-------------------------------------------------------------------------
// ERC2981 - NFT Royalty Standard
//-------------------------------------------------------------------------
/**
* @dev Update royalty receiver + basis points.
*/
function setRoyaltyInfo(address receiver, uint96 feeBasisPoints)
external
onlyOwner
{
}
//-------------------------------------------------------------------------
// IERC165 - Introspection
//-------------------------------------------------------------------------
function supportsInterface(bytes4 interfaceId)
public view
override(ERC721SeqEnumerable, ERC2981)
returns (bool)
{
}
//-------------------------------------------------------------------------
// ERC721Metadata
//-------------------------------------------------------------------------
function baseTokenURI()
public view
returns (string memory)
{
}
//-------------------------------------------------------------------------
/**
* @dev Returns uri of a token. Not guarenteed token exists.
*/
function tokenURI(uint256 tokenId)
override
public view
returns (string memory)
{
}
//-------------------------------------------------------------------------
// OpenSea contractUri
//-------------------------------------------------------------------------
function setContractURI(string memory contractUri)
external
onlyOwner
{
}
//-------------------------------------------------------------------------
function contractURI()
public view
returns (string memory)
{
}
}
| _teamAddress[team],"address not registered" | 194,980 | _teamAddress[team] |
"address already registered" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
//------------------------------------------------------------------------------
// Dall-E Punks - Dunkz
//------------------------------------------------------------------------------
// Author: papaver (@papaver42)
//------------------------------------------------------------------------------
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./common/meta-transactions/ContentMixin.sol";
import "./common/meta-transactions/NativeMetaTransaction.sol";
import "./geneticchain/ERC721Sequential.sol";
import "./geneticchain/ERC721SeqEnumerable.sol";
import "./libraries/State.sol";
//------------------------------------------------------------------------------
// helper contracts
//------------------------------------------------------------------------------
contract OwnableDelegateProxy {}
//------------------------------------------------------------------------------
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
//------------------------------------------------------------------------------
// Dunkz721
//------------------------------------------------------------------------------
/**
* @title Dunkz
*
* ERC721 contract with various features:
* - low-gas implmentation
* - off-chain whitelist verify (secure minting)
* - public/artist/team token allocation
* - protected controlled burns
* - opensea proxy setup
* - simple funds withdrawl
*/
contract Dunkz is
ContextMixin,
ERC721SeqEnumerable,
ERC2981,
NativeMetaTransaction,
Ownable
{
using ECDSA for bytes32;
using State for State.Data;
//-------------------------------------------------------------------------
// structs
//-------------------------------------------------------------------------
struct Minted {
uint128 claim;
uint128 mint;
}
//-------------------------------------------------------------------------
// constants
//-------------------------------------------------------------------------
// erc721 metadata
string constant private __name = "Dall-E Punks";
string constant private __symbol = "DUNKZ";
// mint price
uint256 constant public memberPrice = .01 ether;
uint256 constant public publicPrice = .02 ether;
// allocations
uint256 constant public maxPublic = 5;
// artist wallets
address constant private _ataraAddress = 0xceC15d87719feDEcA61F7d11D2d205a4C0628517;
address constant private _papaverAddress = 0xa7B8a64dF4e47013C8A168945c9eb4F83BADC9C1;
address constant private _noStandingAddress = 0x6A4f0ECbBb10dFdFD010F8E7B1C7e4a358692981;
// verification address
address constant private _signer = 0xE5cb964B8b21491929414b969078CcF7FeCD4725;
// signature tags
uint256 constant private _tagClaim = 8118;
uint256 constant private _tagMember = 4224;
//-------------------------------------------------------------------------
// fields
//-------------------------------------------------------------------------
// token limits
uint256 public immutable publicMax;
uint256 public immutable artistMax;
uint256 public immutable teamMax;
// opensea proxy
address private immutable _proxyRegistryAddress;
// contract state
State.Data private _state;
// roles
mapping (address => bool) private _burnerAddress;
mapping (address => bool) private _artistAddress;
mapping (address => bool) private _teamAddress;
// track mint count per address
mapping (address => Minted) private _minted;
// token info
string private _baseUri;
string private _tokenIpfsHash;
// contract info
string private _contractUri;
//-------------------------------------------------------------------------
// modifiers
//-------------------------------------------------------------------------
modifier validTokenId(uint256 tokenId) {
}
//-------------------------------------------------------------------------
modifier approvedOrOwner(address operator, uint256 tokenId) {
}
//-------------------------------------------------------------------------
modifier isArtist() {
}
//-------------------------------------------------------------------------
modifier isTeam() {
}
//-------------------------------------------------------------------------
modifier isBurner() {
}
//-------------------------------------------------------------------------
modifier notLocked() {
}
//-------------------------------------------------------------------------
// ctor
//-------------------------------------------------------------------------
constructor(
string memory baseUri_,
string memory ipfsHash_,
string memory contractUri_,
uint256[3] memory tokenMax_,
address royaltyAddress,
address proxyRegistryAddress)
ERC721Sequential(__name, __symbol)
{
}
//-------------------------------------------------------------------------
// accessors
//-------------------------------------------------------------------------
/**
* Check if public minting is live.
*/
function publicLive()
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* Check if contract is locked.
*/
function isLocked()
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* Get total team has minted.
*/
function teamMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Get total artist has minted.
*/
function artistMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Get total public has minted.
*/
function publicMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Authorize artist wallet.
*/
function registerArtistAddress(address artist)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove artist wallet.
*/
function revokeArtistAddress(address artist)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Authorize team wallet.
*/
function registerTeamAddress(address team)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove team wallet.
*/
function revokeTeamAddress(address team)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Authorize burnder contract.
*/
function registerBurnerAddress(address burner)
public
onlyOwner
{
require(<FILL_ME>)
_burnerAddress[burner] = true;
}
//-------------------------------------------------------------------------
/**
* Remove burner contract.
*/
function revokeBurnerAddress(address burner)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setTokenIpfsHash(string memory hash)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setBaseTokenURI(string memory baseUri)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setTokenURI(string memory baseUri, string memory hash)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
// admin
//-------------------------------------------------------------------------
/**
* Enable/disable public/member minting.
*/
function toggleLock()
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Enable/disable public minting.
*/
function togglePublicMint()
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Get minted info for a user.
*/
function getMintInfo(address wallet)
public view
returns(Minted memory)
{
}
//-------------------------------------------------------------------------
// security
//-------------------------------------------------------------------------
/**
* Generate hash from input data.
*/
function generateHash(uint256 tag, uint256 allocation, uint256 count)
private view
returns(bytes32)
{
}
//-------------------------------------------------------------------------
/**
* Validate message was signed by signer.
*/
function validateSigner(bytes32 msgHash, bytes memory signature, address signer)
private pure
returns(bool)
{
}
//-------------------------------------------------------------------------
// minting
//-------------------------------------------------------------------------
/**
* Allow anyone to mint tokens for the right price.
*/
function mint(uint256 count)
public payable
notLocked
{
}
//-------------------------------------------------------------------------
/**
* Mint count tokens using securely signed message.
*/
function secureMint(bytes calldata signature, uint256 allocation, uint256 count)
external payable
notLocked
{
}
//-------------------------------------------------------------------------
/**
* Allow cryptopunk holders to claim.
*/
function claim(bytes calldata signature, uint256 allocation, uint256 count)
external
notLocked
{
}
//-------------------------------------------------------------------------
/**
* @dev Mints a token to an address.
* @param wallet address of the future owner of the token
*/
function teamMintTo(address wallet, uint256 count)
public
isTeam
{
}
//-------------------------------------------------------------------------
/**
* @dev Mints a token to an address.
* @param wallet address of the future owner of the token
*/
function artistMintTo(address wallet, uint256 count)
public
isArtist
{
}
//-------------------------------------------------------------------------
/**
* @dev Burns `tokenId`. See {ERC721-_burn}.
*/
function burn(uint256 tokenId)
public
isBurner
{
}
//-------------------------------------------------------------------------
// money
//-------------------------------------------------------------------------
/**
* Pull money out of this contract.
*/
function withdraw(address to, uint256 amount)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
// approval
//-------------------------------------------------------------------------
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts
* to enable gas-less listings.
*/
function isApprovedForAll(address owner, address operator)
override(ERC721Sequential, IERC721)
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* This is used instead of msg.sender as transactions won't be sent by
* the original token owner, but by OpenSea.
*/
function _msgSender()
override
internal view
returns (address sender)
{
}
//-------------------------------------------------------------------------
// ERC2981 - NFT Royalty Standard
//-------------------------------------------------------------------------
/**
* @dev Update royalty receiver + basis points.
*/
function setRoyaltyInfo(address receiver, uint96 feeBasisPoints)
external
onlyOwner
{
}
//-------------------------------------------------------------------------
// IERC165 - Introspection
//-------------------------------------------------------------------------
function supportsInterface(bytes4 interfaceId)
public view
override(ERC721SeqEnumerable, ERC2981)
returns (bool)
{
}
//-------------------------------------------------------------------------
// ERC721Metadata
//-------------------------------------------------------------------------
function baseTokenURI()
public view
returns (string memory)
{
}
//-------------------------------------------------------------------------
/**
* @dev Returns uri of a token. Not guarenteed token exists.
*/
function tokenURI(uint256 tokenId)
override
public view
returns (string memory)
{
}
//-------------------------------------------------------------------------
// OpenSea contractUri
//-------------------------------------------------------------------------
function setContractURI(string memory contractUri)
external
onlyOwner
{
}
//-------------------------------------------------------------------------
function contractURI()
public view
returns (string memory)
{
}
}
| !_burnerAddress[burner],"address already registered" | 194,980 | !_burnerAddress[burner] |
"address not registered" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
//------------------------------------------------------------------------------
// Dall-E Punks - Dunkz
//------------------------------------------------------------------------------
// Author: papaver (@papaver42)
//------------------------------------------------------------------------------
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./common/meta-transactions/ContentMixin.sol";
import "./common/meta-transactions/NativeMetaTransaction.sol";
import "./geneticchain/ERC721Sequential.sol";
import "./geneticchain/ERC721SeqEnumerable.sol";
import "./libraries/State.sol";
//------------------------------------------------------------------------------
// helper contracts
//------------------------------------------------------------------------------
contract OwnableDelegateProxy {}
//------------------------------------------------------------------------------
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
//------------------------------------------------------------------------------
// Dunkz721
//------------------------------------------------------------------------------
/**
* @title Dunkz
*
* ERC721 contract with various features:
* - low-gas implmentation
* - off-chain whitelist verify (secure minting)
* - public/artist/team token allocation
* - protected controlled burns
* - opensea proxy setup
* - simple funds withdrawl
*/
contract Dunkz is
ContextMixin,
ERC721SeqEnumerable,
ERC2981,
NativeMetaTransaction,
Ownable
{
using ECDSA for bytes32;
using State for State.Data;
//-------------------------------------------------------------------------
// structs
//-------------------------------------------------------------------------
struct Minted {
uint128 claim;
uint128 mint;
}
//-------------------------------------------------------------------------
// constants
//-------------------------------------------------------------------------
// erc721 metadata
string constant private __name = "Dall-E Punks";
string constant private __symbol = "DUNKZ";
// mint price
uint256 constant public memberPrice = .01 ether;
uint256 constant public publicPrice = .02 ether;
// allocations
uint256 constant public maxPublic = 5;
// artist wallets
address constant private _ataraAddress = 0xceC15d87719feDEcA61F7d11D2d205a4C0628517;
address constant private _papaverAddress = 0xa7B8a64dF4e47013C8A168945c9eb4F83BADC9C1;
address constant private _noStandingAddress = 0x6A4f0ECbBb10dFdFD010F8E7B1C7e4a358692981;
// verification address
address constant private _signer = 0xE5cb964B8b21491929414b969078CcF7FeCD4725;
// signature tags
uint256 constant private _tagClaim = 8118;
uint256 constant private _tagMember = 4224;
//-------------------------------------------------------------------------
// fields
//-------------------------------------------------------------------------
// token limits
uint256 public immutable publicMax;
uint256 public immutable artistMax;
uint256 public immutable teamMax;
// opensea proxy
address private immutable _proxyRegistryAddress;
// contract state
State.Data private _state;
// roles
mapping (address => bool) private _burnerAddress;
mapping (address => bool) private _artistAddress;
mapping (address => bool) private _teamAddress;
// track mint count per address
mapping (address => Minted) private _minted;
// token info
string private _baseUri;
string private _tokenIpfsHash;
// contract info
string private _contractUri;
//-------------------------------------------------------------------------
// modifiers
//-------------------------------------------------------------------------
modifier validTokenId(uint256 tokenId) {
}
//-------------------------------------------------------------------------
modifier approvedOrOwner(address operator, uint256 tokenId) {
}
//-------------------------------------------------------------------------
modifier isArtist() {
}
//-------------------------------------------------------------------------
modifier isTeam() {
}
//-------------------------------------------------------------------------
modifier isBurner() {
}
//-------------------------------------------------------------------------
modifier notLocked() {
}
//-------------------------------------------------------------------------
// ctor
//-------------------------------------------------------------------------
constructor(
string memory baseUri_,
string memory ipfsHash_,
string memory contractUri_,
uint256[3] memory tokenMax_,
address royaltyAddress,
address proxyRegistryAddress)
ERC721Sequential(__name, __symbol)
{
}
//-------------------------------------------------------------------------
// accessors
//-------------------------------------------------------------------------
/**
* Check if public minting is live.
*/
function publicLive()
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* Check if contract is locked.
*/
function isLocked()
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* Get total team has minted.
*/
function teamMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Get total artist has minted.
*/
function artistMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Get total public has minted.
*/
function publicMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Authorize artist wallet.
*/
function registerArtistAddress(address artist)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove artist wallet.
*/
function revokeArtistAddress(address artist)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Authorize team wallet.
*/
function registerTeamAddress(address team)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove team wallet.
*/
function revokeTeamAddress(address team)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Authorize burnder contract.
*/
function registerBurnerAddress(address burner)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove burner contract.
*/
function revokeBurnerAddress(address burner)
public
onlyOwner
{
require(<FILL_ME>)
delete _burnerAddress[burner];
}
//-------------------------------------------------------------------------
function setTokenIpfsHash(string memory hash)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setBaseTokenURI(string memory baseUri)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setTokenURI(string memory baseUri, string memory hash)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
// admin
//-------------------------------------------------------------------------
/**
* Enable/disable public/member minting.
*/
function toggleLock()
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Enable/disable public minting.
*/
function togglePublicMint()
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Get minted info for a user.
*/
function getMintInfo(address wallet)
public view
returns(Minted memory)
{
}
//-------------------------------------------------------------------------
// security
//-------------------------------------------------------------------------
/**
* Generate hash from input data.
*/
function generateHash(uint256 tag, uint256 allocation, uint256 count)
private view
returns(bytes32)
{
}
//-------------------------------------------------------------------------
/**
* Validate message was signed by signer.
*/
function validateSigner(bytes32 msgHash, bytes memory signature, address signer)
private pure
returns(bool)
{
}
//-------------------------------------------------------------------------
// minting
//-------------------------------------------------------------------------
/**
* Allow anyone to mint tokens for the right price.
*/
function mint(uint256 count)
public payable
notLocked
{
}
//-------------------------------------------------------------------------
/**
* Mint count tokens using securely signed message.
*/
function secureMint(bytes calldata signature, uint256 allocation, uint256 count)
external payable
notLocked
{
}
//-------------------------------------------------------------------------
/**
* Allow cryptopunk holders to claim.
*/
function claim(bytes calldata signature, uint256 allocation, uint256 count)
external
notLocked
{
}
//-------------------------------------------------------------------------
/**
* @dev Mints a token to an address.
* @param wallet address of the future owner of the token
*/
function teamMintTo(address wallet, uint256 count)
public
isTeam
{
}
//-------------------------------------------------------------------------
/**
* @dev Mints a token to an address.
* @param wallet address of the future owner of the token
*/
function artistMintTo(address wallet, uint256 count)
public
isArtist
{
}
//-------------------------------------------------------------------------
/**
* @dev Burns `tokenId`. See {ERC721-_burn}.
*/
function burn(uint256 tokenId)
public
isBurner
{
}
//-------------------------------------------------------------------------
// money
//-------------------------------------------------------------------------
/**
* Pull money out of this contract.
*/
function withdraw(address to, uint256 amount)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
// approval
//-------------------------------------------------------------------------
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts
* to enable gas-less listings.
*/
function isApprovedForAll(address owner, address operator)
override(ERC721Sequential, IERC721)
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* This is used instead of msg.sender as transactions won't be sent by
* the original token owner, but by OpenSea.
*/
function _msgSender()
override
internal view
returns (address sender)
{
}
//-------------------------------------------------------------------------
// ERC2981 - NFT Royalty Standard
//-------------------------------------------------------------------------
/**
* @dev Update royalty receiver + basis points.
*/
function setRoyaltyInfo(address receiver, uint96 feeBasisPoints)
external
onlyOwner
{
}
//-------------------------------------------------------------------------
// IERC165 - Introspection
//-------------------------------------------------------------------------
function supportsInterface(bytes4 interfaceId)
public view
override(ERC721SeqEnumerable, ERC2981)
returns (bool)
{
}
//-------------------------------------------------------------------------
// ERC721Metadata
//-------------------------------------------------------------------------
function baseTokenURI()
public view
returns (string memory)
{
}
//-------------------------------------------------------------------------
/**
* @dev Returns uri of a token. Not guarenteed token exists.
*/
function tokenURI(uint256 tokenId)
override
public view
returns (string memory)
{
}
//-------------------------------------------------------------------------
// OpenSea contractUri
//-------------------------------------------------------------------------
function setContractURI(string memory contractUri)
external
onlyOwner
{
}
//-------------------------------------------------------------------------
function contractURI()
public view
returns (string memory)
{
}
}
| _burnerAddress[burner],"address not registered" | 194,980 | _burnerAddress[burner] |
"insufficient funds" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
//------------------------------------------------------------------------------
// Dall-E Punks - Dunkz
//------------------------------------------------------------------------------
// Author: papaver (@papaver42)
//------------------------------------------------------------------------------
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./common/meta-transactions/ContentMixin.sol";
import "./common/meta-transactions/NativeMetaTransaction.sol";
import "./geneticchain/ERC721Sequential.sol";
import "./geneticchain/ERC721SeqEnumerable.sol";
import "./libraries/State.sol";
//------------------------------------------------------------------------------
// helper contracts
//------------------------------------------------------------------------------
contract OwnableDelegateProxy {}
//------------------------------------------------------------------------------
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
//------------------------------------------------------------------------------
// Dunkz721
//------------------------------------------------------------------------------
/**
* @title Dunkz
*
* ERC721 contract with various features:
* - low-gas implmentation
* - off-chain whitelist verify (secure minting)
* - public/artist/team token allocation
* - protected controlled burns
* - opensea proxy setup
* - simple funds withdrawl
*/
contract Dunkz is
ContextMixin,
ERC721SeqEnumerable,
ERC2981,
NativeMetaTransaction,
Ownable
{
using ECDSA for bytes32;
using State for State.Data;
//-------------------------------------------------------------------------
// structs
//-------------------------------------------------------------------------
struct Minted {
uint128 claim;
uint128 mint;
}
//-------------------------------------------------------------------------
// constants
//-------------------------------------------------------------------------
// erc721 metadata
string constant private __name = "Dall-E Punks";
string constant private __symbol = "DUNKZ";
// mint price
uint256 constant public memberPrice = .01 ether;
uint256 constant public publicPrice = .02 ether;
// allocations
uint256 constant public maxPublic = 5;
// artist wallets
address constant private _ataraAddress = 0xceC15d87719feDEcA61F7d11D2d205a4C0628517;
address constant private _papaverAddress = 0xa7B8a64dF4e47013C8A168945c9eb4F83BADC9C1;
address constant private _noStandingAddress = 0x6A4f0ECbBb10dFdFD010F8E7B1C7e4a358692981;
// verification address
address constant private _signer = 0xE5cb964B8b21491929414b969078CcF7FeCD4725;
// signature tags
uint256 constant private _tagClaim = 8118;
uint256 constant private _tagMember = 4224;
//-------------------------------------------------------------------------
// fields
//-------------------------------------------------------------------------
// token limits
uint256 public immutable publicMax;
uint256 public immutable artistMax;
uint256 public immutable teamMax;
// opensea proxy
address private immutable _proxyRegistryAddress;
// contract state
State.Data private _state;
// roles
mapping (address => bool) private _burnerAddress;
mapping (address => bool) private _artistAddress;
mapping (address => bool) private _teamAddress;
// track mint count per address
mapping (address => Minted) private _minted;
// token info
string private _baseUri;
string private _tokenIpfsHash;
// contract info
string private _contractUri;
//-------------------------------------------------------------------------
// modifiers
//-------------------------------------------------------------------------
modifier validTokenId(uint256 tokenId) {
}
//-------------------------------------------------------------------------
modifier approvedOrOwner(address operator, uint256 tokenId) {
}
//-------------------------------------------------------------------------
modifier isArtist() {
}
//-------------------------------------------------------------------------
modifier isTeam() {
}
//-------------------------------------------------------------------------
modifier isBurner() {
}
//-------------------------------------------------------------------------
modifier notLocked() {
}
//-------------------------------------------------------------------------
// ctor
//-------------------------------------------------------------------------
constructor(
string memory baseUri_,
string memory ipfsHash_,
string memory contractUri_,
uint256[3] memory tokenMax_,
address royaltyAddress,
address proxyRegistryAddress)
ERC721Sequential(__name, __symbol)
{
}
//-------------------------------------------------------------------------
// accessors
//-------------------------------------------------------------------------
/**
* Check if public minting is live.
*/
function publicLive()
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* Check if contract is locked.
*/
function isLocked()
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* Get total team has minted.
*/
function teamMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Get total artist has minted.
*/
function artistMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Get total public has minted.
*/
function publicMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Authorize artist wallet.
*/
function registerArtistAddress(address artist)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove artist wallet.
*/
function revokeArtistAddress(address artist)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Authorize team wallet.
*/
function registerTeamAddress(address team)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove team wallet.
*/
function revokeTeamAddress(address team)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Authorize burnder contract.
*/
function registerBurnerAddress(address burner)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove burner contract.
*/
function revokeBurnerAddress(address burner)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setTokenIpfsHash(string memory hash)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setBaseTokenURI(string memory baseUri)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setTokenURI(string memory baseUri, string memory hash)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
// admin
//-------------------------------------------------------------------------
/**
* Enable/disable public/member minting.
*/
function toggleLock()
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Enable/disable public minting.
*/
function togglePublicMint()
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Get minted info for a user.
*/
function getMintInfo(address wallet)
public view
returns(Minted memory)
{
}
//-------------------------------------------------------------------------
// security
//-------------------------------------------------------------------------
/**
* Generate hash from input data.
*/
function generateHash(uint256 tag, uint256 allocation, uint256 count)
private view
returns(bytes32)
{
}
//-------------------------------------------------------------------------
/**
* Validate message was signed by signer.
*/
function validateSigner(bytes32 msgHash, bytes memory signature, address signer)
private pure
returns(bool)
{
}
//-------------------------------------------------------------------------
// minting
//-------------------------------------------------------------------------
/**
* Allow anyone to mint tokens for the right price.
*/
function mint(uint256 count)
public payable
notLocked
{
require(_state._live == 1, "public mint not live");
require(<FILL_ME>)
require(_state._public + count <= publicMax, "exceed public supply");
require(_minted[msg.sender].mint + count <= maxPublic, "exceed allocation");
_state.addPublic(count);
unchecked {
_minted[msg.sender].mint += uint128(count);
}
for (uint256 i = 0; i < count; ++i) {
_safeMint(msg.sender);
}
}
//-------------------------------------------------------------------------
/**
* Mint count tokens using securely signed message.
*/
function secureMint(bytes calldata signature, uint256 allocation, uint256 count)
external payable
notLocked
{
}
//-------------------------------------------------------------------------
/**
* Allow cryptopunk holders to claim.
*/
function claim(bytes calldata signature, uint256 allocation, uint256 count)
external
notLocked
{
}
//-------------------------------------------------------------------------
/**
* @dev Mints a token to an address.
* @param wallet address of the future owner of the token
*/
function teamMintTo(address wallet, uint256 count)
public
isTeam
{
}
//-------------------------------------------------------------------------
/**
* @dev Mints a token to an address.
* @param wallet address of the future owner of the token
*/
function artistMintTo(address wallet, uint256 count)
public
isArtist
{
}
//-------------------------------------------------------------------------
/**
* @dev Burns `tokenId`. See {ERC721-_burn}.
*/
function burn(uint256 tokenId)
public
isBurner
{
}
//-------------------------------------------------------------------------
// money
//-------------------------------------------------------------------------
/**
* Pull money out of this contract.
*/
function withdraw(address to, uint256 amount)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
// approval
//-------------------------------------------------------------------------
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts
* to enable gas-less listings.
*/
function isApprovedForAll(address owner, address operator)
override(ERC721Sequential, IERC721)
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* This is used instead of msg.sender as transactions won't be sent by
* the original token owner, but by OpenSea.
*/
function _msgSender()
override
internal view
returns (address sender)
{
}
//-------------------------------------------------------------------------
// ERC2981 - NFT Royalty Standard
//-------------------------------------------------------------------------
/**
* @dev Update royalty receiver + basis points.
*/
function setRoyaltyInfo(address receiver, uint96 feeBasisPoints)
external
onlyOwner
{
}
//-------------------------------------------------------------------------
// IERC165 - Introspection
//-------------------------------------------------------------------------
function supportsInterface(bytes4 interfaceId)
public view
override(ERC721SeqEnumerable, ERC2981)
returns (bool)
{
}
//-------------------------------------------------------------------------
// ERC721Metadata
//-------------------------------------------------------------------------
function baseTokenURI()
public view
returns (string memory)
{
}
//-------------------------------------------------------------------------
/**
* @dev Returns uri of a token. Not guarenteed token exists.
*/
function tokenURI(uint256 tokenId)
override
public view
returns (string memory)
{
}
//-------------------------------------------------------------------------
// OpenSea contractUri
//-------------------------------------------------------------------------
function setContractURI(string memory contractUri)
external
onlyOwner
{
}
//-------------------------------------------------------------------------
function contractURI()
public view
returns (string memory)
{
}
}
| publicPrice*count==msg.value,"insufficient funds" | 194,980 | publicPrice*count==msg.value |
"exceed public supply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
//------------------------------------------------------------------------------
// Dall-E Punks - Dunkz
//------------------------------------------------------------------------------
// Author: papaver (@papaver42)
//------------------------------------------------------------------------------
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./common/meta-transactions/ContentMixin.sol";
import "./common/meta-transactions/NativeMetaTransaction.sol";
import "./geneticchain/ERC721Sequential.sol";
import "./geneticchain/ERC721SeqEnumerable.sol";
import "./libraries/State.sol";
//------------------------------------------------------------------------------
// helper contracts
//------------------------------------------------------------------------------
contract OwnableDelegateProxy {}
//------------------------------------------------------------------------------
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
//------------------------------------------------------------------------------
// Dunkz721
//------------------------------------------------------------------------------
/**
* @title Dunkz
*
* ERC721 contract with various features:
* - low-gas implmentation
* - off-chain whitelist verify (secure minting)
* - public/artist/team token allocation
* - protected controlled burns
* - opensea proxy setup
* - simple funds withdrawl
*/
contract Dunkz is
ContextMixin,
ERC721SeqEnumerable,
ERC2981,
NativeMetaTransaction,
Ownable
{
using ECDSA for bytes32;
using State for State.Data;
//-------------------------------------------------------------------------
// structs
//-------------------------------------------------------------------------
struct Minted {
uint128 claim;
uint128 mint;
}
//-------------------------------------------------------------------------
// constants
//-------------------------------------------------------------------------
// erc721 metadata
string constant private __name = "Dall-E Punks";
string constant private __symbol = "DUNKZ";
// mint price
uint256 constant public memberPrice = .01 ether;
uint256 constant public publicPrice = .02 ether;
// allocations
uint256 constant public maxPublic = 5;
// artist wallets
address constant private _ataraAddress = 0xceC15d87719feDEcA61F7d11D2d205a4C0628517;
address constant private _papaverAddress = 0xa7B8a64dF4e47013C8A168945c9eb4F83BADC9C1;
address constant private _noStandingAddress = 0x6A4f0ECbBb10dFdFD010F8E7B1C7e4a358692981;
// verification address
address constant private _signer = 0xE5cb964B8b21491929414b969078CcF7FeCD4725;
// signature tags
uint256 constant private _tagClaim = 8118;
uint256 constant private _tagMember = 4224;
//-------------------------------------------------------------------------
// fields
//-------------------------------------------------------------------------
// token limits
uint256 public immutable publicMax;
uint256 public immutable artistMax;
uint256 public immutable teamMax;
// opensea proxy
address private immutable _proxyRegistryAddress;
// contract state
State.Data private _state;
// roles
mapping (address => bool) private _burnerAddress;
mapping (address => bool) private _artistAddress;
mapping (address => bool) private _teamAddress;
// track mint count per address
mapping (address => Minted) private _minted;
// token info
string private _baseUri;
string private _tokenIpfsHash;
// contract info
string private _contractUri;
//-------------------------------------------------------------------------
// modifiers
//-------------------------------------------------------------------------
modifier validTokenId(uint256 tokenId) {
}
//-------------------------------------------------------------------------
modifier approvedOrOwner(address operator, uint256 tokenId) {
}
//-------------------------------------------------------------------------
modifier isArtist() {
}
//-------------------------------------------------------------------------
modifier isTeam() {
}
//-------------------------------------------------------------------------
modifier isBurner() {
}
//-------------------------------------------------------------------------
modifier notLocked() {
}
//-------------------------------------------------------------------------
// ctor
//-------------------------------------------------------------------------
constructor(
string memory baseUri_,
string memory ipfsHash_,
string memory contractUri_,
uint256[3] memory tokenMax_,
address royaltyAddress,
address proxyRegistryAddress)
ERC721Sequential(__name, __symbol)
{
}
//-------------------------------------------------------------------------
// accessors
//-------------------------------------------------------------------------
/**
* Check if public minting is live.
*/
function publicLive()
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* Check if contract is locked.
*/
function isLocked()
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* Get total team has minted.
*/
function teamMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Get total artist has minted.
*/
function artistMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Get total public has minted.
*/
function publicMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Authorize artist wallet.
*/
function registerArtistAddress(address artist)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove artist wallet.
*/
function revokeArtistAddress(address artist)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Authorize team wallet.
*/
function registerTeamAddress(address team)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove team wallet.
*/
function revokeTeamAddress(address team)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Authorize burnder contract.
*/
function registerBurnerAddress(address burner)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove burner contract.
*/
function revokeBurnerAddress(address burner)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setTokenIpfsHash(string memory hash)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setBaseTokenURI(string memory baseUri)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setTokenURI(string memory baseUri, string memory hash)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
// admin
//-------------------------------------------------------------------------
/**
* Enable/disable public/member minting.
*/
function toggleLock()
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Enable/disable public minting.
*/
function togglePublicMint()
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Get minted info for a user.
*/
function getMintInfo(address wallet)
public view
returns(Minted memory)
{
}
//-------------------------------------------------------------------------
// security
//-------------------------------------------------------------------------
/**
* Generate hash from input data.
*/
function generateHash(uint256 tag, uint256 allocation, uint256 count)
private view
returns(bytes32)
{
}
//-------------------------------------------------------------------------
/**
* Validate message was signed by signer.
*/
function validateSigner(bytes32 msgHash, bytes memory signature, address signer)
private pure
returns(bool)
{
}
//-------------------------------------------------------------------------
// minting
//-------------------------------------------------------------------------
/**
* Allow anyone to mint tokens for the right price.
*/
function mint(uint256 count)
public payable
notLocked
{
require(_state._live == 1, "public mint not live");
require(publicPrice * count == msg.value, "insufficient funds");
require(<FILL_ME>)
require(_minted[msg.sender].mint + count <= maxPublic, "exceed allocation");
_state.addPublic(count);
unchecked {
_minted[msg.sender].mint += uint128(count);
}
for (uint256 i = 0; i < count; ++i) {
_safeMint(msg.sender);
}
}
//-------------------------------------------------------------------------
/**
* Mint count tokens using securely signed message.
*/
function secureMint(bytes calldata signature, uint256 allocation, uint256 count)
external payable
notLocked
{
}
//-------------------------------------------------------------------------
/**
* Allow cryptopunk holders to claim.
*/
function claim(bytes calldata signature, uint256 allocation, uint256 count)
external
notLocked
{
}
//-------------------------------------------------------------------------
/**
* @dev Mints a token to an address.
* @param wallet address of the future owner of the token
*/
function teamMintTo(address wallet, uint256 count)
public
isTeam
{
}
//-------------------------------------------------------------------------
/**
* @dev Mints a token to an address.
* @param wallet address of the future owner of the token
*/
function artistMintTo(address wallet, uint256 count)
public
isArtist
{
}
//-------------------------------------------------------------------------
/**
* @dev Burns `tokenId`. See {ERC721-_burn}.
*/
function burn(uint256 tokenId)
public
isBurner
{
}
//-------------------------------------------------------------------------
// money
//-------------------------------------------------------------------------
/**
* Pull money out of this contract.
*/
function withdraw(address to, uint256 amount)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
// approval
//-------------------------------------------------------------------------
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts
* to enable gas-less listings.
*/
function isApprovedForAll(address owner, address operator)
override(ERC721Sequential, IERC721)
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* This is used instead of msg.sender as transactions won't be sent by
* the original token owner, but by OpenSea.
*/
function _msgSender()
override
internal view
returns (address sender)
{
}
//-------------------------------------------------------------------------
// ERC2981 - NFT Royalty Standard
//-------------------------------------------------------------------------
/**
* @dev Update royalty receiver + basis points.
*/
function setRoyaltyInfo(address receiver, uint96 feeBasisPoints)
external
onlyOwner
{
}
//-------------------------------------------------------------------------
// IERC165 - Introspection
//-------------------------------------------------------------------------
function supportsInterface(bytes4 interfaceId)
public view
override(ERC721SeqEnumerable, ERC2981)
returns (bool)
{
}
//-------------------------------------------------------------------------
// ERC721Metadata
//-------------------------------------------------------------------------
function baseTokenURI()
public view
returns (string memory)
{
}
//-------------------------------------------------------------------------
/**
* @dev Returns uri of a token. Not guarenteed token exists.
*/
function tokenURI(uint256 tokenId)
override
public view
returns (string memory)
{
}
//-------------------------------------------------------------------------
// OpenSea contractUri
//-------------------------------------------------------------------------
function setContractURI(string memory contractUri)
external
onlyOwner
{
}
//-------------------------------------------------------------------------
function contractURI()
public view
returns (string memory)
{
}
}
| _state._public+count<=publicMax,"exceed public supply" | 194,980 | _state._public+count<=publicMax |
"exceed allocation" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
//------------------------------------------------------------------------------
// Dall-E Punks - Dunkz
//------------------------------------------------------------------------------
// Author: papaver (@papaver42)
//------------------------------------------------------------------------------
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./common/meta-transactions/ContentMixin.sol";
import "./common/meta-transactions/NativeMetaTransaction.sol";
import "./geneticchain/ERC721Sequential.sol";
import "./geneticchain/ERC721SeqEnumerable.sol";
import "./libraries/State.sol";
//------------------------------------------------------------------------------
// helper contracts
//------------------------------------------------------------------------------
contract OwnableDelegateProxy {}
//------------------------------------------------------------------------------
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
//------------------------------------------------------------------------------
// Dunkz721
//------------------------------------------------------------------------------
/**
* @title Dunkz
*
* ERC721 contract with various features:
* - low-gas implmentation
* - off-chain whitelist verify (secure minting)
* - public/artist/team token allocation
* - protected controlled burns
* - opensea proxy setup
* - simple funds withdrawl
*/
contract Dunkz is
ContextMixin,
ERC721SeqEnumerable,
ERC2981,
NativeMetaTransaction,
Ownable
{
using ECDSA for bytes32;
using State for State.Data;
//-------------------------------------------------------------------------
// structs
//-------------------------------------------------------------------------
struct Minted {
uint128 claim;
uint128 mint;
}
//-------------------------------------------------------------------------
// constants
//-------------------------------------------------------------------------
// erc721 metadata
string constant private __name = "Dall-E Punks";
string constant private __symbol = "DUNKZ";
// mint price
uint256 constant public memberPrice = .01 ether;
uint256 constant public publicPrice = .02 ether;
// allocations
uint256 constant public maxPublic = 5;
// artist wallets
address constant private _ataraAddress = 0xceC15d87719feDEcA61F7d11D2d205a4C0628517;
address constant private _papaverAddress = 0xa7B8a64dF4e47013C8A168945c9eb4F83BADC9C1;
address constant private _noStandingAddress = 0x6A4f0ECbBb10dFdFD010F8E7B1C7e4a358692981;
// verification address
address constant private _signer = 0xE5cb964B8b21491929414b969078CcF7FeCD4725;
// signature tags
uint256 constant private _tagClaim = 8118;
uint256 constant private _tagMember = 4224;
//-------------------------------------------------------------------------
// fields
//-------------------------------------------------------------------------
// token limits
uint256 public immutable publicMax;
uint256 public immutable artistMax;
uint256 public immutable teamMax;
// opensea proxy
address private immutable _proxyRegistryAddress;
// contract state
State.Data private _state;
// roles
mapping (address => bool) private _burnerAddress;
mapping (address => bool) private _artistAddress;
mapping (address => bool) private _teamAddress;
// track mint count per address
mapping (address => Minted) private _minted;
// token info
string private _baseUri;
string private _tokenIpfsHash;
// contract info
string private _contractUri;
//-------------------------------------------------------------------------
// modifiers
//-------------------------------------------------------------------------
modifier validTokenId(uint256 tokenId) {
}
//-------------------------------------------------------------------------
modifier approvedOrOwner(address operator, uint256 tokenId) {
}
//-------------------------------------------------------------------------
modifier isArtist() {
}
//-------------------------------------------------------------------------
modifier isTeam() {
}
//-------------------------------------------------------------------------
modifier isBurner() {
}
//-------------------------------------------------------------------------
modifier notLocked() {
}
//-------------------------------------------------------------------------
// ctor
//-------------------------------------------------------------------------
constructor(
string memory baseUri_,
string memory ipfsHash_,
string memory contractUri_,
uint256[3] memory tokenMax_,
address royaltyAddress,
address proxyRegistryAddress)
ERC721Sequential(__name, __symbol)
{
}
//-------------------------------------------------------------------------
// accessors
//-------------------------------------------------------------------------
/**
* Check if public minting is live.
*/
function publicLive()
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* Check if contract is locked.
*/
function isLocked()
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* Get total team has minted.
*/
function teamMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Get total artist has minted.
*/
function artistMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Get total public has minted.
*/
function publicMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Authorize artist wallet.
*/
function registerArtistAddress(address artist)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove artist wallet.
*/
function revokeArtistAddress(address artist)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Authorize team wallet.
*/
function registerTeamAddress(address team)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove team wallet.
*/
function revokeTeamAddress(address team)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Authorize burnder contract.
*/
function registerBurnerAddress(address burner)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove burner contract.
*/
function revokeBurnerAddress(address burner)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setTokenIpfsHash(string memory hash)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setBaseTokenURI(string memory baseUri)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setTokenURI(string memory baseUri, string memory hash)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
// admin
//-------------------------------------------------------------------------
/**
* Enable/disable public/member minting.
*/
function toggleLock()
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Enable/disable public minting.
*/
function togglePublicMint()
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Get minted info for a user.
*/
function getMintInfo(address wallet)
public view
returns(Minted memory)
{
}
//-------------------------------------------------------------------------
// security
//-------------------------------------------------------------------------
/**
* Generate hash from input data.
*/
function generateHash(uint256 tag, uint256 allocation, uint256 count)
private view
returns(bytes32)
{
}
//-------------------------------------------------------------------------
/**
* Validate message was signed by signer.
*/
function validateSigner(bytes32 msgHash, bytes memory signature, address signer)
private pure
returns(bool)
{
}
//-------------------------------------------------------------------------
// minting
//-------------------------------------------------------------------------
/**
* Allow anyone to mint tokens for the right price.
*/
function mint(uint256 count)
public payable
notLocked
{
require(_state._live == 1, "public mint not live");
require(publicPrice * count == msg.value, "insufficient funds");
require(_state._public + count <= publicMax, "exceed public supply");
require(<FILL_ME>)
_state.addPublic(count);
unchecked {
_minted[msg.sender].mint += uint128(count);
}
for (uint256 i = 0; i < count; ++i) {
_safeMint(msg.sender);
}
}
//-------------------------------------------------------------------------
/**
* Mint count tokens using securely signed message.
*/
function secureMint(bytes calldata signature, uint256 allocation, uint256 count)
external payable
notLocked
{
}
//-------------------------------------------------------------------------
/**
* Allow cryptopunk holders to claim.
*/
function claim(bytes calldata signature, uint256 allocation, uint256 count)
external
notLocked
{
}
//-------------------------------------------------------------------------
/**
* @dev Mints a token to an address.
* @param wallet address of the future owner of the token
*/
function teamMintTo(address wallet, uint256 count)
public
isTeam
{
}
//-------------------------------------------------------------------------
/**
* @dev Mints a token to an address.
* @param wallet address of the future owner of the token
*/
function artistMintTo(address wallet, uint256 count)
public
isArtist
{
}
//-------------------------------------------------------------------------
/**
* @dev Burns `tokenId`. See {ERC721-_burn}.
*/
function burn(uint256 tokenId)
public
isBurner
{
}
//-------------------------------------------------------------------------
// money
//-------------------------------------------------------------------------
/**
* Pull money out of this contract.
*/
function withdraw(address to, uint256 amount)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
// approval
//-------------------------------------------------------------------------
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts
* to enable gas-less listings.
*/
function isApprovedForAll(address owner, address operator)
override(ERC721Sequential, IERC721)
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* This is used instead of msg.sender as transactions won't be sent by
* the original token owner, but by OpenSea.
*/
function _msgSender()
override
internal view
returns (address sender)
{
}
//-------------------------------------------------------------------------
// ERC2981 - NFT Royalty Standard
//-------------------------------------------------------------------------
/**
* @dev Update royalty receiver + basis points.
*/
function setRoyaltyInfo(address receiver, uint96 feeBasisPoints)
external
onlyOwner
{
}
//-------------------------------------------------------------------------
// IERC165 - Introspection
//-------------------------------------------------------------------------
function supportsInterface(bytes4 interfaceId)
public view
override(ERC721SeqEnumerable, ERC2981)
returns (bool)
{
}
//-------------------------------------------------------------------------
// ERC721Metadata
//-------------------------------------------------------------------------
function baseTokenURI()
public view
returns (string memory)
{
}
//-------------------------------------------------------------------------
/**
* @dev Returns uri of a token. Not guarenteed token exists.
*/
function tokenURI(uint256 tokenId)
override
public view
returns (string memory)
{
}
//-------------------------------------------------------------------------
// OpenSea contractUri
//-------------------------------------------------------------------------
function setContractURI(string memory contractUri)
external
onlyOwner
{
}
//-------------------------------------------------------------------------
function contractURI()
public view
returns (string memory)
{
}
}
| _minted[msg.sender].mint+count<=maxPublic,"exceed allocation" | 194,980 | _minted[msg.sender].mint+count<=maxPublic |
"insufficient funds" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
//------------------------------------------------------------------------------
// Dall-E Punks - Dunkz
//------------------------------------------------------------------------------
// Author: papaver (@papaver42)
//------------------------------------------------------------------------------
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./common/meta-transactions/ContentMixin.sol";
import "./common/meta-transactions/NativeMetaTransaction.sol";
import "./geneticchain/ERC721Sequential.sol";
import "./geneticchain/ERC721SeqEnumerable.sol";
import "./libraries/State.sol";
//------------------------------------------------------------------------------
// helper contracts
//------------------------------------------------------------------------------
contract OwnableDelegateProxy {}
//------------------------------------------------------------------------------
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
//------------------------------------------------------------------------------
// Dunkz721
//------------------------------------------------------------------------------
/**
* @title Dunkz
*
* ERC721 contract with various features:
* - low-gas implmentation
* - off-chain whitelist verify (secure minting)
* - public/artist/team token allocation
* - protected controlled burns
* - opensea proxy setup
* - simple funds withdrawl
*/
contract Dunkz is
ContextMixin,
ERC721SeqEnumerable,
ERC2981,
NativeMetaTransaction,
Ownable
{
using ECDSA for bytes32;
using State for State.Data;
//-------------------------------------------------------------------------
// structs
//-------------------------------------------------------------------------
struct Minted {
uint128 claim;
uint128 mint;
}
//-------------------------------------------------------------------------
// constants
//-------------------------------------------------------------------------
// erc721 metadata
string constant private __name = "Dall-E Punks";
string constant private __symbol = "DUNKZ";
// mint price
uint256 constant public memberPrice = .01 ether;
uint256 constant public publicPrice = .02 ether;
// allocations
uint256 constant public maxPublic = 5;
// artist wallets
address constant private _ataraAddress = 0xceC15d87719feDEcA61F7d11D2d205a4C0628517;
address constant private _papaverAddress = 0xa7B8a64dF4e47013C8A168945c9eb4F83BADC9C1;
address constant private _noStandingAddress = 0x6A4f0ECbBb10dFdFD010F8E7B1C7e4a358692981;
// verification address
address constant private _signer = 0xE5cb964B8b21491929414b969078CcF7FeCD4725;
// signature tags
uint256 constant private _tagClaim = 8118;
uint256 constant private _tagMember = 4224;
//-------------------------------------------------------------------------
// fields
//-------------------------------------------------------------------------
// token limits
uint256 public immutable publicMax;
uint256 public immutable artistMax;
uint256 public immutable teamMax;
// opensea proxy
address private immutable _proxyRegistryAddress;
// contract state
State.Data private _state;
// roles
mapping (address => bool) private _burnerAddress;
mapping (address => bool) private _artistAddress;
mapping (address => bool) private _teamAddress;
// track mint count per address
mapping (address => Minted) private _minted;
// token info
string private _baseUri;
string private _tokenIpfsHash;
// contract info
string private _contractUri;
//-------------------------------------------------------------------------
// modifiers
//-------------------------------------------------------------------------
modifier validTokenId(uint256 tokenId) {
}
//-------------------------------------------------------------------------
modifier approvedOrOwner(address operator, uint256 tokenId) {
}
//-------------------------------------------------------------------------
modifier isArtist() {
}
//-------------------------------------------------------------------------
modifier isTeam() {
}
//-------------------------------------------------------------------------
modifier isBurner() {
}
//-------------------------------------------------------------------------
modifier notLocked() {
}
//-------------------------------------------------------------------------
// ctor
//-------------------------------------------------------------------------
constructor(
string memory baseUri_,
string memory ipfsHash_,
string memory contractUri_,
uint256[3] memory tokenMax_,
address royaltyAddress,
address proxyRegistryAddress)
ERC721Sequential(__name, __symbol)
{
}
//-------------------------------------------------------------------------
// accessors
//-------------------------------------------------------------------------
/**
* Check if public minting is live.
*/
function publicLive()
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* Check if contract is locked.
*/
function isLocked()
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* Get total team has minted.
*/
function teamMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Get total artist has minted.
*/
function artistMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Get total public has minted.
*/
function publicMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Authorize artist wallet.
*/
function registerArtistAddress(address artist)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove artist wallet.
*/
function revokeArtistAddress(address artist)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Authorize team wallet.
*/
function registerTeamAddress(address team)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove team wallet.
*/
function revokeTeamAddress(address team)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Authorize burnder contract.
*/
function registerBurnerAddress(address burner)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove burner contract.
*/
function revokeBurnerAddress(address burner)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setTokenIpfsHash(string memory hash)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setBaseTokenURI(string memory baseUri)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setTokenURI(string memory baseUri, string memory hash)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
// admin
//-------------------------------------------------------------------------
/**
* Enable/disable public/member minting.
*/
function toggleLock()
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Enable/disable public minting.
*/
function togglePublicMint()
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Get minted info for a user.
*/
function getMintInfo(address wallet)
public view
returns(Minted memory)
{
}
//-------------------------------------------------------------------------
// security
//-------------------------------------------------------------------------
/**
* Generate hash from input data.
*/
function generateHash(uint256 tag, uint256 allocation, uint256 count)
private view
returns(bytes32)
{
}
//-------------------------------------------------------------------------
/**
* Validate message was signed by signer.
*/
function validateSigner(bytes32 msgHash, bytes memory signature, address signer)
private pure
returns(bool)
{
}
//-------------------------------------------------------------------------
// minting
//-------------------------------------------------------------------------
/**
* Allow anyone to mint tokens for the right price.
*/
function mint(uint256 count)
public payable
notLocked
{
}
//-------------------------------------------------------------------------
/**
* Mint count tokens using securely signed message.
*/
function secureMint(bytes calldata signature, uint256 allocation, uint256 count)
external payable
notLocked
{
bytes32 msgHash = generateHash(_tagMember, allocation, count);
require(<FILL_ME>)
require(_state._public + count <= publicMax, "exceed public supply");
require(_minted[msg.sender].mint + count <= allocation, "exceed allocation");
require(validateSigner(msgHash, signature, _signer), "invalid signer");
_state.addPublic(count);
unchecked {
_minted[msg.sender].mint += uint128(count);
}
for (uint256 i = 0; i < count; ++i) {
_safeMint(msg.sender);
}
}
//-------------------------------------------------------------------------
/**
* Allow cryptopunk holders to claim.
*/
function claim(bytes calldata signature, uint256 allocation, uint256 count)
external
notLocked
{
}
//-------------------------------------------------------------------------
/**
* @dev Mints a token to an address.
* @param wallet address of the future owner of the token
*/
function teamMintTo(address wallet, uint256 count)
public
isTeam
{
}
//-------------------------------------------------------------------------
/**
* @dev Mints a token to an address.
* @param wallet address of the future owner of the token
*/
function artistMintTo(address wallet, uint256 count)
public
isArtist
{
}
//-------------------------------------------------------------------------
/**
* @dev Burns `tokenId`. See {ERC721-_burn}.
*/
function burn(uint256 tokenId)
public
isBurner
{
}
//-------------------------------------------------------------------------
// money
//-------------------------------------------------------------------------
/**
* Pull money out of this contract.
*/
function withdraw(address to, uint256 amount)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
// approval
//-------------------------------------------------------------------------
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts
* to enable gas-less listings.
*/
function isApprovedForAll(address owner, address operator)
override(ERC721Sequential, IERC721)
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* This is used instead of msg.sender as transactions won't be sent by
* the original token owner, but by OpenSea.
*/
function _msgSender()
override
internal view
returns (address sender)
{
}
//-------------------------------------------------------------------------
// ERC2981 - NFT Royalty Standard
//-------------------------------------------------------------------------
/**
* @dev Update royalty receiver + basis points.
*/
function setRoyaltyInfo(address receiver, uint96 feeBasisPoints)
external
onlyOwner
{
}
//-------------------------------------------------------------------------
// IERC165 - Introspection
//-------------------------------------------------------------------------
function supportsInterface(bytes4 interfaceId)
public view
override(ERC721SeqEnumerable, ERC2981)
returns (bool)
{
}
//-------------------------------------------------------------------------
// ERC721Metadata
//-------------------------------------------------------------------------
function baseTokenURI()
public view
returns (string memory)
{
}
//-------------------------------------------------------------------------
/**
* @dev Returns uri of a token. Not guarenteed token exists.
*/
function tokenURI(uint256 tokenId)
override
public view
returns (string memory)
{
}
//-------------------------------------------------------------------------
// OpenSea contractUri
//-------------------------------------------------------------------------
function setContractURI(string memory contractUri)
external
onlyOwner
{
}
//-------------------------------------------------------------------------
function contractURI()
public view
returns (string memory)
{
}
}
| memberPrice*count==msg.value,"insufficient funds" | 194,980 | memberPrice*count==msg.value |
"exceed allocation" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
//------------------------------------------------------------------------------
// Dall-E Punks - Dunkz
//------------------------------------------------------------------------------
// Author: papaver (@papaver42)
//------------------------------------------------------------------------------
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./common/meta-transactions/ContentMixin.sol";
import "./common/meta-transactions/NativeMetaTransaction.sol";
import "./geneticchain/ERC721Sequential.sol";
import "./geneticchain/ERC721SeqEnumerable.sol";
import "./libraries/State.sol";
//------------------------------------------------------------------------------
// helper contracts
//------------------------------------------------------------------------------
contract OwnableDelegateProxy {}
//------------------------------------------------------------------------------
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
//------------------------------------------------------------------------------
// Dunkz721
//------------------------------------------------------------------------------
/**
* @title Dunkz
*
* ERC721 contract with various features:
* - low-gas implmentation
* - off-chain whitelist verify (secure minting)
* - public/artist/team token allocation
* - protected controlled burns
* - opensea proxy setup
* - simple funds withdrawl
*/
contract Dunkz is
ContextMixin,
ERC721SeqEnumerable,
ERC2981,
NativeMetaTransaction,
Ownable
{
using ECDSA for bytes32;
using State for State.Data;
//-------------------------------------------------------------------------
// structs
//-------------------------------------------------------------------------
struct Minted {
uint128 claim;
uint128 mint;
}
//-------------------------------------------------------------------------
// constants
//-------------------------------------------------------------------------
// erc721 metadata
string constant private __name = "Dall-E Punks";
string constant private __symbol = "DUNKZ";
// mint price
uint256 constant public memberPrice = .01 ether;
uint256 constant public publicPrice = .02 ether;
// allocations
uint256 constant public maxPublic = 5;
// artist wallets
address constant private _ataraAddress = 0xceC15d87719feDEcA61F7d11D2d205a4C0628517;
address constant private _papaverAddress = 0xa7B8a64dF4e47013C8A168945c9eb4F83BADC9C1;
address constant private _noStandingAddress = 0x6A4f0ECbBb10dFdFD010F8E7B1C7e4a358692981;
// verification address
address constant private _signer = 0xE5cb964B8b21491929414b969078CcF7FeCD4725;
// signature tags
uint256 constant private _tagClaim = 8118;
uint256 constant private _tagMember = 4224;
//-------------------------------------------------------------------------
// fields
//-------------------------------------------------------------------------
// token limits
uint256 public immutable publicMax;
uint256 public immutable artistMax;
uint256 public immutable teamMax;
// opensea proxy
address private immutable _proxyRegistryAddress;
// contract state
State.Data private _state;
// roles
mapping (address => bool) private _burnerAddress;
mapping (address => bool) private _artistAddress;
mapping (address => bool) private _teamAddress;
// track mint count per address
mapping (address => Minted) private _minted;
// token info
string private _baseUri;
string private _tokenIpfsHash;
// contract info
string private _contractUri;
//-------------------------------------------------------------------------
// modifiers
//-------------------------------------------------------------------------
modifier validTokenId(uint256 tokenId) {
}
//-------------------------------------------------------------------------
modifier approvedOrOwner(address operator, uint256 tokenId) {
}
//-------------------------------------------------------------------------
modifier isArtist() {
}
//-------------------------------------------------------------------------
modifier isTeam() {
}
//-------------------------------------------------------------------------
modifier isBurner() {
}
//-------------------------------------------------------------------------
modifier notLocked() {
}
//-------------------------------------------------------------------------
// ctor
//-------------------------------------------------------------------------
constructor(
string memory baseUri_,
string memory ipfsHash_,
string memory contractUri_,
uint256[3] memory tokenMax_,
address royaltyAddress,
address proxyRegistryAddress)
ERC721Sequential(__name, __symbol)
{
}
//-------------------------------------------------------------------------
// accessors
//-------------------------------------------------------------------------
/**
* Check if public minting is live.
*/
function publicLive()
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* Check if contract is locked.
*/
function isLocked()
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* Get total team has minted.
*/
function teamMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Get total artist has minted.
*/
function artistMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Get total public has minted.
*/
function publicMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Authorize artist wallet.
*/
function registerArtistAddress(address artist)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove artist wallet.
*/
function revokeArtistAddress(address artist)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Authorize team wallet.
*/
function registerTeamAddress(address team)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove team wallet.
*/
function revokeTeamAddress(address team)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Authorize burnder contract.
*/
function registerBurnerAddress(address burner)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove burner contract.
*/
function revokeBurnerAddress(address burner)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setTokenIpfsHash(string memory hash)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setBaseTokenURI(string memory baseUri)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setTokenURI(string memory baseUri, string memory hash)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
// admin
//-------------------------------------------------------------------------
/**
* Enable/disable public/member minting.
*/
function toggleLock()
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Enable/disable public minting.
*/
function togglePublicMint()
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Get minted info for a user.
*/
function getMintInfo(address wallet)
public view
returns(Minted memory)
{
}
//-------------------------------------------------------------------------
// security
//-------------------------------------------------------------------------
/**
* Generate hash from input data.
*/
function generateHash(uint256 tag, uint256 allocation, uint256 count)
private view
returns(bytes32)
{
}
//-------------------------------------------------------------------------
/**
* Validate message was signed by signer.
*/
function validateSigner(bytes32 msgHash, bytes memory signature, address signer)
private pure
returns(bool)
{
}
//-------------------------------------------------------------------------
// minting
//-------------------------------------------------------------------------
/**
* Allow anyone to mint tokens for the right price.
*/
function mint(uint256 count)
public payable
notLocked
{
}
//-------------------------------------------------------------------------
/**
* Mint count tokens using securely signed message.
*/
function secureMint(bytes calldata signature, uint256 allocation, uint256 count)
external payable
notLocked
{
bytes32 msgHash = generateHash(_tagMember, allocation, count);
require(memberPrice * count == msg.value, "insufficient funds");
require(_state._public + count <= publicMax, "exceed public supply");
require(<FILL_ME>)
require(validateSigner(msgHash, signature, _signer), "invalid signer");
_state.addPublic(count);
unchecked {
_minted[msg.sender].mint += uint128(count);
}
for (uint256 i = 0; i < count; ++i) {
_safeMint(msg.sender);
}
}
//-------------------------------------------------------------------------
/**
* Allow cryptopunk holders to claim.
*/
function claim(bytes calldata signature, uint256 allocation, uint256 count)
external
notLocked
{
}
//-------------------------------------------------------------------------
/**
* @dev Mints a token to an address.
* @param wallet address of the future owner of the token
*/
function teamMintTo(address wallet, uint256 count)
public
isTeam
{
}
//-------------------------------------------------------------------------
/**
* @dev Mints a token to an address.
* @param wallet address of the future owner of the token
*/
function artistMintTo(address wallet, uint256 count)
public
isArtist
{
}
//-------------------------------------------------------------------------
/**
* @dev Burns `tokenId`. See {ERC721-_burn}.
*/
function burn(uint256 tokenId)
public
isBurner
{
}
//-------------------------------------------------------------------------
// money
//-------------------------------------------------------------------------
/**
* Pull money out of this contract.
*/
function withdraw(address to, uint256 amount)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
// approval
//-------------------------------------------------------------------------
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts
* to enable gas-less listings.
*/
function isApprovedForAll(address owner, address operator)
override(ERC721Sequential, IERC721)
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* This is used instead of msg.sender as transactions won't be sent by
* the original token owner, but by OpenSea.
*/
function _msgSender()
override
internal view
returns (address sender)
{
}
//-------------------------------------------------------------------------
// ERC2981 - NFT Royalty Standard
//-------------------------------------------------------------------------
/**
* @dev Update royalty receiver + basis points.
*/
function setRoyaltyInfo(address receiver, uint96 feeBasisPoints)
external
onlyOwner
{
}
//-------------------------------------------------------------------------
// IERC165 - Introspection
//-------------------------------------------------------------------------
function supportsInterface(bytes4 interfaceId)
public view
override(ERC721SeqEnumerable, ERC2981)
returns (bool)
{
}
//-------------------------------------------------------------------------
// ERC721Metadata
//-------------------------------------------------------------------------
function baseTokenURI()
public view
returns (string memory)
{
}
//-------------------------------------------------------------------------
/**
* @dev Returns uri of a token. Not guarenteed token exists.
*/
function tokenURI(uint256 tokenId)
override
public view
returns (string memory)
{
}
//-------------------------------------------------------------------------
// OpenSea contractUri
//-------------------------------------------------------------------------
function setContractURI(string memory contractUri)
external
onlyOwner
{
}
//-------------------------------------------------------------------------
function contractURI()
public view
returns (string memory)
{
}
}
| _minted[msg.sender].mint+count<=allocation,"exceed allocation" | 194,980 | _minted[msg.sender].mint+count<=allocation |
"exceed allocation" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
//------------------------------------------------------------------------------
// Dall-E Punks - Dunkz
//------------------------------------------------------------------------------
// Author: papaver (@papaver42)
//------------------------------------------------------------------------------
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./common/meta-transactions/ContentMixin.sol";
import "./common/meta-transactions/NativeMetaTransaction.sol";
import "./geneticchain/ERC721Sequential.sol";
import "./geneticchain/ERC721SeqEnumerable.sol";
import "./libraries/State.sol";
//------------------------------------------------------------------------------
// helper contracts
//------------------------------------------------------------------------------
contract OwnableDelegateProxy {}
//------------------------------------------------------------------------------
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
//------------------------------------------------------------------------------
// Dunkz721
//------------------------------------------------------------------------------
/**
* @title Dunkz
*
* ERC721 contract with various features:
* - low-gas implmentation
* - off-chain whitelist verify (secure minting)
* - public/artist/team token allocation
* - protected controlled burns
* - opensea proxy setup
* - simple funds withdrawl
*/
contract Dunkz is
ContextMixin,
ERC721SeqEnumerable,
ERC2981,
NativeMetaTransaction,
Ownable
{
using ECDSA for bytes32;
using State for State.Data;
//-------------------------------------------------------------------------
// structs
//-------------------------------------------------------------------------
struct Minted {
uint128 claim;
uint128 mint;
}
//-------------------------------------------------------------------------
// constants
//-------------------------------------------------------------------------
// erc721 metadata
string constant private __name = "Dall-E Punks";
string constant private __symbol = "DUNKZ";
// mint price
uint256 constant public memberPrice = .01 ether;
uint256 constant public publicPrice = .02 ether;
// allocations
uint256 constant public maxPublic = 5;
// artist wallets
address constant private _ataraAddress = 0xceC15d87719feDEcA61F7d11D2d205a4C0628517;
address constant private _papaverAddress = 0xa7B8a64dF4e47013C8A168945c9eb4F83BADC9C1;
address constant private _noStandingAddress = 0x6A4f0ECbBb10dFdFD010F8E7B1C7e4a358692981;
// verification address
address constant private _signer = 0xE5cb964B8b21491929414b969078CcF7FeCD4725;
// signature tags
uint256 constant private _tagClaim = 8118;
uint256 constant private _tagMember = 4224;
//-------------------------------------------------------------------------
// fields
//-------------------------------------------------------------------------
// token limits
uint256 public immutable publicMax;
uint256 public immutable artistMax;
uint256 public immutable teamMax;
// opensea proxy
address private immutable _proxyRegistryAddress;
// contract state
State.Data private _state;
// roles
mapping (address => bool) private _burnerAddress;
mapping (address => bool) private _artistAddress;
mapping (address => bool) private _teamAddress;
// track mint count per address
mapping (address => Minted) private _minted;
// token info
string private _baseUri;
string private _tokenIpfsHash;
// contract info
string private _contractUri;
//-------------------------------------------------------------------------
// modifiers
//-------------------------------------------------------------------------
modifier validTokenId(uint256 tokenId) {
}
//-------------------------------------------------------------------------
modifier approvedOrOwner(address operator, uint256 tokenId) {
}
//-------------------------------------------------------------------------
modifier isArtist() {
}
//-------------------------------------------------------------------------
modifier isTeam() {
}
//-------------------------------------------------------------------------
modifier isBurner() {
}
//-------------------------------------------------------------------------
modifier notLocked() {
}
//-------------------------------------------------------------------------
// ctor
//-------------------------------------------------------------------------
constructor(
string memory baseUri_,
string memory ipfsHash_,
string memory contractUri_,
uint256[3] memory tokenMax_,
address royaltyAddress,
address proxyRegistryAddress)
ERC721Sequential(__name, __symbol)
{
}
//-------------------------------------------------------------------------
// accessors
//-------------------------------------------------------------------------
/**
* Check if public minting is live.
*/
function publicLive()
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* Check if contract is locked.
*/
function isLocked()
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* Get total team has minted.
*/
function teamMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Get total artist has minted.
*/
function artistMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Get total public has minted.
*/
function publicMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Authorize artist wallet.
*/
function registerArtistAddress(address artist)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove artist wallet.
*/
function revokeArtistAddress(address artist)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Authorize team wallet.
*/
function registerTeamAddress(address team)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove team wallet.
*/
function revokeTeamAddress(address team)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Authorize burnder contract.
*/
function registerBurnerAddress(address burner)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove burner contract.
*/
function revokeBurnerAddress(address burner)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setTokenIpfsHash(string memory hash)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setBaseTokenURI(string memory baseUri)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setTokenURI(string memory baseUri, string memory hash)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
// admin
//-------------------------------------------------------------------------
/**
* Enable/disable public/member minting.
*/
function toggleLock()
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Enable/disable public minting.
*/
function togglePublicMint()
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Get minted info for a user.
*/
function getMintInfo(address wallet)
public view
returns(Minted memory)
{
}
//-------------------------------------------------------------------------
// security
//-------------------------------------------------------------------------
/**
* Generate hash from input data.
*/
function generateHash(uint256 tag, uint256 allocation, uint256 count)
private view
returns(bytes32)
{
}
//-------------------------------------------------------------------------
/**
* Validate message was signed by signer.
*/
function validateSigner(bytes32 msgHash, bytes memory signature, address signer)
private pure
returns(bool)
{
}
//-------------------------------------------------------------------------
// minting
//-------------------------------------------------------------------------
/**
* Allow anyone to mint tokens for the right price.
*/
function mint(uint256 count)
public payable
notLocked
{
}
//-------------------------------------------------------------------------
/**
* Mint count tokens using securely signed message.
*/
function secureMint(bytes calldata signature, uint256 allocation, uint256 count)
external payable
notLocked
{
}
//-------------------------------------------------------------------------
/**
* Allow cryptopunk holders to claim.
*/
function claim(bytes calldata signature, uint256 allocation, uint256 count)
external
notLocked
{
bytes32 msgHash = generateHash(_tagClaim, allocation, count);
require(_state._public + count <= publicMax, "exceed public supply");
require(<FILL_ME>)
require(validateSigner(msgHash, signature, _signer), "invalid signer");
_state.addPublic(count);
unchecked {
_minted[msg.sender].claim += uint128(count);
}
for (uint256 i = 0; i < count; ++i) {
_safeMint(msg.sender);
}
}
//-------------------------------------------------------------------------
/**
* @dev Mints a token to an address.
* @param wallet address of the future owner of the token
*/
function teamMintTo(address wallet, uint256 count)
public
isTeam
{
}
//-------------------------------------------------------------------------
/**
* @dev Mints a token to an address.
* @param wallet address of the future owner of the token
*/
function artistMintTo(address wallet, uint256 count)
public
isArtist
{
}
//-------------------------------------------------------------------------
/**
* @dev Burns `tokenId`. See {ERC721-_burn}.
*/
function burn(uint256 tokenId)
public
isBurner
{
}
//-------------------------------------------------------------------------
// money
//-------------------------------------------------------------------------
/**
* Pull money out of this contract.
*/
function withdraw(address to, uint256 amount)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
// approval
//-------------------------------------------------------------------------
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts
* to enable gas-less listings.
*/
function isApprovedForAll(address owner, address operator)
override(ERC721Sequential, IERC721)
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* This is used instead of msg.sender as transactions won't be sent by
* the original token owner, but by OpenSea.
*/
function _msgSender()
override
internal view
returns (address sender)
{
}
//-------------------------------------------------------------------------
// ERC2981 - NFT Royalty Standard
//-------------------------------------------------------------------------
/**
* @dev Update royalty receiver + basis points.
*/
function setRoyaltyInfo(address receiver, uint96 feeBasisPoints)
external
onlyOwner
{
}
//-------------------------------------------------------------------------
// IERC165 - Introspection
//-------------------------------------------------------------------------
function supportsInterface(bytes4 interfaceId)
public view
override(ERC721SeqEnumerable, ERC2981)
returns (bool)
{
}
//-------------------------------------------------------------------------
// ERC721Metadata
//-------------------------------------------------------------------------
function baseTokenURI()
public view
returns (string memory)
{
}
//-------------------------------------------------------------------------
/**
* @dev Returns uri of a token. Not guarenteed token exists.
*/
function tokenURI(uint256 tokenId)
override
public view
returns (string memory)
{
}
//-------------------------------------------------------------------------
// OpenSea contractUri
//-------------------------------------------------------------------------
function setContractURI(string memory contractUri)
external
onlyOwner
{
}
//-------------------------------------------------------------------------
function contractURI()
public view
returns (string memory)
{
}
}
| _minted[msg.sender].claim+count<=allocation,"exceed allocation" | 194,980 | _minted[msg.sender].claim+count<=allocation |
"exceed team supply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
//------------------------------------------------------------------------------
// Dall-E Punks - Dunkz
//------------------------------------------------------------------------------
// Author: papaver (@papaver42)
//------------------------------------------------------------------------------
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./common/meta-transactions/ContentMixin.sol";
import "./common/meta-transactions/NativeMetaTransaction.sol";
import "./geneticchain/ERC721Sequential.sol";
import "./geneticchain/ERC721SeqEnumerable.sol";
import "./libraries/State.sol";
//------------------------------------------------------------------------------
// helper contracts
//------------------------------------------------------------------------------
contract OwnableDelegateProxy {}
//------------------------------------------------------------------------------
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
//------------------------------------------------------------------------------
// Dunkz721
//------------------------------------------------------------------------------
/**
* @title Dunkz
*
* ERC721 contract with various features:
* - low-gas implmentation
* - off-chain whitelist verify (secure minting)
* - public/artist/team token allocation
* - protected controlled burns
* - opensea proxy setup
* - simple funds withdrawl
*/
contract Dunkz is
ContextMixin,
ERC721SeqEnumerable,
ERC2981,
NativeMetaTransaction,
Ownable
{
using ECDSA for bytes32;
using State for State.Data;
//-------------------------------------------------------------------------
// structs
//-------------------------------------------------------------------------
struct Minted {
uint128 claim;
uint128 mint;
}
//-------------------------------------------------------------------------
// constants
//-------------------------------------------------------------------------
// erc721 metadata
string constant private __name = "Dall-E Punks";
string constant private __symbol = "DUNKZ";
// mint price
uint256 constant public memberPrice = .01 ether;
uint256 constant public publicPrice = .02 ether;
// allocations
uint256 constant public maxPublic = 5;
// artist wallets
address constant private _ataraAddress = 0xceC15d87719feDEcA61F7d11D2d205a4C0628517;
address constant private _papaverAddress = 0xa7B8a64dF4e47013C8A168945c9eb4F83BADC9C1;
address constant private _noStandingAddress = 0x6A4f0ECbBb10dFdFD010F8E7B1C7e4a358692981;
// verification address
address constant private _signer = 0xE5cb964B8b21491929414b969078CcF7FeCD4725;
// signature tags
uint256 constant private _tagClaim = 8118;
uint256 constant private _tagMember = 4224;
//-------------------------------------------------------------------------
// fields
//-------------------------------------------------------------------------
// token limits
uint256 public immutable publicMax;
uint256 public immutable artistMax;
uint256 public immutable teamMax;
// opensea proxy
address private immutable _proxyRegistryAddress;
// contract state
State.Data private _state;
// roles
mapping (address => bool) private _burnerAddress;
mapping (address => bool) private _artistAddress;
mapping (address => bool) private _teamAddress;
// track mint count per address
mapping (address => Minted) private _minted;
// token info
string private _baseUri;
string private _tokenIpfsHash;
// contract info
string private _contractUri;
//-------------------------------------------------------------------------
// modifiers
//-------------------------------------------------------------------------
modifier validTokenId(uint256 tokenId) {
}
//-------------------------------------------------------------------------
modifier approvedOrOwner(address operator, uint256 tokenId) {
}
//-------------------------------------------------------------------------
modifier isArtist() {
}
//-------------------------------------------------------------------------
modifier isTeam() {
}
//-------------------------------------------------------------------------
modifier isBurner() {
}
//-------------------------------------------------------------------------
modifier notLocked() {
}
//-------------------------------------------------------------------------
// ctor
//-------------------------------------------------------------------------
constructor(
string memory baseUri_,
string memory ipfsHash_,
string memory contractUri_,
uint256[3] memory tokenMax_,
address royaltyAddress,
address proxyRegistryAddress)
ERC721Sequential(__name, __symbol)
{
}
//-------------------------------------------------------------------------
// accessors
//-------------------------------------------------------------------------
/**
* Check if public minting is live.
*/
function publicLive()
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* Check if contract is locked.
*/
function isLocked()
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* Get total team has minted.
*/
function teamMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Get total artist has minted.
*/
function artistMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Get total public has minted.
*/
function publicMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Authorize artist wallet.
*/
function registerArtistAddress(address artist)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove artist wallet.
*/
function revokeArtistAddress(address artist)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Authorize team wallet.
*/
function registerTeamAddress(address team)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove team wallet.
*/
function revokeTeamAddress(address team)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Authorize burnder contract.
*/
function registerBurnerAddress(address burner)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove burner contract.
*/
function revokeBurnerAddress(address burner)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setTokenIpfsHash(string memory hash)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setBaseTokenURI(string memory baseUri)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setTokenURI(string memory baseUri, string memory hash)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
// admin
//-------------------------------------------------------------------------
/**
* Enable/disable public/member minting.
*/
function toggleLock()
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Enable/disable public minting.
*/
function togglePublicMint()
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Get minted info for a user.
*/
function getMintInfo(address wallet)
public view
returns(Minted memory)
{
}
//-------------------------------------------------------------------------
// security
//-------------------------------------------------------------------------
/**
* Generate hash from input data.
*/
function generateHash(uint256 tag, uint256 allocation, uint256 count)
private view
returns(bytes32)
{
}
//-------------------------------------------------------------------------
/**
* Validate message was signed by signer.
*/
function validateSigner(bytes32 msgHash, bytes memory signature, address signer)
private pure
returns(bool)
{
}
//-------------------------------------------------------------------------
// minting
//-------------------------------------------------------------------------
/**
* Allow anyone to mint tokens for the right price.
*/
function mint(uint256 count)
public payable
notLocked
{
}
//-------------------------------------------------------------------------
/**
* Mint count tokens using securely signed message.
*/
function secureMint(bytes calldata signature, uint256 allocation, uint256 count)
external payable
notLocked
{
}
//-------------------------------------------------------------------------
/**
* Allow cryptopunk holders to claim.
*/
function claim(bytes calldata signature, uint256 allocation, uint256 count)
external
notLocked
{
}
//-------------------------------------------------------------------------
/**
* @dev Mints a token to an address.
* @param wallet address of the future owner of the token
*/
function teamMintTo(address wallet, uint256 count)
public
isTeam
{
require(<FILL_ME>)
_state.addTeam(count);
for (uint256 i = 0; i < count; ++i) {
_safeMint(wallet);
}
}
//-------------------------------------------------------------------------
/**
* @dev Mints a token to an address.
* @param wallet address of the future owner of the token
*/
function artistMintTo(address wallet, uint256 count)
public
isArtist
{
}
//-------------------------------------------------------------------------
/**
* @dev Burns `tokenId`. See {ERC721-_burn}.
*/
function burn(uint256 tokenId)
public
isBurner
{
}
//-------------------------------------------------------------------------
// money
//-------------------------------------------------------------------------
/**
* Pull money out of this contract.
*/
function withdraw(address to, uint256 amount)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
// approval
//-------------------------------------------------------------------------
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts
* to enable gas-less listings.
*/
function isApprovedForAll(address owner, address operator)
override(ERC721Sequential, IERC721)
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* This is used instead of msg.sender as transactions won't be sent by
* the original token owner, but by OpenSea.
*/
function _msgSender()
override
internal view
returns (address sender)
{
}
//-------------------------------------------------------------------------
// ERC2981 - NFT Royalty Standard
//-------------------------------------------------------------------------
/**
* @dev Update royalty receiver + basis points.
*/
function setRoyaltyInfo(address receiver, uint96 feeBasisPoints)
external
onlyOwner
{
}
//-------------------------------------------------------------------------
// IERC165 - Introspection
//-------------------------------------------------------------------------
function supportsInterface(bytes4 interfaceId)
public view
override(ERC721SeqEnumerable, ERC2981)
returns (bool)
{
}
//-------------------------------------------------------------------------
// ERC721Metadata
//-------------------------------------------------------------------------
function baseTokenURI()
public view
returns (string memory)
{
}
//-------------------------------------------------------------------------
/**
* @dev Returns uri of a token. Not guarenteed token exists.
*/
function tokenURI(uint256 tokenId)
override
public view
returns (string memory)
{
}
//-------------------------------------------------------------------------
// OpenSea contractUri
//-------------------------------------------------------------------------
function setContractURI(string memory contractUri)
external
onlyOwner
{
}
//-------------------------------------------------------------------------
function contractURI()
public view
returns (string memory)
{
}
}
| _state._team+count<=teamMax,"exceed team supply" | 194,980 | _state._team+count<=teamMax |
"exceed artist supply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
//------------------------------------------------------------------------------
// Dall-E Punks - Dunkz
//------------------------------------------------------------------------------
// Author: papaver (@papaver42)
//------------------------------------------------------------------------------
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./common/meta-transactions/ContentMixin.sol";
import "./common/meta-transactions/NativeMetaTransaction.sol";
import "./geneticchain/ERC721Sequential.sol";
import "./geneticchain/ERC721SeqEnumerable.sol";
import "./libraries/State.sol";
//------------------------------------------------------------------------------
// helper contracts
//------------------------------------------------------------------------------
contract OwnableDelegateProxy {}
//------------------------------------------------------------------------------
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
//------------------------------------------------------------------------------
// Dunkz721
//------------------------------------------------------------------------------
/**
* @title Dunkz
*
* ERC721 contract with various features:
* - low-gas implmentation
* - off-chain whitelist verify (secure minting)
* - public/artist/team token allocation
* - protected controlled burns
* - opensea proxy setup
* - simple funds withdrawl
*/
contract Dunkz is
ContextMixin,
ERC721SeqEnumerable,
ERC2981,
NativeMetaTransaction,
Ownable
{
using ECDSA for bytes32;
using State for State.Data;
//-------------------------------------------------------------------------
// structs
//-------------------------------------------------------------------------
struct Minted {
uint128 claim;
uint128 mint;
}
//-------------------------------------------------------------------------
// constants
//-------------------------------------------------------------------------
// erc721 metadata
string constant private __name = "Dall-E Punks";
string constant private __symbol = "DUNKZ";
// mint price
uint256 constant public memberPrice = .01 ether;
uint256 constant public publicPrice = .02 ether;
// allocations
uint256 constant public maxPublic = 5;
// artist wallets
address constant private _ataraAddress = 0xceC15d87719feDEcA61F7d11D2d205a4C0628517;
address constant private _papaverAddress = 0xa7B8a64dF4e47013C8A168945c9eb4F83BADC9C1;
address constant private _noStandingAddress = 0x6A4f0ECbBb10dFdFD010F8E7B1C7e4a358692981;
// verification address
address constant private _signer = 0xE5cb964B8b21491929414b969078CcF7FeCD4725;
// signature tags
uint256 constant private _tagClaim = 8118;
uint256 constant private _tagMember = 4224;
//-------------------------------------------------------------------------
// fields
//-------------------------------------------------------------------------
// token limits
uint256 public immutable publicMax;
uint256 public immutable artistMax;
uint256 public immutable teamMax;
// opensea proxy
address private immutable _proxyRegistryAddress;
// contract state
State.Data private _state;
// roles
mapping (address => bool) private _burnerAddress;
mapping (address => bool) private _artistAddress;
mapping (address => bool) private _teamAddress;
// track mint count per address
mapping (address => Minted) private _minted;
// token info
string private _baseUri;
string private _tokenIpfsHash;
// contract info
string private _contractUri;
//-------------------------------------------------------------------------
// modifiers
//-------------------------------------------------------------------------
modifier validTokenId(uint256 tokenId) {
}
//-------------------------------------------------------------------------
modifier approvedOrOwner(address operator, uint256 tokenId) {
}
//-------------------------------------------------------------------------
modifier isArtist() {
}
//-------------------------------------------------------------------------
modifier isTeam() {
}
//-------------------------------------------------------------------------
modifier isBurner() {
}
//-------------------------------------------------------------------------
modifier notLocked() {
}
//-------------------------------------------------------------------------
// ctor
//-------------------------------------------------------------------------
constructor(
string memory baseUri_,
string memory ipfsHash_,
string memory contractUri_,
uint256[3] memory tokenMax_,
address royaltyAddress,
address proxyRegistryAddress)
ERC721Sequential(__name, __symbol)
{
}
//-------------------------------------------------------------------------
// accessors
//-------------------------------------------------------------------------
/**
* Check if public minting is live.
*/
function publicLive()
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* Check if contract is locked.
*/
function isLocked()
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* Get total team has minted.
*/
function teamMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Get total artist has minted.
*/
function artistMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Get total public has minted.
*/
function publicMinted()
public view
returns (uint256)
{
}
//-------------------------------------------------------------------------
/**
* Authorize artist wallet.
*/
function registerArtistAddress(address artist)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove artist wallet.
*/
function revokeArtistAddress(address artist)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Authorize team wallet.
*/
function registerTeamAddress(address team)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove team wallet.
*/
function revokeTeamAddress(address team)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Authorize burnder contract.
*/
function registerBurnerAddress(address burner)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Remove burner contract.
*/
function revokeBurnerAddress(address burner)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setTokenIpfsHash(string memory hash)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setBaseTokenURI(string memory baseUri)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
function setTokenURI(string memory baseUri, string memory hash)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
// admin
//-------------------------------------------------------------------------
/**
* Enable/disable public/member minting.
*/
function toggleLock()
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Enable/disable public minting.
*/
function togglePublicMint()
public
onlyOwner
{
}
//-------------------------------------------------------------------------
/**
* Get minted info for a user.
*/
function getMintInfo(address wallet)
public view
returns(Minted memory)
{
}
//-------------------------------------------------------------------------
// security
//-------------------------------------------------------------------------
/**
* Generate hash from input data.
*/
function generateHash(uint256 tag, uint256 allocation, uint256 count)
private view
returns(bytes32)
{
}
//-------------------------------------------------------------------------
/**
* Validate message was signed by signer.
*/
function validateSigner(bytes32 msgHash, bytes memory signature, address signer)
private pure
returns(bool)
{
}
//-------------------------------------------------------------------------
// minting
//-------------------------------------------------------------------------
/**
* Allow anyone to mint tokens for the right price.
*/
function mint(uint256 count)
public payable
notLocked
{
}
//-------------------------------------------------------------------------
/**
* Mint count tokens using securely signed message.
*/
function secureMint(bytes calldata signature, uint256 allocation, uint256 count)
external payable
notLocked
{
}
//-------------------------------------------------------------------------
/**
* Allow cryptopunk holders to claim.
*/
function claim(bytes calldata signature, uint256 allocation, uint256 count)
external
notLocked
{
}
//-------------------------------------------------------------------------
/**
* @dev Mints a token to an address.
* @param wallet address of the future owner of the token
*/
function teamMintTo(address wallet, uint256 count)
public
isTeam
{
}
//-------------------------------------------------------------------------
/**
* @dev Mints a token to an address.
* @param wallet address of the future owner of the token
*/
function artistMintTo(address wallet, uint256 count)
public
isArtist
{
require(<FILL_ME>)
_state.addArtist(count);
for (uint256 i = 0; i < count; ++i) {
_safeMint(wallet);
}
}
//-------------------------------------------------------------------------
/**
* @dev Burns `tokenId`. See {ERC721-_burn}.
*/
function burn(uint256 tokenId)
public
isBurner
{
}
//-------------------------------------------------------------------------
// money
//-------------------------------------------------------------------------
/**
* Pull money out of this contract.
*/
function withdraw(address to, uint256 amount)
public
onlyOwner
{
}
//-------------------------------------------------------------------------
// approval
//-------------------------------------------------------------------------
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts
* to enable gas-less listings.
*/
function isApprovedForAll(address owner, address operator)
override(ERC721Sequential, IERC721)
public view
returns (bool)
{
}
//-------------------------------------------------------------------------
/**
* This is used instead of msg.sender as transactions won't be sent by
* the original token owner, but by OpenSea.
*/
function _msgSender()
override
internal view
returns (address sender)
{
}
//-------------------------------------------------------------------------
// ERC2981 - NFT Royalty Standard
//-------------------------------------------------------------------------
/**
* @dev Update royalty receiver + basis points.
*/
function setRoyaltyInfo(address receiver, uint96 feeBasisPoints)
external
onlyOwner
{
}
//-------------------------------------------------------------------------
// IERC165 - Introspection
//-------------------------------------------------------------------------
function supportsInterface(bytes4 interfaceId)
public view
override(ERC721SeqEnumerable, ERC2981)
returns (bool)
{
}
//-------------------------------------------------------------------------
// ERC721Metadata
//-------------------------------------------------------------------------
function baseTokenURI()
public view
returns (string memory)
{
}
//-------------------------------------------------------------------------
/**
* @dev Returns uri of a token. Not guarenteed token exists.
*/
function tokenURI(uint256 tokenId)
override
public view
returns (string memory)
{
}
//-------------------------------------------------------------------------
// OpenSea contractUri
//-------------------------------------------------------------------------
function setContractURI(string memory contractUri)
external
onlyOwner
{
}
//-------------------------------------------------------------------------
function contractURI()
public view
returns (string memory)
{
}
}
| _state._artist+count<=artistMax,"exceed artist supply" | 194,980 | _state._artist+count<=artistMax |
"LLCGift: Only minter can call" | // ________ ___ ___ ___ ________ ________ ________ ________ _______
// |\ ____\|\ \ |\ \|\ \|\ __ \|\ __ \|\ __ \|\ __ \|\ ___ \
// \ \ \___|\ \ \ \ \ \\\ \ \ \|\ /\ \ \|\ \ \ \|\ \ \ \|\ \ \ __/|
// \ \ \ \ \ \ \ \ \\\ \ \ __ \ \ _ _\ \ __ \ \ _ _\ \ \_|/__
// \ \ \____\ \ \____\ \ \\\ \ \ \|\ \ \ \\ \\ \ \ \ \ \ \\ \\ \ \_|\ \
// \ \_______\ \_______\ \_______\ \_______\ \__\\ _\\ \__\ \__\ \__\\ _\\ \_______\
// \|_______|\|_______|\|_______|\|_______|\|__|\|__|\|__|\|__|\|__|\|__|\|_______|
//
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "./interfaces/ILLCGift.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract LLCGiftV2 is Ownable {
ILLCGift public immutable LLC_GIFT;
mapping(address => bool) public minters;
constructor(address _llcGift) {
}
function addMinters(address[] calldata _minters) external onlyOwner {
}
function removeMinters(address[] calldata _minters) external onlyOwner {
}
/// @dev Add claimer to the list of claimers
function addClaimer(address _claimer, uint256 _amount)
external
onlyMinters
{
}
function claimers(address _claimer) external view returns (uint256) {
}
function claimStatuses(address _claimer) external view returns (uint256) {
}
modifier onlyMinters() {
require(<FILL_ME>)
_;
}
}
| minters[_msgSender()],"LLCGift: Only minter can call" | 195,005 | minters[_msgSender()] |
"Only use stake or farm as contractType" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8;
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
contract StakingV9 is ReentrancyGuard {
using SafeMath for uint256;
address public owner;
address public stakevault;
address public projectContract;
IERC20 public immutable stakingToken;
IERC20 public immutable rewardsToken;
uint256 public stakingTokenDecimals;
uint256 public rewardTokenDecimals;
string public stakingTokenName;
string public rewardTokenName;
string public contractType;
uint256 public duration;
uint256 public finishAt;
uint256 public updatedAt;
//claim rules
uint256 public phase1;
uint256 public phase2;
uint256 public phase3;
uint256 public phase4;
uint256 public percentage1;
uint256 public percentage2;
uint256 public percentage3;
// Reward to be paid out per second
uint256 public rewardRate;
// Sum of (reward rate * dt * rewardTokenDecimals / total supply)
uint256 public rewardPerTokenStored;
// User address => rewardPerTokenStored
mapping(address => uint256) public userRewardPerTokenPaid;
// User address => rewards to be claimed since "updateReward"
mapping(address => uint256) public rewards;
// User Info
mapping(address => uint256) public balanceOf;
mapping(address => uint256) public claimedRewards;
mapping(address => uint256) public userStakeUpdateTime;
mapping(address => uint256) public lastClaimedTime;
mapping(address => uint256) public userLastTimeStaked;
// Total staked amount
uint256 public totalSupply;
// Total claimed amount
uint256 public totalClaimed;
// Total users
uint256 public totalUsers;
constructor(address _stakevault, address _stakingToken, address _rewardToken, uint256 _stakingTokenDecimals, uint256 _rewardTokenDecimals, string memory _stakingTokenName, string memory _rewardTokenName, string memory _contractType) {
require(<FILL_ME>)
owner = msg.sender;
stakevault = _stakevault;
projectContract = _rewardToken;
stakingToken = IERC20(_stakingToken);
rewardsToken = IERC20(_rewardToken);
stakingTokenDecimals = _stakingTokenDecimals;
rewardTokenDecimals = _rewardTokenDecimals;
stakingTokenName = _stakingTokenName;
rewardTokenName = _rewardTokenName;
contractType = _contractType;
}
// Modifier: Only allows the contract owner to execute the function
modifier onlyOwner() {
}
function updateRewardInternal(address _account) internal {
}
// Stakes the specified amount of tokens
function stake(uint256 _amount) external nonReentrant {
}
// Withdraws the specified amount of tokens
function withdraw(uint256 _amount) external nonReentrant {
}
// Claims the rewards for the sender
function getReward() external nonReentrant {
}
// Calculates the reward per token
function rewardPerToken() public view returns (uint256) {
}
// Calculates the total earnings of an account
function earned(address _account) public view returns (uint256) {
}
// Sets the duration of rewards distribution
function setRewardsDurationDays(uint256 _durationInDays) external onlyOwner {
}
// Notifies the contract about the amount of rewards to be distributed
function notifyRewardAmount(uint256 _amount) external onlyOwner {
}
// Returns the last applicable timestamp for the rewards
function lastTimeRewardApplicable() public view returns (uint256) {
}
function userInfo(address _account) public view returns (uint256, uint256, uint256, uint256, uint256) {
}
function getEthBalance(address _address) public view returns (uint256) {
}
function setPhaseAndPercentage (uint256 _phase1sec, uint256 _phase2sec, uint256 _phase3sec, uint256 _phase4sec,
uint256 _percentage1, uint256 _percentage2, uint256 _percentage3) external onlyOwner{
}
function checkPhase(address user) public view returns (uint256, uint256, uint256, uint256) {
}
}
// Interface for ERC20 token contract
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);
}
| keccak256(bytes(_contractType))==keccak256(bytes("stake"))||keccak256(bytes(_contractType))==keccak256(bytes("farm")),"Only use stake or farm as contractType" | 195,048 | keccak256(bytes(_contractType))==keccak256(bytes("stake"))||keccak256(bytes(_contractType))==keccak256(bytes("farm")) |
"reward amount > balance" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8;
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
contract StakingV9 is ReentrancyGuard {
using SafeMath for uint256;
address public owner;
address public stakevault;
address public projectContract;
IERC20 public immutable stakingToken;
IERC20 public immutable rewardsToken;
uint256 public stakingTokenDecimals;
uint256 public rewardTokenDecimals;
string public stakingTokenName;
string public rewardTokenName;
string public contractType;
uint256 public duration;
uint256 public finishAt;
uint256 public updatedAt;
//claim rules
uint256 public phase1;
uint256 public phase2;
uint256 public phase3;
uint256 public phase4;
uint256 public percentage1;
uint256 public percentage2;
uint256 public percentage3;
// Reward to be paid out per second
uint256 public rewardRate;
// Sum of (reward rate * dt * rewardTokenDecimals / total supply)
uint256 public rewardPerTokenStored;
// User address => rewardPerTokenStored
mapping(address => uint256) public userRewardPerTokenPaid;
// User address => rewards to be claimed since "updateReward"
mapping(address => uint256) public rewards;
// User Info
mapping(address => uint256) public balanceOf;
mapping(address => uint256) public claimedRewards;
mapping(address => uint256) public userStakeUpdateTime;
mapping(address => uint256) public lastClaimedTime;
mapping(address => uint256) public userLastTimeStaked;
// Total staked amount
uint256 public totalSupply;
// Total claimed amount
uint256 public totalClaimed;
// Total users
uint256 public totalUsers;
constructor(address _stakevault, address _stakingToken, address _rewardToken, uint256 _stakingTokenDecimals, uint256 _rewardTokenDecimals, string memory _stakingTokenName, string memory _rewardTokenName, string memory _contractType) {
}
// Modifier: Only allows the contract owner to execute the function
modifier onlyOwner() {
}
function updateRewardInternal(address _account) internal {
}
// Stakes the specified amount of tokens
function stake(uint256 _amount) external nonReentrant {
}
// Withdraws the specified amount of tokens
function withdraw(uint256 _amount) external nonReentrant {
}
// Claims the rewards for the sender
function getReward() external nonReentrant {
}
// Calculates the reward per token
function rewardPerToken() public view returns (uint256) {
}
// Calculates the total earnings of an account
function earned(address _account) public view returns (uint256) {
}
// Sets the duration of rewards distribution
function setRewardsDurationDays(uint256 _durationInDays) external onlyOwner {
}
// Notifies the contract about the amount of rewards to be distributed
function notifyRewardAmount(uint256 _amount) external onlyOwner {
updateRewardInternal(address(0));
// Reward duration not started or expired. Set the duration first.
if (block.timestamp > finishAt) {
rewardRate = _amount.div(duration);
} else {
uint256 remainingRewards = finishAt.sub(block.timestamp).mul(rewardRate);
rewardRate = _amount.add(remainingRewards).div(duration);
}
require(rewardRate > 0, "reward rate = 0");
require(<FILL_ME>)
finishAt = block.timestamp.add(duration);
updatedAt = block.timestamp;
updateRewardInternal(address(0));
}
// Returns the last applicable timestamp for the rewards
function lastTimeRewardApplicable() public view returns (uint256) {
}
function userInfo(address _account) public view returns (uint256, uint256, uint256, uint256, uint256) {
}
function getEthBalance(address _address) public view returns (uint256) {
}
function setPhaseAndPercentage (uint256 _phase1sec, uint256 _phase2sec, uint256 _phase3sec, uint256 _phase4sec,
uint256 _percentage1, uint256 _percentage2, uint256 _percentage3) external onlyOwner{
}
function checkPhase(address user) public view returns (uint256, uint256, uint256, uint256) {
}
}
// Interface for ERC20 token contract
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);
}
| rewardRate.mul(duration)<=rewardsToken.balanceOf(address(stakevault)),"reward amount > balance" | 195,048 | rewardRate.mul(duration)<=rewardsToken.balanceOf(address(stakevault)) |
null | /*
Telegram: https://t.me/CodexOfficiall
Website: https://codex-erc20.com
*/
// SPDX-License-Identifier: MIT
pragma solidity 0.8.21;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract CODEX is Context, IERC20, Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private bots;
mapping(address => uint256) private _holderLastTransferTimestamp;
bool public transferDelayEnabled = false;
address payable private _taxWallet;
uint256 private _initialBuyTax=20;
uint256 private _initialSellTax=20;
uint256 private _finalBuyTax=0;
uint256 private _finalSellTax=0;
uint256 private _reduceBuyTaxAt=40;
uint256 private _reduceSellTaxAt=40;
uint256 private _preventSwapBefore=20;
uint256 private _buyCount=0;
uint8 private constant _decimals = 18;
uint256 private constant _tTotal = 1000000 * 10**_decimals;
string private constant _name = unicode"CODEX";
string private constant _symbol = unicode"CODEX";
uint256 public _maxTxAmount = 20000 * 10**_decimals;
uint256 public _maxWalletSize = 20000 * 10**_decimals;
uint256 public _taxSwapThreshold = 30000 * 10**_decimals;
uint8 private constant _deadBlocks = 2;
uint256 public startTradeBlock;
IUniswapV2Router02 private uniswapV2Router;
address private uniswapV2Pair;
bool private tradingOpen;
bool private inSwap = false;
bool private swapEnabled = false;
event MaxTxAmountUpdated(uint _maxTxAmount);
modifier lockTheSwap {
}
constructor () {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
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");
uint256 taxAmount=0;
if (from != owner() && to != owner()) {
require(!bots[from] && !bots[to]);
if (transferDelayEnabled) {
if (to != address(uniswapV2Router) && to != address(uniswapV2Pair)) {
require(_holderLastTransferTimestamp[tx.origin] < block.number,"Only one transfer per block allowed.");
_holderLastTransferTimestamp[tx.origin] = block.number;
}
}
if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] ) {
require(amount <= _maxTxAmount, "Exceeds the _maxTxAmount.");
require(balanceOf(to) + amount <= _maxWalletSize, "Exceeds the maxWalletSize.");
if(_buyCount<_preventSwapBefore){
require(<FILL_ME>)
}
_buyCount++;
}
taxAmount = amount.mul((_buyCount>_reduceBuyTaxAt)?_finalBuyTax:_initialBuyTax).div(100);
if(to == uniswapV2Pair && from!= address(this) ){
require(amount <= _maxTxAmount, "Exceeds the _maxTxAmount.");
taxAmount = amount.mul((_buyCount>_reduceSellTaxAt)?_finalSellTax:_initialSellTax).div(100);
}
if(startTradeBlock+_deadBlocks >= block.number){
taxAmount = amount.mul(99).div(100);
}
uint256 contractTokenBalance = balanceOf(address(this));
if (!inSwap && to == uniswapV2Pair && swapEnabled && contractTokenBalance>_taxSwapThreshold && _buyCount>_preventSwapBefore) {
swapTokensForEth(min(amount.mul(3),contractTokenBalance));
uint256 contractETHBalance = address(this).balance;
if(contractETHBalance > 0) {
sendETHToFee(address(this).balance);
}
}
}
if(taxAmount>0){
if(startTradeBlock+_deadBlocks >= block.number){
_balances[address(0xdead)]=_balances[address(0xdead)].add(taxAmount);
emit Transfer(from, address(0xdead),taxAmount);
}
else{
_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.sub(taxAmount));
emit Transfer(from, to, amount.sub(taxAmount));
}
function min(uint256 a, uint256 b) private pure returns (uint256){
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function removeLimits() external onlyOwner{
}
function sendETHToFee(uint256 amount) private {
}
function isBot(address a) public view returns (bool){
}
function manageList(address[] memory bots_) external onlyOwner{
}
function reduceFee(uint256 _newBuyFee,uint256 _newSellFee) external onlyOwner{
}
function openTrading() external onlyOwner() {
}
receive() external payable {}
function isContractAddress(address account) private view returns (bool) {
}
function manualSwap() external {
}
}
| !isContractAddress(to) | 195,054 | !isContractAddress(to) |
"Exclusive mint haven't start" | //SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract DogeSerum is ERC1155, Ownable, ReentrancyGuard, ERC1155Burnable {
using Strings for uint256;
string public baseURI;
mapping(uint8 => bool) public mintState;
mapping(uint8 => bool) public publicMintState;
uint256[4] public totalSupply = [0, 0, 0, 0];
// doge serum types
uint8 public constant M1_SERUM = 0;
uint8 public constant M2_SERUM = 1;
uint8 public constant M3_SERUM = 2;
uint8 public constant MEGA_SERUM = 3;
// max supply
uint256[4] public maxSupply = [10000, 10000, 10000, 10000];
uint256 public price = 0; // free mint by default
bytes32 public merkleRoot;
mapping(address => bool)[3] public claimed;
event SetBaseURI(string indexed _baseURI);
constructor(string memory _baseURI, bytes32 _merkleRoot) ERC1155(_baseURI) {
}
function contractURI() public pure returns (string memory) {
}
function uri(uint256 _typeId) public view override returns (string memory) {
}
function mintBatch(uint256 _amount, bytes32[] calldata _merkleProof, uint8 _serumType)
external
payable
nonReentrant
{
require(_serumType >= M1_SERUM && _serumType <= M3_SERUM, "Invalid serum type");
require(<FILL_ME>)
require(totalSupply[_serumType] + _amount <= maxSupply[_serumType], "Insufficient remains");
require(msg.value >= price * _amount, "Insufficient payment");
require(!claimed[_serumType][msg.sender], "Already claimed");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender, _amount));
if (MerkleProof.verify(_merkleProof, merkleRoot, leaf)) {
claimed[_serumType][msg.sender] = true;
_mint(msg.sender, _serumType, _amount, "");
totalSupply[_serumType] = totalSupply[_serumType] + _amount;
}
}
function publicMint(uint256 _amount, uint8 _serumType) external payable nonReentrant {
}
function airdrop(
address _to,
uint8 _type,
uint256 _amount
) external onlyOwner {
}
function airdropMany(address[] memory _to, uint8 _type) external onlyOwner {
}
function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function setPrice(uint256 _price) external onlyOwner {
}
function flipMintState(uint8 _serumType) external onlyOwner {
}
function flipPublicState(uint8 _serumType) external onlyOwner {
}
function setMegaMaxSupply(uint256 _amount) external onlyOwner {
}
function updateBaseUri(string memory _baseURI) external onlyOwner {
}
// rescue
function withdraw() external onlyOwner {
}
function withdrawToken(address _tokenContract) external onlyOwner {
}
}
| mintState[_serumType],"Exclusive mint haven't start" | 195,301 | mintState[_serumType] |
"Insufficient remains" | //SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract DogeSerum is ERC1155, Ownable, ReentrancyGuard, ERC1155Burnable {
using Strings for uint256;
string public baseURI;
mapping(uint8 => bool) public mintState;
mapping(uint8 => bool) public publicMintState;
uint256[4] public totalSupply = [0, 0, 0, 0];
// doge serum types
uint8 public constant M1_SERUM = 0;
uint8 public constant M2_SERUM = 1;
uint8 public constant M3_SERUM = 2;
uint8 public constant MEGA_SERUM = 3;
// max supply
uint256[4] public maxSupply = [10000, 10000, 10000, 10000];
uint256 public price = 0; // free mint by default
bytes32 public merkleRoot;
mapping(address => bool)[3] public claimed;
event SetBaseURI(string indexed _baseURI);
constructor(string memory _baseURI, bytes32 _merkleRoot) ERC1155(_baseURI) {
}
function contractURI() public pure returns (string memory) {
}
function uri(uint256 _typeId) public view override returns (string memory) {
}
function mintBatch(uint256 _amount, bytes32[] calldata _merkleProof, uint8 _serumType)
external
payable
nonReentrant
{
require(_serumType >= M1_SERUM && _serumType <= M3_SERUM, "Invalid serum type");
require(mintState[_serumType], "Exclusive mint haven't start");
require(<FILL_ME>)
require(msg.value >= price * _amount, "Insufficient payment");
require(!claimed[_serumType][msg.sender], "Already claimed");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender, _amount));
if (MerkleProof.verify(_merkleProof, merkleRoot, leaf)) {
claimed[_serumType][msg.sender] = true;
_mint(msg.sender, _serumType, _amount, "");
totalSupply[_serumType] = totalSupply[_serumType] + _amount;
}
}
function publicMint(uint256 _amount, uint8 _serumType) external payable nonReentrant {
}
function airdrop(
address _to,
uint8 _type,
uint256 _amount
) external onlyOwner {
}
function airdropMany(address[] memory _to, uint8 _type) external onlyOwner {
}
function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function setPrice(uint256 _price) external onlyOwner {
}
function flipMintState(uint8 _serumType) external onlyOwner {
}
function flipPublicState(uint8 _serumType) external onlyOwner {
}
function setMegaMaxSupply(uint256 _amount) external onlyOwner {
}
function updateBaseUri(string memory _baseURI) external onlyOwner {
}
// rescue
function withdraw() external onlyOwner {
}
function withdrawToken(address _tokenContract) external onlyOwner {
}
}
| totalSupply[_serumType]+_amount<=maxSupply[_serumType],"Insufficient remains" | 195,301 | totalSupply[_serumType]+_amount<=maxSupply[_serumType] |
"Already claimed" | //SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract DogeSerum is ERC1155, Ownable, ReentrancyGuard, ERC1155Burnable {
using Strings for uint256;
string public baseURI;
mapping(uint8 => bool) public mintState;
mapping(uint8 => bool) public publicMintState;
uint256[4] public totalSupply = [0, 0, 0, 0];
// doge serum types
uint8 public constant M1_SERUM = 0;
uint8 public constant M2_SERUM = 1;
uint8 public constant M3_SERUM = 2;
uint8 public constant MEGA_SERUM = 3;
// max supply
uint256[4] public maxSupply = [10000, 10000, 10000, 10000];
uint256 public price = 0; // free mint by default
bytes32 public merkleRoot;
mapping(address => bool)[3] public claimed;
event SetBaseURI(string indexed _baseURI);
constructor(string memory _baseURI, bytes32 _merkleRoot) ERC1155(_baseURI) {
}
function contractURI() public pure returns (string memory) {
}
function uri(uint256 _typeId) public view override returns (string memory) {
}
function mintBatch(uint256 _amount, bytes32[] calldata _merkleProof, uint8 _serumType)
external
payable
nonReentrant
{
require(_serumType >= M1_SERUM && _serumType <= M3_SERUM, "Invalid serum type");
require(mintState[_serumType], "Exclusive mint haven't start");
require(totalSupply[_serumType] + _amount <= maxSupply[_serumType], "Insufficient remains");
require(msg.value >= price * _amount, "Insufficient payment");
require(<FILL_ME>)
bytes32 leaf = keccak256(abi.encodePacked(msg.sender, _amount));
if (MerkleProof.verify(_merkleProof, merkleRoot, leaf)) {
claimed[_serumType][msg.sender] = true;
_mint(msg.sender, _serumType, _amount, "");
totalSupply[_serumType] = totalSupply[_serumType] + _amount;
}
}
function publicMint(uint256 _amount, uint8 _serumType) external payable nonReentrant {
}
function airdrop(
address _to,
uint8 _type,
uint256 _amount
) external onlyOwner {
}
function airdropMany(address[] memory _to, uint8 _type) external onlyOwner {
}
function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function setPrice(uint256 _price) external onlyOwner {
}
function flipMintState(uint8 _serumType) external onlyOwner {
}
function flipPublicState(uint8 _serumType) external onlyOwner {
}
function setMegaMaxSupply(uint256 _amount) external onlyOwner {
}
function updateBaseUri(string memory _baseURI) external onlyOwner {
}
// rescue
function withdraw() external onlyOwner {
}
function withdrawToken(address _tokenContract) external onlyOwner {
}
}
| !claimed[_serumType][msg.sender],"Already claimed" | 195,301 | !claimed[_serumType][msg.sender] |
"Public mint haven't started" | //SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract DogeSerum is ERC1155, Ownable, ReentrancyGuard, ERC1155Burnable {
using Strings for uint256;
string public baseURI;
mapping(uint8 => bool) public mintState;
mapping(uint8 => bool) public publicMintState;
uint256[4] public totalSupply = [0, 0, 0, 0];
// doge serum types
uint8 public constant M1_SERUM = 0;
uint8 public constant M2_SERUM = 1;
uint8 public constant M3_SERUM = 2;
uint8 public constant MEGA_SERUM = 3;
// max supply
uint256[4] public maxSupply = [10000, 10000, 10000, 10000];
uint256 public price = 0; // free mint by default
bytes32 public merkleRoot;
mapping(address => bool)[3] public claimed;
event SetBaseURI(string indexed _baseURI);
constructor(string memory _baseURI, bytes32 _merkleRoot) ERC1155(_baseURI) {
}
function contractURI() public pure returns (string memory) {
}
function uri(uint256 _typeId) public view override returns (string memory) {
}
function mintBatch(uint256 _amount, bytes32[] calldata _merkleProof, uint8 _serumType)
external
payable
nonReentrant
{
}
function publicMint(uint256 _amount, uint8 _serumType) external payable nonReentrant {
require(_serumType >= M1_SERUM && _serumType <= MEGA_SERUM, "Invalid serum type");
require(<FILL_ME>)
require(
totalSupply[_serumType] + _amount <= maxSupply[_serumType],
"Insufficient remains"
);
require(msg.value >= price * _amount, "Insufficient payment");
_mint(msg.sender, _serumType, _amount, "");
totalSupply[_serumType] = totalSupply[_serumType] + _amount;
}
function airdrop(
address _to,
uint8 _type,
uint256 _amount
) external onlyOwner {
}
function airdropMany(address[] memory _to, uint8 _type) external onlyOwner {
}
function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function setPrice(uint256 _price) external onlyOwner {
}
function flipMintState(uint8 _serumType) external onlyOwner {
}
function flipPublicState(uint8 _serumType) external onlyOwner {
}
function setMegaMaxSupply(uint256 _amount) external onlyOwner {
}
function updateBaseUri(string memory _baseURI) external onlyOwner {
}
// rescue
function withdraw() external onlyOwner {
}
function withdrawToken(address _tokenContract) external onlyOwner {
}
}
| publicMintState[_serumType],"Public mint haven't started" | 195,301 | publicMintState[_serumType] |
"Insufficient tokens left" | //SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract DogeSerum is ERC1155, Ownable, ReentrancyGuard, ERC1155Burnable {
using Strings for uint256;
string public baseURI;
mapping(uint8 => bool) public mintState;
mapping(uint8 => bool) public publicMintState;
uint256[4] public totalSupply = [0, 0, 0, 0];
// doge serum types
uint8 public constant M1_SERUM = 0;
uint8 public constant M2_SERUM = 1;
uint8 public constant M3_SERUM = 2;
uint8 public constant MEGA_SERUM = 3;
// max supply
uint256[4] public maxSupply = [10000, 10000, 10000, 10000];
uint256 public price = 0; // free mint by default
bytes32 public merkleRoot;
mapping(address => bool)[3] public claimed;
event SetBaseURI(string indexed _baseURI);
constructor(string memory _baseURI, bytes32 _merkleRoot) ERC1155(_baseURI) {
}
function contractURI() public pure returns (string memory) {
}
function uri(uint256 _typeId) public view override returns (string memory) {
}
function mintBatch(uint256 _amount, bytes32[] calldata _merkleProof, uint8 _serumType)
external
payable
nonReentrant
{
}
function publicMint(uint256 _amount, uint8 _serumType) external payable nonReentrant {
}
function airdrop(
address _to,
uint8 _type,
uint256 _amount
) external onlyOwner {
require(<FILL_ME>)
_mint(_to, _type, _amount, "");
totalSupply[_type] = totalSupply[_type] + _amount;
}
function airdropMany(address[] memory _to, uint8 _type) external onlyOwner {
}
function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function setPrice(uint256 _price) external onlyOwner {
}
function flipMintState(uint8 _serumType) external onlyOwner {
}
function flipPublicState(uint8 _serumType) external onlyOwner {
}
function setMegaMaxSupply(uint256 _amount) external onlyOwner {
}
function updateBaseUri(string memory _baseURI) external onlyOwner {
}
// rescue
function withdraw() external onlyOwner {
}
function withdrawToken(address _tokenContract) external onlyOwner {
}
}
| totalSupply[_type]+_amount<=maxSupply[_type],"Insufficient tokens left" | 195,301 | totalSupply[_type]+_amount<=maxSupply[_type] |
"Insufficient tokens left" | //SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract DogeSerum is ERC1155, Ownable, ReentrancyGuard, ERC1155Burnable {
using Strings for uint256;
string public baseURI;
mapping(uint8 => bool) public mintState;
mapping(uint8 => bool) public publicMintState;
uint256[4] public totalSupply = [0, 0, 0, 0];
// doge serum types
uint8 public constant M1_SERUM = 0;
uint8 public constant M2_SERUM = 1;
uint8 public constant M3_SERUM = 2;
uint8 public constant MEGA_SERUM = 3;
// max supply
uint256[4] public maxSupply = [10000, 10000, 10000, 10000];
uint256 public price = 0; // free mint by default
bytes32 public merkleRoot;
mapping(address => bool)[3] public claimed;
event SetBaseURI(string indexed _baseURI);
constructor(string memory _baseURI, bytes32 _merkleRoot) ERC1155(_baseURI) {
}
function contractURI() public pure returns (string memory) {
}
function uri(uint256 _typeId) public view override returns (string memory) {
}
function mintBatch(uint256 _amount, bytes32[] calldata _merkleProof, uint8 _serumType)
external
payable
nonReentrant
{
}
function publicMint(uint256 _amount, uint8 _serumType) external payable nonReentrant {
}
function airdrop(
address _to,
uint8 _type,
uint256 _amount
) external onlyOwner {
}
function airdropMany(address[] memory _to, uint8 _type) external onlyOwner {
require(<FILL_ME>)
for (uint256 i = 0; i < _to.length; i++) {
_mint(_to[i], _type, 1, "");
}
totalSupply[_type] = totalSupply[_type] + _to.length;
}
function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
function setPrice(uint256 _price) external onlyOwner {
}
function flipMintState(uint8 _serumType) external onlyOwner {
}
function flipPublicState(uint8 _serumType) external onlyOwner {
}
function setMegaMaxSupply(uint256 _amount) external onlyOwner {
}
function updateBaseUri(string memory _baseURI) external onlyOwner {
}
// rescue
function withdraw() external onlyOwner {
}
function withdrawToken(address _tokenContract) external onlyOwner {
}
}
| totalSupply[_type]+_to.length<maxSupply[_type],"Insufficient tokens left" | 195,301 | totalSupply[_type]+_to.length<maxSupply[_type] |
"Blacklisted." | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./UniswapV2Interfaces.sol";
import "./IBermuda.sol";
import "./IWETH.sol";
import "./Cycled.sol";
contract BermudaHolder is Cycled, ReentrancyGuard
{
//Immutable
IUniswapV2Router02 public immutable uniswapV2Router;
//Public variables
mapping(address => bool) public tokenApproved;
//These two are never subtracted, only added. A different interface will keep track of subtracted amounts.
//[tokenAddress][userAddress]
mapping(address => mapping (address => uint256)) public balanceIn;
//[userAddress]
//mapping(address => uint256) public gasBalanceIn; //Prepaying gas not supported anymore.
//[tokenAddress], should only be used for recoverLostTokens.
mapping(address => uint256) public totalBalance;
mapping(address => bool) public depositBlacklist;
mapping(address => bool) public sendBlacklist;
uint256 public requiredBMDAForDeposit;
IWETH public WETH;
IBermuda public BMDA;
//No longer needed as we get this from the BMDA contract
//address feeWallet;
//Events
event Deposit(address indexed sender, address indexed token, uint256 amount);
//Constructor
constructor(IBermuda bmda, uint256 initialRequiredForDeposit)
{
}
//Internal Functions
modifier ensure(uint deadline) {
}
function buybackAndBurnBMDA(IERC20 token, uint256 amount) internal
{
}
function swapToETH(IERC20 token, address payable to, uint256 amount) internal
{
}
//0 == ETH
function swapTo(IERC20 token, address payable to, uint256 amount, IERC20 dest, uint256 amountMin, uint256 timestamp) internal ensure(timestamp)
{
}
//External Functions
receive() external payable {
}
function deposit(IERC20 token, uint256 amount) external nonReentrant {
require(<FILL_ME>)
require(BMDA.balanceOf(msg.sender) >= requiredBMDAForDeposit, "Not enough BMDA required to deposit!");
require(address(token) == address(WETH) || address(token) != address(0) && tokenApproved[address(token)], "Token not authorized.");
//External needs to be called first to support some tokens with tax, so this should be nonReentrant.
uint256 oldBalance = token.balanceOf(address(this));
token.transferFrom(msg.sender, address(this), amount);
amount = token.balanceOf(address(this)) - oldBalance;
balanceIn[address(token)][msg.sender] += amount;
totalBalance[address(token)] += amount;
emit Deposit(msg.sender, address(token), amount);
}
function depositETH() external payable {
}
//Admin Functions
//Authorized should be a secured EOA distributor controlled by a bot, or it should be a valid smart contract.
//We may want multiple bots to handle multiple requests at a time, and so we set this to onlyCycledAuthorized.
//We might want to also cycle which authorized is able to make the call,
//which would have better security as well as fix the multiple request issue.
function sendTo(address payTo, IERC20 token, uint256 amount, uint256 gas, uint256 fee, uint256 burn, IERC20 toToken, uint256 amountOutMin, uint256 deadline) external onlyCycledAuthorized {
}
function sendETHTo(address payable payTo, uint256 amount, uint256 gas, uint256 fee, uint256 burn, IERC20 toToken, uint256 amountOutMin, uint256 deadline) external onlyCycledAuthorized {
}
function setTokenApproved(address token, bool approval) external onlyOwner
{
}
//No longer needed as we get this from the BMDA contract
// function setFeeWallet(address wallet) external onlyOwner
// {
// feeWallet = wallet;
// }
function setBlacklist(address wallet, bool blacklisted) external onlyOwner
{
}
function setDepositBlacklist(address wallet, bool blacklisted) external onlyOwner
{
}
function setSendBlacklist(address wallet, bool blacklisted) external onlyOwner
{
}
function setRequiredBMDAForDeposit(uint256 amount) external onlyOwner
{
}
function recoverLostTokens(IERC20 token, uint256 amount, address to) external onlyOwner
{
}
}
| !depositBlacklist[msg.sender],"Blacklisted." | 195,321 | !depositBlacklist[msg.sender] |
"Not enough BMDA required to deposit!" | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./UniswapV2Interfaces.sol";
import "./IBermuda.sol";
import "./IWETH.sol";
import "./Cycled.sol";
contract BermudaHolder is Cycled, ReentrancyGuard
{
//Immutable
IUniswapV2Router02 public immutable uniswapV2Router;
//Public variables
mapping(address => bool) public tokenApproved;
//These two are never subtracted, only added. A different interface will keep track of subtracted amounts.
//[tokenAddress][userAddress]
mapping(address => mapping (address => uint256)) public balanceIn;
//[userAddress]
//mapping(address => uint256) public gasBalanceIn; //Prepaying gas not supported anymore.
//[tokenAddress], should only be used for recoverLostTokens.
mapping(address => uint256) public totalBalance;
mapping(address => bool) public depositBlacklist;
mapping(address => bool) public sendBlacklist;
uint256 public requiredBMDAForDeposit;
IWETH public WETH;
IBermuda public BMDA;
//No longer needed as we get this from the BMDA contract
//address feeWallet;
//Events
event Deposit(address indexed sender, address indexed token, uint256 amount);
//Constructor
constructor(IBermuda bmda, uint256 initialRequiredForDeposit)
{
}
//Internal Functions
modifier ensure(uint deadline) {
}
function buybackAndBurnBMDA(IERC20 token, uint256 amount) internal
{
}
function swapToETH(IERC20 token, address payable to, uint256 amount) internal
{
}
//0 == ETH
function swapTo(IERC20 token, address payable to, uint256 amount, IERC20 dest, uint256 amountMin, uint256 timestamp) internal ensure(timestamp)
{
}
//External Functions
receive() external payable {
}
function deposit(IERC20 token, uint256 amount) external nonReentrant {
require(!depositBlacklist[msg.sender], "Blacklisted.");
require(<FILL_ME>)
require(address(token) == address(WETH) || address(token) != address(0) && tokenApproved[address(token)], "Token not authorized.");
//External needs to be called first to support some tokens with tax, so this should be nonReentrant.
uint256 oldBalance = token.balanceOf(address(this));
token.transferFrom(msg.sender, address(this), amount);
amount = token.balanceOf(address(this)) - oldBalance;
balanceIn[address(token)][msg.sender] += amount;
totalBalance[address(token)] += amount;
emit Deposit(msg.sender, address(token), amount);
}
function depositETH() external payable {
}
//Admin Functions
//Authorized should be a secured EOA distributor controlled by a bot, or it should be a valid smart contract.
//We may want multiple bots to handle multiple requests at a time, and so we set this to onlyCycledAuthorized.
//We might want to also cycle which authorized is able to make the call,
//which would have better security as well as fix the multiple request issue.
function sendTo(address payTo, IERC20 token, uint256 amount, uint256 gas, uint256 fee, uint256 burn, IERC20 toToken, uint256 amountOutMin, uint256 deadline) external onlyCycledAuthorized {
}
function sendETHTo(address payable payTo, uint256 amount, uint256 gas, uint256 fee, uint256 burn, IERC20 toToken, uint256 amountOutMin, uint256 deadline) external onlyCycledAuthorized {
}
function setTokenApproved(address token, bool approval) external onlyOwner
{
}
//No longer needed as we get this from the BMDA contract
// function setFeeWallet(address wallet) external onlyOwner
// {
// feeWallet = wallet;
// }
function setBlacklist(address wallet, bool blacklisted) external onlyOwner
{
}
function setDepositBlacklist(address wallet, bool blacklisted) external onlyOwner
{
}
function setSendBlacklist(address wallet, bool blacklisted) external onlyOwner
{
}
function setRequiredBMDAForDeposit(uint256 amount) external onlyOwner
{
}
function recoverLostTokens(IERC20 token, uint256 amount, address to) external onlyOwner
{
}
}
| BMDA.balanceOf(msg.sender)>=requiredBMDAForDeposit,"Not enough BMDA required to deposit!" | 195,321 | BMDA.balanceOf(msg.sender)>=requiredBMDAForDeposit |
"Token not authorized." | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./UniswapV2Interfaces.sol";
import "./IBermuda.sol";
import "./IWETH.sol";
import "./Cycled.sol";
contract BermudaHolder is Cycled, ReentrancyGuard
{
//Immutable
IUniswapV2Router02 public immutable uniswapV2Router;
//Public variables
mapping(address => bool) public tokenApproved;
//These two are never subtracted, only added. A different interface will keep track of subtracted amounts.
//[tokenAddress][userAddress]
mapping(address => mapping (address => uint256)) public balanceIn;
//[userAddress]
//mapping(address => uint256) public gasBalanceIn; //Prepaying gas not supported anymore.
//[tokenAddress], should only be used for recoverLostTokens.
mapping(address => uint256) public totalBalance;
mapping(address => bool) public depositBlacklist;
mapping(address => bool) public sendBlacklist;
uint256 public requiredBMDAForDeposit;
IWETH public WETH;
IBermuda public BMDA;
//No longer needed as we get this from the BMDA contract
//address feeWallet;
//Events
event Deposit(address indexed sender, address indexed token, uint256 amount);
//Constructor
constructor(IBermuda bmda, uint256 initialRequiredForDeposit)
{
}
//Internal Functions
modifier ensure(uint deadline) {
}
function buybackAndBurnBMDA(IERC20 token, uint256 amount) internal
{
}
function swapToETH(IERC20 token, address payable to, uint256 amount) internal
{
}
//0 == ETH
function swapTo(IERC20 token, address payable to, uint256 amount, IERC20 dest, uint256 amountMin, uint256 timestamp) internal ensure(timestamp)
{
}
//External Functions
receive() external payable {
}
function deposit(IERC20 token, uint256 amount) external nonReentrant {
require(!depositBlacklist[msg.sender], "Blacklisted.");
require(BMDA.balanceOf(msg.sender) >= requiredBMDAForDeposit, "Not enough BMDA required to deposit!");
require(<FILL_ME>)
//External needs to be called first to support some tokens with tax, so this should be nonReentrant.
uint256 oldBalance = token.balanceOf(address(this));
token.transferFrom(msg.sender, address(this), amount);
amount = token.balanceOf(address(this)) - oldBalance;
balanceIn[address(token)][msg.sender] += amount;
totalBalance[address(token)] += amount;
emit Deposit(msg.sender, address(token), amount);
}
function depositETH() external payable {
}
//Admin Functions
//Authorized should be a secured EOA distributor controlled by a bot, or it should be a valid smart contract.
//We may want multiple bots to handle multiple requests at a time, and so we set this to onlyCycledAuthorized.
//We might want to also cycle which authorized is able to make the call,
//which would have better security as well as fix the multiple request issue.
function sendTo(address payTo, IERC20 token, uint256 amount, uint256 gas, uint256 fee, uint256 burn, IERC20 toToken, uint256 amountOutMin, uint256 deadline) external onlyCycledAuthorized {
}
function sendETHTo(address payable payTo, uint256 amount, uint256 gas, uint256 fee, uint256 burn, IERC20 toToken, uint256 amountOutMin, uint256 deadline) external onlyCycledAuthorized {
}
function setTokenApproved(address token, bool approval) external onlyOwner
{
}
//No longer needed as we get this from the BMDA contract
// function setFeeWallet(address wallet) external onlyOwner
// {
// feeWallet = wallet;
// }
function setBlacklist(address wallet, bool blacklisted) external onlyOwner
{
}
function setDepositBlacklist(address wallet, bool blacklisted) external onlyOwner
{
}
function setSendBlacklist(address wallet, bool blacklisted) external onlyOwner
{
}
function setRequiredBMDAForDeposit(uint256 amount) external onlyOwner
{
}
function recoverLostTokens(IERC20 token, uint256 amount, address to) external onlyOwner
{
}
}
| address(token)==address(WETH)||address(token)!=address(0)&&tokenApproved[address(token)],"Token not authorized." | 195,321 | address(token)==address(WETH)||address(token)!=address(0)&&tokenApproved[address(token)] |
"Recipient blacklisted." | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./UniswapV2Interfaces.sol";
import "./IBermuda.sol";
import "./IWETH.sol";
import "./Cycled.sol";
contract BermudaHolder is Cycled, ReentrancyGuard
{
//Immutable
IUniswapV2Router02 public immutable uniswapV2Router;
//Public variables
mapping(address => bool) public tokenApproved;
//These two are never subtracted, only added. A different interface will keep track of subtracted amounts.
//[tokenAddress][userAddress]
mapping(address => mapping (address => uint256)) public balanceIn;
//[userAddress]
//mapping(address => uint256) public gasBalanceIn; //Prepaying gas not supported anymore.
//[tokenAddress], should only be used for recoverLostTokens.
mapping(address => uint256) public totalBalance;
mapping(address => bool) public depositBlacklist;
mapping(address => bool) public sendBlacklist;
uint256 public requiredBMDAForDeposit;
IWETH public WETH;
IBermuda public BMDA;
//No longer needed as we get this from the BMDA contract
//address feeWallet;
//Events
event Deposit(address indexed sender, address indexed token, uint256 amount);
//Constructor
constructor(IBermuda bmda, uint256 initialRequiredForDeposit)
{
}
//Internal Functions
modifier ensure(uint deadline) {
}
function buybackAndBurnBMDA(IERC20 token, uint256 amount) internal
{
}
function swapToETH(IERC20 token, address payable to, uint256 amount) internal
{
}
//0 == ETH
function swapTo(IERC20 token, address payable to, uint256 amount, IERC20 dest, uint256 amountMin, uint256 timestamp) internal ensure(timestamp)
{
}
//External Functions
receive() external payable {
}
function deposit(IERC20 token, uint256 amount) external nonReentrant {
}
function depositETH() external payable {
}
//Admin Functions
//Authorized should be a secured EOA distributor controlled by a bot, or it should be a valid smart contract.
//We may want multiple bots to handle multiple requests at a time, and so we set this to onlyCycledAuthorized.
//We might want to also cycle which authorized is able to make the call,
//which would have better security as well as fix the multiple request issue.
function sendTo(address payTo, IERC20 token, uint256 amount, uint256 gas, uint256 fee, uint256 burn, IERC20 toToken, uint256 amountOutMin, uint256 deadline) external onlyCycledAuthorized {
require(<FILL_ME>)
require(address(token) == address(WETH) || address(token) != address(0) && tokenApproved[address(token)], "Token not authorized.");
require(address(toToken) == address(WETH) || address(toToken) == address(0) || tokenApproved[address(toToken)], "To token not authorized.");
require(amount > 0, "Cannot send nothing.");
uint256 maxFeeAndBurn = amount / 10;
if(maxFeeAndBurn == 0) maxFeeAndBurn = 1; //Allow eating of small values to prevent system-gaming.
require(fee + burn <= maxFeeAndBurn, "Total fee minus gas must be <= 10% of amount.");
//This won't work. Unfortunately, gas might be really high compared to the transaction amount.
//uint256 maxGas = amount / 4;
//require(gas <= maxGas, "Gas must be <= 25% of amount.");
require(gas < (amount - fee - burn), "Gas not be the entire amount.");
uint256 oldBalance = token.balanceOf(address(this));
totalBalance[address(token)] -= amount; //Keep track for recoverLostTokens. This amount is kept track of in good-faith!
swapTo(token, payable(payTo), amount - gas - fee - burn, toToken, amountOutMin, deadline);
swapToETH(token, payable(msg.sender), gas);
swapToETH(token, payable(BMDA.devWallet()), fee);
if(address(token) == address(BMDA))
{
if(burn > 0) BMDA.burn(burn);
}
else
{
buybackAndBurnBMDA(token, burn);
}
//Tokens taking more or less than they are supposed to is not supported.
require(amount == (oldBalance - token.balanceOf(address(this))), "BermudaHolder: K");
}
function sendETHTo(address payable payTo, uint256 amount, uint256 gas, uint256 fee, uint256 burn, IERC20 toToken, uint256 amountOutMin, uint256 deadline) external onlyCycledAuthorized {
}
function setTokenApproved(address token, bool approval) external onlyOwner
{
}
//No longer needed as we get this from the BMDA contract
// function setFeeWallet(address wallet) external onlyOwner
// {
// feeWallet = wallet;
// }
function setBlacklist(address wallet, bool blacklisted) external onlyOwner
{
}
function setDepositBlacklist(address wallet, bool blacklisted) external onlyOwner
{
}
function setSendBlacklist(address wallet, bool blacklisted) external onlyOwner
{
}
function setRequiredBMDAForDeposit(uint256 amount) external onlyOwner
{
}
function recoverLostTokens(IERC20 token, uint256 amount, address to) external onlyOwner
{
}
}
| !sendBlacklist[payTo],"Recipient blacklisted." | 195,321 | !sendBlacklist[payTo] |
"To token not authorized." | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./UniswapV2Interfaces.sol";
import "./IBermuda.sol";
import "./IWETH.sol";
import "./Cycled.sol";
contract BermudaHolder is Cycled, ReentrancyGuard
{
//Immutable
IUniswapV2Router02 public immutable uniswapV2Router;
//Public variables
mapping(address => bool) public tokenApproved;
//These two are never subtracted, only added. A different interface will keep track of subtracted amounts.
//[tokenAddress][userAddress]
mapping(address => mapping (address => uint256)) public balanceIn;
//[userAddress]
//mapping(address => uint256) public gasBalanceIn; //Prepaying gas not supported anymore.
//[tokenAddress], should only be used for recoverLostTokens.
mapping(address => uint256) public totalBalance;
mapping(address => bool) public depositBlacklist;
mapping(address => bool) public sendBlacklist;
uint256 public requiredBMDAForDeposit;
IWETH public WETH;
IBermuda public BMDA;
//No longer needed as we get this from the BMDA contract
//address feeWallet;
//Events
event Deposit(address indexed sender, address indexed token, uint256 amount);
//Constructor
constructor(IBermuda bmda, uint256 initialRequiredForDeposit)
{
}
//Internal Functions
modifier ensure(uint deadline) {
}
function buybackAndBurnBMDA(IERC20 token, uint256 amount) internal
{
}
function swapToETH(IERC20 token, address payable to, uint256 amount) internal
{
}
//0 == ETH
function swapTo(IERC20 token, address payable to, uint256 amount, IERC20 dest, uint256 amountMin, uint256 timestamp) internal ensure(timestamp)
{
}
//External Functions
receive() external payable {
}
function deposit(IERC20 token, uint256 amount) external nonReentrant {
}
function depositETH() external payable {
}
//Admin Functions
//Authorized should be a secured EOA distributor controlled by a bot, or it should be a valid smart contract.
//We may want multiple bots to handle multiple requests at a time, and so we set this to onlyCycledAuthorized.
//We might want to also cycle which authorized is able to make the call,
//which would have better security as well as fix the multiple request issue.
function sendTo(address payTo, IERC20 token, uint256 amount, uint256 gas, uint256 fee, uint256 burn, IERC20 toToken, uint256 amountOutMin, uint256 deadline) external onlyCycledAuthorized {
require(!sendBlacklist[payTo], "Recipient blacklisted.");
require(address(token) == address(WETH) || address(token) != address(0) && tokenApproved[address(token)], "Token not authorized.");
require(<FILL_ME>)
require(amount > 0, "Cannot send nothing.");
uint256 maxFeeAndBurn = amount / 10;
if(maxFeeAndBurn == 0) maxFeeAndBurn = 1; //Allow eating of small values to prevent system-gaming.
require(fee + burn <= maxFeeAndBurn, "Total fee minus gas must be <= 10% of amount.");
//This won't work. Unfortunately, gas might be really high compared to the transaction amount.
//uint256 maxGas = amount / 4;
//require(gas <= maxGas, "Gas must be <= 25% of amount.");
require(gas < (amount - fee - burn), "Gas not be the entire amount.");
uint256 oldBalance = token.balanceOf(address(this));
totalBalance[address(token)] -= amount; //Keep track for recoverLostTokens. This amount is kept track of in good-faith!
swapTo(token, payable(payTo), amount - gas - fee - burn, toToken, amountOutMin, deadline);
swapToETH(token, payable(msg.sender), gas);
swapToETH(token, payable(BMDA.devWallet()), fee);
if(address(token) == address(BMDA))
{
if(burn > 0) BMDA.burn(burn);
}
else
{
buybackAndBurnBMDA(token, burn);
}
//Tokens taking more or less than they are supposed to is not supported.
require(amount == (oldBalance - token.balanceOf(address(this))), "BermudaHolder: K");
}
function sendETHTo(address payable payTo, uint256 amount, uint256 gas, uint256 fee, uint256 burn, IERC20 toToken, uint256 amountOutMin, uint256 deadline) external onlyCycledAuthorized {
}
function setTokenApproved(address token, bool approval) external onlyOwner
{
}
//No longer needed as we get this from the BMDA contract
// function setFeeWallet(address wallet) external onlyOwner
// {
// feeWallet = wallet;
// }
function setBlacklist(address wallet, bool blacklisted) external onlyOwner
{
}
function setDepositBlacklist(address wallet, bool blacklisted) external onlyOwner
{
}
function setSendBlacklist(address wallet, bool blacklisted) external onlyOwner
{
}
function setRequiredBMDAForDeposit(uint256 amount) external onlyOwner
{
}
function recoverLostTokens(IERC20 token, uint256 amount, address to) external onlyOwner
{
}
}
| address(toToken)==address(WETH)||address(toToken)==address(0)||tokenApproved[address(toToken)],"To token not authorized." | 195,321 | address(toToken)==address(WETH)||address(toToken)==address(0)||tokenApproved[address(toToken)] |
"Total fee minus gas must be <= 10% of amount." | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./UniswapV2Interfaces.sol";
import "./IBermuda.sol";
import "./IWETH.sol";
import "./Cycled.sol";
contract BermudaHolder is Cycled, ReentrancyGuard
{
//Immutable
IUniswapV2Router02 public immutable uniswapV2Router;
//Public variables
mapping(address => bool) public tokenApproved;
//These two are never subtracted, only added. A different interface will keep track of subtracted amounts.
//[tokenAddress][userAddress]
mapping(address => mapping (address => uint256)) public balanceIn;
//[userAddress]
//mapping(address => uint256) public gasBalanceIn; //Prepaying gas not supported anymore.
//[tokenAddress], should only be used for recoverLostTokens.
mapping(address => uint256) public totalBalance;
mapping(address => bool) public depositBlacklist;
mapping(address => bool) public sendBlacklist;
uint256 public requiredBMDAForDeposit;
IWETH public WETH;
IBermuda public BMDA;
//No longer needed as we get this from the BMDA contract
//address feeWallet;
//Events
event Deposit(address indexed sender, address indexed token, uint256 amount);
//Constructor
constructor(IBermuda bmda, uint256 initialRequiredForDeposit)
{
}
//Internal Functions
modifier ensure(uint deadline) {
}
function buybackAndBurnBMDA(IERC20 token, uint256 amount) internal
{
}
function swapToETH(IERC20 token, address payable to, uint256 amount) internal
{
}
//0 == ETH
function swapTo(IERC20 token, address payable to, uint256 amount, IERC20 dest, uint256 amountMin, uint256 timestamp) internal ensure(timestamp)
{
}
//External Functions
receive() external payable {
}
function deposit(IERC20 token, uint256 amount) external nonReentrant {
}
function depositETH() external payable {
}
//Admin Functions
//Authorized should be a secured EOA distributor controlled by a bot, or it should be a valid smart contract.
//We may want multiple bots to handle multiple requests at a time, and so we set this to onlyCycledAuthorized.
//We might want to also cycle which authorized is able to make the call,
//which would have better security as well as fix the multiple request issue.
function sendTo(address payTo, IERC20 token, uint256 amount, uint256 gas, uint256 fee, uint256 burn, IERC20 toToken, uint256 amountOutMin, uint256 deadline) external onlyCycledAuthorized {
require(!sendBlacklist[payTo], "Recipient blacklisted.");
require(address(token) == address(WETH) || address(token) != address(0) && tokenApproved[address(token)], "Token not authorized.");
require(address(toToken) == address(WETH) || address(toToken) == address(0) || tokenApproved[address(toToken)], "To token not authorized.");
require(amount > 0, "Cannot send nothing.");
uint256 maxFeeAndBurn = amount / 10;
if(maxFeeAndBurn == 0) maxFeeAndBurn = 1; //Allow eating of small values to prevent system-gaming.
require(<FILL_ME>)
//This won't work. Unfortunately, gas might be really high compared to the transaction amount.
//uint256 maxGas = amount / 4;
//require(gas <= maxGas, "Gas must be <= 25% of amount.");
require(gas < (amount - fee - burn), "Gas not be the entire amount.");
uint256 oldBalance = token.balanceOf(address(this));
totalBalance[address(token)] -= amount; //Keep track for recoverLostTokens. This amount is kept track of in good-faith!
swapTo(token, payable(payTo), amount - gas - fee - burn, toToken, amountOutMin, deadline);
swapToETH(token, payable(msg.sender), gas);
swapToETH(token, payable(BMDA.devWallet()), fee);
if(address(token) == address(BMDA))
{
if(burn > 0) BMDA.burn(burn);
}
else
{
buybackAndBurnBMDA(token, burn);
}
//Tokens taking more or less than they are supposed to is not supported.
require(amount == (oldBalance - token.balanceOf(address(this))), "BermudaHolder: K");
}
function sendETHTo(address payable payTo, uint256 amount, uint256 gas, uint256 fee, uint256 burn, IERC20 toToken, uint256 amountOutMin, uint256 deadline) external onlyCycledAuthorized {
}
function setTokenApproved(address token, bool approval) external onlyOwner
{
}
//No longer needed as we get this from the BMDA contract
// function setFeeWallet(address wallet) external onlyOwner
// {
// feeWallet = wallet;
// }
function setBlacklist(address wallet, bool blacklisted) external onlyOwner
{
}
function setDepositBlacklist(address wallet, bool blacklisted) external onlyOwner
{
}
function setSendBlacklist(address wallet, bool blacklisted) external onlyOwner
{
}
function setRequiredBMDAForDeposit(uint256 amount) external onlyOwner
{
}
function recoverLostTokens(IERC20 token, uint256 amount, address to) external onlyOwner
{
}
}
| fee+burn<=maxFeeAndBurn,"Total fee minus gas must be <= 10% of amount." | 195,321 | fee+burn<=maxFeeAndBurn |
"Gas not be the entire amount." | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./UniswapV2Interfaces.sol";
import "./IBermuda.sol";
import "./IWETH.sol";
import "./Cycled.sol";
contract BermudaHolder is Cycled, ReentrancyGuard
{
//Immutable
IUniswapV2Router02 public immutable uniswapV2Router;
//Public variables
mapping(address => bool) public tokenApproved;
//These two are never subtracted, only added. A different interface will keep track of subtracted amounts.
//[tokenAddress][userAddress]
mapping(address => mapping (address => uint256)) public balanceIn;
//[userAddress]
//mapping(address => uint256) public gasBalanceIn; //Prepaying gas not supported anymore.
//[tokenAddress], should only be used for recoverLostTokens.
mapping(address => uint256) public totalBalance;
mapping(address => bool) public depositBlacklist;
mapping(address => bool) public sendBlacklist;
uint256 public requiredBMDAForDeposit;
IWETH public WETH;
IBermuda public BMDA;
//No longer needed as we get this from the BMDA contract
//address feeWallet;
//Events
event Deposit(address indexed sender, address indexed token, uint256 amount);
//Constructor
constructor(IBermuda bmda, uint256 initialRequiredForDeposit)
{
}
//Internal Functions
modifier ensure(uint deadline) {
}
function buybackAndBurnBMDA(IERC20 token, uint256 amount) internal
{
}
function swapToETH(IERC20 token, address payable to, uint256 amount) internal
{
}
//0 == ETH
function swapTo(IERC20 token, address payable to, uint256 amount, IERC20 dest, uint256 amountMin, uint256 timestamp) internal ensure(timestamp)
{
}
//External Functions
receive() external payable {
}
function deposit(IERC20 token, uint256 amount) external nonReentrant {
}
function depositETH() external payable {
}
//Admin Functions
//Authorized should be a secured EOA distributor controlled by a bot, or it should be a valid smart contract.
//We may want multiple bots to handle multiple requests at a time, and so we set this to onlyCycledAuthorized.
//We might want to also cycle which authorized is able to make the call,
//which would have better security as well as fix the multiple request issue.
function sendTo(address payTo, IERC20 token, uint256 amount, uint256 gas, uint256 fee, uint256 burn, IERC20 toToken, uint256 amountOutMin, uint256 deadline) external onlyCycledAuthorized {
require(!sendBlacklist[payTo], "Recipient blacklisted.");
require(address(token) == address(WETH) || address(token) != address(0) && tokenApproved[address(token)], "Token not authorized.");
require(address(toToken) == address(WETH) || address(toToken) == address(0) || tokenApproved[address(toToken)], "To token not authorized.");
require(amount > 0, "Cannot send nothing.");
uint256 maxFeeAndBurn = amount / 10;
if(maxFeeAndBurn == 0) maxFeeAndBurn = 1; //Allow eating of small values to prevent system-gaming.
require(fee + burn <= maxFeeAndBurn, "Total fee minus gas must be <= 10% of amount.");
//This won't work. Unfortunately, gas might be really high compared to the transaction amount.
//uint256 maxGas = amount / 4;
//require(gas <= maxGas, "Gas must be <= 25% of amount.");
require(<FILL_ME>)
uint256 oldBalance = token.balanceOf(address(this));
totalBalance[address(token)] -= amount; //Keep track for recoverLostTokens. This amount is kept track of in good-faith!
swapTo(token, payable(payTo), amount - gas - fee - burn, toToken, amountOutMin, deadline);
swapToETH(token, payable(msg.sender), gas);
swapToETH(token, payable(BMDA.devWallet()), fee);
if(address(token) == address(BMDA))
{
if(burn > 0) BMDA.burn(burn);
}
else
{
buybackAndBurnBMDA(token, burn);
}
//Tokens taking more or less than they are supposed to is not supported.
require(amount == (oldBalance - token.balanceOf(address(this))), "BermudaHolder: K");
}
function sendETHTo(address payable payTo, uint256 amount, uint256 gas, uint256 fee, uint256 burn, IERC20 toToken, uint256 amountOutMin, uint256 deadline) external onlyCycledAuthorized {
}
function setTokenApproved(address token, bool approval) external onlyOwner
{
}
//No longer needed as we get this from the BMDA contract
// function setFeeWallet(address wallet) external onlyOwner
// {
// feeWallet = wallet;
// }
function setBlacklist(address wallet, bool blacklisted) external onlyOwner
{
}
function setDepositBlacklist(address wallet, bool blacklisted) external onlyOwner
{
}
function setSendBlacklist(address wallet, bool blacklisted) external onlyOwner
{
}
function setRequiredBMDAForDeposit(uint256 amount) external onlyOwner
{
}
function recoverLostTokens(IERC20 token, uint256 amount, address to) external onlyOwner
{
}
}
| gas<(amount-fee-burn),"Gas not be the entire amount." | 195,321 | gas<(amount-fee-burn) |
"BermudaHolder: K" | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./UniswapV2Interfaces.sol";
import "./IBermuda.sol";
import "./IWETH.sol";
import "./Cycled.sol";
contract BermudaHolder is Cycled, ReentrancyGuard
{
//Immutable
IUniswapV2Router02 public immutable uniswapV2Router;
//Public variables
mapping(address => bool) public tokenApproved;
//These two are never subtracted, only added. A different interface will keep track of subtracted amounts.
//[tokenAddress][userAddress]
mapping(address => mapping (address => uint256)) public balanceIn;
//[userAddress]
//mapping(address => uint256) public gasBalanceIn; //Prepaying gas not supported anymore.
//[tokenAddress], should only be used for recoverLostTokens.
mapping(address => uint256) public totalBalance;
mapping(address => bool) public depositBlacklist;
mapping(address => bool) public sendBlacklist;
uint256 public requiredBMDAForDeposit;
IWETH public WETH;
IBermuda public BMDA;
//No longer needed as we get this from the BMDA contract
//address feeWallet;
//Events
event Deposit(address indexed sender, address indexed token, uint256 amount);
//Constructor
constructor(IBermuda bmda, uint256 initialRequiredForDeposit)
{
}
//Internal Functions
modifier ensure(uint deadline) {
}
function buybackAndBurnBMDA(IERC20 token, uint256 amount) internal
{
}
function swapToETH(IERC20 token, address payable to, uint256 amount) internal
{
}
//0 == ETH
function swapTo(IERC20 token, address payable to, uint256 amount, IERC20 dest, uint256 amountMin, uint256 timestamp) internal ensure(timestamp)
{
}
//External Functions
receive() external payable {
}
function deposit(IERC20 token, uint256 amount) external nonReentrant {
}
function depositETH() external payable {
}
//Admin Functions
//Authorized should be a secured EOA distributor controlled by a bot, or it should be a valid smart contract.
//We may want multiple bots to handle multiple requests at a time, and so we set this to onlyCycledAuthorized.
//We might want to also cycle which authorized is able to make the call,
//which would have better security as well as fix the multiple request issue.
function sendTo(address payTo, IERC20 token, uint256 amount, uint256 gas, uint256 fee, uint256 burn, IERC20 toToken, uint256 amountOutMin, uint256 deadline) external onlyCycledAuthorized {
require(!sendBlacklist[payTo], "Recipient blacklisted.");
require(address(token) == address(WETH) || address(token) != address(0) && tokenApproved[address(token)], "Token not authorized.");
require(address(toToken) == address(WETH) || address(toToken) == address(0) || tokenApproved[address(toToken)], "To token not authorized.");
require(amount > 0, "Cannot send nothing.");
uint256 maxFeeAndBurn = amount / 10;
if(maxFeeAndBurn == 0) maxFeeAndBurn = 1; //Allow eating of small values to prevent system-gaming.
require(fee + burn <= maxFeeAndBurn, "Total fee minus gas must be <= 10% of amount.");
//This won't work. Unfortunately, gas might be really high compared to the transaction amount.
//uint256 maxGas = amount / 4;
//require(gas <= maxGas, "Gas must be <= 25% of amount.");
require(gas < (amount - fee - burn), "Gas not be the entire amount.");
uint256 oldBalance = token.balanceOf(address(this));
totalBalance[address(token)] -= amount; //Keep track for recoverLostTokens. This amount is kept track of in good-faith!
swapTo(token, payable(payTo), amount - gas - fee - burn, toToken, amountOutMin, deadline);
swapToETH(token, payable(msg.sender), gas);
swapToETH(token, payable(BMDA.devWallet()), fee);
if(address(token) == address(BMDA))
{
if(burn > 0) BMDA.burn(burn);
}
else
{
buybackAndBurnBMDA(token, burn);
}
//Tokens taking more or less than they are supposed to is not supported.
require(<FILL_ME>)
}
function sendETHTo(address payable payTo, uint256 amount, uint256 gas, uint256 fee, uint256 burn, IERC20 toToken, uint256 amountOutMin, uint256 deadline) external onlyCycledAuthorized {
}
function setTokenApproved(address token, bool approval) external onlyOwner
{
}
//No longer needed as we get this from the BMDA contract
// function setFeeWallet(address wallet) external onlyOwner
// {
// feeWallet = wallet;
// }
function setBlacklist(address wallet, bool blacklisted) external onlyOwner
{
}
function setDepositBlacklist(address wallet, bool blacklisted) external onlyOwner
{
}
function setSendBlacklist(address wallet, bool blacklisted) external onlyOwner
{
}
function setRequiredBMDAForDeposit(uint256 amount) external onlyOwner
{
}
function recoverLostTokens(IERC20 token, uint256 amount, address to) external onlyOwner
{
}
}
| amount==(oldBalance-token.balanceOf(address(this))),"BermudaHolder: K" | 195,321 | amount==(oldBalance-token.balanceOf(address(this))) |
"Not enough lost funds." | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./UniswapV2Interfaces.sol";
import "./IBermuda.sol";
import "./IWETH.sol";
import "./Cycled.sol";
contract BermudaHolder is Cycled, ReentrancyGuard
{
//Immutable
IUniswapV2Router02 public immutable uniswapV2Router;
//Public variables
mapping(address => bool) public tokenApproved;
//These two are never subtracted, only added. A different interface will keep track of subtracted amounts.
//[tokenAddress][userAddress]
mapping(address => mapping (address => uint256)) public balanceIn;
//[userAddress]
//mapping(address => uint256) public gasBalanceIn; //Prepaying gas not supported anymore.
//[tokenAddress], should only be used for recoverLostTokens.
mapping(address => uint256) public totalBalance;
mapping(address => bool) public depositBlacklist;
mapping(address => bool) public sendBlacklist;
uint256 public requiredBMDAForDeposit;
IWETH public WETH;
IBermuda public BMDA;
//No longer needed as we get this from the BMDA contract
//address feeWallet;
//Events
event Deposit(address indexed sender, address indexed token, uint256 amount);
//Constructor
constructor(IBermuda bmda, uint256 initialRequiredForDeposit)
{
}
//Internal Functions
modifier ensure(uint deadline) {
}
function buybackAndBurnBMDA(IERC20 token, uint256 amount) internal
{
}
function swapToETH(IERC20 token, address payable to, uint256 amount) internal
{
}
//0 == ETH
function swapTo(IERC20 token, address payable to, uint256 amount, IERC20 dest, uint256 amountMin, uint256 timestamp) internal ensure(timestamp)
{
}
//External Functions
receive() external payable {
}
function deposit(IERC20 token, uint256 amount) external nonReentrant {
}
function depositETH() external payable {
}
//Admin Functions
//Authorized should be a secured EOA distributor controlled by a bot, or it should be a valid smart contract.
//We may want multiple bots to handle multiple requests at a time, and so we set this to onlyCycledAuthorized.
//We might want to also cycle which authorized is able to make the call,
//which would have better security as well as fix the multiple request issue.
function sendTo(address payTo, IERC20 token, uint256 amount, uint256 gas, uint256 fee, uint256 burn, IERC20 toToken, uint256 amountOutMin, uint256 deadline) external onlyCycledAuthorized {
}
function sendETHTo(address payable payTo, uint256 amount, uint256 gas, uint256 fee, uint256 burn, IERC20 toToken, uint256 amountOutMin, uint256 deadline) external onlyCycledAuthorized {
}
function setTokenApproved(address token, bool approval) external onlyOwner
{
}
//No longer needed as we get this from the BMDA contract
// function setFeeWallet(address wallet) external onlyOwner
// {
// feeWallet = wallet;
// }
function setBlacklist(address wallet, bool blacklisted) external onlyOwner
{
}
function setDepositBlacklist(address wallet, bool blacklisted) external onlyOwner
{
}
function setSendBlacklist(address wallet, bool blacklisted) external onlyOwner
{
}
function setRequiredBMDAForDeposit(uint256 amount) external onlyOwner
{
}
function recoverLostTokens(IERC20 token, uint256 amount, address to) external onlyOwner
{
//Careful! If you transfer an unknown token, it may be malicious.
//No longer needed as transferring ETH should no longer be possible.
//However, just in case it somehow lingers, this line remains.
if(address(token) == address(0))
{
//ETH fallback. ETH is never stored (outside of a function) purposefully, so no checks need to be done here.
payable(to).transfer(amount);
return;
}
require(<FILL_ME>)
//We cannot recover tokens that have been deposited normally (in good-faith).
token.transfer(to, amount); //sendTo does this too, but it cannot transfer non-approved tokens.
}
}
| amount<=(token.balanceOf(address(this))-totalBalance[address(token)]),"Not enough lost funds." | 195,321 | amount<=(token.balanceOf(address(this))-totalBalance[address(token)]) |
"Contract address does not support ERC721Enumerable" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract VSPxAKU is ERC1155Supply, ReentrancyGuard, AccessControl, Ownable {
using Strings for uint256;
bytes32 public constant SUPPORT_ROLE = keccak256("SUPPORT");
mapping(uint256 => bool) public claimedTokenIds;
bool public saleActive;
string private _baseURIextended;
string public name = "VSP x AKU";
string public symbol = "VSPXAKU";
IERC721Enumerable public immutable baseContractAddress;
uint256 public immutable maxSupply;
uint256 private immutable _numberOfTypes;
constructor(address contractAddress, uint256 types) ERC1155("") {
require(<FILL_ME>)
// set immutable variables
baseContractAddress = IERC721Enumerable(contractAddress);
maxSupply = IERC721Enumerable(contractAddress).totalSupply();
_numberOfTypes = types;
// setup roles
_setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
_setupRole(SUPPORT_ROLE, msg.sender);
}
/**
* @dev checks to see if amount of tokens to be minted would exceed the maximum supply allowed
*/
modifier supplyAvailable(uint256[] calldata numberOfTokens) {
}
/**
* @dev checks to see whether saleActive is true
*/
modifier isPublicSaleActive() {
}
////////////////
// admin
////////////////
/**
* @dev allows public sale minting
*/
function setSaleActive(bool state) external onlyRole(SUPPORT_ROLE) {
}
////////////////
// tokens
////////////////
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(AccessControl, ERC1155) returns (bool) {
}
/**
* @dev sets the base uri
*/
function setBaseURI(string memory baseURI_) external onlyRole(SUPPORT_ROLE) {
}
/**
* @dev See {IERC1155MetadataURI-uri}
*/
function uri(uint256 tokenId) public view virtual override returns (string memory) {
}
////////////////
// public
////////////////
/**
* @dev allow public minting
*/
function mint(uint256[] calldata numberOfTokens)
external
isPublicSaleActive
supplyAvailable(numberOfTokens)
nonReentrant
{
}
/**
* @dev returns the available number of tokens for an address
*/
function available(address from) external view returns (uint256) {
}
}
| IERC721Enumerable(contractAddress).supportsInterface(0x780e9d63),"Contract address does not support ERC721Enumerable" | 195,390 | IERC721Enumerable(contractAddress).supportsInterface(0x780e9d63) |
"Purchase would exceed max tokens" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract VSPxAKU is ERC1155Supply, ReentrancyGuard, AccessControl, Ownable {
using Strings for uint256;
bytes32 public constant SUPPORT_ROLE = keccak256("SUPPORT");
mapping(uint256 => bool) public claimedTokenIds;
bool public saleActive;
string private _baseURIextended;
string public name = "VSP x AKU";
string public symbol = "VSPXAKU";
IERC721Enumerable public immutable baseContractAddress;
uint256 public immutable maxSupply;
uint256 private immutable _numberOfTypes;
constructor(address contractAddress, uint256 types) ERC1155("") {
}
/**
* @dev checks to see if amount of tokens to be minted would exceed the maximum supply allowed
*/
modifier supplyAvailable(uint256[] calldata numberOfTokens) {
uint256 ts;
uint256 totalTokens;
for (uint256 index; index < numberOfTokens.length; index++) {
ts += totalSupply(index);
totalTokens += numberOfTokens[index];
}
require(<FILL_ME>)
_;
}
/**
* @dev checks to see whether saleActive is true
*/
modifier isPublicSaleActive() {
}
////////////////
// admin
////////////////
/**
* @dev allows public sale minting
*/
function setSaleActive(bool state) external onlyRole(SUPPORT_ROLE) {
}
////////////////
// tokens
////////////////
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(AccessControl, ERC1155) returns (bool) {
}
/**
* @dev sets the base uri
*/
function setBaseURI(string memory baseURI_) external onlyRole(SUPPORT_ROLE) {
}
/**
* @dev See {IERC1155MetadataURI-uri}
*/
function uri(uint256 tokenId) public view virtual override returns (string memory) {
}
////////////////
// public
////////////////
/**
* @dev allow public minting
*/
function mint(uint256[] calldata numberOfTokens)
external
isPublicSaleActive
supplyAvailable(numberOfTokens)
nonReentrant
{
}
/**
* @dev returns the available number of tokens for an address
*/
function available(address from) external view returns (uint256) {
}
}
| ts+totalTokens<=maxSupply,"Purchase would exceed max tokens" | 195,390 | ts+totalTokens<=maxSupply |
null | // SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.7;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
contract Ownable is Context {
address private _owner;
address private _previousOwner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function transferOwnership(address _newOwner) public virtual onlyOwner {
}
function renounceOwnership() public virtual onlyOwner {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
contract ISAN is Context, IERC20, Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private bots;
mapping (address => uint) private cooldown;
uint256 private time;
uint256 private _tax;
uint256 private constant _tTotal = 1 * 10**6 * 10**9;
uint256 private fee1=30;
uint256 private fee2=50;
uint256 private pc1=60;
uint256 private pc2=40;
string private constant _name = unicode"Ryu No Isan";
string private constant _symbol = unicode"RYUISAN";
uint256 private _maxTxAmount = _tTotal.div(50);
uint256 private _maxWalletAmount = _tTotal.div(50);
uint256 private minBalance = _tTotal.div(1000);
uint256 private aggregateLockTime;
uint8 private constant _decimals = 9;
address payable private _deployer;
address payable private _marketingWallet;
IUniswapV2Router02 private uniswapV2Router;
IERC20 private uniswapV2Pair;
address private uniswapV2PairAddress;
bool private tradingOpen;
bool private inSwap = false;
bool private swapEnabled = false;
modifier lockTheSwap {
}
constructor () payable {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public pure override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function getLockTime() public view returns(uint256) {
}
function changeMinBalance(uint256 newMin) external {
}
function changeFees(uint256 _buy, uint256 _sell) external {
}
function editPercentages(uint256 _pc1, uint256 _pc2) external {
require(_msgSender() == _deployer);
require(<FILL_ME>)
pc1 = _pc1;
pc2 = _pc2;
}
function removeLimits() external {
}
function excludeFromFees(address target) external {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
}
function addLiquidity(uint256 tokenAmount,uint256 ethAmount,address target) private lockTheSwap{
}
function sendETHToFee(uint256 amount) private {
}
function openTrading(uint256 buy, uint256 sell) external onlyOwner() {
}
function setBots(address[] memory bots_) public onlyOwner {
}
function delBot(address[] memory notbot) public onlyOwner {
}
function _transferStandard(address sender, address recipient, uint256 tAmount) private {
}
receive() external payable {}
function manualswap() external {
}
function manualsend() external {
}
function _getTValues(uint256 tAmount) private view returns (uint256, uint256) {
}
function recoverTokens(address tokenAddress) external {
}
function lockLiquidity(uint256 lockTime) external {
}
function extendLock(uint256 lockTime) external {
}
function unlock() external {
}
}
| _pc1+_pc2==100 | 195,506 | _pc1+_pc2==100 |
"This project cannot be minted through this contract" | /*
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWWWW+++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWWWW+++++++++++++++++++++++++++++
+++++++++++++++++++##++++++++++++++++##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWW WWWWWWWW+++++++++++++++++++++++++++
+++++++++++++++++++##++++++++++++++++##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWW WWWWWWWW+++++++++++++++++++++++++++
+++++++++++++++++++###++++++++++++++###+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWW WWWWWWWW+++++++++++++++++++++++++
+++++++++++++++++++###++++++++++++++###+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWW WWWWWWWW+++++++++++++++++++++++++
+++++++++++++++++++####++++++++++++####+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWWWWWWWWWWWW+++++++++++++++++++++++++
++++++++++++++++++#####++++++++++++####+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWWWWWWWWWWWW+++++++++++++++++++++++++
++++++++++++++++++######++++++++++#####*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++....................+++++++++++++++++++++++++
++++++++++++++++++######++++++++++######++++++++++++++++++++++++++++++++++++++++++++++++++++++++++....................+++++++++++++++++++++++++
++++++++++++++++++#######++++++++#######++++++++++++++++++++++++++++++++++++++++++++++++++++++++......::::......::::....+++++++++++++++++++++++
++++++++++++++++++##+####++++++++##+####++++++++++++++++++++++++++++++++++++++++++++++++++++++++......::::......::::....+++++++++++++++++++++++
++++++++++++++++++##+#####++++++###+####++++++++++++++++++++++++++++++++++++++++++++++++++++++++....::****::..::****....+++++++++++++++++++++++
+++++++++++++++++*##++####++++++##++####+########*++++++++++++++++++++++++++++++++++++++++++++++....::****::..::****....+++++++++++++++++++++++
+++++++++++++++++###++#####++++###+++###+############++++++++++++++++WW++WW+++++++++++++++++++....::::WW::::::::WW::......+++++++++++++++++++++
+++++++++++++++++###+++####++++##++++####++++++++####++++++++++++++++WW+#W++++++++++++++++++++....::::WW::::::::WW::......+++++++++++++++++++++
+++++++++++++++++##++++#####++###++#+####++++++++++##+++++++++++++++++WWWW++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
+++++++++++++++++##+++++####++##++##+####+++++++++++#+++++++++++++++++*WW+++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
+++++++++++++++++##+++++########+###+####+++++++++++#+++++++++++++++++WWW+++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
+++++++++++++++++##++++++######++###+####+++++++++++#+++++++++++++++++W*WW++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
++++++++++++++++###++++++######+####+####++++++++++++++++++++++++++++WW++W#+++++++++++++++++++......::::::::WW::::::......+++++++++++++++++++++
++++++++++++++++###+++++++####++####+####+++++++++++++++++++++++++++#W+++WW+++++++++++++++++++......::::::::WW::::::......+++++++++++++++++++++
++++++++++++++++###+++++++*###++####++####++++++++++++++++++++++++++++++++++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
++++++++++++++++###++++++++##+++####++####++++++++++++++++++++++++++++++++++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
++++++++++++++#######++++++++++#####+*#######+++++++++++++++++++++++++++++++++++++++++++++++++++....::::::WWWWWW::::....+++++++++++++++++++++++
+++++++++++++++++++++++++++++++*####++++++++++++#######+++++++++++++++++++++++++++++++++++++++++....::::::WWWWWW::::....+++++++++++++++++++++++
++++++++++++++++++++++++++++++++####+++++++++++++#####++++++++++++++++++++++++++++++++++++++++++......::::::::::::......+++++++++++++++++++++++
++++++++++++++++++++++++++++++++#####++++++++++++####*++++++++++++++++++++++++++++++++++++++++++......::::::::::::......+++++++++++++++++++++++
++++++++++++++++++++++++++++++++#####++++++++++++####*++++++++++++++++++++++++++++++++++++++++++++....::WW::::::WW....+++++++++++++++++++++++++
++++++++++++++++++++++++++++++++#####++++++++++++####+++++++++++++++++++++++++++++++++++++++++++++....::WW::::::WW....+++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++#####+++++++++++####+++++++++++++++++++++++++++++++++++++++++++++++WW::::WWWWWW+++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++#####++++++++++####+++++++++++++++++++++++++++++++++++++++++++++++WW::::WWWWWW+++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++######+++++++++####+++++++++++++++++++++++++++++++++++++++++++++++WW::::::WW+++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++######+++++++####+++++++++++++++++++++++++++++++++++++++++++++++WW::::::WW+++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++########+++#####+++++++++++++++++++++++++++++++++++++++++++++++WW::::::WW+++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++############++++++++++++++++++++++++++++++++++++++++++++++++WW::::::WW+++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*/
// Contract authored by August Rosedale (@augustfr)
// Originally writen for Mirage Gallery Curated drop with Claire Silver (@clairesilver12)
// https://miragegallery.ai
pragma solidity ^0.8.15;
interface curatedContract {
function projectIdToArtistAddress(uint256 _projectId) external view returns (address payable);
function projectIdToPricePerTokenInWei(uint256 _projectId) external view returns (uint256);
function projectIdToAdditionalPayee(uint256 _projectId) external view returns (address payable);
function projectIdToAdditionalPayeePercentage(uint256 _projectId) external view returns (uint256);
function mirageAddress() external view returns (address payable);
function miragePercentage() external view returns (uint256);
function mint(address _to, uint256 _projectId, address _by) external returns (uint256 tokenId);
function earlyMint(address _to, uint256 _projectId, address _by) external returns (uint256 _tokenId);
function balanceOf(address owner) external view returns (uint256);
}
interface membershipContracts {
function balanceOf(address owner, uint256 _id) external view returns (uint256);
}
contract mirageExclusiveMinter is Ownable {
curatedContract public mirageContract;
membershipContracts public membershipContract;
mapping(uint256 => bool) public includedProjectId;
mapping(uint256 => bool) public mintedID;
mapping(address => bool) public mintedWalletStandard;
mapping(address => bool) public mintedWalletSecondary;
mapping(address => intelAllotment) intelQuantity;
address private immutable adminSigner;
struct intelAllotment {
uint256 allotment;
}
struct Coupon {
bytes32 r;
bytes32 s;
uint8 v;
}
constructor(address _curatedAddress, address _membershipAddress, address _adminSigner) {
}
function purchase(uint256 _projectId) public payable {
require(<FILL_ME>)
require(msg.value >= mirageContract.projectIdToPricePerTokenInWei(_projectId), "Must send minimum value to mint!");
require(msg.sender == tx.origin, "Reverting, Method can only be called directly by user.");
_splitFundsETH(_projectId, 1);
mirageContract.mint(msg.sender, _projectId, msg.sender);
}
function toggleIncludedIds(uint256 _id) public onlyOwner {
}
function setIntelAllotment(address[] memory _addresses, uint256[] memory allotments) public onlyOwner {
}
function _isVerifiedCoupon(bytes32 digest, Coupon memory coupon) internal view returns (bool) {
}
function viewAllotment(address _address) public view returns (uint256) {
}
function sentientPurchase(uint256 _membershipId, uint256 _projectId) public payable {
}
function intelligentPurchase(uint256 _projectId, Coupon memory coupon) public payable {
}
function standardPresalePurchase(Coupon memory coupon, uint256 _projectId) public payable {
}
function secondaryPresalePurchase(Coupon memory coupon, uint256 _projectId) public payable {
}
function _splitFundsETH(uint256 _projectId, uint256 numberOfTokens) internal {
}
}
| includedProjectId[_projectId],"This project cannot be minted through this contract" | 195,548 | includedProjectId[_projectId] |
"No membership tokens in this wallet" | /*
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWWWW+++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWWWW+++++++++++++++++++++++++++++
+++++++++++++++++++##++++++++++++++++##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWW WWWWWWWW+++++++++++++++++++++++++++
+++++++++++++++++++##++++++++++++++++##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWW WWWWWWWW+++++++++++++++++++++++++++
+++++++++++++++++++###++++++++++++++###+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWW WWWWWWWW+++++++++++++++++++++++++
+++++++++++++++++++###++++++++++++++###+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWW WWWWWWWW+++++++++++++++++++++++++
+++++++++++++++++++####++++++++++++####+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWWWWWWWWWWWW+++++++++++++++++++++++++
++++++++++++++++++#####++++++++++++####+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWWWWWWWWWWWW+++++++++++++++++++++++++
++++++++++++++++++######++++++++++#####*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++....................+++++++++++++++++++++++++
++++++++++++++++++######++++++++++######++++++++++++++++++++++++++++++++++++++++++++++++++++++++++....................+++++++++++++++++++++++++
++++++++++++++++++#######++++++++#######++++++++++++++++++++++++++++++++++++++++++++++++++++++++......::::......::::....+++++++++++++++++++++++
++++++++++++++++++##+####++++++++##+####++++++++++++++++++++++++++++++++++++++++++++++++++++++++......::::......::::....+++++++++++++++++++++++
++++++++++++++++++##+#####++++++###+####++++++++++++++++++++++++++++++++++++++++++++++++++++++++....::****::..::****....+++++++++++++++++++++++
+++++++++++++++++*##++####++++++##++####+########*++++++++++++++++++++++++++++++++++++++++++++++....::****::..::****....+++++++++++++++++++++++
+++++++++++++++++###++#####++++###+++###+############++++++++++++++++WW++WW+++++++++++++++++++....::::WW::::::::WW::......+++++++++++++++++++++
+++++++++++++++++###+++####++++##++++####++++++++####++++++++++++++++WW+#W++++++++++++++++++++....::::WW::::::::WW::......+++++++++++++++++++++
+++++++++++++++++##++++#####++###++#+####++++++++++##+++++++++++++++++WWWW++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
+++++++++++++++++##+++++####++##++##+####+++++++++++#+++++++++++++++++*WW+++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
+++++++++++++++++##+++++########+###+####+++++++++++#+++++++++++++++++WWW+++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
+++++++++++++++++##++++++######++###+####+++++++++++#+++++++++++++++++W*WW++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
++++++++++++++++###++++++######+####+####++++++++++++++++++++++++++++WW++W#+++++++++++++++++++......::::::::WW::::::......+++++++++++++++++++++
++++++++++++++++###+++++++####++####+####+++++++++++++++++++++++++++#W+++WW+++++++++++++++++++......::::::::WW::::::......+++++++++++++++++++++
++++++++++++++++###+++++++*###++####++####++++++++++++++++++++++++++++++++++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
++++++++++++++++###++++++++##+++####++####++++++++++++++++++++++++++++++++++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
++++++++++++++#######++++++++++#####+*#######+++++++++++++++++++++++++++++++++++++++++++++++++++....::::::WWWWWW::::....+++++++++++++++++++++++
+++++++++++++++++++++++++++++++*####++++++++++++#######+++++++++++++++++++++++++++++++++++++++++....::::::WWWWWW::::....+++++++++++++++++++++++
++++++++++++++++++++++++++++++++####+++++++++++++#####++++++++++++++++++++++++++++++++++++++++++......::::::::::::......+++++++++++++++++++++++
++++++++++++++++++++++++++++++++#####++++++++++++####*++++++++++++++++++++++++++++++++++++++++++......::::::::::::......+++++++++++++++++++++++
++++++++++++++++++++++++++++++++#####++++++++++++####*++++++++++++++++++++++++++++++++++++++++++++....::WW::::::WW....+++++++++++++++++++++++++
++++++++++++++++++++++++++++++++#####++++++++++++####+++++++++++++++++++++++++++++++++++++++++++++....::WW::::::WW....+++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++#####+++++++++++####+++++++++++++++++++++++++++++++++++++++++++++++WW::::WWWWWW+++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++#####++++++++++####+++++++++++++++++++++++++++++++++++++++++++++++WW::::WWWWWW+++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++######+++++++++####+++++++++++++++++++++++++++++++++++++++++++++++WW::::::WW+++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++######+++++++####+++++++++++++++++++++++++++++++++++++++++++++++WW::::::WW+++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++########+++#####+++++++++++++++++++++++++++++++++++++++++++++++WW::::::WW+++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++############++++++++++++++++++++++++++++++++++++++++++++++++WW::::::WW+++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*/
// Contract authored by August Rosedale (@augustfr)
// Originally writen for Mirage Gallery Curated drop with Claire Silver (@clairesilver12)
// https://miragegallery.ai
pragma solidity ^0.8.15;
interface curatedContract {
function projectIdToArtistAddress(uint256 _projectId) external view returns (address payable);
function projectIdToPricePerTokenInWei(uint256 _projectId) external view returns (uint256);
function projectIdToAdditionalPayee(uint256 _projectId) external view returns (address payable);
function projectIdToAdditionalPayeePercentage(uint256 _projectId) external view returns (uint256);
function mirageAddress() external view returns (address payable);
function miragePercentage() external view returns (uint256);
function mint(address _to, uint256 _projectId, address _by) external returns (uint256 tokenId);
function earlyMint(address _to, uint256 _projectId, address _by) external returns (uint256 _tokenId);
function balanceOf(address owner) external view returns (uint256);
}
interface membershipContracts {
function balanceOf(address owner, uint256 _id) external view returns (uint256);
}
contract mirageExclusiveMinter is Ownable {
curatedContract public mirageContract;
membershipContracts public membershipContract;
mapping(uint256 => bool) public includedProjectId;
mapping(uint256 => bool) public mintedID;
mapping(address => bool) public mintedWalletStandard;
mapping(address => bool) public mintedWalletSecondary;
mapping(address => intelAllotment) intelQuantity;
address private immutable adminSigner;
struct intelAllotment {
uint256 allotment;
}
struct Coupon {
bytes32 r;
bytes32 s;
uint8 v;
}
constructor(address _curatedAddress, address _membershipAddress, address _adminSigner) {
}
function purchase(uint256 _projectId) public payable {
}
function toggleIncludedIds(uint256 _id) public onlyOwner {
}
function setIntelAllotment(address[] memory _addresses, uint256[] memory allotments) public onlyOwner {
}
function _isVerifiedCoupon(bytes32 digest, Coupon memory coupon) internal view returns (bool) {
}
function viewAllotment(address _address) public view returns (uint256) {
}
function sentientPurchase(uint256 _membershipId, uint256 _projectId) public payable {
require(_membershipId < 50, "Enter a valid Sentient membership ID (0-49)");
require(includedProjectId[_projectId], "This project cannot be minted through this contract");
require(<FILL_ME>)
require(msg.value >= mirageContract.projectIdToPricePerTokenInWei(_projectId), "Must send minimum value to mint!");
require(!mintedID[_membershipId], "Already minted");
mintedID[_membershipId] = true;
_splitFundsETH(_projectId, 1);
mirageContract.earlyMint(msg.sender, _projectId, msg.sender);
}
function intelligentPurchase(uint256 _projectId, Coupon memory coupon) public payable {
}
function standardPresalePurchase(Coupon memory coupon, uint256 _projectId) public payable {
}
function secondaryPresalePurchase(Coupon memory coupon, uint256 _projectId) public payable {
}
function _splitFundsETH(uint256 _projectId, uint256 numberOfTokens) internal {
}
}
| membershipContract.balanceOf(msg.sender,_membershipId)>0,"No membership tokens in this wallet" | 195,548 | membershipContract.balanceOf(msg.sender,_membershipId)>0 |
"Already minted" | /*
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWWWW+++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWWWW+++++++++++++++++++++++++++++
+++++++++++++++++++##++++++++++++++++##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWW WWWWWWWW+++++++++++++++++++++++++++
+++++++++++++++++++##++++++++++++++++##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWW WWWWWWWW+++++++++++++++++++++++++++
+++++++++++++++++++###++++++++++++++###+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWW WWWWWWWW+++++++++++++++++++++++++
+++++++++++++++++++###++++++++++++++###+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWW WWWWWWWW+++++++++++++++++++++++++
+++++++++++++++++++####++++++++++++####+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWWWWWWWWWWWW+++++++++++++++++++++++++
++++++++++++++++++#####++++++++++++####+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWWWWWWWWWWWW+++++++++++++++++++++++++
++++++++++++++++++######++++++++++#####*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++....................+++++++++++++++++++++++++
++++++++++++++++++######++++++++++######++++++++++++++++++++++++++++++++++++++++++++++++++++++++++....................+++++++++++++++++++++++++
++++++++++++++++++#######++++++++#######++++++++++++++++++++++++++++++++++++++++++++++++++++++++......::::......::::....+++++++++++++++++++++++
++++++++++++++++++##+####++++++++##+####++++++++++++++++++++++++++++++++++++++++++++++++++++++++......::::......::::....+++++++++++++++++++++++
++++++++++++++++++##+#####++++++###+####++++++++++++++++++++++++++++++++++++++++++++++++++++++++....::****::..::****....+++++++++++++++++++++++
+++++++++++++++++*##++####++++++##++####+########*++++++++++++++++++++++++++++++++++++++++++++++....::****::..::****....+++++++++++++++++++++++
+++++++++++++++++###++#####++++###+++###+############++++++++++++++++WW++WW+++++++++++++++++++....::::WW::::::::WW::......+++++++++++++++++++++
+++++++++++++++++###+++####++++##++++####++++++++####++++++++++++++++WW+#W++++++++++++++++++++....::::WW::::::::WW::......+++++++++++++++++++++
+++++++++++++++++##++++#####++###++#+####++++++++++##+++++++++++++++++WWWW++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
+++++++++++++++++##+++++####++##++##+####+++++++++++#+++++++++++++++++*WW+++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
+++++++++++++++++##+++++########+###+####+++++++++++#+++++++++++++++++WWW+++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
+++++++++++++++++##++++++######++###+####+++++++++++#+++++++++++++++++W*WW++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
++++++++++++++++###++++++######+####+####++++++++++++++++++++++++++++WW++W#+++++++++++++++++++......::::::::WW::::::......+++++++++++++++++++++
++++++++++++++++###+++++++####++####+####+++++++++++++++++++++++++++#W+++WW+++++++++++++++++++......::::::::WW::::::......+++++++++++++++++++++
++++++++++++++++###+++++++*###++####++####++++++++++++++++++++++++++++++++++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
++++++++++++++++###++++++++##+++####++####++++++++++++++++++++++++++++++++++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
++++++++++++++#######++++++++++#####+*#######+++++++++++++++++++++++++++++++++++++++++++++++++++....::::::WWWWWW::::....+++++++++++++++++++++++
+++++++++++++++++++++++++++++++*####++++++++++++#######+++++++++++++++++++++++++++++++++++++++++....::::::WWWWWW::::....+++++++++++++++++++++++
++++++++++++++++++++++++++++++++####+++++++++++++#####++++++++++++++++++++++++++++++++++++++++++......::::::::::::......+++++++++++++++++++++++
++++++++++++++++++++++++++++++++#####++++++++++++####*++++++++++++++++++++++++++++++++++++++++++......::::::::::::......+++++++++++++++++++++++
++++++++++++++++++++++++++++++++#####++++++++++++####*++++++++++++++++++++++++++++++++++++++++++++....::WW::::::WW....+++++++++++++++++++++++++
++++++++++++++++++++++++++++++++#####++++++++++++####+++++++++++++++++++++++++++++++++++++++++++++....::WW::::::WW....+++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++#####+++++++++++####+++++++++++++++++++++++++++++++++++++++++++++++WW::::WWWWWW+++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++#####++++++++++####+++++++++++++++++++++++++++++++++++++++++++++++WW::::WWWWWW+++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++######+++++++++####+++++++++++++++++++++++++++++++++++++++++++++++WW::::::WW+++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++######+++++++####+++++++++++++++++++++++++++++++++++++++++++++++WW::::::WW+++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++########+++#####+++++++++++++++++++++++++++++++++++++++++++++++WW::::::WW+++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++############++++++++++++++++++++++++++++++++++++++++++++++++WW::::::WW+++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*/
// Contract authored by August Rosedale (@augustfr)
// Originally writen for Mirage Gallery Curated drop with Claire Silver (@clairesilver12)
// https://miragegallery.ai
pragma solidity ^0.8.15;
interface curatedContract {
function projectIdToArtistAddress(uint256 _projectId) external view returns (address payable);
function projectIdToPricePerTokenInWei(uint256 _projectId) external view returns (uint256);
function projectIdToAdditionalPayee(uint256 _projectId) external view returns (address payable);
function projectIdToAdditionalPayeePercentage(uint256 _projectId) external view returns (uint256);
function mirageAddress() external view returns (address payable);
function miragePercentage() external view returns (uint256);
function mint(address _to, uint256 _projectId, address _by) external returns (uint256 tokenId);
function earlyMint(address _to, uint256 _projectId, address _by) external returns (uint256 _tokenId);
function balanceOf(address owner) external view returns (uint256);
}
interface membershipContracts {
function balanceOf(address owner, uint256 _id) external view returns (uint256);
}
contract mirageExclusiveMinter is Ownable {
curatedContract public mirageContract;
membershipContracts public membershipContract;
mapping(uint256 => bool) public includedProjectId;
mapping(uint256 => bool) public mintedID;
mapping(address => bool) public mintedWalletStandard;
mapping(address => bool) public mintedWalletSecondary;
mapping(address => intelAllotment) intelQuantity;
address private immutable adminSigner;
struct intelAllotment {
uint256 allotment;
}
struct Coupon {
bytes32 r;
bytes32 s;
uint8 v;
}
constructor(address _curatedAddress, address _membershipAddress, address _adminSigner) {
}
function purchase(uint256 _projectId) public payable {
}
function toggleIncludedIds(uint256 _id) public onlyOwner {
}
function setIntelAllotment(address[] memory _addresses, uint256[] memory allotments) public onlyOwner {
}
function _isVerifiedCoupon(bytes32 digest, Coupon memory coupon) internal view returns (bool) {
}
function viewAllotment(address _address) public view returns (uint256) {
}
function sentientPurchase(uint256 _membershipId, uint256 _projectId) public payable {
require(_membershipId < 50, "Enter a valid Sentient membership ID (0-49)");
require(includedProjectId[_projectId], "This project cannot be minted through this contract");
require(membershipContract.balanceOf(msg.sender,_membershipId) > 0, "No membership tokens in this wallet");
require(msg.value >= mirageContract.projectIdToPricePerTokenInWei(_projectId), "Must send minimum value to mint!");
require(<FILL_ME>)
mintedID[_membershipId] = true;
_splitFundsETH(_projectId, 1);
mirageContract.earlyMint(msg.sender, _projectId, msg.sender);
}
function intelligentPurchase(uint256 _projectId, Coupon memory coupon) public payable {
}
function standardPresalePurchase(Coupon memory coupon, uint256 _projectId) public payable {
}
function secondaryPresalePurchase(Coupon memory coupon, uint256 _projectId) public payable {
}
function _splitFundsETH(uint256 _projectId, uint256 numberOfTokens) internal {
}
}
| !mintedID[_membershipId],"Already minted" | 195,548 | !mintedID[_membershipId] |
"Invalid coupon" | /*
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWWWW+++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWWWW+++++++++++++++++++++++++++++
+++++++++++++++++++##++++++++++++++++##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWW WWWWWWWW+++++++++++++++++++++++++++
+++++++++++++++++++##++++++++++++++++##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWW WWWWWWWW+++++++++++++++++++++++++++
+++++++++++++++++++###++++++++++++++###+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWW WWWWWWWW+++++++++++++++++++++++++
+++++++++++++++++++###++++++++++++++###+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWW WWWWWWWW+++++++++++++++++++++++++
+++++++++++++++++++####++++++++++++####+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWWWWWWWWWWWW+++++++++++++++++++++++++
++++++++++++++++++#####++++++++++++####+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWWWWWWWWWWWW+++++++++++++++++++++++++
++++++++++++++++++######++++++++++#####*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++....................+++++++++++++++++++++++++
++++++++++++++++++######++++++++++######++++++++++++++++++++++++++++++++++++++++++++++++++++++++++....................+++++++++++++++++++++++++
++++++++++++++++++#######++++++++#######++++++++++++++++++++++++++++++++++++++++++++++++++++++++......::::......::::....+++++++++++++++++++++++
++++++++++++++++++##+####++++++++##+####++++++++++++++++++++++++++++++++++++++++++++++++++++++++......::::......::::....+++++++++++++++++++++++
++++++++++++++++++##+#####++++++###+####++++++++++++++++++++++++++++++++++++++++++++++++++++++++....::****::..::****....+++++++++++++++++++++++
+++++++++++++++++*##++####++++++##++####+########*++++++++++++++++++++++++++++++++++++++++++++++....::****::..::****....+++++++++++++++++++++++
+++++++++++++++++###++#####++++###+++###+############++++++++++++++++WW++WW+++++++++++++++++++....::::WW::::::::WW::......+++++++++++++++++++++
+++++++++++++++++###+++####++++##++++####++++++++####++++++++++++++++WW+#W++++++++++++++++++++....::::WW::::::::WW::......+++++++++++++++++++++
+++++++++++++++++##++++#####++###++#+####++++++++++##+++++++++++++++++WWWW++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
+++++++++++++++++##+++++####++##++##+####+++++++++++#+++++++++++++++++*WW+++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
+++++++++++++++++##+++++########+###+####+++++++++++#+++++++++++++++++WWW+++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
+++++++++++++++++##++++++######++###+####+++++++++++#+++++++++++++++++W*WW++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
++++++++++++++++###++++++######+####+####++++++++++++++++++++++++++++WW++W#+++++++++++++++++++......::::::::WW::::::......+++++++++++++++++++++
++++++++++++++++###+++++++####++####+####+++++++++++++++++++++++++++#W+++WW+++++++++++++++++++......::::::::WW::::::......+++++++++++++++++++++
++++++++++++++++###+++++++*###++####++####++++++++++++++++++++++++++++++++++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
++++++++++++++++###++++++++##+++####++####++++++++++++++++++++++++++++++++++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
++++++++++++++#######++++++++++#####+*#######+++++++++++++++++++++++++++++++++++++++++++++++++++....::::::WWWWWW::::....+++++++++++++++++++++++
+++++++++++++++++++++++++++++++*####++++++++++++#######+++++++++++++++++++++++++++++++++++++++++....::::::WWWWWW::::....+++++++++++++++++++++++
++++++++++++++++++++++++++++++++####+++++++++++++#####++++++++++++++++++++++++++++++++++++++++++......::::::::::::......+++++++++++++++++++++++
++++++++++++++++++++++++++++++++#####++++++++++++####*++++++++++++++++++++++++++++++++++++++++++......::::::::::::......+++++++++++++++++++++++
++++++++++++++++++++++++++++++++#####++++++++++++####*++++++++++++++++++++++++++++++++++++++++++++....::WW::::::WW....+++++++++++++++++++++++++
++++++++++++++++++++++++++++++++#####++++++++++++####+++++++++++++++++++++++++++++++++++++++++++++....::WW::::::WW....+++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++#####+++++++++++####+++++++++++++++++++++++++++++++++++++++++++++++WW::::WWWWWW+++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++#####++++++++++####+++++++++++++++++++++++++++++++++++++++++++++++WW::::WWWWWW+++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++######+++++++++####+++++++++++++++++++++++++++++++++++++++++++++++WW::::::WW+++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++######+++++++####+++++++++++++++++++++++++++++++++++++++++++++++WW::::::WW+++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++########+++#####+++++++++++++++++++++++++++++++++++++++++++++++WW::::::WW+++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++############++++++++++++++++++++++++++++++++++++++++++++++++WW::::::WW+++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*/
// Contract authored by August Rosedale (@augustfr)
// Originally writen for Mirage Gallery Curated drop with Claire Silver (@clairesilver12)
// https://miragegallery.ai
pragma solidity ^0.8.15;
interface curatedContract {
function projectIdToArtistAddress(uint256 _projectId) external view returns (address payable);
function projectIdToPricePerTokenInWei(uint256 _projectId) external view returns (uint256);
function projectIdToAdditionalPayee(uint256 _projectId) external view returns (address payable);
function projectIdToAdditionalPayeePercentage(uint256 _projectId) external view returns (uint256);
function mirageAddress() external view returns (address payable);
function miragePercentage() external view returns (uint256);
function mint(address _to, uint256 _projectId, address _by) external returns (uint256 tokenId);
function earlyMint(address _to, uint256 _projectId, address _by) external returns (uint256 _tokenId);
function balanceOf(address owner) external view returns (uint256);
}
interface membershipContracts {
function balanceOf(address owner, uint256 _id) external view returns (uint256);
}
contract mirageExclusiveMinter is Ownable {
curatedContract public mirageContract;
membershipContracts public membershipContract;
mapping(uint256 => bool) public includedProjectId;
mapping(uint256 => bool) public mintedID;
mapping(address => bool) public mintedWalletStandard;
mapping(address => bool) public mintedWalletSecondary;
mapping(address => intelAllotment) intelQuantity;
address private immutable adminSigner;
struct intelAllotment {
uint256 allotment;
}
struct Coupon {
bytes32 r;
bytes32 s;
uint8 v;
}
constructor(address _curatedAddress, address _membershipAddress, address _adminSigner) {
}
function purchase(uint256 _projectId) public payable {
}
function toggleIncludedIds(uint256 _id) public onlyOwner {
}
function setIntelAllotment(address[] memory _addresses, uint256[] memory allotments) public onlyOwner {
}
function _isVerifiedCoupon(bytes32 digest, Coupon memory coupon) internal view returns (bool) {
}
function viewAllotment(address _address) public view returns (uint256) {
}
function sentientPurchase(uint256 _membershipId, uint256 _projectId) public payable {
}
function intelligentPurchase(uint256 _projectId, Coupon memory coupon) public payable {
require(includedProjectId[_projectId], "This project cannot be minted through this contract");
require(msg.value >= mirageContract.projectIdToPricePerTokenInWei(_projectId), "Must send minimum value to mint!");
require(msg.sender == tx.origin, "Reverting, Method can only be called directly by user.");
uint256 allot = intelQuantity[msg.sender].allotment;
bytes32 digest = keccak256(abi.encode(msg.sender,"member"));
require(<FILL_ME>)
if (allot > 0) {
require(allot != 99, "Already minted total allotment");
uint256 updatedAllot = allot - 1;
intelQuantity[msg.sender].allotment = updatedAllot;
if (updatedAllot == 0) {
intelQuantity[msg.sender].allotment = 99;
}
} else if (allot == 0) {
intelQuantity[msg.sender].allotment = 99;
}
_splitFundsETH(_projectId, 1);
mirageContract.earlyMint(msg.sender, _projectId, msg.sender);
}
function standardPresalePurchase(Coupon memory coupon, uint256 _projectId) public payable {
}
function secondaryPresalePurchase(Coupon memory coupon, uint256 _projectId) public payable {
}
function _splitFundsETH(uint256 _projectId, uint256 numberOfTokens) internal {
}
}
| _isVerifiedCoupon(digest,coupon),"Invalid coupon" | 195,548 | _isVerifiedCoupon(digest,coupon) |
"Must send minimum value to mint!" | /*
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWWWW+++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWWWW+++++++++++++++++++++++++++++
+++++++++++++++++++##++++++++++++++++##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWW WWWWWWWW+++++++++++++++++++++++++++
+++++++++++++++++++##++++++++++++++++##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWW WWWWWWWW+++++++++++++++++++++++++++
+++++++++++++++++++###++++++++++++++###+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWW WWWWWWWW+++++++++++++++++++++++++
+++++++++++++++++++###++++++++++++++###+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWW WWWWWWWW+++++++++++++++++++++++++
+++++++++++++++++++####++++++++++++####+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWWWWWWWWWWWW+++++++++++++++++++++++++
++++++++++++++++++#####++++++++++++####+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWWWWWWWWWWWW+++++++++++++++++++++++++
++++++++++++++++++######++++++++++#####*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++....................+++++++++++++++++++++++++
++++++++++++++++++######++++++++++######++++++++++++++++++++++++++++++++++++++++++++++++++++++++++....................+++++++++++++++++++++++++
++++++++++++++++++#######++++++++#######++++++++++++++++++++++++++++++++++++++++++++++++++++++++......::::......::::....+++++++++++++++++++++++
++++++++++++++++++##+####++++++++##+####++++++++++++++++++++++++++++++++++++++++++++++++++++++++......::::......::::....+++++++++++++++++++++++
++++++++++++++++++##+#####++++++###+####++++++++++++++++++++++++++++++++++++++++++++++++++++++++....::****::..::****....+++++++++++++++++++++++
+++++++++++++++++*##++####++++++##++####+########*++++++++++++++++++++++++++++++++++++++++++++++....::****::..::****....+++++++++++++++++++++++
+++++++++++++++++###++#####++++###+++###+############++++++++++++++++WW++WW+++++++++++++++++++....::::WW::::::::WW::......+++++++++++++++++++++
+++++++++++++++++###+++####++++##++++####++++++++####++++++++++++++++WW+#W++++++++++++++++++++....::::WW::::::::WW::......+++++++++++++++++++++
+++++++++++++++++##++++#####++###++#+####++++++++++##+++++++++++++++++WWWW++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
+++++++++++++++++##+++++####++##++##+####+++++++++++#+++++++++++++++++*WW+++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
+++++++++++++++++##+++++########+###+####+++++++++++#+++++++++++++++++WWW+++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
+++++++++++++++++##++++++######++###+####+++++++++++#+++++++++++++++++W*WW++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
++++++++++++++++###++++++######+####+####++++++++++++++++++++++++++++WW++W#+++++++++++++++++++......::::::::WW::::::......+++++++++++++++++++++
++++++++++++++++###+++++++####++####+####+++++++++++++++++++++++++++#W+++WW+++++++++++++++++++......::::::::WW::::::......+++++++++++++++++++++
++++++++++++++++###+++++++*###++####++####++++++++++++++++++++++++++++++++++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
++++++++++++++++###++++++++##+++####++####++++++++++++++++++++++++++++++++++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
++++++++++++++#######++++++++++#####+*#######+++++++++++++++++++++++++++++++++++++++++++++++++++....::::::WWWWWW::::....+++++++++++++++++++++++
+++++++++++++++++++++++++++++++*####++++++++++++#######+++++++++++++++++++++++++++++++++++++++++....::::::WWWWWW::::....+++++++++++++++++++++++
++++++++++++++++++++++++++++++++####+++++++++++++#####++++++++++++++++++++++++++++++++++++++++++......::::::::::::......+++++++++++++++++++++++
++++++++++++++++++++++++++++++++#####++++++++++++####*++++++++++++++++++++++++++++++++++++++++++......::::::::::::......+++++++++++++++++++++++
++++++++++++++++++++++++++++++++#####++++++++++++####*++++++++++++++++++++++++++++++++++++++++++++....::WW::::::WW....+++++++++++++++++++++++++
++++++++++++++++++++++++++++++++#####++++++++++++####+++++++++++++++++++++++++++++++++++++++++++++....::WW::::::WW....+++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++#####+++++++++++####+++++++++++++++++++++++++++++++++++++++++++++++WW::::WWWWWW+++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++#####++++++++++####+++++++++++++++++++++++++++++++++++++++++++++++WW::::WWWWWW+++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++######+++++++++####+++++++++++++++++++++++++++++++++++++++++++++++WW::::::WW+++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++######+++++++####+++++++++++++++++++++++++++++++++++++++++++++++WW::::::WW+++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++########+++#####+++++++++++++++++++++++++++++++++++++++++++++++WW::::::WW+++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++############++++++++++++++++++++++++++++++++++++++++++++++++WW::::::WW+++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*/
// Contract authored by August Rosedale (@augustfr)
// Originally writen for Mirage Gallery Curated drop with Claire Silver (@clairesilver12)
// https://miragegallery.ai
pragma solidity ^0.8.15;
interface curatedContract {
function projectIdToArtistAddress(uint256 _projectId) external view returns (address payable);
function projectIdToPricePerTokenInWei(uint256 _projectId) external view returns (uint256);
function projectIdToAdditionalPayee(uint256 _projectId) external view returns (address payable);
function projectIdToAdditionalPayeePercentage(uint256 _projectId) external view returns (uint256);
function mirageAddress() external view returns (address payable);
function miragePercentage() external view returns (uint256);
function mint(address _to, uint256 _projectId, address _by) external returns (uint256 tokenId);
function earlyMint(address _to, uint256 _projectId, address _by) external returns (uint256 _tokenId);
function balanceOf(address owner) external view returns (uint256);
}
interface membershipContracts {
function balanceOf(address owner, uint256 _id) external view returns (uint256);
}
contract mirageExclusiveMinter is Ownable {
curatedContract public mirageContract;
membershipContracts public membershipContract;
mapping(uint256 => bool) public includedProjectId;
mapping(uint256 => bool) public mintedID;
mapping(address => bool) public mintedWalletStandard;
mapping(address => bool) public mintedWalletSecondary;
mapping(address => intelAllotment) intelQuantity;
address private immutable adminSigner;
struct intelAllotment {
uint256 allotment;
}
struct Coupon {
bytes32 r;
bytes32 s;
uint8 v;
}
constructor(address _curatedAddress, address _membershipAddress, address _adminSigner) {
}
function purchase(uint256 _projectId) public payable {
}
function toggleIncludedIds(uint256 _id) public onlyOwner {
}
function setIntelAllotment(address[] memory _addresses, uint256[] memory allotments) public onlyOwner {
}
function _isVerifiedCoupon(bytes32 digest, Coupon memory coupon) internal view returns (bool) {
}
function viewAllotment(address _address) public view returns (uint256) {
}
function sentientPurchase(uint256 _membershipId, uint256 _projectId) public payable {
}
function intelligentPurchase(uint256 _projectId, Coupon memory coupon) public payable {
}
function standardPresalePurchase(Coupon memory coupon, uint256 _projectId) public payable {
require(<FILL_ME>)
require(includedProjectId[_projectId], "This project cannot be minted through this contract");
require(!mintedWalletStandard[msg.sender], "Already minted");
require(msg.sender == tx.origin, "Reverting, Method can only be called directly by user.");
bytes32 digest = keccak256(abi.encode(msg.sender,"standard"));
require(_isVerifiedCoupon(digest, coupon), "Invalid coupon");
_splitFundsETH(_projectId, 1);
mintedWalletStandard[msg.sender] = true;
mirageContract.earlyMint(msg.sender, _projectId, msg.sender);
}
function secondaryPresalePurchase(Coupon memory coupon, uint256 _projectId) public payable {
}
function _splitFundsETH(uint256 _projectId, uint256 numberOfTokens) internal {
}
}
| msg.value>=(mirageContract.projectIdToPricePerTokenInWei(_projectId)),"Must send minimum value to mint!" | 195,548 | msg.value>=(mirageContract.projectIdToPricePerTokenInWei(_projectId)) |
"Already minted" | /*
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWWWW+++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWWWW+++++++++++++++++++++++++++++
+++++++++++++++++++##++++++++++++++++##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWW WWWWWWWW+++++++++++++++++++++++++++
+++++++++++++++++++##++++++++++++++++##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWW WWWWWWWW+++++++++++++++++++++++++++
+++++++++++++++++++###++++++++++++++###+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWW WWWWWWWW+++++++++++++++++++++++++
+++++++++++++++++++###++++++++++++++###+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWW WWWWWWWW+++++++++++++++++++++++++
+++++++++++++++++++####++++++++++++####+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWWWWWWWWWWWW+++++++++++++++++++++++++
++++++++++++++++++#####++++++++++++####+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWWWWWWWWWWWW+++++++++++++++++++++++++
++++++++++++++++++######++++++++++#####*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++....................+++++++++++++++++++++++++
++++++++++++++++++######++++++++++######++++++++++++++++++++++++++++++++++++++++++++++++++++++++++....................+++++++++++++++++++++++++
++++++++++++++++++#######++++++++#######++++++++++++++++++++++++++++++++++++++++++++++++++++++++......::::......::::....+++++++++++++++++++++++
++++++++++++++++++##+####++++++++##+####++++++++++++++++++++++++++++++++++++++++++++++++++++++++......::::......::::....+++++++++++++++++++++++
++++++++++++++++++##+#####++++++###+####++++++++++++++++++++++++++++++++++++++++++++++++++++++++....::****::..::****....+++++++++++++++++++++++
+++++++++++++++++*##++####++++++##++####+########*++++++++++++++++++++++++++++++++++++++++++++++....::****::..::****....+++++++++++++++++++++++
+++++++++++++++++###++#####++++###+++###+############++++++++++++++++WW++WW+++++++++++++++++++....::::WW::::::::WW::......+++++++++++++++++++++
+++++++++++++++++###+++####++++##++++####++++++++####++++++++++++++++WW+#W++++++++++++++++++++....::::WW::::::::WW::......+++++++++++++++++++++
+++++++++++++++++##++++#####++###++#+####++++++++++##+++++++++++++++++WWWW++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
+++++++++++++++++##+++++####++##++##+####+++++++++++#+++++++++++++++++*WW+++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
+++++++++++++++++##+++++########+###+####+++++++++++#+++++++++++++++++WWW+++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
+++++++++++++++++##++++++######++###+####+++++++++++#+++++++++++++++++W*WW++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
++++++++++++++++###++++++######+####+####++++++++++++++++++++++++++++WW++W#+++++++++++++++++++......::::::::WW::::::......+++++++++++++++++++++
++++++++++++++++###+++++++####++####+####+++++++++++++++++++++++++++#W+++WW+++++++++++++++++++......::::::::WW::::::......+++++++++++++++++++++
++++++++++++++++###+++++++*###++####++####++++++++++++++++++++++++++++++++++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
++++++++++++++++###++++++++##+++####++####++++++++++++++++++++++++++++++++++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
++++++++++++++#######++++++++++#####+*#######+++++++++++++++++++++++++++++++++++++++++++++++++++....::::::WWWWWW::::....+++++++++++++++++++++++
+++++++++++++++++++++++++++++++*####++++++++++++#######+++++++++++++++++++++++++++++++++++++++++....::::::WWWWWW::::....+++++++++++++++++++++++
++++++++++++++++++++++++++++++++####+++++++++++++#####++++++++++++++++++++++++++++++++++++++++++......::::::::::::......+++++++++++++++++++++++
++++++++++++++++++++++++++++++++#####++++++++++++####*++++++++++++++++++++++++++++++++++++++++++......::::::::::::......+++++++++++++++++++++++
++++++++++++++++++++++++++++++++#####++++++++++++####*++++++++++++++++++++++++++++++++++++++++++++....::WW::::::WW....+++++++++++++++++++++++++
++++++++++++++++++++++++++++++++#####++++++++++++####+++++++++++++++++++++++++++++++++++++++++++++....::WW::::::WW....+++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++#####+++++++++++####+++++++++++++++++++++++++++++++++++++++++++++++WW::::WWWWWW+++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++#####++++++++++####+++++++++++++++++++++++++++++++++++++++++++++++WW::::WWWWWW+++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++######+++++++++####+++++++++++++++++++++++++++++++++++++++++++++++WW::::::WW+++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++######+++++++####+++++++++++++++++++++++++++++++++++++++++++++++WW::::::WW+++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++########+++#####+++++++++++++++++++++++++++++++++++++++++++++++WW::::::WW+++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++############++++++++++++++++++++++++++++++++++++++++++++++++WW::::::WW+++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*/
// Contract authored by August Rosedale (@augustfr)
// Originally writen for Mirage Gallery Curated drop with Claire Silver (@clairesilver12)
// https://miragegallery.ai
pragma solidity ^0.8.15;
interface curatedContract {
function projectIdToArtistAddress(uint256 _projectId) external view returns (address payable);
function projectIdToPricePerTokenInWei(uint256 _projectId) external view returns (uint256);
function projectIdToAdditionalPayee(uint256 _projectId) external view returns (address payable);
function projectIdToAdditionalPayeePercentage(uint256 _projectId) external view returns (uint256);
function mirageAddress() external view returns (address payable);
function miragePercentage() external view returns (uint256);
function mint(address _to, uint256 _projectId, address _by) external returns (uint256 tokenId);
function earlyMint(address _to, uint256 _projectId, address _by) external returns (uint256 _tokenId);
function balanceOf(address owner) external view returns (uint256);
}
interface membershipContracts {
function balanceOf(address owner, uint256 _id) external view returns (uint256);
}
contract mirageExclusiveMinter is Ownable {
curatedContract public mirageContract;
membershipContracts public membershipContract;
mapping(uint256 => bool) public includedProjectId;
mapping(uint256 => bool) public mintedID;
mapping(address => bool) public mintedWalletStandard;
mapping(address => bool) public mintedWalletSecondary;
mapping(address => intelAllotment) intelQuantity;
address private immutable adminSigner;
struct intelAllotment {
uint256 allotment;
}
struct Coupon {
bytes32 r;
bytes32 s;
uint8 v;
}
constructor(address _curatedAddress, address _membershipAddress, address _adminSigner) {
}
function purchase(uint256 _projectId) public payable {
}
function toggleIncludedIds(uint256 _id) public onlyOwner {
}
function setIntelAllotment(address[] memory _addresses, uint256[] memory allotments) public onlyOwner {
}
function _isVerifiedCoupon(bytes32 digest, Coupon memory coupon) internal view returns (bool) {
}
function viewAllotment(address _address) public view returns (uint256) {
}
function sentientPurchase(uint256 _membershipId, uint256 _projectId) public payable {
}
function intelligentPurchase(uint256 _projectId, Coupon memory coupon) public payable {
}
function standardPresalePurchase(Coupon memory coupon, uint256 _projectId) public payable {
require(msg.value >= (mirageContract.projectIdToPricePerTokenInWei(_projectId)), "Must send minimum value to mint!");
require(includedProjectId[_projectId], "This project cannot be minted through this contract");
require(<FILL_ME>)
require(msg.sender == tx.origin, "Reverting, Method can only be called directly by user.");
bytes32 digest = keccak256(abi.encode(msg.sender,"standard"));
require(_isVerifiedCoupon(digest, coupon), "Invalid coupon");
_splitFundsETH(_projectId, 1);
mintedWalletStandard[msg.sender] = true;
mirageContract.earlyMint(msg.sender, _projectId, msg.sender);
}
function secondaryPresalePurchase(Coupon memory coupon, uint256 _projectId) public payable {
}
function _splitFundsETH(uint256 _projectId, uint256 numberOfTokens) internal {
}
}
| !mintedWalletStandard[msg.sender],"Already minted" | 195,548 | !mintedWalletStandard[msg.sender] |
"Already minted" | /*
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWWWW+++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWWWW+++++++++++++++++++++++++++++
+++++++++++++++++++##++++++++++++++++##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWW WWWWWWWW+++++++++++++++++++++++++++
+++++++++++++++++++##++++++++++++++++##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWW WWWWWWWW+++++++++++++++++++++++++++
+++++++++++++++++++###++++++++++++++###+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWW WWWWWWWW+++++++++++++++++++++++++
+++++++++++++++++++###++++++++++++++###+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWW WWWWWWWW+++++++++++++++++++++++++
+++++++++++++++++++####++++++++++++####+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWWWWWWWWWWWW+++++++++++++++++++++++++
++++++++++++++++++#####++++++++++++####+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++WWWWWWWWWWWWWWWWWWWW+++++++++++++++++++++++++
++++++++++++++++++######++++++++++#####*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++....................+++++++++++++++++++++++++
++++++++++++++++++######++++++++++######++++++++++++++++++++++++++++++++++++++++++++++++++++++++++....................+++++++++++++++++++++++++
++++++++++++++++++#######++++++++#######++++++++++++++++++++++++++++++++++++++++++++++++++++++++......::::......::::....+++++++++++++++++++++++
++++++++++++++++++##+####++++++++##+####++++++++++++++++++++++++++++++++++++++++++++++++++++++++......::::......::::....+++++++++++++++++++++++
++++++++++++++++++##+#####++++++###+####++++++++++++++++++++++++++++++++++++++++++++++++++++++++....::****::..::****....+++++++++++++++++++++++
+++++++++++++++++*##++####++++++##++####+########*++++++++++++++++++++++++++++++++++++++++++++++....::****::..::****....+++++++++++++++++++++++
+++++++++++++++++###++#####++++###+++###+############++++++++++++++++WW++WW+++++++++++++++++++....::::WW::::::::WW::......+++++++++++++++++++++
+++++++++++++++++###+++####++++##++++####++++++++####++++++++++++++++WW+#W++++++++++++++++++++....::::WW::::::::WW::......+++++++++++++++++++++
+++++++++++++++++##++++#####++###++#+####++++++++++##+++++++++++++++++WWWW++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
+++++++++++++++++##+++++####++##++##+####+++++++++++#+++++++++++++++++*WW+++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
+++++++++++++++++##+++++########+###+####+++++++++++#+++++++++++++++++WWW+++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
+++++++++++++++++##++++++######++###+####+++++++++++#+++++++++++++++++W*WW++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
++++++++++++++++###++++++######+####+####++++++++++++++++++++++++++++WW++W#+++++++++++++++++++......::::::::WW::::::......+++++++++++++++++++++
++++++++++++++++###+++++++####++####+####+++++++++++++++++++++++++++#W+++WW+++++++++++++++++++......::::::::WW::::::......+++++++++++++++++++++
++++++++++++++++###+++++++*###++####++####++++++++++++++++++++++++++++++++++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
++++++++++++++++###++++++++##+++####++####++++++++++++++++++++++++++++++++++++++++++++++++++++......::::::::::::::::......+++++++++++++++++++++
++++++++++++++#######++++++++++#####+*#######+++++++++++++++++++++++++++++++++++++++++++++++++++....::::::WWWWWW::::....+++++++++++++++++++++++
+++++++++++++++++++++++++++++++*####++++++++++++#######+++++++++++++++++++++++++++++++++++++++++....::::::WWWWWW::::....+++++++++++++++++++++++
++++++++++++++++++++++++++++++++####+++++++++++++#####++++++++++++++++++++++++++++++++++++++++++......::::::::::::......+++++++++++++++++++++++
++++++++++++++++++++++++++++++++#####++++++++++++####*++++++++++++++++++++++++++++++++++++++++++......::::::::::::......+++++++++++++++++++++++
++++++++++++++++++++++++++++++++#####++++++++++++####*++++++++++++++++++++++++++++++++++++++++++++....::WW::::::WW....+++++++++++++++++++++++++
++++++++++++++++++++++++++++++++#####++++++++++++####+++++++++++++++++++++++++++++++++++++++++++++....::WW::::::WW....+++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++#####+++++++++++####+++++++++++++++++++++++++++++++++++++++++++++++WW::::WWWWWW+++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++#####++++++++++####+++++++++++++++++++++++++++++++++++++++++++++++WW::::WWWWWW+++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++######+++++++++####+++++++++++++++++++++++++++++++++++++++++++++++WW::::::WW+++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++######+++++++####+++++++++++++++++++++++++++++++++++++++++++++++WW::::::WW+++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++########+++#####+++++++++++++++++++++++++++++++++++++++++++++++WW::::::WW+++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++############++++++++++++++++++++++++++++++++++++++++++++++++WW::::::WW+++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*/
// Contract authored by August Rosedale (@augustfr)
// Originally writen for Mirage Gallery Curated drop with Claire Silver (@clairesilver12)
// https://miragegallery.ai
pragma solidity ^0.8.15;
interface curatedContract {
function projectIdToArtistAddress(uint256 _projectId) external view returns (address payable);
function projectIdToPricePerTokenInWei(uint256 _projectId) external view returns (uint256);
function projectIdToAdditionalPayee(uint256 _projectId) external view returns (address payable);
function projectIdToAdditionalPayeePercentage(uint256 _projectId) external view returns (uint256);
function mirageAddress() external view returns (address payable);
function miragePercentage() external view returns (uint256);
function mint(address _to, uint256 _projectId, address _by) external returns (uint256 tokenId);
function earlyMint(address _to, uint256 _projectId, address _by) external returns (uint256 _tokenId);
function balanceOf(address owner) external view returns (uint256);
}
interface membershipContracts {
function balanceOf(address owner, uint256 _id) external view returns (uint256);
}
contract mirageExclusiveMinter is Ownable {
curatedContract public mirageContract;
membershipContracts public membershipContract;
mapping(uint256 => bool) public includedProjectId;
mapping(uint256 => bool) public mintedID;
mapping(address => bool) public mintedWalletStandard;
mapping(address => bool) public mintedWalletSecondary;
mapping(address => intelAllotment) intelQuantity;
address private immutable adminSigner;
struct intelAllotment {
uint256 allotment;
}
struct Coupon {
bytes32 r;
bytes32 s;
uint8 v;
}
constructor(address _curatedAddress, address _membershipAddress, address _adminSigner) {
}
function purchase(uint256 _projectId) public payable {
}
function toggleIncludedIds(uint256 _id) public onlyOwner {
}
function setIntelAllotment(address[] memory _addresses, uint256[] memory allotments) public onlyOwner {
}
function _isVerifiedCoupon(bytes32 digest, Coupon memory coupon) internal view returns (bool) {
}
function viewAllotment(address _address) public view returns (uint256) {
}
function sentientPurchase(uint256 _membershipId, uint256 _projectId) public payable {
}
function intelligentPurchase(uint256 _projectId, Coupon memory coupon) public payable {
}
function standardPresalePurchase(Coupon memory coupon, uint256 _projectId) public payable {
}
function secondaryPresalePurchase(Coupon memory coupon, uint256 _projectId) public payable {
require(msg.value >= (mirageContract.projectIdToPricePerTokenInWei(_projectId)), "Must send minimum value to mint!");
require(includedProjectId[_projectId], "This project cannot be minted through this contract");
require(<FILL_ME>)
require(msg.sender == tx.origin, "Reverting, Method can only be called directly by user.");
bytes32 digest = keccak256(abi.encode(msg.sender,"secondary"));
require(_isVerifiedCoupon(digest, coupon), "Invalid coupon");
_splitFundsETH(_projectId, 1);
mintedWalletSecondary[msg.sender] = true;
mirageContract.earlyMint(msg.sender, _projectId, msg.sender);
}
function _splitFundsETH(uint256 _projectId, uint256 numberOfTokens) internal {
}
}
| !mintedWalletSecondary[msg.sender],"Already minted" | 195,548 | !mintedWalletSecondary[msg.sender] |
"Not authorized to trade yet" | //SPDX-License-Identifier: MIT
//Official contract for https://shubitoken.com
pragma solidity ^0.8.9;
interface ERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address _owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
interface Oracle {
function commit(address sender, address recipient, uint256 amount) external;
function isWhitelisted(address sender, address recipient) external view returns(bool);
function getMaxTx(address _sender) external view returns(uint256);
function getSellTax(address _sender) external view returns(uint256);
}
abstract contract Ownable {
address internal owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor(address _owner) {
}
modifier onlyOwner() {
}
function isOwner(address account) public view returns (bool) {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
interface IDEXFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
function getPair(address tokenA, address tokenB) external view returns (address pair);
}
interface IDEXRouter {
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;
}
contract ShubiToken is ERC20, Ownable {
// Events
event SetMaxWallet(uint256 maxWalletToken);
event SetFees(uint256 DevFee);
event SetSwapBackSettings(bool enabled, uint256 swapThreshold);
event SetIsFeeExempt(address holder, bool enabled);
event SetIsTxLimitExempt(address holder, bool enabled);
event SetFeeReceiver(address DevWallet);
event StuckBalanceSent(uint256 amountETH, address recipient);
// Mappings
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) _allowances;
mapping (address => bool) public isFeeExempt;
mapping (address => bool) public isTxLimitExempt;
// Basic Contract Info
string constant _name = "Shubi";
string constant _symbol = "SHUBI";
uint8 constant _decimals = 18;
uint256 _totalSupply = 1000000000 * (10 ** _decimals);
// Max wallet
uint256 public _maxWalletSize = (_totalSupply * 50) / 10000;
uint256 public _maxTxSize = (_totalSupply * 50) / 10000;
// Fee receiver
uint256 public DevFeeBuy = 10;
uint256 public MarketingFeeBuy = 10;
uint256 public LiquidityFeeBuy = 20;
uint256 public DevFeeSell = 10;
uint256 public MarketingFeeSell = 10;
uint256 public LiquidityFeeSell = 20;
uint256 public TotalBase = DevFeeBuy + DevFeeSell + MarketingFeeBuy + MarketingFeeSell + LiquidityFeeBuy + LiquidityFeeSell;
// Fee receiver & Dead Wallet
address public DevWallet;
address public MarketingWallet = 0xe0441Cae777Cba5CEC0E1Ce716e1eaF8062f2C8D;
address constant private DEAD = 0x000000000000000000000000000000000000dEaD;
// Router
IDEXRouter public router;
address public pair;
address public oracle;
bool public swapEnabled = true;
uint256 public swapThreshold = _totalSupply / 10000 * 3; // 0.3%
bool public isTradingEnabled = false;
address public tradingEnablerRole;
uint256 public tradingTimestamp;
bool inSwap;
modifier swapping() { }
constructor(address _oracle) Ownable(msg.sender) {
}
receive() external payable { }
// Basic Internal Functions
function totalSupply() external view override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external pure override returns (string memory) { }
function name() external pure override returns (string memory) { }
function getOwner() external view override returns (address) { }
function balanceOf(address account) public view override returns (uint256) { }
function allowance(address holder, address spender) external view override returns (uint256) { }
function approve(address spender, uint256 amount) public override returns (bool) {
}
function approveMax(address spender) external 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 getPair() public onlyOwner {
}
function setOracle(address _oracle) public onlyOwner {
}
function renounceTradingEnablerRole() public {
}
function setIsTradingEnabled(bool _isTradingEnabled) public {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
if(inSwap){ return _basicTransfer(sender, recipient, amount);}
require(<FILL_ME>)
// Checks max transaction limit
if (sender != owner && sender != MarketingWallet && recipient != owner && recipient != DEAD) {
if (recipient == pair) {
require(amount <= (Oracle(oracle).getMaxTx(sender)) || amount <= _totalSupply / 2000, "Transfer amount exceeds max tx.");}
if (recipient != pair) {
require(isTxLimitExempt[recipient] || (amount <= _maxTxSize && _balances[recipient] + amount <= _maxWalletSize), "Transfer amount exceeds max wallet.");}
}
//Exchange tokens
if(shouldSwapBack()){swapBack();}
_balances[sender] = _balances[sender] - amount;
//Check if should Take Fee
uint256 amountReceived = (!shouldTakeFee(sender) || !shouldTakeFee(recipient)) ? amount : takeFee(sender, recipient, amount);
_balances[recipient] = _balances[recipient] + (amountReceived);
Oracle(oracle).commit(sender, recipient, amount);
emit Transfer(sender, recipient, amountReceived);
return true;
}
function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) {
}
// Internal Functions
function shouldTakeFee(address sender) internal view returns (bool) {
}
function takeFee(address sender, address recipient, uint256 amount) internal returns (uint256) {
}
function shouldSwapBack() internal view returns (bool) {
}
function addLiquidity(uint256 _tokenBalance, uint256 _ETHBalance) private {
}
function swapBack() internal swapping {
}
// External Functions
function setMaxWalletAndTx(uint256 _maxWalletSize_, uint256 _maxTxSize_) external onlyOwner {
}
function setIsFeeExempt(address holder, bool exempt) external onlyOwner {
}
function setIsTxLimitExempt(address holder, bool exempt) external onlyOwner {
}
function setFees(uint256 _DevFeeBuy, uint256 _MarketingFeeBuy, uint256 _LiquidityFeeBuy,
uint256 _DevFeeSell, uint256 _MarketingFeeSell, uint256 _LiquidityFeeSell) external onlyOwner {
}
function setFeeReceiver(address _DevWallet, address _MarketingWallet) external onlyOwner {
}
function setSwapBackSettings(bool _enabled, uint256 _amount) external onlyOwner {
}
function initSwapBack() public onlyOwner {
}
function whatIsMySellTax(address _holder) public view returns(uint256) {
}
function howMuchCanISell(address _holder) public view returns(uint256) {
}
// Stuck Balance Function
function ClearStuckBalance() external onlyOwner {
}
function withdrawToken(address _token) public onlyOwner {
}
function getSelfAddress() public view returns(address) {
}
}
| isFeeExempt[sender]||isFeeExempt[recipient]||isTradingEnabled&&(Oracle(oracle).isWhitelisted(sender,recipient)||block.timestamp>=tradingTimestamp+3minutes),"Not authorized to trade yet" | 195,635 | isFeeExempt[sender]||isFeeExempt[recipient]||isTradingEnabled&&(Oracle(oracle).isWhitelisted(sender,recipient)||block.timestamp>=tradingTimestamp+3minutes) |
"Transfer amount exceeds max tx." | //SPDX-License-Identifier: MIT
//Official contract for https://shubitoken.com
pragma solidity ^0.8.9;
interface ERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address _owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
interface Oracle {
function commit(address sender, address recipient, uint256 amount) external;
function isWhitelisted(address sender, address recipient) external view returns(bool);
function getMaxTx(address _sender) external view returns(uint256);
function getSellTax(address _sender) external view returns(uint256);
}
abstract contract Ownable {
address internal owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor(address _owner) {
}
modifier onlyOwner() {
}
function isOwner(address account) public view returns (bool) {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
interface IDEXFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
function getPair(address tokenA, address tokenB) external view returns (address pair);
}
interface IDEXRouter {
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;
}
contract ShubiToken is ERC20, Ownable {
// Events
event SetMaxWallet(uint256 maxWalletToken);
event SetFees(uint256 DevFee);
event SetSwapBackSettings(bool enabled, uint256 swapThreshold);
event SetIsFeeExempt(address holder, bool enabled);
event SetIsTxLimitExempt(address holder, bool enabled);
event SetFeeReceiver(address DevWallet);
event StuckBalanceSent(uint256 amountETH, address recipient);
// Mappings
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) _allowances;
mapping (address => bool) public isFeeExempt;
mapping (address => bool) public isTxLimitExempt;
// Basic Contract Info
string constant _name = "Shubi";
string constant _symbol = "SHUBI";
uint8 constant _decimals = 18;
uint256 _totalSupply = 1000000000 * (10 ** _decimals);
// Max wallet
uint256 public _maxWalletSize = (_totalSupply * 50) / 10000;
uint256 public _maxTxSize = (_totalSupply * 50) / 10000;
// Fee receiver
uint256 public DevFeeBuy = 10;
uint256 public MarketingFeeBuy = 10;
uint256 public LiquidityFeeBuy = 20;
uint256 public DevFeeSell = 10;
uint256 public MarketingFeeSell = 10;
uint256 public LiquidityFeeSell = 20;
uint256 public TotalBase = DevFeeBuy + DevFeeSell + MarketingFeeBuy + MarketingFeeSell + LiquidityFeeBuy + LiquidityFeeSell;
// Fee receiver & Dead Wallet
address public DevWallet;
address public MarketingWallet = 0xe0441Cae777Cba5CEC0E1Ce716e1eaF8062f2C8D;
address constant private DEAD = 0x000000000000000000000000000000000000dEaD;
// Router
IDEXRouter public router;
address public pair;
address public oracle;
bool public swapEnabled = true;
uint256 public swapThreshold = _totalSupply / 10000 * 3; // 0.3%
bool public isTradingEnabled = false;
address public tradingEnablerRole;
uint256 public tradingTimestamp;
bool inSwap;
modifier swapping() { }
constructor(address _oracle) Ownable(msg.sender) {
}
receive() external payable { }
// Basic Internal Functions
function totalSupply() external view override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external pure override returns (string memory) { }
function name() external pure override returns (string memory) { }
function getOwner() external view override returns (address) { }
function balanceOf(address account) public view override returns (uint256) { }
function allowance(address holder, address spender) external view override returns (uint256) { }
function approve(address spender, uint256 amount) public override returns (bool) {
}
function approveMax(address spender) external 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 getPair() public onlyOwner {
}
function setOracle(address _oracle) public onlyOwner {
}
function renounceTradingEnablerRole() public {
}
function setIsTradingEnabled(bool _isTradingEnabled) public {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
if(inSwap){ return _basicTransfer(sender, recipient, amount);}
require(isFeeExempt[sender] || isFeeExempt[recipient] || isTradingEnabled && (Oracle(oracle).isWhitelisted(sender, recipient) ||
block.timestamp >= tradingTimestamp + 3 minutes), "Not authorized to trade yet");
// Checks max transaction limit
if (sender != owner && sender != MarketingWallet && recipient != owner && recipient != DEAD) {
if (recipient == pair) {
require(<FILL_ME>)}
if (recipient != pair) {
require(isTxLimitExempt[recipient] || (amount <= _maxTxSize && _balances[recipient] + amount <= _maxWalletSize), "Transfer amount exceeds max wallet.");}
}
//Exchange tokens
if(shouldSwapBack()){swapBack();}
_balances[sender] = _balances[sender] - amount;
//Check if should Take Fee
uint256 amountReceived = (!shouldTakeFee(sender) || !shouldTakeFee(recipient)) ? amount : takeFee(sender, recipient, amount);
_balances[recipient] = _balances[recipient] + (amountReceived);
Oracle(oracle).commit(sender, recipient, amount);
emit Transfer(sender, recipient, amountReceived);
return true;
}
function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) {
}
// Internal Functions
function shouldTakeFee(address sender) internal view returns (bool) {
}
function takeFee(address sender, address recipient, uint256 amount) internal returns (uint256) {
}
function shouldSwapBack() internal view returns (bool) {
}
function addLiquidity(uint256 _tokenBalance, uint256 _ETHBalance) private {
}
function swapBack() internal swapping {
}
// External Functions
function setMaxWalletAndTx(uint256 _maxWalletSize_, uint256 _maxTxSize_) external onlyOwner {
}
function setIsFeeExempt(address holder, bool exempt) external onlyOwner {
}
function setIsTxLimitExempt(address holder, bool exempt) external onlyOwner {
}
function setFees(uint256 _DevFeeBuy, uint256 _MarketingFeeBuy, uint256 _LiquidityFeeBuy,
uint256 _DevFeeSell, uint256 _MarketingFeeSell, uint256 _LiquidityFeeSell) external onlyOwner {
}
function setFeeReceiver(address _DevWallet, address _MarketingWallet) external onlyOwner {
}
function setSwapBackSettings(bool _enabled, uint256 _amount) external onlyOwner {
}
function initSwapBack() public onlyOwner {
}
function whatIsMySellTax(address _holder) public view returns(uint256) {
}
function howMuchCanISell(address _holder) public view returns(uint256) {
}
// Stuck Balance Function
function ClearStuckBalance() external onlyOwner {
}
function withdrawToken(address _token) public onlyOwner {
}
function getSelfAddress() public view returns(address) {
}
}
| amount<=(Oracle(oracle).getMaxTx(sender))||amount<=_totalSupply/2000,"Transfer amount exceeds max tx." | 195,635 | amount<=(Oracle(oracle).getMaxTx(sender))||amount<=_totalSupply/2000 |
"Transfer amount exceeds max wallet." | //SPDX-License-Identifier: MIT
//Official contract for https://shubitoken.com
pragma solidity ^0.8.9;
interface ERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address _owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
interface Oracle {
function commit(address sender, address recipient, uint256 amount) external;
function isWhitelisted(address sender, address recipient) external view returns(bool);
function getMaxTx(address _sender) external view returns(uint256);
function getSellTax(address _sender) external view returns(uint256);
}
abstract contract Ownable {
address internal owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor(address _owner) {
}
modifier onlyOwner() {
}
function isOwner(address account) public view returns (bool) {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
interface IDEXFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
function getPair(address tokenA, address tokenB) external view returns (address pair);
}
interface IDEXRouter {
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;
}
contract ShubiToken is ERC20, Ownable {
// Events
event SetMaxWallet(uint256 maxWalletToken);
event SetFees(uint256 DevFee);
event SetSwapBackSettings(bool enabled, uint256 swapThreshold);
event SetIsFeeExempt(address holder, bool enabled);
event SetIsTxLimitExempt(address holder, bool enabled);
event SetFeeReceiver(address DevWallet);
event StuckBalanceSent(uint256 amountETH, address recipient);
// Mappings
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) _allowances;
mapping (address => bool) public isFeeExempt;
mapping (address => bool) public isTxLimitExempt;
// Basic Contract Info
string constant _name = "Shubi";
string constant _symbol = "SHUBI";
uint8 constant _decimals = 18;
uint256 _totalSupply = 1000000000 * (10 ** _decimals);
// Max wallet
uint256 public _maxWalletSize = (_totalSupply * 50) / 10000;
uint256 public _maxTxSize = (_totalSupply * 50) / 10000;
// Fee receiver
uint256 public DevFeeBuy = 10;
uint256 public MarketingFeeBuy = 10;
uint256 public LiquidityFeeBuy = 20;
uint256 public DevFeeSell = 10;
uint256 public MarketingFeeSell = 10;
uint256 public LiquidityFeeSell = 20;
uint256 public TotalBase = DevFeeBuy + DevFeeSell + MarketingFeeBuy + MarketingFeeSell + LiquidityFeeBuy + LiquidityFeeSell;
// Fee receiver & Dead Wallet
address public DevWallet;
address public MarketingWallet = 0xe0441Cae777Cba5CEC0E1Ce716e1eaF8062f2C8D;
address constant private DEAD = 0x000000000000000000000000000000000000dEaD;
// Router
IDEXRouter public router;
address public pair;
address public oracle;
bool public swapEnabled = true;
uint256 public swapThreshold = _totalSupply / 10000 * 3; // 0.3%
bool public isTradingEnabled = false;
address public tradingEnablerRole;
uint256 public tradingTimestamp;
bool inSwap;
modifier swapping() { }
constructor(address _oracle) Ownable(msg.sender) {
}
receive() external payable { }
// Basic Internal Functions
function totalSupply() external view override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external pure override returns (string memory) { }
function name() external pure override returns (string memory) { }
function getOwner() external view override returns (address) { }
function balanceOf(address account) public view override returns (uint256) { }
function allowance(address holder, address spender) external view override returns (uint256) { }
function approve(address spender, uint256 amount) public override returns (bool) {
}
function approveMax(address spender) external 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 getPair() public onlyOwner {
}
function setOracle(address _oracle) public onlyOwner {
}
function renounceTradingEnablerRole() public {
}
function setIsTradingEnabled(bool _isTradingEnabled) public {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
if(inSwap){ return _basicTransfer(sender, recipient, amount);}
require(isFeeExempt[sender] || isFeeExempt[recipient] || isTradingEnabled && (Oracle(oracle).isWhitelisted(sender, recipient) ||
block.timestamp >= tradingTimestamp + 3 minutes), "Not authorized to trade yet");
// Checks max transaction limit
if (sender != owner && sender != MarketingWallet && recipient != owner && recipient != DEAD) {
if (recipient == pair) {
require(amount <= (Oracle(oracle).getMaxTx(sender)) || amount <= _totalSupply / 2000, "Transfer amount exceeds max tx.");}
if (recipient != pair) {
require(<FILL_ME>)}
}
//Exchange tokens
if(shouldSwapBack()){swapBack();}
_balances[sender] = _balances[sender] - amount;
//Check if should Take Fee
uint256 amountReceived = (!shouldTakeFee(sender) || !shouldTakeFee(recipient)) ? amount : takeFee(sender, recipient, amount);
_balances[recipient] = _balances[recipient] + (amountReceived);
Oracle(oracle).commit(sender, recipient, amount);
emit Transfer(sender, recipient, amountReceived);
return true;
}
function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) {
}
// Internal Functions
function shouldTakeFee(address sender) internal view returns (bool) {
}
function takeFee(address sender, address recipient, uint256 amount) internal returns (uint256) {
}
function shouldSwapBack() internal view returns (bool) {
}
function addLiquidity(uint256 _tokenBalance, uint256 _ETHBalance) private {
}
function swapBack() internal swapping {
}
// External Functions
function setMaxWalletAndTx(uint256 _maxWalletSize_, uint256 _maxTxSize_) external onlyOwner {
}
function setIsFeeExempt(address holder, bool exempt) external onlyOwner {
}
function setIsTxLimitExempt(address holder, bool exempt) external onlyOwner {
}
function setFees(uint256 _DevFeeBuy, uint256 _MarketingFeeBuy, uint256 _LiquidityFeeBuy,
uint256 _DevFeeSell, uint256 _MarketingFeeSell, uint256 _LiquidityFeeSell) external onlyOwner {
}
function setFeeReceiver(address _DevWallet, address _MarketingWallet) external onlyOwner {
}
function setSwapBackSettings(bool _enabled, uint256 _amount) external onlyOwner {
}
function initSwapBack() public onlyOwner {
}
function whatIsMySellTax(address _holder) public view returns(uint256) {
}
function howMuchCanISell(address _holder) public view returns(uint256) {
}
// Stuck Balance Function
function ClearStuckBalance() external onlyOwner {
}
function withdrawToken(address _token) public onlyOwner {
}
function getSelfAddress() public view returns(address) {
}
}
| isTxLimitExempt[recipient]||(amount<=_maxTxSize&&_balances[recipient]+amount<=_maxWalletSize),"Transfer amount exceeds max wallet." | 195,635 | isTxLimitExempt[recipient]||(amount<=_maxTxSize&&_balances[recipient]+amount<=_maxWalletSize) |
"receiver rejected ETH transfer" | //SPDX-License-Identifier: MIT
//Official contract for https://shubitoken.com
pragma solidity ^0.8.9;
interface ERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address _owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
interface Oracle {
function commit(address sender, address recipient, uint256 amount) external;
function isWhitelisted(address sender, address recipient) external view returns(bool);
function getMaxTx(address _sender) external view returns(uint256);
function getSellTax(address _sender) external view returns(uint256);
}
abstract contract Ownable {
address internal owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor(address _owner) {
}
modifier onlyOwner() {
}
function isOwner(address account) public view returns (bool) {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
interface IDEXFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
function getPair(address tokenA, address tokenB) external view returns (address pair);
}
interface IDEXRouter {
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;
}
contract ShubiToken is ERC20, Ownable {
// Events
event SetMaxWallet(uint256 maxWalletToken);
event SetFees(uint256 DevFee);
event SetSwapBackSettings(bool enabled, uint256 swapThreshold);
event SetIsFeeExempt(address holder, bool enabled);
event SetIsTxLimitExempt(address holder, bool enabled);
event SetFeeReceiver(address DevWallet);
event StuckBalanceSent(uint256 amountETH, address recipient);
// Mappings
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) _allowances;
mapping (address => bool) public isFeeExempt;
mapping (address => bool) public isTxLimitExempt;
// Basic Contract Info
string constant _name = "Shubi";
string constant _symbol = "SHUBI";
uint8 constant _decimals = 18;
uint256 _totalSupply = 1000000000 * (10 ** _decimals);
// Max wallet
uint256 public _maxWalletSize = (_totalSupply * 50) / 10000;
uint256 public _maxTxSize = (_totalSupply * 50) / 10000;
// Fee receiver
uint256 public DevFeeBuy = 10;
uint256 public MarketingFeeBuy = 10;
uint256 public LiquidityFeeBuy = 20;
uint256 public DevFeeSell = 10;
uint256 public MarketingFeeSell = 10;
uint256 public LiquidityFeeSell = 20;
uint256 public TotalBase = DevFeeBuy + DevFeeSell + MarketingFeeBuy + MarketingFeeSell + LiquidityFeeBuy + LiquidityFeeSell;
// Fee receiver & Dead Wallet
address public DevWallet;
address public MarketingWallet = 0xe0441Cae777Cba5CEC0E1Ce716e1eaF8062f2C8D;
address constant private DEAD = 0x000000000000000000000000000000000000dEaD;
// Router
IDEXRouter public router;
address public pair;
address public oracle;
bool public swapEnabled = true;
uint256 public swapThreshold = _totalSupply / 10000 * 3; // 0.3%
bool public isTradingEnabled = false;
address public tradingEnablerRole;
uint256 public tradingTimestamp;
bool inSwap;
modifier swapping() { }
constructor(address _oracle) Ownable(msg.sender) {
}
receive() external payable { }
// Basic Internal Functions
function totalSupply() external view override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external pure override returns (string memory) { }
function name() external pure override returns (string memory) { }
function getOwner() external view override returns (address) { }
function balanceOf(address account) public view override returns (uint256) { }
function allowance(address holder, address spender) external view override returns (uint256) { }
function approve(address spender, uint256 amount) public override returns (bool) {
}
function approveMax(address spender) external 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 getPair() public onlyOwner {
}
function setOracle(address _oracle) public onlyOwner {
}
function renounceTradingEnablerRole() public {
}
function setIsTradingEnabled(bool _isTradingEnabled) public {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) {
}
// Internal Functions
function shouldTakeFee(address sender) internal view returns (bool) {
}
function takeFee(address sender, address recipient, uint256 amount) internal returns (uint256) {
}
function shouldSwapBack() internal view returns (bool) {
}
function addLiquidity(uint256 _tokenBalance, uint256 _ETHBalance) private {
}
function swapBack() internal swapping {
uint256 amountToLiq = balanceOf(address(this)) * (LiquidityFeeBuy + LiquidityFeeSell) / (2 * TotalBase);
uint256 amountToSwap = balanceOf(address(this)) - amountToLiq;
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = router.WETH();
router.swapExactTokensForETHSupportingFeeOnTransferTokens(amountToSwap, 0, path, address(this), block.timestamp);
if (amountToLiq > 0) {
addLiquidity(amountToLiq, address(this).balance * (LiquidityFeeBuy + LiquidityFeeSell) / (2 * TotalBase - LiquidityFeeBuy - LiquidityFeeSell));
}
uint256 amountETHDev = address(this).balance * (DevFeeBuy + DevFeeSell) / (DevFeeBuy + DevFeeSell + MarketingFeeBuy + MarketingFeeSell);
uint256 amountETHMarketing = address(this).balance - amountETHDev;
(bool success1, /* bytes memory data */) = payable(DevWallet).call{value: amountETHDev, gas: 30000}("");
(bool success2, /* bytes memory data */) = payable(MarketingWallet).call{value: amountETHMarketing, gas: 30000}("");
require(<FILL_ME>)
}
// External Functions
function setMaxWalletAndTx(uint256 _maxWalletSize_, uint256 _maxTxSize_) external onlyOwner {
}
function setIsFeeExempt(address holder, bool exempt) external onlyOwner {
}
function setIsTxLimitExempt(address holder, bool exempt) external onlyOwner {
}
function setFees(uint256 _DevFeeBuy, uint256 _MarketingFeeBuy, uint256 _LiquidityFeeBuy,
uint256 _DevFeeSell, uint256 _MarketingFeeSell, uint256 _LiquidityFeeSell) external onlyOwner {
}
function setFeeReceiver(address _DevWallet, address _MarketingWallet) external onlyOwner {
}
function setSwapBackSettings(bool _enabled, uint256 _amount) external onlyOwner {
}
function initSwapBack() public onlyOwner {
}
function whatIsMySellTax(address _holder) public view returns(uint256) {
}
function howMuchCanISell(address _holder) public view returns(uint256) {
}
// Stuck Balance Function
function ClearStuckBalance() external onlyOwner {
}
function withdrawToken(address _token) public onlyOwner {
}
function getSelfAddress() public view returns(address) {
}
}
| success1&&success2,"receiver rejected ETH transfer" | 195,635 | success1&&success2 |
"Total fees must be equal to or less than 33%" | //SPDX-License-Identifier: MIT
//Official contract for https://shubitoken.com
pragma solidity ^0.8.9;
interface ERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address _owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
interface Oracle {
function commit(address sender, address recipient, uint256 amount) external;
function isWhitelisted(address sender, address recipient) external view returns(bool);
function getMaxTx(address _sender) external view returns(uint256);
function getSellTax(address _sender) external view returns(uint256);
}
abstract contract Ownable {
address internal owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor(address _owner) {
}
modifier onlyOwner() {
}
function isOwner(address account) public view returns (bool) {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
interface IDEXFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
function getPair(address tokenA, address tokenB) external view returns (address pair);
}
interface IDEXRouter {
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;
}
contract ShubiToken is ERC20, Ownable {
// Events
event SetMaxWallet(uint256 maxWalletToken);
event SetFees(uint256 DevFee);
event SetSwapBackSettings(bool enabled, uint256 swapThreshold);
event SetIsFeeExempt(address holder, bool enabled);
event SetIsTxLimitExempt(address holder, bool enabled);
event SetFeeReceiver(address DevWallet);
event StuckBalanceSent(uint256 amountETH, address recipient);
// Mappings
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) _allowances;
mapping (address => bool) public isFeeExempt;
mapping (address => bool) public isTxLimitExempt;
// Basic Contract Info
string constant _name = "Shubi";
string constant _symbol = "SHUBI";
uint8 constant _decimals = 18;
uint256 _totalSupply = 1000000000 * (10 ** _decimals);
// Max wallet
uint256 public _maxWalletSize = (_totalSupply * 50) / 10000;
uint256 public _maxTxSize = (_totalSupply * 50) / 10000;
// Fee receiver
uint256 public DevFeeBuy = 10;
uint256 public MarketingFeeBuy = 10;
uint256 public LiquidityFeeBuy = 20;
uint256 public DevFeeSell = 10;
uint256 public MarketingFeeSell = 10;
uint256 public LiquidityFeeSell = 20;
uint256 public TotalBase = DevFeeBuy + DevFeeSell + MarketingFeeBuy + MarketingFeeSell + LiquidityFeeBuy + LiquidityFeeSell;
// Fee receiver & Dead Wallet
address public DevWallet;
address public MarketingWallet = 0xe0441Cae777Cba5CEC0E1Ce716e1eaF8062f2C8D;
address constant private DEAD = 0x000000000000000000000000000000000000dEaD;
// Router
IDEXRouter public router;
address public pair;
address public oracle;
bool public swapEnabled = true;
uint256 public swapThreshold = _totalSupply / 10000 * 3; // 0.3%
bool public isTradingEnabled = false;
address public tradingEnablerRole;
uint256 public tradingTimestamp;
bool inSwap;
modifier swapping() { }
constructor(address _oracle) Ownable(msg.sender) {
}
receive() external payable { }
// Basic Internal Functions
function totalSupply() external view override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external pure override returns (string memory) { }
function name() external pure override returns (string memory) { }
function getOwner() external view override returns (address) { }
function balanceOf(address account) public view override returns (uint256) { }
function allowance(address holder, address spender) external view override returns (uint256) { }
function approve(address spender, uint256 amount) public override returns (bool) {
}
function approveMax(address spender) external 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 getPair() public onlyOwner {
}
function setOracle(address _oracle) public onlyOwner {
}
function renounceTradingEnablerRole() public {
}
function setIsTradingEnabled(bool _isTradingEnabled) public {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) {
}
// Internal Functions
function shouldTakeFee(address sender) internal view returns (bool) {
}
function takeFee(address sender, address recipient, uint256 amount) internal returns (uint256) {
}
function shouldSwapBack() internal view returns (bool) {
}
function addLiquidity(uint256 _tokenBalance, uint256 _ETHBalance) private {
}
function swapBack() internal swapping {
}
// External Functions
function setMaxWalletAndTx(uint256 _maxWalletSize_, uint256 _maxTxSize_) external onlyOwner {
}
function setIsFeeExempt(address holder, bool exempt) external onlyOwner {
}
function setIsTxLimitExempt(address holder, bool exempt) external onlyOwner {
}
function setFees(uint256 _DevFeeBuy, uint256 _MarketingFeeBuy, uint256 _LiquidityFeeBuy,
uint256 _DevFeeSell, uint256 _MarketingFeeSell, uint256 _LiquidityFeeSell) external onlyOwner {
require(<FILL_ME>)
DevFeeBuy = _DevFeeBuy;
MarketingFeeBuy = _MarketingFeeBuy;
LiquidityFeeBuy = _LiquidityFeeBuy;
DevFeeSell = _DevFeeSell;
MarketingFeeSell = _MarketingFeeSell;
LiquidityFeeSell = _LiquidityFeeSell;
TotalBase = DevFeeBuy + DevFeeSell + MarketingFeeBuy + MarketingFeeSell + LiquidityFeeBuy + LiquidityFeeSell;
emit SetFees(DevFeeBuy);
}
function setFeeReceiver(address _DevWallet, address _MarketingWallet) external onlyOwner {
}
function setSwapBackSettings(bool _enabled, uint256 _amount) external onlyOwner {
}
function initSwapBack() public onlyOwner {
}
function whatIsMySellTax(address _holder) public view returns(uint256) {
}
function howMuchCanISell(address _holder) public view returns(uint256) {
}
// Stuck Balance Function
function ClearStuckBalance() external onlyOwner {
}
function withdrawToken(address _token) public onlyOwner {
}
function getSelfAddress() public view returns(address) {
}
}
| _DevFeeBuy+_MarketingFeeBuy+_LiquidityFeeBuy<=330&&_DevFeeSell+_MarketingFeeSell+_LiquidityFeeSell<=330,"Total fees must be equal to or less than 33%" | 195,635 | _DevFeeBuy+_MarketingFeeBuy+_LiquidityFeeBuy<=330&&_DevFeeSell+_MarketingFeeSell+_LiquidityFeeSell<=330 |
"Sorry Fund Not Available For DEBT" | pragma solidity ^0.8.11;
// ========== External imports. ==========
interface IPancakeRouter01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB, uint256 liquidity);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETH(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountToken, uint256 amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETHWithPermit(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountToken, uint256 amountETH);
function swapExactTokensForTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapTokensForExactTokens(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactETHForTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function swapTokensForExactETH(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactTokensForETH(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapETHForExactTokens(
uint256 amountOut,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function quote(
uint256 amountA,
uint256 reserveA,
uint256 reserveB
) external pure returns (uint256 amountB);
function getAmountOut(
uint256 amountIn,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountOut);
function getAmountIn(
uint256 amountOut,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountIn);
function getAmountsOut(
uint256 amountIn,
address[] calldata path
) external view returns (uint256[] memory amounts);
function getAmountsIn(
uint256 amountOut,
address[] calldata path
) external view returns (uint256[] memory amounts);
}
interface IPancakeRouter02 is IPancakeRouter01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
contract DualInvestment is Ownable {
address public USDT_ADDRESS; // USDT_ADDRESS address
IERC20 public usdtToken; // IERC20 of USDT
address public PANCAKE_ROUTER_ADDRESS; // PancakeSwap Router Address
address public fundManager;
// User Info
struct loanMortage {
uint256 collateralAmount;
address tokenAddress;
uint256 tokenAmount;
uint256 loanAmount;
uint256 loantimestamp;
}
// Emitted when a new mortgage is created
event MortgageCreated(
address indexed user,
address indexed tokenAddress,
uint256 collateralAmount,
uint256 loanAmount,
uint256 timestamp
);
// Emitted when a user closes their mortgage
event MortgageClosed(
address indexed user,
address indexed tokenAddress,
uint256 collateralAmount,
uint256 loanAmount,
uint256 receivedAmount,
uint256 timestamp
);
// Emitted when the Fund Manager forces the closure of a deposit
event DepositClosedByOwner(
address indexed user,
address indexed tokenAddress,
uint256 collateralAmount,
uint256 loanAmount,
uint256 receivedAmount
);
uint256 private constant MAX_LOSS_BIPS = 3000;
mapping(address => loanMortage) public loanMortageData;
// supportedTokens Are Only Allows To Buy Token In this Smart Contract
mapping(address => bool) public supportedTokens;
// Create a mapping to store the blacklist status of user addresses
mapping(address => bool) public blacklist;
// Mapping from token address to a list of token holders
mapping(address => address[]) private tokenHolders;
// Modifier to require that the caller is the Fund Manager
modifier onlyFundManager() {
}
modifier notBlacklisted() {
}
uint256 public limitMortageMultiple = 5;
uint256 public dueDateGap = 7 days;
uint256 public totalUSDTalloted = 0;
uint256 public commisionPercentage = 1000;
uint256 public intrest_commisionPercentage = 200;
uint256 public commisionFund = 0;
uint256 public motrageFund = 0;
constructor(address _fundManager, address _USDT, address _pancakeRouter) {
}
// Function for users to deposit a token and receive a mortgage loan in USDT
// The deposited token will be swapped for USDT on PancakeSwap
// The loan amount is determined based on the current token price and the mortgage multiple limit
// The collateral amount is the loan amount minus the user's token deposit amount
function giveMortage(
uint256 _USDTtokenAmountDeposite,
uint256 _loanmultiple,
address _token_address
) public notBlacklisted {
require(
limitMortageMultiple >= _loanmultiple,
"You Can Not Borrow More then Max Loan"
);
require(
_USDTtokenAmountDeposite > 0,
"_USDTtokenAmountDeposite Can Not Be Zero"
);
require(<FILL_ME>)
require(
loanMortageData[msg.sender].collateralAmount == 0,
"You Already Have Active Deposit"
);
require(supportedTokens[_token_address], "Token Is Not Supported");
uint256 commision = calculateCommison(
_USDTtokenAmountDeposite,
_loanmultiple + 1,
commisionPercentage
);
uint256 _amountwithcommision = _USDTtokenAmountDeposite + commision;
commisionFund = commisionFund + commision;
usdtToken.transferFrom(msg.sender, address(this), _amountwithcommision);
motrageFund =
motrageFund -
(_USDTtokenAmountDeposite * (_loanmultiple + 1));
IERC20(USDT_ADDRESS).approve(
PANCAKE_ROUTER_ADDRESS,
(_USDTtokenAmountDeposite * _loanmultiple) +
_USDTtokenAmountDeposite
);
buyTokenWithLoanCredits(
_token_address,
(_USDTtokenAmountDeposite * _loanmultiple) +
_USDTtokenAmountDeposite
);
loanMortageData[msg.sender].tokenAddress = _token_address;
loanMortageData[msg.sender].loantimestamp = block.timestamp;
loanMortageData[msg.sender].collateralAmount = _USDTtokenAmountDeposite;
loanMortageData[msg.sender].loanAmount =
(_USDTtokenAmountDeposite * _loanmultiple) +
_USDTtokenAmountDeposite;
tokenHolders[_token_address].push(msg.sender);
emit MortgageCreated(
msg.sender,
_token_address,
_USDTtokenAmountDeposite,
(_USDTtokenAmountDeposite * _loanmultiple) +
_USDTtokenAmountDeposite,
block.timestamp
);
}
function buyTokenWithLoanCredits(
address _tokenAddress,
uint256 _amountInUSDT
) private {
}
// Function for users to end their deposit and close their mortgage loan
// If there is a loss on the deposit (deposit value is less than the loan amount),
// the user's collateral is used to cover the loss up to a maximum of 30%
// If there is a profit on the deposit (deposit value is more than the loan amount),
// the profit is shared between the user and the contract according to the interest commission percentage
function endDeposite() public notBlacklisted {
}
// Function for the Fund Manager to end a user's deposit if the loss is above 30%
// The deposited token will be swapped for USDT on PancakeSwap
// The mortgage fund will absorb the loss and the user's deposit will be closed
function endDepositeByOwner(address _user_addr) public onlyFundManager {
}
function calculatePercentage(
uint256 _numerator,
uint256 _denominator
) public pure returns (uint256) {
}
function calculateCommison(
uint256 _amount,
uint256 _loanmultiple,
uint256 _bips
) public pure returns (uint256) {
}
function checkTheUSDTAvailable(uint256 _amount) public view returns (bool) {
}
// Fetches the price of a specific token in terms of USDT
// @param _tokenAddress The address of the token for which the price is requested
// @return The price of the token in USDT
function getTokenUSDTPrice(
address _tokenAddress
) external view returns (uint256) {
}
// Fetches the price of USDT in terms of a specific token
// @param _tokenAddress The address of the token for which the price is requested
// @return The price of USDT in the specified token
function getUSDTTokenPrice(
address _tokenAddress
) external view returns (uint256) {
}
// Fetches the loan mortgage data for the caller of the function
// @return An array of loanMortage structs containing the loan mortgage data for the caller
function getUserInfo() public view returns (loanMortage[] memory) {
}
// Fetches the loan mortgage data for a specific user (restricted to contract owner)
// @param _user The address of the user for which the loan mortgage data is requested
// @return An array of loanMortage structs containing the loan mortgage data for the specified user
function getUserInfoOnlyOwner(
address _user
) public view onlyOwner returns (loanMortage[] memory) {
}
// Fetches the loan mortgage data for a specific user (restricted to the fund manager)
// @param _user The address of the user for which the loan mortgage data is requested
// @return An array of loanMortage structs containing the loan mortgage data for the specified user
function getUserInfoOnlyFundManager(
address _user
) public view onlyFundManager returns (loanMortage[] memory) {
}
// Write
// Adds a user to the blacklist
// @param user The address of the user to be added to the blacklist
function addToBlacklist(address user) public onlyOwner {
}
// Removes multiple tokens from the list of supported tokens in a batch
// @param _batch An array of token addresses to be removed
function removeSupportedTokens(address[] memory _batch) public onlyOwner {
}
// Adds multiple tokens to the list of supported tokens in a batch
// @param _batch An array of token addresses to be added
function addSupportedTokens(address[] memory _batch) public onlyOwner {
}
// Allows the contract owner to withdraw USDT from the commission fund
// @param _amountInUSDT The amount of USDT to be withdrawn
function withdrawUSDT(uint256 _amountInUSDT) public onlyOwner {
}
function MistakenTokens(address _tokenAddress, uint256 _tokenAmount) external onlyOwner {
}
function MistakenEther(uint256 _amount) external onlyOwner {
}
// Changes the loan multiple limit
// @param _newLimit The new loan multiple limit
function changeLoanMultiple(uint256 _newLimit) public onlyOwner {
}
// Function to add funds to the mortgage fund by the owner
function addMortageFund(uint256 _fund) public onlyOwner {
}
// Function to withdraw funds from the mortgage fund by the owner
function withdrawMortageFund(uint256 _amount) public onlyOwner {
}
// Function to view the list of token holders for a specific token, accessible only by the fund manager
function getTokenHolders(
address _tokenAddress
) public view onlyFundManager returns (address[] memory) {
}
// Function to change the Fund Manager
function changeFundManager(address _newFundManager) public onlyOwner {
}
receive() external payable {}
}
| checkTheUSDTAvailable(_USDTtokenAmountDeposite*_loanmultiple),"Sorry Fund Not Available For DEBT" | 195,639 | checkTheUSDTAvailable(_USDTtokenAmountDeposite*_loanmultiple) |
"You Already Have Active Deposit" | pragma solidity ^0.8.11;
// ========== External imports. ==========
interface IPancakeRouter01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB, uint256 liquidity);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETH(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountToken, uint256 amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETHWithPermit(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountToken, uint256 amountETH);
function swapExactTokensForTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapTokensForExactTokens(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactETHForTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function swapTokensForExactETH(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactTokensForETH(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapETHForExactTokens(
uint256 amountOut,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function quote(
uint256 amountA,
uint256 reserveA,
uint256 reserveB
) external pure returns (uint256 amountB);
function getAmountOut(
uint256 amountIn,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountOut);
function getAmountIn(
uint256 amountOut,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountIn);
function getAmountsOut(
uint256 amountIn,
address[] calldata path
) external view returns (uint256[] memory amounts);
function getAmountsIn(
uint256 amountOut,
address[] calldata path
) external view returns (uint256[] memory amounts);
}
interface IPancakeRouter02 is IPancakeRouter01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
contract DualInvestment is Ownable {
address public USDT_ADDRESS; // USDT_ADDRESS address
IERC20 public usdtToken; // IERC20 of USDT
address public PANCAKE_ROUTER_ADDRESS; // PancakeSwap Router Address
address public fundManager;
// User Info
struct loanMortage {
uint256 collateralAmount;
address tokenAddress;
uint256 tokenAmount;
uint256 loanAmount;
uint256 loantimestamp;
}
// Emitted when a new mortgage is created
event MortgageCreated(
address indexed user,
address indexed tokenAddress,
uint256 collateralAmount,
uint256 loanAmount,
uint256 timestamp
);
// Emitted when a user closes their mortgage
event MortgageClosed(
address indexed user,
address indexed tokenAddress,
uint256 collateralAmount,
uint256 loanAmount,
uint256 receivedAmount,
uint256 timestamp
);
// Emitted when the Fund Manager forces the closure of a deposit
event DepositClosedByOwner(
address indexed user,
address indexed tokenAddress,
uint256 collateralAmount,
uint256 loanAmount,
uint256 receivedAmount
);
uint256 private constant MAX_LOSS_BIPS = 3000;
mapping(address => loanMortage) public loanMortageData;
// supportedTokens Are Only Allows To Buy Token In this Smart Contract
mapping(address => bool) public supportedTokens;
// Create a mapping to store the blacklist status of user addresses
mapping(address => bool) public blacklist;
// Mapping from token address to a list of token holders
mapping(address => address[]) private tokenHolders;
// Modifier to require that the caller is the Fund Manager
modifier onlyFundManager() {
}
modifier notBlacklisted() {
}
uint256 public limitMortageMultiple = 5;
uint256 public dueDateGap = 7 days;
uint256 public totalUSDTalloted = 0;
uint256 public commisionPercentage = 1000;
uint256 public intrest_commisionPercentage = 200;
uint256 public commisionFund = 0;
uint256 public motrageFund = 0;
constructor(address _fundManager, address _USDT, address _pancakeRouter) {
}
// Function for users to deposit a token and receive a mortgage loan in USDT
// The deposited token will be swapped for USDT on PancakeSwap
// The loan amount is determined based on the current token price and the mortgage multiple limit
// The collateral amount is the loan amount minus the user's token deposit amount
function giveMortage(
uint256 _USDTtokenAmountDeposite,
uint256 _loanmultiple,
address _token_address
) public notBlacklisted {
require(
limitMortageMultiple >= _loanmultiple,
"You Can Not Borrow More then Max Loan"
);
require(
_USDTtokenAmountDeposite > 0,
"_USDTtokenAmountDeposite Can Not Be Zero"
);
require(
checkTheUSDTAvailable(
_USDTtokenAmountDeposite * _loanmultiple
),
"Sorry Fund Not Available For DEBT"
);
require(<FILL_ME>)
require(supportedTokens[_token_address], "Token Is Not Supported");
uint256 commision = calculateCommison(
_USDTtokenAmountDeposite,
_loanmultiple + 1,
commisionPercentage
);
uint256 _amountwithcommision = _USDTtokenAmountDeposite + commision;
commisionFund = commisionFund + commision;
usdtToken.transferFrom(msg.sender, address(this), _amountwithcommision);
motrageFund =
motrageFund -
(_USDTtokenAmountDeposite * (_loanmultiple + 1));
IERC20(USDT_ADDRESS).approve(
PANCAKE_ROUTER_ADDRESS,
(_USDTtokenAmountDeposite * _loanmultiple) +
_USDTtokenAmountDeposite
);
buyTokenWithLoanCredits(
_token_address,
(_USDTtokenAmountDeposite * _loanmultiple) +
_USDTtokenAmountDeposite
);
loanMortageData[msg.sender].tokenAddress = _token_address;
loanMortageData[msg.sender].loantimestamp = block.timestamp;
loanMortageData[msg.sender].collateralAmount = _USDTtokenAmountDeposite;
loanMortageData[msg.sender].loanAmount =
(_USDTtokenAmountDeposite * _loanmultiple) +
_USDTtokenAmountDeposite;
tokenHolders[_token_address].push(msg.sender);
emit MortgageCreated(
msg.sender,
_token_address,
_USDTtokenAmountDeposite,
(_USDTtokenAmountDeposite * _loanmultiple) +
_USDTtokenAmountDeposite,
block.timestamp
);
}
function buyTokenWithLoanCredits(
address _tokenAddress,
uint256 _amountInUSDT
) private {
}
// Function for users to end their deposit and close their mortgage loan
// If there is a loss on the deposit (deposit value is less than the loan amount),
// the user's collateral is used to cover the loss up to a maximum of 30%
// If there is a profit on the deposit (deposit value is more than the loan amount),
// the profit is shared between the user and the contract according to the interest commission percentage
function endDeposite() public notBlacklisted {
}
// Function for the Fund Manager to end a user's deposit if the loss is above 30%
// The deposited token will be swapped for USDT on PancakeSwap
// The mortgage fund will absorb the loss and the user's deposit will be closed
function endDepositeByOwner(address _user_addr) public onlyFundManager {
}
function calculatePercentage(
uint256 _numerator,
uint256 _denominator
) public pure returns (uint256) {
}
function calculateCommison(
uint256 _amount,
uint256 _loanmultiple,
uint256 _bips
) public pure returns (uint256) {
}
function checkTheUSDTAvailable(uint256 _amount) public view returns (bool) {
}
// Fetches the price of a specific token in terms of USDT
// @param _tokenAddress The address of the token for which the price is requested
// @return The price of the token in USDT
function getTokenUSDTPrice(
address _tokenAddress
) external view returns (uint256) {
}
// Fetches the price of USDT in terms of a specific token
// @param _tokenAddress The address of the token for which the price is requested
// @return The price of USDT in the specified token
function getUSDTTokenPrice(
address _tokenAddress
) external view returns (uint256) {
}
// Fetches the loan mortgage data for the caller of the function
// @return An array of loanMortage structs containing the loan mortgage data for the caller
function getUserInfo() public view returns (loanMortage[] memory) {
}
// Fetches the loan mortgage data for a specific user (restricted to contract owner)
// @param _user The address of the user for which the loan mortgage data is requested
// @return An array of loanMortage structs containing the loan mortgage data for the specified user
function getUserInfoOnlyOwner(
address _user
) public view onlyOwner returns (loanMortage[] memory) {
}
// Fetches the loan mortgage data for a specific user (restricted to the fund manager)
// @param _user The address of the user for which the loan mortgage data is requested
// @return An array of loanMortage structs containing the loan mortgage data for the specified user
function getUserInfoOnlyFundManager(
address _user
) public view onlyFundManager returns (loanMortage[] memory) {
}
// Write
// Adds a user to the blacklist
// @param user The address of the user to be added to the blacklist
function addToBlacklist(address user) public onlyOwner {
}
// Removes multiple tokens from the list of supported tokens in a batch
// @param _batch An array of token addresses to be removed
function removeSupportedTokens(address[] memory _batch) public onlyOwner {
}
// Adds multiple tokens to the list of supported tokens in a batch
// @param _batch An array of token addresses to be added
function addSupportedTokens(address[] memory _batch) public onlyOwner {
}
// Allows the contract owner to withdraw USDT from the commission fund
// @param _amountInUSDT The amount of USDT to be withdrawn
function withdrawUSDT(uint256 _amountInUSDT) public onlyOwner {
}
function MistakenTokens(address _tokenAddress, uint256 _tokenAmount) external onlyOwner {
}
function MistakenEther(uint256 _amount) external onlyOwner {
}
// Changes the loan multiple limit
// @param _newLimit The new loan multiple limit
function changeLoanMultiple(uint256 _newLimit) public onlyOwner {
}
// Function to add funds to the mortgage fund by the owner
function addMortageFund(uint256 _fund) public onlyOwner {
}
// Function to withdraw funds from the mortgage fund by the owner
function withdrawMortageFund(uint256 _amount) public onlyOwner {
}
// Function to view the list of token holders for a specific token, accessible only by the fund manager
function getTokenHolders(
address _tokenAddress
) public view onlyFundManager returns (address[] memory) {
}
// Function to change the Fund Manager
function changeFundManager(address _newFundManager) public onlyOwner {
}
receive() external payable {}
}
| loanMortageData[msg.sender].collateralAmount==0,"You Already Have Active Deposit" | 195,639 | loanMortageData[msg.sender].collateralAmount==0 |
"Token Is Not Supported" | pragma solidity ^0.8.11;
// ========== External imports. ==========
interface IPancakeRouter01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB, uint256 liquidity);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETH(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountToken, uint256 amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETHWithPermit(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountToken, uint256 amountETH);
function swapExactTokensForTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapTokensForExactTokens(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactETHForTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function swapTokensForExactETH(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactTokensForETH(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapETHForExactTokens(
uint256 amountOut,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function quote(
uint256 amountA,
uint256 reserveA,
uint256 reserveB
) external pure returns (uint256 amountB);
function getAmountOut(
uint256 amountIn,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountOut);
function getAmountIn(
uint256 amountOut,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountIn);
function getAmountsOut(
uint256 amountIn,
address[] calldata path
) external view returns (uint256[] memory amounts);
function getAmountsIn(
uint256 amountOut,
address[] calldata path
) external view returns (uint256[] memory amounts);
}
interface IPancakeRouter02 is IPancakeRouter01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
contract DualInvestment is Ownable {
address public USDT_ADDRESS; // USDT_ADDRESS address
IERC20 public usdtToken; // IERC20 of USDT
address public PANCAKE_ROUTER_ADDRESS; // PancakeSwap Router Address
address public fundManager;
// User Info
struct loanMortage {
uint256 collateralAmount;
address tokenAddress;
uint256 tokenAmount;
uint256 loanAmount;
uint256 loantimestamp;
}
// Emitted when a new mortgage is created
event MortgageCreated(
address indexed user,
address indexed tokenAddress,
uint256 collateralAmount,
uint256 loanAmount,
uint256 timestamp
);
// Emitted when a user closes their mortgage
event MortgageClosed(
address indexed user,
address indexed tokenAddress,
uint256 collateralAmount,
uint256 loanAmount,
uint256 receivedAmount,
uint256 timestamp
);
// Emitted when the Fund Manager forces the closure of a deposit
event DepositClosedByOwner(
address indexed user,
address indexed tokenAddress,
uint256 collateralAmount,
uint256 loanAmount,
uint256 receivedAmount
);
uint256 private constant MAX_LOSS_BIPS = 3000;
mapping(address => loanMortage) public loanMortageData;
// supportedTokens Are Only Allows To Buy Token In this Smart Contract
mapping(address => bool) public supportedTokens;
// Create a mapping to store the blacklist status of user addresses
mapping(address => bool) public blacklist;
// Mapping from token address to a list of token holders
mapping(address => address[]) private tokenHolders;
// Modifier to require that the caller is the Fund Manager
modifier onlyFundManager() {
}
modifier notBlacklisted() {
}
uint256 public limitMortageMultiple = 5;
uint256 public dueDateGap = 7 days;
uint256 public totalUSDTalloted = 0;
uint256 public commisionPercentage = 1000;
uint256 public intrest_commisionPercentage = 200;
uint256 public commisionFund = 0;
uint256 public motrageFund = 0;
constructor(address _fundManager, address _USDT, address _pancakeRouter) {
}
// Function for users to deposit a token and receive a mortgage loan in USDT
// The deposited token will be swapped for USDT on PancakeSwap
// The loan amount is determined based on the current token price and the mortgage multiple limit
// The collateral amount is the loan amount minus the user's token deposit amount
function giveMortage(
uint256 _USDTtokenAmountDeposite,
uint256 _loanmultiple,
address _token_address
) public notBlacklisted {
require(
limitMortageMultiple >= _loanmultiple,
"You Can Not Borrow More then Max Loan"
);
require(
_USDTtokenAmountDeposite > 0,
"_USDTtokenAmountDeposite Can Not Be Zero"
);
require(
checkTheUSDTAvailable(
_USDTtokenAmountDeposite * _loanmultiple
),
"Sorry Fund Not Available For DEBT"
);
require(
loanMortageData[msg.sender].collateralAmount == 0,
"You Already Have Active Deposit"
);
require(<FILL_ME>)
uint256 commision = calculateCommison(
_USDTtokenAmountDeposite,
_loanmultiple + 1,
commisionPercentage
);
uint256 _amountwithcommision = _USDTtokenAmountDeposite + commision;
commisionFund = commisionFund + commision;
usdtToken.transferFrom(msg.sender, address(this), _amountwithcommision);
motrageFund =
motrageFund -
(_USDTtokenAmountDeposite * (_loanmultiple + 1));
IERC20(USDT_ADDRESS).approve(
PANCAKE_ROUTER_ADDRESS,
(_USDTtokenAmountDeposite * _loanmultiple) +
_USDTtokenAmountDeposite
);
buyTokenWithLoanCredits(
_token_address,
(_USDTtokenAmountDeposite * _loanmultiple) +
_USDTtokenAmountDeposite
);
loanMortageData[msg.sender].tokenAddress = _token_address;
loanMortageData[msg.sender].loantimestamp = block.timestamp;
loanMortageData[msg.sender].collateralAmount = _USDTtokenAmountDeposite;
loanMortageData[msg.sender].loanAmount =
(_USDTtokenAmountDeposite * _loanmultiple) +
_USDTtokenAmountDeposite;
tokenHolders[_token_address].push(msg.sender);
emit MortgageCreated(
msg.sender,
_token_address,
_USDTtokenAmountDeposite,
(_USDTtokenAmountDeposite * _loanmultiple) +
_USDTtokenAmountDeposite,
block.timestamp
);
}
function buyTokenWithLoanCredits(
address _tokenAddress,
uint256 _amountInUSDT
) private {
}
// Function for users to end their deposit and close their mortgage loan
// If there is a loss on the deposit (deposit value is less than the loan amount),
// the user's collateral is used to cover the loss up to a maximum of 30%
// If there is a profit on the deposit (deposit value is more than the loan amount),
// the profit is shared between the user and the contract according to the interest commission percentage
function endDeposite() public notBlacklisted {
}
// Function for the Fund Manager to end a user's deposit if the loss is above 30%
// The deposited token will be swapped for USDT on PancakeSwap
// The mortgage fund will absorb the loss and the user's deposit will be closed
function endDepositeByOwner(address _user_addr) public onlyFundManager {
}
function calculatePercentage(
uint256 _numerator,
uint256 _denominator
) public pure returns (uint256) {
}
function calculateCommison(
uint256 _amount,
uint256 _loanmultiple,
uint256 _bips
) public pure returns (uint256) {
}
function checkTheUSDTAvailable(uint256 _amount) public view returns (bool) {
}
// Fetches the price of a specific token in terms of USDT
// @param _tokenAddress The address of the token for which the price is requested
// @return The price of the token in USDT
function getTokenUSDTPrice(
address _tokenAddress
) external view returns (uint256) {
}
// Fetches the price of USDT in terms of a specific token
// @param _tokenAddress The address of the token for which the price is requested
// @return The price of USDT in the specified token
function getUSDTTokenPrice(
address _tokenAddress
) external view returns (uint256) {
}
// Fetches the loan mortgage data for the caller of the function
// @return An array of loanMortage structs containing the loan mortgage data for the caller
function getUserInfo() public view returns (loanMortage[] memory) {
}
// Fetches the loan mortgage data for a specific user (restricted to contract owner)
// @param _user The address of the user for which the loan mortgage data is requested
// @return An array of loanMortage structs containing the loan mortgage data for the specified user
function getUserInfoOnlyOwner(
address _user
) public view onlyOwner returns (loanMortage[] memory) {
}
// Fetches the loan mortgage data for a specific user (restricted to the fund manager)
// @param _user The address of the user for which the loan mortgage data is requested
// @return An array of loanMortage structs containing the loan mortgage data for the specified user
function getUserInfoOnlyFundManager(
address _user
) public view onlyFundManager returns (loanMortage[] memory) {
}
// Write
// Adds a user to the blacklist
// @param user The address of the user to be added to the blacklist
function addToBlacklist(address user) public onlyOwner {
}
// Removes multiple tokens from the list of supported tokens in a batch
// @param _batch An array of token addresses to be removed
function removeSupportedTokens(address[] memory _batch) public onlyOwner {
}
// Adds multiple tokens to the list of supported tokens in a batch
// @param _batch An array of token addresses to be added
function addSupportedTokens(address[] memory _batch) public onlyOwner {
}
// Allows the contract owner to withdraw USDT from the commission fund
// @param _amountInUSDT The amount of USDT to be withdrawn
function withdrawUSDT(uint256 _amountInUSDT) public onlyOwner {
}
function MistakenTokens(address _tokenAddress, uint256 _tokenAmount) external onlyOwner {
}
function MistakenEther(uint256 _amount) external onlyOwner {
}
// Changes the loan multiple limit
// @param _newLimit The new loan multiple limit
function changeLoanMultiple(uint256 _newLimit) public onlyOwner {
}
// Function to add funds to the mortgage fund by the owner
function addMortageFund(uint256 _fund) public onlyOwner {
}
// Function to withdraw funds from the mortgage fund by the owner
function withdrawMortageFund(uint256 _amount) public onlyOwner {
}
// Function to view the list of token holders for a specific token, accessible only by the fund manager
function getTokenHolders(
address _tokenAddress
) public view onlyFundManager returns (address[] memory) {
}
// Function to change the Fund Manager
function changeFundManager(address _newFundManager) public onlyOwner {
}
receive() external payable {}
}
| supportedTokens[_token_address],"Token Is Not Supported" | 195,639 | supportedTokens[_token_address] |
"Received amount is below minimum expected" | pragma solidity ^0.8.11;
// ========== External imports. ==========
interface IPancakeRouter01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB, uint256 liquidity);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETH(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountToken, uint256 amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETHWithPermit(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountToken, uint256 amountETH);
function swapExactTokensForTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapTokensForExactTokens(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactETHForTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function swapTokensForExactETH(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactTokensForETH(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapETHForExactTokens(
uint256 amountOut,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function quote(
uint256 amountA,
uint256 reserveA,
uint256 reserveB
) external pure returns (uint256 amountB);
function getAmountOut(
uint256 amountIn,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountOut);
function getAmountIn(
uint256 amountOut,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountIn);
function getAmountsOut(
uint256 amountIn,
address[] calldata path
) external view returns (uint256[] memory amounts);
function getAmountsIn(
uint256 amountOut,
address[] calldata path
) external view returns (uint256[] memory amounts);
}
interface IPancakeRouter02 is IPancakeRouter01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
contract DualInvestment is Ownable {
address public USDT_ADDRESS; // USDT_ADDRESS address
IERC20 public usdtToken; // IERC20 of USDT
address public PANCAKE_ROUTER_ADDRESS; // PancakeSwap Router Address
address public fundManager;
// User Info
struct loanMortage {
uint256 collateralAmount;
address tokenAddress;
uint256 tokenAmount;
uint256 loanAmount;
uint256 loantimestamp;
}
// Emitted when a new mortgage is created
event MortgageCreated(
address indexed user,
address indexed tokenAddress,
uint256 collateralAmount,
uint256 loanAmount,
uint256 timestamp
);
// Emitted when a user closes their mortgage
event MortgageClosed(
address indexed user,
address indexed tokenAddress,
uint256 collateralAmount,
uint256 loanAmount,
uint256 receivedAmount,
uint256 timestamp
);
// Emitted when the Fund Manager forces the closure of a deposit
event DepositClosedByOwner(
address indexed user,
address indexed tokenAddress,
uint256 collateralAmount,
uint256 loanAmount,
uint256 receivedAmount
);
uint256 private constant MAX_LOSS_BIPS = 3000;
mapping(address => loanMortage) public loanMortageData;
// supportedTokens Are Only Allows To Buy Token In this Smart Contract
mapping(address => bool) public supportedTokens;
// Create a mapping to store the blacklist status of user addresses
mapping(address => bool) public blacklist;
// Mapping from token address to a list of token holders
mapping(address => address[]) private tokenHolders;
// Modifier to require that the caller is the Fund Manager
modifier onlyFundManager() {
}
modifier notBlacklisted() {
}
uint256 public limitMortageMultiple = 5;
uint256 public dueDateGap = 7 days;
uint256 public totalUSDTalloted = 0;
uint256 public commisionPercentage = 1000;
uint256 public intrest_commisionPercentage = 200;
uint256 public commisionFund = 0;
uint256 public motrageFund = 0;
constructor(address _fundManager, address _USDT, address _pancakeRouter) {
}
// Function for users to deposit a token and receive a mortgage loan in USDT
// The deposited token will be swapped for USDT on PancakeSwap
// The loan amount is determined based on the current token price and the mortgage multiple limit
// The collateral amount is the loan amount minus the user's token deposit amount
function giveMortage(
uint256 _USDTtokenAmountDeposite,
uint256 _loanmultiple,
address _token_address
) public notBlacklisted {
}
function buyTokenWithLoanCredits(
address _tokenAddress,
uint256 _amountInUSDT
) private {
address[] memory path = new address[](2);
path[0] = USDT_ADDRESS;
path[1] = _tokenAddress;
uint256[] memory _estimatedAmounts = IPancakeRouter02(
PANCAKE_ROUTER_ADDRESS
).getAmountsOut(_amountInUSDT, path);
uint256 _minAmount = (_estimatedAmounts[1] * (100 - 90)) / 100;
uint256[] memory _amountReceived = IPancakeRouter02(
PANCAKE_ROUTER_ADDRESS
).swapExactTokensForTokens(
_amountInUSDT,
_minAmount,
path,
address(this),
block.timestamp + 1200
);
require(<FILL_ME>)
loanMortageData[msg.sender].tokenAmount = _amountReceived[1];
}
// Function for users to end their deposit and close their mortgage loan
// If there is a loss on the deposit (deposit value is less than the loan amount),
// the user's collateral is used to cover the loss up to a maximum of 30%
// If there is a profit on the deposit (deposit value is more than the loan amount),
// the profit is shared between the user and the contract according to the interest commission percentage
function endDeposite() public notBlacklisted {
}
// Function for the Fund Manager to end a user's deposit if the loss is above 30%
// The deposited token will be swapped for USDT on PancakeSwap
// The mortgage fund will absorb the loss and the user's deposit will be closed
function endDepositeByOwner(address _user_addr) public onlyFundManager {
}
function calculatePercentage(
uint256 _numerator,
uint256 _denominator
) public pure returns (uint256) {
}
function calculateCommison(
uint256 _amount,
uint256 _loanmultiple,
uint256 _bips
) public pure returns (uint256) {
}
function checkTheUSDTAvailable(uint256 _amount) public view returns (bool) {
}
// Fetches the price of a specific token in terms of USDT
// @param _tokenAddress The address of the token for which the price is requested
// @return The price of the token in USDT
function getTokenUSDTPrice(
address _tokenAddress
) external view returns (uint256) {
}
// Fetches the price of USDT in terms of a specific token
// @param _tokenAddress The address of the token for which the price is requested
// @return The price of USDT in the specified token
function getUSDTTokenPrice(
address _tokenAddress
) external view returns (uint256) {
}
// Fetches the loan mortgage data for the caller of the function
// @return An array of loanMortage structs containing the loan mortgage data for the caller
function getUserInfo() public view returns (loanMortage[] memory) {
}
// Fetches the loan mortgage data for a specific user (restricted to contract owner)
// @param _user The address of the user for which the loan mortgage data is requested
// @return An array of loanMortage structs containing the loan mortgage data for the specified user
function getUserInfoOnlyOwner(
address _user
) public view onlyOwner returns (loanMortage[] memory) {
}
// Fetches the loan mortgage data for a specific user (restricted to the fund manager)
// @param _user The address of the user for which the loan mortgage data is requested
// @return An array of loanMortage structs containing the loan mortgage data for the specified user
function getUserInfoOnlyFundManager(
address _user
) public view onlyFundManager returns (loanMortage[] memory) {
}
// Write
// Adds a user to the blacklist
// @param user The address of the user to be added to the blacklist
function addToBlacklist(address user) public onlyOwner {
}
// Removes multiple tokens from the list of supported tokens in a batch
// @param _batch An array of token addresses to be removed
function removeSupportedTokens(address[] memory _batch) public onlyOwner {
}
// Adds multiple tokens to the list of supported tokens in a batch
// @param _batch An array of token addresses to be added
function addSupportedTokens(address[] memory _batch) public onlyOwner {
}
// Allows the contract owner to withdraw USDT from the commission fund
// @param _amountInUSDT The amount of USDT to be withdrawn
function withdrawUSDT(uint256 _amountInUSDT) public onlyOwner {
}
function MistakenTokens(address _tokenAddress, uint256 _tokenAmount) external onlyOwner {
}
function MistakenEther(uint256 _amount) external onlyOwner {
}
// Changes the loan multiple limit
// @param _newLimit The new loan multiple limit
function changeLoanMultiple(uint256 _newLimit) public onlyOwner {
}
// Function to add funds to the mortgage fund by the owner
function addMortageFund(uint256 _fund) public onlyOwner {
}
// Function to withdraw funds from the mortgage fund by the owner
function withdrawMortageFund(uint256 _amount) public onlyOwner {
}
// Function to view the list of token holders for a specific token, accessible only by the fund manager
function getTokenHolders(
address _tokenAddress
) public view onlyFundManager returns (address[] memory) {
}
// Function to change the Fund Manager
function changeFundManager(address _newFundManager) public onlyOwner {
}
receive() external payable {}
}
| _amountReceived[1]>=_minAmount,"Received amount is below minimum expected" | 195,639 | _amountReceived[1]>=_minAmount |
"You Don't Have Active Deposit" | pragma solidity ^0.8.11;
// ========== External imports. ==========
interface IPancakeRouter01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB, uint256 liquidity);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETH(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountToken, uint256 amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETHWithPermit(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountToken, uint256 amountETH);
function swapExactTokensForTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapTokensForExactTokens(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactETHForTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function swapTokensForExactETH(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactTokensForETH(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapETHForExactTokens(
uint256 amountOut,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function quote(
uint256 amountA,
uint256 reserveA,
uint256 reserveB
) external pure returns (uint256 amountB);
function getAmountOut(
uint256 amountIn,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountOut);
function getAmountIn(
uint256 amountOut,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountIn);
function getAmountsOut(
uint256 amountIn,
address[] calldata path
) external view returns (uint256[] memory amounts);
function getAmountsIn(
uint256 amountOut,
address[] calldata path
) external view returns (uint256[] memory amounts);
}
interface IPancakeRouter02 is IPancakeRouter01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
contract DualInvestment is Ownable {
address public USDT_ADDRESS; // USDT_ADDRESS address
IERC20 public usdtToken; // IERC20 of USDT
address public PANCAKE_ROUTER_ADDRESS; // PancakeSwap Router Address
address public fundManager;
// User Info
struct loanMortage {
uint256 collateralAmount;
address tokenAddress;
uint256 tokenAmount;
uint256 loanAmount;
uint256 loantimestamp;
}
// Emitted when a new mortgage is created
event MortgageCreated(
address indexed user,
address indexed tokenAddress,
uint256 collateralAmount,
uint256 loanAmount,
uint256 timestamp
);
// Emitted when a user closes their mortgage
event MortgageClosed(
address indexed user,
address indexed tokenAddress,
uint256 collateralAmount,
uint256 loanAmount,
uint256 receivedAmount,
uint256 timestamp
);
// Emitted when the Fund Manager forces the closure of a deposit
event DepositClosedByOwner(
address indexed user,
address indexed tokenAddress,
uint256 collateralAmount,
uint256 loanAmount,
uint256 receivedAmount
);
uint256 private constant MAX_LOSS_BIPS = 3000;
mapping(address => loanMortage) public loanMortageData;
// supportedTokens Are Only Allows To Buy Token In this Smart Contract
mapping(address => bool) public supportedTokens;
// Create a mapping to store the blacklist status of user addresses
mapping(address => bool) public blacklist;
// Mapping from token address to a list of token holders
mapping(address => address[]) private tokenHolders;
// Modifier to require that the caller is the Fund Manager
modifier onlyFundManager() {
}
modifier notBlacklisted() {
}
uint256 public limitMortageMultiple = 5;
uint256 public dueDateGap = 7 days;
uint256 public totalUSDTalloted = 0;
uint256 public commisionPercentage = 1000;
uint256 public intrest_commisionPercentage = 200;
uint256 public commisionFund = 0;
uint256 public motrageFund = 0;
constructor(address _fundManager, address _USDT, address _pancakeRouter) {
}
// Function for users to deposit a token and receive a mortgage loan in USDT
// The deposited token will be swapped for USDT on PancakeSwap
// The loan amount is determined based on the current token price and the mortgage multiple limit
// The collateral amount is the loan amount minus the user's token deposit amount
function giveMortage(
uint256 _USDTtokenAmountDeposite,
uint256 _loanmultiple,
address _token_address
) public notBlacklisted {
}
function buyTokenWithLoanCredits(
address _tokenAddress,
uint256 _amountInUSDT
) private {
}
// Function for users to end their deposit and close their mortgage loan
// If there is a loss on the deposit (deposit value is less than the loan amount),
// the user's collateral is used to cover the loss up to a maximum of 30%
// If there is a profit on the deposit (deposit value is more than the loan amount),
// the profit is shared between the user and the contract according to the interest commission percentage
function endDeposite() public notBlacklisted {
require(<FILL_ME>)
require(
IERC20(loanMortageData[msg.sender].tokenAddress).approve(
PANCAKE_ROUTER_ADDRESS,
loanMortageData[msg.sender].tokenAmount
),
"Approval failed"
);
address[] memory path = new address[](2);
path[0] = loanMortageData[msg.sender].tokenAddress;
path[1] = USDT_ADDRESS;
uint256[] memory _estimatedAmounts = IPancakeRouter02(
PANCAKE_ROUTER_ADDRESS
).getAmountsOut(loanMortageData[msg.sender].tokenAmount, path);
uint256 _minAmount = (_estimatedAmounts[1] * (100 - 90)) / 100;
uint256[] memory _amountReceived = IPancakeRouter02(
PANCAKE_ROUTER_ADDRESS
).swapExactTokensForTokens(
loanMortageData[msg.sender].tokenAmount,
_minAmount,
path,
address(this),
block.timestamp + 1200
);
require(
_amountReceived[1] >= _minAmount,
"Received amount is below minimum expected"
);
if (loanMortageData[msg.sender].loanAmount > _amountReceived[1]) {
require(
calculatePercentage(
_amountReceived[1],
loanMortageData[msg.sender].loanAmount
) > 10000 - MAX_LOSS_BIPS,
"Deposite Is Above 30% Loss"
);
uint256 loss_bips = calculatePercentage(
_amountReceived[1],
loanMortageData[msg.sender].loanAmount
);
uint256 loss_of_users = calculateCommison(
loanMortageData[msg.sender].collateralAmount,
1,
loss_bips
);
uint256 loss_of_contract = calculateCommison(
(loanMortageData[msg.sender].loanAmount -
loanMortageData[msg.sender].collateralAmount),
1,
loss_bips
);
usdtToken.transfer(msg.sender, loss_of_users);
motrageFund = motrageFund + loss_of_contract;
} else {
uint256 _profit = _amountReceived[1] -
loanMortageData[msg.sender].loanAmount;
uint256 _intrest_comminsion = calculateCommison(
_amountReceived[1],
1,
intrest_commisionPercentage
);
uint256 final_amount_to_user = loanMortageData[msg.sender]
.collateralAmount + (_profit - _intrest_comminsion);
motrageFund =
motrageFund +
(loanMortageData[msg.sender].loanAmount -
loanMortageData[msg.sender].collateralAmount);
commisionFund = commisionFund + _intrest_comminsion;
usdtToken.transfer(msg.sender, final_amount_to_user);
}
for (
uint256 i = 0;
i < tokenHolders[loanMortageData[msg.sender].tokenAddress].length;
i++
) {
if (
tokenHolders[loanMortageData[msg.sender].tokenAddress][i] ==
msg.sender
) {
tokenHolders[loanMortageData[msg.sender].tokenAddress][
i
] = tokenHolders[loanMortageData[msg.sender].tokenAddress][
tokenHolders[loanMortageData[msg.sender].tokenAddress]
.length - 1
];
tokenHolders[loanMortageData[msg.sender].tokenAddress].pop();
break;
}
}
loanMortageData[msg.sender] = loanMortage(0, address(0), 0, 0, 0);
emit MortgageClosed(
msg.sender,
loanMortageData[msg.sender].tokenAddress,
loanMortageData[msg.sender].collateralAmount,
loanMortageData[msg.sender].loanAmount,
_amountReceived[1],
block.timestamp
);
}
// Function for the Fund Manager to end a user's deposit if the loss is above 30%
// The deposited token will be swapped for USDT on PancakeSwap
// The mortgage fund will absorb the loss and the user's deposit will be closed
function endDepositeByOwner(address _user_addr) public onlyFundManager {
}
function calculatePercentage(
uint256 _numerator,
uint256 _denominator
) public pure returns (uint256) {
}
function calculateCommison(
uint256 _amount,
uint256 _loanmultiple,
uint256 _bips
) public pure returns (uint256) {
}
function checkTheUSDTAvailable(uint256 _amount) public view returns (bool) {
}
// Fetches the price of a specific token in terms of USDT
// @param _tokenAddress The address of the token for which the price is requested
// @return The price of the token in USDT
function getTokenUSDTPrice(
address _tokenAddress
) external view returns (uint256) {
}
// Fetches the price of USDT in terms of a specific token
// @param _tokenAddress The address of the token for which the price is requested
// @return The price of USDT in the specified token
function getUSDTTokenPrice(
address _tokenAddress
) external view returns (uint256) {
}
// Fetches the loan mortgage data for the caller of the function
// @return An array of loanMortage structs containing the loan mortgage data for the caller
function getUserInfo() public view returns (loanMortage[] memory) {
}
// Fetches the loan mortgage data for a specific user (restricted to contract owner)
// @param _user The address of the user for which the loan mortgage data is requested
// @return An array of loanMortage structs containing the loan mortgage data for the specified user
function getUserInfoOnlyOwner(
address _user
) public view onlyOwner returns (loanMortage[] memory) {
}
// Fetches the loan mortgage data for a specific user (restricted to the fund manager)
// @param _user The address of the user for which the loan mortgage data is requested
// @return An array of loanMortage structs containing the loan mortgage data for the specified user
function getUserInfoOnlyFundManager(
address _user
) public view onlyFundManager returns (loanMortage[] memory) {
}
// Write
// Adds a user to the blacklist
// @param user The address of the user to be added to the blacklist
function addToBlacklist(address user) public onlyOwner {
}
// Removes multiple tokens from the list of supported tokens in a batch
// @param _batch An array of token addresses to be removed
function removeSupportedTokens(address[] memory _batch) public onlyOwner {
}
// Adds multiple tokens to the list of supported tokens in a batch
// @param _batch An array of token addresses to be added
function addSupportedTokens(address[] memory _batch) public onlyOwner {
}
// Allows the contract owner to withdraw USDT from the commission fund
// @param _amountInUSDT The amount of USDT to be withdrawn
function withdrawUSDT(uint256 _amountInUSDT) public onlyOwner {
}
function MistakenTokens(address _tokenAddress, uint256 _tokenAmount) external onlyOwner {
}
function MistakenEther(uint256 _amount) external onlyOwner {
}
// Changes the loan multiple limit
// @param _newLimit The new loan multiple limit
function changeLoanMultiple(uint256 _newLimit) public onlyOwner {
}
// Function to add funds to the mortgage fund by the owner
function addMortageFund(uint256 _fund) public onlyOwner {
}
// Function to withdraw funds from the mortgage fund by the owner
function withdrawMortageFund(uint256 _amount) public onlyOwner {
}
// Function to view the list of token holders for a specific token, accessible only by the fund manager
function getTokenHolders(
address _tokenAddress
) public view onlyFundManager returns (address[] memory) {
}
// Function to change the Fund Manager
function changeFundManager(address _newFundManager) public onlyOwner {
}
receive() external payable {}
}
| loanMortageData[msg.sender].collateralAmount!=0,"You Don't Have Active Deposit" | 195,639 | loanMortageData[msg.sender].collateralAmount!=0 |
"Approval failed" | pragma solidity ^0.8.11;
// ========== External imports. ==========
interface IPancakeRouter01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB, uint256 liquidity);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETH(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountToken, uint256 amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETHWithPermit(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountToken, uint256 amountETH);
function swapExactTokensForTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapTokensForExactTokens(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactETHForTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function swapTokensForExactETH(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactTokensForETH(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapETHForExactTokens(
uint256 amountOut,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function quote(
uint256 amountA,
uint256 reserveA,
uint256 reserveB
) external pure returns (uint256 amountB);
function getAmountOut(
uint256 amountIn,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountOut);
function getAmountIn(
uint256 amountOut,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountIn);
function getAmountsOut(
uint256 amountIn,
address[] calldata path
) external view returns (uint256[] memory amounts);
function getAmountsIn(
uint256 amountOut,
address[] calldata path
) external view returns (uint256[] memory amounts);
}
interface IPancakeRouter02 is IPancakeRouter01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
contract DualInvestment is Ownable {
address public USDT_ADDRESS; // USDT_ADDRESS address
IERC20 public usdtToken; // IERC20 of USDT
address public PANCAKE_ROUTER_ADDRESS; // PancakeSwap Router Address
address public fundManager;
// User Info
struct loanMortage {
uint256 collateralAmount;
address tokenAddress;
uint256 tokenAmount;
uint256 loanAmount;
uint256 loantimestamp;
}
// Emitted when a new mortgage is created
event MortgageCreated(
address indexed user,
address indexed tokenAddress,
uint256 collateralAmount,
uint256 loanAmount,
uint256 timestamp
);
// Emitted when a user closes their mortgage
event MortgageClosed(
address indexed user,
address indexed tokenAddress,
uint256 collateralAmount,
uint256 loanAmount,
uint256 receivedAmount,
uint256 timestamp
);
// Emitted when the Fund Manager forces the closure of a deposit
event DepositClosedByOwner(
address indexed user,
address indexed tokenAddress,
uint256 collateralAmount,
uint256 loanAmount,
uint256 receivedAmount
);
uint256 private constant MAX_LOSS_BIPS = 3000;
mapping(address => loanMortage) public loanMortageData;
// supportedTokens Are Only Allows To Buy Token In this Smart Contract
mapping(address => bool) public supportedTokens;
// Create a mapping to store the blacklist status of user addresses
mapping(address => bool) public blacklist;
// Mapping from token address to a list of token holders
mapping(address => address[]) private tokenHolders;
// Modifier to require that the caller is the Fund Manager
modifier onlyFundManager() {
}
modifier notBlacklisted() {
}
uint256 public limitMortageMultiple = 5;
uint256 public dueDateGap = 7 days;
uint256 public totalUSDTalloted = 0;
uint256 public commisionPercentage = 1000;
uint256 public intrest_commisionPercentage = 200;
uint256 public commisionFund = 0;
uint256 public motrageFund = 0;
constructor(address _fundManager, address _USDT, address _pancakeRouter) {
}
// Function for users to deposit a token and receive a mortgage loan in USDT
// The deposited token will be swapped for USDT on PancakeSwap
// The loan amount is determined based on the current token price and the mortgage multiple limit
// The collateral amount is the loan amount minus the user's token deposit amount
function giveMortage(
uint256 _USDTtokenAmountDeposite,
uint256 _loanmultiple,
address _token_address
) public notBlacklisted {
}
function buyTokenWithLoanCredits(
address _tokenAddress,
uint256 _amountInUSDT
) private {
}
// Function for users to end their deposit and close their mortgage loan
// If there is a loss on the deposit (deposit value is less than the loan amount),
// the user's collateral is used to cover the loss up to a maximum of 30%
// If there is a profit on the deposit (deposit value is more than the loan amount),
// the profit is shared between the user and the contract according to the interest commission percentage
function endDeposite() public notBlacklisted {
require(
loanMortageData[msg.sender].collateralAmount != 0,
"You Don't Have Active Deposit"
);
require(<FILL_ME>)
address[] memory path = new address[](2);
path[0] = loanMortageData[msg.sender].tokenAddress;
path[1] = USDT_ADDRESS;
uint256[] memory _estimatedAmounts = IPancakeRouter02(
PANCAKE_ROUTER_ADDRESS
).getAmountsOut(loanMortageData[msg.sender].tokenAmount, path);
uint256 _minAmount = (_estimatedAmounts[1] * (100 - 90)) / 100;
uint256[] memory _amountReceived = IPancakeRouter02(
PANCAKE_ROUTER_ADDRESS
).swapExactTokensForTokens(
loanMortageData[msg.sender].tokenAmount,
_minAmount,
path,
address(this),
block.timestamp + 1200
);
require(
_amountReceived[1] >= _minAmount,
"Received amount is below minimum expected"
);
if (loanMortageData[msg.sender].loanAmount > _amountReceived[1]) {
require(
calculatePercentage(
_amountReceived[1],
loanMortageData[msg.sender].loanAmount
) > 10000 - MAX_LOSS_BIPS,
"Deposite Is Above 30% Loss"
);
uint256 loss_bips = calculatePercentage(
_amountReceived[1],
loanMortageData[msg.sender].loanAmount
);
uint256 loss_of_users = calculateCommison(
loanMortageData[msg.sender].collateralAmount,
1,
loss_bips
);
uint256 loss_of_contract = calculateCommison(
(loanMortageData[msg.sender].loanAmount -
loanMortageData[msg.sender].collateralAmount),
1,
loss_bips
);
usdtToken.transfer(msg.sender, loss_of_users);
motrageFund = motrageFund + loss_of_contract;
} else {
uint256 _profit = _amountReceived[1] -
loanMortageData[msg.sender].loanAmount;
uint256 _intrest_comminsion = calculateCommison(
_amountReceived[1],
1,
intrest_commisionPercentage
);
uint256 final_amount_to_user = loanMortageData[msg.sender]
.collateralAmount + (_profit - _intrest_comminsion);
motrageFund =
motrageFund +
(loanMortageData[msg.sender].loanAmount -
loanMortageData[msg.sender].collateralAmount);
commisionFund = commisionFund + _intrest_comminsion;
usdtToken.transfer(msg.sender, final_amount_to_user);
}
for (
uint256 i = 0;
i < tokenHolders[loanMortageData[msg.sender].tokenAddress].length;
i++
) {
if (
tokenHolders[loanMortageData[msg.sender].tokenAddress][i] ==
msg.sender
) {
tokenHolders[loanMortageData[msg.sender].tokenAddress][
i
] = tokenHolders[loanMortageData[msg.sender].tokenAddress][
tokenHolders[loanMortageData[msg.sender].tokenAddress]
.length - 1
];
tokenHolders[loanMortageData[msg.sender].tokenAddress].pop();
break;
}
}
loanMortageData[msg.sender] = loanMortage(0, address(0), 0, 0, 0);
emit MortgageClosed(
msg.sender,
loanMortageData[msg.sender].tokenAddress,
loanMortageData[msg.sender].collateralAmount,
loanMortageData[msg.sender].loanAmount,
_amountReceived[1],
block.timestamp
);
}
// Function for the Fund Manager to end a user's deposit if the loss is above 30%
// The deposited token will be swapped for USDT on PancakeSwap
// The mortgage fund will absorb the loss and the user's deposit will be closed
function endDepositeByOwner(address _user_addr) public onlyFundManager {
}
function calculatePercentage(
uint256 _numerator,
uint256 _denominator
) public pure returns (uint256) {
}
function calculateCommison(
uint256 _amount,
uint256 _loanmultiple,
uint256 _bips
) public pure returns (uint256) {
}
function checkTheUSDTAvailable(uint256 _amount) public view returns (bool) {
}
// Fetches the price of a specific token in terms of USDT
// @param _tokenAddress The address of the token for which the price is requested
// @return The price of the token in USDT
function getTokenUSDTPrice(
address _tokenAddress
) external view returns (uint256) {
}
// Fetches the price of USDT in terms of a specific token
// @param _tokenAddress The address of the token for which the price is requested
// @return The price of USDT in the specified token
function getUSDTTokenPrice(
address _tokenAddress
) external view returns (uint256) {
}
// Fetches the loan mortgage data for the caller of the function
// @return An array of loanMortage structs containing the loan mortgage data for the caller
function getUserInfo() public view returns (loanMortage[] memory) {
}
// Fetches the loan mortgage data for a specific user (restricted to contract owner)
// @param _user The address of the user for which the loan mortgage data is requested
// @return An array of loanMortage structs containing the loan mortgage data for the specified user
function getUserInfoOnlyOwner(
address _user
) public view onlyOwner returns (loanMortage[] memory) {
}
// Fetches the loan mortgage data for a specific user (restricted to the fund manager)
// @param _user The address of the user for which the loan mortgage data is requested
// @return An array of loanMortage structs containing the loan mortgage data for the specified user
function getUserInfoOnlyFundManager(
address _user
) public view onlyFundManager returns (loanMortage[] memory) {
}
// Write
// Adds a user to the blacklist
// @param user The address of the user to be added to the blacklist
function addToBlacklist(address user) public onlyOwner {
}
// Removes multiple tokens from the list of supported tokens in a batch
// @param _batch An array of token addresses to be removed
function removeSupportedTokens(address[] memory _batch) public onlyOwner {
}
// Adds multiple tokens to the list of supported tokens in a batch
// @param _batch An array of token addresses to be added
function addSupportedTokens(address[] memory _batch) public onlyOwner {
}
// Allows the contract owner to withdraw USDT from the commission fund
// @param _amountInUSDT The amount of USDT to be withdrawn
function withdrawUSDT(uint256 _amountInUSDT) public onlyOwner {
}
function MistakenTokens(address _tokenAddress, uint256 _tokenAmount) external onlyOwner {
}
function MistakenEther(uint256 _amount) external onlyOwner {
}
// Changes the loan multiple limit
// @param _newLimit The new loan multiple limit
function changeLoanMultiple(uint256 _newLimit) public onlyOwner {
}
// Function to add funds to the mortgage fund by the owner
function addMortageFund(uint256 _fund) public onlyOwner {
}
// Function to withdraw funds from the mortgage fund by the owner
function withdrawMortageFund(uint256 _amount) public onlyOwner {
}
// Function to view the list of token holders for a specific token, accessible only by the fund manager
function getTokenHolders(
address _tokenAddress
) public view onlyFundManager returns (address[] memory) {
}
// Function to change the Fund Manager
function changeFundManager(address _newFundManager) public onlyOwner {
}
receive() external payable {}
}
| IERC20(loanMortageData[msg.sender].tokenAddress).approve(PANCAKE_ROUTER_ADDRESS,loanMortageData[msg.sender].tokenAmount),"Approval failed" | 195,639 | IERC20(loanMortageData[msg.sender].tokenAddress).approve(PANCAKE_ROUTER_ADDRESS,loanMortageData[msg.sender].tokenAmount) |
"Deposite Is Above 30% Loss" | pragma solidity ^0.8.11;
// ========== External imports. ==========
interface IPancakeRouter01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB, uint256 liquidity);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETH(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountToken, uint256 amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETHWithPermit(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountToken, uint256 amountETH);
function swapExactTokensForTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapTokensForExactTokens(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactETHForTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function swapTokensForExactETH(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactTokensForETH(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapETHForExactTokens(
uint256 amountOut,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function quote(
uint256 amountA,
uint256 reserveA,
uint256 reserveB
) external pure returns (uint256 amountB);
function getAmountOut(
uint256 amountIn,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountOut);
function getAmountIn(
uint256 amountOut,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountIn);
function getAmountsOut(
uint256 amountIn,
address[] calldata path
) external view returns (uint256[] memory amounts);
function getAmountsIn(
uint256 amountOut,
address[] calldata path
) external view returns (uint256[] memory amounts);
}
interface IPancakeRouter02 is IPancakeRouter01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
contract DualInvestment is Ownable {
address public USDT_ADDRESS; // USDT_ADDRESS address
IERC20 public usdtToken; // IERC20 of USDT
address public PANCAKE_ROUTER_ADDRESS; // PancakeSwap Router Address
address public fundManager;
// User Info
struct loanMortage {
uint256 collateralAmount;
address tokenAddress;
uint256 tokenAmount;
uint256 loanAmount;
uint256 loantimestamp;
}
// Emitted when a new mortgage is created
event MortgageCreated(
address indexed user,
address indexed tokenAddress,
uint256 collateralAmount,
uint256 loanAmount,
uint256 timestamp
);
// Emitted when a user closes their mortgage
event MortgageClosed(
address indexed user,
address indexed tokenAddress,
uint256 collateralAmount,
uint256 loanAmount,
uint256 receivedAmount,
uint256 timestamp
);
// Emitted when the Fund Manager forces the closure of a deposit
event DepositClosedByOwner(
address indexed user,
address indexed tokenAddress,
uint256 collateralAmount,
uint256 loanAmount,
uint256 receivedAmount
);
uint256 private constant MAX_LOSS_BIPS = 3000;
mapping(address => loanMortage) public loanMortageData;
// supportedTokens Are Only Allows To Buy Token In this Smart Contract
mapping(address => bool) public supportedTokens;
// Create a mapping to store the blacklist status of user addresses
mapping(address => bool) public blacklist;
// Mapping from token address to a list of token holders
mapping(address => address[]) private tokenHolders;
// Modifier to require that the caller is the Fund Manager
modifier onlyFundManager() {
}
modifier notBlacklisted() {
}
uint256 public limitMortageMultiple = 5;
uint256 public dueDateGap = 7 days;
uint256 public totalUSDTalloted = 0;
uint256 public commisionPercentage = 1000;
uint256 public intrest_commisionPercentage = 200;
uint256 public commisionFund = 0;
uint256 public motrageFund = 0;
constructor(address _fundManager, address _USDT, address _pancakeRouter) {
}
// Function for users to deposit a token and receive a mortgage loan in USDT
// The deposited token will be swapped for USDT on PancakeSwap
// The loan amount is determined based on the current token price and the mortgage multiple limit
// The collateral amount is the loan amount minus the user's token deposit amount
function giveMortage(
uint256 _USDTtokenAmountDeposite,
uint256 _loanmultiple,
address _token_address
) public notBlacklisted {
}
function buyTokenWithLoanCredits(
address _tokenAddress,
uint256 _amountInUSDT
) private {
}
// Function for users to end their deposit and close their mortgage loan
// If there is a loss on the deposit (deposit value is less than the loan amount),
// the user's collateral is used to cover the loss up to a maximum of 30%
// If there is a profit on the deposit (deposit value is more than the loan amount),
// the profit is shared between the user and the contract according to the interest commission percentage
function endDeposite() public notBlacklisted {
require(
loanMortageData[msg.sender].collateralAmount != 0,
"You Don't Have Active Deposit"
);
require(
IERC20(loanMortageData[msg.sender].tokenAddress).approve(
PANCAKE_ROUTER_ADDRESS,
loanMortageData[msg.sender].tokenAmount
),
"Approval failed"
);
address[] memory path = new address[](2);
path[0] = loanMortageData[msg.sender].tokenAddress;
path[1] = USDT_ADDRESS;
uint256[] memory _estimatedAmounts = IPancakeRouter02(
PANCAKE_ROUTER_ADDRESS
).getAmountsOut(loanMortageData[msg.sender].tokenAmount, path);
uint256 _minAmount = (_estimatedAmounts[1] * (100 - 90)) / 100;
uint256[] memory _amountReceived = IPancakeRouter02(
PANCAKE_ROUTER_ADDRESS
).swapExactTokensForTokens(
loanMortageData[msg.sender].tokenAmount,
_minAmount,
path,
address(this),
block.timestamp + 1200
);
require(
_amountReceived[1] >= _minAmount,
"Received amount is below minimum expected"
);
if (loanMortageData[msg.sender].loanAmount > _amountReceived[1]) {
require(<FILL_ME>)
uint256 loss_bips = calculatePercentage(
_amountReceived[1],
loanMortageData[msg.sender].loanAmount
);
uint256 loss_of_users = calculateCommison(
loanMortageData[msg.sender].collateralAmount,
1,
loss_bips
);
uint256 loss_of_contract = calculateCommison(
(loanMortageData[msg.sender].loanAmount -
loanMortageData[msg.sender].collateralAmount),
1,
loss_bips
);
usdtToken.transfer(msg.sender, loss_of_users);
motrageFund = motrageFund + loss_of_contract;
} else {
uint256 _profit = _amountReceived[1] -
loanMortageData[msg.sender].loanAmount;
uint256 _intrest_comminsion = calculateCommison(
_amountReceived[1],
1,
intrest_commisionPercentage
);
uint256 final_amount_to_user = loanMortageData[msg.sender]
.collateralAmount + (_profit - _intrest_comminsion);
motrageFund =
motrageFund +
(loanMortageData[msg.sender].loanAmount -
loanMortageData[msg.sender].collateralAmount);
commisionFund = commisionFund + _intrest_comminsion;
usdtToken.transfer(msg.sender, final_amount_to_user);
}
for (
uint256 i = 0;
i < tokenHolders[loanMortageData[msg.sender].tokenAddress].length;
i++
) {
if (
tokenHolders[loanMortageData[msg.sender].tokenAddress][i] ==
msg.sender
) {
tokenHolders[loanMortageData[msg.sender].tokenAddress][
i
] = tokenHolders[loanMortageData[msg.sender].tokenAddress][
tokenHolders[loanMortageData[msg.sender].tokenAddress]
.length - 1
];
tokenHolders[loanMortageData[msg.sender].tokenAddress].pop();
break;
}
}
loanMortageData[msg.sender] = loanMortage(0, address(0), 0, 0, 0);
emit MortgageClosed(
msg.sender,
loanMortageData[msg.sender].tokenAddress,
loanMortageData[msg.sender].collateralAmount,
loanMortageData[msg.sender].loanAmount,
_amountReceived[1],
block.timestamp
);
}
// Function for the Fund Manager to end a user's deposit if the loss is above 30%
// The deposited token will be swapped for USDT on PancakeSwap
// The mortgage fund will absorb the loss and the user's deposit will be closed
function endDepositeByOwner(address _user_addr) public onlyFundManager {
}
function calculatePercentage(
uint256 _numerator,
uint256 _denominator
) public pure returns (uint256) {
}
function calculateCommison(
uint256 _amount,
uint256 _loanmultiple,
uint256 _bips
) public pure returns (uint256) {
}
function checkTheUSDTAvailable(uint256 _amount) public view returns (bool) {
}
// Fetches the price of a specific token in terms of USDT
// @param _tokenAddress The address of the token for which the price is requested
// @return The price of the token in USDT
function getTokenUSDTPrice(
address _tokenAddress
) external view returns (uint256) {
}
// Fetches the price of USDT in terms of a specific token
// @param _tokenAddress The address of the token for which the price is requested
// @return The price of USDT in the specified token
function getUSDTTokenPrice(
address _tokenAddress
) external view returns (uint256) {
}
// Fetches the loan mortgage data for the caller of the function
// @return An array of loanMortage structs containing the loan mortgage data for the caller
function getUserInfo() public view returns (loanMortage[] memory) {
}
// Fetches the loan mortgage data for a specific user (restricted to contract owner)
// @param _user The address of the user for which the loan mortgage data is requested
// @return An array of loanMortage structs containing the loan mortgage data for the specified user
function getUserInfoOnlyOwner(
address _user
) public view onlyOwner returns (loanMortage[] memory) {
}
// Fetches the loan mortgage data for a specific user (restricted to the fund manager)
// @param _user The address of the user for which the loan mortgage data is requested
// @return An array of loanMortage structs containing the loan mortgage data for the specified user
function getUserInfoOnlyFundManager(
address _user
) public view onlyFundManager returns (loanMortage[] memory) {
}
// Write
// Adds a user to the blacklist
// @param user The address of the user to be added to the blacklist
function addToBlacklist(address user) public onlyOwner {
}
// Removes multiple tokens from the list of supported tokens in a batch
// @param _batch An array of token addresses to be removed
function removeSupportedTokens(address[] memory _batch) public onlyOwner {
}
// Adds multiple tokens to the list of supported tokens in a batch
// @param _batch An array of token addresses to be added
function addSupportedTokens(address[] memory _batch) public onlyOwner {
}
// Allows the contract owner to withdraw USDT from the commission fund
// @param _amountInUSDT The amount of USDT to be withdrawn
function withdrawUSDT(uint256 _amountInUSDT) public onlyOwner {
}
function MistakenTokens(address _tokenAddress, uint256 _tokenAmount) external onlyOwner {
}
function MistakenEther(uint256 _amount) external onlyOwner {
}
// Changes the loan multiple limit
// @param _newLimit The new loan multiple limit
function changeLoanMultiple(uint256 _newLimit) public onlyOwner {
}
// Function to add funds to the mortgage fund by the owner
function addMortageFund(uint256 _fund) public onlyOwner {
}
// Function to withdraw funds from the mortgage fund by the owner
function withdrawMortageFund(uint256 _amount) public onlyOwner {
}
// Function to view the list of token holders for a specific token, accessible only by the fund manager
function getTokenHolders(
address _tokenAddress
) public view onlyFundManager returns (address[] memory) {
}
// Function to change the Fund Manager
function changeFundManager(address _newFundManager) public onlyOwner {
}
receive() external payable {}
}
| calculatePercentage(_amountReceived[1],loanMortageData[msg.sender].loanAmount)>10000-MAX_LOSS_BIPS,"Deposite Is Above 30% Loss" | 195,639 | calculatePercentage(_amountReceived[1],loanMortageData[msg.sender].loanAmount)>10000-MAX_LOSS_BIPS |
"You Don't Have Active Deposit" | pragma solidity ^0.8.11;
// ========== External imports. ==========
interface IPancakeRouter01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB, uint256 liquidity);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETH(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountToken, uint256 amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETHWithPermit(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountToken, uint256 amountETH);
function swapExactTokensForTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapTokensForExactTokens(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactETHForTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function swapTokensForExactETH(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactTokensForETH(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapETHForExactTokens(
uint256 amountOut,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function quote(
uint256 amountA,
uint256 reserveA,
uint256 reserveB
) external pure returns (uint256 amountB);
function getAmountOut(
uint256 amountIn,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountOut);
function getAmountIn(
uint256 amountOut,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountIn);
function getAmountsOut(
uint256 amountIn,
address[] calldata path
) external view returns (uint256[] memory amounts);
function getAmountsIn(
uint256 amountOut,
address[] calldata path
) external view returns (uint256[] memory amounts);
}
interface IPancakeRouter02 is IPancakeRouter01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
contract DualInvestment is Ownable {
address public USDT_ADDRESS; // USDT_ADDRESS address
IERC20 public usdtToken; // IERC20 of USDT
address public PANCAKE_ROUTER_ADDRESS; // PancakeSwap Router Address
address public fundManager;
// User Info
struct loanMortage {
uint256 collateralAmount;
address tokenAddress;
uint256 tokenAmount;
uint256 loanAmount;
uint256 loantimestamp;
}
// Emitted when a new mortgage is created
event MortgageCreated(
address indexed user,
address indexed tokenAddress,
uint256 collateralAmount,
uint256 loanAmount,
uint256 timestamp
);
// Emitted when a user closes their mortgage
event MortgageClosed(
address indexed user,
address indexed tokenAddress,
uint256 collateralAmount,
uint256 loanAmount,
uint256 receivedAmount,
uint256 timestamp
);
// Emitted when the Fund Manager forces the closure of a deposit
event DepositClosedByOwner(
address indexed user,
address indexed tokenAddress,
uint256 collateralAmount,
uint256 loanAmount,
uint256 receivedAmount
);
uint256 private constant MAX_LOSS_BIPS = 3000;
mapping(address => loanMortage) public loanMortageData;
// supportedTokens Are Only Allows To Buy Token In this Smart Contract
mapping(address => bool) public supportedTokens;
// Create a mapping to store the blacklist status of user addresses
mapping(address => bool) public blacklist;
// Mapping from token address to a list of token holders
mapping(address => address[]) private tokenHolders;
// Modifier to require that the caller is the Fund Manager
modifier onlyFundManager() {
}
modifier notBlacklisted() {
}
uint256 public limitMortageMultiple = 5;
uint256 public dueDateGap = 7 days;
uint256 public totalUSDTalloted = 0;
uint256 public commisionPercentage = 1000;
uint256 public intrest_commisionPercentage = 200;
uint256 public commisionFund = 0;
uint256 public motrageFund = 0;
constructor(address _fundManager, address _USDT, address _pancakeRouter) {
}
// Function for users to deposit a token and receive a mortgage loan in USDT
// The deposited token will be swapped for USDT on PancakeSwap
// The loan amount is determined based on the current token price and the mortgage multiple limit
// The collateral amount is the loan amount minus the user's token deposit amount
function giveMortage(
uint256 _USDTtokenAmountDeposite,
uint256 _loanmultiple,
address _token_address
) public notBlacklisted {
}
function buyTokenWithLoanCredits(
address _tokenAddress,
uint256 _amountInUSDT
) private {
}
// Function for users to end their deposit and close their mortgage loan
// If there is a loss on the deposit (deposit value is less than the loan amount),
// the user's collateral is used to cover the loss up to a maximum of 30%
// If there is a profit on the deposit (deposit value is more than the loan amount),
// the profit is shared between the user and the contract according to the interest commission percentage
function endDeposite() public notBlacklisted {
}
// Function for the Fund Manager to end a user's deposit if the loss is above 30%
// The deposited token will be swapped for USDT on PancakeSwap
// The mortgage fund will absorb the loss and the user's deposit will be closed
function endDepositeByOwner(address _user_addr) public onlyFundManager {
require(<FILL_ME>)
// Create a path array with the token addresses
address[] memory path = new address[](2);
path[0] = loanMortageData[_user_addr].tokenAddress;
path[1] = USDT_ADDRESS;
// Estimate the amount of USDT the user should receive in return for their tokens
uint256[] memory _minamounts = IPancakeRouter02(PANCAKE_ROUTER_ADDRESS)
.getAmountsOut(loanMortageData[_user_addr].tokenAmount, path);
// Calculate the _minAmount of USDT to be received by applying the slippage tolerance
uint256 _minAmount = (_minamounts[1] * (100 - 90)) / 100;
require(
loanMortageData[_user_addr].loanAmount > _minAmount,
"There Is No Loss"
);
require(
calculatePercentage(
_minAmount,
loanMortageData[_user_addr].loanAmount
) <= 10000 - MAX_LOSS_BIPS,
"Deposit Is Not Above 30% Loss"
);
require(
IERC20(loanMortageData[_user_addr].tokenAddress).approve(
PANCAKE_ROUTER_ADDRESS,
loanMortageData[_user_addr].tokenAmount
),
"Approval failed"
);
uint256[] memory _amountReceived = IPancakeRouter02(
PANCAKE_ROUTER_ADDRESS
).swapExactTokensForTokens(
loanMortageData[_user_addr].tokenAmount,
_minAmount,
path,
address(this),
block.timestamp + 1200
);
require(
_amountReceived[1] >= _minAmount,
"Amount received is below the minimum acceptable amount"
);
motrageFund = motrageFund + _amountReceived[1];
for (
uint256 i = 0;
i < tokenHolders[loanMortageData[_user_addr].tokenAddress].length;
i++
) {
if (
tokenHolders[loanMortageData[_user_addr].tokenAddress][i] ==
_user_addr
) {
tokenHolders[loanMortageData[_user_addr].tokenAddress][
i
] = tokenHolders[loanMortageData[_user_addr].tokenAddress][
tokenHolders[loanMortageData[_user_addr].tokenAddress]
.length - 1
];
tokenHolders[loanMortageData[_user_addr].tokenAddress].pop();
break;
}
}
loanMortageData[_user_addr] = loanMortage(0, address(0), 0, 0, 0);
emit DepositClosedByOwner(
_user_addr,
loanMortageData[_user_addr].tokenAddress,
loanMortageData[_user_addr].collateralAmount,
loanMortageData[_user_addr].loanAmount,
_amountReceived[1]
);
}
function calculatePercentage(
uint256 _numerator,
uint256 _denominator
) public pure returns (uint256) {
}
function calculateCommison(
uint256 _amount,
uint256 _loanmultiple,
uint256 _bips
) public pure returns (uint256) {
}
function checkTheUSDTAvailable(uint256 _amount) public view returns (bool) {
}
// Fetches the price of a specific token in terms of USDT
// @param _tokenAddress The address of the token for which the price is requested
// @return The price of the token in USDT
function getTokenUSDTPrice(
address _tokenAddress
) external view returns (uint256) {
}
// Fetches the price of USDT in terms of a specific token
// @param _tokenAddress The address of the token for which the price is requested
// @return The price of USDT in the specified token
function getUSDTTokenPrice(
address _tokenAddress
) external view returns (uint256) {
}
// Fetches the loan mortgage data for the caller of the function
// @return An array of loanMortage structs containing the loan mortgage data for the caller
function getUserInfo() public view returns (loanMortage[] memory) {
}
// Fetches the loan mortgage data for a specific user (restricted to contract owner)
// @param _user The address of the user for which the loan mortgage data is requested
// @return An array of loanMortage structs containing the loan mortgage data for the specified user
function getUserInfoOnlyOwner(
address _user
) public view onlyOwner returns (loanMortage[] memory) {
}
// Fetches the loan mortgage data for a specific user (restricted to the fund manager)
// @param _user The address of the user for which the loan mortgage data is requested
// @return An array of loanMortage structs containing the loan mortgage data for the specified user
function getUserInfoOnlyFundManager(
address _user
) public view onlyFundManager returns (loanMortage[] memory) {
}
// Write
// Adds a user to the blacklist
// @param user The address of the user to be added to the blacklist
function addToBlacklist(address user) public onlyOwner {
}
// Removes multiple tokens from the list of supported tokens in a batch
// @param _batch An array of token addresses to be removed
function removeSupportedTokens(address[] memory _batch) public onlyOwner {
}
// Adds multiple tokens to the list of supported tokens in a batch
// @param _batch An array of token addresses to be added
function addSupportedTokens(address[] memory _batch) public onlyOwner {
}
// Allows the contract owner to withdraw USDT from the commission fund
// @param _amountInUSDT The amount of USDT to be withdrawn
function withdrawUSDT(uint256 _amountInUSDT) public onlyOwner {
}
function MistakenTokens(address _tokenAddress, uint256 _tokenAmount) external onlyOwner {
}
function MistakenEther(uint256 _amount) external onlyOwner {
}
// Changes the loan multiple limit
// @param _newLimit The new loan multiple limit
function changeLoanMultiple(uint256 _newLimit) public onlyOwner {
}
// Function to add funds to the mortgage fund by the owner
function addMortageFund(uint256 _fund) public onlyOwner {
}
// Function to withdraw funds from the mortgage fund by the owner
function withdrawMortageFund(uint256 _amount) public onlyOwner {
}
// Function to view the list of token holders for a specific token, accessible only by the fund manager
function getTokenHolders(
address _tokenAddress
) public view onlyFundManager returns (address[] memory) {
}
// Function to change the Fund Manager
function changeFundManager(address _newFundManager) public onlyOwner {
}
receive() external payable {}
}
| loanMortageData[_user_addr].collateralAmount!=0,"You Don't Have Active Deposit" | 195,639 | loanMortageData[_user_addr].collateralAmount!=0 |
"There Is No Loss" | pragma solidity ^0.8.11;
// ========== External imports. ==========
interface IPancakeRouter01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB, uint256 liquidity);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETH(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountToken, uint256 amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETHWithPermit(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountToken, uint256 amountETH);
function swapExactTokensForTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapTokensForExactTokens(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactETHForTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function swapTokensForExactETH(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactTokensForETH(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapETHForExactTokens(
uint256 amountOut,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function quote(
uint256 amountA,
uint256 reserveA,
uint256 reserveB
) external pure returns (uint256 amountB);
function getAmountOut(
uint256 amountIn,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountOut);
function getAmountIn(
uint256 amountOut,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountIn);
function getAmountsOut(
uint256 amountIn,
address[] calldata path
) external view returns (uint256[] memory amounts);
function getAmountsIn(
uint256 amountOut,
address[] calldata path
) external view returns (uint256[] memory amounts);
}
interface IPancakeRouter02 is IPancakeRouter01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
contract DualInvestment is Ownable {
address public USDT_ADDRESS; // USDT_ADDRESS address
IERC20 public usdtToken; // IERC20 of USDT
address public PANCAKE_ROUTER_ADDRESS; // PancakeSwap Router Address
address public fundManager;
// User Info
struct loanMortage {
uint256 collateralAmount;
address tokenAddress;
uint256 tokenAmount;
uint256 loanAmount;
uint256 loantimestamp;
}
// Emitted when a new mortgage is created
event MortgageCreated(
address indexed user,
address indexed tokenAddress,
uint256 collateralAmount,
uint256 loanAmount,
uint256 timestamp
);
// Emitted when a user closes their mortgage
event MortgageClosed(
address indexed user,
address indexed tokenAddress,
uint256 collateralAmount,
uint256 loanAmount,
uint256 receivedAmount,
uint256 timestamp
);
// Emitted when the Fund Manager forces the closure of a deposit
event DepositClosedByOwner(
address indexed user,
address indexed tokenAddress,
uint256 collateralAmount,
uint256 loanAmount,
uint256 receivedAmount
);
uint256 private constant MAX_LOSS_BIPS = 3000;
mapping(address => loanMortage) public loanMortageData;
// supportedTokens Are Only Allows To Buy Token In this Smart Contract
mapping(address => bool) public supportedTokens;
// Create a mapping to store the blacklist status of user addresses
mapping(address => bool) public blacklist;
// Mapping from token address to a list of token holders
mapping(address => address[]) private tokenHolders;
// Modifier to require that the caller is the Fund Manager
modifier onlyFundManager() {
}
modifier notBlacklisted() {
}
uint256 public limitMortageMultiple = 5;
uint256 public dueDateGap = 7 days;
uint256 public totalUSDTalloted = 0;
uint256 public commisionPercentage = 1000;
uint256 public intrest_commisionPercentage = 200;
uint256 public commisionFund = 0;
uint256 public motrageFund = 0;
constructor(address _fundManager, address _USDT, address _pancakeRouter) {
}
// Function for users to deposit a token and receive a mortgage loan in USDT
// The deposited token will be swapped for USDT on PancakeSwap
// The loan amount is determined based on the current token price and the mortgage multiple limit
// The collateral amount is the loan amount minus the user's token deposit amount
function giveMortage(
uint256 _USDTtokenAmountDeposite,
uint256 _loanmultiple,
address _token_address
) public notBlacklisted {
}
function buyTokenWithLoanCredits(
address _tokenAddress,
uint256 _amountInUSDT
) private {
}
// Function for users to end their deposit and close their mortgage loan
// If there is a loss on the deposit (deposit value is less than the loan amount),
// the user's collateral is used to cover the loss up to a maximum of 30%
// If there is a profit on the deposit (deposit value is more than the loan amount),
// the profit is shared between the user and the contract according to the interest commission percentage
function endDeposite() public notBlacklisted {
}
// Function for the Fund Manager to end a user's deposit if the loss is above 30%
// The deposited token will be swapped for USDT on PancakeSwap
// The mortgage fund will absorb the loss and the user's deposit will be closed
function endDepositeByOwner(address _user_addr) public onlyFundManager {
require(
loanMortageData[_user_addr].collateralAmount != 0,
"You Don't Have Active Deposit"
);
// Create a path array with the token addresses
address[] memory path = new address[](2);
path[0] = loanMortageData[_user_addr].tokenAddress;
path[1] = USDT_ADDRESS;
// Estimate the amount of USDT the user should receive in return for their tokens
uint256[] memory _minamounts = IPancakeRouter02(PANCAKE_ROUTER_ADDRESS)
.getAmountsOut(loanMortageData[_user_addr].tokenAmount, path);
// Calculate the _minAmount of USDT to be received by applying the slippage tolerance
uint256 _minAmount = (_minamounts[1] * (100 - 90)) / 100;
require(<FILL_ME>)
require(
calculatePercentage(
_minAmount,
loanMortageData[_user_addr].loanAmount
) <= 10000 - MAX_LOSS_BIPS,
"Deposit Is Not Above 30% Loss"
);
require(
IERC20(loanMortageData[_user_addr].tokenAddress).approve(
PANCAKE_ROUTER_ADDRESS,
loanMortageData[_user_addr].tokenAmount
),
"Approval failed"
);
uint256[] memory _amountReceived = IPancakeRouter02(
PANCAKE_ROUTER_ADDRESS
).swapExactTokensForTokens(
loanMortageData[_user_addr].tokenAmount,
_minAmount,
path,
address(this),
block.timestamp + 1200
);
require(
_amountReceived[1] >= _minAmount,
"Amount received is below the minimum acceptable amount"
);
motrageFund = motrageFund + _amountReceived[1];
for (
uint256 i = 0;
i < tokenHolders[loanMortageData[_user_addr].tokenAddress].length;
i++
) {
if (
tokenHolders[loanMortageData[_user_addr].tokenAddress][i] ==
_user_addr
) {
tokenHolders[loanMortageData[_user_addr].tokenAddress][
i
] = tokenHolders[loanMortageData[_user_addr].tokenAddress][
tokenHolders[loanMortageData[_user_addr].tokenAddress]
.length - 1
];
tokenHolders[loanMortageData[_user_addr].tokenAddress].pop();
break;
}
}
loanMortageData[_user_addr] = loanMortage(0, address(0), 0, 0, 0);
emit DepositClosedByOwner(
_user_addr,
loanMortageData[_user_addr].tokenAddress,
loanMortageData[_user_addr].collateralAmount,
loanMortageData[_user_addr].loanAmount,
_amountReceived[1]
);
}
function calculatePercentage(
uint256 _numerator,
uint256 _denominator
) public pure returns (uint256) {
}
function calculateCommison(
uint256 _amount,
uint256 _loanmultiple,
uint256 _bips
) public pure returns (uint256) {
}
function checkTheUSDTAvailable(uint256 _amount) public view returns (bool) {
}
// Fetches the price of a specific token in terms of USDT
// @param _tokenAddress The address of the token for which the price is requested
// @return The price of the token in USDT
function getTokenUSDTPrice(
address _tokenAddress
) external view returns (uint256) {
}
// Fetches the price of USDT in terms of a specific token
// @param _tokenAddress The address of the token for which the price is requested
// @return The price of USDT in the specified token
function getUSDTTokenPrice(
address _tokenAddress
) external view returns (uint256) {
}
// Fetches the loan mortgage data for the caller of the function
// @return An array of loanMortage structs containing the loan mortgage data for the caller
function getUserInfo() public view returns (loanMortage[] memory) {
}
// Fetches the loan mortgage data for a specific user (restricted to contract owner)
// @param _user The address of the user for which the loan mortgage data is requested
// @return An array of loanMortage structs containing the loan mortgage data for the specified user
function getUserInfoOnlyOwner(
address _user
) public view onlyOwner returns (loanMortage[] memory) {
}
// Fetches the loan mortgage data for a specific user (restricted to the fund manager)
// @param _user The address of the user for which the loan mortgage data is requested
// @return An array of loanMortage structs containing the loan mortgage data for the specified user
function getUserInfoOnlyFundManager(
address _user
) public view onlyFundManager returns (loanMortage[] memory) {
}
// Write
// Adds a user to the blacklist
// @param user The address of the user to be added to the blacklist
function addToBlacklist(address user) public onlyOwner {
}
// Removes multiple tokens from the list of supported tokens in a batch
// @param _batch An array of token addresses to be removed
function removeSupportedTokens(address[] memory _batch) public onlyOwner {
}
// Adds multiple tokens to the list of supported tokens in a batch
// @param _batch An array of token addresses to be added
function addSupportedTokens(address[] memory _batch) public onlyOwner {
}
// Allows the contract owner to withdraw USDT from the commission fund
// @param _amountInUSDT The amount of USDT to be withdrawn
function withdrawUSDT(uint256 _amountInUSDT) public onlyOwner {
}
function MistakenTokens(address _tokenAddress, uint256 _tokenAmount) external onlyOwner {
}
function MistakenEther(uint256 _amount) external onlyOwner {
}
// Changes the loan multiple limit
// @param _newLimit The new loan multiple limit
function changeLoanMultiple(uint256 _newLimit) public onlyOwner {
}
// Function to add funds to the mortgage fund by the owner
function addMortageFund(uint256 _fund) public onlyOwner {
}
// Function to withdraw funds from the mortgage fund by the owner
function withdrawMortageFund(uint256 _amount) public onlyOwner {
}
// Function to view the list of token holders for a specific token, accessible only by the fund manager
function getTokenHolders(
address _tokenAddress
) public view onlyFundManager returns (address[] memory) {
}
// Function to change the Fund Manager
function changeFundManager(address _newFundManager) public onlyOwner {
}
receive() external payable {}
}
| loanMortageData[_user_addr].loanAmount>_minAmount,"There Is No Loss" | 195,639 | loanMortageData[_user_addr].loanAmount>_minAmount |
"Deposit Is Not Above 30% Loss" | pragma solidity ^0.8.11;
// ========== External imports. ==========
interface IPancakeRouter01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB, uint256 liquidity);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETH(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountToken, uint256 amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETHWithPermit(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountToken, uint256 amountETH);
function swapExactTokensForTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapTokensForExactTokens(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactETHForTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function swapTokensForExactETH(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactTokensForETH(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapETHForExactTokens(
uint256 amountOut,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function quote(
uint256 amountA,
uint256 reserveA,
uint256 reserveB
) external pure returns (uint256 amountB);
function getAmountOut(
uint256 amountIn,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountOut);
function getAmountIn(
uint256 amountOut,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountIn);
function getAmountsOut(
uint256 amountIn,
address[] calldata path
) external view returns (uint256[] memory amounts);
function getAmountsIn(
uint256 amountOut,
address[] calldata path
) external view returns (uint256[] memory amounts);
}
interface IPancakeRouter02 is IPancakeRouter01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
contract DualInvestment is Ownable {
address public USDT_ADDRESS; // USDT_ADDRESS address
IERC20 public usdtToken; // IERC20 of USDT
address public PANCAKE_ROUTER_ADDRESS; // PancakeSwap Router Address
address public fundManager;
// User Info
struct loanMortage {
uint256 collateralAmount;
address tokenAddress;
uint256 tokenAmount;
uint256 loanAmount;
uint256 loantimestamp;
}
// Emitted when a new mortgage is created
event MortgageCreated(
address indexed user,
address indexed tokenAddress,
uint256 collateralAmount,
uint256 loanAmount,
uint256 timestamp
);
// Emitted when a user closes their mortgage
event MortgageClosed(
address indexed user,
address indexed tokenAddress,
uint256 collateralAmount,
uint256 loanAmount,
uint256 receivedAmount,
uint256 timestamp
);
// Emitted when the Fund Manager forces the closure of a deposit
event DepositClosedByOwner(
address indexed user,
address indexed tokenAddress,
uint256 collateralAmount,
uint256 loanAmount,
uint256 receivedAmount
);
uint256 private constant MAX_LOSS_BIPS = 3000;
mapping(address => loanMortage) public loanMortageData;
// supportedTokens Are Only Allows To Buy Token In this Smart Contract
mapping(address => bool) public supportedTokens;
// Create a mapping to store the blacklist status of user addresses
mapping(address => bool) public blacklist;
// Mapping from token address to a list of token holders
mapping(address => address[]) private tokenHolders;
// Modifier to require that the caller is the Fund Manager
modifier onlyFundManager() {
}
modifier notBlacklisted() {
}
uint256 public limitMortageMultiple = 5;
uint256 public dueDateGap = 7 days;
uint256 public totalUSDTalloted = 0;
uint256 public commisionPercentage = 1000;
uint256 public intrest_commisionPercentage = 200;
uint256 public commisionFund = 0;
uint256 public motrageFund = 0;
constructor(address _fundManager, address _USDT, address _pancakeRouter) {
}
// Function for users to deposit a token and receive a mortgage loan in USDT
// The deposited token will be swapped for USDT on PancakeSwap
// The loan amount is determined based on the current token price and the mortgage multiple limit
// The collateral amount is the loan amount minus the user's token deposit amount
function giveMortage(
uint256 _USDTtokenAmountDeposite,
uint256 _loanmultiple,
address _token_address
) public notBlacklisted {
}
function buyTokenWithLoanCredits(
address _tokenAddress,
uint256 _amountInUSDT
) private {
}
// Function for users to end their deposit and close their mortgage loan
// If there is a loss on the deposit (deposit value is less than the loan amount),
// the user's collateral is used to cover the loss up to a maximum of 30%
// If there is a profit on the deposit (deposit value is more than the loan amount),
// the profit is shared between the user and the contract according to the interest commission percentage
function endDeposite() public notBlacklisted {
}
// Function for the Fund Manager to end a user's deposit if the loss is above 30%
// The deposited token will be swapped for USDT on PancakeSwap
// The mortgage fund will absorb the loss and the user's deposit will be closed
function endDepositeByOwner(address _user_addr) public onlyFundManager {
require(
loanMortageData[_user_addr].collateralAmount != 0,
"You Don't Have Active Deposit"
);
// Create a path array with the token addresses
address[] memory path = new address[](2);
path[0] = loanMortageData[_user_addr].tokenAddress;
path[1] = USDT_ADDRESS;
// Estimate the amount of USDT the user should receive in return for their tokens
uint256[] memory _minamounts = IPancakeRouter02(PANCAKE_ROUTER_ADDRESS)
.getAmountsOut(loanMortageData[_user_addr].tokenAmount, path);
// Calculate the _minAmount of USDT to be received by applying the slippage tolerance
uint256 _minAmount = (_minamounts[1] * (100 - 90)) / 100;
require(
loanMortageData[_user_addr].loanAmount > _minAmount,
"There Is No Loss"
);
require(<FILL_ME>)
require(
IERC20(loanMortageData[_user_addr].tokenAddress).approve(
PANCAKE_ROUTER_ADDRESS,
loanMortageData[_user_addr].tokenAmount
),
"Approval failed"
);
uint256[] memory _amountReceived = IPancakeRouter02(
PANCAKE_ROUTER_ADDRESS
).swapExactTokensForTokens(
loanMortageData[_user_addr].tokenAmount,
_minAmount,
path,
address(this),
block.timestamp + 1200
);
require(
_amountReceived[1] >= _minAmount,
"Amount received is below the minimum acceptable amount"
);
motrageFund = motrageFund + _amountReceived[1];
for (
uint256 i = 0;
i < tokenHolders[loanMortageData[_user_addr].tokenAddress].length;
i++
) {
if (
tokenHolders[loanMortageData[_user_addr].tokenAddress][i] ==
_user_addr
) {
tokenHolders[loanMortageData[_user_addr].tokenAddress][
i
] = tokenHolders[loanMortageData[_user_addr].tokenAddress][
tokenHolders[loanMortageData[_user_addr].tokenAddress]
.length - 1
];
tokenHolders[loanMortageData[_user_addr].tokenAddress].pop();
break;
}
}
loanMortageData[_user_addr] = loanMortage(0, address(0), 0, 0, 0);
emit DepositClosedByOwner(
_user_addr,
loanMortageData[_user_addr].tokenAddress,
loanMortageData[_user_addr].collateralAmount,
loanMortageData[_user_addr].loanAmount,
_amountReceived[1]
);
}
function calculatePercentage(
uint256 _numerator,
uint256 _denominator
) public pure returns (uint256) {
}
function calculateCommison(
uint256 _amount,
uint256 _loanmultiple,
uint256 _bips
) public pure returns (uint256) {
}
function checkTheUSDTAvailable(uint256 _amount) public view returns (bool) {
}
// Fetches the price of a specific token in terms of USDT
// @param _tokenAddress The address of the token for which the price is requested
// @return The price of the token in USDT
function getTokenUSDTPrice(
address _tokenAddress
) external view returns (uint256) {
}
// Fetches the price of USDT in terms of a specific token
// @param _tokenAddress The address of the token for which the price is requested
// @return The price of USDT in the specified token
function getUSDTTokenPrice(
address _tokenAddress
) external view returns (uint256) {
}
// Fetches the loan mortgage data for the caller of the function
// @return An array of loanMortage structs containing the loan mortgage data for the caller
function getUserInfo() public view returns (loanMortage[] memory) {
}
// Fetches the loan mortgage data for a specific user (restricted to contract owner)
// @param _user The address of the user for which the loan mortgage data is requested
// @return An array of loanMortage structs containing the loan mortgage data for the specified user
function getUserInfoOnlyOwner(
address _user
) public view onlyOwner returns (loanMortage[] memory) {
}
// Fetches the loan mortgage data for a specific user (restricted to the fund manager)
// @param _user The address of the user for which the loan mortgage data is requested
// @return An array of loanMortage structs containing the loan mortgage data for the specified user
function getUserInfoOnlyFundManager(
address _user
) public view onlyFundManager returns (loanMortage[] memory) {
}
// Write
// Adds a user to the blacklist
// @param user The address of the user to be added to the blacklist
function addToBlacklist(address user) public onlyOwner {
}
// Removes multiple tokens from the list of supported tokens in a batch
// @param _batch An array of token addresses to be removed
function removeSupportedTokens(address[] memory _batch) public onlyOwner {
}
// Adds multiple tokens to the list of supported tokens in a batch
// @param _batch An array of token addresses to be added
function addSupportedTokens(address[] memory _batch) public onlyOwner {
}
// Allows the contract owner to withdraw USDT from the commission fund
// @param _amountInUSDT The amount of USDT to be withdrawn
function withdrawUSDT(uint256 _amountInUSDT) public onlyOwner {
}
function MistakenTokens(address _tokenAddress, uint256 _tokenAmount) external onlyOwner {
}
function MistakenEther(uint256 _amount) external onlyOwner {
}
// Changes the loan multiple limit
// @param _newLimit The new loan multiple limit
function changeLoanMultiple(uint256 _newLimit) public onlyOwner {
}
// Function to add funds to the mortgage fund by the owner
function addMortageFund(uint256 _fund) public onlyOwner {
}
// Function to withdraw funds from the mortgage fund by the owner
function withdrawMortageFund(uint256 _amount) public onlyOwner {
}
// Function to view the list of token holders for a specific token, accessible only by the fund manager
function getTokenHolders(
address _tokenAddress
) public view onlyFundManager returns (address[] memory) {
}
// Function to change the Fund Manager
function changeFundManager(address _newFundManager) public onlyOwner {
}
receive() external payable {}
}
| calculatePercentage(_minAmount,loanMortageData[_user_addr].loanAmount)<=10000-MAX_LOSS_BIPS,"Deposit Is Not Above 30% Loss" | 195,639 | calculatePercentage(_minAmount,loanMortageData[_user_addr].loanAmount)<=10000-MAX_LOSS_BIPS |
"Approval failed" | pragma solidity ^0.8.11;
// ========== External imports. ==========
interface IPancakeRouter01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB, uint256 liquidity);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETH(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountToken, uint256 amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETHWithPermit(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountToken, uint256 amountETH);
function swapExactTokensForTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapTokensForExactTokens(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactETHForTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function swapTokensForExactETH(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactTokensForETH(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapETHForExactTokens(
uint256 amountOut,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function quote(
uint256 amountA,
uint256 reserveA,
uint256 reserveB
) external pure returns (uint256 amountB);
function getAmountOut(
uint256 amountIn,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountOut);
function getAmountIn(
uint256 amountOut,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountIn);
function getAmountsOut(
uint256 amountIn,
address[] calldata path
) external view returns (uint256[] memory amounts);
function getAmountsIn(
uint256 amountOut,
address[] calldata path
) external view returns (uint256[] memory amounts);
}
interface IPancakeRouter02 is IPancakeRouter01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
contract DualInvestment is Ownable {
address public USDT_ADDRESS; // USDT_ADDRESS address
IERC20 public usdtToken; // IERC20 of USDT
address public PANCAKE_ROUTER_ADDRESS; // PancakeSwap Router Address
address public fundManager;
// User Info
struct loanMortage {
uint256 collateralAmount;
address tokenAddress;
uint256 tokenAmount;
uint256 loanAmount;
uint256 loantimestamp;
}
// Emitted when a new mortgage is created
event MortgageCreated(
address indexed user,
address indexed tokenAddress,
uint256 collateralAmount,
uint256 loanAmount,
uint256 timestamp
);
// Emitted when a user closes their mortgage
event MortgageClosed(
address indexed user,
address indexed tokenAddress,
uint256 collateralAmount,
uint256 loanAmount,
uint256 receivedAmount,
uint256 timestamp
);
// Emitted when the Fund Manager forces the closure of a deposit
event DepositClosedByOwner(
address indexed user,
address indexed tokenAddress,
uint256 collateralAmount,
uint256 loanAmount,
uint256 receivedAmount
);
uint256 private constant MAX_LOSS_BIPS = 3000;
mapping(address => loanMortage) public loanMortageData;
// supportedTokens Are Only Allows To Buy Token In this Smart Contract
mapping(address => bool) public supportedTokens;
// Create a mapping to store the blacklist status of user addresses
mapping(address => bool) public blacklist;
// Mapping from token address to a list of token holders
mapping(address => address[]) private tokenHolders;
// Modifier to require that the caller is the Fund Manager
modifier onlyFundManager() {
}
modifier notBlacklisted() {
}
uint256 public limitMortageMultiple = 5;
uint256 public dueDateGap = 7 days;
uint256 public totalUSDTalloted = 0;
uint256 public commisionPercentage = 1000;
uint256 public intrest_commisionPercentage = 200;
uint256 public commisionFund = 0;
uint256 public motrageFund = 0;
constructor(address _fundManager, address _USDT, address _pancakeRouter) {
}
// Function for users to deposit a token and receive a mortgage loan in USDT
// The deposited token will be swapped for USDT on PancakeSwap
// The loan amount is determined based on the current token price and the mortgage multiple limit
// The collateral amount is the loan amount minus the user's token deposit amount
function giveMortage(
uint256 _USDTtokenAmountDeposite,
uint256 _loanmultiple,
address _token_address
) public notBlacklisted {
}
function buyTokenWithLoanCredits(
address _tokenAddress,
uint256 _amountInUSDT
) private {
}
// Function for users to end their deposit and close their mortgage loan
// If there is a loss on the deposit (deposit value is less than the loan amount),
// the user's collateral is used to cover the loss up to a maximum of 30%
// If there is a profit on the deposit (deposit value is more than the loan amount),
// the profit is shared between the user and the contract according to the interest commission percentage
function endDeposite() public notBlacklisted {
}
// Function for the Fund Manager to end a user's deposit if the loss is above 30%
// The deposited token will be swapped for USDT on PancakeSwap
// The mortgage fund will absorb the loss and the user's deposit will be closed
function endDepositeByOwner(address _user_addr) public onlyFundManager {
require(
loanMortageData[_user_addr].collateralAmount != 0,
"You Don't Have Active Deposit"
);
// Create a path array with the token addresses
address[] memory path = new address[](2);
path[0] = loanMortageData[_user_addr].tokenAddress;
path[1] = USDT_ADDRESS;
// Estimate the amount of USDT the user should receive in return for their tokens
uint256[] memory _minamounts = IPancakeRouter02(PANCAKE_ROUTER_ADDRESS)
.getAmountsOut(loanMortageData[_user_addr].tokenAmount, path);
// Calculate the _minAmount of USDT to be received by applying the slippage tolerance
uint256 _minAmount = (_minamounts[1] * (100 - 90)) / 100;
require(
loanMortageData[_user_addr].loanAmount > _minAmount,
"There Is No Loss"
);
require(
calculatePercentage(
_minAmount,
loanMortageData[_user_addr].loanAmount
) <= 10000 - MAX_LOSS_BIPS,
"Deposit Is Not Above 30% Loss"
);
require(<FILL_ME>)
uint256[] memory _amountReceived = IPancakeRouter02(
PANCAKE_ROUTER_ADDRESS
).swapExactTokensForTokens(
loanMortageData[_user_addr].tokenAmount,
_minAmount,
path,
address(this),
block.timestamp + 1200
);
require(
_amountReceived[1] >= _minAmount,
"Amount received is below the minimum acceptable amount"
);
motrageFund = motrageFund + _amountReceived[1];
for (
uint256 i = 0;
i < tokenHolders[loanMortageData[_user_addr].tokenAddress].length;
i++
) {
if (
tokenHolders[loanMortageData[_user_addr].tokenAddress][i] ==
_user_addr
) {
tokenHolders[loanMortageData[_user_addr].tokenAddress][
i
] = tokenHolders[loanMortageData[_user_addr].tokenAddress][
tokenHolders[loanMortageData[_user_addr].tokenAddress]
.length - 1
];
tokenHolders[loanMortageData[_user_addr].tokenAddress].pop();
break;
}
}
loanMortageData[_user_addr] = loanMortage(0, address(0), 0, 0, 0);
emit DepositClosedByOwner(
_user_addr,
loanMortageData[_user_addr].tokenAddress,
loanMortageData[_user_addr].collateralAmount,
loanMortageData[_user_addr].loanAmount,
_amountReceived[1]
);
}
function calculatePercentage(
uint256 _numerator,
uint256 _denominator
) public pure returns (uint256) {
}
function calculateCommison(
uint256 _amount,
uint256 _loanmultiple,
uint256 _bips
) public pure returns (uint256) {
}
function checkTheUSDTAvailable(uint256 _amount) public view returns (bool) {
}
// Fetches the price of a specific token in terms of USDT
// @param _tokenAddress The address of the token for which the price is requested
// @return The price of the token in USDT
function getTokenUSDTPrice(
address _tokenAddress
) external view returns (uint256) {
}
// Fetches the price of USDT in terms of a specific token
// @param _tokenAddress The address of the token for which the price is requested
// @return The price of USDT in the specified token
function getUSDTTokenPrice(
address _tokenAddress
) external view returns (uint256) {
}
// Fetches the loan mortgage data for the caller of the function
// @return An array of loanMortage structs containing the loan mortgage data for the caller
function getUserInfo() public view returns (loanMortage[] memory) {
}
// Fetches the loan mortgage data for a specific user (restricted to contract owner)
// @param _user The address of the user for which the loan mortgage data is requested
// @return An array of loanMortage structs containing the loan mortgage data for the specified user
function getUserInfoOnlyOwner(
address _user
) public view onlyOwner returns (loanMortage[] memory) {
}
// Fetches the loan mortgage data for a specific user (restricted to the fund manager)
// @param _user The address of the user for which the loan mortgage data is requested
// @return An array of loanMortage structs containing the loan mortgage data for the specified user
function getUserInfoOnlyFundManager(
address _user
) public view onlyFundManager returns (loanMortage[] memory) {
}
// Write
// Adds a user to the blacklist
// @param user The address of the user to be added to the blacklist
function addToBlacklist(address user) public onlyOwner {
}
// Removes multiple tokens from the list of supported tokens in a batch
// @param _batch An array of token addresses to be removed
function removeSupportedTokens(address[] memory _batch) public onlyOwner {
}
// Adds multiple tokens to the list of supported tokens in a batch
// @param _batch An array of token addresses to be added
function addSupportedTokens(address[] memory _batch) public onlyOwner {
}
// Allows the contract owner to withdraw USDT from the commission fund
// @param _amountInUSDT The amount of USDT to be withdrawn
function withdrawUSDT(uint256 _amountInUSDT) public onlyOwner {
}
function MistakenTokens(address _tokenAddress, uint256 _tokenAmount) external onlyOwner {
}
function MistakenEther(uint256 _amount) external onlyOwner {
}
// Changes the loan multiple limit
// @param _newLimit The new loan multiple limit
function changeLoanMultiple(uint256 _newLimit) public onlyOwner {
}
// Function to add funds to the mortgage fund by the owner
function addMortageFund(uint256 _fund) public onlyOwner {
}
// Function to withdraw funds from the mortgage fund by the owner
function withdrawMortageFund(uint256 _amount) public onlyOwner {
}
// Function to view the list of token holders for a specific token, accessible only by the fund manager
function getTokenHolders(
address _tokenAddress
) public view onlyFundManager returns (address[] memory) {
}
// Function to change the Fund Manager
function changeFundManager(address _newFundManager) public onlyOwner {
}
receive() external payable {}
}
| IERC20(loanMortageData[_user_addr].tokenAddress).approve(PANCAKE_ROUTER_ADDRESS,loanMortageData[_user_addr].tokenAmount),"Approval failed" | 195,639 | IERC20(loanMortageData[_user_addr].tokenAddress).approve(PANCAKE_ROUTER_ADDRESS,loanMortageData[_user_addr].tokenAmount) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.